[net.puzzle] "Hats" puzzle -- **SPOILER** **SPOILER** **SPOILER** **SPOILER**

rcj@burl.UUCP (Curtis Jackson) (02/11/86)

In article <1645@hound.UUCP> 5125kaf@hound.UUCP (K.FRIEDMAN) writes:
>
>
>     Three men are in a room. The room has no mirrors and the three men
>are in a straight line such that the person in the back of the line
>can see the two people in front of him, the middle person can see
>only the person in front of him, and the person in front can't see
>anyone. Another person walks in with a bag containing 3 black hats
>and two red hats. The man pulls three hats at random out of the bag
>and places them randomly on the three men. He walks out of the room.
>The man in the back says,"I don't know what color hat I'm wearing."
>The man in the middle says,"I don't know what color hat I'm wearing, either."
>Now tell me what color hat the man in the front of the line is wearing
>and why.
>
This puzzle assumes that all 3 men are relatively equally intelligent.

The fact that the man in the back doesn't know what color hat he is wearing
rules out the possibility of both the front and the middle guys having
red hats -- that would instantly tell him that his (the back guy's) hat
had to be black.

If the guy in the middle saw that the guy in front had a red hat on,
he would know that his own hat had to be black -- otherwise the guy in
the back would have figured out that *he* had a black hat on.  Since the
guy in the middle still says that he doesn't know what color his hat
is, he must be seeing a black hat on the guy in front.
-- 

The MAD Programmer -- 919-228-3313 (Cornet 291)
alias: Curtis Jackson	...![ ihnp4 ulysses cbosgd mgnetp ]!burl!rcj
			...![ ihnp4 cbosgd akgua masscomp ]!clyde!rcj