Myopic Hats In A Line

That counter thing on the right for my blog posts seems to suggest that its been some time since I've had more than one post in a given month... I guess its time to do something about that. Anyway, this puzzle is one I found on the forums at xkcd:
One hundred people are standing in a line, each of them wearing either a black hat or a white hat. They all can see the hats on the two people directly in front of them, no hats behind them and not their own hat. Each round, a man in a black suit will ask each person in the line if they would like to guess their own hat colour now, the answer they give is secret, nobody else in the line can hear. The man will then select one of the people who volunteered and ask their hat colour. That person is then removed from the line and the line is shifted back a step to fill the hole. Everybody in the line is made aware of who was selected to guess their hat colour and what they guessed. The people may only guess "black" or "white". Then a new round starts with the man asking who would like to guess their hat colour now.

The players lose the game if ever more than two people get their hat colour wrong, or if during any round nobody volunteers to guess. The players win if everybody has finished guessing their hat colour and no more than two people are wrong. Before the hats are assigned the players may strategize, find a strategy that is certain to win assuming the man in black (who also assigned the hat colours) is an adversary.

Its some sort of variation on "standard line hat rules", the people are also short-sighted.

3 comments:

McAnerbot said...

You have so few options in this particular problem it doesn't actually seem that hard.

Although the way information propagates through the system is very strange. But clearly with an adversary the man at the end of the line (back end that is) is dead.

McAnerbot said...

Actually I think I solved it. The back TWO people are dead and everyone else lives. Why are men-in-hat-in-a-line problems all about parity?

Kory Stevens said...

Well, they are only sort of about parity, its really more that problems involving exactly two hat colours are about parity. And really, you should expect two people to die, if less people were going to die why the heck would the problem allow two.