Math 2.0

statement theorem

Formula for the number of derangements

Statement

Let nn be a natural number, and let DnD_n be the number of derangements of an nn-element set. Then Dn=n!∑k=0n(−1)kk!=∑k=0n(−1)kn!k!.D_n = n! \sum_{k=0}^{n} \frac{(-1)^k}{k!} = \sum_{k=0}^{n} (-1)^k \frac{n!}{k!}.

Remarks

For n=4n = 4: 24−24+12−4+1=924 - 24 + 12 - 4 + 1 = 9. The proof applies the inclusion–exclusion principle to the sets AiA_i of permutations that fix ii. The sum is a partial sum of the series of e−1e^{-1}. Thus Dn/n!→1/eD_n / n! \to 1/e, and for n≥1n \ge 1, DnD_n is the integer nearest to n!/en!/e.

Explanations

L1 human

Start with all n!n! permutations. Remove those that fix some point, add back those that fix two points, and so on. The result is the alternating sum in the formula.

What this node 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 node is. They do not measure its truth.

What this needs

To read this node, read these 5 nodes in this order. The foundations come first, and the list ends with this node.

Each node uses the nodes above it. The colour of the bar on a box shows the evidence level, and the box also gives it as text. The list below has the same nodes.
  • no evidence level
  1. Factorial definition
  2. Number of derangements definition
  3. Permutation definition
  4. Derangement definition
  5. Formula for the number of derangements statement

Sources

  1. Web https://en.wikipedia.org/wiki/Derangement, Derivation by inclusion–exclusion principle