Five people check five hats and the hats are returned in a uniformly random order. What is the probability that exactly two people get their own hat back?
Five people check five hats and the hats are returned in a uniformly random order. What is the probability that exactly two people get their own hat back?
Approach: Choose which two people are matched, then require the remaining three hats to form a derangement so that no further matches occur, and divide by the total number of permutations.
1/6. Choose the two fixed points in C(5,2) = 10 ways, then the other three hats must form a derangement of three items, and D_3 = 2. The count is 10 * 2 = 20 out of 5! = 120, giving 20/120 = 1/6 = 0.1667. The requirement that the remaining three are deranged is the step people drop, and without it the count would double-count arrangements with three or more matches. In general P(exactly k fixed points) = C(n,k) D_{n-k}/n!, which tends to the Poisson limit e^{-1}/k! as n grows. At five hats the Poisson value for two matches is 0.1839, already within 10% of 1/6.
Follow-up: What is the expected number of fixed points conditional on there being at least one?
Key concepts: derangement, fixed points, poisson limit, combinatorial counting.