| This week's riddle - Hats |
|
|
|
| Written by Aharon Brodutch |
| Tuesday, 03 November 2009 00:00 |
|
In a really harsh prison the sadistic warden decided to give 100 prisoners the following task: Again the rules. They all follow the algorithm. They can all hear what the fellow prisoners say. Each prisoner can see all the guys ahead of him , but non of those behind. They can all say either "black" or "white" once but the order of talking is
Comments (2)
![]() written by MBT online, February 28, 2010
Wearing MBT shoes provides many pro-body benefits: this is the result of an increasing number of international studies supporting the numerous health benefits of the "anti-shoe ". Here is a excited place-----discount MBT shoes
report abuse
vote down
vote up
Votes: +0
Write comment
|







What they could have decided is to let the first prisoner say BLACK if there is an even number of black hats that he sees in front of him, or WHITE if there is an odd number of them. (This also indicates whether there is an even or odd number of white hats since the total number of prisoners/hats is told.) The rest of the prisoners can thus deduce their hat colour one by one.
For example, if the first prisoner sees 45 white hats and 54 black hats, he would say BLACK - indicating that there is an even number of black hats and odd number of white hats. The second prisoner, by seeing 44 white hats and 54 black hats, would realise that there is no longer an odd number of white hats - and that he has a white hat. By saying WHITE, he saves his life while telling the next prisoner that there is now an even number of both black and white hats...etc.
Therefore the first prisoner is the only one who risks his life.