Counting: Permutations and Combinations
Count outcomes with the multiplication principle, permutations and combinations, then use them to find lottery odds and solve the birthday problem.
Welcome back!
Step 1 of 13Learn
Counting without listing
When outcomes are equally likely, probability is counting. But listing outcomes stops being practical fast. A 6-character password from 26 letters has over 300 million possibilities. You need rules.
The foundation is the multiplication principle: if a task has k stages, with n₁ choices for the first, n₂ for the second and so on, and the number of choices at each stage does not depend on earlier picks, then there are
n₁ × n₂ × … × n_k total outcomes.
Examples.
- A restaurant offers 4 starters, 6 mains and 3 desserts: 4 × 6 × 3 = 72 different three-course meals.
- A license plate with 3 letters then 4 digits: 263 × 104 = 175,760,000 plates.
- A 4-digit PIN: 104 = 10,000 codes. A 6-digit PIN: 1,000,000. Adding two digits makes guessing 100 times harder.
When repetition is not allowed, the choices shrink at each stage. Arranging 5 different books on a shelf: 5 choices for the first slot, 4 for the second, and so on, giving 5 × 4 × 3 × 2 × 1 = 120. That product is written 5! (five factorial). By convention 0! = 1.
Factorials grow explosively. 10! is 3,628,800, and 52!, the number of ways to shuffle a deck, is about 8 × 1067. A well-shuffled deck is almost certainly in an order that has never existed before.
Step 2 of 13Practice · Work it out
A website requires a password of exactly 2 letters (26 options each, case ignored) followed by 3 digits. How many passwords are possible?
Step 3 of 13Learn
Permutations: when order matters
A permutation is an ordered selection. The number of ways to choose k items in order from n distinct items is
P(n, k) = n × (n − 1) × … × (n − k + 1) = n! / (n − k)!
Example. Eight runners race. How many ways can gold, silver and bronze be awarded? 8 × 7 × 6 = 336. Equivalently 8!/5! = 40,320/120 = 336.
Arrangements with repeated items. How many distinct arrangements are there of the letters in BOOK? If the two O's were different, there would be 4! = 24. But swapping the O's gives the same word, so each arrangement was counted 2! = 2 times: 24/2 = 12. In general, for n items with groups of identical items of sizes k₁, k₂, …:
n! / (k₁! × k₂! × …)
MISSISSIPPI has 11 letters: 1 M, 4 I's, 4 S's and 2 P's, so it has 11!/(4! × 4! × 2!) = 34,650 distinct arrangements.
Common mistake: using a permutation when order does not matter. If you pick 3 people for a committee, choosing Ana, Ben, Cal is the same committee as Cal, Ana, Ben. Counting ordered picks would overcount each committee 3! = 6 times. That case needs combinations.
Step 4 of 13Practice · Work it out
A club with 12 members elects a president, a vice president and a treasurer (three different people). How many outcomes are possible?
Step 5 of 13Learn
Combinations: when order does not matter
A combination is an unordered selection. The number of ways to choose k items from n, written C(n, k) or "n choose k", is
C(n, k) = n! / (k! × (n − k)!)
It is the permutation count divided by k!, because each unordered group of k appears k! times among the ordered lists.
Examples.
- Choose a committee of 3 from 12 people: C(12, 3) = 1320 / 6 = 220.
- Five-card poker hands from a 52-card deck: C(52, 5) = 2,598,960.
- A lottery draws 6 numbers from 1 to 49: C(49, 6) = 13,983,816. One ticket wins the jackpot with probability about 1 in 14 million.
Combinations also give probabilities of specific hands. The number of 5-card hands with exactly 4 aces is C(4, 4) × C(48, 1) = 48 (all four aces, plus any one of the other 48 cards). So P(four aces) = 48 / 2,598,960 ≈ 1 in 54,000.
Two handy facts: C(n, k) = C(n, n − k), since choosing 3 to include is the same as choosing the other n − 3 to leave out, and C(n, 0) = C(n, n) = 1.
The test for permutation versus combination: if swapping two of the chosen items gives a different outcome, order matters.
Step 6 of 13Compare
Permutations vs combinations
| Aspect | Permutation | Combination |
|---|---|---|
| Does order matter? | Yes: ABC and CBA are different | No: ABC and CBA are the same group |
| Formula | n! / (n − k)! | n! / (k! (n − k)!) |
| Choose 3 from 5 | 5 × 4 × 3 = 60 | 60 / 3! = 10 |
| Typical words | ranked, arranged, first/second, code | group, team, hand, committee |
Step 7 of 13Practice · Sort into groups
Does each situation call for permutations (order matters) or combinations (order does not matter)?
Tap an item, then tap its group (or drag it there).
Step 8 of 13Explore
The birthday problem
How many people do you need before two of them probably share a birthday? The curve shows the approximate probability of at least one match, 1 − e^(−n(n−1)/(2d)), for n people and d equally likely birthdays. The number of pairs grows like n2, which is why the curve climbs so fast.
- P(match) with 23 people
- 0.5
- People needed for a 50% chance (approx.)
- 23
Step 9 of 13Note
Step 10 of 13Practice · Work it out
How many different 5-person teams can be chosen from a group of 10 people?
Step 11 of 13Practice · Chart
How many teams of k can you pick from 10 people?
The counts C(10, k) rise and fall symmetrically, because choosing who is in the team is the same as choosing who is left out: C(10, k) = C(10, 10 − k).
Which team size has exactly as many choices as a team of 3?
Tap the bar that answers the question, then press Check.
Step 12 of 13Tap to reveal
Four questions before you count
Does order matter?
If swapping two chosen items gives a different outcome (seats, ranks, codes), count permutations. If not (teams, hands, toppings), count combinations.
Is repetition allowed?
Digits in a PIN can repeat, so each position keeps all 10 choices: 10k. People on a committee cannot repeat, so the choices shrink at each step.
Are some items identical?
Identical letters or objects create duplicate arrangements. Divide by the factorial of each group size, as in BOOK (4!/2! = 12).
Are there restrictions?
Handle the restricted part first. If two friends must sit together in a row of 5, glue them into one block: 4! arrangements of blocks, times 2 ways to order the friends inside, gives 48.
Step 13 of 13Practice · Choose one
A standard deck has 4 suits of 13 cards. What is the probability that a 5-card hand contains only hearts?
Lesson complete!