Jump to content
BrainDen.com - Brain Teasers
  • 0

3 Hats...


Anza Power
 Share

Question

Sorry if this has been posted before, a friend texted me this saying he needed the solution ASAP, I can proudly say I replied in a very timely manner... :D

Again it's that psycho warden with the obsession with hats and logic coming up with a new challenge, 3 prisoners, each gets a hat, the hats can be colored red green or yellow (no one knows how many hats in total there are of each color) each prisoner can see the hats of the other two but not his...

Each must write down the color of their hat on a piece of paper, if at least one of them is correct they all go free, what should they do?

(btw there's the usual rule if they talk or anything they all get executed, they may agree on a strategy before but that's it)

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Okay, the problem with this is that there isn't a set number of colors. If they can be any number of hats and they're all red, green and yellow, even trying to pick the one that you don't see won't mean anything. Just because you see red and yellow doesn't mean yours is green.



However, being able to plan out a strategy beforehand changes things, especially since only one of them has to get it right. One of them just has to go first and choose a color that he sees on the others, and the other two copy what he puts.
Link to comment
Share on other sites

  • 0

1 Red
2 Green
3 Yellow
Red
Green

Method


If Player 1 sees two matching hats he selects that colour otherwise he selects the missing colour

Player 2 does the same except when he selects he picks the next colour down the list

Player 3 does the same except when he selects he picks the next next colour down the list

Example

so if there are 2 red hats followed by a green one player 1 sees red and green so he picks Yellow (which is incorrect)

Player 2 however also sees a red and green hats so he picks yellow + 1 = red (which is correct)

Player 3 would see two red hats so would pick red + 2 = yellow (incorrect)

Edited by phaze
Link to comment
Share on other sites

  • 0

Sorry if this has been posted before, a friend texted me this saying he needed the solution ASAP, I can proudly say I replied in a very timely manner... :D

Again it's that psycho warden with the obsession with hats and logic coming up with a new challenge, 3 prisoners, each gets a hat, the hats can be colored red green or yellow (no one knows how many hats in total there are of each color) each prisoner can see the hats of the other two but not his...

Each must write down the color of their hat on a piece of paper, if at least one of them is correct they all go free, what should they do?

(btw there's the usual rule if they talk or anything they all get executed, they may agree on a strategy before but that's it)

Here's how I believe the prisoners should approach this

Let Red = 0, Green = 1, and Yellow = 2. Let the prisoners be labelled by numbers 1, 2, and 3, respectively, and let the prisoners' respective hats be denoted as h1, h2, and h3.

Prisoner i should assume that the sum of the all hats modulo 3 is equal to i. That is, prisoner 1 should assume that

(h1 + h2 + h3 ) modulo 3 = 1

Prisoner 2 would then assume

(h1 + h2 + h3 ) modulo 3 = 2

And prisoner 3 assumes

(h1 + h2 + h3 ) modulo 3 = 3 = 0.

After the game starts, each prisoner should look at the remaining 2 hats and compute his own hat number (or color) from the assumptions above. One of the assumptions would have to be right, so we are guaranteed to have 1 correct guess (and 2 incorrect guesses) every time using this strategy.

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.

Loading...
 Share

  • Recently Browsing   0 members

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