Counting and combinations
Decide whether order matters, then pick the pattern.
The idea
Counting questions look different but reduce to a few patterns. Decide first: does order matter, and are repeats allowed?
Patterns to recognise
- Product rule. If one choice has
moptions and an independent second hasn, there arem × noutcomes in total. - Choosing, order ignored.
C(n, k) = n! / (k! (n−k)!). - Arranging with repeats. For
nitems with repeated groups of sizesa, b, …, there aren! / (a! b! …)distinct arrangements. - Stars and bars. The number of non-negative integer solutions to
x1 + … + xk = nisC(n + k − 1, k − 1). - Inclusion–exclusion. To count items with at least one of several properties, add the single counts, subtract the pairs, add the triples, and so on.
Worked examples
1. How many distinct arrangements of the letters of MISSISSIPPI?
There are 11 letters: M once, I four times, S four times, P twice. So the count is 11! / (1! × 4! × 4! × 2!) = 39,916,800 / 1,152.
Answer: 34,650
2. How many ordered triples of non-negative integers (x, y, z) satisfy x + y + z = 10?
Stars and bars with n = 10 and k = 3 gives C(12, 2) = 12 × 11 / 2.
Answer: 66
3. How many integers from 1 to 100 are divisible by 2, 3 or 5?
Singles: 50 + 33 + 20 = 103. Pairs (multiples of 6, 10, 15): 16 + 10 + 6 = 32. Triple (multiples of 30): 3.
Inclusion–exclusion: 103 − 32 + 3.
Answer: 74
Common mistakes
- Forgetting to divide out repeated letters or items.
- Counting ordered outcomes when the question asks for groups, or the reverse.
- Adding the single counts and stopping, which double counts the overlaps.
Practise this topic
Try questions on this topic with instant explanations, or test yourself against the world in the ranked exam.