wu :: forums
« wu :: forums - Re:SIMULTANEOUS HAT COLOR GUESSING »

Welcome, Guest. Please Login or Register.
Apr 19th, 2024, 7:21am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: Grimbal, Eigenray, william wu, ThudnBlunder, towr, SMQ, Icarus)
   Re:SIMULTANEOUS HAT COLOR GUESSING
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Re:SIMULTANEOUS HAT COLOR GUESSING  (Read 9568 times)
Matt
Guest

Email

Re:SIMULTANEOUS HAT COLOR GUESSING  
« on: Jun 2nd, 2003, 3:19pm »
Quote Quote Modify Modify Remove Remove

I've been trying to work on this problem, but i can't seem to find a way to make a perfect 100% probability.  Can someone help?  Here's the riddle in case you can't find it on the site.
------------------------------------------------------------------------ --------
Three players enter a room and a red or blue hat is placed on each person's head. The color of each hat is determined by a coin toss, with the outcome of one coin toss having no effect on the others. Each person can see the other players' hats but not his own.
 
No communication of any sort is allowed, except for an initial strategy session before the game begins. Once they have had a chance to look at the other hats, the players must simultaneously guess the color of their own hats or pass. The group shares a hypothetical $3 million prize if at least one player guesses correctly and no players guess incorrectly.
 
The same game can be played with any number of players. The general problem is to find a strategy for the group that maximizes its chances of winning the prize.
IP Logged
Leo Broukhis
Senior Riddler
****





   


Gender: male
Posts: 459
Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #1 on: Jun 2nd, 2003, 5:44pm »
Quote Quote Modify Modify

It is allowed for all players to pass, I assume.
 
The same strategy for 4 players wins with p=1/2, loses badly with p=1/8, and with p=3/8 everybody is silent ("loses gracefully"), and I do not see a way to improve that.
 
For 5 players we can do better than pWin=5/16 achievable by  
THUDandBLUNDER's strategy.
IP Logged
tohuvabohu
Guest

Email

Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #2 on: Jun 3rd, 2003, 4:08pm »
Quote Quote Modify Modify Remove Remove

Any individual guess is 50/50. But you improve those odds by grouping the guesses.
Essentially, you plan it so that there are a few instances where there are a lot of wrong guesses and a lot of instances where there are a few right ones (and no wrong ones). When people guess wrong, everybody guesses wrong, and when people guess right, only the right ones are guessing.
 
Maybe one of the experts here can check my math.
 
For 5 players, add the strategem that if you see 2 red, 2 blue, guess a predetermined color (say Red). You'll win 20 out of 32 times.
 
For 6 players, by guessing the color that you see 0 or 3 of, you win 42 out of 64, I think.
 
For 7 players, guess the color that you see 0 or 2 of. 84/128.
 
For 8 players, guess the color that you see 0,3 or 5 of. 142/256
 
For 9 players, guess the color that you see 0,3 or 6 of. 342/512
 
For 10 players, guess the color that you see 0,3 or 7 of. 530/1024.
 
For 11 players, guess the color 1,4,7,9. 1366/2048
 
For 12 players, guess the color 1,4,8,11. 2158/4096
 
For 13 players, guess the color 2,5,8,11. 5460/8192
IP Logged
Matt
Guest

Email

Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #3 on: Jun 3rd, 2003, 11:24pm »
Quote Quote Modify Modify Remove Remove

I've found a way to make the probability 75%, but I'm told by a friend that there is a way of making it 100%, but he won't tell me.
 
If you take into account all probabilities, and work on a strategy, rather than individual guesses, you can increase the probability.
 
Here are the possible outcomes:
 
BBB
BBR
BRB
BRR
RBB
RBR
RRB
RRR
 
If you use the strategy:
If a person sees a blue and a red, they pass;
If a person sees a blue and a blue, they guess red;
If a person sees a red and a red, they guess blue;
The probability comes out like this:
 
 
(B=blue, R=red, P=pass)
 
actual   guess   correct?
BBB RRR no
BBR PPR yes
BRB PRP yes
BRR BPP yes
RBB RPP yes
RBR PBP yes
RRB PPB yes
RRR BBB no
 
As you can see, this is a 6/8, or 75% chance of being correct.  Can anyone find the 100%.
IP Logged
tohuvabohu
Guest

Email

Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #4 on: Jun 4th, 2003, 6:39am »
Quote Quote Modify Modify Remove Remove

Without communicating in any way, there's no way any of them can know his own hat color. Your friend may have some cheating in mind, like passing information by the way you look at each other, but that's communicating.
 
And my answer for 5 players was incorrect. You can win 22 out of 32 times by guessing the color you see 1 or 4 of.
IP Logged
Dante
Newbie
*





   


Gender: male
Posts: 7
Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #5 on: Jun 6th, 2003, 5:46am »
Quote Quote Modify Modify

OK, it's a Friday afternoon, and my brain doesn't work so well at the end of the week.  But when you have 4 or more players, can't you get a 75% win just as easily as with 3?
 
In the initial strategy session, nominate 3 players to play the game.  They look at each others hats only, and play as though the others weren't there (using the 75% strategy outlined by THUDandBLUNDER).  Everyone else passes.  
 
Am I missing something?
IP Logged
Rujith de Silva
Newbie
*





   
WWW

Gender: male
Posts: 22
Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #6 on: Jun 6th, 2003, 7:24am »
Quote Quote Modify Modify

There's no way to reach 100% certainty, but you can get pretty close
to it as the number of players increases.  Sorry, I don't know a
formula for it.  Here's a write-up I did a while back that maps the
problem into a hyper-cube.  It may help you visualize the problem
better.  http://home.earthlink.net/~rujith/threecrowns/
- Rujith.
« Last Edit: Jun 6th, 2003, 7:24am by Rujith de Silva » IP Logged
tohuvabohu
Guest

Email

Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #7 on: Jun 6th, 2003, 7:54am »
Quote Quote Modify Modify Remove Remove

My answer is still right. It's just the answer to a different riddle. Let's say that there was no strategy session, that no information could ever pass between the players, but every player knew the other players were smart enough to figure out the best overall strategy. Then my method is the best they could do. Picking just 3 people to guess would be an improvement, though.  
Rujith's strategy is better still. It is basically the same approach I attempted, except that I unnecessarily limited myself by requiring all players to use the same strategy. Of course, I was able to work out the strategy for 13 prisoners with just a piece of paper in a few minutes. I'd like to see the prisoners try drawing a 13-dimension hypercube and figuring out where to put their lollipops while the guards so very patiently wait.
IP Logged
Leo Broukhis
Senior Riddler
****





   


Gender: male
Posts: 459
Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #8 on: Jun 6th, 2003, 9:21am »
Quote Quote Modify Modify

The restriction requiring all players to use the same strategy is not unnecessary, it is required by the problem statement, which says that the players are allowed a strategy session. If the strategy they devise is not uniform, they would need to hold a tactics session to assign sub-strategies to particular players, and they are not allowed to do that.
IP Logged
James Fingas
Uberpuzzler
*****





   
Email

Gender: male
Posts: 949
Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #9 on: Jun 6th, 2003, 12:20pm »
Quote Quote Modify Modify

You might want to check out the other thread for this puzzle here.
 
This gives slightly better lower bounds for the success rates. Our consensus last time was that the strategy could include certain people always remaining silent. If you use the "Hamming Codes" solution, then you will use the N=3 solution for N=4,5, and 6. Once you get to N=7, you get a better solution:
 
1) Number all participants 1 to 7
2) Identify 16 different "codes" that the participants will identify. Here are 16 such codes that they could use:
RRRRRRR
BBBRRRR
BRRBBRR
BRRRRBB
RBRBRBR
RBRRBRB
RRBRBBR
RRBBRRB
RRRBBBB
RBBRRBB
RBBBBRR
BRBRBRB
BRBBRBR
BBRBRRB
BBRRBBR
BBBBBBB
3) If a participant sees all 6 other people matching the "code", then the participant guesses that his hat does not match the code.
 
Notice that each code given differs from all other codes in at least 3 places. This means that if a combination of hats differs by one from any code, then it differs by at least two hats from any other code. There are 7 ways to almost get a code for every code. For each of those 7 ways, one person will see what looks like a code, and the rest will know it's not a code. That one person will guess that his hat color doesn't match the code, and will be correct.  
 
That gives us 16*7=112 ways to win out of 16*8=128 possibilities. The only way to lose is if a code is actually generated, in which case everybody guesses wrong simultaneously. The probability of winning is therefore 7/8.  
 
As the number of people increases, you do get closer and closer to 100% performance. The jumps are as follows:
 
1:  0.500 = 1/2
3:  0.750 = 3/4
7:  0.875 = 7/8
15: 0.9375 = 15/16
31: 0.96875 = 31/32
63: 0.984375 = 63/64
etc.
 
However, generating the codes to do this is very difficult.
« Last Edit: Jun 6th, 2003, 12:21pm by James Fingas » IP Logged

Doc, I'm addicted to advice! What should I do?
tohuvabohu
Guest

Email

Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #10 on: Jun 6th, 2003, 2:10pm »
Quote Quote Modify Modify Remove Remove

I guess I rushed my original numbers. I didn't use the best strategy when the total was even. Up the winning odds for N=8 to 170/256. For N=10 it's 680/1024. For 12 it's 2730/4096. So for large N, my method tends toward .666...
Not nearly as good as the hamming method, but like I said, I'm solving a different riddle where there's no prior information passing, just each prisoner figuring out by himself the strategy he expects everyone to use.
So there's no numbering or ordering of the prisoners (I'll seat them in a circle so there is no number one, or maybe have them mill around in a crowd), so the only info they have is how many red hats they see and how many blue hats.  
 
Here's how I figured it for 21 prisoners.
In 2 cases the hats are 21/0 (red/blue or blue/red)
The prisoners all see 20/0
42 cases of 20/1. They see 0./20 or 19/1 (the first number represents the wearer's own color, tho he doesn't know that)
420 cases of 19/2. They see 1/19 or 18./2
2660 cases of 18/3. They see 2/18. or 17/3.
11970 cases of 17/4. They see 3./17 or 16/4
40698 cases of 16/5. They see 4/16 or 15./5
108528 cases of 15/6. They see 5/15. or 14/6.
232560 cases of 14/7. They see 6./14 or 13/7
406980 cases of 13/8. They see 7/13 or 12./8
587860 cases of 12/9. They see 8/12. or 11/9.
705432 cases of 11/10. They see 9./11 or 10/10
 
The bold numbers with decimal points are the guesses they should make (for example, if you see 9 of one color and 11 of the other, guess 9. Whenever that number is in the numerator, it's a win.) that maximize the number of victories and result in everybody guessing wrong at the same time. That's a win 1398102/2097152 times or 66.666698%
IP Logged
Yoda
Newbie
*





   
WWW

Posts: 11
Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #11 on: Aug 15th, 2003, 9:16am »
Quote Quote Modify Modify

In the three player hat game I think they can figure out their hat colors 87.5% of the time. Better than the 75% that was posted. And I think this logic can be used to improve all of the other games as well:
 
Round 1:
If you see two red hats call blue. (If you see 1 blue hat or two blue hats don't call anything).
 
Round 2:
Since the game has gone this far you know at least two hats are blue or somebody would have seen two red hats and called blue in round 1. So if you see a red hat you KNOW yours is blue.
 
Round 3: If nobody calls 'blue' in round 2, that is because nobody saw a red hat, so they are all blue. So everybody calls blue.
IP Logged
Yoda
Newbie
*





   
WWW

Posts: 11
Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #12 on: Aug 15th, 2003, 9:31pm »
Quote Quote Modify Modify

I think the algorithm that I suggested above can be generalized to beat everybody else's algorithms as such.
 
For the N player scenerio.
 
Round one:
If you see n-1 red hats call blue. Otherwise call pass.
 
Round two:  
If nobody called anything in round 1, then there are at least 2 blue hats so if you see n-2 red hats call blue. Otherwise call pass.
 
Round m <n:
If by now, nobody has yet called blue then, there must be at least m blue hats. If you see n-m red hats call blue. Otherwise call pass.
 
Round n:
If nobody has called blue by now, your hat is blue (as is everybody else's)
 
This algorithm has a probability of winning 1-1/2^n
 
3 player: .875
4 player: .9375
5 player: .96875
6 player: .984375
7 player: .9921875
 
And so at 7 players we already have a greater than 99% chance.  Cool
 
And the cool thing is that if you don't fail on the first round, you know you've won. In fact if you see two colors you know you've won because if somebody does make a guess on the first round they will guess right.
 
I think an intersting reformulation of this problem might be to change it so that there are ten players and each player has a red or blue hat but they don't know which. At least one person's hat is blue. They all answer simultaneously etc. etc. etc. . . . How can they be 100% certain of getting the right answer?
 
The algorithm above will work.
IP Logged
Yoda
Newbie
*





   
WWW

Posts: 11
Re: Re:SIMULTANEOUS HAT COLOR GUESSING  
« Reply #13 on: Aug 15th, 2003, 9:52pm »
Quote Quote Modify Modify

Oops! I see we are solving slightly different puzzles. I assumed that if everybody passes, then they will be asked again and so on until at least one person takes a stab at guessing.
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board