The 4 prisoners with white and black hats. Discover one of the most famous logical deduction exercises in the world

Os 4 prisioneiros com chapéus são tão famosos que viraram sinônimo de categoria. São os “Hat Puzzles” (Enigmas-Chapéu)

It is so famous that it has become synonymous with the category.

They are the "Hat Puzzles” (Enigmas-Hapéu), a type of logical deduction problem created in the 60s, also known as induction puzzles.

To solve them, it is necessary to use logical reasoning about actions carried out by other individuals, which in the world of game developers people call hierarchy of beliefs. In other words, a sequence of deductions, in the right order, is necessary to arrive at the solution. Like in Escape Rooms, for example. You kill one clue, which helps solve the next one, and so on.

Can you solve the original prisoners and hats riddle? It's simple, it's worth trying.

Bar graph with symbols depicting trees under categories A, B, C, and D, showing a significant variance in values. Hat Puzzles". Os 4 prisioneiros com chapéus

The 4 prisoners with white and black hats

Once upon a time there were 4 prisoners. The guard warns that they will all be released if at least one correctly answers what color hat he is wearing. He says there are two white and two black hats, which were randomly placed on their heads.

They cannot talk to each other, they can only speak if it is to give the answer. They are in the same room, there is just a small divider, a screen, which leaves three on one side and one on the other.

1 sees 2 and 3's hat.
2 sees 3's hat.
3 only sees the wall.
4 only sees the wall.

There are no absurd pranks, like “there was a mirror”, or crazy things like that.

And that's it.

Which one can solve the stop?

You can find the answer by expanding the box below.

The solution

Answer: number 2.

Number 1 can see 2 and 3's hats. If they were the same color, he could deduce that his would be the opposite color and solve the riddle. As they are different colors, he cannot conclude anything – and therefore does not speak out. As he remained silent, the other prisoners deduce that he is seeing different colored hats.

This way, number 2 can deduce that his hat is a different color from number 3's hat, which he sees is white. Therefore, yours can only be black. Bingo!

Prisoner 2 is the guy who can free them all.

Get our posts! FREE!
Show comments (7)

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More