Define a legal line
A completed classic Binary Puzzle row has equal numbers of zeros and ones, with no three identical digits together. An eight-cell line needs four zeros and four ones. Ten cells need five of each, and twelve cells need six. Columns follow the same rules when read from top to bottom.
For example, 00101011 has four of each digit and no triple. The balanced row 00011011 fails because its first three cells are zeros. The alternating row 01010101 passes. Alternation is allowed, although it is only one arrangement among the 34.
These are also Takuzu valid rows under the classic rules. The directory checks individual lines for balance and triples. A complete board requires distinct rows and distinct columns too. A listed pattern can therefore conflict with another row or with a crossing column on your current board.
Count balanced lines without triples
An eight-cell row has 256 possible binary strings. Choosing the four positions occupied by ones leaves 70 balanced strings. Rejecting those containing 000 or 111 leaves 34. The table records how many binary puzzle row combinations survive each check for all three lengths.
We built the lists in two ways. One selected every combination of positions for the ones and checked for forbidden substrings. The other visited every binary string and compared adjacent cells directly. Both produced identical sorted lists, so we compared every entry as well as the totals.
OEIS A177790 counts arrangements with n zeros and n ones and runs of at most two. Its index n is half the line length, so eight cells use n = 4. The values for n = 4, 5 and 6 agree with our results. These counts apply before any puzzle-specific clues are considered.
| Cells | All strings / balanced strings | Balanced without triples |
|---|---|---|
| 8 | 256 / 70 | 34 |
| 10 | 1,024 / 252 | 84 |
| 12 | 4,096 / 924 | 208 |
Use the complete eight-cell reference
The table groups all 34 strings into 17 pairs. Each right-hand pattern swaps every 0 and 1 in its left-hand partner. Swapping the digits preserves balance and the absence of triples. Each left entry starts with zero, and each right entry starts with one.
Both partners remain separate choices because their digits occupy different cells. Reversing a legal string also gives a legal string. The table includes each reversed entry wherever it belongs, and counts a palindrome only once. The downloads keep all distinct strings, including complements and reversals.
Read row positions from left to right, starting at C1. For a column, read the same strings from top to bottom. Pair numbers help you locate an entry in the table.
| Pair | Starts with 0 | Complement starting with 1 |
|---|---|---|
| 1 | 00101011 | 11010100 |
| 2 | 00101101 | 11010010 |
| 3 | 00110011 | 11001100 |
| 4 | 00110101 | 11001010 |
| 5 | 00110110 | 11001001 |
| 6 | 01001011 | 10110100 |
| 7 | 01001101 | 10110010 |
| 8 | 01010011 | 10101100 |
| 9 | 01010101 | 10101010 |
| 10 | 01010110 | 10101001 |
| 11 | 01011001 | 10100110 |
| 12 | 01011010 | 10100101 |
| 13 | 01100101 | 10011010 |
| 14 | 01100110 | 10011001 |
| 15 | 01101001 | 10010110 |
| 16 | 01101010 | 10010101 |
| 17 | 01101100 | 10010011 |
Match the reference to your clues
For the partial line 00____11, keep entries beginning with 00 and ending with 11. Exactly two remain, 00101011 and 00110011. The underscores are unknown cells. A zero is a known digit and must stay in its original position.
Repeat this lookup for any partial line of the matching length. Compare each known position with every entry and discard a string as soon as it disagrees. Retain all entries that match. Searching only for a prefix misses clues elsewhere in the row, and copying only one side of the paired table misses half the patterns.
An empty result means the current digits have no legal completion under the two line rules. Check the copied positions and your earlier entries. Several matches leave several possibilities for that line. Our candidate-elimination guide explains how to use the surviving set to prove a move and apply the surrounding board constraints.
Download longer-line lists and verify the count
Each text file contains one pattern per line, ordered from smallest to largest binary value. The files contain only digits and line breaks, with no heading to remove before counting. Preserve each entry as text. A spreadsheet can turn 00101011 into 101011 by dropping its leading zeros, which loses two cell positions.
Check an entry by counting its zeros and ones, then looking for 000 and 111. Check that its length matches the file and that no entry appears twice. Those checks establish that the entries are legal and distinct. To check completeness, compare the whole file with an exhaustive list. A file of valid rows can still omit a valid row.
The downloadable verifier needs Python 3 and uses only its standard library. Save it beside all three text files and run python3 verify-binary-puzzle-row-patterns.py. It rebuilds each list twice, compares every row with the downloaded file, and prints PASS for each size. A missing, altered, repeated or reordered entry makes the check fail.
Keep row counts separate from board counts
Thirty-four patterns do not give you 34 independent choices for each row of an 8x8 grid. Repeating a row breaks uniqueness, and separately chosen rows can make a column unbalanced or create a vertical triple. Counting complete boards requires enforcing all those constraints together. Use these lists to inspect a line or help construct a grid.
If you are making a puzzle, start with our construction guide. It explains how to check the completed board and keep a unique solution as you remove clues.
Sources and verification
OEIS A177790 provides the line counts. A398298 lists the patterns as binary integers, which need leading zeros restored to their full width. BinaryPuzzle.com's rules explain the additional uniqueness checks for whole boards. We generated the downloadable strings and verifier independently for this reference.