No. of ways to shuffle a card

78 Views Asked by At

How many ways are there to shuffle N cards such that exactly one card is in the same position?(Assuming that initially the card no. 1 is in the first position,card no.2 is in the second position and so -on).

My attempt:Initially I counted no. of ways for small values of N by brute force.But I'm thinking that it can be solved using permutation and combination(along with inclusion-exclusion principle)but don't know how to apply it.

1

There are 1 best solutions below

0
On

There are $N$ possibilities for the card that stays in the same position. The other $N-1$ cards are shuffled such that they all appear in a different place. This is called a derangement. Using the formula in the link, we get the answer $N\left[\frac{(N-1)!}{e}\right]$.