Permutations
What You’ll Learn
Section titled “What You’ll Learn”In this lesson you’ll learn what a permutation is, how factorials work, the formula for arranging items out of , how to handle arrangements with repeated identical items, and how circular arrangements differ.
The Concept
Section titled “The Concept”A permutation is an arrangement of objects in a specific order. Order is the defining feature. ABC and CBA are different permutations of the same three letters.
Factorials
Section titled “Factorials”The number of ways to arrange all distinct objects in a row is
Why? The first position has candidates, the second has (one is used up), and so on down to 1. Multiplication principle.
By definition,
That looks arbitrary but it isn’t. There’s exactly one way to arrange nothing: the empty arrangement. Defining also makes every formula below work at its boundaries without special-casing.
Factorials get large fast. and is about . This is why “just try every ordering” is not an algorithm.
Permutations of from
Section titled “Permutations of rrr from nnn”To arrange only of the objects:
Also written or .
Where it comes from: you’re filling positions, with choices for the first, for the second, down to for the last:
Dividing by cancels off exactly the tail you don’t want.
Two boundary cases worth noting: , and .
In practice, don’t compute the big factorials. Just multiply descending terms starting at .
Permutations with repeated items
Section titled “Permutations with repeated items”If some objects are identical, many “different” arrangements look the same, and you’ve overcounted.
For objects where are of one identical type, of another, and so on:
The reasoning: treat all objects as distinct to get , then divide out the arrangements you can’t tell apart. The copies of the first type can be shuffled ways with no visible change, so divide by , and similarly for each type.
Classic example, the word LEVEL: 5 letters with L twice, E twice, V once.
Circular permutations
Section titled “Circular permutations”Arranging people around a round table is different, because a rotation of an arrangement is usually considered the same arrangement. There’s no “first seat.”
Why: fix one person anywhere to kill the rotational freedom, then arrange the remaining relative to them. Equivalently, linear arrangements divided by the rotations that produce each circular one.
If reflections also count as identical (a bracelet you can flip over, rather than a table), divide by 2 more:
Arrangements with restrictions
Section titled “Arrangements with restrictions”Two standard techniques.
- Items must be together - glue them into a single block, arrange the blocks, then multiply by the internal arrangements of the block.
- Items must be separated - count the total and subtract the together case, or place the unrestricted items first and slot the restricted ones into the gaps.
Worked Examples
Section titled “Worked Examples”Example 1: Full arrangement.
How many ways can 7 books be arranged on a shelf?
Solution. All 7 distinct, order matters:
Example 2: Partial arrangement.
A club of 12 members elects a president, vice president, and treasurer. No person holds two offices. How many outcomes?
Solution. Order matters, because the roles are different.
Compare: if you were just picking a 3-person committee with no roles, order would not matter and the answer would be 220. That’s the next lesson.
Example 3: Repeated letters.
How many distinct arrangements of the letters in MISSISSIPPI?
Solution. 11 letters total: M (1), I (4), S (4), P (2).
Without the correction you’d claim million arrangements, over a thousand times too many.
Example 4: Circular arrangement.
Eight people sit around a round table. How many distinct seatings if rotations are considered the same?
Solution.
If instead the seats were numbered (so rotating produces a genuinely different seating), the answer would be .
Example 5: Must be together.
In how many ways can 6 people line up if two specific people, Ana and Ben, must stand next to each other?
Solution. Treat Ana-Ben as one block. Now you have 5 units to arrange:
Within the block, Ana and Ben can be in 2 orders:
Example 6: Must be apart.
Same 6 people. How many ways if Ana and Ben must not be adjacent?
Solution. Complement rule. Total arrangements minus the adjacent ones:
Example 7: A restriction on position.
How many 5-letter arrangements of the letters in DIGITS start with a vowel?
Solution. DIGITS has 6 letters: D, I, G, I, T, S, with I appearing twice. We’re arranging 5 of the 6, which makes this messier than it looks, so let’s simplify to arranging all 6 letters starting with a vowel.
The only vowel is I, and there are two identical copies. Fix an I in the first position. The remaining 5 letters are D, G, I, T, S, all distinct:
Because the two I’s are identical, fixing “an I” first counts each distinct word once, so the answer is 120. Watch for the trap of multiplying by 2 for the “two choices of I” - those choices produce identical words.
Real-World Applications
Section titled “Real-World Applications”Any problem of the form “in what order?” is a permutation problem. Scheduling job interviews, ordering tasks in a build pipeline, and seating charts all count this way.
The traveling salesman problem is the famous cautionary tale. Visiting cities in some order gives distinct routes. For 20 cities that’s over . Checking them all at a billion per second takes roughly two years, which is why this problem is attacked with heuristics rather than brute force.
Cryptography and security estimate work factors with permutations. Shuffling a deck of 52 cards yields orderings, which is a genuinely staggering number and the reason a well-shuffled deck has almost certainly never occurred before in history.
Genomics counts sequence arrangements. Playlist ordering, tournament brackets, DNA fragment assembly, and anagram generators all use this math too.
The repeated-items formula shows up in probability, where it computes the number of distinct outcomes when several results are indistinguishable, like the number of ways to get exactly 3 heads in 10 coin flips.
Retrying will remove your ✅ checkmark until you pass again.