A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Derangements and Fixed-Point-Free Permutations

College Depth 93 in the knowledge graph I know this Set as goal
1topic build on this
423prerequisites beneath it
See this on the map →
Permutations and Ordered ArrangementsThe Inclusion-Exclusion Principle and CountingThe Multinomial Theorem and Multinomial Coefficients
combinatorics permutations

Core Idea

A derangement is a permutation where no element appears in its original position. The number of derangements D(n) satisfies the recurrence D(n) = (n-1)[D(n-1) + D(n-2)]. Derangements can be counted using the inclusion-exclusion principle.

How It's Best Learned

Start with small cases (n=2,3,4) and count derangements by hand. Then derive the formula using inclusion-exclusion.

Common Misconceptions

Explainer

You already know what a permutation is: a rearrangement of n objects. A derangement is a permutation with one extra restriction — no object is allowed to land back in its own original position. Think of it as a secret-Santa gift exchange where no one is allowed to draw their own name. Every possible assignment is a permutation of participants; a derangement is one where nobody gives a gift to themselves.

The count of derangements D(n) can be derived using the inclusion-exclusion principle you've studied. Let A_i be the set of permutations where element i *is* in its original position (a "fixed point"). We want to count permutations where none of the A_i events occur — the complement. Inclusion-exclusion gives D(n) = n! − C(n,1)(n−1)! + C(n,2)(n−2)! − ⋯, which simplifies to the elegant formula D(n) = n! · Σ (−1)k / k! for k = 0 to n. For large n, this sum converges to e⁻¹ ≈ 0.368, meaning roughly 37% of all permutations are derangements regardless of how large n grows.

There's also a satisfying recurrence: D(n) = (n − 1)[D(n − 1) + D(n − 2)]. You can derive it by considering where element 1 goes. It must go somewhere other than position 1 — say, position k. Now element k has two choices: go to position 1 (giving a derangement of the remaining n − 2 elements, contributing D(n − 2)) or not go to position 1 (effectively giving a derangement of n − 1 elements, contributing D(n − 1)). Since there are n − 1 choices for k, the total is (n − 1)(D(n − 1) + D(n − 2)).

Derangements appear throughout combinatorics in problems involving "forbidden positions." Any time you need to count arrangements where certain pairs are prohibited, the derangement framework generalizes naturally. The deeper lesson is how inclusion-exclusion turns a complicated constraint (nothing in its original slot) into a tractable alternating sum — and how a combinatorial identity and a limiting probability (1/e) can emerge from the same algebraic object.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionSine, Cosine, and Tangent RatiosTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionProbability Density Functions and Continuous DistributionsCumulative Distribution FunctionsContinuous Random VariablesProbability Density FunctionsExpected ValueLinearity of Expectation in CountingProbabilistic Method in CombinatoricsPermutations and Ordered ArrangementsDerangements and Fixed-Point-Free Permutations

Longest path: 94 steps · 423 total prerequisite topics

Prerequisites (2)

Leads To (1)