Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Use Complementary Counting

Some sets are hard to count directly but easy to count from the outside. Count everything, count what you do not want, and subtract. "At least one" questions are the classic case, because their opposite, "none", is a single count.

Recognize the task

The words at least one, not all, some repeat or not next to each other appear, or a direct count splits into many overlapping cases: PINs with a repeated digit, committees with at least one woman, line-ups where two people are not side by side. Test: is the opposite condition ("none", "all different", "together") one easy count?
Complementary counting is explained in the counting principles lesson.

Two ways to do it

Total minus complementusual
∣A∣=∣U∣−∣Ac∣|A| = |U| - |A^c|
Add the casesdirect
∣A∣=∣A1∣+∣A2∣+⋯|A| = |A_1| + |A_2| + \cdots
Split into exactly one, exactly two, and so on, and use the addition rule; slower and easy to double count.

Steps

StepOn 4-digit PINs with at least one repeated digit
1Count all outcomes. Use the same rules as the question: here digits may repeat.Multiplication principle ↗104=10,00010^4 = 10{,}000
2State the opposite condition. "At least one repeat" fails only when all digits are different.all 44 digits different
3Count the opposite. Count it the same way as the total, ordered if the total is ordered.10⋅9⋅8⋅7=504010 \cdot 9 \cdot 8 \cdot 7 = 5040
4Subtract. The wanted outcomes are the rest of the total.10,000−5040=496010{,}000 - 5040 = 4960

Worked examples

Example 1 · coin flips

at least one head
55 flips: 25=322^5 = 32 outcomes
total
no heads: 11 outcome
all tails
32−1=3132 - 1 = 31

Example 2 · at least one woman

committee
44 from 66 men and 55 women: (114)=330\binom{11}{4} = 330
all committees
no women: (64)=15\binom{6}{4} = 15
all four are men
330−15=315330 - 15 = 315

Example 3 · not side by side

line-up
66 people in a row: 6!=7206! = 720
all line-ups
Ann and Bo together: 2⋅5!=2402 \cdot 5! = 240
glue them into one block
720−240=480720 - 240 = 480
Check the total and the complement separately in the counting calculator.

See it happen

Think of the total as a whole pie. "At least one" is most of the pie and is made of many overlapping slices: exactly one, exactly two, and so on. "None" is one thin slice with no overlaps. Measuring the thin slice and subtracting it from the whole is faster and never counts an outcome twice.

Common mistakes

Securing one success first

✗ at least one head in 55 flips: 5⋅24=805 \cdot 2^4 = 80
✓ that is more than the 3232 outcomes; use 32−1=3132 - 1 = 31

Taking the wrong opposite

✗ opposite of "at least one woman" is "at least one man"
✓ the opposite is "no women": all four are men

Counting the total and the opposite differently

✗ PINs: ordered total 10410^4, unordered opposite (104)\binom{10}{4}
✓ count both in order: 104−10⋅9⋅8⋅7=496010^4 - 10 \cdot 9 \cdot 8 \cdot 7 = 4960