A puzzle you can leave unfinished
Here is the puzzle we used. The six printed digits belong to both players. One player, called the prover, privately fills the ten empty squares. The other, the verifier, wants evidence that the prover knows a legal completion. You can follow the example with every blank on your own copy still empty.
A legal completion agrees with the printed digits. Each row and column must contain two zeros and two ones on this board. No three consecutive cells across or down may be equal. Finally, two different rows must have different contents, and the same goes for columns. These rules and all the deductions you can already make from the six clues are public information. In the second row, for instance, the two empty cells on the right must supply one of each digit. A proof can keep a private answer covered while leaving that deduction available to anyone.
We enumerated four-by-four boards to choose this example. Exactly 72 completed boards obey the classic rules, and exactly one of those matches all six clues. A second count with our published puzzle solver gave the same result. The claim at the card table only requires one valid completion. On a puzzle with two answers, a player who knows either one could make the same claim.
| 1 | 2 | 3 | 4 | |
|---|---|---|---|---|
| 1 | 0 | · | · | 1 |
| 2 | 1 | 0 | · | · |
| 3 | · | · | 0 | · |
| 4 | 1 | · | · | · |
Put the answer down before anyone asks a question
Xavier Bultel, Jannik Dreier, Jean-Guillaume Dumas and Pascal Lafourcade described a physical Takuzu proof at FUN 2016. Section 3 of their paper uses two boards. Keep the printed puzzle on the table. For the second board, the prover chooses a random ordering of the rows and independently a random ordering of the columns, writes both orders on paper, and seals the paper in an envelope. The prover lays a digit card face down on each square of that second board in the rearranged order.
Imagine moving the first column to the far right. Every digit in that column moves with it. A row still contains exactly as many zeros as it had before the move, and rows that differed in that column still differ somewhere. Digits that used to touch can end up several squares apart. A check involving three neighboring squares will need the original order back. That difference explains why the envelope stays closed for some questions and gets opened for others.
Only now does the verifier choose a question. The timing matters even for our small board. If the prover knows in advance that the only request will be to count rows, four packets of two zeros and two ones are easy to prepare. Once the cards and the envelope are on the table, the prover has to live with those choices. The question might just as easily concern columns or one of the printed clues.
What you actually see when the rows are opened
Take the balance challenge in section 3.1. The verifier chooses a direction. For rows, lift each face-down row as a separate packet, keep its four cards together, and have the cards within each packet shuffled privately. Open all four packets. For columns the procedure is the same with one packet for each column. The envelope stays shut. Mixing all sixteen cards into one pile would answer a much weaker question. A row with an extra zero could cancel a row with an extra one.
The diagram shows one run of our software illustration. Read each output across as four cards on the table. The first card in packet A has no column label. In the separate column run, two packets actually opened as 0011. The original rows must differ under the puzzle rules, but the shuffle gives each packet a new order of its own.
You can check what that shuffle hides without taking anyone's word for it. Label the four backs privately on scratch paper so you can count the possible arrangements. There are 24 ways to order four individual cards. Take one visible result, 0101. Either zero can occupy the first slot, and either one can occupy the second. Once you make those two choices, the other two cards have only one place each. Four of the 24 orders therefore look like 0101 after the private labels are erased.
We ran the same count for each possible starting order of a balanced packet. All six visible strings occurred four times apiece in every case. That means a person who never saw the solution can deal two zeros and two ones at random and reproduce the distribution of what you see for one packet. In cryptography this is the idea of a simulator. It gives you a way to ask exactly what an observer could learn from the view. The scratch labels serve only for counting. Leave them off the backs of any cards you use.
Envelope stays closed
Face-down packets Opened faces
A ? ? ? ? → 1 0 0 1
B ? ? ? ? → 1 0 1 0
C ? ? ? ? → 0 1 1 0
D ? ? ? ? → 0 0 1 1A wrong answer that passes the count
Our program tried the balance question on three submissions. The table reports the two possible directions as separate tests on a fresh copy of the layout. At a real table each round asks just one of those questions. After we flipped one card at a blank on the original puzzle, row packet C opened as 0111. The separate column test produced 1110 in packet A. Both counts caught the extra one.
The most instructive of the three was the alternating checkerboard. It fits the six public clues. Its rows alternate between two patterns, so each one has the right digit count. The columns do too. You can even slide a window of three cells anywhere across or down that board and find both digits. Yet the third row copies the first. A verifier who accepts on the strength of a row count would let this board through every time.
The paper gives the verifier a way to ask about that exact defect. With the envelope closed, turn over one whole row on the rearranged board. Take the columns where it shows zero. From each other row collect just the cards in those columns, making a separate packet for each row. After a packet is privately shuffled, the prover must show a one from it. A duplicate of the exposed row supplies only zeros, so the prover will come up empty for that packet. The same procedure works with the directions exchanged.
Why look only under the zeros? In a balanced row there are exactly two zero positions. If another balanced row has zeros in both those places, its other two entries have to be ones and the rows are identical. If it differs, at least one of those positions contains a one. Showing one such card is enough. When several ones qualify, the paper calls for choosing one at random. The verifier gets evidence of a difference while the original column of the chosen one stays hidden.
| Submission | Row packets | Column packets |
|---|---|---|
| Correct completion | All four pass | All four pass |
| One non-clue card flipped | Packet C fails with 0111 | Packet A fails with 1110 |
| Alternating checkerboard | All four pass | All four pass |
The check that needs the original neighbors
Two more questions need the paper in the envelope. To check the givens, the verifier uses the two orders to move the public clues to their positions on the second board. Turn over only the cards at those positions. You may learn that a particular face-down card held a zero, but the corresponding square already had a zero printed in it. Even an otherwise legal board can fail if the prover brought the answer to a different puzzle.
For adjacency, first put the cards back into their original rows and columns with every face still hidden. Select a direction and a starting offset, then lift nonoverlapping packets of three along the lines. In a packet with two zeros and one one, the prover can discard a zero in private and return one of each. A packet with two ones works the same way. Three equal cards leave no way to produce the required pair. The two exposed faces tell the verifier that both digits occurred somewhere among those neighbors.
There is a small detail worth checking with a pencil if you follow the printed formula on page 9. It chooses an offset from 1, 2 or 3, then adds one to get the first position of a packet. Number the squares from 1 and the first packet therefore starts at square 2, 3 or 4. That leaves squares 1 through 3 untested as a group. In our coverage check we used starting squares 1, 2 and 3, equivalent to offsets 0, 1 and 2 in that formula.
Try the eight-cell line 00011011. It has four zeros and four ones. Its only forbidden window begins in the very first square. The literal formula misses it in all three choices. With the adjusted offsets the program inspected all six possible starts. Only the packet starting at square 1 failed. This little test concerns a single line. It explains which indexing convention we used and why full coverage matters when reading the paper's argument about an incorrect board.
How much does a passed round tell you?
Imagine trying to pass off the checkerboard again. The printed-clue question would go fine. A count would go fine. You would have a problem the moment the verifier picked either copy of a repeated row for comparison. Once the cards are down, at least one of the possible checks will catch any wrong board, provided the checks cover every rule and position. Cryptographers call the limit on a false acceptance the soundness error. Completeness is the promise to an honest solver that every permitted question can be answered with a correct board.
The questions have different numbers of possible endings. On our four-by-four board there is one clue check, two choices of direction for balance and eight individual lines the verifier could select for comparison. For triples there are two directions and three offsets. That makes 17 fully specified choices. Giving each one an equal chance would give the eight line comparisons together eight chances in seventeen. Drawing one of four headings with equal probability would produce a different experiment.
With every triple covered, even a bad layout that fails only one of those 17 choices can pass a single round with probability at most 16 in 17. Each fresh round gives the verifier another independent chance to catch it. That fraction is a worst-case bound under the stated choice rule. The checkerboard fails many more checks. Repeating the challenge on an already exposed arrangement would also change what the observer knows. Start again with new private orders and fresh commitments before picking the next question.
Could you produce the same view without the answer?
Try it with the balance diagram. Have someone who has never seen the puzzle take four packets, put two of each digit in each, and shuffle every packet separately. Ask them to lay the cards beside the output from the solver's packets. Under an independent, untraceable shuffle, both procedures give the same distribution of visible cards. You could prepare the second set without knowing a single missing digit because you knew which question to answer. At the card table the question arrives after the solver has committed to the board.
A nick on the back of one card or a shuffle whose order the verifier records can connect two views that were supposed to be separate. The authors assume a shuffle that hides the permutation and prevents a player from swapping in different cards. They suggest a trusted third party as one possible way to supply it. Our program used fixed seeds so you can reproduce the packet diagram. Anyone inspecting its working memory or replaying the shuffles could recover the order. The security argument in section 3.2 applies to the physical model, and our software illustrates just the balance challenge. To repeat our experiment, save the two Python files below in the same folder and run python3 takuzu-card-example.py.
If you want to try just one part with a friend, deal the four-card packet and ask them to write down everything they could establish from its faces. Then give them four blank squares and ask where the last card belongs. Six different balanced rows can give them exactly the packet they are holding.