In how many ways can one write the elements 1, 2, 3, 4 in a sequence \( x_1, x_2, x_3, x_4 \) with \( x_i \neq i \) for all \( i \)?
Show Hint
For derangements, use the formula \( D_n = n! \left( 1 - \frac{1}{1!} + \frac{1}{2!} - \cdots \right) \) to find the number of ways elements can be arranged without being in their original positions.
Step 1: Understanding derangements.
This problem asks for the number of ways to arrange the elements 1, 2, 3, 4 in a sequence where no element appears in its original position. This is a classic derangement problem. Step 2: Applying the derangement formula.
The number of derangements \( D_n \) of \( n \) objects is given by:
\[
D_n = n! \left( 1 - \frac{1}{1!} + \frac{1}{2!} - \frac{1}{3!} + \cdots + \frac{(-1)^n}{n!} \right)
\]
For \( n = 4 \), we compute:
\[
D_4 = 4! \left( 1 - \frac{1}{1!} + \frac{1}{2!} - \frac{1}{3!} + \frac{1}{4!} \right) = 24 \left( 1 - 1 + \frac{1}{2} - \frac{1}{6} + \frac{1}{24} \right) = 10
\]
Step 3: Conclusion.
The correct answer is (B) 10, as the number of derangements of 4 elements is 10.