4
$\begingroup$

This question already has an answer here:

I stole this puzzle - but I credited it in the source of this question, so if you really want to cheat you can. No cheating, please.

There's a penal colony on an island in the South Pacific. It's administered by a twisted prison warden who plays little mind games with the prisoners. He presents a challenge to the prisoners. If they solve it, they are set free. And if they don't, they're fed to the sharks.

The warden says to five prisoners, "I'm going to stand you against the wall. One guy is going to face the wall with his hands and his toes touching the wall. The next guy is going to stand behind him about five feet away, and the next person behind him and so on. Each guy can see the back of the head of the guy in front, except for the last guy who can see everybody, and the front guy - who can't see anybody.

"We're going to do this tomorrow. I want you to think about this overnight to see if you want to participate because, don't forget, if you lose - It's the sharks for you!

And if you win, you get set free. Here's how it works. Starting at the back of the line, I'm going to place either a white hat or a black hat on each of your heads. I can put any hat I want on any of your heads. Your job is to identify the color of your hat correctly. There's one caveat. The guy at the back of the line can't communicate, because the only thing he can say is either 'black' or 'white.'"

Crusty, who's been on this island for 19 years for overcharging for valve jobs says, "I have a plan which will improve our odds beyond 50/50. However, we must draw straws."

The question is

What is Crusty's plan and why must straws be drawn?

$\endgroup$

marked as duplicate by f'', Deusovi, Community Mar 31 '16 at 3:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Eh, this is 5 people, but maybe. $\endgroup$ – Daniel Mar 31 '16 at 1:12
  • $\begingroup$ @Daniel: The strategy is the same whether it's five people, ten people, one person, or a million people. $\endgroup$ – Deusovi Mar 31 '16 at 2:52
  • $\begingroup$ @Deusovi Seriously though puzzling.SE should change the 'That solved my problem!' button to something more relevant. $\endgroup$ – Daniel Mar 31 '16 at 3:26
2
$\begingroup$

The first man can see 4 hats.
He counts the number of black hats in front of him. If the number is odd he says black. If it's even he says white.
The second man can now work out the color of his hat based on the total number of black hats in front of him. For example, if he can sees three black hats in front of him and he hears the first man say white he knows that his hat must be black to make an even number of black hats seen by the first man. the same process applies for all the other men in turn.
In this way they can guarantee to save four men. the first man had a fifty fifty chance of being right, so the expected result is 4.5 saved out of five.

$\endgroup$
  • 1
    $\begingroup$ SPOILERS: USE EM $\endgroup$ – Daniel Mar 30 '16 at 23:40
  • $\begingroup$ Correct answer. I assume it's customary to accept the first right answer? $\endgroup$ – Daniel Mar 30 '16 at 23:41
  • $\begingroup$ Yeah, it usually is. and you can always change it later on I think. $\endgroup$ – Parzival Mar 30 '16 at 23:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.