Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's suppose there is a chessboard (with 64 squares), and there is a penny on each square. Each of the pennies has a side (head or tails) facing up, chosen at random.

I look at the board and choose my favorite penny. I then tell my two mathemetician friends that I will reveal which penny is my favorite to one of them, who then must flip over exactly one of the pennies on the chessboard, while the other is in another room not looking. Once the coin is flipped over, the uninformed mathematician is summoned into the room and must deduce which penny is my favorite only by examining the coins on the chessboard.

What strategy can the two mathematicians devise to ensure that my favorite penny can always be deduced?

share|cite|improve this question
This is also known as ' The Devil's Chessboard ' and discussed here: – user45878 Oct 3 '13 at 16:17
Crucial note: the uninformed mathematician doesn't get to see the board before the coin-flipping. – Jack M Oct 9 '13 at 22:55
up vote 8 down vote accepted

What I'll do is that:

  1. I will decide with my friend that we map the board from top-left to bottom-right from 0 to 63
  2. I'll decide with him that we count only Tails (Heads also will work :-) )
  3. Now what we'll do is XoR between all the Tails and get a result
  4. Flip the coin that needed to fix the XoR to the wanted square - your penny

Example: lets say that there are tails only on 3,7,20,61 and the chosen sqare is 8: XoR on them {3,7,20,61} will be: 45. now what number XoR 45 will give us 8? 37!! I'll flip 37 :-)

that's it...

share|cite|improve this answer
Note that this works exactly for chessboards with a power of two squares, since the XoR may always be achieved. A chessboard with only 3 squares cannot be solved (with this strategy or any other). – StevenClontz Mar 8 '15 at 5:59
But if you had 3 squares, and wanted to flip at most one penny, you could do it: make the favorite penny be the only one with H (or T). – Peter Shor Apr 15 at 16:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.