Explore modules

Derangements and Fixed Points

Count unchanged positions in a uniform random permutation and see why one missing match is impossible.

Free theory article

Count unchanged positions in a uniform random permutation and see why one missing match is impossible.

Concept & interpretation

A fixed point in a permutation is an element that remains in its original position. A derangement is a permutation with absolutely no fixed points. The number of derangements of n elements, denoted Dn, is the basis for determining the probability mass of any specific number of fixed points k in a uniform random permutation.

Experiment

To verify this in the Derangements and Fixed Points module:

  1. Set the Permutation size control to 4.
  2. Set the Fixed points probe control to 2.
  3. Observe the mass exactly matches 1/4 (0.25) in the scrollable count table.
  4. Notice the Derangements D(n) count is 9 and Permutations n! is 24.
  5. Change the Fixed points probe to 3, and confirm the mass is 0.
Read the full free theory article