# A King and Three Peasants

davegage
Posers and Puzzles 01 May '05 06:48
1. 01 May '05 06:48
Suppose a wicked king is bored and wants to play a game with three of his subjects.

The king first lines the peasants up in single file, and then blindfolds them so they cannot see. The king then informs the peasants that he has 5 hats -- 3 which are red, and 2 which are blue. The king then places one of the hats on each peasant's head in a random fashion and discards the remaining two hats.

The king then informs the peasants that he will remove the blindfolds, and upon doing so, the peasants will be able to see the color of any hat in front of them, but will not be able to see the color of their own hat or any hat behind them.

Then, one of the peasants (could be any one of the three) must state the color of his own hat -- if he is correct, all three peasants' lives will be spared, but if he is wrong, all three peasants will be killed. Other than the one peasant saying "red" or "blue", the peasants are not allowed to talk or communicate or they will all be killed. If none of the peasants answers within a reasonable time after the blindfolds are removed (say, one minute), then the peasants will all be killed.

If the peasants are smart, what is their probability for survival?

Now suppose instead that the king stipulates that only the peasant at the back of the line can answer. What is the probability of survival now?

What is the probability of survival if only the middle peasant is allowed to answer?

What about if only the peasant at the front of the line is allowed to answer?
2. Daemon Sin
I'm A Mighty Pirateā¢
01 May '05 14:29
Wasn't this posted a few weeks ago with 1000 peasants as the subjects?
3. 01 May '05 17:35
Originally posted by Daemon Sin
Wasn't this posted a few weeks ago with 1000 peasants as the subjects?
no...different problems (even though both involve peasants and a wicked king)
4. 01 May '05 20:54
Originally posted by davegage
no...different problems (even though both involve peasants and a wicked king)
this one's much harder, i'm no good with probability.
5. 01 May '05 22:162 edits
Originally posted by davegage
Suppose a wicked king is bored and wants to play a game with three of his subjects.

The king first lines the peasants up in single file, and then blindfolds them so they cannot see. The king then informs the peasants that he has 5 hats ...[text shortened]... if only the peasant at the front of the line is allowed to answer?
Ok, let's attack the first problem:

peasant's agreement: back peasants speaks within 10 secs, mid peas speaks between 10 and 20 secs, front peasant speaks between 20 and 30 secs
If it is your time to speak, and all the hats (if any) in front of you are red, then you say your hat is blue, otherwise you keep quiet.

This strategy will win for the peasants every time.
6. 01 May '05 22:281 edit
Originally posted by iamatiger
Ok, let's attack the first problem:

peasant's agreement: back peasants speaks within 10 secs, mid peas speaks between 10 and 20 secs, front peasant speaks between 20 and 30 secs
If it is your time to speak, and all the hats (if any) ...[text shortened]... keep quiet.

This strategy will win for the peasants every time.
Your strategy won't work: consider that the first peasant sees only red hats in front of him. then by your strategy, he should say "blue", but there are three red hats, so his hat may in fact be red. result: they all die with some probability.

EDIT: I think you just switched the colors inadvertently, because if we swap red and blue in your answer, then it works nicely...
7. 01 May '05 22:39
Originally posted by davegage
Your strategy won't work: consider that the first peasant sees only red hats in front of him. then by your strategy, he should say "blue", but there are three red hats, so his hat may in fact be red. result: they all die with some probability.

EDIT: I think you just switched the colors inadvertently, because if we swap red and blue in your answer, then it works nicely...
Thanks - I did indeed get confused about which of red and blue was 2 hats.
8. 02 May '05 00:335 edits
If the back peasant chooses I get probability of surviving
= (1/10) + (3/10)*(2/3) + (6/10)*(2/3)
= 7/10

If the middle peasant chooses I get probability of surviving
= (2/5)*(3/4) + (3/5)*(1/2)
= 6/10

If the front peasant chooses I get probability of surviving
= 6/10

Optimal strategy:
Back peasant chooses unless he sees RR, in which case another peasant chooses R.
Then optimal probability
= (1/10) + (6/10)*(2/3) + (3/10)
= 8/10

9. 02 May '05 01:091 edit
Originally posted by THUDandBLUNDER
If the back peasant chooses I get probability of surviving = 7/10

If the middle peasant chooses I get probability of surviving = 6/10

If the front peasant chooses I get probability of surviving = 6/10
i agree with the above answers.

i think it is intersting that the middle peasant has no better chances than the front peasant despite the fact that the middle peasant knows more information (he knows the color of the hat in front of him).
10. 02 May '05 01:36
Originally posted by THUDandBLUNDER
Optimal strategy:
Back peasant chooses unless he sees RR, in which case another peasant chooses R.
Then optimal probability
= (1/10) + (6/10)*(2/3) + (3/10)
= 8/10
I think this may be the second best "optimal" strategy; the only uncertainty comes in when the back peasant sees RB or BR, but chooses anyway.

But, assuming that the peasants are smart enough to coordinate their efforts as such, then iamatiger's method will work in every case.
11. 06 May '05 13:32
1. If first two having the same color that is blue so last one announce fist he is bearing red.
no other way