๐งฎCombinatorics
Permutation Formulas
Study smarter with Fiveable
Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.
Why This Matters
Permutation formulas are the backbone of counting problems where order matters. Recognizing when order matters is half the battle on any combinatorics exam. You're being tested on your ability to identify which formula applies to a given scenario: Is repetition allowed? Are some objects identical? Are there forbidden positions?
Each formula exists because a specific constraint changes how we count. Don't just memorize and call it a day. You need to understand why we divide, why we subtract, and why circular arrangements behave differently from linear ones. The concepts here (overcounting corrections, symmetry elimination, inclusion-exclusion) appear throughout discrete mathematics and give you a toolkit for tackling any arrangement problem.
Linear Arrangements: The Foundation
These formulas handle the most common scenario: arranging objects in a line or sequence where position matters. The key principle is that each successive choice has fewer options available.
Basic Permutation Formula
This counts arrangements of objects selected from distinct objects where order matters. The factorial structure reflects successive multiplication: you have choices for the first position, for the second, and so on down to for the last.
Use this when each object can only be used once and every object is distinguishable from the others.
For example, choosing a president, vice president, and treasurer from a club of 10 people gives .
Permutations with Repetition
This applies when you can reuse objects, giving independent choices for each of positions. Your choice for one slot doesn't affect options for another. Classic examples include PIN codes (10 digits, 4 positions = ), license plates, and any scenario where "replacement" is allowed.
Compare: Basic permutations vs. permutations with repetition: both count ordered arrangements, but repetition allows reuse () while basic permutations don't (). If a problem mentions "with replacement" or "can repeat," you want .
Correcting for Overcounting
When objects are identical or positions are equivalent, the basic formula overcounts. These formulas divide out the redundant arrangements.
Permutations with Indistinguishable Objects
This is the multinomial coefficient for arranging objects when groups of size are identical. Dividing by the factorials eliminates arrangements that look the same, because swapping identical objects doesn't create a new permutation.
The classic example is counting arrangements of "MISSISSIPPI" (11 letters total). You divide by for the four S's, for the four I's, for the two P's, and for the single M:
Note that must equal . Every object needs to belong to exactly one group.
Circular Permutations
This counts arrangements of objects in a circle where rotations are considered identical. The reasoning: fix one object in place to break the rotational symmetry, then arrange the remaining objects linearly. For 6 people around a round table, that's (not ).
Watch for reflections: if the circle can be flipped (like a bracelet that you can turn over, as opposed to people seated at a fixed table), divide by 2 to get .
Compare: Indistinguishable objects vs. circular permutations: both divide to correct overcounting, but for different reasons. Identical objects create internal redundancy (swapping S's in MISSISSIPPI changes nothing). Circular arrangements create positional equivalence through rotation (everyone shifts one seat, but the seating is the same). Know which symmetry you're eliminating.
Derangements: When Nothing Stays Put
Derangements count permutations where no element remains in its original position. These problems use inclusion-exclusion to subtract out forbidden arrangements.
Derangements (Subfactorial)
This counts permutations where every object moves from its starting position. The inclusion-exclusion logic works like this:
- Start with all permutations.
- Subtract permutations where at least one element is fixed:
- Add back permutations where at least two elements are fixed (you subtracted these twice):
- Continue alternating signs until you've accounted for all overlaps.
A quick approximation: , rounded to the nearest integer. This becomes increasingly accurate as grows. For small values: , , , , .
Partial Derangements
This counts arrangements where exactly objects stay fixed and the rest are deranged. The logic is a two-step process:
- Choose which objects remain fixed: ways.
- Derange the remaining objects: ways.
This is the formula you need when a problem asks something like "how many arrangements of have exactly 2 items in their original positions?"
Compare: Full derangements vs. partial derangements: requires every object to move, while allows exactly fixed points. If a problem says "no object in its original position," use . If it says "exactly objects fixed," use .
Restricted and Structured Permutations
These concepts handle constraints, ordering systems, and more complex counting scenarios.
Permutations with Forbidden Positions
There's no single clean formula here. Instead, you choose a strategy based on the problem:
- Complementary counting often works best for simple restrictions: calculate total arrangements minus arrangements that violate the restriction. For example, "arrangements of where 1 is not first" = .
- Inclusion-exclusion handles multiple restrictions by accounting for overlaps between forbidden cases. If elements , , and each have one forbidden position, you subtract cases where each violates its restriction, add back cases where pairs violate simultaneously, and subtract the triple overlap.
- Rook polynomials provide a systematic approach for complex forbidden-position problems on a grid, where you're placing non-attacking rooks on allowed squares.
Lexicographic Order
Lexicographic order arranges permutations by comparing elements left-to-right, just like alphabetizing words. For , the order is: 123, 132, 213, 231, 312, 321.
Finding the th permutation uses factorial decomposition:
- Determine the first element by computing (adjusting for 0-indexing).
- Use the remainder to determine the second element by dividing by .
- Continue until all positions are filled.
Counting predecessors tells you a permutation's rank, which is useful for encoding permutations as single integers.
Compare: Forbidden positions vs. lexicographic order: both add structure to permutation counting, but forbidden positions restrict which arrangements are valid, while lexicographic order organizes all valid arrangements systematically. One reduces your count; the other indexes it.
Permutation Structure and Properties
Understanding the internal structure of permutations reveals deeper patterns and connects to abstract algebra.
Inversions in Permutations
An inversion is a pair where but the element at position is greater than the element at position . The inversion count measures how "out of order" a permutation is.
- The identity permutation has 0 inversions.
- The reverse permutation has inversions, the maximum possible.
- Sorting algorithms like bubble sort perform exactly as many adjacent swaps as there are inversions.
For example, the permutation has two inversions: and .
Permutation Groups and Cycle Notation
Cycle notation writes a permutation as disjoint cycles. For instance, means , , , and , . Elements not appearing in any cycle are fixed points.
Permutation composition combines two permutations by applying them in sequence. The set of all permutations of elements forms the symmetric group , which is a central object in abstract algebra.
The cycle type of a permutation determines key properties. Most importantly, the order of a permutation (the number of times you must apply it to return to the identity) equals the LCM of its cycle lengths. For , the cycle lengths are 3 and 2, so the order is .
Compare: Inversions vs. cycle notation: both analyze permutation structure, but inversions count disorder (useful for sorting analysis), while cycles describe movement patterns (useful for algebra and repeated application). Know which tool fits your problem.
Quick Reference Table
| Concept | Formula |
|---|---|
| Basic ordered selection | |
| Selection with replacement | |
| Identical objects | (multinomial) |
| Circular arrangements | or with reflections |
| No fixed points | |
| Exactly fixed points | |
| Measuring disorder | Inversion count |
| Algebraic structure | Cycle notation, permutation groups |
Self-Check Questions
-
You're arranging 5 people in a line versus around a circular table. Which formula applies to each, and why does the circular case give fewer arrangements?
-
The word "BANANA" has 6 letters. Why can't you just use to count its arrangements, and what's the correct formula?
-
Compare and : what real-world scenario would use each formula?
-
If you're asked to count permutations of where exactly 2 elements remain in their original positions, which formula do you need and what's your setup?
-
A problem asks: "How many arrangements of have the property that 1 is not in position 1 and 2 is not in position 2?" Explain why you'd use inclusion-exclusion rather than a single formula.