maths.freeCombinatorics & 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\)1234
\(\sigma(i)\)2413
\(i\)1234
\(\tau(i)\)2431

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

\sum_{k=1}^{n} a_k
summation
Add a_k for k = 1 up to n.
\binom{n}{k}
binomial coefficient, "n choose k"
Number of k-element subsets of n things: n!/(k!(n−k)!).
n!
factorial
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
x \in A,\ A \subseteq B
element of, subset
x belongs to A; every element of A is in B.
\sigma,\ s,\ \sigma^2
standard deviation, sample s.d., variance
Typical distance from the mean; its square.
f'(x),\ \frac{dy}{dx}
derivative
Instantaneous rate of change; slope of the graph.
e
Euler's number
2.71828…, the base whose exponential is its own derivative.
i
imaginary unit
i² = −1.
\neq
not equal
The two sides are different.
\prod_{k=1}^{n} a_k
product
Multiply a_k for k = 1 up to n.
\emptyset,\ |A|
empty set, cardinality
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