This week the #puzzle is: Can You Infer the Color of Your Hat? #logic #permutations
| Three game show contestants must work together to win a prize. They are shown a large bag that’s initially empty, and then they see three red hats and two white hats placed into the bag. At this point, the contestants are blindfolded. Each contestant then picks a hat at random from the bag and places it on their head. |
| One at a time, their blindfolds are removed and they can see the hats on the others’ heads—but not the hat on their own head. If they can, with absolute certainty, identify the color of the hat on their own head, then the game is over and all three contestants win a prize! Otherwise, they skip their turn, at which point the next contestant has their blindfold removed and the process continues. If all three contestants skip their turn, then no prize is won. While blindfolded, contestants can still hear the decisions of other contestants and can identify who said what. |
| Will the contestants always win the prize? If so, why? If not, why not? |
And for extra credit:
| Now, there are four game show contestants who must work together. They are shown a large bag that’s initially empty, and then they see R red hats, W white hats, and B blue hats placed into the bag, such that R, W, and B are each less than or equal to 4. Otherwise, the game is played as before. |
| For some triples (R, W, B), the contestants can always win. Among these, what is the greatest value of R + W + B? |

Can You Infer the Color of Your Hat? ![]()
Solution, possibly incorrect:
Let’s look at the cases:
- Contestant 1 sees 2 white hats. Therefore their own hat must be red.
- Contestant 1 does not see 2 white hats. Inconclusive.
- Contestant 2 sees contestant 3 wearing a white hat. Therefore their own hat must be red.
- Contestant 2 does not see contestant 3 wearing a white hat. Inconclusive.
- Contestant 3 knows, that they have a red hat.
Result: Yes, there will always be a contestant able to figure out the color of their own hat.
Let me also illustrate this with a table showing the different situations. There are 7 of them. XYZ means contestant 1 (C1) is wearing a hat with color X etc. (WWW isn’t possible.)
| Situation | C1 | C2 | C3 |
| RWW 🔴⚪⚪ | RED! | ||
| WRW ⚪🔴⚪ | ? | RED! | |
| RRW 🔴🔴⚪ | ? | RED! | |
| WWR ⚪⚪🔴 | ? | ? | RED! |
| RWR 🔴⚪🔴 | ? | ? | RED! |
| WRR ⚪🔴🔴 | ? | ? | RED! |
| RRR 🔴🔴🔴 | ? | ? | RED! |
And for extra credit:
R red hats, W white hats, B blue hats. Each number is at most 4. It is at least 0. (My guess is a maximal solution will actually have each number be at least 1.)
Each contestant picks a hat. There must be 4 hats.
WLOG:
Let’s look at the options written as RWB. So 444 means 4 hats of each color. Each row shows the options with the same sum.
| 444 | |||||||||
| 443 | |||||||||
| 442 | 433 | ||||||||
| 441 | 432 | 333 | |||||||
| 440 | 431 | 422 | 332 | ||||||
| 430 | 421 | 331 | 322 | ||||||
| 420 | 411 | 330 | 321 | 222 | |||||
| 410 | 320 | 311 | 221 | ||||||
| 400 | 310 | 220 | 211 |
The fiddler corresponds to 320, and we know the answer to that one.
My intuition is, that each contestant must be able to reduce the number of cases. Therefore there must be information enough in 3 hats to move forward. This could be ?30 or ?21. Let’s examine 430.
- C1 sees 3 white hats. Therefore their own hat must be red.
- C1 doesn’t see 3 white hats.
- C2 sees C3 and C4 wearing white hats. Therefore their own hat must be red.
- C2 doesn’t see C3 and C4 wearing white hats.
- C3 sees C4 wearing a white hat. Therefore their own hat must be red.
- C3 doesn’t see C4 wearing a white hat.
- C4 knows their own hat must be red.
So, updated:
The case with 421 is actually similar. C1 either sees 3 non-blue hats or not, etc.
I’m not sure how to choose a case with 8 hats and test it properly. So my guess is there are 7 hats.








