maths.free › Combinatorics & Graph Theory › 7. Inclusion-Exclusion › Derangements
Derangements
Now let's consider a situation where we can make use of the properties defined in . Fix a positive integer n and let X denote the set of all permutations on [n].
Derangements
Now let's consider a situation where we can make use of the properties defined in . Fix a positive integer \(n\) and let \(X\) denote the set of all permutations on \([n]\). A permutation \(\sigma\in X\) is called a derangement if \(\sigma(i)\neq i\) for all \(i=1,2,\dots,n\). For example, the permutation \(\sigma\) given below is a derangement, while \(\tau\) is not.
| \(i\) | 1 | 2 | 3 | 4 |
| \(\sigma(i)\) | 2 | 4 | 1 | 3 |
| \(i\) | 1 | 2 | 3 | 4 |
| \(\tau(i)\) | 2 | 4 | 3 | 1 |
If we again let \(P_i\) be the property that \(\sigma(i)=i\), then the derangements are precisely those permutations which do not satisfy \(P_i\) for any \(i=1,2,\dots,n\).
As before, the principal result of this section follows immediately from the lemma and the .
For example, \[\begin{aligned}d_5 \amp =\binom{5}{0}5!-\binom{5}{1}4!+\binom{5}{2}3!-\binom{5}{3}2!+ \binom{5}{4}1!-\binom{5}{5}0! \\ \amp =120-120+60-20+5-1 \\ \amp =44.\end{aligned}\]
It has been traditional to cast the subject of derangements as a story, called the Hat Check problem. The story belongs to the period of time when men wore top hats. For a fancy ball, \(100\) men check their top hats with the Hat Check person before entering the ballroom floor. Later in the evening, the mischievous hat check person decides to return hats at random. What is the probability that all \(100\) men receive a hat other than their own? It turns out that the answer is very close to \(1/e\), as the following result shows.
Condensed — the full section is in Keller & Trotter, Applied Combinatorics.
Symbols used here
Add a_k for k = 1 up to n.
Number of k-element subsets of n things: n!/(k!(n−k)!).
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
x belongs to A; every element of A is in B.
Typical distance from the mean; its square.
Instantaneous rate of change; slope of the graph.
2.71828…, the base whose exponential is its own derivative.
i² = −1.
The two sides are different.
Multiply a_k for k = 1 up to n.
The set with no elements; the number of elements of A.
Questions people ask
Permutation or combination?
Ask whether order matters. A lock code is a permutation (order matters); a hand of cards is a combination (it does not).
What is a graph in this sense?
Dots (vertices) joined by lines (edges) — not a plot. Road maps, social networks and molecules are graphs; questions like "is there a route" and "how few colours" are graph theory.
ನಿಮ್ಮದೇ ಆದದ್ದನ್ನು ಪ್ರಯತ್ನಿಸಿ
Parts of this page are adapted from Keller & Trotter, Applied Combinatorics (CC BY-SA 4.0). Condensed and re-explained here; errors are ours.
ಇನ್ನಷ್ಟು Combinatorics & Graph Theory
The counting principlesPigeonhole principle and inclusion–exclusionBinomial coefficients and Pascal's triangleRecurrences and generating functionsGraphs: vertices, edges, degreesPaths, cycles, trees, Euler and HamiltonColouring and planar graphs