Ten Hats - Random Death - Stats Question

Hello all -

So I got into a discussion with a Math professor friend of mine and he decided to ruin my lunch with a stats question. Here’s the scoop:

An evil king took ten men as prisoners. The king explained to the ten men that the next morning he would randomly put either a white hat or a black hat on each of them. The men then had to guess, one at a time, what color is the hat on his own head. The guess would be a 50/50 because the man couldn’t see his own hat (yes, I know - look up! Go with me here).

The ten men had the evening to discuss their
method of choosing for the next morning. Remember, the hat colors are random black or white. The question is…come up with a method so that you guarantee the highest number of men live.

I was able to save four for sure. Please help go back to my buddy knowing that’s the correct answer or if there is a higher number.

My next lunch depends on you!


The snozberries taste like snozberries!

I can save 9, not through stats but through communication.

Prisoner 1 looks at prisoner 2’s hat and guesses his to be the same color. This gives P1 a 50/50 shot at survival. P2 then knows what color his own hat is. He looks at P3’s hat. P2 then tells his hat color in such a way that P3 understands his own hat color. P3 looks at P4’s hat, etc., etc.

For example:
P1 sees that P2’s hat is white, so P1 guesses white. Good luck, P1. P2 now knows his own hat is white. After looking at P3, P2 phrases his answer one of two ways - either “It’s white, yes?” which means P3’s hat is also white, or “It’s white, no?” which means P3’s hat is black. Repeat for P4 - P10.

Just avoid being the first to guess and you’re perfectly safe.


Sig! Sig a Sog! Sig it loud! Sig it Strog! – Karen Carpenter with a head cold

Heck, Doc, if you’re going to do it that way, at least save the last guy, too. Why not just have them all agree that if the king puts a black hat on the victim’s head, they’ll all look up in the air, and if it’s a white hat, they’ll all look down. Voila! All 10.

But to deal with this as a legitimate puzzle, I think there’s an element (or several) missing, and I can probably guess what it is: the king has a total of 10 hats, 5 of each color (or some variant thereof). If the king has 10 hats of each color, and assuming we can prohibit communication between the men once the process begins, then it’s impossible for anyone to know what color hat they have. Man #10, even if he sees 9 corpses lying on the ground with white hats, won’t know if he as white hat #10 or black hat #1 on.

But if the king has a limited pool of hats, Man #10 can count up white and black hats on the corpses, and determine what color his is (hint: it’ll be the only one left). Indeed, if the first five guys get white hats, the last five will know that theirs are all black.

In fact, assuming a limited pool of hats and the fact that they can each see everyone else’s hat before guessing, they can all survive: Man #1 looks at the 9 others and counts the number of black and white hats deducing his color as the last hat left. Repeat ad inifinitum.

I dig these kinds of puzzles, but we’re missing some crucial information. Mardi: (i) what is the pool of hats the king has to choose from; (ii) what does “their method of choosing” mean?-- the order in which they go? the manner in which they signal their choice? etc.; (iii) how much knowledge do they have at the time the deed goes down-- can they see each other’s hats? Know each other’s guesses, etc.?

Can you give us any more guidance?

Sorry - I can’t. I told you what he told me.
I went the same route as the person above - the problem is that you can’t save everyone -

Let’s say the first man looks at the second and replies that his hat is white. The first man saves the second by giving the answer (he may or may not die so his life isn’t guaranteed). The second man now has a choice - he can say his own hat color and survive leaving man #3 to his own wits or say the next man’s hat color. If that next man’s hat color is not his own -he dies. So - if you follow that down the line, every other man giving information and possibly giving up his own life, that leaves four (or five - I am still working with that).

But - you were given all I was given. I liked the earlier answer about eye movements telling hat color - that would save nine, the first man would have to still guess - unless the other can look back at him.

Ugh…


The snozberries taste like snozberries!

Assuming they each see each other’ hats, but can’t communicate except that the other prisoners know what the previous prisoners choices were, I can save at least five. The first prisoner looks at the other prisoners, and chooses his hat to match the majority of the hats he sees. There will be at least five hats of that color, so if everyone picks that, at least five will live. I might be able to do one better, but I have to thin some more.


It is too clear, and so it is hard to see.

Ha! Based only on knowing the other prisoner’s hat colors, and the first person’s guess, I can save nine of them!

They agree that the first person will look at the other nine, and if the minority hat color is even, he will guess that color, otherwise he will guess the other color. The others ignore the hat of the first person called, and look at the other 8 people. Unless they see a 4-4 split, they know which color is the minority hat color, and they can tell whether the hat they can’t see (their own) belongs in the minority or majority.

If they see a 4-4 split, they know the first person picked the color he saw 4 of, so they know their own hat is the other color.

It is too clear, and so it is hard to see.

I think I can do better. Suppose they agree that person #1 will look at all the hats and if they’re all the same color, he will guess that color. Otherwise he’ll remain silent. Now, if he guesses a certain color, all the others can guess that color, and they all live. The first guy, however, has a fifty-fifty chance of living. There’s a one in 1012 chance that they will all live and a one in 1012 chance that all but one will win.
So what if he doesn’t see hats all of the same color? Then they go around the circle. If anyone sees hats of all the same color, he knows that his hat must be a different color, because otherwise the first guy would have seen a bunch of hats all the same color. Once any one person guesses their own hat color, it’s pretty easy for everyone to figure out what color hat they have.
So the only problem is if it comes around to the first guy again. If no one has guessed a color, and he sees one guy with a different color hat than everyone else, he knows that he must have that color hat as well, because otherwise the person with the different hat would have seen hats of all the same color. If he doesn’t see this, then he says nothing, and it moves on to the second guy. This reasoning works for him, too, and the rest of them. If no one guesses their hat color, then the first guy can look and see if there are exactly two hats of a certain color. If so, he must have that hat color for basically the same reason as for if he sees exactly one hat of a certain color. Again, this reasoning pertains to the rest. If none of them figure out their hat color, then the first guy should look to see if exactly three people have the same hat color, then if exactly four.
So there’s a one in 1012 chance that one guy will die with this strategy, and a 1012 in 2024 chance that they will all live. Not bad!

Not a statistics solution; Sit in a circle. Each prisoner is responsible for the person next to him. Right hand palm up if his hat is white, palm down if it’s black.

3 sentences, beat that!

Okay, I really need to brush up on my binary. That should be “one in 1024 chance of only one person dying, amd 1023 in 1024 chance that all will live.”

Am I missing something here? The OP didn’t say anything about anybody being killed or needing to be saved or whatever. It just said that an evil king put different colored hats on some guys.

Oooh, how evil!

So what was left out of the OP?

-m

Hello image :slight_smile: :
I guess that the idea that evil people don’t ask people to do anything unless they’re planning on killing them if they fail is so embedded in our culture that it’s taken for granted.

My previous strategy works, but the reasoning isn’t quite correct. It also assumes some way of knowing whose “turn” it is. The following strategy fixes both problems. As it’s worded, it requires either that everyone have a time piece or have a reasonably good sense of time. However, assuming that there is no time limit, it can be modified for any degree of accuracy or lack thereof.
First, one person is chosen as #1 before the hats are assigned. If he sees hats all of one color, he guesses that color. Otherwise, they proceed as follows:
Each of the other people calculate an individual time limit by counting the number of hats of the minority color among everyone that they see except #1. If #1 has a black hat, two is added to this number; otherwise one is added. This number is then multiplied by ten to give the time limit. If no one else has guessed their hat color by an individual’s time limit, then that person is to wait five seconds, then announce that their hat color is whatever the minority hat color is. If someone does announce their hat color before someone else’s time limit, then that other person announces that their hat color is the opposite of the guesser’s.
#1 looks at everyone else, and is able to figure out what everyone’s time limit is, assuming he has a white hat. If, five seconds after someone’s time limit has expired, that person doesn’t announce their hat color, #1 knows that his color is black. If someone does announce their hat color five seconds after their time limit has expired, then #1 knows that his hat color is white.
Oh, and m:
come to think of it, the word “death” did appear in the subject.

The Ryan. If the king picks one of the people and says “What color is your hat?” your plan is hosed.


It is too clear, and so it is hard to see.

OK, let me re-ask. You guys have obviously all heard the problem before; I haven’t. [BOLD]The OP does NOT STATE THE WHOLE PROBLEM![/BOLD]

The OP does not say what determines death. What is the criterion for death? Does wearing a black hat mean you die? Does guessing your own hat color mean you live? What??

-m

I haven’t, and I think a lot of other people responding haven’t either. We’ve been trying to make reasonable assumptions to get a useful puzzle out. One of these assumptions was the king will let live a prisoner who guesses correctly. If the king just kills everyone with a black hat, or randomly kills prisoners after they guess, or kills them all anyway, no matter what, it’s not a very interesting puzzle, is it?

Mardi, what’s the deal? Did you meet the math professor, and give an answer? Did you get clarification of the puzzle? Did he make you wear a hat?


It is too clear, and so it is hard to see.

Well, yes I did mention that this requires that there not be a time limit. But if the king wanted them instantly dead, he would have just killed. Presumbably he wants to watch them try to figure out their hat colors, not just kill them as soon as possible.

My point was that your plan relies on the prisoners selecting who will answer. If the king chooses who must answer, it won’t work, even if the king gives him plenty of time.


It is too clear, and so it is hard to see.

Actually, ZenBeam, it would’t matter how the first person was chosen, as long as all ten prisoners know who it is, and have established among themselves some convention for order, following that. For instance, if the prisoners assign numbers to themselves, and the king picks, say, the one the prisoners call #3, then the order might be 3,4,5…10,1,2.


“There are only two things that are infinite: The Universe, and human stupidity-- and I’m not sure about the Universe”
–A. Einstein

What would matter is if:
-the king also chooses who the second person to answer will be
-the king doesn’t allow anyone to pass
-the king doesn’t allow anyone to guess their hat color prior to be called upon

If all of these conditions are met, then my plan won’t work.

OK, this is more robust than I had thought. It seems TR’s third condition, “-the king doesn’t allow anyone to guess their hat color prior to be called upon” is the only important one. Once they or the king select #1, (and using Chronos’ sequence, if necessary), when one of the others announces his color, isn’t everyone then able to calculate their color?


It is too clear, and so it is hard to see.