Open Side Menu Go to the Top
Register
Hat problem Hat problem

09-19-2009 , 07:37 PM
4 bridge players are presented with the following problem:

They are all randomly assigned black or white hats. They cannot see their own hat colour, but they can see the other 3 hats.

At a given signal, they simultaneously must make one of the following two actions:
1) remain silent, or
2) guess their hat colour

If anyone on their table guesses correctly, with no incorrect guesses, they win a bottle of champagne. If anyone guesses incorrectly,or no-one guesses, they don't win the champagne but there are no nasty side effects.

If anyone tries to cheat by finding their hat colour before the guesses, they will all be shot. If there is signalling, they will all be shot etc.

The odds of being given a black hat is 50%, and the odds do not change dependant on the other players' hat colours. (This is to avoid Baye's theory in possible solutions.)

They are highly intelligent, and can agree on a strategy before the hats are given out.

What strategy maximises their chances of champagne?

(Zeno: this is is maths problem. But feel free to move it if there is a better home for it elsewhere.)
Hat problem Quote
09-19-2009 , 07:48 PM
Quote:
Originally Posted by river_tilt
and the odds do not change dependant on the other players' hat colours.
Well, this tells me that the chance of guessing correctly are exactly 50%. If there were exactly two black and two white hats, then they would win the champagne 100% of the time.

I take it that, if someone doesn't guess, that it isn't counted against the group unless no one guesses, i.e. if one person guess correctly and no one else guesses, then they get the champagne. Then I think the right strategy is clearly to have only one person guess.
Hat problem Quote
09-19-2009 , 08:02 PM
If it's random and it's possible for them to all have the same colour hat, then the odds of them all guessing correctly is (1/2)^4. Knowing other people's hats doesn't matter. Therefore, the optimal strategy is for ONE person to guess and just guess...they maximize at 50% probability of winning.
Hat problem Quote
09-19-2009 , 08:11 PM
I think OP made it too easy for them. They should all have to guess correctly to win. I this case

Spoiler:
They might as well all guess


Spoiler:
The best they can do is still 50%


rather than

Spoiler:
1/16


I'll let others elaborate.
Hat problem Quote
09-19-2009 , 08:12 PM
The 50% solution is along the right lines, but it's not optimal.

The optimal solution has a 75% chance of champagne. Knowing this figure won't help you, though....

This problem is surprisingly non-trivial.
Hat problem Quote
09-19-2009 , 09:07 PM
Quote:
Originally Posted by river_tilt
The 50% solution is along the right lines, but it's not optimal.

The optimal solution has a 75% chance of champagne. Knowing this figure won't help you, though....

This problem is surprisingly non-trivial.
Okay I changed the problem. So in my version where every player must guess black or white
Spoiler:
For any number n players n>0,
they decide in advance that they'll guess that there will be an even number of black hats, and then declare accordingly when they see the other hats. With 50% chance they're all right, and with 50% chance they're all wrong.

In your version where every player must guess black or white or no-guess, and they win as long as there is no incorrect guesses, and at least one correct guess
Spoiler:
For any number n players n>2,
players 4 to n don't guess,
each player 1 to 3 only guesses if the other two have the same color, in which case he guesses the opposite color.
They win as long as players 1-3, don't all have the same color, i.e. with 75% chance.

I didn't prove this is best possible. I'll let someone else do that.

Last edited by thylacine; 09-19-2009 at 09:29 PM. Reason: grammar
Hat problem Quote
09-19-2009 , 09:47 PM
If the hat distribution is random from all black to all white, why does anyone do better by knowing what hats other people wear?
Hat problem Quote
09-19-2009 , 10:37 PM
Quote:
Originally Posted by river_tilt
What strategy maximises their chances of champagne?
For each of them to sit at a table by themselves.
Hat problem Quote
09-19-2009 , 10:49 PM
Quote:
Originally Posted by durkadurka33
If the hat distribution is random from all black to all white, why does anyone do better by knowing what hats other people wear?
Their guesses aren't independent. They plan a strategy together in advance.
Hat problem Quote
09-19-2009 , 11:44 PM
Alright.

Spoiler:
Each one of them is assigned a number, from 1 through 4. The first person to guess is #1 (that will be me, just to make things easier). #1 guesses based on the number of black hats he sees. If he sees an even number of black hats, he guesses "black." If he sees an odd number of black hats, he guesses "white."

Based on his guess, the others are aware of how many black hats he saw, and therefore of whether their own hats are black (if not, then their count will agree with #1's count, and if so, their count will disagree with his). This solution can be extended to any group of n players, such that one player chooses based on whether the total number of black hats visible to him is even or odd, and the other players then count up the number of black hats they see (ignoring #1's hat color, which is not relevant to anything). If their count agrees with his, they will always have a white hat. If their count disagrees with his, they will always have a black hat.


This gives one players a 50% chance of success, and all the others a 100% chance of success.

Edit:
Spoiler:
It's probably best if the numbering scheme isn't used at all, and one guy is simply designated as the guesser. I'm applying a solution from another problem I solved awhile back, in which order is relevant.


Edit - Oh ****, simultaneous. Never mind, reading comprehension fail.

Last edited by madnak; 09-19-2009 at 11:52 PM.
Hat problem Quote
09-19-2009 , 11:51 PM
Do you see why that's only a 50% chance though?

You haven't solved for the 75% solution. Your strategy need only stop w/ the 1st person. If they guess right, why would any of the others guess? They win if the first person is right...if the first is wrong, then it's game over.
Hat problem Quote
09-19-2009 , 11:54 PM
Okay, I think I got it:

Spoiler:
Everyone counts which hat color there is more of. They guess the opposite color. This works due to entropy, ie, in more likely situations there is a more even distribution of colors.
Hat problem Quote
09-19-2009 , 11:55 PM
Quote:
Originally Posted by madnak
Alright.

Spoiler:
Each one of them is assigned a number, from 1 through 4. The first person to guess is #1 (that will be me, just to make things easier). #1 guesses based on the number of black hats he sees. If he sees an even number of black hats, he guesses "black." If he sees an odd number of black hats, he guesses "white."

Based on his guess, the others are aware of how many black hats he saw, and therefore of whether their own hats are black (if not, then their count will agree with #1's count, and if so, their count will disagree with his). This solution can be extended to any group of n players, such that one player chooses based on whether the total number of black hats visible to him is even or odd, and the other players then count up the number of black hats they see (ignoring #1's hat color, which is not relevant to anything). If their count agrees with his, they will always have a white hat. If their count disagrees with his, they will always have a black hat.


This gives one players a 50% chance of success, and all the others a 100% chance of success.

Edit:
Spoiler:
It's probably best if the numbering scheme isn't used at all, and one guy is simply designated as the guesser. I'm applying a solution from another problem I solved awhile back, in which order is relevant.


Edit - Oh ****, simultaneous. Never mind, reading comprehension fail.
You are doing a different problem. OP specified guesses are simultaneous, not sequential. Oh haha I just noticed you editted.
Hat problem Quote
09-20-2009 , 12:04 AM
Quote:
Originally Posted by madnak
Okay, I think I got it:

Spoiler:
Everyone counts which hat color there is more of. They guess the opposite color. This works due to entropy, ie, in more likely situations there is a more even distribution of colors.
No, because too often some will guess wrong and they lose.
Hat problem Quote
09-20-2009 , 12:50 AM
Quote:
Originally Posted by thylacine
No, because too often some will guess wrong and they lose.
Everyone wins in a 2/2 case. One person wins and everyone else loses in a 1/3 case. Everyone loses in a 0/4 case.

So in 3/8 of all cases, everyone wins. In 1/8 of cases, nobody wins. And in half of cases, 25% win. That only adds up to 50% again, though. So yeah, no help.

It seems like the only information a player can have is that of which colors the hats of the other players are and the knowledge of the strategy formulated previously. Given ONLY this knowledge, they have to get a 75% correct rate?

Even mixed strategies are coming up on 50% for me, but it seems like the formulated strategy must provide some special information. Maybe if each player has a different strategy, and the strategies of some of the players are based on the strategies of other players?
Hat problem Quote
09-20-2009 , 12:56 AM
Oh, wait, they can remain silent. I thought they had to guess every time. Okay, I'm just going to shut up now. At least until I'm not so tired.
Hat problem Quote
09-20-2009 , 02:47 AM
Quote:
Originally Posted by river_tilt
4 bridge players are presented with the following problem:

They are all randomly assigned black or white hats. They cannot see their own hat colour, but they can see the other 3 hats.

At a given signal, they simultaneously must make one of the following two actions:
1) remain silent, or
2) guess their hat colour


If anyone on their table guesses correctly, with no incorrect guesses, they win a bottle of champagne. If anyone guesses incorrectly,or no-one guesses, they don't win the champagne but there are no nasty side effects.

If anyone tries to cheat by finding their hat colour before the guesses, they will all be shot. If there is signalling, they will all be shot etc.

The odds of being given a black hat is 50%, and the odds do not change dependant on the other players' hat colours. (This is to avoid Baye's theory in possible solutions.)

They are highly intelligent, and can agree on a strategy before the hats are given out.
What strategy maximises their chances of champagne?

(Zeno: this is is maths problem. But feel free to move it if there is a better home for it elsewhere.)
I don't know if this question is phrased "correctly".

Answer to question if players are allowed to remain silent only for some time and then guess:

Spoiler:
The four bridge players agree to do the following: if anyone notices that the hats of the other three are of the same color, in the first minute they guess that their own hat is of the opposite color; otherwise, they remain silent for the first minute. After one minute has passed and nobody has guessed, there must be exactly two hats of each color (otherwise, there would be at least one person that notices that the other three have hats of the same color) and so each player knows the color of his/her own hat.

IMHO, the more general version is better.

In the more general version of m persons at a table (say m>=2), to maximize chances, they simply agree to do the following: each of them observes the number n = number of hats of the color least represented (e.g., for m=14, if a player sees 7 white hats and 6 black hats, n = 6) and are to remain silent for n minutes if nobody has already guessed; otherwise, he/she guesses the color of his/her own hat to be the color least represented. They only fail when all the hats are of the same color, i.e., it's interesting to note that the greater the number of hats, the more likely the players are awarded.
Hat problem Quote
09-20-2009 , 03:14 AM
Quote:
Originally Posted by thylacine
Okay I changed the problem. So in my version where every player must guess black or white
Spoiler:
For any number n players n>0,
they decide in advance that they'll guess that there will be an even number of black hats, and then declare accordingly when they see the other hats. With 50% chance they're all right, and with 50% chance they're all wrong.

In your version where every player must guess black or white or no-guess, and they win as long as there is no incorrect guesses, and at least one correct guess
Spoiler:
For any number n players n>2,
players 4 to n don't guess,
each player 1 to 3 only guesses if the other two have the same color, in which case he guesses the opposite color.
They win as long as players 1-3, don't all have the same color, i.e. with 75% chance.

I didn't prove this is best possible. I'll let someone else do that.
This looks correct and "trivial", no?
Hat problem Quote
09-20-2009 , 04:11 AM
Quote:
Originally Posted by bigpooch
This looks correct and "trivial", no?
thyalcine's solution is correct for 4 palyers. The non-triviality comes about (with 4 players) if you do not force someone to pass - without this you can (with difficultly) construct a strategy with 9/16 success rate.

I have no idea if the solution is optimal with N players (N>4). It probably is, but proving it seems too much like hard work.
Hat problem Quote
09-20-2009 , 04:27 AM
Quote:
Originally Posted by river_tilt
thyalcine's solution is correct for 4 palyers. The non-triviality comes about (with 4 players) if you do not force someone to pass - without this you can (with difficultly) construct a strategy with 9/16 success rate.

I have no idea if the solution is optimal with N players (N>4). It probably is, but proving it seems too much like hard work.
The most common call for bridge players is "pass" so having the word "bridge" can be considered a hint.
Hat problem Quote
09-20-2009 , 06:05 AM
Quote:
Originally Posted by river_tilt
The non-triviality comes about (with 4 players) if you do not force someone to pass - without this you can (with difficultly) construct a strategy with 9/16 success rate.
If everyone has to guess black or white, then they have no strategy to win more than 1/2 the time.

So what are you saying with this 9/16? Is it yet another version of the problem?

With the original problem (where every player must guess black or white or no-guess, and they win as long as there is no incorrect guesses, and at least one correct guess) with n>0 players, they can do no better than to win n/(n+1) of the time, though they can attain that upper bound if and only if n+1 is a power of two. So FWIW I guess they can always do at least

1-2^{-\lfloor\log_2(n+1)\rfloor}
Hat problem Quote
09-20-2009 , 06:11 AM
Grunch:

http://en.wikipedia.org/wiki/Hamming_code

How do we generalise the solution using hamming codes to cases where the number of players is not 2^k-1 ? (as in the OP for instance).

Last edited by Pyromantha; 09-20-2009 at 06:19 AM.
Hat problem Quote
09-20-2009 , 06:29 AM
Quote:
Originally Posted by river_tilt
thyalcine's solution is correct for 4 palyers. The non-triviality comes about (with 4 players) if you do not force someone to pass - without this you can (with difficultly) construct a strategy with 9/16 success rate.
It seems like there is a 3/4 success solution according to this webpage:

http://narandus.blogspot.com/2009/02/hat-problems.html

Thylacine: I think what river_tilt meant with regard to your original 3/4 solution is that you are not permitted to nominate any one person who will pass in advance. All players have to make their decision to pass, or choose a color solely based on the colors of hats that they observe, rather than their 'ordering'. You can phrase the problem to make it impossible to choose any 'ordering' anyway but it would probably be a bit wordy !

Last edited by Pyromantha; 09-20-2009 at 06:38 AM.
Hat problem Quote
09-20-2009 , 08:49 AM
Quote:
Originally Posted by Pyromantha
Grunch:

http://en.wikipedia.org/wiki/Hamming_code

How do we generalise the solution using hamming codes to cases where the number of players is not 2^k-1 ? (as in the OP for instance).
LOL, I actually figured it out for myself, during this thread, but I figured every conceivable version of this problem was thoroughly researched. After all the OP obviously heard the problem from somewhere.

Quote:
Originally Posted by Pyromantha
It seems like there is a 3/4 success solution according to this webpage:

http://narandus.blogspot.com/2009/02/hat-problems.html

Thylacine: I think what river_tilt meant with regard to your original 3/4 solution is that you are not permitted to nominate any one person who will pass in advance. All players have to make their decision to pass, or choose a color solely based on the colors of hats that they observe, rather than their 'ordering'. You can phrase the problem to make it impossible to choose any 'ordering' anyway but it would probably be a bit wordy !
That's called making up the rules as you go along. There are obviously many possible variations of this problem so it needs to be made clear which one is intended.

I still want to know which variation gives 9/16.
Hat problem Quote
09-20-2009 , 05:18 PM
Given that the action is simultaneous and each person's hat outcome is independent, how can the answer be anything other than one person just guess, thus 50% probability of champagne?

Last edited by ctyri; 09-20-2009 at 05:22 PM. Reason: OK, read the link now. I see the solution but not sure if it violates any assumptions as yet...
Hat problem Quote

      
m