# Spiked Math: MPF - Hats

by Greg Bernhardt
Tags: None
 Admin P: 8,341 Today is Math Puzzle Friday (MPF), Yay! Every Friday I'll describe a riddle, game, logic puzzle, etc., that I find interesting and want to share with you. Some of you will surely have heard of the puzzles discussed and may already know the solutions, but to those who haven't, I hope you find them enjoyable! Today's puzzle: Try to make sense of the above comic. Why did they all say damn at the same time? What ARE the odds? Why? How? What? Who? When? Where? Context: Okay fine! I'll provide some context. This is the hats puzzle for three people: "Three people enter the room, each with a hat on their head. There are two colors of hats: red and blue; they are assigned randomly. Each person can see the hats of the two other people, but they can't see their own hats. Each person can either try to guess the color of their own hat or pass. All three do it simultaneously, so there is no way to base their guesses on the guesses of others. If nobody guesses incorrectly and at least one person guesses correctly, they all share a big prize. Otherwise they all lose. One more thing: before the contest, the three people have a meeting during which they decide their strategy. What is the best strategy?" (Text source: http://www.relisoft.com/science/hats.html) Problem 1 (medium): Solve the hats puzzle for three people (i.e., maximize their chance of winning). Problem 2 (hard): Solve the hats puzzle for 2^N - 1 people. Recently, hat problems have become a hot topic in mathematics, ever since it was discovered that Hamming codes can be applied to the puzzle (this is a hint for a possible solution to Problem 2). Problem 3 (easier): The following puzzle (submitted by Florian) might be more manageable: "Four dwarfs are buried to the head in sand by some sadistic and cruel man, but he gives them a chance to escape the otherwise inescapable death, if one of them can find out the color of his hat. They are positioned as follows: A || B C D Above, A looks towards the wall ||, as do B, C and D. The wall is neither mirrored nor transparent, A sees exactly the wall and nothing else.Each dwarf has a hat on his head, there are 2 white hats and 2 black ones.The dwarfs cannot see their own hats, nor are they allowed to get it down from their head. Speaking, signaling with hands etc is not allowed, and punishable by instant death for everyone. Assuming that every dwarf thinks logically and every dwarf knows that the others think logically, who would know the color of his hat?" More...
 PF Patron P: 10,391 I don't even know where to begin to solve the easy one...
 Admin P: 21,693 Dwarfs are easy. B sees C&D, and if he doesn't know what the answer is, it means C&D don't have identical hats. So if B doesn't speak, C knows the color of his hat. A&D could be just Poles.
PF Patron
P: 10,391

## Spiked Math: MPF - Hats

Wait...can the dwarves look around? I thought they all faced the wall, meaning B couldn't see anyone, C sees only B, and D sees both.
P: 78
 Quote by Drakkith Wait...can the dwarves look around? I thought they all faced the wall, meaning B couldn't see anyone, C sees only B, and D sees both.
In that case C speaks up if D doesn't say anything.
 Admin P: 21,693 Sorry, I got them looking in the wrong direction. But the idea is still the same. If the one seeing two doesn't know the answer, the one seeing one knows what to say.
 PF Patron P: 10,391 Ah ok, it suddenly makes total sense. Thanks.

 Related Discussions Forum Feedback & Announcements 8 Science Comics 3 Science Comics 5 Science Comics 1 Science Comics 0