Count the numbers b of black hats and w of white hats that you see. Wait b seconds or w seconds, whichever is sooner. If nobody has yet spoken, guess that your hat is black if you can see fewer black hats than white hats, or white if you can see fewer white hats than black hats. If you have not yet spoken, guess that your hat is of the opposite colour to that of one of the first people to speak. Suppose that in total there are B black hats and W white hats. There are three cases. If B = W then those players wearing black hats see B−1 black hats and B white hats, so wait B−1 seconds then correctly guess that they are wearing a black hat. Similarly, those players wearing a white hat will wait W −1 seconds before guessing correctly that they are wearing a white hat. So all players make a correct guess at the same time. If B < W then those wearing a black hat will see B−1 black hats and W white hats, whilst those wearing a white hat will see B black hats and W −1 white hats. Since B−1 < B ≤ W −1, those players wearing a black hat will be the first to speak, guessing correctly that their hat is black . The other players then guess correctly that their hat is white . The case where W < B is similar.
Count the numbers b of blue hats and r of red hats that you see. Wait b seconds or r seconds, whichever is sooner. If nobody has yet spoken, guess that your hat is blue if you can see fewer blue hats than red hats, or red if you can see fewer red hats than blue hats. If you have not yet spoken, guess that your hat is of the opposite colour to that of one of the first people to speak. Suppose that in total there are B blue hats and R red hats. There are three cases. If B = R then those players wearing blue hats see B−1 blue hats and B red hats, so wait B−1 seconds then correctly guess that they are wearing a blue hat. Similarly, those players wearing a red hat will wait R −1 seconds before guessing correctly that they are wearing a red hat. So all players make a correct guess at the same time. If B < R then those wearing a blue hat will see B−1 blue hats and R red hats, whilst those wearing a red hat will see B blue hats and R −1 red hats. Since B−1 < B ≤ R −1, those players wearing a blue hat will be the first to speak, guessing correctly that their hat is blue . The other players then guess correctly that their hat is red . The case where R < B is similar.
R
black hats and w of white
blue hats and r of red
R
w
r
R
black
blue
R
black hats than white
blue hats than red
R
white
red
R
white hats than black
red hats than blue
R
black hats and W white
blue hats and R red
R
W
R
R
black
blue
R
black
blue
R
white
red
R
black
blue
R
white
red
R
W
R
R
white
red
R
W
R
R
black
blue
R
black hats and W white
blue hats and R red
R
white
red
R
black hats and W
blue hats and R
R
white
red
R
W
R
R
black
blue
R
black
blue
R
white
red
R
W
R