Overlap, Edge Logic & 3 More Techniques for Hard Nonograms

Five techniques for the puzzles that stall — the general form of overlap, what the border really forbids, segment slack, joining and splitting, and case analysis — each shown working on a fully specified line.

Share
A single row of a nonogram puzzle shown twice, once with its blocks pushed hard to the left and once pushed hard to the right, with the few cells that stay filled in both positions standing out as solid squares.

This post assumes the basics: you can read a clue, you cross out empty cells as diligently as you fill them, and you know the beginner form of overlap — one clue of 6 in a ten-cell row, slid hard left, slid hard right, the two extremes intersected. If that is unfamiliar, our guide to solving nonograms teaches it and the five mistakes every beginner makes is the prequel. Neither is repeated here.

What changes on a hard grid is not the rules but the economics. There is one law: a cell is forced only if it takes the same value in every arrangement consistent with the clue and with what you already know. Every named technique is a cheap approximation of that law, fast because incomplete, and a hard puzzle stalls when the solver mistakes the approximation for the rule. A line runs left to right: # for a cell known filled, . for one known empty, ? for one still unknown, cells numbered from 1 at the left.

Overlap, properly: every block has a window

Stop sliding one clue back and forth; pack the whole line. Push every block as far left as it will legally go, then as far right, respecting the cells you already know. Each block now has a window. Cells covered in both packings by the same block are filled; cells no window reaches are empty. That ownership condition is the part usually dropped: a cell covered in both packings by two different blocks is not forced.

On a blank line this collapses to arithmetic. Add the clues, add a cell for each gap between them, subtract from the line length: that is the line’s slack. A block of length k forces k minus the slack cells, and nothing when the slack is larger. Fifteen cells clued 4 4 4 have slack 1 and surrender nine cells at once; fifteen cells clued 5 have slack 10 and surrender none. The formula the guides give — twice the clue minus the line length — is only the single-clue case of this, and applied to one clue of a multi-clue line it is wrong.

Twelve cells clued 4 3. Blank it is worthless: slack four, neither block larger. A crossing column now delivers one filled cell at position 9, so the line reads ????????#???. The 4 cannot own that mark — it would end at cell 9 or later, leaving the 3 to start at cell 11 and run off the end. So the 3 owns it, starting at 7, 8 or 9, which puts cell 12 beyond every window. The 4 must finish at least two cells before the 3 begins, so it starts within 1 to 4 — and a four-cell block starting anywhere there covers cell 4. The line becomes ???#????#??..

Nine arrangements survive, and beyond the mark already given they agree on nothing but cell 4 and cell 12. Note where the new fill landed: five cells to the left of the mark that caused it, inside the other block. Overlap is not an opening move: almost every cell it yields comes from re-running the packing on a line you thought was finished, after one mark arrives from a crossing column.

What the border forbids

The wall is the one place in a line that hands you ownership for nothing, and ownership is the expensive step. If the first known filled cell sits at position j and the first clue is k, then whenever no complete first block plus its gap fits to the left of it — in practice whenever j is no greater than k plus one — that cell belongs to the first clue. Cells left of the resulting window are empty, cells covered in its every position are filled, and the block can never pass j plus k minus one: a ceiling that pushes down the rest of the line.

The name edge logic is attached to at least three different things: the beginner anchoring rule, which fires only when the mark sits on the wall; the ownership argument above; and, among expert solvers, a deduction run across two adjacent rows along the rim. The middle one is what pays on a hard grid, because the border’s reach is k plus one cells inward, not one.

Twelve cells clued 3 2 2, worth nothing blank. Two filled cells arrive at positions 4 and 5: ???##???????. If a 2 covered them, everything to its left would have to hold the three plus a gap — a three-cell block ending by cell 2, impossible — so the 3 owns the mark. Covering both, it starts at 3 or 4: cells 1 and 2 are empty, cell 3 stays genuinely unknown, and the block can never pass cell 6. The first 2 therefore starts at 7 or later, and since the last 2 ends by cell 12 the first must start by 8 — so it covers cell 8 either way, and the last 2, starting at 10 or 11, covers cell 11. The line becomes ..?##??#??#?.

Every X you write builds a new wall

Known empty cells cut a line into segments. Respecting the order of the clues, work out which clue can go where: a group fits a segment only if its sum plus its internal gaps is no longer than the segment. A segment no clue can reach is entirely empty, and where only one segment is big enough for a given clue, that clue goes there. This is where gap analysis, the usual name for the move, stops. Go one step further: a clue pinned to a segment turns that segment into a short line, so re-run the packing inside it against the segment’s slack, which is almost always far smaller than the line’s.

Twelve cells clued 5 3, with cells 6 and 7 crossed out by crossing columns: ?????..?????. Before those crosses the line had slack 3 and had given up only cells 4 and 5. Now it is two segments of five. Both clues cannot share one — five, a gap and three need nine cells — and the order is fixed, so the 5 takes the first and the 3 the second. The first segment has slack zero, which means one arrangement: cells 1 to 5 filled. The second has slack two, so the 3 forces one cell, at position 10. The line becomes #####..??#??. Two crossed cells turned two forced cells into six.

Two marks, one unknown cell between them

When two known filled runs are separated by a single unknown cell, that cell is settled by arithmetic on lengths, not by placement. Split it when joining would produce a run longer than any clue that could own it; that half needs no precondition, since a run can only get longer. Join it when leaving it empty would seal a run too short for any clue that could sit there — but only when both runs are already bounded on their outer sides, by a known empty cell or the border, since otherwise the run you are measuring may still grow. Both rest on something rarely stated: you may apply them only once you know which clues could own the runs. The same rule seals a run whose every candidate owner has exactly its length — but crossing the cells beside any filled run as routine is a different move, and a wrong one.

Fifteen cells clued 5 2 2, mid-solve: ??##?##???#?#??. The block covering cells 3 and 4 must be the 5, since a two there would leave the five nowhere to sit. It starts at 1, 2 or 3 — but starting at 1 needs cell 6 empty and starting at 2 needs cell 7 empty, and both are filled. So the five is exactly cells 3 to 7: cell 5 joins, and cells 1, 2 and 8 are empty. The twos must cover the marks at cells 11 and 13, which are not adjacent, so one takes each in order. The first covers cells 10 to 11 or cells 11 to 12 — but at 11 to 12 the second would start at 14 and miss cell 13. So it is cells 10 to 11, cell 9 is empty, the last two is cells 13 to 14, and cell 12 splits. The line becomes ..#####..##.##., solved outright.

When you cannot decide, split into cases

Now the law itself. List the possibilities for the thing you cannot decide, usually which clue owns a particular run. Discard every case that leads to a contradiction and take the intersection of the survivors: whatever they all agree on is a deduction, though you still do not know which case is true. Across crossing lines, assuming a cell and propagating it through row and column proves the opposite value when a contradiction appears.

Thirteen cells clued 2 2 3: ????##???.???. Packing from both ends finds cells 11 to 13 and nothing else; the cells that matter it cannot see. Split instead on the ownership of the run at cells 5 and 6. If the 3 owned it, that block would start at 4 or 5, leaving the two twos and their gap — five cells — to fit in the first three cells at most. Refuted. Two cases remain, one for each 2, and in both the owner has length exactly two, so it is precisely cells 5 and 6: cells 4 and 7 are empty either way. The 3 then lies right of cell 7, and with cell 10 crossed its only room is cells 8 to 9, too short, or cells 11 to 13. The line becomes ???.##.??.###. We never learn which two sits at cells 5 and 6, and did not need to.

Filed as a last resort, or slid into educated guessing, this is neither: you keep a value because its opposite was proved impossible, never because it looked productive.

The reassurance that a well-made puzzle never requires it confuses two properties. A good nonogram has exactly one solution; that does not imply it can be finished one line at a time. In Jan Wolter’s 2009 survey of 2,491 human-designed black-and-white puzzles, 81.8 per cent had a unique solution reachable line by line — line-solvable, or simple in Batenburg and Kosters’s term — while 15.6 per cent had one that line reasoning alone never reaches. Roughly one in six. Deciding whether a set of clues admits any solution is NP-complete; deciding whether even one cell is deducible, on a board already known to have a solution, is harder still, co-NP-complete. The hardness was in the clue system all along, from the puzzle Non Ishida and Tetsuya Nishio arrived at independently in the late 1980s.

Sequencing the five on a stuck grid

Being stuck is three conditions, not one: a line-level deduction you missed, one that no single line yields though two together do, or a puzzle that genuinely requires a bounded search. Work down in that order; the cost rises at every step.

  1. Compute slack for every unfinished line and attack the lowest, not the biggest clue.
  2. Re-run the packing on every line that has taken a mark since you last looked at it. Most of the cells are here.
  3. Work the outermost rows and columns, where the border gives ownership free.
  4. Cross out everything you can, then re-run the packing inside the segments those crosses just created.
  5. Read the marks rather than the clues: single unknown cells between runs, and runs whose candidate owners are all the same length.
  6. Only then split into cases, on the cell with the most crossing consequences. Keep the split shallow; stop at the first contradiction.

Steps two and four compound, which is why a line worth nothing on one pass is worth six cells on the next — and why hard solving holds so much in the head at once, which is where the question of whether puzzles train memory gets interesting.

Frequently asked

Is it ever correct to guess?

No, and the distinction is not pedantry. Case analysis keeps a value because the alternative was shown impossible; guessing keeps one because it looked promising, then propagates a bad cell for twenty moves before the contradiction surfaces. If you cannot name the assumption you refuted, you guessed.

Why does “start with the biggest numbers” stop working?

Because the biggest clue is only a proxy for the quantity that governs the yield, and the proxy fails the moment a line holds more than one clue. Compute slack instead, and attack the smallest.

What actually makes one nonogram hard?

Density, at least as much as size. Work measuring a solver’s effort on randomly generated grids puts the hardest region at a filled-cell density of roughly two-fifths: below it little is deducible, above it nearly everything is, and the effort peaks at the transition.

Do these techniques apply to picross, griddlers and hanjie?

Without amendment — those are four names for one puzzle, and the logic belongs to the clue system, not to a publisher’s house style. Our map of logic puzzles shows where the family sits beside sudoku and kakuro.

Sources

Where this comes from

Solving advice travels by word of mouth, and it picks up errors on the way. Here is what we checked, and where, so you can weigh it yourself.

  1. Jan Wolter, Survey of Paint-by-Number Puzzle Solvers The source of the line-solvable figures quoted in the post. Wolter benchmarked solvers against a snapshot of the webpbn.com database taken on 2 October 2009, and published the breakdown for its 2,491 black-and-white puzzles: 81.8 per cent unique and line solvable, 15.6 per cent unique but not line solvable, 2.6 per cent with multiple solutions. His contrast set of 5,000 randomly generated 30×30 grids shows 97.5 per cent with multiple solutions and only 0.4 per cent unique and line solvable, which is the clearest available evidence that a good nonogram is a designed artefact rather than a random grid. Read it as a large collection of user-submitted puzzles, not a publisher’s catalogue. Survey of Paint-by-Number Puzzle Solvers (webpbn).
  2. Web Paint-by-Number: solving techniques The techniques page on Wolter’s own site, and in our view the most expert human-written resource on the open web for this material. It is where the vocabulary used by solvers gets fixed, including line solving and the two-row sense of edge logic that consumer guides have replaced with the beginner anchoring rule. Plain 2000s HTML with no byline and no SEO, which is part of why it rarely surfaces for these queries; the attribution to Wolter is an inference from site ownership rather than a credit printed on the page. Solving techniques, Web Paint-by-Number.
  3. Batenburg and Kosters, Solving Nonograms by combining relaxations (2009) The peer-reviewed algorithmic reference, published in Pattern Recognition 42(8), pages 1672-1683. It gives the formal definition of the per-line Settle operation, the fact that the order in which lines are processed does not change the result, and the term simple for what solvers call line-solvable. It also sets out the ladder above line solving, from simple to 0-Solvable to 1-Solvable, and honestly records a 5×5 puzzle with a unique solution that none of their polynomial methods can finish. The linked CWI file is the authors’ preprint rather than the published version; it carries no journal pagination. Solving Nonograms by combining relaxations (PDF).
  4. Foote and Krizanc, Nonogram: Complexity of Inference and Phase Transition Behavior (2025) The source for two claims in the post. Theorem 2.1 establishes that deciding whether any single cell is currently deducible on a consistent board – one already known to have a solution – is co-NP-complete, which is the complexity result that maps onto what a stuck human solver actually faces. Section 3 reports the empirical density threshold of roughly 0.39 to 0.42, measured as a SAT solver’s propagation effort on randomly generated boards rather than as human effort on designed puzzles, with the work peaking at the transition itself. Preprint, not yet journal-published. arXiv:2507.07283.
  5. Van Rijn, Playing Games (Leiden, 2012) A full-text, independently fetchable proof that solving nonograms is NP-complete, by reduction from planar bounded nondeterministic constraint logic (Chapter 7, Theorem 7.2.5). Worth citing because the usual reference, Ueda and Nagao’s 1996 Tokyo Institute of Technology technical report TR96-0008, has no full text we could locate online; independently checkable proofs like this one are the practical alternative. Playing Games: the complexity of Klondike, Mahjong, Nonograms and Animal Chess (PDF).
  6. Oosterman, Complexity and solvability of Nonogram puzzles (Groningen, 2017) A second independent full-text proof, useful because it separates the three questions that are routinely conflated: existence (does any solution exist), solving (how to find one), and uniqueness (is there a second). NP-completeness attaches to existence, which is why the theorem says nothing directly about the already-validated puzzle in front of you. Theorem 5.2.2 additionally proves the uniqueness problem NP-complete. Complexity and solvability of Nonogram puzzles (PDF).

The Logic Atelier publishes the books featured on this site. Some links lead to Amazon, where our titles are sold.

Maximiliano Leyton Gaggioli
About the author

Maximiliano Leyton Gaggioli

Founder, editor and designer of The Logic Atelier. Trained as an architect, he designs the grids, tests every puzzle, draws the pixel art and answers the mail — the atelier is small on purpose.

More about the editorial →
From the atelier

Four books. One system.

450+ Nonogram Puzzle Book — blue volume300+ Nonogram Puzzle Book — green volume150+ Nonogram Puzzle Book — red volumeTravel-size Nonogram Puzzle Book
See the collection →
The Logic Letter

One letter a month. Worth opening.

Every new article, puzzle techniques and atelier notes — straight to your inbox.

✓  One step left — send the email that just opened and you’re in.