Moved to here. Have a nice day 😁

Skip to content
#
Oliver Nash's Blog

## Math, IT, nonsense.

# Yet another prisoner puzzle

##
6 thoughts on “Yet another prisoner puzzle”

### Leave a Reply

Moved to here. Have a nice day 😁

%d bloggers like this:

Simple solution:

Let’s give each square an index between 0..63

Define Signature(board) to be the XOR of all the indices of the squares for which there is a Heads coin (which is always a number in the range 0..63)

First player calculates this for the board he sees, let’s call the result A. Let’s say magic number is B (again between 0..63). First player now flips the coin in square C = A XOR B. The signature of the new board is now B. Second player enters the room, calculates the signatures and says B.

Yes Asaf, I think this is indeed the most concise way to formulate the solution.

I’m not sure how much of my post you read but your strategy is exactly what I describe in part (c). (The ‘Signature’ which you define is what I call the hash function.)

Anyway, thanks for your interest!