Jump to content
BrainDen.com - Brain Teasers
  • 0

Green and Yellow hats again, but harder


bonanova
 Share

Question

As promised, a harder hat problem.

Prisoners are seated in a circle so they can see all the others. This time the warden flips a fair coin for each prisoner and gives him a yellow or green hat, accordingly. Once all the hats have been placed, and have been seen by the others, prisoners are taken aside singly and given the opportunity to guess the color of his hat. And if instead he chooses not to guess, he is permitted to pass.

Now comes the bad part. Unless at least one prisoner guesses, and all the prisoners who do guess are correct, all the prisoners will be executed. That's right, survival requires perfection from every prisoner who guesses his color.

Prisoners decide on a strategy beforehand, and after the first hat is placed there is no further communication. Clearly, there can be a single "designated guesser" who ... just ... guesses a color. Half the time they all survive. But what kind of a puzzle would that be? Yes, incredibly, the prisoners can do much better. How? Maybe thinking about a three-prisoner case will answer that question.

Once you're convinced they can do better than a coin toss, find their best strategy.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 1
  Reveal hidden contents

 

Link to comment
Share on other sites

  • 1

For 3 prisoners:

  Reveal hidden contents
Edited by Molly Mae
Ninja'd
Link to comment
Share on other sites

  • 1
  Reveal hidden contents

 

Edited by Izzy
Link to comment
Share on other sites

  • 1

Not a generalized formula but better than strategy for three?

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 1

I think I see the pattern here and am encouraged by the beauty of binary symmetry so here goes:

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 0

  Reveal hidden contents

Link to comment
Share on other sites

  • 0

In games of this type every guess, on average, is wrong 50% of the time.

For the 3-prisoner strategy, if we count the number of guesses made in all 8 cases, we find six of them are correct and six are incorrect. We "rescue" the other cases, (when both colors are seen, and no guidance is available,) with the "Pass" option. The same is true in the previous G-Y puzzle.

The difference is that in the first puzzle every wrong guess produced a fatality, so survival also was only 50%. In the 3-prisoner case here, death uses up three wrong guesses (while survival still requires only a single correct guess.) We "packed" the incorrect guesses into the fewest possible of the eight cases and thus raised survival to 75%.

But since 2x3 = 6x1 randomness still got its due.

The 3-prisoner solution is trimmed-down version of the n-prisoner strategy. Have fun...

Link to comment
Share on other sites

  • 0

I'm missing

  On 1/27/2018 at 5:13 PM, Izzy said:

Now, consider when four hats are green and two hats are yellow.
None of the yellow people speak.
The person with the fourth green hat says "green", and they all live.

Expand  

I think I understand your analysis, but wonder how you would implement this.
Given they sit in a circle and guess (or pass) privately,

  Reveal hidden contents

 

 

Link to comment
Share on other sites

  • 0
  On 1/31/2018 at 11:17 AM, plainglazed said:

Not a generalized formula but better than strategy for three?

  Reveal hidden contents

 

Expand  
  Reveal hidden contents
Link to comment
Share on other sites

  • 0
  On 2/23/2018 at 9:52 PM, plainglazed said:

I think I see the pattern here and am encouraged by the beauty of binary symmetry so here goes:

  Reveal hidden contents

 

Expand  

That is amazing. And you've shown that 1 fewer than a power of 2 is the optimal value for n.

Can you reduce it to only q memorized strings, and the success rate to (q-1)/q, where q is the highest power of 2 less than or equal to n?

(Purposely leaving this un-spoilered, cuz this is a tough problem.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...