1

You have a standard checkerboard with 64 squares and a coin in each square, randomly facing heads or tails up. There is an evil monster in the room with you and he arbitrarily selects some square and tells you that it is the magic square.

You are allowed to flip one and only one coin on any one square of your choice. Then your friend comes in and he is supposed to guess the location of the magic square correctly, without any help from you. You and your friend are allowed to discuss some strategy beforehand..

What strategy should you use so that you and your friend won't be eaten by the monster? (a.k.a your friend is able to choose the correct square?)

The question has a mathematical/logical answer, and it is all pure strategy. So no answers that try to go around that please :)

NL628
  • 7,490
  • 3
  • 34
  • 77

2 Answers2

4

use a hamming code

because

the result is a binary number from 0 the 63 fliping each coin will give a different result, so one of the 63 coinds will point to the magic square.

Jasen
  • 3,010
  • 13
  • 15
4

Label all the coins, in binary, with 0-63.
Then, take the bitwise XOR of all the heads that are showing, and XOR that with the label of the magic square. Flip the coin whose label is the result. Then, the strategy would be for your friend to come in, take the XOR of all the heads, and the result would be the label of the magic square.

Bass
  • 77,343
  • 8
  • 173
  • 360
Lifesaving Linen
  • 1,111
  • 1
  • 7
  • 22