Lably
Skip to content

Derangement

Type of permutation of a set of elements

  • 6 min read
  • 5 chapters

Related on Lably

Through Combinatorics, Mathematics and Permutation

The number of derangements of a set of size n is known as the n th derangement number or the subfactorial of n or n th de Montmort number (after Pierre Remond de Montmort). Notations for subfactorials in common use include Dn, dn, !n, or n¡ .

For n > 0 , the subfactorial Dn equals the nearest integer to ⁠n!/e⁠, where n! denotes the factorial of n and e ≈ 2.718281828... is Euler's number.

The problem of counting derangements was first considered by Pierre Raymond de Montmort in his Essay d'analyse sur les jeux de hazard in 1708; he solved it in 1713, as did Nicholas Bernoulli at about the same time.

Example

Suppose that a professor gave a test to 4 students – A, B, C, and D – and wants to let them grade each other's tests. How many ways could the professor hand the tests back to the students for grading, such that no student receives their own test back? Out of 24 possible permutations (4!) for handing back the tests,

there are only 9 derangements (shown in blue italics above). In every other permutation of this 4-member set, at least one student gets their own test back (shown in bold red).

Another version of the problem arises when we ask for the number of ways n letters, each addressed to a different person, can be placed in n pre-addressed envelopes so that no letter appears in the correctly addressed envelope.

Sign in to keep reading

4 more chapters are free with a Lably account.

More in Calculus and analysis