1 Lecture 4 (part 2) Combinatorics Reading: Epp Chp 6.

Slides:



Advertisements
Similar presentations
Basic Permutations and Combinations
Advertisements

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.
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.
Chapter 13 sec. 3.  Def.  Is an ordering of distinct objects in a straight line. If we select r different objects from a set of n objects and arrange.
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,
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}:
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
Counting and probability What do you mean by counting? How do you count things in daily life? Counting the European way or the English speaking way?
Counting Techniques: r-combinations with
Counting II: Pascal, Binomials, and Other Tricks Great Theoretical Ideas In Computer Science A. Gupta D. Sleator CS Fall 2010 Lecture 8Sept. 16,
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
1 Permutations and Combinations CS/APMA 202 Epp section 6.4 Aaron Bloomfield.
Permutations and Combinations
Main Menu Main Menu (Click on the topics below) Permutations with Some repetitions Example r-Combinations with Some repetitions Example Permutations and.
How many ways are there to pass through city A where the arrows represent one-way streets? Answer: mn ways The counting principal: Suppose two experiments.
Chapter 7 Logic, Sets, and Counting Section 4 Permutations and Combinations.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
1 Permutations and Combinations CS/APMA 202 Rosen section 4.3 Aaron Bloomfield.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
Basic Counting. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations, combinations.
Generalized Permutations and Combinations
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.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
2 Permutations and Combinations Lesson 8 HAND OUT REFERENCE SHEET AND GO OVER IT.
CSE 221: Algorithms and Data Structures Lecture #10 Counting: Easy as 1, 2, C(3,1) Steve Wolfman 2009W1 1.
1 Lecture 4 (part 1) Combinatorics Reading: Epp Chp 6.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Chapter 7 Logic, Sets, and Counting Section 4 Permutations and Combinations.
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.
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.
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 7.4 Permutations and Combinations The student will be able to set up and.
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,
Discrete Mathematics Lecture # 25 Permutation & Combination.
1 CS 140 Discrete Mathematics Combinatorics And Review Notes.
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.
Copyright © Peter Cappello 2011 Simple Arrangements & Selections.
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
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.
Permutations & Combinations: Selected Exercises. Copyright © Peter Cappello2 Preliminaries Denote the # of arrangements of some k elements of a set of.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Section 6.3. Section Summary Permutations Combinations.
Discrete Mathematics Counting.
The Multiplication Rule
The Pigeonhole Principle
Permutations and Combinations
CSE15 Discrete Mathematics 04/19/17
ICS 253: Discrete Structures I
CSC-2259 Discrete Structures
Generalized Permutations and Combinations
COCS DISCRETE STRUCTURES
Permutations and Combinations
Permutations and Combinations
Permutations and Combinations
CS100: Discrete structures
Permutations and Combinations
Basic Counting.
COUNTING AND PROBABILITY
Basic Counting Lecture 9: Nov 5, 6.
Permutations and Combinations
Presentation transcript:

1 Lecture 4 (part 2) Combinatorics Reading: Epp Chp 6

2 Outline 1.Basic Rules a)Linear Series Rule b)Multiplication Rule c)Addition and Difference Rule d)Inclusion-Exclusion Rule 2.Common Counting Scenarios a)Permutations (Ordered Selections) b)Combinations (Unordered Selections) c)Permutations with repetitions d)Combinations with repetitions 3.Algebra of Combinations 4.Binomial Theorem

3 2.1 Permutations n Definition: –An r -permutation of a set of n elements is an ordered selection of r elements taken from the set of n elements ( 1  r  n ). n Notation: –The number of r -permutations of a set of n elements is denoted as P(n,r). n Note: permutations are ordered selections: selecting the object in the first try/position, is considered different from selecting that object in the second or subsequent tries/positions.

4 2.1 Permutations n Theorem: –If n and r are integers such that 1  r  n, then P(n,r) = n(n-1)(n-2)…(n-r+1) or equivalently P(n,r) = n! / (n-r)! n Proof: –Uses the multiplication rule. –Formal proof is by induction. Informal proof is as follows: 1  r  n {x 1, x 2, x 3, …, x n } Number of choices in step i is n-(i-1), regardless of the choices made in previous steps => Can use Multiplication Rule: n(n-1)(n-2)…(n-r+1) Step 1: n choices Step 2: n–1 choices Step r : n–(r–1) choices n!n! (n-r)! n(n-1)(n-2)…(n-r+1)(n-r)(n-r-1)(n-r-1) …3.2.1 (n-r)(n-r-1)(n-r-1) …3.2.1 = Position 1 Position 2 Position r,,, Result: Ordered Tuple

5 2.1 Permutations n Theorem: –If n and r are integers such that 1  r  n, then P(n,r) = n(n-1)(n-2)…(n-r+1) or equivalently P(n,r) = n! / (n-r)! Corollary: P(n,n) = n! / (n-n)! = n! n Theorem: CIRCULAR PERMUTATIONS –The number of ways of permuting r objects from a set of n objects in a circle (in which two arrangements are the same when one is a rotation of the other) is P(n,r) / r –When n = r, we have P(n,n) / n = (n-1)!

6 2.1 Permutations Example 1: (a) How many different ways can three of the letters of the word BYTES be chosen and written in a row? (b) How many different ways can this be done if the first letter must be ‘B’ Answer: (a) The problem is a 3-permutation from a set of 5 objects. –P(5,3) = 5!/2! = 60 (b) 2 step process (Multiplication Rule) –Step 1: Assign B to the first position: 1 way –Step 2: Assign 4 letters to the remaining 2 positions: P(4,2) ways, regardless of step 1. –Answer = 1 x P(4,2) = 12.

7 2.1 Permutations Example 2: (a) In how many ways can the letters in the word COMPUTER be arranged in a row? (b) In how many ways can the letters in the word COMPUTER be arranged in CO must appear together in order? Answer: (a) P(8,8) = 8! (permutate all eight objects) (b) P(7,7) = 7! (Treat CO as a unit)

8 2.1 Permutations Example 3: (a) How many ways can a group of 6 people be seated around a table? (b) How many ways can a group of 6 people be seated around a table when two of them cannot sit next to each other? Answer: (a) P(6,6)/6 = 5! (circular permutation) (b) By difference rule: Number of ways a group of 6 can sit around a table – Number of ways in which the 2 enemies sit next to each other = 5! – (2xP(5,5)/5) (treat the 2 enemies as 1 person) = 5! – (2x4!)

9 2.2 Combinations n Definition: –An r -combination of a set of n elements is a subset of r elements taken from the set of n elements ( r  n ). n Notation: –The number of r -permutations of a set of n elements is denoted as C(n,r), also as n r n Note: A combination is an unordered selection: you are selecting a ‘set’, and ordering is not important in sets.

Combinations n Theorem: –If n and r are integers such that r  n, then C(n,r) = P(n,r) / r! or equivalently C(n,r) = n! / ( r!(n-r)! ) n Informal Proof: {x 1, x 2, x 3, …, x n } Position 1 Position 2 Position r,,,,,, Step 1: Ordered selection: P(n,r) Step 2: Get rid of duplicates since ordering is not important: P(n,r) / r! Result: Ordered Tuple Result: Set

Combinations Example 1: You are to select five members from a group of twelve to form a team. (a) How many distinct five-person teams can be selected? (b) If two of them insist on working together as a pair, such that any team must either contain both of neither. How many five person teams can be formed? Answer: (a) C(12,5) Set of twelve people Set of five people (b) Use Addition Rule: All 5-person teams satisfying the ‘2-friends’ constraint. Those teams which involve the 2 ‘friends’ Those teams which do not involve the 2 ‘friends’ Step 1: select the two ‘friends’: 1 way Step 2: select the remaining 3 people: C(10,3) C(10,3) C(10,5) +

Combinations Example 2: You are to select five members from a group of twelve to form a team. If two of them insist on working apart,how many five person teams can be formed? Answer: 1 st version, using difference rule. All 5-person teams Those teams with the two enemies together Those teams with the two enemies apart Step 1: select the two enemies: 1 way Step 2: select the remaining 3 people: C(10,3) C(10,3) C(12,5) Ans: C(12,5) – C(10,3)

Combinations Example 2: You are to select five members from a group of twelve to form a team. If two of them insist on working apart,how many five person teams can be formed? Answer: 2 nd version, using addition rule. Those teams which contain A but not B All 5-person teams that do not contain the two enemies, say A and B Those teams which contain B but not A Those teams which do not contain A nor B Step 1: select the A: 1 way Step 2: select the remaining people except B: C(10,4) C(10,4) C(10,5) ++

Combinations Example 3: A group of twelve consists of five men and seven women. (a) How many five-person teams can be chosen that consists of three men and two women? (b) How many five-person teams contain at least one man? (c) How many five-person teams contain at most one man? (a)Answer: Step 1: choose the men: C(5,3) ways Step 2: choose the women: C(7,2) ways (regardless of the choices made in step 1) Multiplication rule: C(5,3) x C(7,2)

Combinations Example 3: A group of twelve consists of five men and seven women. (a) How many five-person teams can be chosen that consists of three men and two women? (b) How many five-person teams contain at least one man? (c) How many five-person teams contain at most one man? (b)Answer: Number of 5-person teams that contain at least one man = Number of 5-person teams – Number of 5-person teams that do not contain any men (all women). (DIFFERENCE RULE) = C(12,5) – C(7,5)

Combinations Example 3: A group of twelve consists of five men and seven women. (a) How many five-person teams can be chosen that consists of three men and two women? (b) How many five-person teams contain at least one man? (c) How many five-person teams contain at most one man? (b)Answer: Number of 5-person teams that contain at most one man = Number of 5-person teams that contain no men + Number of 5-person teams that contain 1 man (BY ADDITION RULE) = (C(5,0) x C(7,5)) Step 1: Choose 0 men from 5 men Step 2: Choose 5 women from 7 women + (C(5,1) x C(7,4))Step 1: Choose 1 man from 5 men Step 2: choose 4 women from 7 women

Combinations Example 4: 10 people are to sit around two tables in a hawker (dealer) centre. The first table has 6 chairs, the second table has 4 chairs. (a) How many ways can this be done? (b) How many ways can this be done if two of them needs to sit together? (a)Answer (version#1): Step 1: Choose 6 people to sit on the first table C(10,6) Step 2: Arrange the 6 people on the first table 5! (Circular Permutation) Step 3: Arrange the remaining 4 on the second table. 3! (Circular Permutation) (BY MULTIPLICATION RULE) = C(10,6) x 5! x 3! = 10!/24

Combinations Example 4: 10 people are to sit around two tables in a hawker centre. The first table has 6 chairs, the second table has 4 chairs. (a) How many ways can this be done? (b) How many ways can this be done if two of them needs to sit together? (a)Answer (version#2): Step 1: Permute 6 people from 10 circularly around the first table P(10,6)/6 Step 2: Arrange the remaining 4 on the second table. 3! (Circular Permutation) (BY MULTIPLICATION RULE) = P(10,6)/6 x 3! = 10!/24

Combinations Example 4: 10 people are to sit around two tables in a hawker centre. The first table has 6 chairs, the second table has 4 chairs. (a) How many ways can this be done? (b) How many ways can this be done if two of them needs to sit together? (b)Answer (version#1): BY ADDITION RULE Number of sitting arrangements where the two sit on the 1 st table + Number of sitting arrangements where the two sit on the 2 nd table BY MULTIPLICATION RULE Step 1: Put the two on the first table: 1 way Step 2: Select 4 more to join them: C(8,4) Step 3: Permute them around the table : 5! Step 4: Permute the remaining 4 circularly on 2 nd table: 3! BY MULTIPLICATION RULE Step 1: Put the two on the second table: 1 way Step 2: Select 2 more to join them: C(8,2) Step 3: Permute them around the table: 3! Step 4: Permute remaining 6 circularly on 1 st table: 5! = (C(8,4)x5!x3!) + (C(8,2)x3!x 5!)

Combinations Example 4: 10 people are to sit around two tables in a hawker centre. The first table has 6 chairs, the second table has 4 chairs. (a) How many ways can this be done? (b) How many ways can this be done if two of them needs to sit together? (b)Answer (version#2): BY ADDITION RULE Number of sitting arrangements where the two sit on the 1 st table + Number of sitting arrangements where the two sit on the 2 nd table BY MULTIPLICATION RULE Step 1: Put the two on the first table: 1 way Step 2: Permute 4 from 8 circularly on the 2 nd table: P(8,4)/4 Step 3: Permute the 6 circularly on 1 st table: 5! BY MULTIPLICATION RULE Step 1: Put the two on the second table: 1 way Step 2: Permute 6 from 8 circularly on the 1 st table: P(8,6)/6 Step 3: Permute remaining 4 circularly on 2 nd table: 3! = (P(8,4)/4 x 5!) + (P(8,6)/6 x 3!)

Permutations with repetitions n Theorem (Permutations from a multi-set): Given a collection of n objects of which: –n 1 are of type 1 and are indistinguishable from each other; –n 2 are of type 2 and are indistinguishable from each other; … –n k are of type k and are indistinguishable from each other; and that n 1 + n 2 + … + n k = n, then the number of distinct permutations of the n objects is C(n, n 1 )  C(n – n 1, n 2 )  C(n – n 1 – n 2, n 3 )  …  C(n – n 1 – n 2 – … – n k-1, n k ) or equivalently n! / (n 1 !  n 2 !  …  n k ! )

Permutations with repetitions Example 1: How many 8-bit strings have exactly three 1’s? Answer (version#1 – details): n Example: – is an 8-bit string, but has four 1’s – is an 8-bit string and has exactly three 1’s. n TECHNIQUE: Sometimes, you have to know (a) the set you are choosing from; and (b) the destination ‘type’ that you are choosing to. –Point of view#1: Choose from the set {0,1} and place into the bit positions 1,2,3,4,5,6,7,8. –Point of view#2: Choose from the bit positions 1,2,3,4,5,6,7,8, and ‘place’ them into the set {0,1} (i.e. assign them to either a bit 0 or 1) n Adopting different points of view of the same problem may help. n Use point of view#2: –Step 1: Choose 3 bit positions from 8 to be assigned a bit 1: C(8,3) –Step 2: Choose the remaining 5 bit positions for bit 0: C(5,5) = 1 n Answer: C(8,3) (By multiplication rule)

Permutations with repetitions Example 1: How many 8-bit strings have exactly three 1’s? Answer (version#2 – direct application of formula): n What are the objects that you are permuting –Point of view#1: 1’s and 0’s with duplicates? –Point of view#2: the bit positions n Again, it is still using point of view#2. n Permute 8 objects (the bit positions) –3 of which are indistinguishable from each other –5 of which are indistinguishable from each other n Answer: 8!/(3! x 5!)

Permutations with repetitions Example 2: How many ways are there of ordering the letters of the word MISSISSIPPI, which are distinguishable from each other? Answer: n What are the objects that you are permuting –Point of view#1: The Letters M,I,S,P? (with duplicates?) –Point of view#2: The 11 positions where the letters can be placed n Again, point of view#2. n Permute 11 objects (the letter positions) –4 of which are indistinguishable from each other (for the letter ‘S’) –4 of which (a different type) are indistinguishable from each other (for the letter ‘I’) –2 of which (a different type) are indistinguishable from each other (for the letter ‘P’) –1 position for letter ‘M’ n Answer (use formula): 11!/(4! x 4! x 2! x 1!) n Answer (from scratch): C(11,4) x C(7,4) x C(3,2) x C(1,1)

Combinations with repetitions Definition ( r -combinations from a multi-set): Given a set X of n objects, an r -combination with repetition allowed (or r -combination with a multi-set of size r ) is an unordered selection of elements taken from X with repetition allowed. Theorem: The number of r -combination with repetition allowed drawn from a set of n elements is C(r+n–1, r). n Example: 3-combinations from a set {a,b,c,d} –[a,a,a]; [a,a,b]; [a,a,c]; [a,a,d] –[a,b,b]; [a,b,c]; [a,b,d]; –[a,c,c]; [a,c,d]; [a,d,d]; –[b,b,b]; [b,b,c]; [b,b,d]; –[b,c,c]; [b,c,d]; [b,d,d]; –[c,c,c]; [c,c,d]; [c,d,d]; –[d,d,d] n Total Number = 20 = C(3+4-1, 3)

Combinations with repetitions Definition ( r -combinations from a multi-set): Given a set X of n objects, an r -combination with repetition allowed (or r -combination with a multi-set of size r ) is an unordered selection of elements taken from X with repetition allowed. Theorem: The number of r -combination with repetition allowed drawn from a set of n elements is C(r+n–1, r). n Example: 3-combinations from a set {a,b,c,d} Category aCategory bCategory cCategory d [a,a,a]X X X [a,a,b]X X [a,b,d] XX X [a,c,d] XX X [b,c,c] X X

Combinations with repetitions Definition ( r -combinations from a multi-set): Given a set X of n objects, an r -combination with repetition allowed (or r -combination with a multi-set of size r ) is an unordered selection of elements taken from X with repetition allowed. Theorem: The number of r -combination with repetition allowed drawn from a set of n elements is C(r+n–1, r). n Example: 3-combinations from a set {a,b,c,d} [a,a,a]X X X [a,a,b]X X [a,b,d] XX X [a,c,d] XX X [b,c,c] X X

Combinations with repetitions Definition ( r -combinations from a multi-set): Given a set X of n objects, an r -combination with repetition allowed (or r -combination with a multi-set of size r ) is an unordered selection of elements taken from X with repetition allowed. Theorem: The number of r -combination with repetition allowed drawn from a set of n elements is C(r+n–1, r). n Example: 3-combinations from a set {a,b,c,d} [a,a,a] [a,a,b] [a,b,d] [a,c,d] [b,c,c] Selection X X X | | | X X | X | | X | X | | X X | | X | X | X | X X | Represented by: Problem generalized: r -combination = putting r crosses From a set of n elements = putting n-1 ‘|’s in between crosses. Reduces to the same problem of assigning 2-bits (X and |) to r+n-1 positions. (Permuting r+n-1 positions from a multi-set of {X,|}

Combinations with repetitions Example 1: A person giving a party wants to set out 15 assorted cans of soft drinks for his guests. He shops at a store that sells 5 different types of soft drinks (a) How many different selections of cans of 15 soft drinks can he make? (b) If root beer is one of the types of soft drinks, how many different selections include at least 6 cans of root beer? Answer: (a)15-combination (15 drinks) from a multi-set of 5 categories –r = 15 drinks = 15 crosses –n = 5 categories: need 4 ‘|’ to separate the crosses –C(15+5-1, 15) = C(19, 15) = 3876 (b)Step 1: take out 6 cans of root beer: 1 way Step 2: select the remaining 9 cans: 9-combination (9 remaining drinks) from a multi-set of 5 categories: C(9+5-1, 9) = C(13,9) = 715 Final Answer = 1 x 715 = 715 (Multiplication Rule)

Combinations with repetitions Example 2: How many solutions are there to the equation x 1 + x 2 + x 3 + x 4 = 10 (a) if x 1, x 2, x 3, x 4 are non-negative integers? (b) if x 1, x 2, x 3, x 4 are positive integers? Answer: (a)10-combination from a multi-set of 4 categories –r = 10 units = 10 crosses; to be distributed into… –n = 4 categories: the four variables: need 3 ‘|’ to separate the crosses –C(10+4-1, 10) = C(13, 10) = 286 (b)Step 1: Assign 1 unit to each of the four variables: 1 way. Step 2: Assign the remaining 6 units to the four variables: 6-combination from a multi-set of 4 categories = C(6+4-1, 6) = C(9,6) = 84 Final Answer = 1 x 84 = 84 (Multiplication Rule)

Combinations with repetitions Example 3: How many triplets of the form (i,j,k) are there, when (a) each i, j, k  {1,…,n} (b) each i, j, k  {1,…,n} and 1  i  j  k  n Answer: (a)Permutation: n 3 (b)3-combinations from a multi-set of n categories: (Observation skills needed to relate problem to known scenario) For example if 1  i  j  k  5, then we have 3-combinations from a multi-set of 5 categories: 3 X’s and 4 ‘|’s (1,1,2) being represented as XX|X||| (1,2,4) being represented as X|X||X| (2,3,5) being represented as |X|X||X Therefore in general, answer is C(n+3-1, 3) = (n+2)!/ (3! x (n-1)!) = (n+2)(n+1)n / 6

32 Outline 1.Basic Rules a)Linear Series Rule b)Multiplication Rule c)Addition and Difference Rule d)Inclusion-Exclusion Rule 2.Common Counting Scenarios a)Permutations (Ordered Selections) b)Combinations (Unordered Selections) c)Permutations with repetitions d)Combinations with repetitions 3.Algebra of Combinations 4.Binomial Theorem

33 3. Algebra of Combinations Common properties (1) C(n,r) = C(n, n-r) (2) Pascal’s Formula: C(n+1, r) = C(n, r-1) + C(n,r) Proof of (1) nProven Algebraically: C(n,r) = n! / ( r!  (n-r)! ) = n! / ( (n-r)!  (n-(n- r))! ) = C(n, n-r) nProven using combinatorial reasoning (p331 of text) Let A be a set with n elements. Let the subsets of A of size r be B 1, B 2,…,B k. Each B k can be paired up with a subset of A of size n–r : namely A – B k. All subsets of size n All subset of size n–r B 1 A – B 1 B 2 A – B 2 … … B k A – B k

34 3. Algebra of Combinations Common properties (1) C(n,r) = C(n, n-r) (2) Pascal’s Formula: C(n+1, r) = C(n, r-1) + C(n,r) Proof of (2): refer to p334 of recommended text. nImplications: Pascal’s Triangle

35 4. Binomial Theorem n Binomial Theorem: (a+b) n = a n-k b k k=0 n n k Algebraic proof is by induction on n. (p341 of text) n Combinatorial Proof: (a+b) n = (a+b) (a+b) (a+b) … (a+b)(n copies) #1 #2 #3 #n b a a … a a b a … a What is the coefficient of a n-k b k ? How many ways can we create the a n-k b k term? Well, to create a term, we have to select either a or b from each (a+b) group. Problem reduces to a n -permutation with repetitions (previous section 2.3), of 2 types of objects: selecting n-k copies of a and k copies of b : n!/(k!(n-k)!) = C(n,k)

36 4. Binomial Theorem n Binomial Theorem provides rapid expansion of polynomials. –Example 1: Expand (a+b) n. C(5,0)a 5 b 0 + C(5,1)a 4 b 1 + C(5,2)a 3 b 2 + C(5,3)a 2 b 3 + C(5,4)a 1 b 4 + C(5,5)a 0 b 5 = a 5 + 5a 4 b + 10a 3 b a 2 b 3 + 5ab 4 + b 5 n It also allows you to access a particular term without the need to expand the entire polynomial –Example 2: What is the coefficient of a 9 b 6 in the expansion of (a+b) 15 ? Ans: C(15,6)

37 4. Binomial Theorem n Corollary of Binomial Theorem: 2 n = (1+1) n = 1 n-k 1 k (by binomial thm) k=0 n n k n 0 n 1 n 2 n n = ++++  n n k = Q: If |S| = n, what is |P(S)|? A: By addition rule: number of subsets of size 0 + number of subsets of size 1 + number of subsets of size 2 + … + number of subsets of size n

38 n End of Lecture