permutation

Upload: christian-gould

Post on 12-Oct-2015

73 views

Category:

Documents


0 download

DESCRIPTION

permutation and combination

TRANSCRIPT

Permutation and CombinationPermutation:Permutation meansarrangementof things. The wordarrangementis used, if the order of thingsis considered.Combination:Combination meansselectionof things. The wordselectionis used, when the order of things hasno importance.Example: Suppose we have to form a number of consisting of three digits using the digits1,2,3,4, To form this number the digits have to bearranged. Different numbers will get formed depending upon the order in which we arrange the digits. This is an example ofPermutation.Now suppose that we have to make a team of 11 players out of 20 players, This is an example ofcombination, because the order of players in the team will not result in a change in the team. No matter in which order we list out the players the team will remain the same! For a different team to be formed at least one player will have to be changed.Now let us look at two fundamental principles of counting:Addition rule: If an experiment can be performed in n ways, & another experiment can be performed in m ways then either of the two experiments can be performed in (m+n) ways.This rule can be extended to any finite number of experiments.Example: Suppose there are 3 doors in a room, 2 on one side and 1 on other side. A man want to go out from the room. Obviously he has 3 options for it. He can come out by door A or door B or door C.Multiplication Rule: If a work can be done in m ways, another work can be done in n ways, then both of the operations can be performed in m x n ways. It can be extended to any finite number of operations.Example.: Suppose a man wants to cross-out a room, which has 2 doors on one side and 1 door on other site. He has 2 x 1 = 2 ways for it.

Factorial n :The product of first n natural numbers is denoted by n!. n! = n(n-1) (n-2) ..3.2.1.Ex. 5!= 5 x 4 x 3 x 2 x 1 =120Note 0! = 1Proof n! =n, (n-1)! Or (n-1)! = [n x (n-1)!]/n = n! /nPutting n = 1, we haveO!=1!/1or0 = 1PermutationNumber of permutations of n different things taken r at a time is given by:-nPr = n!/(n-r)!Proof: Say we have n different things a1, a2, an.Clearly the first place can be filled up in n ways. Number of things left after filling-up the first place = n-1So the second-place can be filled-up in (n-1) ways. Now number of things left after filling-up the first and second places = n - 2Now the third place can be filled-up in (n-2) ways.Thus number of ways of filling-up first-place= nNumber of ways of filling-up second-place= n-1Number of ways of filling-up third-place = n-2Number of ways of filling-up r-th place = n (r-1) = n-r+1By multiplication rule of counting, total no. of ways of filling up, first, second -- rth-place together :-n (n-1) (n-2) ------------ (n-r+1)Hence:nPr = n (n-1)(n-2) --------------(n-r+1)= [n(n-1)(n-2)----------(n-r+1)] [(n-r)(n-r-1)-----3.2.1.] / [(n-r)(n-r-1)] ----3.2.1nPr=n!/(n-r)!Number of permutations of n different things taken all at a time is given by:-nPn = n!Proof :Now we have n objects, and n-places.Number of ways of filling-up first-place = nNumber of ways of filling-up second-place = n-1Number of ways of filling-up third-place = n-2Number of ways of filling-up r-th place, i.e. last place =1Number of ways of filling-up first, second, --- n th place= n (n-1) (n-2)------2.1.nPn=n!Concept.We havenPr = n!/n-rPutting r = n, we have :-nPr=n! / (n-r)But nPn=n!Clearly it is possible, only when n! = 1Hence it is proof that 0! = 1Note: Factorial of negative-number is not defined. The expression 3! has no meaning.ExamplesQ. How many different signals can be made by 5 flags from 8-flags of different colours?Ans. Number of ways taking 5 flags out of 8-flage =8P5=8!/(8-5)!=8 x 7 x 6 x 5 x 4 = 6720Q. How many words can be made by using the letters of the word SIMPLETON taken all at a time?Ans. There are 9 different letters of the word SIMPLETONNumber of Permutations taking all the letters at a time =9P9= 9! = 362880.Number of permutations of n-thing, taken all at a time, in which P are of one type, g of them are of second-type, r of them are of third-type, and rest are all different is given by :- n!/p! x q! x r!Example: In how many ways can the letters of the word Pre-University be arranged?13!/2! X 2! X 2!Number of permutations of n-things, taken r at a time when each thing can be repeated r-times is given by = nr.Proof. Number of ways of filling-up first place = nSince repetition is allowed, soNumber of ways of filling-up second-place = nNumber of ways of filling-up third-place Number of ways of filling-up r-th place = nHence total number of ways in which first, second ----r th, places can be filled-up= n x n x n ------------- r factors.= nrExample: A child has 3 pocket and 4 coins. In how many ways can he put the coins in his pocket.Ans. First coin can be put in 3 ways, similarly second, third and forth coins also can be put in 3 ways.So total number of ways =3 x 3 x 3 x 3 = 34 = 81Circular PermutationsThere are two cases of circular-permutations:-(a) If clockwise and anti clock-wise orders are different, then total number of circular-permutations is given by (n-1)!(b) If clock-wise and anti-clock-wise orders are taken as not different, then total number of circular-permutations is given by (n-1)!/2!Proof(a):

(a) Lets consider that 4 persons A,B,C, and D are sitting around a round tableShifting A, B, C, D, one position in anticlock-wise direction, we get the following agreements:-

Thus, we use that if 4 persons are sitting at a round table, then they can be shifted four times, but these four arrangements will be the same, because the sequence of A, B, C, D, is same. But if A, B, C, D, are sitting in a row, and they are shifted, then the four linear-arrangement will be different.Hence if we have 4 things, then for each circular-arrangement number of linear-arrangements =4Similarly, if we have n things, then for each circular agreement, number of linear arrangement = n.Let the total circular arrangement = pTotal number of lineararrangements = n.pTotal number of lineararrangements= n. (number of circular-arrangements)Or Number of circular-arrangements = 1 (number of linear arrangements)n= 1( n!)/ncircular permutation = (n-1)!Proof(b) When clock-wise and anti-clock wise arrangements are not different, then observation can be made from both sides, and this will be the same. Here two permutations will be counted as one. So total permutations will be half, hence in this case.Circularpermutations=(n-1)!/2Note: Number of circular-permutations of n different things taken r at a time:-(a)If clock-wise and anti-clockwise orders are taken as different, then total number of circular-permutations =nPr/r(b) If clock-wise and anti-clockwise orders are taken as not different, then total number of circular permutation = nPr/2rExample:How many necklace of 12 beads each can be made from 18 beads of different colours?Ans. Here clock-wise and anti-clockwise arrangement s are same.Hence total number of circularpermutations: 18P12/2x12=18!/(6 x 24)Restricted Permutations(a)Number of permutations of n things, taken r at a time, when a particular thing is to be always included in each arrangement= rn-1Pr-1(b)Number of permutations of n things, taken r at a time, when a particular thing is fixed: =n-1Pr-1(c)Number of permutations of n things, taken r at a time, when a particular thing is never taken: =n-1Pr.(d)Number of permutations of n things, taken r at a time, when m specified things always come together = m! x ( n-m+1) !(e)Number of permutations of n things, taken all at a time, when m specified things always come together = n ! - [ m! x (n-m+1)! ]Example: How many words can be formed with the letters of the word OMEGA when:(i)O and A occupying end places.(ii)E being always in the middle(iii)Vowels occupying odd-places(iv)Vowels being never together.Ans.(i) When O and A occupying end-places=> M.E.G. (OA)Here (OA) are fixed, hence M, E, G can be arranged in 3! waysBut (O,A) can be arranged themselves is 2! ways.=> Total number of words = 3! x 2! = 12 ways.(ii)When E is fixed in the middle=> O.M.(E), G.A.Hence four-letter O.M.G.A. can be arranged in 4! i.e 24 ways.(iii)Three vowels (O,E,A,) can be arranged in the odd-places (1st, 3rdand 5th) = 3! ways.And two consonants (M,G,) can be arranged in the even-place (2nd, 4th) = 2 ! ways=> Total number of ways=3! x2!=12 ways.(iv)Total number of words = 5! = 120!If all the vowels come together, then we have: (O.E.A.), M,GThese can be arranged in 3! ways.But (O,E.A.) can be arranged themselves in 3! ways.=> Number of ways, when vowels come-together = 3! x 3!= 36 ways=> Number of ways, when vowels being never-together= 120-36 = 84 ways.Number of Combination of n different things, taken r at a time is given by:-nCr=n! / r ! x (n-r)!Proof: Each combination consists of r different things, which can be arranged among themselves in r!ways.=> For one combination of r different things, number of arrangements = r!FornCrcombination number of arrangements: rnCr=> Total number of permutations = r!nCr---------------(1)But number of permutation of n different things, taken r at a time=nPr-------(2)From (1) and (2) :nPr = r! .nCror n!/(n-r)!=r! .nCrornCr = n!/r!x(n-r)!Note:nCr =nCn-rornCr = n!/r!x(n-r)! andnCn-r=n!/(n-r)!x(n-(n-r))!=n!/(n-r)!xr!Restricted Combinations(a)Number of combinations of n different things taken r at a time, when p particular things are always included =n-pCr-p.(b)Number of combination of n different things, taken r at a time, when p particular things are always to be excluded =n-pCrExample: In how many ways can a cricket-eleven be chosen out of 15 players? if(i)A particular player is always chosen,(ii)A particular is never chosen.Ans:(i) A particular player is always chosen, it means that 10 players are selected out of the remaining 14 players.=. Required number of ways =14C10 =14C4=14!/4!x19!= 1365(ii)A particularplayers is never chosen, it means that 11 players are selected out of 14 players.=> Required number of ways =14C11=14!/11!x3!= 364(iii)Number of ways of selecting zero or more things from n different things is given by:- 2n-1Proof:Number of ways of selecting one thing, out of n-things =nC1Number of selecting two things, out of n-things =nC2Number of ways of selecting three things, out of n-things =nC3Number of ways of selecting n things out of n things =nCn=>Total number of ways of selecting one or more things out of n different things=nC1+nC2+nC3+ ------------- +nCn= (nC0+nC1+ -----------------nCn) -nC0= 2n 1 [nC0=1]Example:John has 8 friends. In how many ways can he invite one or more of them to dinner?Ans. John can select one or more than one of his 8 friends.=> Required number of ways= 28 1= 255.(iv) Number of ways of selecting zero or more things from n identical things is given by :- n+1Example: In how many ways, can zero or more letters be selected form the letters AAAAA?Ans. Number of ways of : Selecting zero 'A's =1 Selecting one 'A's=1 Selecting two 'A's= 1 Selecting three 'A's=1 Selecting four 'A's=1 Selecting five 'A's=1=> Required number of ways = 6 [5+1](V) Number of ways of selecting one or more things from p identical things of one type q identical things of another type, r identical things of the third type and n different things is given by :-(p+1) (q+1) (r+1)2n 1Example: Find the number of different choices that can be made from 3 apples, 4 bananas and 5 mangoes, if at least one fruit is to be chosen.Ans:Number of ways of selecting apples = (3+1) = 4 ways.Number of ways of selecting bananas = (4+1) = 5 ways.Number of ways of selecting mangoes = (5+1) = 6 ways.Total number of ways of selecting fruits = 4 x 5 x 6But this includes, when no fruits i.e. zero fruits is selected=> Number of ways of selecting at least one fruit = (4x5x6) -1 = 119Note :- There was no fruit of a different type, hence here n=o=> 2n= 20=1(VI) Number of ways of selecting r things from n identical things is 1.Example: In how many ways 5 balls can be selected from 12 identical red balls?Ans. The balls are identical, total number of ways of selecting 5 balls = 1.Example: How many numbers of four digits can be formed with digits 1, 2, 3, 4 and 5?Ans. Here n = 5 [Number of digits]And r = 4 [ Number of places to be filled-up]Required number is 5P4=5!/1!= 5 x 4 x 3 x 2 x 1

Problems about CountingLevel 1 problems In how many ways can you stack 7 different books, so that a specific book B is on the third place?

Remove book B. Now you can arbitrary stack the 6 books in 6! ways. Afterwards, put book B on the third place. In how many ways can you take 3 marbles out of a box with 15 different marbles?

Taking a subset of three elements out a set of 15 elements can be done in C(15,3) ways In a firm are 20 workmen and 10 employees. In how many ways can you construct a delegation with 3 workmen and 2 employees?

First we choose the 3 workmen. This can be done in C(20,3) ways.Then we choose the 2 employees. This can be done in C(10,2) ways.The delegation can be assembled in C(20,3).C(10,2) ways In how many ways can you take 5 cards, with at least 2 aces, out of a game of 52 cards?

First consider 5 cards, with exactly 2 aces.For the two aces we have C(4,2) ways and for the three other cards we have C(48,3) ways. The 5 cards can be chosen in C(4,2).C(48,3) ways.Analogous, 5 cards, with exactly 3 aces can be chosen in C(4,3).C(48,2) ways. 5 cards, with exactly 4 aces can be chosen in 48 ways. Total = C(4,2).C(48,3) + C(4,3).C(48,2) + 48 In how many ways can you split a group of 13 persons in 3 persons and 10 persons?

It is sufficient to choose 3 persons to split the group. This can in C(13,3) ways. How many diagonals are there in a convex n-polygon?

In each vertex there start (n-3) diagonals and since there are n vertices, there start n.(n-3) diagonals. But now we have counted twice each diagonal.Hence , there are n(n-3)/2 diagonals in a convex n-polygon. How many numbers consisting of 3 digits, can you make with the digits 0,1,2,3,4 ?

There are 4 ways to choose the first digit of the number.There are 5 ways to choose the second digit of the number.There are 5 ways to choose the third digit of the number.Total = 4.5.5 How many subsets are there in a set S of 10 elements?

We can construct a subset of S by deciding for each element of S, whether or not it belongs to the subset. So, for each element of S, there are 2 possibilities. Total possibilities = 210 Calculate the term with x2in the expansion of (x3+ 1/2x)10

In the expansion of (x3 + 1/2x)10 we have : The first term contains x30 The second term contains x26 The third term contains x22 ... The eighth term contains x2 This eighth term is C(10,7).(x3)3.(1/(2x))7 The coefficient is C(10,7)/27 = 15/16 1011011101is an example op a binary number of length 10.How many binary numbers of length 10 end up with 111 and contain exactly two zeros.

The number is completely defined if we know the places of the 2 zeros.The number starts with 1 and ends up with 111.There are still six digits to be determined.Once we identify two locations for the zeros, the number is fixed.The number of ways to choose 2 places out of the 6, is C(6,2).Level 2 problems In how many ways can you stack m identical bricks into k boxes so that each box contains at least 1 brick.

Since each box must contain at least one brick, we first put one brick in each box. Now, we have to find the number of ways you can stack m-k identical bricks into k boxes. We describe one way to stack the (m-k) identical bricks into the k boxes.Number the boxes.Write on each brick the number of a destination box and order the (m-k) bricks, in ascending order, in one row.The row of numbers on the bricks constitute a combination with repetition of k different elements (the k numbers) choose m-k (the bricks). This can be done in (m - 1)! C'(k,m-k) = C(m-1,m-k) = ----------------- ways. (m - k)!(k - 1)! From a deck of cards we take 12 cards. hearts 1, 2 and 3 clubs 1, 2, 3 and 4 diamond 1, 2, 3, 4 and 5Take 5 cards such that there is at least one card of each type. In how many ways is that possible? The order of these five cards is irrelevant.

11. Many problems with 'at least one' can be reformulated. The reformulated problem is, in general, easier to calculate than the original one.11. New formulationCalculate the number of ways to take 5 random cards from the 12 cards. Call this number T.Calculate the number of ways to take 5 random cards from the 12 cards such that there are no hearts in it. Call this number A.Calculate the number of ways to take 5 random cards from the 12 cards such that there are no clubs in it. Call this number B.Calculate the number of ways to take 5 random cards from the 12 cards such that there are no diamonds in it. Call this number C.But there is 1 way to take 5 cards from the 12 cards such that there are no clubs and no hearts.The requested number is T - (A+B+C-1) because these ways contain at least one heart and one club and a diamond.11. Back to the cards problem:T = C(12,5) = 792A = C(9,5) = 126B = C(8,5)= 56C = C(7,5)= 21The requested number is T - (A+B+C-1) = 5901. How many strictly positive integer solutions ( x, y , z) are there,such that x + y + z = 100

1.

1. This is the same problem as a previous problem :In how many ways can you arrange 100 identical bricks into 3 boxes so that each box contains at least one brick.With the method of this previous problem, we get the answer C(99,97) = 4851 ways1. How many terms are contained in (a + b + c)20.

1.

1. All terms can be written as A.ap.bq.crwith p + q + r = 20.1. The number of terms is the number of solutions of the equation p + q + r = 20 with p, q, r as positive integer unknowns.Now regard (p,q,r) as three ordered elements. Point 20 times to one of these elements, and order these elements in the same order as the given elements. This corresponds with one solution of p + q + r = 20 and it is a combination with repetition of 3 elements choose 20.The number of terms is the number of such combinations= C'(3,20) = C(22,20) = C(22,2) = 2311. The term A.a10b3c7is present in the development of (a + b + c)20Calculate A.

1.

1. The number of terms a10b3c7is the number of permutations with repetition of the elements a,a,a,a,a,a,a,a,a,a,b,b,b,c,c,c,c,c,c,c This number is1. 1. 20!1. ----------- = 22 170 7201. 10! 3! 7!

1. if 15 cars are entered in a car show, in how many different ways can the judges award a first and second prize?

2. Find the number of was in which 5 of 9 contestants can be ranked 1st, 2nd, 3rd, 4th and 5th according to heights?

3. Find the number of permutations of zero objects selected from a set of 24 objects.

4. how many was can the letters of the following words be arranged?a) bookkeeper b) Mississippic) syzygy d) gorgeous

5. In how many ways can a committee of 4 b chosen from 5 married couples if:a) all are equally eligible?b) the committee must consist of 3 women and 1 man?c) a husband and wife cannot serve together?

6. how many 6-person volleyball teams can be formed from7 men and 3 women if:a) there is no sex discrimination?b) the team must contain at least 2 women?

7. how many 7-digit place numbers are possible if the 1st 3 digits must be 1, 4 and 3?

8. if you are randomly sampling one at a time with replacement from a bag containing 8 blue, 7 red and 5 green marbles, what is the probability of getting:a) a blue marble in 1 draw?b) 3 blue marbles in 3 draws?c) a red, a green and a blue marble in the order specified?d) at least 2 red marbles in 3 draws?

Ans.

1. 15 P 2 = 15*14 = 2102. 9 P 5 = 9*8*7*6*5 = 151203. One

4a) The word has 10 letters, including 3 e's, 2 o's, 2k's, 1 b p and r.(10 C 3) * (7 C 2) * (5 C 2) * (3C1) * (2C1) * (1C1) = 151200