# Matching Hats Problem

1. Mar 15, 2004

### eku_girl83

Suppose that each of N men at a party throws his hat into the center of the room. The hats are first mixed up, and then each man randomly selects a hat. What is the probability that
a)none of the men selects his own hat?
b) exactly k of the men select their own hats?

It's difficult for me to think of this problem in the abstract...I always work better with actual numbers as opposed to variables.

Any help explaining this would be appreciated!
Thanks!!

2. Mar 15, 2004

If you like numbers better, try it for N = 1, and then N = 2, and then N = 3, etc., until you see a pattern.

3. Mar 15, 2004

### Damned charming :)

suppose there are four men, the probability none would select their own hat would
be
$$\frac34 * \frac23 *\frac12$$

this problem will be speed up with factorials where
4!= 4*3*2*1
3!= 3*2*1
etc

4. Mar 16, 2004

### matt grime

Have you done the inclusion exclusion principle? If so then P(no hats correct) = 1-P(at least one hat correct) and the second of those is easy to work out if you know Inc-exc