Derangements (#88)
import /Freeks/5.book
1 Preliminaries
Three proofs of Freek #88 (the number of derangements). This section and the next give the proof via the recurrence \(\mathrm{der}(n+2) = (n+1)(\mathrm{der}(n+1) + \mathrm{der}(n))\), which the later two proofs also use.
\(\mathrm{der}(n)\) is the number of derangements (permutations moving every element) of a set of \(n\) elements.
word(s,s)F …
\(\mathrm{der}\)AxD …
\(\operatorname{\#} X = n \in \mathbb{M} \Longrightarrow \operatorname{\#} ( \{ f \in X \stackrel{\rm IS}\to X \mid f \cap \text{id} _ X = \emptyset \} ) = \mathrm{der} ( n )\) Being disjoint from the identity function (every point moves) means not containing \(w \mapsto w\).
Lid∅ …
\(f \cap \text{id} _ X = \emptyset \Longleftrightarrow \forall w \in X . \langle w , w \rangle \notin f\) \(\blacktriangleleft\) \(\mathbb{W}.\)The set of derangements is a subset of the set of all bijections \(X \to X\), whose number \(n!\) is a natural number. The number of a subset is also a natural number, so \(\mathrm{der}(n)\) is a natural number.
der∈𝕄 …
\(n \in \mathbb{M} \Longrightarrow \mathrm{der} ( n ) \in \mathbb{M}\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,Axℤ ,ax_s ,AxD ,!∈𝕄 ,→IS=#! ,L⊂# ,#. ,=_.Let \(z \in X\). The collection of all derangements of \(X\), \(S\), is a set; if the part for each destination of \(z\), \(a \in X \setminus \{z\}\), has \(q\) elements, then \(S\) has \(q \cdot k\) elements (Lfib).
A set with \(0\) elements (the empty set) has only the empty function as a derangement, so \(\mathrm{der}(0) = 1\).
der0 …
\(\mathrm{der} ( 0 ) = 1\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,Axℤ ,ax_s ,der∈𝕄 ,der=# ,#1The only permutation of a set with \(1\) element is the identity, so there is no derangement and \(\mathrm{der}(1) = 0\).
der1 …
\(\mathrm{der} ( 1 ) = 0\) \(\blacktriangleleft\) ⋅𝕄:D ,⋅0X ,\(\mathbb{W}.\) ,Axℤ ,ax_s ,der∈𝕄 ,der=# ,LD ,#1Given a set of \(n+2\) elements, \(X\), take a point \(z\); count by each destination \(a\) with LF and sum up with LD.