Three hats

Logic Level 2

Alice, Bob, and Charlie are playing a game with hats. Each is wearing a hat that is either red, yellow, or blue. Though there are three possible hat colors, they might not be distinct - perhaps there are three red hats, or two blue and one yellow.

Alice, Bob, and Charlie each look at the other two hats and simultaneously guess their own hat color. They must guess, and cannot convey any other information .

Before they don their hats, they can agree on a strategy. Is there a strategy that guarantees exactly one of them will guess correctly?

No. No, but they can guarantee at most one are wrong It depends on what hats they are wearing Yes.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Maggie Miller
Jul 23, 2015

Alice, Bob, and Charlie assign the numbers 0,1,2 to red, blue, yellow respectively.

Alice will guess as if the sum of the hat colors is divisible by 3. For example, if she sees a red hat (0) and a yellow hat (2), she will guess blue (1), since 0 + 2 + 1 = 3 0+2+1=3 .

Bob will guess as if the sum of the hat colors is one more than a multiple of 3. For example, if he sees a red hat (0) and a yellow hat (2), he will guess yellow (2), since 0 + 2 + 2 = 4 0+2+2=4 .

Charlie will guess as if the sum of the hat colors is one less than a multiple of 3. For example, if he sees a red hat (0) and a yellow hat (2), he will guess red (0), since 0 + 2 + 0 = 2 0+2+0=2 .

The actual sum of the hats must be equal to, one more than, or one less than a multiple of 3. Only the corresponding person will guess correctly, so there will be exactly one correct guess with this strategy. :)

This is absolutely beautiful! I'm going to delete my solution as it's complete bulls**t.

A Former Brilliant Member - 5 years, 10 months ago

That is a brilliant solution! I Think the problem is a bit misleading though because it says they arent allowed to convey any information . So is that algorithm-making section of the problem not counted as conveying information?

Jesse den Butter - 5 years, 10 months ago

Log in to reply

The problem specifies that they can agree on a strategy prior to wearing the hats - this is their strategy that doesn't require communication during guessing.

Maggie Miller - 5 years, 10 months ago

Log in to reply

Ahh yes, I see that now. Thanks!

Jesse den Butter - 5 years, 10 months ago

Can we work with Probabilities ?

Syed Baqir - 5 years, 10 months ago

Log in to reply

Your solution must guarantee exactly one is correct, not just give a high probability that exactly one is correct.

Maggie Miller - 5 years, 10 months ago

If three of them wear red(say). How do you propose the solution.????? The solution you provided is like an algorithm. So they have to act according to it.

Tanmoy Gupta - 5 years, 10 months ago

Log in to reply

They will each see two red hats, so Alice will guess red, Bob will guess blue, and Charlie will guess yellow, according to the strategy I have above (remember that 0 is a multiple of 3). Only Alice will guess correctly.

They each follow an algorithm to determine their guess, but that's a fine strategy format.

Hope this helps

Maggie Miller - 5 years, 10 months ago

Log in to reply

Yes That helped. Awesome. I was silly. Dammit

Tanmoy Gupta - 5 years, 10 months ago
Jonathan Moey
Jul 23, 2015

there are only 3 possibilities for each hat( red, blue and yellow ) , therefore they just need to guess the same colour . By pigeonhole principle, 1 of them will be correct

This is false. The problem states that the hat colors need not be distinct. If they all guess yellow (as an example), it is possible that each hat is actually red. Additionally, this method does not guarantee that exactly one person will guess correctly.

Josh Speckman - 5 years, 10 months ago

Log in to reply

According to the solution, they would not all guess yellow. One will guess Red, the other blue, and the third yellow.

Glenn Lee - 5 years, 10 months ago

Log in to reply

If three of them wear red(say). How do you propose the solution.????? The solution maggie provided is like an algorithm. So they have to act according to it.

Tanmoy Gupta - 5 years, 10 months ago

Log in to reply

@Tanmoy Gupta Exactly. It's an algorithm. If they all wear red hats, they each see 2 red hats. Now you think about it and follow the algorithm and see what you get.

Glenn Lee - 5 years, 10 months ago

Log in to reply

@Glenn Lee Yes, you are right. This serves the purpose. It was very silly of me.

Tanmoy Gupta - 5 years, 10 months ago

Yes, I was replying to Jonathan Moey's solution, which suggests that as long as they all guess the same color, exactly one will be correct.

Josh Speckman - 5 years, 10 months ago

sorry for giving the wrong information

Jonathan Moey - 5 years, 10 months ago

This answer is wrong. "therefore they just need to guess the same colour", I don't even understand you mean for them to guess one each or all three to guess "red, red, red". Both is wrong anyway.

Saya Suka - 2 months ago
Nathaniel Medrano
Jul 31, 2015

3 people, 3 different color hats, just each select a distinct color. Is it that simple, or am I missing something?

Well, you want exactly one to be right. Suppose you employ this strategy, with Alice guessing red, Bob guessing blue, Charlie guessing yellow.

If their hats are red, blue, yellow, then all three will be correct.

If their hats are red, blue, blue, then two will be correct.

If their hats are yellow, yellow, red, then none will be correct.

So this strategy doesn't work.

Maggie Miller - 5 years, 10 months ago

Log in to reply

Thanks. DIdn't think of that. In your solution, what happens if they see two red hats? Only Charlie can satisfy the strategy by choosing 2? Does Alice default to 0, and Bob defaults to 1?

Nathaniel Medrano - 5 years, 10 months ago

Log in to reply

Remember that 0 is a multiple of 3- Alice says 0 because 0+0+0 is a multiple of 3, and Bob says 1 because 0+0+1 is one more than a multiple of 3.

Maggie Miller - 5 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...