Quant, Math & Computer Science Puzzles for Interview Preparation & Brain Teasing
A collection of ~225 Puzzles with Solutions (classified by difficulty and topic)

Feb 7, 2010

Fair Hat Game

A king wants his daughter to marry the smartest of 3 extremely intelligent young princes, and so the king's wise men devised an intelligence test.

The princes are gathered into a room and seated, facing one another, and are shown 2 black hats and 3 white hats. They are blindfolded, and 1 hat is placed on each of their heads, with the remaining hats hidden in a different room.

The king tells them that the first prince to deduce the color of his hat without removing it or looking at it will marry his daughter. A wrong guess will mean death. The blindfolds are then removed.

You are one of the princes. You see 2 white hats on the other prince's heads. After some time you realize that the other prince's are unable to deduce the color of their hat, or are unwilling to guess. What color is your hat?

Note: You know that your competitors are very intelligent and want nothing more than to marry the princess. You also know that the king is a man of his word, and he has said that the test is a fair test of intelligence and bravery.

Source: http://www.folj.com/

Solution: Posted by Ankush (Sophomore, CSE, IITB) in comments!!


  1. He is for sure wearing a WHITE hat.
    Because consider the case when he
    wears a black hat(call myself A and the other princes B and C).Consider B's point of view in this case. B would be immediately able to guess the answer in this case. B sees a black hat(A) and white hat(C).If he(B) had a black hat then C would be able to win in less than a moment(as there are two black hats).So B must be able to conclude that he is wearing a White Hat,but neither B nor C is able to do so, this surely means that I(A) am wearing a WHITE hat and both of them are unable to judge because of being in the exact same situation.

  2. Correct answer.

    Just for a clearer explanation:
    Two black one white is not fair. The person seeing two black would be able to determine at time=0 that he has a white hat.

    Two white one black is not fair. Say A is black and B,C are white. The people seeing one black and one white (i.e B and C) have more information than the person seeing two white (i.e. A). B knows that C did not shout at time=0. So, C did not see two black. So, B must be having white hat. Same logic for C. So, B and C have more information than A.

    Hence,Since Two White One Black is not fair and the king is fair, All three would be wearing white hats. :)

    Thanx Ankush