Each choice removes one option
n ways for the first position, n−1 for the second, and so on for r positions. That product is P(n, r).
P(n, r) = n!/(n−r)! counts the ways to arrange r of n distinct objects in order. Factorials grow explosively, and that growth is a fact about the problem rather than about the notation.
Core ideas
The product rule with a shrinking pool of choices. Everything else is notation.
n ways for the first position, n−1 for the second, and so on for r positions. That product is P(n, r).
It makes P(n, n) = n!/0! = n! come out right and keeps every formula in this course free of special cases.
52! is about 8 × 10⁶⁷. Every shuffle of a deck that has ever been performed was almost certainly unique.
The material
The formula, its derivation, and two variants worth knowing.
A permutation of a set is an ordered arrangement of its elements. An r-permutation is an ordered arrangement of r of them.
For 0 ≤ r ≤ n, P(n, r) = n(n−1)(n−2)⋯(n−r+1) = n!/(n−r)!.
Fill the r positions in order. The first has n candidates. Whatever was chosen, the second has n−1 remaining, the third n−2, and the rth has n−r+1. The number of options at each stage does not depend on which particular objects were chosen earlier, so the product rule applies.
□
Note the count of factors: r of them, running from n down to n−r+1. Writing n down to n−r is the standard off-by-one, and it gives P(n, r+1).
Ten runners, how many ways to fill gold, silver and bronze? P(10,3) = 10 · 9 · 8 = 720. Order matters here — the same three runners in a different order is a different outcome — which is exactly what makes it a permutation rather than a combination.
n distinct objects can be arranged in a circle in (n−1)! ways, when rotations are considered identical.
There are n! linear arrangements. Each circular arrangement corresponds to exactly n of them, one for each choice of which object is written first. So the circular count is n!/n = (n−1)!.
Equivalently: fix one object's position to break the rotational symmetry, and arrange the remaining n−1 freely.
□
The division is legitimate only because rotations were declared identical. If the chairs are numbered, rotating everyone one seat along produces a different seating, nothing is identified, and the count is n!. Say which situation you are in before dividing; the question decides it, not the shape of the table.
The division-by-symmetry argument is the pattern to remember: when several arrangements are considered the same, count them all and divide by the size of the equivalence class. That is Sets, Relations, and Functions's equivalence relation doing combinatorial work, and “Permutations with Repetition” uses it again.
52! is about 10¹⁸ times the number of atoms in the Earth, which is roughly 10⁵⁰. Any algorithm that examines all permutations of a modest input is not slow — it is impossible, and “P, NP and NP-Completeness” in Algorithms and Complexity gives that observation a name.
Interactive
Enumerated while enumeration is possible
Method
Confirm order matters before reaching for the formula.
If rearranging the same objects gives a different outcome, it is a permutation. If not, “Combinations” has the right formula.
Objects are drawn without replacement. If they may repeat, “Permutations with Repetition” applies and the answer is nʳ.
P(n, r) has exactly r factors, ending at n−r+1. Miscounting them is the standard error.
Circular seating divides by n; a necklace that may be flipped divides by 2n. Name the symmetry before dividing.
Eight people at a round table; two of them must sit together.
The block trick — glue constrained objects together, count, then multiply by their internal arrangements — is the standard device for "must be adjacent" constraints. The final ratio check is cheap and catches an error in the block count immediately.
Count the ways to seat 6 people around a round table with two specific people not adjacent. Do it by complement, and state exactly why the circular count is 5! rather than 6!.
Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.
No recommendations yet for this lesson.