Question
Find the number of ways to arrange distinct objects such that no object is in its original position (derangement). Compute and explicitly.
(JEE Advanced 2021, similar pattern)
Solution — Step by Step
Let = set of permutations where element IS in its original position. We want the number of permutations where NO element is in its original position:
By inclusion-exclusion:
= permutations fixing element = . There are such terms.
= permutations fixing both and = . There are terms.
In general: for fixed elements.
Since :
Why This Works
The formula is a direct application of inclusion-exclusion. We start with all permutations and subtract those where at least one element is fixed. The alternating sum corrects for over-counting — permutations with two fixed points get subtracted twice, so we add them back, and so on.
As grows large, approaches — so roughly 36.8% of all permutations are derangements, regardless of how large is. This is a surprising and elegant result.
The small values worth memorising: , , , , .
Alternative Method — Recurrence relation
Derangements satisfy two useful recurrences:
The first says: element 1 goes to position ( choices). Then either element goes to position 1 (and the remaining elements form a derangement: ), or element does NOT go to position 1 (equivalent to a derangement of elements: ).
For JEE, the derangement formula is frequently tested in disguised forms: “letters in wrong envelopes,” “hats returned to wrong people,” “matching problems.” Whenever a problem says “no element in its correct position,” think derangement. The formula can be quickly computed for small .
Common Mistake
Students sometimes confuse with “number of permutations with at least one element NOT in its position” — which is almost all permutations ( for ). Derangements require that ALL elements are displaced, not just some. The question phrasing matters: “no element in its original position” means derangement, while “at least one element displaced” is a different (and much simpler) problem.