How the binary puzzle works
The binary puzzle asks for nothing but 0s and 1s, yet its three rules leave exactly one way to fill the grid. This page explains the rules, the names it goes by, the techniques that solve it from simple pairs to whole lines, a little of the counting behind it, and how the puzzles on PictorX are made.
The rules
Every cell holds a 0 or a 1. No more than two equal digits may stand next to each other in a row or a column. Every row and every column has the same number of 0s and 1s, which is why the grid always has an even size. No two rows may be the same, and no two columns. A well-made puzzle has exactly one grid that keeps all three rules.
Many names, one puzzle
The puzzle is known as Takuzu, Binairo, Binero, binary puzzle, and in some versions as a puzzle of two colours, of X and O, or of suns and moons. It became a newspaper and magazine favourite in Europe in the late 2000s, and today it appears beside Sudoku in puzzle books and apps.
Pairs, gaps and counts
Most of the solving is done by three small patterns. A pair of equal digits is always fenced in by the other digit: 1 1 becomes 0 1 1 0. A gap between two equal digits holds the other digit: 0 _ 0 becomes 0 1 0. And a row that already holds half its cells of one digit gets the other digit in all its empty cells. Repeat these until nothing changes.
Whole lines and the twin rule
When the small patterns run out, look at one row or column and list every way to finish it within the rules. A cell that has the same digit in every one of those ways is certain. Near the end, the third rule helps: if a row has two cells left and one way of filling them would copy a finished row, the other way is the answer.
How many rows are possible
The rules leave surprisingly few rows. With six cells there are only 14 rows that have three 0s, three 1s and no three equal digits side by side; with eight cells there are 34, with ten 84, with twelve 208 and with fourteen 518. A 6 x 6 grid needs six different rows out of those 14, which is why even a few digits fix the whole solution.
How the puzzles are made
The generator first fills a complete grid that keeps all three rules, at random but checked as it goes. Then it takes digits away in random order. On Easy and Medium a digit is only removed if the puzzle can still be solved with that level's reasoning; on Hard the generator goes further and keeps removing digits as long as exactly one solution remains.
Frequently asked questions
Why must the grid size be even?
Because every row and column needs as many 0s as 1s. An odd length could not be split in two equal halves.
Do I ever have to guess?
No. Every puzzle has exactly one solution, and there is always a cell that follows from the rules. On Hard you may need the whole-line reasoning or the rule that no two lines are the same to find it.
What is the difference with Sudoku?
Both are grids with one solution, but Sudoku uses nine digits and its rules are about rows, columns and boxes holding each digit once. The binary puzzle has only two digits, so the rules are about patterns: no runs of three, equal counts and no twin lines.
Is there a link with computers?
Only in the name. Binary means two, like the 0s and 1s a computer stores, but the puzzle is a pure logic game and needs no maths beyond counting.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Play the Binary Puzzle