JTsyo
Lifer
- Nov 18, 2007
- 11,846
- 980
- 126
Originally posted by: DrPizza
The king has 100 men in jail and is about to execute them. But, he tells them that the next morning, they will be lined up first & each will have a hat put on their heads, either a black hat, or a white hat. There won't necessarily be an equal number of each color. Each man will be facing forward, and will be able to see all of the hats in front of himself. But, he won't be able to see his own hat, nor the hats of those behind him. At execution time, the king is going to start at the back of the line and ask each man what color his hat is. If he's right, he lives. If he's wrong? He's put to death immediately. Any attempt at communication other than their guess of color on top of their heads will result in immediate execution of all the men. i.e. they may not change the tone or inflection of their voice, or signal in some other manner. They may only respond "White!" or "Black!" Each prisoner (except the dead ones) will be able to hear the colors the other prisoners have chosen.
What strategy can the prisoners use to maximize the number of prisoners that live?
for starters, if each even numbered prisoner simply states the color of the man's hat in front of him, that would guarantee that 50% of them lived; more every time two prisoners in a row shared the same color hat. Can you improve upon that strategy?
oh ran into that one before, it's hard one. Hint: Think binary
Here's an easy one, since the last one was hard:
A farmer needs to take a fox, a chicken and a bag of seeds across a river in a small boat that will only hold one of them at a time. How can he do it in the least number of trips and not have the fox eat the chicken or the chicken eat the seeds?