Jump to content
BrainDen.com - Brain Teasers
  • 0

4 hats puzzle


ANANymous
 Share

Question

Can someone solve the following brainteaser with an explanation of how the people in the problem choose hat color:

There are 4 people wearing black or white hats. They do not know the color of their own hat. They cannot communicate. They must come up with a strategy for simultaneously shouting out a hat color or keeping their mouth shut. Your goal is to come up with the solution that yields the highest probability of getting at least one hat color correct and no hat colors incorrect. For example, if the hats are black black black white in that order, and you guess black, doesn't guess, doesn't guess, doesn't guess, then this would count as a successful attempt; however if you guessed black, black, black, black, this would be unsuccessful.

Semi spoiler below-the solution for 3 people:

Using 0 as representation for white and 1 for black, you have the following table seating available. 000, 001, 010, 011, 100, 101, 110, 111

If every time you are at the table and you see two hats of the same color, you guess the opposite color, you will guess correctly in 6 out of 8 attempts, and if you do not see two hats of the same color, then you pass/ do not guess. This yields a 75% win rate for this game among the 3 participants.

Thank you in advance for answers.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 1

  Reveal hidden contents

Link to comment
Share on other sites

  • 0

There has been something similar posted: http://brainden.com/forum/topic/13034--

But it does not work for n=4.

In short the optimal solution for other values of n (including n = 3) is:

  Reveal hidden contents

Now for n = 4, I do not know of an optimal solution.

Link to comment
Share on other sites

  • 0

A solution with 50% odds is

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 0

I appreciate the responses araver; however this link does not provide the solution I am looking for:

http://brainden.com/forum/topic/13034--

And the answer I believe is greater than the answer to 3 people.  I believe it is not 50% based on the person who asked this question initially (who also knew the answer, but whom I can no longer locate).

  Reveal hidden contents

 

Edited by ANANymous
Link to comment
Share on other sites

  • 0

First thoughts (that are consistent with a better result than in the 3-person example):

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 0

Yeah, that's not what I meant. I did not mean to discourage you from trying, just trying to put you in the right direction.

Lemme rephrase that:

If you could do a strategy with the odds you are expecting, you would design a very efficient error correcting code. There's a thing called Hamming bound preventing that. Non-trivial cases when one happens to reach that bound have been mapped out since the 70s (for prime alphabets, so including binary). Mathematical proofs. One class is the one I gave you in the spoiler above. The other works for larger n.

In basic terms, every bit of information you add is another entropy generator that messes up the cases. Only in perfect settings one can separate entropy in different "jars" efficiently.

P.S. All of these codes are used in every bit of technology you currently use.

Link to comment
Share on other sites

  • 0
  On 10/23/2016 at 10:26 PM, bonanova said:

Following the lead of the 3-person example, look for strategies where everyone will guess wrong in a very few special cases, i.e. 1111 and 0000. If you can get all the wrong individual guesses into those two cases you can achieve 14/16 = 0.875 success probability. And you can't do better than that. 1111 and 0000 have the same likelihood of success, and they together comprise 12.5% of the cases. That's the smallest available container for housing the wrong individual responses.

Expand  

Herein lies my initial question:  How do we achieve 14/16, what is the selection method used by the 4 hat wearing participants?  Is that solvable?

Link to comment
Share on other sites

  • 0

perhaps this tho would consider it cheating per the assumed spirit of these types of brain teasers

  Reveal hidden contents

 

Link to comment
Share on other sites

  • 0

I like phaze's solution. I would add just a tweak, as described in the second spoiler.

Recap:

  Reveal hidden contents

Tweak.

  Reveal hidden contents

 

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...