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.

Slides:



Advertisements
Similar presentations
Basic Permutations and Combinations
Advertisements

Permutations and Combinations Rosen 4.3. Permutations A permutation of a set of distinct objects is an ordered arrangement these objects. An ordered arrangement.
Counting Chapter 6 With Question/Answer Animations.
THE BASIC OF COUNTING Discrete mathematics KNURE, Software department, Ph , N.V. Bilous.
Counting and Probability The outcome of a random process is sure to occur, but impossible to predict. Examples: fair coin tossing, rolling a pair of dice,
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 04/17/12
Permutations r-permutation (AKA “ordered r-selection”) An ordered arrangement of r elements of a set of n distinct elements. permutation of a set of n.
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
Math 143 Section 8.5 Binomial Theorem. (a + b) 2 =a 2 + 2ab + b 2 (a + b) 3 =a 3 + 3a 2 b + 3ab 2 + b 3 (a + b) 4 =a 4 + 4a 3 b + 6a 2 b 2 + 4ab 3 + b.
Counting Techniques: r-combinations with
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Set, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides.
1 Permutations and Combinations CS/APMA 202 Epp section 6.4 Aaron Bloomfield.
Permutations and Combinations
CS100 : Discrete Structures
4. Counting 4.1 The Basic of Counting Basic Counting Principles Example 1 suppose that either a member of the faculty or a student in the department is.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
The Basics of Counting Section 6.1.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Generalized Permutations and Combinations
Binomial Coefficients, Inclusion-exclusion principle
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Permutations and Combinations
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
March 10, 2015Applied Discrete Mathematics Week 6: Counting 1 Permutations and Combinations How many different sets of 3 people can we pick from a group.
2 Permutations and Combinations Lesson 8 HAND OUT REFERENCE SHEET AND GO OVER IT.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
1 Binomial Coefficients CS 202 Epp, section ??? Aaron Bloomfield.
Chapter 5 The Binomial Coefficients
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
4.1.2 Pigeonhole principle:Strong Form  Theorem 4.2: Let q 1,q 2,…,q n be positive integers. If q 1 +q 2 +…+q n -n+1 objects are put into n boxes, then.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 4 Counting methods and the pigeonhole principle.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.6,
CS 103 Discrete Structures Lecture 16
1 CS 140 Discrete Mathematics Combinatorics And Review Notes.
Binomial Coefficients: Selected Exercises
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Section 6.4. Powers of Binomial Expressions Definition: A binomial expression is the sum of two terms, such as x + y. (More generally, these terms can.
Binomial Coefficients and Identities
5.4 Binomial Coefficients Theorem 1: The binomial theorem Let x and y be variables, and let n be a nonnegative integer. Then Example 3: What is the coefficient.
CS 104: Discrete Mathematics
L14: Permutations, Combinations and Some Review EECS 203: Discrete Mathematics.
Section The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon.
Chapter 6 With Question/Answer Animations Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 5 Counting 歐亞書局.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Section 6.3. Section Summary Permutations Combinations.
Example A standard deck of 52 cards has 13 kinds of cards, with four cards of each of kind, one in each of the four suits, hearts, diamonds, spades, and.
The Pigeonhole Principle
CSE15 Discrete Mathematics 04/19/17
Chapter 5, Section 5.1 The Basics of Counting
Generalized Permutations and Combinations
COCS DISCRETE STRUCTURES
Using Combinations You have already learned that order is important for some counting problems. For other counting problems, order is not important. For.
Section 9-5 The Binomial Theorem.
Permutations and Combinations
CS100: Discrete structures
CSE15 Discrete Mathematics 04/26/17
Permutations and Combinations
Evaluate the expression.
Permutations and Combinations
Sequences and the Binomial Theorem
Presentation transcript:

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 is an r-permutation The number of r-permutations of a set with n elements is denoted P(n,r)

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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 Section 4.3 Permutations & Combinations