Nonogram Lab

Nonogram Lab › Guides

The Hardest Nonograms: When Line Logic Isn't Enough

Most nonograms can be solved one row or column at a time. The hardest ones cannot: at some point no single line tells you anything new. Here is what that looks like, how to get past it without guessing, and how common it is.

Short answer: a set of nonogram clues is one of three kinds. Line-solvable: one solution, reachable one line at a time (81.8% of the black-and-white puzzles in Jan Wolter's survey of webpbn.com). Unique but not line-solvable: one solution, but you must assume a cell and follow the consequences until a line breaks (15.6% there). Multiple solutions: not a fair puzzle (2.6%). In general, deciding whether a nonogram has a solution is NP-complete, so no single technique solves every puzzle quickly.

A 5 × 5 where line logic stops

Row clues, top to bottom: 1 · 3 · 2 · 1 3 · 2 1. Column clues, left to right: 1 2 · 1 1 · 1 1 · 3 · 3. Line logic gets 17 of the 25 cells and then stops:

??··· ??■?? ···■■ ■·■■■ ■■·??

Every remaining line has two possibilities. Row 1 (clue 1) can be filled in column 1 or 2. Row 2 (clue 3) can start in column 1, 2 or 3. Columns 4 and 5 (clue 3) can be rows 2–4 or 3–5. Rows and columns alone go no further.

Solver stuck after line logic on a 5 by 5 puzzle, eight cells still blank
Pressing Next step until nothing more follows: 8 cells remain and the solver says line logic is stuck. Open this example →

Getting past it: assume, follow, contradict

Pick a cell with two options and follow one of them until something breaks. Take row 1, column 1, and suppose it is empty:

  1. Row 1 (clue 1) then needs its single cell in column 2.
  2. Column 2 (clue 1 1) has its lower 1 in row 5 already; the upper 1 is now in row 1, so row 2 of column 2 must be empty.
  3. Column 1 (clue 1 2) has its 2 in rows 4–5; with row 1 empty, its 1 must be in row 2.
  4. Row 2 (clue 3) now has column 1 filled and column 2 empty — a filled cell that cannot belong to a block of 3. Contradiction.

So row 1, column 1 is filled, and the rest follows by line logic: row 1's other cell is empty, column 1's 1 is in row 1, so row 2 starts in column 2 and covers columns 2–4; columns 4 and 5 resolve, and row 5's single 1 lands in column 5. This is not guessing: you only keep the branch that survives, and you can prove the other one wrong. Solvers call it probing or trial; puzzle books often call it contradiction.

Solved 5 by 5 puzzle with eight cells outlined in amber that needed a trial
The full solve: the eight outlined cells were not reachable by line logic. The message reports the number of trials the solver made. Open this example →

Which cell to try

Try cells where both rows and columns are almost settled — the solver here picks the unknown cell whose row and column have the fewest unknowns. A short chain is easier to follow on paper. In this puzzle, eight assumptions break immediately (each of the eight unknown cells has one value that leads to a contradiction), so any starting cell works; in a big puzzle, a good choice can be the difference between three steps and thirty.

How often puzzles need it

It depends far more on how full the grid is than on its size. We classified random grids with our solver (line logic first, then trial search up to 5,000 trials; "stopped" means the search hit that limit):

Random grids, 15 × 15Line-solvableUnique, needs trialMultiple solutionsStopped
40% of cells filled1835734
50% filled108212710
58% filled25241440
65% filled3661330
70% filled3790210

400 grids per row. At 50% filled, as in Wolter's random test, most random 15 × 15 grids have several solutions; at 70% almost all are line-solvable. In his test of 5,000 random 30 × 30 grids at 50%, 97.5% had multiple solutions, 2.1% were unique but not line-solvable, and only 0.4% were line-solvable. Our smaller run of 100 random 30 × 30 grids at 50% found no line-solvable grid either (1 unique, 47 multiple, 52 stopped by the trial limit); at 58% filled, 38 of 100 were line-solvable.

Across all 5 × 5 grids the "needs trial" group is small: 333,064 of the 25,309,575 grids with a unique solution, 1.3% (the full count). Puzzles designed by people are a different population. On webpbn.com, where puzzles are made by users and checked by a solver, one in six unique black-and-white puzzles needed more than line logic.

Is a trial-step puzzle fair?

KindUse it for
Line-solvableBeginners, timed play, printing for a class. Every puzzle on this site is this kind.
Unique, needs trialExperienced solvers. Fair, because only one picture fits, but label it hard.
Multiple solutionsNobody. The solver cannot know which picture you meant. Fix it before sharing.

If you make puzzles, the maker shows which kind you have while you draw: it outlines cells that line logic cannot reach. Paste the clues into the solver to see whether those cells still have one answer.

Nonogram maker with a 5 by 5 drawing, warning that four outlined cells cannot be worked out
The two-solution 5 × 5 in the maker: the warning names the number of cells logic cannot settle. Open it in the maker →

Sources

  1. Jan Wolter, "Survey of Paint-by-Number Puzzle Solvers", sections 4 (random results) and the webpbn sample. Read 15 November 2026.
  2. Wikipedia, "Nonogram" — section Nonograms in computing (NP-completeness). Read 15 November 2026.
  3. Random-grid tables: Nonogram Lab measurement, run on this site's own solver and generator (Node.js, 15 November 2026). Method described in the article (density run: 400 grids per row; 100 grids per 30 × 30 run)

More guides