The Hats Are Back

Logic Level 3

Three people enter a room and have a red or blue hat placed on their head. They cannot see their own hat, but can see the other hats. The color of each hat is purely random. All hats could be red, or blue, or 1 blue and 2 red, or 2 blue and 1 red. They need to guess their own hat color by writing it on a piece of paper, or they can write "pass." They cannot communicate with each other in any way once the game starts. But they can have a strategy meeting before the game. If at least one of them guesses correctly they win $50,000 each, but if anyone guesses incorrectly they all get nothing. Using optimal strategy, what is the maximal percentage chance of winning that can be achieved? E.g., if you think the answer is 50 % chance of winning, type in your answer as 50.


The answer is 75.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Satyen Nabar
May 8, 2014

Best Strategy ---If you see two blue or two red hats, then write down the opposite color, otherwise write down "pass".

BBB

RRR

BBR

BRB

RBB

RRB

RBR

BRR

Out of the 8 possible scenarios, this strategy will work in 6/8 situations. Only in scenario 1 and 2 where all hats are 1 color will all of them answer wrongly. Which is optimal strategy since all the wrong answers are bunched together.

75% chance of success...

Exactly how I solved. Great problem! :D

Finn Hulse - 7 years, 1 month ago

in all the possible situations, at least 1 person will see two others wearing hats of d same color. if he writes down "pass", the other two will know that they are wearing hats of same color. then any one of them can see the color and write it down............................ Why will this not work?

Log in to reply

They have to submit their guesses at the same time.

Rayner Chuang - 6 years, 11 months ago

i have a way with 87.5% chance we have that they discuss that if any one of the other 2 have Red the first one passes else he gives a random answer. else the second if he sees blue on the other third one he says red because the first one has already told that one of them has red due to the pass written else he passes , if he pass third one knows that he has red so the probability of getting right is (1/2 1/4 + 3/4) 100 which is 87.5.

Priyanshu Pandey - 6 years, 8 months ago

Log in to reply

That's wrong - they don't have a chance to see others answers and if anyone gives incorrect answer (pass can't be incorrect) they get nothing. It's quite easy to get 100% if they would be able to know, what others aswered - e.g. one, who sees hats with same colors shouts pass and the other two already know their hat color.

Piotrek Baranowski - 5 years, 10 months ago

Log in to reply

Makes sense my bad i assumed they could listen to others answers

Priyanshu Pandey - 5 years, 10 months ago

"If at least one of them guesses correctly they win $50,000 each" makes me think that the others may be wrong and still get the prize. 87.5% indeed!

William Nathanael Supriadi - 4 years, 8 months ago
Rafael Cosman
Sep 11, 2015

First, let's come up with a strategy that seems effective. Then, let's prove that it's *the

Optimal Strategy:

If you see two BLUE hats guess RED ,
If you see two RED hats guess BLUE .
Otherwise, pass.

Proof that this strategy wins 6/8 times:

Here are all 8 equally likely possibilities and their results with this strategy:

  • red red red (EVERYONE guesses WRONG)
  • red red BLUE (person 3 guesses CORRECTLY)
  • red BLUE red (person 2 guesses CORRECTLY)
  • BLUE red red (person 1 guesses CORRECTLY)
  • blue blue RED (person 3 guesses CORRECTLY)
  • blue RED blue (person 2 guesses CORRECTLY)
  • RED blue blue (person 1 guesses CORRECTLY)
  • blue blue blue (EVERYONE guesses WRONG)

This strategy gives a 6/8 chance of winning.

Proof that this strategy is optimal:

Because the hats are drawn independently, seeing the other two people's hats doesn't give you any information about your own. Thus if you decide to guess your own hat color, you MUST have exactly a 50% chance of being correct. Note that the solution that I'm proposing doesn't violate this. For example, let's say that you are person 1 and you see blue blue . According to the strategy proposed here, you should guess red . But there are two equally likely cases where you would see blue blue , namely red blue blue and blue blue blue . Thus you actually only have a half chance of being correct. But the reason that this strategy can win 6/8 times and not just 1/2 of the time is because it bunches together mistakes and spreads out successes .

Generally, with any strategy, if you if you list out all 8 equally likely possibilities, then for each person who guesses correctly in one of the 8 possibilities, he will guess wrong in another possibility (the one where he got the other color of hat). With our strategy, there are 6 correct guesses and 6 incorrect guesses. But the 6 correct guesses are spread out among 6 of the different 8 possibilities (one correct guess per possibility). On the other hand, the 6 incorrect guesses are concentrated in the remaining 2 or the 8 possibilities ( RRR and BBB ). This strategy is optimal because it spreads out the correct guesses and concentrates the incorrect guesses as much as possible. Specifically, there cannot be any strategy that wins in 7/8 possibilities because that would require having 7 correct guesses. But this of course implies that there must also be 7 incorrect guesses. And there is no way to concentrate 7 incorrect guesses on the remaining 1 of the 8 possibilities. Only 3 incorrect guesses can be concentrated into a possibility. Thus no strategy can achieve 7/8 and therefore 6/8 is optimal.

Extensions

How good is the optimal strategy for 4 people? 5? 6? In the limit as the number of people goes to infinity?

Try using the spreading+concentrating notion presented above to generate an upper limit on the performance for each of these problems, then see if you can actually construct a strategy to achieve this performance.

See if you can find the connection between the solutions to these puzzles and Hamming Codes.

Acknowledgements

Thanks Satyen Nabar for your excellent solution. I've written a somewhat more complete proof of optimality here.

Great solution Rafael. Thinking about your extension!.

Satyen Nabar - 5 years, 9 months ago

thank you for the complete soln! Now only I get it.

JOHNNY CHIN - 4 years, 11 months ago

Thanks for proving that no other way will get a higher chance!

Jerome Te - 2 years, 8 months ago
Liew Ye
Oct 14, 2015

The percentage chance of winning should be >50% if a fixed solution was discussed before the game: the probability for each to win is 50%,

A --> 50% B --> 50% C --> 50%

The best is only 1 guessed correctly and the other 2 persons chosen 'pass', the other case if more than 1 guessed correctly will not be consider, as mentioned if answer is not true, then is false, because the probability of winning in this case< first case.

so, the best solution/strategy they discussed must be {win, pass, pass}, rearrange we got 3 sets.

0.5^3=0.125, 0.125*3=0.375 (3 sets included)

if they lose, minimum probability also =0.375

optimum chance of winning: 0.375(from best strategy)+0.375(if they lose//worst strategy)=0.75(winning probability)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...