Skip to content
Family Table Math
Auto

Counting Principles

To find a probability, you often need to know how many outcomes there are. Listing them works for small problems, but nobody wants to list every possible licence plate. Two simple rules, the additive and multiplicative counting principles, let you count huge sets of outcomes without writing them all down.

For small problems, list the outcomes in an organized way, or draw a tree diagram with one level of branches for each stage. For example, with 33 shirts (red, blue, green) and 22 pairs of pants (jeans, khakis), a tree has 33 first branches, each splitting into 22:

ShirtPantsOutfit
redjeans, khakis22 outfits
bluejeans, khakis22 outfits
greenjeans, khakis22 outfits

That’s 3×2=63 \times 2 = 6 outfits. Lists and trees are great for checking your thinking, but they get too big very quickly. The counting principles do the same job with arithmetic.

If a task is done in stages, with mm ways to do the first stage and nn ways to do the second, then there are

m×nm \times n

ways to do the whole task. This extends to any number of stages: multiply the number of choices at each stage. The key word is “and”: you choose a shirt and pants.

If a choice can be made in one of two ways that don’t overlap, with mm options of the first kind or nn options of the second kind, then there are

m+nm + n

options altogether. The key word is “or”: you pick a hot meal or a sandwich, not both. (If the two kinds can overlap, subtract the overlap, just like the additive principle for probability.)

The product of all the whole numbers from nn down to 11 is written n!n! and read ”nn factorial”:

n!=n×(n−1)×(n−2)×⋯×2×1n! = n \times (n - 1) \times (n - 2) \times \dots \times 2 \times 1

For example, 5!=5×4×3×2×1=1205! = 5 \times 4 \times 3 \times 2 \times 1 = 120. By the multiplicative principle, n!n! is the number of ways to arrange nn different objects in a row: nn choices for the first spot, n−1n - 1 for the next, and so on.

We also define

0!=10! = 1

It may look strange, but there is exactly one way to arrange nothing (do nothing!), and this choice makes the formulas on the next pages work. Most calculators have an n!n! or x!x! key.

Factorials grow very fast, so cancel before you multiply:

8!6!=8×7×6!6!=8×7=56\frac{8!}{6!} = \frac{8 \times 7 \times 6!}{6!} = 8 \times 7 = 56

You have 33 shirts, 22 pairs of pants, and 22 pairs of shoes. How many different outfits can you make?

Solution. Choosing an outfit has three stages: shirt and pants and shoes. By the multiplicative principle:

3×2×2=12 outfits3 \times 2 \times 2 = 12 \text{ outfits}

Check: the tree diagram above had 66 shirt-and-pants branches, and each now splits into 22 shoe branches, giving 1212. ✓

A cafeteria offers 44 hot meals and 33 sandwiches. You pick one main dish, plus one of 55 drinks. How many different lunches are possible?

Solution. The main dish is a hot meal or a sandwich, which don’t overlap, so add: 4+3=74 + 3 = 7 main dishes. Then you choose a main dish and a drink, so multiply:

7×5=35 lunches7 \times 5 = 35 \text{ lunches}

Example 3: Codes with and without repetition

Section titled “Example 3: Codes with and without repetition”
  • (a) A licence plate has 44 letters followed by 33 digits. How many plates are possible if letters and digits can repeat?
  • (b) How many three-digit numbers (from 100100 to 999999) have no repeated digits?

Solution. (a) There are 2626 choices for each letter and 1010 for each digit:

26×26×26×26×10×10×10=456 976 00026 \times 26 \times 26 \times 26 \times 10 \times 10 \times 10 = 456\,976\,000

(b) Fill the most restricted spot first. The first digit can’t be 00, so it has 99 choices. The second digit can be anything except the first: 99 choices (now 00 is allowed). The third can be anything except the first two: 88 choices.

9×9×8=6489 \times 9 \times 8 = 648

Six friends line up for a photo. How many different orders are possible? Then simplify 10!8!\dfrac{10!}{8!}.

Solution. There are 66 choices for the first spot, 55 for the second, and so on:

6!=6×5×4×3×2×1=7206! = 6 \times 5 \times 4 \times 3 \times 2 \times 1 = 720

For the fraction, write 10!10! as 10×9×8!10 \times 9 \times 8! and cancel:

10!8!=10×9×8!8!=90\frac{10!}{8!} = \frac{10 \times 9 \times 8!}{8!} = 90

Adding when you should multiply. If you choose one thing and then another, multiply. Only add when the options are separate alternatives (one or the other).

Forgetting that choices shrink without repetition. If a digit or person can’t be used twice, each stage has one fewer option than the stage before.

Ignoring restrictions until the end. Deal with the most restricted position first (like “the first digit can’t be 00”), then fill in the rest.

Thinking 0!=00! = 0. By definition, 0!=10! = 1.

Multiplying out huge factorials. Cancel first: 100!98!=100×99=9900\dfrac{100!}{98!} = 100 \times 99 = 9900. Your calculator may overflow on 100!100!, but you don’t need it.

1. (Warm-up) An ice cream shop has 44 flavours, 33 toppings, and a choice of cone or cup. How many different single-scoop orders (one flavour, one topping, cone or cup) are possible?

Solution4×3×2=244 \times 3 \times 2 = 24

2. (Warm-up) Evaluate 6!6!, 9!7!\dfrac{9!}{7!}, and 0!0!.

Solution

6!=7206! = 720, 9!7!=9×8=72\dfrac{9!}{7!} = 9 \times 8 = 72, and 0!=10! = 1.

3. (Warm-up) You want to borrow one book: either one of 55 mystery novels or one of 77 science-fiction novels. How many choices do you have?

Solution

The two groups don’t overlap, so add: 5+7=125 + 7 = 12.

4. (Core) A Canadian postal code has the pattern letter, digit, letter, digit, letter, digit (like K1A 0B1). If any letter and any digit could be used in each spot, how many postal codes would be possible?

Solution26×10×26×10×26×10=17 576 00026 \times 10 \times 26 \times 10 \times 26 \times 10 = 17\,576\,000

(In real life, some letters aren’t used, so there are fewer.)

5. (Core) A phone PIN has 44 digits.

  • (a) How many PINs are possible?
  • (b) How many have no repeated digits?
Solution

(a) 10×10×10×10=10 00010 \times 10 \times 10 \times 10 = 10\,000.

(b) 10×9×8×7=504010 \times 9 \times 8 \times 7 = 5040.

6. (Core) Six runners race (no ties). In how many ways can they finish? In how many ways can the gold, silver, and bronze medals be awarded?

Solution

All six places: 6!=7206! = 720.

Just the top three: 6×5×4=1206 \times 5 \times 4 = 120.

7. (Core) How many odd three-digit numbers (from 100100 to 999999) have no repeated digits?

Solution

Fill the most restricted spots first. The last digit must be odd: 55 choices (1,3,5,7,91, 3, 5, 7, 9). The first digit can’t be 00 or the last digit: 88 choices. The middle digit can be anything except those two: 88 choices.

5×8×8=3205 \times 8 \times 8 = 320

8. (Challenge) Solve n!(n−2)!=30\dfrac{n!}{(n - 2)!} = 30.

Solution

Cancel: n!(n−2)!=n(n−1)\dfrac{n!}{(n - 2)!} = n(n - 1). So n(n−1)=30n(n - 1) = 30, which gives n2−n−30=0n^2 - n - 30 = 0, or (n−6)(n+5)=0(n - 6)(n + 5) = 0. Since nn can’t be negative, n=6n = 6.

Check: 6×5=306 \times 5 = 30. ✓

9. (Challenge) How many whole numbers from 11 to 999999 contain at least one digit 77?

Solution

Count the opposite: numbers with no 77. Write every number as three digits (001001 to 999999, with leading zeros). Each digit has 99 choices (anything but 77), giving 93=7299^3 = 729 strings, but that includes 000000, which isn’t in the range. So 728728 numbers have no 77.

999−728=271999 - 728 = 271