There are three criminal masterminds in Gotham prison. The guards decide to play a game with them one day and line them up in a row, all facing the same direction. The guards tell the prisoners that they have 5 hats, 3 white and 2 red, and that they will place one hat on each prisoner's head so he can't see it. The prisoners can see the hats in front of them, but no other hats. They tell the prisoners that if they can guess their hat, that they will be set free, but if they guess wrong, then they will be killed. They can also choose not to guess and go back in their cell.
The Riddler (who is in back) in back gets to guess first, and he doesn't know, Penguin, who is next, also chooses not to guess, but the Joker, who is in front and can't see anybody's hat, knows with certainty which hat he has on. What hat is it and how does he know?
If you want a real challenge, do this same riddle but with 5 prisoners, 4 white hats, and X number of red hats. Which position in line do you want to be with each positive integer value X? I can't remember all the answers to this one.