Proof of the formula for the number of derangements by inclusion–exclusion
Builds on DerangementPermutationInclusion–exclusion principleNumber of permutationsNumber of k-element subsetsFactorial formula for binomial coefficientsComplement principleFactorialBijection principle
Proof
We apply the inclusion–exclusion principle to the permutations that fix a given point.
- Let be a set with elements. Choose a bijection , where .
- The map is a bijection from the permutations of to those of . Its inverse is .
- We have exactly when . So this bijection sends derangements to derangements, in both directions.
- By the bijection principle, it suffices to count the derangements of .
- If , the only permutation of is the empty map. It has no fixed point, so . The formula gives . From now on let .
- Let be the set of permutations of . By the number of permutations, .
- For , let . A permutation is a derangement exactly when it lies in no .
- So the derangements form the complement of in . By the complement principle, .
- Let have elements, and let , the permutations that fix every point of . We claim .
- Let and . If , then with , against injectivity. So maps into itself.
- This restriction is injective. It is also surjective: if and , then , since otherwise .
- So restriction is a map from to the permutations of . Its inverse extends a permutation of by the identity on .
- Hence is in bijection with the permutations of an -element set. By the number of permutations, .
- By the number of -element subsets, there are sets with elements. By the factorial formula, .
- The inclusion–exclusion principle, with terms grouped by , gives
- By step 8, and since by the definition of the factorial,
Idea
A derangement is a permutation that avoids every set of permutations fixing . The permutations that fix given points are just the permutations of the other points, so inclusion–exclusion has easy terms. They simplify to .
Reading path
To understand this page from the ground up, read these 67 pages in order. The foundations come first. The path takes the proofs Proof of the number of k-element subsets by induction, Proof that a composition of injections is injective, Proof that a function is bijective iff it has a two-sided inverse, Proof of the complement principle, Proof of the number of injections, Proof of Pascal's rule from the recursive definition, Proof that a composition of surjections is surjective, Proof of the alternating sum of binomial coefficients from the binomial theorem, Proof of the inclusion–exclusion principle by counting each element, Proof of the factorial formula for binomial coefficients by induction, Proof of the binomial theorem by induction, Proof of the rule of sum, Proof of the number of permutations by counting injections, Proof of the bijection principle.
- Binomial coefficient definition
- Cardinality of a finite set definition
- Combination definition
- Double counting concept
- Element definition
- Factorial definition
- Falling factorial definition
- Group concept
- Permutation definition
- Proposition concept
- Proof of Pascal's rule from the recursive definition proof
- Set definition
- Ring definition
- Derangement definition
- Conjunction definition
- Implication definition
- Predicate definition
- Pascal's rule statement
- Empty set object
- Ordered pair definition
- Commutative ring definition
- Intersection definition
- Existential quantifier definition
- Universal quantifier definition
- Proof of the factorial formula for binomial coefficients by induction proof
- Cartesian product definition
- Disjoint sets definition
- Subset definition
- Uniqueness quantifier definition
- Factorial formula for binomial coefficients statement
- Binary relation definition
- Proof of the binomial theorem by induction proof
- Function definition
- Binomial theorem statement
- Codomain definition
- Function composition definition
- Identity function definition
- Injective function definition
- Restriction of a function definition
- Proof of the alternating sum of binomial coefficients from the binomial theorem proof
- Surjective function definition
- Left inverse definition
- Right inverse definition
- Proof that a composition of injections is injective proof
- Alternating sum of binomial coefficients statement
- Proof that a composition of surjections is surjective proof
- Bijective function definition
- Composition of injections is injective statement
- Composition of surjections is surjective statement
- Proof of the rule of sum proof
- Proof that a function is bijective iff it has a two-sided inverse proof
- Rule of sum statement
- Bijective iff it has a two-sided inverse statement
- Inclusion–exclusion for two sets statement
- Proof of the complement principle proof
- Proof of the bijection principle proof
- Complement principle statement
- Bijection principle statement
- Proof of the number of k-element subsets by induction proof
- Proof of the number of injections proof
- Number of k-element subsets statement
- Number of injections statement
- Proof of the inclusion–exclusion principle by counting each element proof
- Proof of the number of permutations by counting injections proof
- Inclusion–exclusion principle statement
- Number of permutations statement
- Proof of the formula for the number of derangements by inclusion–exclusion proof
Where this leads
2 pages build on this one.
Further reading
- Web https://en.wikipedia.org/wiki/Derangement, Derivation by inclusion–exclusion principle
About this page
| Tag | 67S4PPN54V |
|---|---|
| URI | m2://67S4PPN54V |
| Kind | proof |
| Writing | W0 stub |
| MSC | 05A05 |
| Proves | Formula for the number of derangements |
| Uses | Derangement, Permutation, Inclusion–exclusion principle, Number of permutations, Number of k-element subsets, Factorial formula for binomial coefficients, Complement principle, Factorial, Bijection principle |
| Changed | 4 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.