Can someone solve the following brainteaser with an explanation of how the people in the problem choose hat color:
There are 4 people wearing black or white hats. They do not know the color of their own hat. They cannot communicate. They must come up with a strategy for simultaneously shouting out a hat color or keeping their mouth shut. Your goal is to come up with the solution that yields the highest probability of getting at least one hat color correct and no hat colors incorrect. For example, if the hats are black black black white in that order, and you guess black, doesn't guess, doesn't guess, doesn't guess, then this would count as a successful attempt; however if you guessed black, black, black, black, this would be unsuccessful.
Semi spoiler below-the solution for 3 people:
Using 0 as representation for white and 1 for black, you have the following table seating available. 000, 001, 010, 011, 100, 101, 110, 111
If every time you are at the table and you see two hats of the same color, you guess the opposite color, you will guess correctly in 6 out of 8 attempts, and if you do not see two hats of the same color, then you pass/ do not guess. This yields a 75% win rate for this game among the 3 participants.
Thank you in advance for answers.