Guessing Hats 3
Previous puzzle in this series
The king’s challenges are growing crueller. This time, three wise men stand in a room, each wearing either a black or white hat chosen at random by a coin flip. Each wise man can see the other two hats, but not their own.
There is no sequential questioning this time. All three wise men must act at the same moment: each one either guesses their own hat colour or passes. No communication is allowed once the hats are placed — no words, no gestures, no signals of any kind.
The wise men survive if at least one of them guesses correctly and nobody guesses incorrectly. If anyone guesses wrong, they all die. If everyone passes, they all die.
The night before, the wise men can agree on a strategy. What strategy maximises their probability of survival?
Naive strategy 1
Let’s start with a naive strategy: everyone guesses randomly. What’s the chance of them surviving?
Solution
If everyone guesses, then all 3 wise men would have to guess their hat colour correctly. This is a 50% chance per wise man, resulting in a probability of (1/2)3=12.5%.
Thankfully, we can do better.
Naive strategy 2
Let’s try another strategy: one person is designated to guess. What’s the chance of them surviving?
Solution
This is reduced to a coin-flip: the guesser would have a 50% chance to get his hat colour correctly.
Thankfully, we can still do better.
Hint
Unfortunately, there isn’t a way to achieve a 100% chance of survival.
Hint
There are 8 equally likely hat configurations. Can you design a strategy where the group only loses on a small number of them?
Hint
Hmm... it seems that in 6 of the 8 possible hat configurations, there’s always a hat that’s a different colour from the other 2. I wonder if we can do something with it.
Solution
The group can achieve a 75% survival rate.
The strategy: each wise man looks at the other two hats. If both hats are the same colour, guess the opposite colour. If the two hats are different colours, pass.
Let’s work through why this achieves 75%. There are 23=8 equally likely hat configurations. We can list them all, writing B for black and W for white:
| P1 | P2 | P3 | What happens |
|---|---|---|---|
| B | B | B | All three see two matching hats, all guess white. All wrong — group loses. |
| B | B | W | P3 sees BB, guesses white — correct. P1 and P2 see one of each, both pass. Group wins. |
| B | W | B | P2 sees BB, guesses white — correct. P1 and P3 pass. Group wins. |
| W | B | B | P1 sees BB, guesses white — correct. P2 and P3 pass. Group wins. |
| W | W | B | P3 sees WW, guesses black — correct. P1 and P2 pass. Group wins. |
| W | B | W | P2 sees WW, guesses black — correct. P1 and P3 pass. Group wins. |
| B | W | W | P1 sees WW, guesses black — correct. P2 and P3 pass. Group wins. |
| W | W | W | All three see two matching hats, all guess black. All wrong — group loses. |
The group wins in 6 out of 8 cases: a 75% survival rate.
Notice the pattern: the strategy loses only when all three hats are the same colour. In every other configuration, exactly one wise man is the “odd one out” — their hat differs from the other two. That wise man sees two matching hats and correctly guesses the opposite. The other two wise men see mismatched hats and safely pass.
Try These Next
The Buried Cable
The enemy has run a communication cable in a straight line somewhere beneath a square plot of land, 1 km on each side. The cable's exact position and direction...
Two Gloves and Three Patients
You’re a surgeon in a remote clinic when three patients arrive requiring emergency operations. Supplies are running low—you rummage through the stockroom but...
Two-Bullet Russian Roulette
After offending the toughest guy, Big Billy, at the saloon, he challenges you to a game of Russian Roulette. He takes out a revolver with 6 chambers and loads...