Three logicians, Albert, Bill and Carl, are wearing hats, which they know are either black or white but not all white. Albert and Bill can each see the other two logicians, but not Carl, who is facing away and cannot see them.
Each is asked in turn if they know the color of their own hat. The answers are:
Albert: "No."
Bill: "No."
Carl: "Yes."
What color is Carl's hat and how does he know?
(Taken from http://einstein.et.tudelft.nl/~arlet/puzzles/logic.html)
Carl must be wearing a Black hat.
If Bill's hat is White and Carl's hat is White, then Albert would answer yes since he couldn't have a White hat also.
If Bill's hat was Black, then Albert would have to Answer no. He
could have any hat on; but then, Bill would know his hat is Black
(since Albert didn't answer yes).
So Carl's hat must be Black.