There are four prisoners. All four prisoners will be freed, if at least one of them correctly guesses the color of the hat on his head.
They can't speak to each other, and they can't touch each other.
Number 1 sees number 2 and 3's hats.
Number 2 sees number 3's hat.
Number 3 sees only the wall.
Number 4 sees only the wall.
There are no mirrors.
They all know that there are 2 black hats and 2 white hats, and that there are four people.
They know that their placement in this room is as follows:
All the prisoners are perfect logicians, and won't speak unless they are sure of their hat color.
Can the four prisoners be freed? If yes, then how?