Suppose a wicked king is bored and wants to play a game with three of his subjects.
The king first lines the peasants up in single file, and then blindfolds them so they cannot see. The king then informs the peasants that he has 5 hats -- 3 which are red, and 2 which are blue. The king then places one of the hats on each peasant's head in a random fashion and discards the remaining two hats.
The king then informs the peasants that he will remove the blindfolds, and upon doing so, the peasants will be able to see the color of any hat in front of them, but will not be able to see the color of their own hat or any hat behind them.
Then, one of the peasants (could be any one of the three) must state the color of his own hat -- if he is correct, all three peasants' lives will be spared, but if he is wrong, all three peasants will be killed. Other than the one peasant saying "red" or "blue", the peasants are not allowed to talk or communicate or they will all be killed. If none of the peasants answers within a reasonable time after the blindfolds are removed (say, one minute), then the peasants will all be killed.
If the peasants are smart, what is their probability for survival?
Now suppose instead that the king stipulates that only the peasant at the back of the line can answer. What is the probability of survival now?
What is the probability of survival if only the middle peasant is allowed to answer?
What about if only the peasant at the front of the line is allowed to answer?