Follow a proposed answer through the checks

Give a checker a full grid and the original clues. It can compare each given digit with the proposed value at that coordinate, count the two digits in every line, and inspect consecutive groups of three. Finally, it compares completed rows with other rows and columns with other columns. A row may match a column.

The flowchart below accepts a completion only after every check passes. Finding a triple rejects this proposed answer immediately. Finding no triple lets the checker move to the other tests. A complete grid that passes all of them supplies evidence that the starting puzzle has a solution.

For an n by n board, scanning clues, counts and triples takes work proportional to n squared. Even a straightforward uniqueness check that compares every pair of rows and every pair of columns uses at most O(n cubed) digit comparisons. That is polynomial in the explicit input length of n squared cells. The checker can follow this procedure without searching for missing digits.

One accepted completion settles the existence question. To establish uniqueness, you also need to rule out a second completion. Our solution counter stops after finding two answers because that already settles whether there are multiple answers. The generalized decision problem asks for existence, so its yes instances include boards with one answer and boards with several.

Completion checking flowchart. A failed test rejects the proposed answer.
Proposed full grid and original clues
                |
                v
All cells binary and every clue preserved?
    No -> Reject       Yes
                        |
                        v
Every row and column balanced?
    No -> Reject       Yes
                        |
                        v
Every horizontal and vertical triple legal?
    No -> Reject       Yes
                        |
                        v
Rows distinct from rows, columns from columns?
    No -> Reject       Yes -> Valid completion

State the generalized decision problem

We checked Marzio De Biasi's July 2012 paper against its formal problem definition. The input is a partially filled n by n grid. The question is whether the blanks can be filled while respecting adjacency, equal counts, and distinct rows and columns. The board size varies across inputs. A puzzle with several completions still gives a yes answer.

The proof first encodes planar 3CNF satisfiability using small grid constructions under the adjacency rule. It then extends the construction to enforce balance and distinct lines. Corollary 5.3 states NP-completeness for the full Binary Puzzle decision problem. These additional rules matter when transferring the result to classic Takuzu.

A rejected proposal settles only that proposal. To answer no for the original puzzle, a complete search must exhaust every possible completion, or another sound method must prove that none exists. This is why checking one failed attempt and deciding that the puzzle is impossible are separate operations.

The two parts of NP-completeness describe checking and reductions. Membership in NP means that a yes instance has a certificate that a polynomial-time verifier can check. Here the certificate is a filled grid. NP-hardness means that every problem in NP can be reduced to this one in polynomial time. Together, they relate the generalized puzzle to a whole class of computational problems.

Watch possibilities shrink in a small search space

With k blank cells, writing either zero or one in each produces 2 to the power k raw assignments. That counts assignments before any rules are applied. Consider our six-cell teaching row _01__0. Its three blanks allow eight assignments. Requiring three zeros and three ones leaves three rows. The adjacency check removes 001110, leaving 101010 and 101100.

The raw assignment count grows from 1,024 for ten blanks to 1,048,576 for twenty. Those figures come from doubling the choices once per blank. They describe a search that tries every assignment before checking. The eight-leaf example shows why an actual search can visit fewer cases after applying constraints. Its local pruning counts say nothing about how many branches another puzzle will require.

The diagram lists all eight leaves so you can inspect what was discarded. It tests horizontal line rules only. Crossing columns and comparisons with other rows would need their own checks on a full board. A solver can also reject a partial branch early, as soon as a count or a triple makes it impossible.

Utomo and Makarim describe propagation and backtracking alongside SAT and algebraic approaches in their 2017 paper. Propagation fills forced values before another branch is needed. Which cells are chosen and which deductions are available affect the work performed by a particular solver. Our runnable solver guide gives a separate, reproducible implementation.

Search space for _01__0. Assign blanks in positions 1, 4 and 5.
_01__0
|-- first blank = 0
|   |-- 001000   reject count
|   |-- 001010   reject count
|   |-- 001100   reject count
|   '-- 001110   reject triple
'-- first blank = 1
    |-- 101000   reject count
    |-- 101010   passes local line rules
    |-- 101100   passes local line rules
    '-- 101110   reject count

8 raw assignments -> 3 balanced -> 2 legal lines

Keep worst case and a fixed board size separate

A worst-case runtime bound must cover every allowed input of a given size. A quick solve of one daily board measures that instance under one method. It leaves the guarantee for all larger inputs unsettled. A worst-case classification likewise assigns no solve time to a particular board selected for play.

A fixed 14x14 grid has 196 cells and finitely many possible clue patterns. Complexity theory studies an unbounded family of input sizes, which is how it can distinguish growth rates. Even a large exhaustive bound for the fixed grid would give little guidance about the deductions you will actually make on today's clues.

The statement that NP equals P remains unresolved. A polynomial-time algorithm for the generalized NP-complete problem would imply P equals NP. The resulting barrier is conditional on P differing from NP. Whether a polynomial-time algorithm exists remains part of that open question.

Return to the deductions on your board

On this site, difficulty calibration examines the logical rule families needed by a generated puzzle as well as the blank ratio. A board whose next move is a quota completion can feel different from one that needs a line candidate or uniqueness comparison. Our difficulty guide records two 8x8 Medium examples with the same clue count and different deductions.

When a board stalls, keep the position and identify the step you cannot justify. You can practise that rule, then try another board at the same setting. This gives you something specific to work on while the broader Takuzu complexity result continues to describe the generalized decision problem.