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

Welcome, Guest. Please Login or Register.
Apr 23rd, 2024, 9:00pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   hard
(Moderators: Grimbal, ThudnBlunder, towr, william wu, SMQ, Icarus, Eigenray)
   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: SIMULTANEOUS HAT COLOR GUESSING  (Read 4968 times)
AlexH
Full Member
***





   
Email

Posts: 156
SIMULTANEOUS HAT COLOR GUESSING  
« on: Jul 29th, 2002, 11:31pm »
Quote Quote Modify Modify

Interesting connection between these problems.  
 
Given a group of N people, find the largest set H of hamming distance 3 on N bits (i.e. a 1-error-correcting code). Any player who sees that everyone else's hat matches one of the points p in H announces his hat as the opposite of the color it would be if P was correct. Any player who sees hats which require 1 change in addition to the determination of their own hat in order to be in H remains silent (passes).
 
Analysis:  
If we land on a point Q which is adjacent to a point P in H,  then the only player who will see the hats appear to line up with a point in H is the one whose hat is the difference between P and Q. He will correctly guess the opposite of his hats color in P and everyone else will remain silent. So, the players win. If we land on a point P in H, then everyone sees hats correspoding to P and all will incorrectly guess the opposite of  their hat in P, so the players lose. Since there are N points adjacent to a point in H for every point that lies in H, this means that, of the space covered by H and the neighbors of P,  our odds are (N/N+1).
 
If we exclude the "dead zone" of points not adjacent to points in H this result is optimal. For any win we must have one player say a color, and any player speaking has only a 50/50 chance of being correct since he has no information about his hat color. So the best we can do is have 1 player speak the correct color N/(N+1) of the time and have all players speak incorrectly the other 1/N+1 of the time.
 
For every length 2^m -1 there is a Hamming code which is perfect (i.e. the whole space is within 1 of a codeword) and so this solution is optimal for those lengths. For lengths between those values we have a lower bound on our success rate. We can always achieve at least as high a success rate on any N as we did on any M < N. Simply instruct the last N-M players to always remain silent and have the others use teh method for length M.  
 
Alternately we could use the parity check section of the next higher Hamming code. For M between successive perfect Hamming lengths L(m) and L(m+1), this method will cover (M+1)/(L(m+1) + 1) of the space and have a M/(M+1) success ratio on that fraction. This method by itself will never be better than the lower bound stated above, however we may be able to tweak this situation to get at least some chance in the dead space outside of the neighborhoods of our codewords. If we wind up in the dead space then everyone will either remain silent or will know that we're in the dead space and can implement a fallback. I don't have any particularly good ideas about doing this and I'm not sure if we can actually beat the original lower bound with this method.  
 
Finally, I'm no expert on coding theory so there may well be  a better coding on the lengths between Hamming codes  that I just don't know,  if so, and if it can beat the lower bound above, then use that. Smiley
 
For the special case of size 3 we get the strategy of "if you see two hats of the same color, guess the opposite of what you see". We get a 3/4 chance of success which is optimal since 3 is a Hamming code length so our H is perfect.
 
« Last Edit: Jul 30th, 2002, 3:59am by AlexH » IP Logged
Eric Yeh
Senior Riddler
****





   
Email

Gender: male
Posts: 318
Re: SIMULTANEOUS HAT COLOR GUESSING  
« Reply #1 on: Aug 1st, 2002, 3:48pm »
Quote Quote Modify Modify

Yup.  Nice job.
IP Logged

"It is better to have puzzled and failed than never to have puzzled at all."
HyberZoid
Guest

Email

Re: SIMULTANEOUS HAT COLOR GUESSING  
« Reply #2 on: Aug 4th, 2002, 8:26am »
Quote Quote Modify Modify Remove Remove

First of all i see no connection between the problems other than the binary "values".  
 
The group shares a hypothetical $3 million prize if at least one player guesses correctly and no players guess incorrectly.

 
This means that all the players who choose to guess (ie not to pass) must guess correctly, with at least one player guessing. The greatest chance then lies in choosing only one player to guess and the rest pass. Giving a 50/50 chance of winning.  
 
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.

 
This basically states that each player has no information about their own hat, which means their guess will be 50/50. If more than 1 player guesses (say n players) then the probability of winning is (1/2)^n.
 
AlexH said "if you see two hats of the same color, guess the opposite of what you see".
 
AlexH, you seem to be implying that the color of the other players' hats has some impact on the color of your own. The problem specifically states that the color of each hat is independant.
 
So basically, pick one person who gets a 50/50 guess (the rest pass).
 
HZ.
IP Logged
AlexH
Full Member
***





   
Email

Posts: 156
Re: SIMULTANEOUS HAT COLOR GUESSING  
« Reply #3 on: Aug 4th, 2002, 10:16am »
Quote Quote Modify Modify

You're assuming that the players' guesses are independent of the hat colors they see. The trick here is to use the hat colors that the players see to ensure that when a player guesses right,  he guesses right alone, but when he guesses wrong, everyone guesses wrong along with him. Each time someone guesses they have only a 50/50 chance of being right, but all of the "wrong 50 percents" are piled on top of each other while the "right 50 percents" are alone and cause a win. Take a look at the concrete case where n=3 and we use the strategy I describe and you should see that the odds of success are 75 percent making this better than the "1 person guesses" strategy.
IP Logged
kenny
Newbie
*





   


Posts: 12
Re: SIMULTANEOUS HAT COLOR GUESSING  
« Reply #4 on: Aug 5th, 2002, 1:41pm »
Quote Quote Modify Modify

The correct answer has a probability of success of (2^n-1)/(2^n).
 
I'll post the solution in a separate thread.
IP Logged
kenny
Newbie
*





   


Posts: 12
Re: SIMULTANEOUS HAT COLOR GUESSING  
« Reply #5 on: Aug 5th, 2002, 1:51pm »
Quote Quote Modify Modify

My bad.
 
I misread the puzzle.  I thought that, if no one guessed at all, then the players would be given another chance.  Apparently, if no one guesses, then they lose.
 
I guess my solution is for a slightly different puzzle.
 
-- Ken
IP Logged
AlexH
Full Member
***





   
Email

Posts: 156
Re: SIMULTANEOUS HAT COLOR GUESSING  
« Reply #6 on: Aug 5th, 2002, 6:16pm »
Quote Quote Modify Modify

If everyone remaining silent caused a replay then I think the best odds of success would be n/(n+1) and you'd achieve that using the same method as in the original problem. The chances would be exactly the same as the silence=loss case for the perfect hamming lengths of n=2^m - 1, but in between those lengths you'd gain an advantage. Basically allowing retrys on silence just be removes the need for the 1-error correcting code to fill the space. The explanation for n/(n+1) being optimal also applies to this new problem so I don't think that odds of (2^n - 1) / 2^n are possible.
IP Logged
Bazza
Guest

Email

Re: SIMULTANEOUS HAT COLOR GUESSING  
« Reply #7 on: Dec 15th, 2003, 8:05pm »
Quote Quote Modify Modify Remove Remove

Hats are black or white randomly, there is no option in the question not to answer, therefore Number 10 has to answer first and as he has no clues at all as to the colour of his hat he has to guess.  He has a 50/50 chance of living, but since he can see all other hats he should state the colour of hat number 9.  Number 9 will then definitely live (as the plan has been discussed beforehand and 9 will know what is going on).  Start again with Number 8 who has to guess, but will state the colour of 7's hat, etc etc..  Therefore 1,3,5,7,9 will definitely live, and 2,4,6,8,10 have a 50/50 chance of living.
IP Logged
rmsgrey
Uberpuzzler
*****





134688278 134688278   rmsgrey   rmsgrey


Gender: male
Posts: 2872
Re: SIMULTANEOUS HAT COLOR GUESSING  
« Reply #8 on: Dec 16th, 2003, 8:58am »
Quote Quote Modify Modify

a) you're talking about a (slightly) different riddle - try looking for a thread with a title like "single file hat execution" or similar
 
b) your answer isn't optimal - check the other thread(s) for details
 
Threads:
http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_har d;action=display;num=1027806438
http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=riddles_har d;action=display;num=1027917276
 
[e]removing duplication in thread list[/e]
« Last Edit: Apr 5th, 2005, 10:37am by rmsgrey » 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