GFG App
Open App
Browser
Continue

# Puzzle 47 | Red Hat vs Blue Hat

A team of three people decide on a strategy for playing the following game. Each player walks into a room. On the way in, a fair coin is tossed for each player, deciding that playerâ€™s hat color, either red or blue. Each player can see the hat colors of the other two players, but cannot see her own hat color. After inspecting each otherâ€™s hat colors, each player decides on a response which are one of the following :

`             â€śI have a red hatâ€ť, or â€śI had a blue hatâ€ť, or â€śI passâ€ť`

The player’s responses are recorded, but the responses are not shared until every player has recorded her response. The team wins if at least one player responds with a color and every color response correctly describes the hat color of the player making the response. In other words, the team loses if either everyone responds with â€śI passâ€ť or someone responds with a color that is different from her hat color. What strategy should one use to maximize the teamâ€™s expected chance of winning?

For example, one possible strategy is to single out one of the three players. This player will respond â€śI have a red hatâ€ť and the others will respond â€śI passâ€ť. The expected chance of winning with this strategy is 50%. Can you do better?

Answer : A better solution exists for 75% chance of winning.

Solution :Â With three players and two hat colors, there are a total of eight equally likely outcomes :

One special feature about the distribution is that most outcomesâ€“six of themâ€“include at least one hat of both colors. Only two extreme outcomes donâ€™tâ€“the ones with all red hats or all blue hats.Â We can analyze further. Among outcomes with both hat colors, there logically has to be two hats of one color (the â€śmajorityâ€ť color) and one hat of another color (the â€śminorityâ€ť color). See pic below

Now, by looking at the other hats, players can identify whether they are wearing a majority color or a minority color.Â For instance, if a player sees both a red and blue hat, then the player must be wearing the majority color (which could be red or blue).Â If a player sees two blue or two red hats, then the player must be wearing the minority color, which will be the opposite color of what the player sees.Â Here is what players can reason among the six choices:

Now the idea is to get the player with the minority hat color to guess and force the other people to pass.
So here is the strategy :
If you see both a red and a blue hat, then â€śpassâ€ť
If you see two red hats, then guess â€śblueâ€ť
If you see two blue hats, then guess â€średâ€ť

This strategy wins in all six cases with at least one hat of each color. It only loses in the two cases of all-red or all-blue, in which all players guess incorrectly.Â Here is how players would guess:

So the group wins in six of eight possible outcomesâ€“ a whopping 75 percent chance.