Permutations and Combinations Additional Problems Permutations and Combinations
Permutations and Combinations Additional Problems.
Permutations and Combinations with and without Repetition 2
n is number of distinct classes of objects in the original bag! - r-permutation without repetition - order matters (r distinguishable slots) - without replacement (n distinguishable objects) n! / (n-r)! - r-permutation with repetition - order matters (r distinguishable slots) - with replacement (n distinct classes of indistinguishable objects) n^r - r-combination without repetition - order does not matter (r indistinguishable slots) - without replacement (n distinguishable objects) n! / r! (n-r)! - r-combination with repetition - order does not matter (r indistinguishable slots) - with replacement (n distinct classes of indistinguishable objects) (n+r-1)! / r! (n-1)!
Combinations or Permutations? o 1. In how many ways can you choose 5 out of 10 friends to invite to a dinner party? o Solution: Does the order of selection matter? o NO o If you choose friends in the order A, B, C, D, E or A, C, B, D, E the same set of 5 was chosen, so we conclude that the order of selection does not matter. o We will use the formula for combinations since we are concerned with how many subsets of size 5 we can select from a set of 10. C(10, 5) =
Permutations or Combinations? o How many ways can you arrange 10 books on a bookshelf that has space for only 5 books? o Does order matter? o The answer is yes since the arrangement ABCDE is a different arrangement of books than BACDE. o We will use the formula for permutations. We need to determine the number of arrangements of 10 objects taken 5 at a time so we have P(10, 5) = 10(9)(8)(7)(6)=30, 240
Lottery problem o A certain state lottery consists of selecting a set of 6 numbers randomly from a set of 49 numbers. To win the lottery, you must select the correct set of six numbers. How many possible lottery tickets are there? o Solution. The order of the numbers is not important here as long as you have the correct set of six numbers. o To determine the total number of lottery tickets, we will use the formula for combinations and find C(49, 6), the number of combinations of 49 items taken 6 at a time. o C(49, 6) = 13, 983, 816
Examples o How many ways can a 3 -person subcommittee be selected from a committee of a seven people? o The number of ways that a three-person subcommittee can be selected from a seven member committee is the number of combinations (since order is not important in selecting a subcommittee) of 7 objects 3 at a time. This is:
Example (cont) o How many ways can a president, vice-president, and secretary can be chosen from a committee of 7 people? o The number of ways a president, vice-president, and secretary can be chosen from a committee of 7 people is the number of permutations (since order is important in choosing 3 people for the positions) of 7 objects 3 at a time. This is: P(7, 3)
Problem o From a standard 52 -card deck, how many 7 -card hands have exactly 5 spades and 3 hearts? o The five spades can be selected in C 13, 5 ways and the two hearts can be selected in C 13, 2 ways. Applying the Multiplication Principle, we have: Total number of hands
Problem o How many ways are there to select five bills from a cash box containing $1, $2, $5, $10, $20, $50 and $100 bills, such that the bills are indistinguishable and the order in which they are selected is unimportant. (there also at least 5 bills of each kind). o Solution o Order doesn’t matter and o Repetitions are allowed o This is like drawing colored balls with replacement. The colors correspond to the values. Since the order doesn’t matter we have: o C(7+5 -1, 5)=462
Combinations with Repetition Approach: Place five markers in the compartments i. e. , # ways to arrange five stars and six bars. . . Solution: Select the positions of the 5 stars from 11 possible positions ! C(n+r-1, 5)= C(7+5 -1, 5)=C(11, 5) compartments and dividers n=7 r=5 markers 11
exercise o A combination lock will open when the right choice of three numbers (from 1 to 30, inclusive) is selected. How many different lock combinations are possible assuming no number is repeated?
exercise A basketball team consists of two centers, five forwards, and four guards. In how many ways can the coach select a starting line up of one center, two forwards, and two guards? Center: Forwards: Guards: Thus, the number of ways to select the starting line up is 2*10*6 = 120.
Problem o A cookie shop has 4 kinds of cookies and we want to pick 6. In how many ways we can pick them? o We don’t care about the order and cookies from one kind are indistinguishable. o This is precisely the problem we saw to solve the r-combination with repetition o C(6+4 -1, 6)=84.
Problem o In how many ways can we place 10 indistinguishable items in 8 distinguishable boxes. o This is precisely the problem we saw to solve the r-combination with repetition: o C(10+8 -1, 10)
Problem o How many different “words” can we create by reordering SUCCESS ? o Total number of permutations is 7!. However permuting the 3 S’s does not create a new word, idem 2 C’s: o 7!/3! 2!
Problem o Math teacher has 40 issues of a journal and packs them into 4 boxes, 10 issues each. o a) How many ways if the boxes are numbered? o assign boxes to issues: 40! / (10!)^4 o b) How many ways if the boxes are indistinguishable. o There are 4! ways to label the boxes, o once we have distributed them in unlabelled boxes. o Since the number of ways to distribute them in labeled boxes is given by a) i. e. . 40! / (10!)^4 o we get 40! / (10!)^4 4!.
Problem o How many different cross terms will we generate when we multiply out: (x 1+x 2+. . . +xm)^n ? o How many different exponents are there of the sort x 1^n 1 x 2^n 2. . . xm^nm with n 1+n 2+. . . +nm=n. o Equivalent to : how many different way are there to put n balls in m boxes: o C(n+m-1, n)
Problem o In how many ways can 7 girls and 3 boys line up, if the boys must stand next to each other? o Tie-up 3 boys as one , thus it is o about ordering 8 “things” and then choosing an order for the boys inside the one “big thing”. o 8!*3!
Problem o Suppose an operating system has a queue of 3 low priority and 5 high priority processes ready to run. In how many ways could these processes be ordered for execution if 2 low priority processes are not allowed to be executed back to back? o Order H in 5! Ways To get HHHHH o Then _H_H_H_ o Order L in 3! Ways o 6 p 3 for the 3 spots where we put the Ls. o 5!*3!* 6 p 3
- Slides: 20