Brainteasers

# Box Of Hats

The warden of the Arizona State Penitentiary decides to have some fun one day... he decides he will give three prisoners a chance to go free... but only if they can prove themselves worthy of being released!

The warden brings out five hats, three of them red and two of them blue. The three prisoners are then blindfolded and one of the hats, at random, is placed on each of their heads.

He lines up each prisoner in a row, facing a brick wall. The blindfolds are then removed. Prisoner C can see both Prisoners A and B and the color hats that each of them is wearing. Prisoner B can only see Prisoner A and his hat. Prisoner A, being in the front, cannot see any hats. And no prisoner can, of course, see the color of his own hat.

The problem he puts to the prisoners is simple:

"If you can determine the color of the hat on your own head, I will release you from this prison. If you answer incorrectly, I will add another 20 years to your sentence! However, if you do not know and choose not to answer at all, nothing will come of it."

He first asks Prisoner C, "What is the color of the hat on your head?" Prisoner C thinks for a short while and then replies, "I'm sorry, I do not know."

He then asks Prisoner B, "What is the color of the hat on your head?" Prisoner B thinks for a short while and then also replies, "I'm sorry, I do not know."

He finally asks Prisoner A, "What is the color of the hat on your head?" Prisoner A thinks for a short while and then

replies, "I know! The color of my hat is...."

What color hat is Prisoner A wearing and how did he know?