A derangement is a permutation where no element occupies its original position. The count D(n) = n![1 - 1/1! + 1/2! - 1/3! + ... + (-1)^n/n!]. Memorize small values: D(1)=0, D(2)=1, D(3)=2, D(4)=9, D(5)=44, D(6)=265. The recurrence D(n) = (n-1)[D(n-1) + D(n-2)] is useful for computation. The probability of a random permutation being a derangement approaches 1/e as n grows. JEE applications: letters in wrong envelopes, students in wrong seats, coded messages. Partial derangements (exactly k items in correct positions) use C(n,k) * D(n-k).
Part of ALG-07 — Permutations & Combinations
Derangements
Want to generate AI summaries of your own documents? NoteTube turns PDFs, videos, and articles into study-ready summaries.
Sign up free to create your own