Sagacious wrote:
Without any codes, #'s 10,8,6,4,2 would say the color of the hat in front of them. This way #'s 9,7,5,3,1 would guarantee survival. Plus average odds would say another two or three of the even numbered group lived.
With codes, Alice runner's solution is a good way to save 9 at least and leave the tenth at the mercy of chance.
I've done some sleuthing and from what I can tell, there is a solution, without coding, that allows 9 prisoners to survive, with the last prisoner left to chance. I haven't quite figured this out yet, but obviously the first prisoner, with his one word of "white" or "black," has to communicate enough information for the rest of the 9 prisoners to know their colors. The rest of the prisoners are locked into what they are saying by their own color.
So we've got to work out some mechanism by which more information can be conveyed than just the color of the person in front. I think I've worked out a mechanism that can be guaranteed to save a few more prisoners:
Prisoner 1 is assigned to save 2 and 3. If they have the same color, then he says the color of prisoner 10. If they have different colors, then he says the OPPOSITE of the color of 10. Now prisoner 2 looks at 10: if he hears the right color, then he says the color of prisoner 3. If he hears the WRONG color, he says the opposite of prisoner 3. Prisoner 3 can also work out his color; if 1 said the color of 10, then he says what 2 said. If 1 said the opposite color from 10, he says the opposite from 2.
I think I've worked out the possibilities, and this can also save 10, who listens for what 1, 2, and 3 say. If their sequence goes BBB, WWB, BWW, or WBW, he says black. If the sequence goes WWW, BBW, WWB, or BWB, then he says white.
Then 4 can do the same thing, indicating to 5 and 6 their colors by using the color of 9. Then 9 can use the same set of sequences to determine his own color. Finally 7 just tells 8 his color.
So there are 3 sacrifices and 7 saves.
I thinking the solution to save all 9 has to be along these lines.