counting rules etc
play

Counting Rules, etc Product Rule Generalized Product Rule Division - PDF document

4/1/16 Counting - supplement Counting Rules, etc Product Rule Generalized Product Rule Division Rule Bijection Rule Sum Rule Combinatorial argument Binomial Theorem Pigeonhole Principle When applying generalized


  1. 4/1/16 Counting - supplement Counting Rules, etc • Product Rule • Generalized Product Rule • Division Rule • Bijection Rule • Sum Rule • Combinatorial argument • Binomial Theorem • Pigeonhole Principle When applying generalized Generalized Product Rule product rule • If S is a set of sequences of length k for which there are • Have in mind a sequence of choices that – n 1 choices for the first element of sequence produces the objects you are trying to – n 2 choices for the second element given any count. (Usually there are many particular choice for first possibilities.) – n 3 choices for third given any particular choice for first and second. – ….. • Then |S| = n 1 x n 2 x .... x n k Division Rule Sum Rule • If f: A à B is k-to-1 function, then |A| = k|B| • If S = A U B and A and B are disjoint (mutually exclusive) then |S| = |A| + |B| Example: • A is the set of ears in the room • B is the set of people. • More generally, inclusion/exclusion. • Each ear maps to exactly one person. • Each person has exactly two ears that map to it. • Then the number of ears is twice # people 1

  2. 4/1/16 Solving Pigeonhole Principle Combinatorial argument Problems Let S be a set of objects. • What are the pigeons? • Show how to count a set in one way à N • What are the pigeonholes? • Show how to count a set in another way à • What is the rule for assigning a pigeon to a M pigeonhole? Conclude that N = M friending pigeons counting paths How many ways to walk from 1 st and Spring to 5 th There are many people in this room, some of whom are and Pine only going North and East? friends, some of whom are not… Pine Pike Union Prove that some two people have the same number of friends. Spring 1 st 2 nd 3 rd 4 th 5 th Instead of tracing paths on the grid above, ✓ 7 ◆ list choices. You walk 7 blocks; at each = 35 3 intersection choose N or E; must choose N exactly 3 times. counting paths Other problems How many ways to walk from 1 st and Spring to 5 th 10 people of different heights . How many ways to line up 5 of and Pine only going North and East, if I want to them? stop at Starbucks on the way? Pine Line up 5 of them in height order? Pike Union Spring 1 st 2 nd 3 rd 4 th 5 th 2

  3. 4/1/16 quick review of cards 8 by 8 chessboard • How many ways to place a pawn, bishop and knight so that none are in same row or column? • 52 total cards • 13 different ranks : 2,3,4,5,6,7,8,9,10,J,Q,K,A • 4 different suits : Hearts, Clubs, Diamonds, Spades counting cards more counting cards ✓ 52 ◆ • How many possible 5 card hands? • How many straights that are not flushes? 5 10 · 4 5 − 10 · 4 = 10 , 200 • A “straight” is five consecutive rank cards of any suit. How many possible straights? • How many flushes that are not straights? 10 · 4 5 = 10 , 240 ✓ 13 ◆ 4 · − 10 · 4 = 5 , 108 • How many flushes are there? 5 ✓ 13 ◆ 4 · = 5 , 148 5 the sleuth’s criterion (Rudich) the sleuth’s criterion (Rudich) For each object constructed it should be For each object constructed it should be possible to reconstruct the unique possible to reconstruct the unique sequence of choices that led to it! sequence of choices that led to it! Example: How many ways are there to Example: How many ways are there to choose a 5 card hand that contains at least 3 choose a 5 card hand that contains at least 3 aces? aces? ✓ 4 ◆ ✓ 49 ◆ ✓ 4 ◆ ✓ 49 ◆ Choose 3 aces, then choose 2 Choose 3 aces, then choose 2 · · cards from remaining 49. cards from remaining 49. 3 2 3 2 ✓ 4 ◆ ✓ 48 ◆ ✓ 4 ◆ ✓ 48 ◆ When in doubt break set up into + · · disjoint sets you 3 2 4 1 know how to count! 3

  4. 4/1/16 Other problems Lessons # of 7 digit numbers (decimal) with at least one repeating digit? (allowed to have leading zeros). • Solve the same problem in different ways! • If needed, break sets up into disjoint subsets that you know for sure how to count. • Once you specify the sequence of choices # of 3 character password with at least one digit each character either digit 0-9 or letter a-z. you are making to construct the objects, make sure that given the result, you can 10 36 36 + 36 10 36 + 36 36 10 tell exactly what choice was made at each step! Doughnuts Rooks on Chessboard • You go to Top Pot to buy a dozen • Number of ways to place 2 identical rooks doughnuts. Your choices today are on a chessboard so that they don’t share a – Chocolate row or column. – Lemon-filled – Sugar – Glazed – Plain • How many ways to choose a dozen doughnuts when doughnuts of the same type are indistinguishable? Bijection Rule Bijection between A and B • Count one set by counting another. – A: all ways to select a dozen doughuts when five varieties are available. • Example: – B: all 16 bit sequences with exactly 4 ones – A: all ways to select a dozen doughuts when five varieties are available. – B: all 16 bit sequences with exactly 4 ones 4

  5. 4/1/16 Mapping from doughnuts to bit Buying 2 dozen bagels strings • Choosing from 3 varieties: – Plain – Garlic – Pumpernickel • How many ways to grab 2 dozen if you want at least 3 of each type and bagels of the same type are indistinguishable. 5

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend