Presentation is loading. Please wait.

Presentation is loading. Please wait.

Permutations.

Similar presentations


Presentation on theme: "Permutations."— Presentation transcript:

1 Permutations

2 Permutations Permutation: The number of ways in which a subset of objects can be selected from a given set of objects, where order is important. Given the set of three letters, {A, B, C}, how many possibilities are there for selecting any two letters where order is important? (AB, AC, BC, BA, CA, CB)

3 Definition: A permutation of a set of set of objects is an ordering of the objects in a row. A permutation of n objects taken r at a time (also called r-permutation of n objects) in an ordered selection or arrangement of r of the objects. P(n,r) = n! / (n-r)! Ex: set of elements a,b,c Has 6 permutations a,b,c a,c,b b,c,a b,a,c c,a,b c,b,a

4 2- permutations of { a, b } with unlimited repetitions are :
aa ,ab, ba, bb

5 Ex: set of elements a,a,a,b,c.
Has 3- permutations : aaa, aab ,aba, baa, aac,aca, caa,abc, acb,bac, bca,cab, cba.

6 Suppose selection are to be made from the four objects {a,b,c,d} then the 2- permutations without repetitions ? ab,ba ac,ca, ad,da bc,cb, bd,db, cd,dc. Total : 12

7 Suppose selection are to be made from the four objects {a,b,c,d} then the 3- permutations without repetitions ? abc, acb, bac, bca, cab, cba, abd, adb, bad, bda, dab, dba, acd, adc, cad, cda, dac, dca, bcd, bdc, cbd, cdb, dbc, dcb Total : 24

8 Enumerating r-permutations without repetitions
P(n , r)=n(n-1)(n-2) (n-r+1)=n!/(n-r)! Since there are n distinct objects, the first position of r-permutation can be filled in n ways, the second position of r-permutation can be filled in n-1ways, so on and rth position can be filled in n-r+1 ways. From the definition of factorials P(n , r)= n!/(n-r)!

9 P(n , n) = n!/0! = n! When r = n Corollary:
There are n ! permutations of n distinct objects. There are 3! Permutations of {a,b,c} There are 4! Permutations of {a,b,c,d}

10 The number of 2-permutations of
{a, b, c, d, e} is Solution: n=5 r=2 C(5,2) = n! 5! (n-r)! (5-2)!

11 Examples: How many ways can the letters in the word C O M P U T E R be arranged in a row? COMPUTER = 8 letters 8 letters can be arranged in 8! ways

12 How many ways can the letters in the word C O M P U T E R be arranged if the letters CO must remain next to each other as a unit. Sol: COMPUTER = CO is treated as 1 unit Then, number of characters= 7 7 letters can be arranged in 7! Ways Note: don’t consider OC. Because CO is consider as a unit.

13 Evaluate p(5,2) n! n=5, r=2 (n-r)! 5! (5-2)!

14 How many 4-permutations are there of a set of seven objects.
n! N=7, r=4 (n-r)! 7! (7-4)!

15 How many 5-permutations are there of a set of five objects.
n=5, r=5 n! 5! (n-r)! (5-5)!

16 How many different ways can the letters of the word BYTES be chosen and written in a row?
Sol: BYTES - 5 letters 5 letters can be chosen in 5! ways

17 How many different ways this can be done if the first letter must be B.
Sol: BYTES - 1st letter B is fixed, remaining 4 letters left to choose. So, 4 letters can be chosen in 4! ways

18 r-permutations example
How many ways are there for 5 people in this class to give presentations? (Assume that there are 80 students in class) There are 80 students in the class P(80,5) = 80!/(80-5)! =80*79*78*77*76 = 2,884,801,920 Note that the order they go in does matter in this example!

19 In how many ways can 7 women and 3 men be arranged in a row if the 3 men must always stand next to each other? Sol: W W W W W W W MMM (7women+3men) 7 women can be arranged in 7! Ways. 3 men can be arranged in 3! Ways. But 3 men must always together so consider as a unit. Number of elements to arrange 8 in 8!ways Finally 8! * 3!

20 Number of ways to arrange 7 letters word is Finally 2 * 20! * P(24,5)
In how many ways can the letters of the English language be arranged so that there are exactly 5 letters between the letters a and b? Sol: a _ _ _ _ _ b Number of alphabets =26 Already starting ending characters are given. Number of characters left are= 26-2=24. Number of ways to choose 5 letters is P(24,5). There are 2 ways to place a and b. and then 20! ways to arrange any 7-letter word treated as one unit along with the remaining 19 letters Number of ways to arrange 7 letters word is Finally 2 * 20! * P(24,5)

21 There are (n-1)! Permutations of n distinct objects in a circle.
Example: In how many ways can 5 children arrnage themselevs in a ring. in (n-1)! Ways. n=5 So finally 4! ways

22 Combinations

23 Combinations Let n and r be non negative integers with r<=n.
An r-combination of a set of n elements is a subset of r of the n elements. The symbol C(n , r) Which is read as “n choose r” denotes No. of subsets of size r that can be chosen from a set of n elements.

24 Enumerating r-combinations without repetitions
C(n , r) = P(n , r)/r! = n!/(n-r)! r!

25 Let S={Andhra, Bangalore,chennai,Delhi} 3-combination of S is C(4,3) = 4 {Bangalore,chennai,Delhi} {Andhra, chennai, Delhi} {Andhra, Bangalore,Delhi} {Andhra, Bangalore,chennai}

26 In an ordered selection it is not only what elements are chosen but which the order in which they are chosen matters. In an unordered selection it is only the identity of chosen elements that matters.

27 In how many ways can a hand of 5 cards be selected from a deck of 52 cards
Sol: n=52, r=5 C(n,r) = n! 52! (n-r)! r! (52-5)! 5!

28 How many 5-card consists only of hearts?
Sol: n=13, r=5 There are only 13 hearts Selecting 5 cards from 13 cards C(n,r) = n! 13! (n-r)! r! (13-5)! 5!

29 How many 5-card hands consists of cards from a single suit.
Sol: there are 4 suits( diamonds, clubs, spades, hearts) Each suit consists of 13 cards. 1 Suit selection out 4 suits in 4 ways Selecting 5 cards from 13 n=13, r=5 Selecting 5 cards from 13 cards C(n,r) = n! * (13!) (n-r)! r! (13-5)! 5!

30 How many 5-card hands have 2 clubs and 3 hearts? Sol:
there are 4 suits( diamonds, clubs, spades, hearts) Each suit consists of 13 cards. 2 cards from clubs(13) C(13,2) ways 3 cards from hearts(13) C(13,3) ways Selecting 5 cards n=13, r=5 C(n,r) = C(13,2) * C(13,3)

31 How many 5-card hands have 2 aces and 3 kings? Sol:
there are 4 aces and 4 kings 2 cards from aces (4) C(4,2) ways 3 cards from kings(4) C(4,3) ways Selecting 5 cards n=5, in C(4,2) * C(4,3)

32 In how many ways can a committee of 5 be chosen from 9 people?
Sol: selecting 5 people from 9 people n=9 r=5 Chosen in C(9,5) ways

33 Sol: selecting 5 and more
How many committees of 5 or more can be chosen from 9 people? Sol: selecting 5 and more i.e. 5 or 6 or 7 or 8 or 9 people can be chosen in C(9,5)+C(9,6)+C(9,7)+C(9,8)+C(9,9)

34 In how many ways an eight letter word with 3 different vowels and 5 different consonants can be framed? There are 21 consonants and 5 vowels in the English alphabet. _ _ _ _ _ _ _ _ 8 letter word, 3 vowels can be chosen from 5 is C(5,3) 5 consonants can be chosen from 21 is C(21,5) 8 letters can be arranged in 8! ways Answer= 8! *C(5,3) * C(21,5)

35 A)how many such words can be formed?
C(5,3) * C(21,5) B)contain a ‘a’ fixed. only 2 vowels need to choose from 4 vowels in C(4,2) ways. 5 consonants can be chosen from 21 is C(21,5) 8 letters can be arranged in 8! ways Answer: 8 * C(4,2) * C(21,5)

36 C)contain letters a and b
‘a’ fixed out of 5 vowels and b is fixed out of 21 consonants only 2 vowels need to choose from 4 vowels in C(4,2) ways. Only 4 consonants can be chosen from 20 is C(20,4) 8 letters can be arranged in 8! ways Answer: 8 * C(4,2) * C(20,4)

37 D)contain letters b and c
b and c 2 letters are fixed out of 21 consonants 3 vowels choose from 5 vowels in C(5,3) ways. Only 3 consonants can be chosen from 19 is C(19,3) 8 letters can be arranged in 8! ways Answer: 8 * C(5,3) * C(19,3)

38 E)contain letter a ,b, and c
a is fixed out of 5 vowels b and c 2 letters are fixed out of 21 consonants Choose only 2 vowels from 4 vowels in C(4,2) ways. Only 3 consonants can be chosen from 19 is C(19,3) 8 letters can be arranged in 8! ways Answer: 8 * C(4,2) * C(19,3)

39 F)begin with a and end with b
a’ fixed out of 5 vowels and b is fixed out of 21 consonants only 2 vowels need to choose from 4 vowels in C(4,2) ways. Only 4 consonants can be chosen from 20 is C(20,4) 6 letters can be arranged in 6! Ways (first & last letters already given) Answer: 6 * C(4,2) * C(20,4)

40 G)begin with b and end with c b is fixed out of 21 consonants Only 3vowels need to choose from 4 vowels in C(5,3) ways. Only 3 consonants can be chosen from 19 is C(19,3) 6 letters can be arranged in 6! Ways (first & last letters already given) Answer: 6 * C(5,3) * C(19,3)

41 There are 30females and 35 males in junior class while there are 25 females 20 males in senior class. In how many ways can a committee of 10 be chosen so that there are exactly 5 females and 3 juniors on the committee? Sol: juniors seniors Female male female male C(30,0)*C(35,3)*C(25,5)*C(20,2) C(30,1)*C(35,2)*C(25,4)*C(20,3) C(30,2)*C(35,1)*C(25,3)*C(20,4) C(30,3)*C(35,0)*C(25,2)*C(20,5) FINALLY C(30,0)*C(35,3)*C(25,5)*C(20,2) + C(30,1)*C(35,2)*C(25,4)*C(20,3) + C(30,2)*C(35,1)*C(25,3)*C(20,4) + C(30,3)*C(35,0)*C(25,2)*C(20,5)

42 PERMUTATIONS AND COMBINATIONS WITH REPETITIONS

43 PERMUTATIONS WITH REPETITIONS
Let U(n,r) denote the number of r permutations of n objects with unlimited repetitions is U(n,r) = nr Each of the r positions can be filled in ‘n’ ways. Object 1 is repeated in n times Object 2 is repeated in n times Object 3 is repeated in n times : Object r is repeated in n times Then number of ways = nr

44 There are 25 true or false questions on an examination
There are 25 true or false questions on an examination .How many different ways can a student do the examination if he or she can also choose to leave the answer blank? Sol: each question have 3 options( T / F / blank) 1st question answer - in 3 ways (T / F / blank) – 3 2nd question answer - in 3 ways (T / F / blank) – 3 3rd question answer - in 3 ways (T / F / blank) – 3 : rth question answer – in 3 ways (T / F / blank) – 3 Number of different ways = 3 * 3* 3* ….. *3 = 325

45 The results of 50 foot ball games(win ,lose, tie) are to be predicted
The results of 50 foot ball games(win ,lose, tie) are to be predicted .How many different forecasts can contain exactly 28 correct results? Sol: Number of games got the correct result= C(50,28) Remaining games left= 50-28=22 22 games got the wrong result. Each game has 2 options to get the wrong results 1st game has 2 options 2nd game has 2 options : 22nd game has 2 options Wrong results= 222 Finally different forecasts= C(50,28) * 222

46 Enumerating r-combinations with unlimited repetitions
Let the distinct objects be a1, a2,……. an so that the selections are made from {∞. a1, ∞. a1,… ∞. an }. Any r-combination will be of the form {x1. a1, x2. a2, .... ,xn. an }.where x1…….. xn are the repetition numbers and x1+ x2+ x xn=r

47 V(n,r)=the number of r-combinations of n distinct objects with unlimited repetitions
= the number of non negative integral solutions to x1+ x2+ x xn=r =the number of distributing r similar balls into n numbered boxes. =the number of binary numbers with n-1 ones and r zeros =C(n-1+r,r)=C(n-1+r,n-1) =C(n+r-1)!/[r!(n-1)!]

48 The number of 4-combinations of {∞. a1, ∞. a2,… ∞. a5 }
Sol: n=5 r=4 C(n-1+r,r) = C(5-1+4,4) = C(8,4) The number of 3-combinations of 5 objects with unlimited repetitions is n=5 r=3 C(n-1+r,r) = C(5-1+3,3) = C(7,3) The number of ways of placing 10 similar balls into six numbered boxes is n=6 r=10 C(n-1+r,r) = C(6-1+10,10) = C(15,10) The number of non integral solutions to x1+x2+x3+x4+x5=30 is n=5 r=30 C(n-1+r,r) = C(5-1+30,30) = C(34,30)

49 The number of binary numbers with ten 1’s and five 0’s is
n-1 = 10 r=5 C(n-1+r,r) = C(10+5,5) = C(15,5) How many different outcomes are possible by tossing 10 similar coins? each coin has two options (heads/ tails) n=2 r=10 C(n-1+r,r) = C(2-1+10,10) = C(11,10) Tossing 20 similar dice? each dice has six options (1,2,3,4,5,6) n=6 r=20 C(n-1+r,r) = C(6-1+20,20) = C(25,20)

50 20 similar books placed on 5 different shelves
n = 5 r=20 C(n-1+r,r) = C(5-1+20,20) = C(24,20) Out of large supply of pennies, nickles, dimes, and quarters in how many ways can 10 coins be selected? n= 4(different types of coins) r=10 C(n-1+r,r) = C(4-1+10,10) = C(13,10) How many ways are there to fill a box with a dozen doughnuts chosen from 8 varieties of doughnuts? n= 8 r= 12 C(n-1+r,r) = C(8-1+12,12) = C(19,12)

51 Enumerate the number of ways of placing 20 indistinguishable balls into 5 boxes where each box is nonempty. Sol: each box must have 1 ball minimum. ( non empty) = 5 balls remaining balls left = 20-5= 15 balls n= 5 boxes r=15 balls C(n-1+r,r) = C(5-1+15,15) = C(19,15)

52 Sol: each box must have 2 balls minimum.
How many integral solutions are there to x1+x2+x3+x4+x5=20 where xi> = 2 Sol: each box must have 2 balls minimum. = 10 balls remaining balls left = 20-10= 10 balls n= 5 boxes r=10 balls C(n-1+r,r) = C(5-1+10,10) = C(14,10)

53 How many integral solutions are there to X1+x2+x3+x4+x5=20 where
each box must have minimum number of balls X1(3) + X2(2) + X3(4) + X4(6) + X5(0) = 15 balls remaining balls left = 20-15= 5 balls n= 5 boxes r=5 balls C(n-1+r,r) = C(5-1+5,5) = C(9,5)

54 How many integral solutions are there to X1+x2+x3+x4+x5=20 where
each box must have minimum number of balls X1(-3) + X2(0) + X3(4) + X4(2) + X5(2) = 8 balls -3 means additionally 3 balls are added to total number of balls. Hence n= 20+3=23 remaining balls left = 23-8= 15 balls n= 5 boxes r=15 balls C(n-1+r,r) = C(5-1+15,15) = C(19,15)

55 Enumerating Permutations with Constrained repetitions
Enumerating n-permutations with constrained repetitions is P(n;q1,q2,q3……qt) = n!/q1!q2!.....qt! = C(n,q1)C(n-q1,q2)(n-q1q2,q3)……C(n-q1- q2……..- qt-1, qt)

56 How many different arrangements are there of the letters a, a, a, b, and c?
Sol: {3.a,1.b,1.c} n=3+1+1=5 q1=3, q2=1, q3=1 P(5;3,1,1) = 5! / 3!1!1! How many 10-Permutations are there of {3.a,4.b,2.c,1.d} ? sol: n= = 10 q1=3, q2=4, q3=2, q4= 1 P(10;3,4,2,) = 10! / 2!3!4!1! =C(10,3)C(7,4)C(3,2)C(1,1)

57 The number of arrangements of letters in the word T A L L A H A S S E E is
Sol: Number of characters= n= 11 T – 1 A – 3 times L – 2 times H – 1 time S – 2 times E – 2 times P(11;3,2,2,2,1,1)= 11!/3!2!2!2!1!1! Means {3.A, 2.E, 2.L, 2.S, 1.H, 1.T}

58 In how many ways can 23 different books be given to 5 students so that 2 of the students will have 4 books each and the other 3 will have 5 books each? Sol: Choose 2 students to receive 4 books each in C(5,2) ways. Then there are P(23;4,4,5,5,5)=23!/4!4!5!5!5! Distributions Finally C(5,2) * 23!/4!4!5!5!5!

59 Enumerating Ordered partition of a set
The number of ordered partitions of a set S of type (q1,q2,q3……qt) where |S|= n is P(n; q1,q2,q3……qt) = n!/q1!q2!.....qt!

60 In the game of bridge, four players(North , East, West, South) seated in a specified order are each dealt a hand of 13 cards How many ways 52 cards be dealt to the four players? n= 52 q1= q2= q3= q4= 13 52!/13!13!13!13! ii) In how many ways will one player be dealt all four kings? n= 52-4 kings = 48 for q1= 4 kings already have + 9 = 13 q2= q3= q4= 13 48! / 9!13!13!13!

61 c)In how many deals will north be dealt 7 hearts and south the other 6 hearts? n= hearts = 39 q1 q2 q3 q4 7H 13 6H hearts distributed already in C(13,7) 48! / 6!13!7!13! C(13,7) * 39! / 6!7!13!13! hands

62 THE PRINCIPLE OF INCLUSION-EXCLUSION
We can Count the number of elements in the union of disjoint sets using sum rule. If the sets are not disjoint we must refine the statement of the sum rule to a rule commonly called the Principle of inclusion exclusion(called sieve method)

63 If A and B are subsets of some universe set U, then
|AUB|=|A|+|B|-|AnB| If A,B, and C are finite sets ,then |AUBUC|=|A|+|B|+|C|-|AnB|-|AnC|-|BnC|+|AnBnC|


Download ppt "Permutations."

Similar presentations


Ads by Google