Combinations & permutations
nCr, nPr, factorials and the difference between them, in plain English.
Order does not matter, no repeats
Order matters, no repeats
nʳ — like a PIN
Multiset: C(n+r−1, r)
How it works
The only question that matters is whether order counts. Choosing three people for a committee is a combination — the same three people in any order is the same committee. Choosing gold, silver and bronze is a permutation, because swapping two of them is a different outcome.
nPr = n! / (n − r)!
nCr = n! / (r! · (n − r)!) = nPr / r! Why combinations divide by r!
Every unordered selection of r items can be arranged in r! ways. Permutations count all of those separately, so dividing by r! collapses them back into one. That single division is the whole difference between the two formulas.
The four cases
- Order matters, no repeats
- nPr — race finishes, seating arrangements, passwords with distinct characters.
- Order does not matter, no repeats
- nCr — lottery tickets, poker hands, committees.
- Order matters, repeats allowed
- nʳ — PINs, dice rolls in sequence, license plates.
- Order does not matter, repeats allowed
- C(n+r−1, r) — scoops of ice cream, coin denominations in a handful.
How fast these grow
52 cards choose 5 is about 2.6 million. Choose 26 instead and it exceeds 495 trillion. A shuffled deck has 52! orderings — a number with 68 digits, larger than the estimated count of atoms in our galaxy. Any deck you shuffle properly has, in all likelihood, never existed before.