Mathematical foundation
A derangement is a permutation with zero fixed points. The recurrence Dₙ=(n−1)(Dₙ₋₁+Dₙ₋₂) builds the count from smaller cases.
The operation is a compact expression of the derangement definition above.
Count permutations in which no object remains in its original position. The calculation trail makes the reported derangements easier to reproduce.
It models shuffled assignments where nobody receives their own item, misplaced letters, and complete reassignment constraints.
A derangement is a permutation with zero fixed points. The recurrence Dₙ=(n−1)(Dₙ₋₁+Dₙ₋₂) builds the count from smaller cases.
The operation is a compact expression of the derangement definition above.
For seven objects, D₇=1,854. Dividing by 7!=5,040 gives a probability near 0.3679 for a uniformly random permutation. This Derangement example can be compared with all permutations.
Objects and original positions must be distinct. The nearest-integer approximation n!/e is useful for scale but the recurrence provides the exact result. If the Derangement assumptions do not fit, consider derive the restriction.
Review the sign, scale, and unit of derangements after entering distinct object count.
Begin with D₀=1 and D₁=0. Apply the recurrence successively until reaching the requested object count.
Source values may arrive in a different order from the form. Map them explicitly to distinct object count, normalize units, and retain enough precision for the next step after derangements.
The fraction Dₙ/n! approaches 1/e as n grows, although the exact counts remain integers. Watching this response separates a data-entry mistake from an unexpected but valid value.
Factorial counts every permutation; derangement excludes any permutation with one or more fixed positions. This page deliberately reports only the former interpretation.
If distinct object count are exact counts, more result digits may be meaningful than when they are measured approximations. Let the least certain source guide the final presentation.
Label the output as derangements in notes or tables. Store distinct object count beside it when the result will be reused in a later stage.
The Derangement formula describes a particular experiment built from Distinct object count. Write down whether the trial count is fixed, objects return after selection, events overlap, or outcomes are equally likely. Similar-looking numerical inputs can require different formulas when one assumption changes.
For Derangement, after calculation, translate the answer back into a sentence about the original event. That wording should distinguish exactly, at most, at least, all, and none; substituting one of those phrases for another changes the event rather than its formatting.
An object occupying its original position.
The only object cannot move elsewhere.
No, but rounding it gives the exact derangement for positive n.
One divided by e.