I desperately want to give a hint on that one in light of one of DStu's posts...
In the meantime, here's my favourite hat puzzle:
There are four people. In five minutes, each will be given a hat which is black or white, each with probability 1/2, with each chance independent. Each may submit a guess if he chooses. If at least one person guesses correctly, and nobody guesses incorrectly, they will be released. Otherwise, all will be killed.
What is their optimal strategy?
And my second favourite:
10 people are captured by some psychopath, who offers them a chance of survival based the color of their hat, as is usual with psychopaths. All 10 of them get to confer, with the bad guy listening. After they're done talking or five minutes elapse (this psychopath is not big on loopholes) he magically makes either a white hat or a black hat appear on the head of each of them, with all hats appearing at the same time. Then they each write "black" or "white" on a piece of paper, give him the pieces of paper (all this without them talking to each other or seeing what other people wrote), he kills all those whose hat color doesn't match their and lets the rest go.
Your job is to find the strategy that ensures the most people survive in the worst case, and prove that this strategy is indeed the best (for the worst case).