Subjects combinatorics

Derangement Recurrence

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. State the problem and recall Exercise 18. From Exercise 18 we have the explicit formula for derangements. $$D_n = n! \sum_{k=0}^n \frac{(-1)^k}{k!}$$ 2. Write the formula for $D_{n-1}$ and explain the plan. By replacing $n$ with $n-1$ we get an expression for $D_{n-1}$ which we will multiply by $n$ to compare with $D_n$. $$D_{n-1} = (n-1)! \sum_{k=0}^{n-1} \frac{(-1)^k}{k!}$$ 3. Multiply $D_{n-1}$ by $n$. Multiplying both sides by $n$ gives the following expression which shares the same factorial factor as $D_n$. $$n D_{n-1} = n! \sum_{k=0}^{n-1} \frac{(-1)^k}{k!}$$ 4. Subtract to find the difference. Compute $D_n - n D_{n-1}$ to isolate the remaining term from the sum in $D_n$. $$D_n - n D_{n-1} = n! \left(\sum_{k=0}^n \frac{(-1)^k}{k!} - \sum_{k=0}^{n-1} \frac{(-1)^k}{k!}\right)$$ 5. Simplify the expression by canceling common terms. All terms with $k=0,1,\dots,n-1$ cancel, leaving only the $k=n$ term. $$D_n - n D_{n-1} = n! \frac{(-1)^n}{n!} = (-1)^n$$ 6. Conclude with the desired recurrence. Therefore the recurrence holds for all $n\ge 1$ and we have shown $$D_n = n D_{n-1} + (-1)^n$$.