One Flip Sends Many Bits
Another coins on a chessboard puzzle
|Cropped from Ashley’s TwiCopy source|
Hou Yifan and Maurice Ashley are champions of chess in several senses. Hou just regained the Women’s World Champion title by defeating Mariya Muzychuk of Ukraine 3-0-6 in their match which ended today in Lviv. Along with her male Chinese compatriots who reign as Olympiad team champions, she headlines an extraordinary growth of the game in southeast Asia. Ashley became the first ever grandmaster to play a tournament in Jamaica where he was born and has been one of the game’s premier video commentators and ambassadors for over two decades. The past two years he teamed with entrepreneur Amy Lee of Vancouver to create and run the Millionaire Chess open tournaments in Las Vegas, to raise the professional profile of the game.
Today Ken and I present another puzzle in our “Coins on a Chessboard” series, theming it after Ashley’s “Millionaire Square” promotion.
These are exciting weeks in Chess and in Go. Besides the women’s championship match, the World Chess Federation (FIDE) Candidates’ Tournament to determine the next challenger to world champion Magnus Carlsen started Friday in Moscow. Former world champion Viswanathan Anand of India, the oldest player at 46, shares the lead with Levon Aronian of Armenia and Sergey Karjakin of Russia, each with a win and two draws, A major international Open is taking place in Reykjavik, 44 years on from the famous match between Boris Spassky and Bobby Fischer. The fifth and final game of the Go match between Google DeepMind’s AlphaGo program and world #4 Lee Sedol is starting at midnight ET; Sedol has lost the series at 3-1 down but will try to build on his Game 4 win.
Millionaire Chess brought the first ever $1,000,000 total prize fund to a long weekend of open chess. As customary at many events, the tournament is divided into sections by rating class, so that amateur players have a shot at the biggest prizes. Last October’s event introduced the “Millionaire Square” finale in which the nine section winners played a quiz-game show to give one a chance to win a separate $1M prize underwritten by the sponsors by guessing which of 64 squares it was “under.” The winner guessed c4 but it was b1. We do not know if this promotion will be brought back for the 2016 tournament at Harrah’s in Atlantic City. It gave Ken a neat way to re-phrase the puzzle from the source given by a student in my discrete math class.
Suppose “Millionaire Square” is presented in this glitzy manner next October: A chessboard is set out with 64 golden coins bearing the Harrah’s logo (“heads”) on one side and the Millionaire Chess logo (“tails”) on the other. The prize is under one of the squares. The coins are randomly arranged heads or tails. The lucky finalist is led out from a blind never having seen the board before, picks a coin, and wins if he or she chose the right square. Like last October it’s a 1-in-64 shot.
Now suppose this is presented to the audience with extra pizzazz. A staffer comes out first, picks up one of the coins, shows both sides to the audience, and puts it back on the square. The coin is set back just like all the other coins except it might now be heads instead of tails, or tails instead of heads. Is this secure?
Suppose the staffer knows the right square and wishes to give it away, perhaps out of grudge or hope of hitting up the winner later. The staffer has no contact at all with the contestant, who knows nothing except perhaps having read this GLL post, and sees nothing except the final arrangement of the coins. Can the staffer communicate the winning square just by having flipped one coin, and if so, how? That is the puzzle.
Note that the employee has no control over the setup of the coins which is completely random. The configuration after flipping one coin was just as likely as the original to be chosen randomly. So how can six bits of information have been transmitted?
Toward a Solution
I shared this puzzle with Vipul Goyal when he visited Tech last month. He is currently at Microsoft Research in India and does strong research in cryptography, security, and privacy—not surprising since he did his PhD at UCLA under Rafail Ostrovsky and Amit Sahai. It took awhile for him to understand why it could even remotely be soluble, but that evening he sent me a complete solution. Impressive. He has given permission for me to relate it. First, let me re-phrase the puzzle not in Ken’s way or the source’s way with a jailer and two prisoners, but in simple complexity terms:
Alice receives a string of length . She also receives an index in . She must flip one bit of so that when Bob receives the resulting string he can always get .
Now here is how Alice can send one bit, namely whether is even or odd. If is odd and has an even number of 1’s in the first half, she flips a bit in the first half, likewise if is even and has an odd number of 1’s in the first half. Otherwise she flips a bit in the second half. Then in the parity of and the parity of the count of s in the first half always agree. Thus Bob has narrowed down the possibilities by half. In chessboard terms this is like choosing to flip a coin on White’s side or Black’s side of the board.
Now imagine this scheme using the odd versus even positions in —which is like light versus dark squares on the chessboard—or using the right and left halves of the board. Can we combine these schemes to communicate more bits? If you’re aware of Hamming codes, you might realize that if is initially a codeword, any bit flip will be detectable since the code will correct any one error. But what if is not a codeword? It still needs setting the details down precisely.
Our source has its own solution and there are others, but let’s see Vipul’s: Denote the input string (to Alice) by , where . Let denote the -th bit of .
We will define sets . Each set will contain a subset of the bits from (denoted by their positions in ). Denote the parity of all the bits in by . The bit string that Alice will transmit to Bob will be . The primary challenge will be to choose the sets in such a way that exactly by flipping one of the bits from , all the parities can be set to any desired value.
Now to describe how to construct these sets. The key observation is the following. Alice would like to flip the parity of a collection of these sets. That means for every such collection, there must exist a unique bit in which is exactly in all the sets from this collection but not in the sets outside this collection. There exist such collections. And this is also exactly the number of bits in . Hence, it appears to be possible to have such sets. These sets are constructed as follows. A bit is in set iff the -th bit of is 1.
Denote the original -bit parity string for the sets to be and the bit string that Alice wants to communicate to Bob to be . Let . Now the parity of must be flipped iff is 1. We will simply flip the bit and observe that but (by construction).
Did you know this fact about communication? Are there any possible applications that come to mind?
Incidentally, today is Pi Day 3/14, indeed rounded Pi Day 3/14/16. Georges-Louis Leclerc, Comte de Buffon, famously showed how to approximate probabilistically by randomly throwing a needle the width of one tile on a square-tiled floor and counting whether it crosses a vertical side of a square. Suppose we randomly toss a coin on the floor instead. Depending on the width of the coin relative to a tile—assuming it’s a rational number—can we ever get an estimate for that way?