Question: Four men walk into the desert. Suddenly all four are simultaneously knocked out. They awake buried to their heads in the sand unable to look anywhere but straight ahead. They are positioned so that each man sees another's head before him. However between the first and second man there is a separating wall. So the first man sees only desert. The second man sees only wall. The third man sees another's head and a wall. The fourth man sees two heads and a wall. On top of each mans head is a hat. The underside of each cap is black, but the outside of each cap is either blue or white. Before any of the men can speak, their captors tell them if they speak, they die. However, if any of them can guess the color of their cap on the first try they go free. The captors tell them that there are two blue caps and two white caps. Being an omniscient observer of the situation, we know that the order of the caps are: blue, white, blue, white. So knowing the perspective of each man in the sand, and that they can only see the color of caps/wall/desert in front of them, which of the four men knows for certain the color of his own cap. More importantly: why?
Answer: The third man. This is because he knows there are only two of each color cap. If the man behind him (the fourth man) saw two caps that were the same color in front of him, he would know that his own must be the opposite. However, because the caps alternate in color. The fourth man has only a 50% chance of getting his hat color correct, so therefore he stays quiet. The third man realizes that the fourth man is quiet because he must not see two caps of the same color in front of him, otherwise the fourth man would say the opposite of the caps in front of him. Therefore, the third man presumes his own cap must be the opposite of the mans in front of him, and his presumption is correct. Under this same logic, after the third man speaks his color hat, the second man, even though he sees only wall, would be the next to go free, because he knows his cap must be the opposite of whichever color the third mans cap was.