Originally posted by theangrystudent I say at least 999 should be able to live through the experience.
A simple but effecitve strategy would be for the person stating the color of their hat to yell their response if it is the same color as the hat next in line, and to speak normally if the color they are saying is the opposite of the color of the hat in front of them.
Hence the ...[text shortened]... efore the the king asks them the question.
So all but the first person would get a free pass.
Suppose, instead, that the peasants are not allowed to alter the volume/inflection of their voice when they give the king their answer -- they can only say "red" or "blue" in a normal tone and nothing more. Can they still save 999 for certain?
Originally posted by davegage Suppose, instead, that the peasants are not allowed to alter the volume/inflection of their voice when they give the king their answer -- they can only say "red" or "blue" in a normal tone and nothing more. Can they still save 999 for certain?
A short 2 second. answer of the color they are saying is the same as the one in front of them and a long 10 second answer if the color in front is the opposite of the one they are staying.
So if someone heard the guy before him say "blue" then he would know that his hat is blue, however if the person before him said"bbbbbbbblllllllllllluuuuuuuuuuuuuueeeeeeeeeeee" he would know his hat is red.
Originally posted by theangrystudent A short 2 second. answer of the color they are saying is the same as the one in front of them and a long 10 second answer if the color in front is the opposite of the one they are staying.
So if someone heard the guy before him say "blue" then he would know that his hat is blue, however if the person before him said"bbbbbbbblllllllllllluuuuuuuuuuuuuueeeeeeeeeeee" he would know his hat is red.
or better perhaps would be a pause before the answer.
Originally posted by theangrystudent A short 2 second. answer of the color they are saying is the same as the one in front of them and a long 10 second answer if the color in front is the opposite of the one they are staying.
So if someone heard the guy before him say "blue" then he would know that his hat is blue, however if the person before him said"bbbbbbbblllllllllllluuuuuuuuuuuuuueeeeeeeeeeee" he would know his hat is red.
true...but suppose they are not allowed to do this either, or systematically pause before answering, or anything like that, etc.
they can still save 999 for certain with another strategy
999 can be guaranteed to live, and the back one has a 1 in 2 chance of survival. To make things simpler I'll indentify blue with 0 and red with 1, and addition works modulo 2.
The peasant at the back calls out the sum of all the hats in front of him, say x. He may or may not survive.
When we get to any other peasant, assume by induction that all peasants behind him (except for possibly the back peasant) got the right answer. Then he knows a) the sum of all hats except the back one is x, b) the sum of all hats behind him (except the back one) is the parity of the number of times peasants have shouted 'red' (ignoring the back one), say y, and c) he can add up the number of red hats in front of him, say z. So his hat is red if and only if y - x - z = 1, ie if x + y + z = 1. Therefore he counts up the total number of times 'red' has been called, adds on the number of red hats he sees and calls out the result.
If a peasant gets it wrong, this will obviously scupper the numbers, and because he is killed silently, none of the peasants will be any the wiser. So the expected survival rate drops rapidly if peasants randomly miscount.
Originally posted by Acolyte 999 can be guaranteed to live, and the back one has a 1 in 2 chance of survival. To make things simpler I'll indentify blue with 0 and red with 1, and addition works modulo 2.
The peasant at the back calls out the sum of all the hats in front of him, say x. He may or may not survive.
When we get to any other peasant, assume by induction that all pe ...[text shortened]... ll be any the wiser. So the expected survival rate drops rapidly if peasants randomly miscount.
yes...this is the right idea...
like you say, it requires that the peasants have good counting/analytical skills...
one wrong answer by a peasant will screw over all the remaining peasants...but luckily, two wrongs could make things right again for the rest...
Originally posted by davegage Suppose, instead, that the peasants are not allowed to alter the volume/inflection of their voice when they give the king their answer -- they can only say "red" or "blue" in a normal tone and nothing more. Can they still save 999 for certain?
They first agree on the following code:
RED = peasant can see an ODD number of reds
BLUE = peasant can see an EVEN number of reds
So the 1st peasant to speak says RED if he can see an ODD number of reds.
Otherwise he says BLUE.
He has only a 50% chance of surviving.
The 2nd peasant counts how many reds he can see and, knowing what the 1st peasant said, can tell his own colour.
And so on down the line.
The 1st peasant may or may not be pleased to learn that this strategy will save 999.5 survivors for certain. (LOL)
Originally posted by THUDandBLUNDER They first agree on the following code:
RED = peasant can see an ODD number of reds
BLUE = peasant can see an EVEN number of reds
So the 1st peasant to speak says RED if he can see an ODD number of reds.
Otherwise he says BLUE.
He has only a 50% chance of surviving.
The 2nd peasant counts how many reds he can see and, knowing what the 1st p ...[text shortened]... ay not be pleased to learn that this strategy will save 999.5 survivors for certain. (LOL)
good go! Being as logical as a pack of women, I am not sure if you are correct, but sounds good to me!
Originally posted by davegage true...but suppose they are not allowed to do this either, or systematically pause before answering, or anything like that, etc.
they can still save 999 for certain with another strategy
Sounds good Thud, but as Davegage stated, they aren't allowed to pause before giving their answer.
Would take an awfully long time to count up all those hats if you're last in the queue...
Originally posted by PawnCurry Sounds good Thud, but as Davegage stated, they aren't allowed to pause before giving their answer.
Would take an awfully long time to count up all those hats if you're last in the queue...
Back to the drawing board!
That's tricky, PawnCurry...too tricky I think.
Actually I said they couldn't "systematically" pause before answering, by which I meant they could not systematically transfer information based on the length of their pause. If the pause is determined by how quickly each peasant can individually process the information and count hats, etc, then I don't think they could systematically transfer information with their pauses to guarantee survival.
I like THUD's solution, and hence also Acolyte's earlier solution -- the modulo 2 world is basically an Even/Odd world.
Originally posted by davegage That's tricky, PawnCurry...too tricky I think.
Actually I said they couldn't "systematically" pause before answering, by which I meant they could not systematically transfer information based on the length of their pause. If the pause is determined by how quickly each peasant can individually process the information and count hats, etc, then I don' ...[text shortened]... and hence also Acolyte's earlier solution -- the modulo 2 world is basically an Even/Odd world.