Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Section 4.3 Permutations & Combinations. 2 Permutation Set of distinct objects in an ordered arrangement An ordered arrangement of r members of a set.

Similar presentations


Presentation on theme: "1 Section 4.3 Permutations & Combinations. 2 Permutation Set of distinct objects in an ordered arrangement An ordered arrangement of r members of a set."— Presentation transcript:

1 1 Section 4.3 Permutations & Combinations

2 2 Permutation Set of distinct objects in an ordered arrangement An ordered arrangement of r members of a set is an r-permutation The number of r-permutations of a set with n elements is denoted P(n,r)

3 3 Number of r-permutations in a set P(n,r) can be found using the product rule: P(n,r) = n(n-1)(n-2)* … *(n-r+1) This is true because the first element of a permutation can be chosen any one of n ways; for the second element, there are n-1 ways to choose; for the third, n-2, etc. until there are exactly (n-r+1) ways to choose the rth element

4 4 Example 1 There are 8 runners in a race. The winner gets a gold medal, the second place finisher gets a silver, and third place finisher a bronze. How many different ways are there to award medals, if all possible outcomes of the race are equally likely?

5 5 Example 1 There are 3 medals to be awarded, and 8 contenders for a medal So the number of ways to award a medal is the number of 3-permutations on a set of 8 elements P(8,3) = 8*7*6 = 336 ways to award medals

6 6 Combinations An r-combination of elements of a set is an unordered selection of r elements from the set - so an r-combination is a subset with r elements The number of r-combinations in a set of n distinct elements is denoted by C(n,r) or ( n r ) C(n,r) = n!/(r!(n-r)!) if r<=n, C(n,r) = C(n,n-r)

7 7 Example 2 Suppose there are 12 students in a discrete math class, of whom 4 are taking CS2. How many possible combinations of 4 students are there? C(12,4) = 12!/(8!4!) = 495

8 8 Example 3 In how many ways can a set of 5 letters be chosen from the English alphabet? C(26,5) = 26!/(21!5!) = 65780

9 9 Example 4 A sadistic professor decides to inflict discrete math on students taking 2 of her other classes. If she selects 4 students from CS2 and 5 students from Software Design (ignoring for the moment the potential for overlap), how many combinations of victims can she choose if there are 16 students in CS2 and 12 in Software Design?

10 10 Example 4 Apply the product rule - the answer is the product of the the number of 4- combinations from a set of 16 and the number of 5-combinations from a set of 12: C(16,4) * C(12,5) = 12!/(7!5!) * 16!/(12!4!) = 792*1820 = 1,441,440

11 11 Binomial Coefficients A number of the form ( n r ) is called a binomial coefficient because the numbers occur as coefficients in the expansion of powers of binomial expressions (e.g. (a+b) n ) Properties of binomial coefficients include Pascal’s Identity: Let n & k be positive integers with n  k. Then C(n+1,k) = C(n,k+1) + C(n,k)

12 12 Pascal’s Triangle Can arrange binomial coefficients in a triangle based on Pascal’s identity The nth row of the triangle consists of coefficients (nk), k=0, 1, …, n When 2 adjacent binomial coefficients are added, the value in the next row between them is produced

13 13 Pascal’s Triangle ( 0 0 ) ( 1 0 )( 1 1 ) ( 2 0 )( 2 1 )( 2 2 ) ( 3 0 )( 3 1 )( 3 2 )( 3 3 ) Consider ( 2 1 ) + ( 2 2 ) = ( 3 2 ) derived from n=2, k=2 C(3,2) = C(2,1) + C(2,2)

14 14 Theorem 4 Let n be a positive integer; then C(n,k) = 2 n Proof: a set with n elements has 2 n different subsets, each containing 0..n elements There are C(n,0) subsets with 0 elements, C(n,1) subsets with 1 element, C(n,2) subsets with 2 elements, C(n,n) with n elements So the summation above of C(n,k) counts the total number of subsets, which we already know is 2 n

15 15 Theorem 5 (Vandermonde’s Identity) Let m, n and r be non-negative integers with m  r and n  r Then C(m+n,r) = C(m, r-k)C(n,k)

16 16 Proof of VanderMonde’s identity Couldn’t we just look at his driver’s license? Ahem - if one set contains m items and another contains n items, the total number of ways to pick r elements from the union of the 2 sets is C(m+n,r)

17 17 Proof continued Another way to pick r elements would be to pick k elements from the first set and r-k elements from the second (r  k  0) Using the product rule, this can be done C(m,k)C(n,r-k) ways Therefore, the total number of ways to pick r elements from the union = C(m+n, r) = C(m,r-k)C(n,k)

18 18 Binomial Theorem Binomial expression: an expression with 2 terms, e.g. x and y The binomial theorem gives the coefficients of the expansion of powers of binomial expressions, e.g. (x+y) n

19 19 Binomial Theorem For example, the expansion of (x+y) 4 can be found using combinatorial reasoning instead of multiplying out the terms (x+y) 4 = (x+y) (x+y) (x+y) (x+y) All products of a term in each of the sums are added; terms of the form x 4, x 3 y, x 2 y 2, xy 3 and y 4 arise

20 20 Binomial Theorem To get x 4, you must choose x from each sum; there is one way to do this, so the coefficient is 1 To get x 3 y, you must choose x from 3 sums and y from one; the number of these is the number of 3-combinations in 4 objects, or C(4,3) By similar reasoning, the number of x 2 y 2 terms is C(4,2), number of xy 3 terms is C(4,3) and the number of y 4 terms is 1 So (x+y) 4 = x 4 +4x 3 y+6x 2 y 2 +4xy 3 +y 4

21 21 Binomial Theorem Stated generally, the binomial theorem holds: (x+y) n = C(n,j)x n-j y j = ( n 0 )x n +( n 1 )x n-1 y+( n 2 )x n-2 y 2 +…+( n n-1 ) xy n-1 +( n n )y n

22 22 Proof of Binomial Theorem The terms in the expanded product are of the form x n-j y j for j = 0,1,2, …,n To count the number of terms of this form, it is necessary to choose n-j x’s from the n sums (the other j terms are y’s) So the coefficient of x n-j y j = C(n,n-j) = C(n,j) as the theorem states

23 23 Example 5 What is the expansion of (x+y) 7 ? (x+y) 7 = C(7,0)x 7 + C(7,1)x 6 y + C(7,2)x 5 y 2 + C(7,3)x 4 y 3 + C(7,4)x 3 y 4 + C(7,5)x 2 y 5 + C(7,6)xy 6 + C(7,7)y 7 = x 7 +7x 6 y+21x 5 y 2 +35x 4 y 3 +35x 3 y 4 +21x 2 y 5 +7xy 6 +y 7

24 24 Examples 6 & 7 What is the coefficient of x 7 y 6 in (x+y) 13 ? C(13,7) = 13!/(7!6!) = 6,227,020,800/5040*720 = 1716 What is the coefficient of x 5 y 8 in (x+y) 13 ? C(13,5) = 13!/(5!8!) = 1287

25 25 Example 8 What is the coefficient of x 10 y 9 in (2x-3y) 19 ? (2x-3y) 19 = C(19,j)(2x) 19-j (-3y) j So coefficient of x 10 y 9 = C(19,10)(2) 10 (-3) 9 = -(19!/(10!9!))

26 26 Section 4.3 Permutations & Combinations


Download ppt "1 Section 4.3 Permutations & Combinations. 2 Permutation Set of distinct objects in an ordered arrangement An ordered arrangement of r members of a set."

Similar presentations


Ads by Google