1 / 27

Permutations and Combinations!!

Permutations and Combinations!!. Section 1: Permutations. A permutation is an orderly arrangement of objects. The fundamental principle of counting. Let us say that a building has 3 entries and 2 exits: .

shiela
Download Presentation

Permutations and Combinations!!

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Permutations and Combinations!!

  2. Section 1: Permutations A permutation is an orderly arrangement of objects

  3. The fundamental principle of counting Let us say that a building has 3 entries and 2 exits: Question 1: How many ways can a person and enter and leave the building? Here are the possible permutations: 1) Enter through A and leave through F 2) Enter through A and leave through E 3) Enter through A and leave through D 4) Enter through A and leave through C 5) Enter through B and leave through F 6) Enter through B and leave through E 7) Enter through B and leave through D 8) Enter through B and leave through C Thus, there are 8 ways a person can enter and leave the building. Using fundamental principle of counting: There are 2 ways to enter and 4 ways to leave. Therefore, there are 2 ✕ 4 ways of entering and leaving = 8 ways Each way is called a permutation, an orderly arrangement of objects (or in this case – doorways) building F A E B D Entry C Exit

  4. Question 2: Rama has three books. How many ways can he arrange them on a bookshelf? • Well – Let us first call the books A,B and C. • Method 1: The books can be arranged in the following ways: • A,B,C or A,C,B or B,A,C or B,C,A or C,A,B or C,B,A. So there are a total of 6 ways. • Method 2: (Principle of counting) • Imagine that the places 1,2 and 3 on the bookshelf are vacant: _1_ _2_ _3_ • Any of the three books can occupy 1. So there are three ways a book can occupy 1.(N(1) = 3) • After a book has been added to 1, there are two other books that can occupy 2. So there are two ways to occupy two. (N(2) = 2) • After 1 and 2 are occupied, there is only one book left to occupy 3. Therefore, there is only one way to occupy 3. (N(3) = 1) • The number of ways can be given by: N(TOTAL) = N(_1_) ✕ N(_2_) ✕ N(_3_). • = 3 ✕ 2 ✕ 1 = 6.

  5. Question 3: Rama and his friend are asked to choose 1 extra book each to read. They can choose from 4 books. How many ways can they choose? There are 2 places to place the book – Rama and his friend. _R_ _F_ Rama can choose any of the four books. Therefore there are four ways Rama can choose a book. Now that Rama has chosen a book, his friend can choose from the remaining three books. Therefore, there are three ways his friend can choose a book. Total number of ways: 4 ✕ 3 = 12. Question: What happens if the friend chooses first? Does it make any difference? Answer: No it does not. The situation is: _F_ _R_ First – Rama’s friend can choose any of the four books. 4 ways. Second, Rama can choose from the three books that have not been chosen by his friend. 3 ways. The product is the same: 4 ✕ 3 = 12. A small note on notation: Since 4 books are arranged in two places (2 people), the total number of ways can be written as 4P2. Remember this – it will be used later on.

  6. Question 4: Rama has four books. How many ways can he arrange them on a bookshelf such that his favorite mathematics book is always on the left? • Using principle of counting: • Well this time, there are the places 1,2,3, and 4 on the bookshelf and all are vacant: • _1_ _2_ _3_ _4_ • Only his favorite math book can occupy 1. Therefore there is only one way to occupy 1. • The remaining 3 books can occupy 2. Therefore, there are 3 ways to occupy 2. • Two books are not on the shelf. Either of the two can be placed in 3 => 2 ways to occupy 3. • Only one book is left to occupy 4. There is only 1 way to occupy 4. • Number of ways = 1 ✕ 3 ✕ 2 ✕ 1 = 6 • THIS WAS EASY! – It makes no difference that he now has to place 4 books because one of the books has fixed position.

  7. Question 5: Out of Rama’s 4 books, 3 of his books are mathematics book and 1 book is a physics book. How many ways can Rama arrange the books assuming all the mathematics books must be kept together? • There is a trick to solve this problem! You have to imagine that all the mathematics books act as one block. We will call this the M block. The Physics book is the P block. • _1_ _2_ _3_ _4_ • As you might notice, there are only 2 ways to arrange the M and P blocks: Either MP or PM. • Within the M block, the books can be arranged in 3 ✕ 2 = 6 ways. (You should be able to deduce this yourself. If you have doubts, refer back to Question 2.) • Since there is only one book in block P, it can only be arranged one way. • The total number of ways = • (ways of arranging blocks) ✕ (ways of arranging within M) ✕ (ways of arranging within P) • = 2 ✕ 6 ✕ 1 = 12. M block P block

  8. A General formula for permutations Let us assume there are ‘r’ spaces to fill on a bookshelf. And Rama wants to find out how many ways he can arrange ‘n’ books on the bookshelf. If there are n books – any book can be placed in _1_ (therefore n ways) In _2_, any book can be placed except the 1 book placed in _1_. (So there are “n-1” ways) Similarly, in _3_, any book can be placed except the 2 books in _1_ and _2_ (Thus “n-2” ways) In _r–1_, any book can be placed except the r-2 books placed in _1_ …. _r–2_ . Therefore, there are “n – (r–2)” ways. We have seen before, total number of ways: N(_1_) ✕ N(_2_) ✕ N(_3_) …. N(_r–1_) ✕ N(_r_) Number of ways (denoted by nPr for permutations) = n✕ (n–1) ✕ (n–2) … [n – (r–2)] ✕ [n – (r-1)]

  9. Factorial notation “Factorial” is expressed by the “ ! “ sign. 1 factorial = 1! = 1 2 factorial = 2! = 2 ✕ 1 3 factorial = 3! = 3 ✕ 2 ✕ 1 4 factorial = 4! = 4 ✕ 3 ✕ 2 ✕ 1 In general: n! = n✕ (n–1) ✕ (n–2) … ✕ 3 ✕ 2 ✕ 1 You can notice a pattern. There is one exception, however: 0! = 1. Now let us look at our formula for the total number of permutations (number of ways) from the previous slide: nPr = n✕ (n–1) ✕ (n–2) … [n – (r–2)] ✕ [n – (r-1)] If the number of spaces on the bookshelf is same as the number of books (as in question 2), then r = n. The following will be the resultant expression: nPn = n✕ (n–1) ✕ (n–2) … [n – (n–2)] ✕ [n – (n-1)] = n✕ (n–1) ✕ (n–2) … 2 ✕ 1 = n! (So ‘n’ factorial is the number of ways that ‘n’ items can be arranged in ‘n’ spaces.) Question: Now, can you solve question 2 using factorial notation? Answer: Very simple. Here, 3 books need to be arranged in 3 spaces. So number ways = 3P3. Number of ways = 3! = 3 ✕ 2 ✕ 1 = 6. Same answer!!

  10. The final formula for permutations (part 1: Easy way to understand) I want you to refer to question 6. Question 6: Rama and his friend are asked to choose 1 extra book each to read. They can choose from 5 books. How many ways can they choose? This is the answer: There are 2 places to place the book – Rama and his friend. _R_ _F_ Rama can choose any of the five books. Therefore there are four ways Rama can choose a book. Now that Rama has chosen a book, his friend can choose from the remaining four books. Therefore, there are three ways his friend can choose a book. Total number of ways = 5P2 = 5 ✕ 4 = 20. (You are familiar with this method) Now notice: – n = 5 (As there are 5 books), and r = 2 (There are 2 places: Rama and his friend) n! = 5 ✕ 4 ✕ 3 ✕ 2 ✕ 1 and r! = 2 ✕ 1 In general terms, the number of ways (permutations) of arranging n items in r spaces is given by:

  11. The final formula for permutations (part 1: The formal derivation) We will start by using the formula derived in the slide “a general formula”: Multiply and divide by (n –1)! To get: Notice: The numerator is nothing but n! and the denominator is the (n – r)!, that we multiplied and divided by. Therefore, the general formula for the number of ways (permutations) of arranging n items in r spaces is given by:

  12. Question 7 a): How many four digit numbers can be made from {1,2,3,4,5,6} such that no digit is repeated twice. Answer: Well, there are 6 numbers and 4 spaces to fill. So n = 6 and r = 4. = 360 Question 7 b): How many of these numbers are greater than 2000? Answer: You might notice that if; the first digit of the four digit number is 1, then the number will be less than 2000. If the first digit belongs to {2,3,4,5,6}, the number is greater than 2000. The first digit belongs to {2,3,4,5,6}. Therefore there are 5 ways to fill the first digit. Now that one number has been used, there are 5 numbers left to fill three spaces. (n = 5 and r = 3) The number of ways for the last three digits = The total number of ways (by the counting principle) = 5 ✕ 60 = 300. So 300 out of the 360 numbers are greater than 2000

  13. Question 8: n different colored marbles are being filled in 2 boxes, and only one marble can be put in each box. If the number of ways of putting the marbles in the boxes is 20, how many marbles are there? Answer: You are being asked to find n. r = 2 and n cannot be negative. Therefore, n = 5. Let us confirm. 5!/3! = 5 ✕ 4 = 20. The answer is correct!

  14. Question 9: Using the idea that nPr = n! / (n – r)!, Prove that nPn = n! Proofs are fun!! (We already noted that 0! = 1 in the slide “Factorial notation”)

  15. Section 2: Combinations A combination is a mere selection of objects

  16. Question 1: The teacher wants to give chocolates to 2 students in a class. If a class has 9 students, how many ways (how many combinations) can the teacher give the chocolates? When the teacher gives a chocolate to 1 and 2, it will be denoted by (1,2) Here are the students: The teacher can give to (1,2) or (1,3) or (1,4) or (1,5) or (1,6) or (1,7) or (1,8) or (1,9) or (2,3) or (2,4) or (2,5) or (2,6) or (2,7) or (2,8) or (2,9) or (3,4) or (3,5) or (3,6) or (3,7) or (3,8) or (3,9) or (4,5) or (4,6) or (4,7) or (4,8) or (4,9) or (5,6) or (5,7) or (5,8) or (5,9) or (6,7) or (6,8) or (6,9) or (7,8) or (7,9) or (8,9) If you count, there are 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 ways = 36 combinations. Notice: (2,1) has not been included. Neither has (3,2) or (3,1). Neither has (4,3) or (4,2) or (4,1). This is because (2,1) is the same as (1,2)! The teacher is giving the chocolate to the same two children! This is an example of a combination. The teacher has to merely select the children. It does not matter which order they are selected. It only matters whether they get a chocolate or not. 1 2 4 6 7 8 9 3 5

  17. Relation between combinations and permutations In Question 1, we can see that there are 36 combinations. If you count, there are 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 ways = 36 combinations. So 9C2 = 36. Observe, that, This is interesting: the number of permutation is exactly double the number of combinations! n fact, in this case r = 2, and the number of permutations is r! (2! = 2 ✕ 1 = 2.) times the number of combinations. 9C2✕ 2! = 9P2 Question 2: How many ways can a team of three be selected from four people? Let people be A,B,C and D. Possible combinations are: ABC, ABD, ACD BCD = 4 4C3 = 4 This time r = 3. 3! = 6. 4 ✕ 6 = 24. 4C3✕ 3! = 4P3 In general, we can observe that: nCr = nPr✕ r!

  18. Deriving a formula for combinations. • Let us use Question 2: How many ways can a team of three be selected from four people? • In this case, permutations of 4 things are taken 3 at a time. • There are four selections possible ABD, ACD, ABC,BCD. • Each set of ‘r’ (3) things can be arranged in 3P3 = 3! ways • From logic: • Number of Permutations of n things taken r at a time = Number of selections ✕ arrangements of r things • This follows from the fact that permutation is marked by selections of different elements and arrangements • Therefore, • But , and Therefore (Arrangement of r things is given by r! because rPr = r!) (nCr is the number of possible combinations)

  19. Question 3a: A quiz team consists of 2 boys and 2 girls. How many ways can the quiz team be made from a group of 4 boys and 3 girls? This is mere selection, and therefore, it is a combination. The order in which members of the team are selected makes no difference. 2 boys need to be selected from 4. The number of combinations = 4C2 2 girls need to be selected from 3. The number of combinations = 3C2 The Quiz team needs 2 boys and 2 girls. Therefore, the total number of combinations = 6 ✕ 3 = 18 Question 3b: 2 members of the quiz team have an illness and 2 replacements are required. The replacements must be chosen from a group of 4 girls and 3 boys. If the replacements can be chosen in three ways, determine how many girls and how many boys fell ill? Either: 2 girls are ill or 1 girl and 1 boy are ill or 2 boys are ill. If two girls are ill: Then the replacements could be chosen in 4C2 = 6 ways. If one girl and one boy are ill: Then the replacements could be chosen in 4C1✕3C1 = 12 ways. If two boys are ill: Then the replacements could be chosen in 3C2 = 3 ways. Therefore, 2 boys fell ill.

  20. A few things you must remember: 1) nC1 = n This is because, to select 1 thing from a group of n things, any one of the n may be selected, so there are n ways of selecting 1 thing. 2) nCn = 1 This because, if you must select n things from a group of n things, there is only one way to select it: select all the things! 3) nC0 = 1 When in doubt, plug it in the formula! Logically, this is just because, there is only one way to select zero things from n things – select nothing. I know – this one is a little bit strange.

  21. Question 4a: There are 8 points on a plane, such that it is impossible to join a single line through three points. How many lines can be drawn. This is an example of a combination, because there can be only one line joining any two points A and B. Therefore, there is no difference between AB and BA. The two points just need to be selected. Therefore, n = 8 and r = 2. Number of combinations = 8C2 = 4 ✕ 7 = 28. Simple trick for quick calculation: Rather than doing: We can instead do: Makes it much easier, doesn’t it? Question 4b: How many lines can be drawn if 3 of the 8 points lie on the same line. Assuming no three points lie on the same line, the number of ways is 28. A B C In three numbers A,B,C. The combinations are AC, BC, AB. However, in this case: line AB = line AC = line BC. So all three combinations must be counted as one (same line) Thus, number of combinations = 28 – 2 = 26.

  22. Quick trick for easy calculation: nCr = nCn-r Derivation While 6C4 may be difficult to calculate 6C(6-4) = 6C2 gives the same result and is easy to calculate = (6 ✕ 5)/2 = 15 Question 5: There are 6 bowlers and 9 batsman on a cricket team. How many ways can a team of 11 be chosen if the team requires a minimum of 4 bowlers? This is mere selection, and therefore, it is a combination. The order in which members of the team are selected makes no difference. If a team requires a minimum of 4 bowlers, then it can either have; (1) 4 bowlers and 7 batsman (2) 5 bowlers and 6 batsman (3) 6 bowlers and 5 batsman For (1), the number of combinations = 6C4✕9C7 = 6C2✕9C2 = 15 ✕36 = 540. I used the quick trick for easy calculation: nCr = nCn-r . 6C4 = 6C2 and 9C7 = 9C2. For (2), the number of combinations = 6C5✕9C6 = 6C1✕9C3 = 6 ✕ 84 = 504 For (3), the number of combinations = 6C6✕9C5 = 1 ✕9C4 = 3 ✕ 2 ✕ 7 ✕ 3 = 126 Options = (1) or (2) or (3) => Answer = 126 + 504 + 540 = 1170 ways.

  23. Section 3: A few extra questions

  24. 1a) There exist 5 cities. If there are n roads connecting all of the cities to one another, what is the value of n? It is a combination as the order of cities selected does not matter, but the selection of cities matters. A road is connected between 2 cities. Therefore, 1b) How many ways can a person travel from city A to city E, assuming the person passes each city only once. This is an example of a permutation because the order of the cities matters. The initial city is fixed (=A). The final city is fixed (=E). In the middle three cities – the person can move through the cities in any order. Therefore, there are 3P3 ways of passing through. Therefore, number of ways to get from A to E = 3P3 = 3! = 6. There are many alternative methods. For example, but principle of counting: _1_ _2_ _3_ _4_ _5_ N(1) = 1. N(5) = 1. N(2) = B,C,D = 3. N(3) = 2 (one is used up => choice between 2 cities). N (4) = 1. Therefore total number of ways = 1 ✕ 1 ✕ 3 ✕ 2 ✕1 = 6

  25. 2a) How many four digit numbers are there? This is a permutation as the order of digits matters. All the digits must belong to {0,1,2,3,4,5,6,7,8,9} – As you might notice, the set contains 10 elements. However, note that the first digit cannot be zero. (Therefore, number of ways for first digit = 10 – 1 = 9). Also, note that numbers can be repeated. _1_ _2_ _3_ _4_ Therefore, the total number of permutations = 9 ✕ 10 ✕ 10 ✕ 10 = 9000 2b) What percentage of these numbers are divisible by 5? The number of arrangements of digits can be found in a similar way In this case, note: The last digit must be either 0 or 5. (Thus, there are only two ways to choose the last digit) _1_ _2_ _3_ _4_ Therefore, the total number of permutations = 9 ✕ 10 ✕ 10 ✕ 2 = 1800 Percentage = 1800/9000 ✕ 100 = 18/90 ✕ 100 = 1/5 ✕ 100 = 20%

  26. 3a) How many triangles can be formed from 10 points on an xy plane? (The triangles are formed by connecting the points) Since a triangle is nothing but a selection of three points, this is a combination. Therefore, the number of combinations = There will be 120 possible triangles formed by connecting the points 3b) How many polygons with k sides can be formed from n points on an xy plane? (The polygons are firmed by connecting the points). Give your answer in terms of n and k. Following a similar pattern as that observed in the precious part, k points need to be selected from n points. Therefore, the number of combinations = nCk. 3c) What is the ratio of the number of polygons formed with k sides to that with k+1 sides from n points? (Give your answer in terms of n and k.) Ratio

  27. Finished!

More Related