Correct solutions came from Philippe Fondanaiche, Burkart Venzke, Jens
Voss, Ken Keating, Justin Crooks, Bryan Fluhrer, Khanh Ngo, Kimio Terauti,
Jim Benstead, Ivan Lisac, Robert T McQuaid, Mark Foster, Russell Knight.
The strategy is the following. Before getting in line, all the captives agree that the person at the back of the line will say "black" if there are an odd number of black hats in front of him and will say "white" if there are an odd number of white hats in front of him. Clearly, the last person will have a 50/50 chance of being freed, and the others will know whether he has been freed or not, and so will know the color of his hat. Every person after that will know the number of black hats in front of him -- by looking -- and the number of black hats behind him -- by having listened to all of those behind him. Using this information, it's easy for each person to determine the color of his own hat.
You are visitor number 2952
to this page.
Page last updated 1 December 2000.