# Derangements: Definition

Derangements are permutations in which no object is returned to its original, right, or natural place. They are sometimes called complete permutations or rencontres numbers.

Another way of saying this is that a derangement is a permutation without fixed points. π(i) ≠ i for every i being permutated, where:

• π is the permutation,
• i is the objects being acted upon.

Note: Pi is fairly standard notation for permutations; any Greek letter is fair game, but in general pi is the one chosen across the board.

• There is no derangement possible for a set with one element; The set {a} cannot be written any other way.
• A set with two elements has just one derangement. For example, the derangement of {a, b} is {b, a}.
• For a set with three elements, there are two possible derangements. (If your set is {a, b, c}, then {b, c, a} and {c, a, b} are the two possibilities.

## Formula

The number of permutations of a set of n elements is given by n! (n factorial, or n · (n-1) · (n-2)…(1)). The number of derangements of a set of n elements, which we write Dn, is given by

This looks long and complicated, but a little calculus can reduce it to an equation that is very, very easy to use:

Where:

• The square bracket, [ ], is the ‘nearest integer function’, a function which rounds whatever is inside the brackets to the nearest integer.
• “e” is Euler’s number.

The number of derangements is sometimes also written as !n, and then is called the subfactorial.

## Examples of Derangements Problems

The formula above allows us to solve more involved questions like, “Six students placed their phones in one bag and then all grabbed one out randomly. What is the likelihood that no one would get his own phone?”

The number of possible permutations in this case is 6!, or 6 · 5 · 4 · 3 · 2 · 1= 720. The number of possible derangements is [6!/e], or 265. So the probability that no one would get their own phone is 265/720, or 36 percent.

## References

Cameron, Peter. Lectures on Derangements

Arrangements and Derangements