upgrade
upgrade

🧮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.

Get Started

Why This Matters

Permutation formulas are the backbone of counting problems where order matters—and 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 P(n,r)=n!(nr)!P(n,r) = \frac{n!}{(n-r)!} 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. Master these formulas, and you'll have a toolkit for tackling any arrangement problem thrown at you.


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

  • P(n,r)=n!(nr)!P(n,r) = \frac{n!}{(n-r)!}—counts arrangements of rr objects selected from nn distinct objects where order matters
  • Factorial notation represents successive multiplication: you have nn choices for the first position, (n1)(n-1) for the second, down to (nr+1)(n-r+1) for the last
  • Use this when each object can only be used once and every object is distinguishable from the others

Permutations with Repetition

  • nrn^r—applies when you can reuse objects, giving nn independent choices for each of rr positions
  • Each position is independent, meaning your choice for one slot doesn't affect options for another
  • Classic examples include PIN codes, license plates, and any scenario where "replacement" is allowed

Compare: Basic permutations vs. permutations with repetition—both count ordered arrangements, but repetition allows reuse (nrn^r) while basic permutations don't (n!(nr)!\frac{n!}{(n-r)!}). If a problem mentions "with replacement" or "can repeat," you want nrn^r.


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

  • n!n1!n2!nk!\frac{n!}{n_1! \cdot n_2! \cdot \ldots \cdot n_k!}—the multinomial coefficient for arranging nn objects when groups of size n1,n2,,nkn_1, n_2, \ldots, n_k are identical
  • Dividing by 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"—you divide by 4!4! for the S's, 4!4! for the I's, and 2!2! for the P's

Circular Permutations

  • (n1)!(n-1)!—counts arrangements of nn objects in a circle where rotations are considered identical
  • Fixing one object breaks the rotational symmetry, reducing the problem to arranging (n1)(n-1) remaining objects linearly
  • Watch for reflections: if the circle can be flipped (like a bracelet vs. a fixed table), divide by 2 to get (n1)!2\frac{(n-1)!}{2}

Compare: Indistinguishable objects vs. circular permutations—both divide to correct overcounting, but for different reasons. Identical objects create internal redundancy; circular arrangements create positional equivalence through rotation. 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)

  • !n=n!i=0n(1)ii!!n = n! \sum_{i=0}^{n} \frac{(-1)^i}{i!}—counts permutations where every object moves from its starting position
  • Inclusion-exclusion alternates between adding and subtracting: start with all permutations, remove those with at least one fixed point, add back those with at least two, and so on
  • Quick approximation: !nn!e!n \approx \frac{n!}{e}, which becomes increasingly accurate as nn grows

Partial Derangements

  • D(n,k)=(nk)!(nk)D(n,k) = \binom{n}{k} \cdot !(n-k)—counts arrangements where exactly kk objects stay fixed and the rest are deranged
  • Two-step process: first choose which kk objects remain fixed ((nk)\binom{n}{k}), then derange the remaining (nk)(n-k) objects
  • Useful for problems asking "how many arrangements have exactly 2 items in their original positions?"

Compare: Full derangements vs. partial derangements—!n!n requires every object to move, while D(n,k)D(n,k) allows exactly kk fixed points. If a problem says "no object in its original position," use !n!n; if it says "exactly kk objects fixed," use D(n,k)D(n,k).


Restricted and Structured Permutations

These concepts handle constraints, ordering systems, and algebraic properties of permutations.

Permutations with Forbidden Positions

  • Complementary counting often works best: calculate total arrangements minus arrangements that violate the restriction
  • Inclusion-exclusion handles multiple restrictions by accounting for overlaps between forbidden cases
  • Rook polynomials provide a systematic approach for complex forbidden-position problems on a grid

Lexicographic Order

  • Dictionary ordering arranges permutations by comparing elements left-to-right, just like alphabetizing words
  • Finding the kkth permutation uses factorial decomposition: determine each position by dividing kk by (n1)!(n-1)!, (n2)!(n-2)!, etc.
  • Counting predecessors tells you a permutation's rank—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 (i,j)(i, j) where i<ji < j but the element at position ii is greater than the element at position jj
  • Inversion count measures how "out of order" a permutation is—the identity permutation has 0 inversions; the reverse has (n2)\binom{n}{2}
  • Sorting algorithms like bubble sort perform exactly as many swaps as there are inversions

Permutation Groups and Cycle Notation

  • Cycle notation writes a permutation as disjoint cycles: (1 3 2)(4 5)(1\ 3\ 2)(4\ 5) means 13211 \to 3 \to 2 \to 1 and 4544 \to 5 \to 4
  • Permutation composition combines two permutations by applying them in sequence, forming a group structure
  • Cycle type determines key properties: the order of a permutation equals the LCM of its cycle lengths

Compare: Inversions vs. cycle notation—both analyze permutation structure, but inversions count disorder (useful for sorting), while cycles describe movement patterns (useful for algebra and repeated application). Know which tool fits your problem.


Quick Reference Table

ConceptBest Formulas/Examples
Basic ordered selectionP(n,r)=n!(nr)!P(n,r) = \frac{n!}{(n-r)!}
Selection with replacementnrn^r
Identical objectsn!n1!n2!nk!\frac{n!}{n_1! \cdot n_2! \cdots n_k!} (multinomial)
Circular arrangements(n1)!(n-1)! or (n1)!2\frac{(n-1)!}{2} with reflections
No fixed points!n!n (derangement/subfactorial)
Exactly kk fixed pointsD(n,k)=(nk)!(nk)D(n,k) = \binom{n}{k} \cdot !(n-k)
Measuring disorderInversion count
Algebraic structureCycle notation, permutation groups

Self-Check Questions

  1. 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?

  2. The word "BANANA" has 6 letters. Why can't you just use 6!6! to count its arrangements, and what's the correct formula?

  3. Compare P(10,3)P(10, 3) and 10310^3: what real-world scenario would use each formula?

  4. If you're asked to count permutations of {1,2,3,4,5}\{1, 2, 3, 4, 5\} where exactly 2 elements remain in their original positions, which formula do you need and what's your setup?

  5. A problem asks: "How many arrangements of {1,2,3,4}\{1, 2, 3, 4\} 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.