Counting: Permutations and Combinations
How to count arrangements and selections without listing them all. Permutations when order matters, combinations when it doesn't, and the multiplication rule that generates both. The counting muscle behind nearly every discrete probability question.
Prerequisites: Probability Spaces
Counting is the foundation of discrete probability. To find the chance of something, you often just count the favorable outcomes, count the total outcomes, and divide. The hard part is counting large sets without listing them one by one, and two ideas do almost all of that work: permutations (when order matters) and combinations (when it doesn't). Both grow out of a single rule.
The multiplication rule
If a task is built from a sequence of independent steps, and step 1 can be done ways, step 2 in ways, and so on, then the whole task can be done in
ways. Every choice at one step gets paired with every choice at the next, so the counts multiply. This is why a menu with 3 starters and 2 mains offers different meals.
Permutations: order matters
A permutation counts arrangements, where swapping two items gives a genuinely different result. The number of ways to line up all distinct items is
read " factorial." (The first spot has candidates, the next has left, and so on, straight from the multiplication rule.) If you only fill of the spots, you stop early:
Here is the number of available items and is the number of ordered positions. By convention .
Combinations: order doesn't matter
A combination counts selections, where a group is the same no matter what order you picked it in. To choose items from :
read " choose ." The logic: start from the ordered count , then divide by to erase the orderings, since each unordered group of items was counted times, once for each way of arranging it. That single division is the whole difference between a permutation and a combination.
The whole distinction in one line: order matters → permutation ; order doesn't → combination . The combination is just the permutation divided by to erase the orderings.
Worked example
A desk of 5 traders needs a team. First, how many ways can you pick a 2-person team where the two roles are the same? Order does not matter, so use a combination:
Ten possible teams. Now suppose the two roles are different, say a lead and a backup. Order now matters, so use a permutation:
Twenty possibilities, exactly times the combination count, because each of the 10 teams can be arranged into lead-and-backup in 2 ways. That factor of is the entire relationship between the two.
Mental-math shortcut: — choosing which to include is the same as choosing which to leave out. So is just , not a monstrous factorial.
Common pitfalls
- Order matters, or it doesn't. Deciding this first is the whole game. "How many teams?" is a combination; "how many rankings?" is a permutation. Using the wrong one is off by exactly a factor of .
- With or without replacement. Drawing cards without replacement shrinks the pool each step (); rolling a die with replacement does not (). Match the formula to the setup.
- "And" multiplies, "or" adds. Sequential choices that all happen multiply their counts; mutually exclusive alternatives add. Mixing these up is the most common counting error.
- Silent double-counting. Whenever items are interchangeable, ask whether you've counted the same outcome more than once and divide out the symmetry, just as divides by .
Two questions decide almost every counting problem: does order matter? (permutation vs combination) and is it with or without replacement? (does the pool shrink each draw?). Settle both before picking a formula — nearly every mistake is getting one of them wrong, or silently double-counting interchangeable items.
These counts are the raw material for probability: the "choose" coefficient is exactly what turns a single yes/no trial into the The Binomial Distribution, and every classic equally-likely-outcomes problem reduces to a favorable count over a total count. Pair careful counting with Conditional Probability and most interview brainteasers fall apart.
Practice in interviews
Further reading
- Blitzstein & Hwang, Introduction to Probability, ch. 1
- Ross, A First Course in Probability