Paths through a tree
A café offers tea or coffee, and then cake or a scone. Draw the choices as a tree: two branches for the drink, and from the end of each, two branches for the food.
Every path from the start to a tip is one order: tea and cake, tea and a scone, coffee and cake, coffee and a scone. There are 4 paths, so there are 4 orders.
Each drink opens the same two food branches, so the tree ends in 2 × 2 = 4 tips, one for each order.
Choices in a row multiply
Counting the tips one drink at a time gives 2 + 2. Because every drink opens the same number of branches, that sum is 2 × 2 = 4.
This is the multiplication principle. If a first choice can be made in m ways, and for each of them a second choice can be made in n ways, the two choices together can be made in m × n ways.
A restaurant has 3 starters and 4 mains. Each starter goes with each of the 4 mains, so there are 3 × 4 = 12 two-course meals, without listing them.
One row for each starter and one column for each main. Each cell is one two-course meal: 3 rows of 4 cells make 12.
A third choice multiplies again
Add 2 desserts. Each of the 12 two-course meals can end with either dessert, so there are 12 × 2 = 24 three-course meals. In one line, 3 × 4 × 2 = 24: one factor for each choice, in the order the choices are made.
One box for each course, with the number of choices for it written inside. The choices are all made, one after another, so the numbers multiply.
Alternatives add
Now a diner wants one dish only, either a starter or a main. That is a single choice from the two lists put together: 3 + 4 = 7 dishes.
This is the addition principle. If one option can be chosen in m ways and another in n ways, and no way belongs to both, then choosing one or the other can be done in m + n ways.
The same two numbers give 12 for a starter and a main, and 7 for a starter or a main. With 2 drinks and 2 cakes the two rules both give 4, which hides the difference; with 3 and 4 the answers are far apart.
One box only: a single dish is chosen, from 3 starters and 4 mains put together.
Both rules in one count
A meal deal is one drink and one cake. The drink comes from 2 hot drinks or 3 cold ones, and there are 2 cakes.
The drink is one choice from either menu, so it adds: 2 + 3 = 5 drinks. The cake is chosen as well as the drink, so it multiplies: 5 × 2 = 10 meal deals.
Ask of each step: is this one choice out of several lists, or another choice made as well? "Or" adds; "and then" multiplies.
The usual mistakes
Adding when both choices are made. 4 shirts and 5 hats make 4 × 5 = 20 outfits; 4 + 5 = 9 counts the items, not the outfits.
Multiplying when only one thing is chosen. One drink from 4 teas and 5 coffees is 4 + 5 = 9 choices; 4 × 5 = 20 would be a tea and a coffee together.
Leaving out one of the lists. A single drink can be a tea or a coffee, so both lists count.
A door code
In the application below, each of four digits in a door code is a choice made after the one before, so the choices multiply. When the digits must all be different, each choice has one fewer option than the last.
Worked example: A Four-Digit Door Code, With and Without a Repeated Digit
Question An office door is opened by a four-digit code, and each digit can be any of 0 to 9. (a) How many codes have four different digits? (b) How many codes have at least one digit repeated?
1.With no rule, each of the four slots has 10 choices, so there are 10 × 10 × 10 × 10 = 10000 codes.
With no rule, each slot has 10 choices: 10 × 10 × 10 × 10 = 10000 codes. 2.With four different digits, the first slot has 10 choices. The second cannot repeat the first, so it has 9; the third has 8 and the fourth 7.
With four different digits, each slot has one choice fewer than the slot before it. 3.(a) Multiply the choices: 10 × 9 × 8 × 7 = 5040 codes. This is the number of permutations of 4 digits from 10, 10P4 = 10!6!.
(a) 10 × 9 × 8 × 7 = 5040 codes. 4.(b) Every code either has four different digits or repeats at least one digit, so at least one repeat is 10000 − 5040 = 4960 codes. Check: 5040 + 4960 = 10000.
(b) At least one repeat is all codes minus all different: 10000 − 5040 = 4960.
Answer: (a) 5040 codes; (b) 4960 codes
Common mistakes
- Counting four different digits as 104 = 210. The code 1234 and the code 4321 open different doors, so the order matters and the count is a permutation, not a combination.
- Counting (b) directly as a single case, such as 10 × 1 × 10 × 10 for a first digit repeated. Repeats can happen in many places and more than once, so the complement is the reliable count.