You and two other very smart people were brought before the President. He want's to see which of you is the smartest, so you can figure out how to lower gas prices.
You are led blind-folded into a small room, and seated around a table. The president describes the test.
"Upon each of your heads I have placed a hat. You are either wearing a blue hat or a white hat. You don't know which, but I will tell you this; at least one of you is wearing a blue hat. There may be only one blue hat and two white hats, there may be two blue hats and one white hat, or there may be three blue hats. But you may be certain that there are not three white hats."
The president explains that when the blindfolds are taken off, the first to correctly announce the color of his hat shall be his advisor.
With that, the president uncovers your eyes and you see that your two competitors are each wearing blue hats. You see from the look in their eyes that they are thinking, "What is the color of my hat?"
For hours nobody speaks, then finally you stand up and say, "The color of the hat I am wearing is..."
What color is your hat? And how do you come to that conclusiong?
My hat is blue and here's why:
There are three possible configurations of what each of the three contestants could see.
1. 2 white hats. If you see this, you would know instantly that you had a blue hat, because there cannot be more than two white hats, so you would announce the answer and win the contest. Since someone did not do this, we know nobody saw this configuration.
2. 1 blue, 1 white. If you see this, then you have to ask yourself what color your own hat is. If it were white, then the guy in the blue hat would see configuration #1, and so he would announce his answer and win the contest. Since he doesn't do that, your hat must be blue. So you would announce the answer and win the contest. Since someone did not do this, we know nobody saw this configuration.
3. 2 blue. If you see this, then you have to ask yourself what color your own hat is. If it were white, then the other two contestants would see configuration #2, and one of them would announce the answer and win the contest. Since neither of them do that, you know your hat must be blue.
Since I see two blue hats, if my hat were white, then one of the other two very smart people would have already won this contest, instead of us sitting around here for hours. So my hat must be blue.