This is a fun riddle that appears to be impossible to explain at first. It is a good mental exercise, even after knowing the thought process.
Three men are blindfolded and each randomly selects a hat from a box and puts it on.
They know there are 2 white hats and 3 black hats in the box but they do not know the color of the hat they selected.
The 3 men are placed in a line, one behind another, facing a wall and their blindfolds are removed. The man with hat # 1 can see the color of hat # 2 and hat # 3, but not his own.
The man with hat #2 can see the color of hat #3, but not his own. The man with hat #3 cannot see the color of any hats.
When the man with hat #1 is asked for the color of his own hat he responds, "I do not know", which the men with hats #2 and #3 hear.
When the man with hat #2 is asked for the color of his own hat he responds, "I do not know", which the man with hat #3 hears.
Then, when the man with hat #3 is asked for the color of his hat he responds "I know the color of my hat."
What is the color of his hat and how did he know?
Stuck?
First, consider the least number of scenarios to show the combinations of hats.
There is only one condition where the wearer of hat #1 will know the color of his hat. What is that?
Since there are only 2 white hats, the only way the man with hat #1 knows the color of his own hat is if both hats #2 and #3 are white.
If that is the case, then hat #1 can only be black. Since the man with hat #1 said "I do not know", that scenario can be eliminated.
What then are the possible combinations of hats #2 & #3? What is the answer to this riddle?
We know that hats #2 & #3 are not both white. Only one of those hats can be white, or both are black.
If the person wearing hat #2 looks at hat #3 and sees that it is white, he will know that his own hat will be black.
If hat #3 is black, however, hat #2 can be white or black so the man with hat #2 must answer, "I don't know."
Therefore, the man wearing hat #3 knows his hat is black.