Qm

Two players, two hats, one of you must be right

Alice and Bob each have a hat placed on their head, red or blue, chosen by a coin flip for each. Each can see the other's hat but not their own. At the same moment, without communicating, each must guess their own hat colour.

They win if at least one of them is right. They may agree a strategy in advance.

Is there a strategy that wins every time, no matter how the hats fall? If so, what is it, and why does it work?

Show a hint

There are only four possible hat combinations. Try to make Alice cover two of them and Bob cover the other two.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

100 prisoners guessing hat colors in a lineTen prisoners and hats of ten colorsGrabbing coins from the ends of a rowEveryone shouts the number of red hats, one must be rightEveryone guesses their hat at once
All questions →