Monday, June 29, 2009

Solution to the hats puzzle...

So here's the solution which seriously took me all day to come up with. Because I'm pathetic. (I kept forgetting about the clock strikes, which really is the key here.)

So... after she makes the statement "I see at least one red hat", the clock strikes 14 times without anyone doing anything, and then on the 15th time, all 15 people with red hats get up and leave.

This is why:

If there was only one person with a red hat, he would know it was him immediately after she made the statement because he would look around and see all blue hats. So as soon as the clock stuck, he would leave. BUT, if there were 2 people with red hats, they would each look around and see one person with a red hat, and thus would be able to make no conclusion about the color of their own. Then, however, the clock would strike once and no one would leave because the 2 people with red hats were not able to conclude they had red hats on. However, as soon as this happened they would realize "well that guy with a red hat must be seeing another red hat, because otherwise he would have left, and since I can only see a bunch of blue hats, and him, I must have a red hat as well," so the second time the clock struck, they would both leave. If there were 3 people with red hats, they would each look around and see two others, and following the same reasoning, they would assume both of these people would leave on the second strike. When they didn't, each would conclude "well, those two others must EACH be seeing two red hats, and since I only see two, I must be the other one" so on the third clock strike they would all 3 leave. So it just continues all the way up to 15.

Cool, huh. Of course, in real life they would sit around talking about Michael Jackson and completely forget about the hats...

Anyway, it's just interesting because the guest didn't tell anyone anything they didn't already know, and yet as soon as she made her statement she set off a chain reaction (assuming these are all logic-minded individuals or math nerds or whatnot) so that they would all leave after the 15th clock strike.

That's all.

S

4 comments:

Anonymous said...

This doesn't make sense to me...what role does the woman and saying her line play?

Dave Przy said...

Thanks for posting the answer and making it easy to find using Google. I saw the same question with no answer on The Futility Closet. I guess it's a commentary on me, the world, or something, that my logical progression is, "If I can't think it up right away, the next step is to Google it."

Charlotte said...

so... i don't think the woman has to come in and say anything either. they can all look around and see more than one red hat.

JM said...

It's all about the induction. If there was only 1 red hat, then the person wearing it wouldn't leave until the woman came in and made her statement, because they would look around and see all blue hats and they would have no idea if their hat were red or blue. When she came in and said "there is at least one red hat" they would know their hat wad red because they couldn't see any other red ones, and then they would leave. So without her statement, they can't logically build up from the limiting case of only 1 red hat to 15. So even though she provides no new information, she's still necessary or else nothing will happen.