Use single-line deductions until the board stops changing

Start with the sixteen clues below. Read rows from left to right and columns from top to bottom. A complete line on this board needs three zeros and three ones, with no three equal digits together. A finished row rules its exact pattern out of other rows. A finished column does the same for the column group.

For one line, a candidate is a complete six-digit string. Give the three ones every possible set of positions, which yields twenty balanced strings. Six contain a triple, leaving fourteen. For a particular line, keep the strings that match the digits already written in it. Each candidate must also differ from every other completed line in the same direction. For each blank, compare every survivor. Fill it if they all give the same value.

On the first pass, row 1 has only 001011 and 001101. Both put 1 at R1C3 and R1C6. Row 2 has only 011001 and 101001 and gives you R2C3 = 1. In column 3, the printed zeros at R5C3 and R6C3 force R4C3 = 1. We wrote those four ones together before rebuilding the line lists.

The next pass gives R3C3 = 0 under the two ones just written above it. Row 4 now has ones at C1 and C3, so put 0 between them at R4C2. The three ones in column 6 are at R1, R2 and R5. That fixes R6C6 at 0. Use the next grid once those seven moves are in place.

Start with these sixteen givens. Dots mark blank cells.
123456
100····
2···001
3·1···0
41····0
5··0101
6·10·1·

Find two short lists on the stalled grid

Thirteen blanks remain. If you list candidates again now, each of the thirteen can still take either digit in its row and in its column. A third pass adds nothing. Row 4 is 101 followed by two blanks and a 0. It needs one of each digit in the blanks. Its two candidates are A1 = 101010 and A2 = 101100. Row 1 still has B1 = 001011 and B2 = 001101. Each of those four strings fits the visible entries of its own row.

We checked distinctness separately. Using just the current row lists, there are 64 ways to give the six rows different strings. Every candidate occurs in at least one of those assignments. One of them uses A2 for row 4, 010110 for row 3 and 110010 for row 6. The column lists have 40 ways to give all six columns different strings, and each column candidate appears somewhere too. The two checks leave the lists as they are.

Notice where the short lists vary. In both rows the candidates differ at C4 and C5, and the other four digits stay fixed. Put the full six digits on your scratch sheet. Those fixed positions still have to fit their columns, and writing complete strings keeps your place when you read both rows across.

The stalled grid after two passes with new entries
123456
1001··1
2··1001
3·10··0
4101··0
5··0101
6·10·10

Check the same pair in every crossing column

Put the two versions of row 4 down the side of a table and the two versions of row 1 along the top. Each box stands for two proposed whole rows. For A1 with B1, begin in C1. Find a column candidate with B1's first digit at the top and A1's first digit in the fourth position. Do the same in C2 with the same two rows. Continue to C6, using the stalled grid for each column list.

For example, in A1 with B1, C4 gets 0 at R4 and 0 at R1. The column candidate 001011 fits both digits and the rest of the known column. At C5 the same pair gives 1 at R4 and 1 at R1. The column string 100101 fits. These strings run from R1 at the left to R6 at the right, even though the column stands vertically on the board. You can check them by marking positions one and four.

The four other columns all pass for all four pairs here. For example, C3 is already 110100, and the selected rows give that column its same two ones at R1 and R4 on all four tests. The full list for C4 is 001011, 100110 and 101010. The list for C5 is 001101, 100101 and 101001. A box marked Fits has at least one witness string in each column. A box marked with a column number failed there.

Every row 4 and row 1 pairing against all six columns
Row 4B1 001011B2 001101
A1 101010FitsFits
A2 101100C4C5

Read the two rejection boxes

Take A2 with B1. In column 4 it puts 0 at R1C4 and 1 at R4C4. The stalled board already has 0 at R2C4 and 1 at R5C4. The column is now 00_11_. The zeros above R3C4 need a 1 in that gap to prevent 000 at R1 through R3. The ones below it need a 0 at the same cell to prevent 111 at R3 through R5. There is no way to fill the gap. C4 is enough to reject this pairing.

A2 with B2 survives column 4. Its column witness there is 100110. Follow the same pair to column 5, where R1C5 and R4C5 are both zero. R2C5 and R5C5 are already zero on the stalled board. Those four positions exceed the quota before you even look at R3C5. That rules out this pairing at C5.

Read across the A2 row of the table. C4 accepts B2. C5 accepts B1, with 101001 as its column witness. Both labels are allowed in the other four columns. To keep A2, you need a label that appears in all six lists of partners. The C4 and C5 lists have no label in common, so cross out 101100 from row 4.

Return the new digits to the board

Both boxes that fit use A1, so finish row 4 as 101010. The two newly justified moves are R4C4 = 0 and R4C5 = 1. Row 1 still has both B choices in the matrix, with opposite digits at C4 and C5. Keep those two squares open when you transfer the result.

Go back to a single column now. Putting 0 at R4C4 has removed 100110 from the C4 list. The two options that remain, 001011 and 101010, both have 1 in the third position. That puts 1 at R3C4 on the next ordinary pass. You can trace which step earned each new digit. The matrix narrowed row 4, and the updated column did the work for row 3.

The grid below stops just before that extra column deduction. If you keep notes beside the board, record the pair table beside R4C4 and R4C5. For R3C4, keep the two surviving C4 strings. You can replay the two deductions in order when you return to the grid.

Main grid after writing R4C4 = 0 and R4C5 = 1
123456
1001··1
2··1001
3·10··0
4101010
5··0101
6·10·10

Follow one pair past the matrix

Look back at A1 with B1. Each column can find a completion for that pair on its own. To see the limit of the test, carry forward its only C4 witness, 001011, and its only C5 witness, 100101. They require row 3 to have 1 at C4 and 0 at C5. Of its three complete candidates, only 110100 fits. They also require row 6 to have 1 at C4. The row 6 list then gives 010110.

Now use the first digits from rows 1, 3, 4 and 6 in C1. They leave 0_11_0. Preventing a triple above and below the middle pair of ones forces the two holes to zero. That would give the column four zeros. A1 with B1 is now ruled out by the extra rows that had been left open during the two-row test.

For a separate check, we went back to the sixteen givens and tested 480 selections of complete rows against all the board rules. Exactly one survived, using A1 with B2. The published Python solution counter returned the same board. The earlier matrix used the row and column lists at the stall. You can reproduce its two new entries with those lists and the failure coordinates.

Try a second grid with three row candidates

This is another original six-by-six position. It is shown after four changing passes of single-line deductions. Twelve blanks remain. Another pass leaves every blank as it was, and requiring distinct strings within each direction still removes none. This time use row 5 as the A list and row 4 as the B list.

Row 5 is 10_1__. It has exactly three candidates, A1 = 100101, A2 = 100110 and A3 = 101100. Row 4 is 1010__ and has B1 = 101001 and B2 = 101010. Draw three boxes down by two across. For each pair, check whether the two digits are compatible separately at C5 and C6. The first four columns admit all six pairs. In those columns the changing digit at R5C3 has an available witness for either value.

Before looking at the answer, choose one of the two B options for A3 and locate its failed column. Then check the other choice. The exercise works best if you try to write exactly which three touching squares would form a triple.

Second example at its single-line stall
123456
11··0··
20·10··
3010101
41010··
510·1··
6010110

Keep the one digit both survivors share

In C5 there is a given 0 at R3C5 and a 1 at R6C5. If the selected rows both give zero in C5, rows 3 through 5 contain 000. If they both give one, rows 4 through 6 contain 111. So C5 accepts opposite digits at R4C5 and R5C5. You can check both cases in its list, 010011, 010101 and 100101.

In C6 the outside digits are reversed. R3C6 is 1 and R6C6 is 0. Equal ones at R4C6 and R5C6 make 111 from rows 3 through 5. Equal zeros there make 000 from rows 4 through 6. All three current C6 candidates, 011010, 101010 and 101100, give opposite digits to those two rows. These four triples account for every rejected box in the exercise.

A3 ends with 00. B1 ends with 01, which fails C5. B2 ends with 10, which fails C6. A1 with B1 and A2 with B2 fail both checks. The remaining pairs use A1 and A2, which both have 0 at R5C3. Enter that one zero. Their last two digits are still swapped, so R5C5 and R5C6 stay open. The independent whole-board check examined 1,568 row selections from the second puzzle's original clues and found one legal board. You need only the six boxes to justify the entry at R5C3.

Every row 5 and row 4 pairing in the second example
Row 5B1 101001B2 101010
A1 100101C5, C6Fits
A2 100110FitsC5, C6
A3 101100C5C6

Keep the table small on a larger board

On a 12x12 puzzle, look for two unfinished rows with short complete lists. A pair that differs across two of the same columns is an easy place to start. For each proposed row pair, cross it out as soon as one column fails. A pass needs a witness in every relevant column. To cross out a row candidate, account for every possible partner in the other row.

You can check fixed columns once and reuse the result. In the first table, each row carries the same digits at C1, C2, C3 and C6 in both of its candidates. The column witnesses for those positions work for all four pairs. In the exercise, row 5 also changes at C3, so this column needs two checks. The C3 string 010110 supports a 1 at R5C3, and 110100 supports a 0 there. Both strings put 1 at R4C3. That leaves C5 and C6 as the columns where the exercise pairs fail.

After a pair test gives you a cell, refresh its crossing line and look for a shorter deduction. Here one such update gave us R3C4 without another matrix. For the underlying rules and the process of repeating local deductions, see Utomo and Makarim's study of Binary Puzzle solving.