Logic Puzzles

31. The Blind Prisoner’s Hat

A king shows three prisoners five hats — three black and two white. He blindfolds the men, places one hat on each head, and puts the two unused hats out of sight. One of the prisoners (Prisoner C) is blind; Prisoners A and B can see the hats on the other prisoners but not their own.

The blindfolds are removed and, in turn, the king asks each man whether he can deduce the colour of the hat on his own head. Each may answer only “Yes” (and state the colour) or “No”. All prisoners hear every answer.

  • Prisoner A looks at B and C and says, “I don’t know.”
  • Prisoner B then looks at A and C and also says, “I don’t know.”
  • Immediately, the blind Prisoner C says, “I do know — my hat is black!”

Explain how the blind prisoner can be certain that his hat is black.

Added 9 March 2011

Hint:

What would each sighted prisoner have said if he had seen two white hats in front of him?

Solution:

Let us analyse the information revealed step by step.

1. Prisoner A’s statement
If A had seen two white hats on B and C, he would have known that (because only two white hats exist) his own hat must be black, and he would have answered accordingly. Since he instead says “I don’t know,” it follows that the pair (B,C) is not (white, white). Therefore at least one of B or C is wearing a black hat.

2. Prisoner B’s statement
B has heard A’s remark and hence already knows that among himself and C at least one black hat is present. Now B looks at A’s hat.

  • If B sees A wearing a white hat, then to satisfy “at least one of B or C is black,” B can deduce that his own hat is black (if it were white, both he and A would be white, contradicting A’s information). In that case B would have answered “Black.”
  • But B actually answers “I don’t know.” Hence the situation above cannot occur, which means B does not see a white hat on A. Therefore A’s hat is black.

3. What the blind prisoner hears
The blind Prisoner C now knows:

  • A’s hat is black (from B’s failure to identify his own hat).
  • There are three black hats in total.
If C’s own hat were white, the visible hats would be: A = black, B = ? (unknown to C), C = white. B would then be looking at (black, white). Seeing exactly one white hat would still leave B in doubt about his own colour (his could be black or white), so B would indeed have said “I don’t know.” At first sight this seems to allow either colour for C.

However, recall that A already has a black hat. Only two black hats remain. If C’s hat were white, B could be seeing either (black, white) or (black, black). But if B were seeing (black, white) he would know immediately that he is wearing a black hat — otherwise C would have two whites contradicting A’s information. Since B didn’t reach such a conclusion, the arrangement he sees cannot contain any white hats. Hence from B’s perspective both other hats must be black.

Therefore C can conclude that the only configuration consistent with both A’s and B’s inability to decide is:

A = black,  B = black,  C = black

Thus the blind prisoner knows with certainty that his own hat is black, and confidently states so, securing his freedom.


Rate this puzzle

No votes yet — be the first! ❤️ 👍 🔧 👎 💀

Vote totals refresh periodically.

How difficult is this puzzle?

No difficulty ratings yet.

Comments (1)

Anonymous 24 January 2011

The formula for the solution is 2(n-1)-1, where n is the total number of prisoners. This accounts for the designated counter's knowledge of their presence in the switch room.

Add a Comment or Suggest an Answer



« Back to Logic Puzzles


Puzzles

Site Map | Contact Us