EN3 - Counting with the product rule
The product rule counts a large collection of outcomes by breaking each outcome into small choices. You will decide how many choices are available at each stage, handle simple restrictions and explain why arranging distinct objects leads to factorials. The crucial step is choosing the stages well.
Multiplying the choices at successive stages
Six different books sit on a shelf. If you tried a new order every minute, could you keep going for a full twelve hours without repeating one? Listing every order would take longer than finding the answer. We need to count routes without drawing every branch.
Begin with shirts and pairs of trousers. For each shirt, there are outfits, giving . Each outfit has exactly one shirt and one pair of trousers, so this construction neither misses an outfit nor counts it twice.
You already know
A complete route through a tree represents one complete outcome. Count the branches available after each earlier choice. A later stage may have fewer options if objects cannot be reused.
Instead of drawing the same set of branches repeatedly, multiply their numbers. Three stages with , and choices give groups, each containing groups of outcomes.
Product rule for counting
Use this when a complete outcome is built in stages and stage has choices after every allowed sequence of earlier choices. Each complete outcome must have exactly one construction.
Not on the formulae sheet: learn it.
The identities of the choices may depend on earlier stages. What must stay fixed for a single product is the number available at each stage. This is a counting rule; it does not require a probability calculation.
Worked example 1: choices from different categories
Question. A lunch consists of one of sandwiches, one of drinks and one of fruits. Find the number of possible lunches.
Plan. Treat sandwich, drink and fruit as three successive choices.
Why multiply? Every lunch needs one choice from every category. Adding counts individual menu options, not complete lunches.
Answer. lunches.
Check. For each sandwich there are drink-and-fruit pairs, giving .
The next example changes one feature: the stages now repeat the same experiment, and the outcome records each stage separately.
Worked example 2: repeated stages
Question. Three six-sided dice are rolled in order. Find the number of possible ordered score sequences.
Plan. Count the six possible scores at each of the three positions.
Why keep the positions? and are different sequences, even though they contain the same three scores.
Answer. ordered score sequences.
Check. Fixing the first score leaves sequences; the six first-score cases give .
With six-sided dice recorded in order, the same argument gives sequences. This result is not on the formulae sheet: learn it. It counts sequences, not the number of possible totals.
Watch out
Wrong: possible three-dice sequences. That adds the branch counts instead of extending every route. Right: . Also, a count such as is not a probability: do not divide by a sample-space size unless asked for a probability.
Change the number of possible scores while keeping the number of stages fixed.
Choosing restricted positions first
A restriction changes a stage's available choices; handle the most restricted position before filling unrestricted ones.
For a four-digit PIN, is allowed first, so is a valid PIN. For a four-digit number, a leading would produce a number with fewer than four digits. Words such as “number”, “code”, “distinct” and “without repetition” affect the factors you multiply.
Repetition allowed or forbidden
If repetition is allowed, a symbol used at one position can be used again. Without repetition, each chosen symbol is removed from later choices. For example, is allowed when repeated digits are permitted, but not when all digits must be distinct.
The product rule still works without repetition: although the remaining symbols change, their number may be the same on every route. From distinct symbols, the second position always has choices after filling the first.
Worked example 3: a restriction on the first position
Question. How many three-digit numbers can be formed from , if repetition is allowed?
Plan. Count non-zero choices for the hundreds digit, then all five choices at each other position.
Why not ? That would include strings starting with , which are not three-digit numbers.
Answer. three-digit numbers.
Check. There are numbers beginning with each of , giving altogether.
The next example changes only whether repetition is permitted. The hundreds digit still cannot be .
Worked example 4: remove a used digit
Question. How many three-digit numbers can be formed from , if repetition is not allowed?
Plan. Fill the hundreds digit first, then reduce the number of remaining choices at each stage.
Why are the first two factors both ? The first stage excludes . The second excludes the chosen hundreds digit but allows .
Answer. three-digit numbers.
Check. For each of the four possible hundreds digits, there are endings, giving .
Sometimes no single product applies to every route. For an even three-digit number with distinct digits from , fill the units digit first. If it is , there are ways to fill the other positions. If it is or , there are ways for each choice: the first digit cannot be or the used even digit. These disjoint cases give . Adding disjoint case totals is not on the formulae sheet: learn it.
Watch out
Wrong: count those even numbers as . After choosing a non-zero even units digit, there are only legal hundreds digits. Right: separate “units digit ” from “units digit or ”, then add the case totals.
The same zero restriction appears with a longer list of available digits.
Arranging all distinct objects and factorials
To arrange every object in a row, fill the positions one at a time; each occupied position leaves one fewer object for the next.
Three books labelled have the orders . There are choices first, next and last, giving . The same reasoning works for any finite number of distinct objects.
Factorial
For a positive integer , , read “ factorial”, means the product of all positive integers from down to . For example, . It is not . Also define : there is one way to arrange no objects, namely the empty arrangement.
An arrangement here is linear: positions in a row are distinguished. The objects must be distinct, so swapping two changes the arrangement. A row of separately identifiable books fits this description; indistinguishable copies need different treatment.
Arranging all distinct objects
This holds for every non-negative integer , with .
Not on the formulae sheet: learn it.
There is no need to draw a tree with hundreds of endpoints. The decreasing stage counts already give its exact size.
Worked example 5: all positions are free
Question. Six different books are arranged in a row. Find the number of arrangements. Hence decide whether a different arrangement each minute can last for twelve hours.
Plan. Fill the six positions, then compare the count with the number of minutes available.
Why count books as distinct? Choosing a different title for any position changes the order on the shelf.
Answer. arrangements: exactly enough for consecutive one-minute slots, or twelve hours.
Check. Fixing the first book leaves orders. There are possible first books, giving .
The next example changes one feature: a specified book has a fixed position.
Worked example 6: one object is fixed
Question. Six different books are arranged in a row. A specified dictionary must be at the left-hand end. Find the number of arrangements.
Plan. Fix the dictionary first, then arrange the five remaining books in the five remaining positions.
Why not multiply by ? The dictionary has one permitted position, not a choice of six positions.
Answer. arrangements.
Check. The unrestricted arrangements split into equal groups according to which book is first. One group contains .
Factorials grow fast: ten distinct books have orders. At one new order per second, that is exactly days. At that same speed, six books take only seconds, or minutes. Four extra books have increased the waiting time from minutes to weeks.
Watch out
Wrong: use after fixing one of the six books at an end. That factorial still lets the fixed book move. Right: remove the fixed object and position, then use for the rest.
Fixing a different shelf position has the same effect on the count.
Quick Recap
- Break each complete outcome into stages and multiply the choices available at those stages.
- Check leading zero, repetition and other restrictions before choosing the factors.
- If the number of later choices depends on the case, count disjoint cases separately and add.
- The number of linear arrangements of distinct objects is , with .
The opening shelf question: six distinct books give arrangements, exactly one for each minute of twelve hours.