The Dungeon

Image to the riddle "The Dungeon"

There were 3 prisoners in the King’s dungeon. Two of them had perfect vision but the third prisoner was completely blind.

One day the King gathered the prisoners together and said to them: «I have 5 hats. 2 of the hats are black and 3 are white. I will blindfold each of you and then put one of the hats on each of your heads. I will then put the remaining two hats in another room. Next, I will remove your blindfolds. At this point you may look at your fellow prisoners but may not speak to them. The person that can tell me the color of the hat on his own head will go free. Do not insult me by guessing, however, if you guess and are wrong, you shall be executed.»

The hats were then placed on the prisoners heads and the blindfolds were removed.

The King then spoke to the first prisoner, a fully sighted man.
«What is the color of the hat on your head?»
The prisoner looked around carefully but finally, not wanting to risk death by guessing, he said that he did not know.

The King then spoke to the second prisoner, the other fully sighted man.
«What is the color of the hat on your head?»
This prisoner also looked carefully at the hats upon the heads of the other two prisoners, but finally admitted that he also did not know.

At this point the King turned and began to walk away, assuming that the third prisoner who was blind could not possibly know the answer to the riddle.

But then the blind man spoke.
«Excuse me, my lord,» he said, «I am certain my hat is white.»

Surprised, the King turned around. He saw that the blind man was correct and ordered him to be freed at once.

How did the blind prisoner know the color of his hat?

If the first prisoner had seen two black hats on the other two prisoners, he would have known that he was wearing a white hat, since there were only two black hats to begin with.
Since he did not know the color of his hat, this meant that the other two prisoners must have worn white hats or one had white hat and the other black.

The second prisoner would know this when the first prisoner was unable to say what color his hat was, that is, the second prisoner now knew that either he and the blind prisoner were wearing white hats or that one of them was wearing white and the other black.

So if the blind prisoner wore a black hat, the other prisoner would know that he must wear a white hat.
Since the other prisoner could not find out what color he wore, this told the blind prisoner that he had to wear a white hat (if the blind prisoner had worn a black hat, the other prisoner could have deduced that he was wearing a white hat).

Have you tried this riddle? 👉 The merchant