My friend Paul posed this problem to me last weekend.
“4 soldiers have been captured and buried up to their necks. 3 are in a line facing a brick wall. The fourth is on the other side of the wall. They are blindfolded and then two black and two white hats are placed on their heads. They are not allowed to talk to each other. The blindfolds are removed. If a soldier can guess what colour hat they have on, they are freed. If they guess wrong, they are killed.”
Paul’s sketch of this situation is shown below.
Which soldier, after a while, can know for sure which colour hat he has on?