Invariant-theory

246 Views Asked by At

An evil wizard has imprisoned 64 math geeks. The wizard announces, "Tomorrow I will have you stand in a line, and put a hat on each of your heads. The hat will be colored either white or black. You will be able to see the hats of everyone in front of you, but you will not be able to see your hat or the hats of the peo­ple behind you. (You are not allowed to turn around.) I will begin by asking the person at the back of the line to guess his or her hat color. If the guess is correct, that person will get a cookie. If the guess is wrong, that person will be killed. Then I will ask the next per­son in line, and so on. You are only allowed to say the single word 'black' or 'white' when it is your turn to speak, and otherwise you are not allowed to commu­nicate with each other while you are standing in line. Although you will not be able to see the people behind you, you will know (by hearing) if they have answered correctly or not."The geeks are allowed to develop a strategy be­fore their ordeal begins. What is the largest number of geeks that can be guaranteed to survive?

1

There are 1 best solutions below

1
On

The geeks agree on a code, used only by the last person in line: “white” means “I see an even number of black hats” and “black” means “I see an odd number of black hats.” The last person in line hence has a 50% probability of surviving, but thereafter, each geek knows the parity of the number of black hats, from their own (invisible) hat onward. Since each geek can see the number of black hats ahead of them, they have full information to deduce their own hat color. Notice that as we move forward along the line, the geeks have to keep track of which hats are which color to keep adjusting the parity. This method will even work if one of the geeks accidentally says the wrong color and is (noisily) killed. Hope this helps!