Presentation is loading. Please wait.

Presentation is loading. Please wait.

Permutations and Combinations. Permutations Definition –An ordered arrangement of objects is called a permutation. –Hence, a permutation of n distinct.

Similar presentations


Presentation on theme: "Permutations and Combinations. Permutations Definition –An ordered arrangement of objects is called a permutation. –Hence, a permutation of n distinct."— Presentation transcript:

1 Permutations and Combinations

2 Permutations Definition –An ordered arrangement of objects is called a permutation. –Hence, a permutation of n distinct elements is an ordering of these n elements. Notation –P(n,r) or n P r.:The number of permutations of r distinct objects chosen from n distinct objects. P(n,r) =n!/(n-r)! –P(n,n)= n! – Example –Ordering of last four digits of a telephone number if digits are allowed to repeat 10.10.10.10 = 10000 –Ordering of four digits if repetition is not allowed = 10.9.8.7 = 5040 = 10!/6!

3 Permutations: Example 1. Ten athletes compete in an Olympic event. Gold, silver and bronze medals are awarded to the first three in the event, respectively. How many ways can the awards be presented? Answer: 3 objects from a pool of 10 = P(10,3) =10!/7!= 720 2. How many ways can six people be seated on six chairs? Answer: P(6,6) = 6! = 720

4 Permutations: Mathematical Definition Hence, mathematically, for r  n, an r-permutation from n objects is defined by –P(n,r) = n*(n-1)*(n-2)*…..*(n-r+1) =  P(n,r) = for 0  r  n where n! = n*(n-1)*(n-2)*….*3*2*1 and by definition 0! = 1 Hence, P(10,4) = 10! / (10-4)! = 10!/6! = 5040

5 Permutations: Some special cases P(n,0) = n! / n! = 1 –This means that there is only one ordered arrangement of 0 objects, called the empty set. P(n,1) = n!/ (n-1)! = n –There are n ordered arrangements of one object (i.e. n ways of selecting one object from n objects). P(n,n) = n!/(n-n)! = n!/0! = n! –This means that one can arrange n distinct objects in n! ways, that is nothing but the multiplication principle.

6 Permutations: Practice What is the number of permutations of 3 objects, say, a, b, and c? –(Hint: P(3,3)=?) A.27 B.6 C.18 D.3 E.others

7 How many three letters (not necessary meaningful) can be formed from the word “compiler” if no letters can be repeated? –(Hint: P(8,3)=?) A.8! B.3! C.5! D.8!/3! E.8!/5!

8 In how many ways can a president and vice-president be selected from a group of 20 candidates? A.20! B.20 x 20 C.20 x 19 D.2! E.others

9 A Hard Problem The professor’s dilemma: how to arrange four books on OS, seven on programming, and three on data structures on a shelf such that books on the same subject must be together? –Solution: check subtasks first –Subtask 1: arranging three subject 3! outcomes –Subtask 2: arranging OS books 4! outcomes –… –Total: 3! x 4! x 7! x 3! = 4,354,560

10 Combinations When order in permutations becomes immaterial, i.e. we are just interested in selecting r objects from n distinct objects, we talk of combinations denoted by C(n,r) or n C r For each combination, there are r! ways of ordering those r chosen objects Hence, from multiplication principle, C(n,r)* r! = P(n,r)  –Note: C(n,r) is much smaller than P(n,r)

11 Combinations: Example How many 5-card poker hands can be dealt from a 52-card desk? –Question: Is this a permutation problem or combination problem? Does the order of cards matter? –C(52,5) = P(52,5)/5! = 52!/(5!x47!) =52x51x50x49x48/5!=2,598,960

12 Combinations: Special Cases C(n,0) = 1 –Only one way to choose 0 objects from n objects- chose the empty set C(n,1) = n –Obvious, since n ways to choose one object from n objects C(n,n) = 1 –Only one way to choose n objects from n objects

13 Exercises Ten athletes compete in an Olympic event. Three will be declared as winners. In how many ways can the winner be chosen? –Is this problem differ from the previous ten- athletes problem? –Is yes, in which way it differs? In how many ways can a committee of 3 be chosen from a group of 12 people?

14 Combinations in conjunction with multiplication and addition principles In how many ways can a committee of 2 women and 3 men be selected from a pool of 5 women and 7 men? –C(5,2) x C(7,3) A set of four coins is selected from a box of five dimes and seven quarters. –Find the number of sets of four coins. C(12,4) –Find the number of sets in which two are dimes and two are quarters. C(5,2) x C(7,2) –Find the number of sets composed of all dimes or all quarters. C(5,4) + C(7,4) –Find the number of sets with three or more quarters. C(7,3) x C(5,1) + C(7,4)

15 Class Discussions How many ways can a committee of two be chosen from four men and three women and it must include at least one man. How many distinct permutations can be made from the characters in the word FLORIDA? How many distinct permutations can be made from the characters in the word MISSISSIPPI? Please read Table 4.2 in the seventh edition and Table 3.2 in the sixth edition.


Download ppt "Permutations and Combinations. Permutations Definition –An ordered arrangement of objects is called a permutation. –Hence, a permutation of n distinct."

Similar presentations


Ads by Google