# Problem: The 4 prisoners

• May 6th 2009, 12:14 AM
blueirony
Problem: The 4 prisoners
This is my favourite challenge problem, simply because it only requires pure logic, nothing else.

Look at this diagram: http://img179.imageshack.us/img179/769/4soldiers.png

There are four prisoners, buried to their necks in the ground. Each of them is wearing a hat. They know that there are four of them. They know that each prisoner is wearing just one hat. The prisoners know that there are two black hats and two white hats. They cannot turn their heads even the slightest, they can only look straight ahead.

The arrows on the diagram indicate the direction of their heads.
Prisoner 1 can only see the brick wall.
Prisoner 2 can only see the brick wall.
Prisoner 3 can see Prisoner 2 and the brick wall.
Prisoner 4 can see Prisoner 3, Prisoner 2 and the brick wall.

From Prisoner 1 to Prisoner 4 (i.e. left to right), the hats have been arranged white-black-white-black. The prisoners do NOT know this.

The prisoners do not know what colour hat is on their head.

The guard has told the prisoner that each of them can only speak one word: either 'black' or 'white'. If what the prisoner says is the correct colour of the hat on his head, then all of them are freed. If what the prisoner says is incorrect, all four of them are killed instantly.

Only one prisoner out of the four can work out what out what colour hat is on his head.
Who is it and why?

(The answer is NOT that one of them takes a lucky guess).
• May 6th 2009, 07:22 AM
Unenlightened
Nice problem :)

Here's my solution:

Number 3.
He knows number 4 sees two different coloured hats, and what colour number 2's hat is.
• May 9th 2009, 02:39 AM
blueirony
Unenlightened - well done!
• May 11th 2009, 02:05 PM
Musab
Quote:

Originally Posted by blueirony
Unenlightened - well done!

How did prisoner 3 know that prisoner 4 sees two different colors ?
• May 11th 2009, 02:57 PM
Unenlightened
Otherwise Prisoner 4 would know.
• May 11th 2009, 10:15 PM
blueirony