Mathyessy
Home › Topics › Counting & Probability › Complementary counting

Complementary counting practice

When the cases you want are messy, count the ones you don't want and subtract.

How it works

Complementary counting means

(what you want) = (total) − (what you don't want)

The phrase "at least one" is the big signal. "At least one even digit" splits into many cases, but its opposite, "no even digits at all", is a single easy count. The same works for probability: P(at least one) = 1 − P(none).

When a problem asks for at least one of two things, subtract each "missing" case and add back the overlap you removed twice (inclusion-exclusion): total − (no A) − (no B) + (neither).

Complementary Counting practice problems with solutions

These problems come from Mathyessy's question bank. Try each one before opening the solution.

  1. How many 3 digit numbers from 100 to 999 have at least one even digit?

    Show answer and solution

    Answer: 775

    Count the opposite: numbers with all odd digits. Each of the three digits has 5 odd choices, giving 5 × 5 × 5 = 125. There are 900 three-digit numbers, so 900 − 125 = 775.

  2. Flip 3 coins. Probability of at least one tail? Enter numerator over 8.

    Show answer and solution

    Answer: 7/8

    The only way to get no tails is HHH, with probability 1/8. So P(at least one tail) = 1 − 1/8 = 7/8.

  3. Roll a die 5 times. Probability of at least one 6?

    Show answer and solution

    Answer: 4651/7776

    P(no 6 in 5 rolls) = (5/6)⁵ = 3125/7776. So P(at least one 6) = (7776 − 3125)/7776 = 4651/7776.

  4. How many 3 digit numbers from 100 to 999 have at least one 5 and at least one 6?

    Show answer and solution

    Answer: 52

    No 5: 8 × 9 × 9 = 648 (the first digit cannot be 0 or 5). No 6: also 648. Neither 5 nor 6: 7 × 8 × 8 = 448. Inclusion-exclusion gives 900 − 648 − 648 + 448 = 52.

Practice this in Mathyessy →Free, no account needed. Opens the Complementary Counting set with instant feedback.

Keep going

Related topics

Related practice sets in the app

All Counting & Probability topics · Contest math practice by topic · MATHCOUNTS practice · AMC 8 practice