Six prisoners standing in a line are equally likely to be given either a
good
haircut or a
bad
haircut, and each prisoner can only see the haircuts of the prisoners in front of them.
After each prisoner is given their haircut, they must guess her own hair situation, starting from the back of the line. They will be given ramen if and only if they ALL guess correctly. If the prisoners can form a strategy to correctly guess all of their haircuts in advance, then what is the optimal strategy and how likely is it to work?
[If your answer is X %, enter X . ]
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Where does it say that there are exactly 3 bad and 3 good haircuts? Without that information it's all random and there's no strategy.
Log in to reply
That actually isn't relevant in this situation. Lee's solution is saying that, if person 6 sees an odd number of people with "bad" haircuts, he says "bad." Then the person in front of him knows whether there are an odd or even number of people with bad haircuts (not counting person 6), therefore knowing whether her own is bad or not. The same strategy can continue so that, essentially, the only person who really needs to "guess" is person 6, who has a 50% chance of being right.
Log in to reply
Which is fine, but it still says nothing about the hair situation of person 6.
Log in to reply
@Revant Chopra – Uh, yeah. That's kind of why it works 50% of the time and not 100%.
you should mention that there is an equal probability to get a good or a bad haircut.
You probably meant if the last person sees "even" (that's most probably 2 assuming 50:50 situation) people with 'bad' then he guesses 'bad' for himself. After the last person puts out a guess, every prisoner will know which haircut (good or bad) is 'even'...
Why would each prisoner want to make the no. of good or bad haircut an even number? Why cant it be vice versa? Like if there are an even no. of people with bad haircut he could guess bad and if there are odd no. of people with bad haircut he could guess good.
They can strategise all they want, but your answer says nothing about the hair situation for the last prisoner. Also, I want to ask the author one essential question: What if some of the prisoners have bad taste and don't know what a good or bad haircut is?
Its simple, we just need to assume that have 3 with bad haircuts and 3 with good haircuts (probability 50%). Them everyone will know your own haircut. Example: The last one will see 3 bad and 2 good, so he is good, the next will remember that his friend said good and will see 2 or 1 good, if he saw 1 good, he is good, if he saw 2 good, he is bad. The next one will see 1 or 0 good (if his friend - the second one - said "good") and will do your logical choice. Its easy, see what is there, remember and count. Sry if my english is bad, i just speak portuguese. But i thik this is the best strategy, it doesnt matter if five people are sure (without assuming half percent) in the end everyone needs to do the right choice, so choice the Math!
You actually don't even need to assume that there are 3 good and 3 bad haircuts. Check Lee Isaac's solution for more details.
The chances of getting a good or bad hair cut are not affected by the quality of the others. 50% every time. Just like roulette (without the zero). Seeing 1,2, 3, 4 or 5 bad haircuts in front of you tells you nothing about your own. So you are 50:50. Just like scoring red or black is not affected by any number of times the red or black has been previously. The number of bad or good haircuts is infinite.
I still can't understand all the proposed solutions here which involves assuming "even" and "odd" number of good and bad haircuts. Since the question is "what.... and how likely..." in percentage form, so I simply put 50 as the answer. That is bcos the possible answers are only two: they might all correctly guess or they might be wrong. But I'm aware my method could be void if the given details are different.
If the problem is :
Six prisoners standing in a line , 3 are given either a Good haircut and another 3 a Bad haircut, and each prisoner can only see the haircuts of the prisoners in front of them.
Starting from the back of the line, each prisoner must guess her own hair situation, and they will be given prize if and only if they ALL guess correctly. If they can strategize in advance, then what is the optimal strategy and how likely is it to work? Give answer in %.
Then the solution be :
The last prisoner looks at the people in front of him, and guesses "bad" if there are an odd number of people with bad haircut or guesses "good" if there are an even number of people in front of him with bad haircut.
Next, the second last person sees if there is odd or even number of people with bad haircut in front of him, and from this, he can guess his own hair.
Repeating until everyone guessed, the first has a probability 0% and last has 100% . And middle man's so on. Averaging them we can get the chance 50% .
Answer is 50%
Everything here is accurate other than that last paragraph. The first has a 50% chance and everybody else has a 100% chance, they do not average out they multiply together making it a total 50% chance. Otherwise, good solution
You said that 6th person would guess "good" if there are an even number of people in front of him with bad haircut. If he sees 3 good hair cuts and 2 bad hair cuts then according to your solution he would guess his haircut to be good since even no. of people have a bad haircut. This would make total 4 good haircuts and 2 bad haircuts which contradicts the question. Please expand.
Log in to reply
I agree its completely random so really they should only have a 1.56% chance of being right.
I request you to read the solution carefully .
It's 50% because you assume the best strategy will give a 100% chance of the following 5 people to get theirs right meaning the first one has a 50% chance of getting his/hers right.
Why cannot the strategy be much simpler? Like, every prisoner, along with guessing their own haircuts, also tells what is the type of haircut of the person just in front of him/her. That way all prisoners from 1 to 5 can know what their haircuts are (since the process starts from the 6th prisoner) with 100% probability. Only the 6th prisoner has 50% probability of getting it right, and hence the answer (50%) follows.
General Speaking,
There is 50 % Chance to guess since we have two choices Good or Bad.
Problem Loading...
Note Loading...
Set Loading...
The last prisoner looks at the people in front of him, and guesses "bad" if there are an odd number of people with bad haircut or guesses "good" if there are an even number of people in front of him with bad haircut.
Next, the second last person sees if there is odd or even number of people with bad haircut in fromt of him, and from this, he can guess his own hair.
Repeating until everyone guessed, everyone in fromt of the last person will have 100% chance of getting it right.
The last prisoner however, only has a 50% chance of getting it right.
1^5×0.5×100%= 50%
Answer is 50%
BUT WHAT IF THEY HAVE AN AVERAGE HAIRCUT