This reminds me of a problem I learned in UCSC (and was accused of cheating by the teacher when I figured it out in five minutes).<p>100 Prisoners are told they will be given white or black hats, but they don't get to see the hat they're wearing, they will be lined up facing the same direction, and they gun-to-the-head, say "black" or "white" and if they guess the color of their hat, they get to live.<p>They get to speak back to front, i.e., the rearmost prisoner sees all the hats ahead.<p>One strategy for optimizing the number left is to speak the color of the hat directly in front of you, in which case the prisoner ahead gets to live by repeating that color. This saves 50%, but of course there's a better solution.