30 hats puzzler

An important piece of information is missing in today’s puzzler. When a prisoner responds “black” or “white”, when is he told he is correct or in error? Lacking this information, I guess we should try at least 2 versions of the puzzler: A) The prisoner is told after he answers but before the next prisoner is asked which color hat he has. B) All 30 answers are collected before any correct/incorrect information is given.

Ahh, the old can’t solve it so let’s change it strategem. Doesn’t matter. Call the prisoner at the back #30 and the prisoner at the front #1. No prisoner knows what the color of his hat is so #30 always has a 50% chance. Sorry, #30. #30 says the color of #1’s hat, #29 says the color of #2’s hat and so on until #16 says the color of #15’s hat. Then everyone says the color of their own hat. This way at least half the prisoners survive.

But this is better: #30 counts the black hats and the white hats. Whichever is an odd number, that’s the color he says. That gives everyone except him the information they need, and #30 still has a 50/50 chance. Sorry, #30.

You missed the real missing piece of information. The warden never says that guessing right wins a pardon.

piter - you’re also assuming in your better solution that there are an equal number of white and black hats. That was never given as part of the puzzler. If they have 1 white hat and 29 black hats, and #30 has a black hat, the lineup in front of him has 28 black hats and 1 white hat. Your method would have #30 saying white, which would be the same answer he would give if there were 27 white hats, 3 black hats, and he was wearing one of the black hats. In other words, it really doesn’t help the people in front of him.

However, you are very, very close to a proper solution… regardless of the overall ratio of white:black hats, there is a way to guarantee at least half of the prisoners “guess” properly.

There is only one person who has a 50/50 chance of being saved and that is number 30. Number 30 counts all the white hats and if the number is odd he says his hat is white if even then he says it black.

Lets say that #30 sees 5 white hats he then says white. The next person in line then counts the number of white hats in front of him, and if the number of white hats is even then he knows he has a white hat, if the number is odd he has a black hat. The number of white hats doesn’t matter the next guy in line knows if the number of white hat is odd or even and with that information he can figure out if his hat is black or white.

@eraser1998: “you’re also assuming in your better solution that there are an equal number of white and black hats. That was never given as part of the puzzler.

No, I’m not assuming anything about the number of each color hat. Remember that everyone can see all the hats in front of him, except #1. rwee2000’s explanation is correct.

However, you are very, very close to a proper solution…regardless of the overall ratio of white:black hats, there is a way to guarantee at least half of the prisoners “guess” properly.

Yes, it’s my first solution. Thank you, come again.

piter - you never declared how the people in front of #30 use the information. The solution you give implies that they simply repeat what #30 says… unlike rwee2000 who gives quite a bit more detail.

Wow. You seem to see assumptions and implications where none exist.

The solution you give implies that they simply repeat what #30 says…

No, by Godfrey! It implies nothing of the sort!

Repeating what #30 says would only work if there were either 29 or 30 hats of the same color. Yet you said above: “piter - you’re also assuming in your better solution that there are an equal number of white and black hats” So which is it? Am I assuming the one or implying the other? Hint: it can’t be both and is in fact neither.

Excuuuuuse me for leaving the reader something to figure out.

piter - your reading comprehension skills are failing you.

I’d ask you to explain, but you’ve been wrong each time so far. Why should this time be any different? Thank you, come again.

piter and eraser: now you’re just egging each other on.

Moi? Message received.

Didn’t we do prisoners in a line with black and white hats last year, or maybe earlier this year?

Different version? I think there’s one where the prisoners weren’t in a line; they could all see each other. Eraser found one where they were in a line. I think TorR said this was last in the series.

Close to the same idea…

http://www.cartalk.com/content/puzzler/transcripts/201048/index.html

… in that it involves prisoners and hats, yes.

Predictably, this week’s Puzzler is recycled from a previous one:

http://www.cartalk.com/content/puzzler/transcripts/200206/answer.html

Oh, and spoiler alert! My solution was of course right.

The Puzzler isn’t the only one in need of a summer vacation!
I caught the drift of Raymie’s convoluted and bogus hat Puzzler answer before mercifully nodding off. It only works at all if the only blind inmate is escorted to the back of the line, and if none of the others is dyslexic or mathematically challenged (for example, “odd” referring to getting a tattoo of the warden’s face; “even” to getting retribution).
My engineering degree is from ********, not M.I.T. (Mammaluccos In Training). Look, the elegant answer only assumes that the inmate in the back of the line can see the hat worn by inmate #29. If it’s the same color of his, no inmate would face execution as long as each of the 29 in turn recites the color spoken by the inmate to his rear (or to his back if not spoken by a midget).

Correction: only one inmate can be blind, and he must be at the head of the line.

Look, the elegant answer only assumes that the inmate in the back of the line can see the hat worn by inmate #29. If it’s the same color of his, no inmate would face execution as long as each of the 29 in turn recites the color spoken by the inmate to his rear (or to his back if not spoken by a midget).

Care to explain what the heck you’re talking about?

Correction: only one inmate can be blind, and he must be at the head of the line.

Same again please. When you say “engineering degree” do you mean something else? You’re not making any sense.

Carolyn, can I please mock this guy? He did after all use the word “midget”. Please?

Both of my previous posts are bogus, piter. Wish that was just a ploy to see if you’re paying attention, but the fact of the matter is, I, too, need a vacation.
But my inelegant Puzzler answer nevertheless improves survival odds for a minimum of all the odd-numbered inmates, assuming the evens are willing to tip them off by revealing their hat color. Thus the evens all have at least a 50/50 survival chance, and fewer than 15 inmates likely face execution. My hat is off to them!
Moreover, if any inmate is blind, Raymie’s answer reverts to 50/50 for those remaining in line. Optimally, all even-numbered inmates would be either blind or have '60s engineering degrees.

Rwee2000 got it right and then eschewed the ensuing p****** contest. Hats off to him! His answer is very similar to T&R’s, except that his actually works because he focuses on a single color. T&R, what happens when some hapless soul looks ahead and sees an even number of both black and white hats hmmmm??? Actually he is OK, but with your scheme the next guy has only a 50/50 chance of being right.

Also, this puzzler makes some serious assumptions. While there are no doubt MIT graduates in prison (and no doubt more should be) your average inmate does not have a strong math background. Would you trust the guy behind you to tell an odd number from an even one? For that matter what if he has to count higher than 21?