A king has decided his wise men are not all that wise. So, one day, he gathers his 100 wise men in his dungeon for a challenge.
He says to them, "You will all be staying in this dungeon tonight. In the morning, you will be put into a line all facing one direction such that the last person in line can see everyone in front of them. You will then be buried to your necks in sand and a hat will be placed on your head. The hat will either be red or blue. A guard will walk on the sand with a sword and starting with the last person ask each of you which color of hat you are wearing. If you say the wrong color, you will be beheaded. If you say the right color,you will be spared. If any of you say anything other than red or blue or more than one word, the guard will exit and you will all be left down here to starve and die."
The wise men decide to come up with a plan to save the most number of people. You are one of the wise men. What is your plan to guarantee saving the most number of people?
I love these riddles.
Last time this question came up, I was able to explore the infinite version of this scenario, where the prisoners have to save their necks (heh heh) without even speaking their guesses loud enough to hear the other prisoners.
Care to share the riddle?