Lecture 28 21 127 Concepts of Math 11 07 2012 Counting Principles Rules of Sum and Product Recall the definitions of ROS and ROP The Rule of Sum ROS Let A be a finite set let n N and let S Si i n be a finite partition of A Then X A Si i n The Rule of Product ROP Consider a process that is completed in n distinct steps Assume that the i th step for every i n has exactly wi different ways to be completed moreover assume that this number wi N does not depend on the choices made in the previous steps Also assume that no two distinct choices at any step yield the same outcome Then the Rule of Product states that the total number of outcomes N of this n step process is Y N wi i n Picturing the ROS amounts to drawing a partition of a set Picturing the ROP amounts to drawing a decision tree At each step we form some number of new branches and by assumption the number of new branches is some fixed number at each step regardless of how we got to that step Examples License Plates Suppose a license plate string consists of 6 or 7 positions each of which is filled with a letter from A to Z or a digit from 0 to 9 Example 1 How many license plates are there We must partition based on the length of the string whether it is 6 or 7 Within each part we have a 6 or 7 step process At step i we fill Position i in the string with one of the 36 options there are 26 letters and 10 digits By ROP then there are 366 strings of length 6 and 367 strings of length 7 By ROS then there are 366 367 total license plate strings Example 2 How many license plates have at most 1 digit We must partition based on whether there are 0 digits or 1 digit With 0 digits each step in our process places a letter in the corresponding position That is there are 366 or 367 such outcomes With 1 digit step 1a chooses which of the positions is filled with a digit step 1b chooses the digit for that position and the rest of the steps fill the remaining positions with letters only That is there are 6 10 365 or 7 10 366 such outcomes 1 In total by ROS there are 366 6 10 365 367 7 10 366 total outcomes Example 3 How many license plates have no vowels and no even digits This condition just limits the number of choices at each step There are only 21 letters and 5 digits to choose from so we get 266 267 total outcomes by ROP and ROS Example 4 How many license plate strings have at least 3 digits We can partition based on length either 6 or 7 We can then partition based on the number of digits either 3 or 4 or 5 or 6 or 7 We want to use ROP within each part of the partitions But how can we identify the number of ways to select 3 of the 6 positions to be filled with digits We can try to write these out by hand but there must be a better way This is where binomial coefficients will be helpful You might notice that we could also answer this question by identifying how many license plate strings have at most 2 digits and then consdering removing them from the total number of plates Why does this work though We only have Rules of Sum and Product not a rule of Subtraction This is the idea Let X represent the set of license plate strings with at most 2 digits and let Y represent the set of license plate strings with at least 3 digits These two sets form a partition of the set of all license plate strings since any string either has 2 or fewer digits or else 3 or more digits Thus by ROS X Y 366 367 the total number of strings Therefore Y 366 367 X so if we were able to find X we could easily find Y Notice that we phrased this in terms of a partition and then applied ROS We can t just jump to saying Subtract from the total Some Definitions Definition Let n N The natural number n read as n factorial is given by Y n k k k 1 k 2 3 2 1 k n By definition 0 1 Intuitively n represents the number of ways to arrange n people into n numbered chairs How any ways can we arrange 0 people 1 way We just did so Definition Let n N be given A permutation of n is a bijection f n n Equivalently a permutation is an ordered n tuple of elements of n where repeats are not allowed Fact There are n permutations of n More generally there are n many permutations of a set of n objects not necessarily precisely the set n but just a set with size n Proof Construct an arbitrary permutation of n by selecting which element appears first in the ordered 2 list There are n options Then from all the elements except that one already chosen select one to appear second in the list There are n 1 options In general at step k we choose from the n k 1 n k 1 elements not already chosen and pick one to appear next This goes until step n 1 where we only have 1 option By ROP there are n n 1 n 2 2 1 n total outcomes Binomial Coefficients Here is our motivating example How many possible 5 card poker hands are there That is how many ways can we select 5 different cards from a standard deck of cards Let N be the number we are looking for We will identify two different formulas for expressions that involve N This will allow us to solve these algebraic expressions for a formula for N Here is an outline of our method Make sure that you understand the overall strategy before you dive into the details of any step That is make sure you are convinced that the formula we derive at the end actually represents the correct number we were looking for 1 Select an arbitrary and fixed five card hand We will identify the number of ways to shuffle a deck of cards such that the top five cards are that fixed five card hand in any order Note that there are N ways to do this step We seek a formula for N 2 Count the number of shufflings of the entire deck of 52 cards 3 Count the number of shufflings of the deck that yield those fixed five cards on the top This is split into three steps i Count the number of ways to arrange those five cards ii Count the number of ways to arrange the other 47 cards iii Count the number of …
View Full Document
Unlocking...