Untitled

 avatar
unknown
plain_text
a year ago
7.4 kB
7
Indexable
from pptx import Presentation
from pptx.util import Inches

# Create a presentation object
prs = Presentation()

# Slide 1: Title Slide
slide = prs.slides.add_slide(prs.slide_layouts[0])
title = slide.shapes.title
subtitle = slide.placeholders[1]
title.text = "Permutations & Combinations"
subtitle.text = "Class 11th Mathematics for JEE Preparation\nYour Name / Institution"

# Slide 2: Introduction
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Introduction"
content.text = ("- Permutations and combinations are fundamental concepts in combinatorial mathematics.\n"
                "- They help in counting the number of ways to arrange or select objects from a set.")

# Slide 3: Difference Between Permutation and Combination
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Difference Between Permutation and Combination"
content.text = ("- **Permutation**: Arrangement of objects in a specific order.\n"
                "  Example: Arranging books on a shelf.\n"
                "- **Combination**: Selection of objects without regard to order.\n"
                "  Example: Selecting a team from a group.")

# Slide 4: Fundamental Principles of Counting
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Fundamental Principles of Counting"
content.text = ("- **Addition Principle**: If event A can occur in m ways and event B can occur in n ways, and both cannot occur simultaneously, then A or B can occur in m + n ways.\n"
                "- **Multiplication Principle**: If event A can occur in m ways and event B can occur in n ways after A, then the pair (A, B) can occur in m × n ways.")

# Slide 5: Permutations
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Permutations"
content.text = ("- **Definition**: An arrangement of objects in a specific order.\n"
                "- **Formula**: P(n, r) = n! / (n - r)!\n"
                "  Example: Number of ways to arrange 3 out of 5 books: P(5, 3) = 5! / (5 - 3)! = 60")

# Slide 6: Permutations of n Different Objects
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Permutations of n Different Objects"
content.text = ("- **Example**: Find the number of ways to arrange the letters in the word \"CAT\".\n"
                "  Solution: P(3, 3) = 3! = 6")

# Slide 7: Permutations When All Objects are Not Distinct
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Permutations When All Objects are Not Distinct"
content.text = ("- **Example**: Number of ways to arrange the letters in the word \"BALLOON\".\n"
                "  Solution: 7! / (1! × 1! × 2! × 2! × 1!) = 1260")

# Slide 8: Circular Permutations
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Circular Permutations"
content.text = ("- **Definition**: Arrangements of objects in a circle.\n"
                "- **Formula**: (n - 1)!\n"
                "  Example: Arranging 4 people around a circular table: (4 - 1)! = 3! = 6")

# Slide 9: Practice Problems for Permutations
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Practice Problems for Permutations"
content.text = ("- **Problem 1**: How many ways can 5 different books be arranged on a shelf?\n"
                "  Solution: P(5, 5) = 5! = 120\n\n"
                "- **Problem 2**: How many ways can 3 people be seated in a row of 6 seats?\n"
                "  Solution: P(6, 3) = 6! / (6 - 3)! = 120")

# Slide 10: Combinations
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Combinations"
content.text = ("- **Definition**: Selection of objects without regard to order.\n"
                "- **Formula**: C(n, r) = n! / [r! (n - r)!]\n"
                "  Example: Number of ways to choose 3 out of 5 books: C(5, 3) = 5! / (3! × 2!) = 10")

# Slide 11: Combinations of n Different Objects
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Combinations of n Different Objects"
content.text = ("- **Example**: How many ways can you choose 2 out of 4 books?\n"
                "  Solution: C(4, 2) = 4! / (2! × (4 - 2)!) = 6\n\n"
                "- **Example**: How many ways can a committee of 3 be formed from 5 people?\n"
                "  Solution: C(5, 3) = 5! / (3! × 2!) = 10")

# Slide 12: Combinations When All Objects are Not Distinct
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Combinations When All Objects are Not Distinct"
content.text = ("- **Example**: How many ways can you choose 3 balls from a set of 5 red and 4 blue balls?\n"
                "  Solution: (5 + 3 - 1)! / (3! × (5 - 1)!) = 56")

# Slide 13: Practice Problems for Combinations
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Practice Problems for Combinations"
content.text = ("- **Problem 1**: How many ways can you choose 4 out of 10 students?\n"
                "  Solution: C(10, 4) = 10! / (4! × 6!) = 210\n\n"
                "- **Problem 2**: From a group of 8 men and 6 women, how many ways can a team of 5 be formed with at least 3 men?\n"
                "  Solution: C(8, 3) × C(6, 2) + C(8, 4) × C(6, 1) + C(8, 5) = 560 + 840 + 56 = 1456")

# Slide 14: Special Cases - Permutations with Restrictions
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Special Cases - Permutations with Restrictions"
content.text = ("- **Example**: How many ways can you arrange 5 people in a row if 2 specific people must always be next to each other?\n"
                "  Solution: Treat the 2 people as one unit. Then, there are 4 units to arrange, which can be done in 4! ways. The 2 people can switch places in 2! ways.\n"
                "  Total: 4! × 2! = 24 × 2 = 48\n\n"
                "- **Example**: How many ways can you arrange the letters of \"EXAM\" if 'E' and 'A' must not be together?\n"
                "  Solution: Total arrangements = 4! = 24\n"
                "  Arrangements where 'E' and 'A' are together = 3! × 2 = 12\n"
                "  Required arrangements = 24 - 12 = 12")

# Slide 15: Special Cases - Combinations with Restrictions
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = "Special Cases - Combinations with Restrictions"
content.text = ("- **Example**: How many ways can you choose 3 students from 6 if 2 specific students cannot be chosen together?\n"
                "  Solution: Total ways to choose 3 students = C(6, 3) = 20\n"
                "  Ways to choose 3 including the 2 specific students =
Editor is loading...
Leave a Comment