What this move does
Counting has just one rule: count every object exactly once. Miss nothing, and count nothing twice. Four tools are enough:
- If a job is done in steps, one after another, multiply the numbers of choices at each step (the multiplication principle). In the tree above, each new level multiplies the number of leaves.
- If a job splits into cases that do not overlap, add the counts of the cases (the addition principle).
- If every object has been counted times, divide the total by .
- If the cases overlap, subtract what was counted too often (inclusion–exclusion).
Predict first
To get to the museum you can take a bus (any of routes) or the metro (any of lines). When you arrive, you go in through one of entrances. How many ways are there in all?
“Bus or metro” is a split into cases: ways to get there. “Then choose an entrance” is a step, so multiply by . Together, .
In the tree below, a dashed line means “or” and a solid line means “and then”. Grow it level by level and count the leaves.
Work through one: standing in line
Choose of the people A, B, C, D and line them up for a photo. How many different lineups are there?
Example: choose 3 of 4 people and line them up
Step 1 / 5- Break the job into steps
The line has three places. First decide who stands on the left, then in the middle, finally on the right. These are steps, so we multiply. Right now the tree is just a root.
Look again at the reason for step 2. Which people you can choose depends on step 1 (if A is on the left, the middle is B, C or D), but how many you can choose is always . The multiplication principle only needs the number to stay the same.
(The Chinese book writes the number of permutations of out of as ; many English books write or .)
Counted too often: divide
What if you just choose people for cleaning duty, and order does not matter? “A, B” and “B, A” are the same pair.
Below, the left side shows every ordered lineup and the right side shows the truly different groups. Tap any card to see how many “twins” it has on the left.
Predict first
Choose of people to form a group (order does not matter). There are ordered lineups. How many groups are there?
The people in a group can line up among themselves in orders, so each group appears times among the lineups:
A selection where order does not matter like this is called a combination. Divide the number of permutations by the number of ways to order each group, and you get the number of combinations. (The Chinese book writes ; in English you will usually see .)
The same idea handles people “sitting in a circle”. people sit around a round table, and rotating everyone counts as the same seating:
Counting routes through the streets
Walk from A to B, moving only right or up. A route to any crossing makes its last step either from the left or from below. The two cases do not overlap, so
Predict first
Start with a small one: a block of streets squares wide and squares high. Going from the bottom-left corner to the top-right corner (only right or up), how many routes are there?
The crossings along the edges each have just route. The middle one has ; after that come and ; the end has .
Below is a bigger block. Tap one crossing at a time and fill the numbers all the way to B. The table of numbers you get is Pascal's triangle, turned on its side.
Here is another way to see it. On a grid squares wide and high, every route takes exactly steps, and of them go up. Once you choose which steps go up, the route is fixed, so the number of routes is : the same answer as adding square by square.
Example: one crossing in the middle is closed for roadwork
Step 1 / 5- Write 0 at the roadblock
Crossing is closed: no route through it counts, so its number is . The bottom row and the left column are still all .
Counted too much: subtract
How many numbers from to are a multiple of or a multiple of ? The two cases overlap, and adding them directly counts the overlap twice.
In the picture below, choose “add” or “subtract” for each term. The small tag next to a number tells you how many times it is counted right now. The goal: every number inside the circles is counted exactly once.
With three sets there is one more layer. Try it yourself first:
Predict first
How many numbers from to are a multiple of at least one of , , ?
Add the three single sets: . Subtract the pairwise overlaps: , leaving . But the number was added times and then subtracted times, so now it is not counted at all. It has to be added back: .
When it fails
“Counted too often, so divide” needs one thing: every object must be counted the same number of times.
Break it
Counterexample lab: remove one condition
Conclusion: total ÷ number of repeats = the true count ← still true?
Make three-letter “words” from the letters A, A, B. First treat the two A's as different, A₁ and A₂: there are orders. Each word is counted times, so there are words.
Thread black beads (B) and white beads (W) into a bracelet; rotating it counts as the same bracelet. Someone argues: “Put beads in a circle of numbered places: ways. Each bracelet can be rotated ways, so there are bracelets.”
Tap each bracelet on the right and see how many times it was counted.
The alternating bracelet “BWBW” takes up only cards, while the other takes up . The counts differ, so you cannot just divide. There are really only different bracelets, and you have to count them case by case.
Practice
A school lunch combo is one of main dishes, one of soups and one of fruits. How many different combos are there?
teams play a round robin (every two teams play each other exactly once). How many games are played in all?
On a grid of streets squares wide and high, walk from the bottom-left corner A to the top-right corner B, moving only right or up. Crossing is closed for roadwork and cannot be used. How many routes are there?
How many numbers from to are neither a multiple of nor a multiple of ?
Using the digits without repeating any digit, how many three-digit even numbers can you make?