This is a variant some of the existing questions on this exchange, but I can't see this exact problem.
Basic example duplicates this question
- Some prisoners are going to be lined up, all facing forward.
- A hat, either black or white, will be placed on their head.
- The prisoners at the back of the line can see all of the hats in front of them, but they can't see their own, or behind them.
- The prisoners at the front of the line can hear the people at the back of the line.
- The prisoners can strategise before hand.
- The prisoners have a perfect memory.
- This is a logic puzzle, they don't use an vocal variance or intonation to communicate, they only say 'black' or 'white'.
- Starting at the back of the line, the prisoner guesses the color of their hat, and if they are correct, they are free to go.
The strategy for this is fairly straight forward, and all of the prisoners except the last one are guaranteed to go free.
Basically, the prisoner at the end of the line counts the number of white hats, and if this number is odd he says 'white' and if it is even he says 'black'.
The person in front of him can now deduce, by counting the number of white hats in front of him if he has a white or black hat, and the person in front of him, by keeping track of what the previous people have said can similarly deduce what color hat they have.
Now with mulitple colors!
Now let's extend the problem, and deal with more than two colors of hat. If we are ok with three prisoners dying, how many different color hats can we strategise a solution for?
I don't know the answer, but as far as I have reasoned, it is at least 10.