Learn

How to solve a nonogram.

Four techniques settle almost every puzzle, and none of them is guessing. Each one is worked on a single line below, then all four solve a whole grid from an empty board. Every figure on this page came out of the same solver that verifies the books, so nothing here claims a deduction you could not make yourself.

What the clues mean.

Each row and column carries a list of numbers. The numbers are the lengths of the filled runs in that line, in order, with at least one empty square between them. A row of ten squares clued 4 4 holds a run of four, a gap, and a run of four. Where those runs sit is the puzzle.

Two marks are worth making as you go. Shade a square you have proved filled, and put a light cross in a square you have proved empty. The crosses feel optional and are not: they are what stops you working the same square out twice.

Lines that fill themselves.

Start by looking for clues that leave no choice. A ten-square row clued 10 has one arrangement, so the whole row is filled before you have looked at anything else. The same goes for any clue whose runs and gaps add up to the length of the line: 4 5 in a ten-square row needs four, a gap, and five, which is exactly ten.

10
A ten-square row clued 10: every square is filled.

These lines cost nothing and give the crossing lines something to work with, which is what the rest of the solve runs on.

Overlap: push both ways.

This is the technique that opens most puzzles. Take a long run in a line with a little room to move. Push the run as far left as it goes, then as far right as it goes. Any square covered both times is filled, whichever position turns out to be right.

7
A run of 7 in ten squares: the middle four are filled either way.

A run of seven in ten squares can start at square one, two, three or four. Slide it left and it covers squares one to seven; slide it right and it covers four to ten. Squares four to seven are covered by both, so they are filled, and you have four squares without knowing where the run begins.

The same works with several runs at once. Each run gets its own leftmost and rightmost position, and each overlap is filled.

4 4
Clue 4 4 in ten squares: three squares of each run overlap.

The rule of thumb: a run overlaps itself when it is longer than the slack in the line. Slack is the length of the line minus the space the clue needs at minimum. A ten-square row clued 3 3 needs seven squares, so it has three of slack, and neither run of three beats it.

3 3
Clue 3 3 in ten squares: three of slack, so overlap gives nothing yet.

A line like that is not stuck, it is just waiting. One square from a crossing line is enough to break it open.

Work from what you know.

A single known square is worth more than it looks, especially at the end of a line. Take the row clued 3 3 that overlap could not touch. Learn that its first square is filled and the first run has nowhere else to go: it must run from square one to square three, and square four must be empty, because a fourth filled square would make the run too long.

3 3
Clue 3 3 with the first square known: the run lands, and square four is ruled out.

That cross on square four is the useful part. It is a fact about the column that crosses there, and columns are where you go next.

Cross-reference, then repeat.

Nothing above uses more than one line at a time. The solve comes from alternating: work the rows until they stop giving anything, then work the columns with what the rows just told you, then go back to the rows. Each pass makes the next one easier, and a puzzle that looked stuck two minutes ago falls over.

That loop is the whole method. Below, it solves a puzzle in three passes.

All four together

A whole grid, start to finish.

Ten by ten, with the clues down the left and across the top. Nothing is filled in yet, and nothing needs guessing at any point.

10 10 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 10 10 10 3 2 2 3 10 10 10
The empty grid, with its row and column clues.
10 10 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 10 10 10 3 2 2 3 10 10 10
Step 1: 3 rows, 26 of 100 squares known.
10 10 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 10 10 10 3 2 2 3 10 10 10
Step 2: 6 columns, 70 of 100 squares known.
10 10 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 10 10 10 3 2 2 3 10 10 10
Step 3: 4 columns, 100 of 100 squares known.

The first pass takes the rows that settle on their own. Two of them are clued 10 and fill completely, and one is clued 4 4, which needs all ten squares, so it fills too. Three rows, twenty-six squares, and no crossing information used yet.

The second pass does the same down the columns. Six of them are clued 10 and fill top to bottom, which takes the grid from a quarter known to seventy squares known in one go.

The third pass is where the two directions meet. The four middle columns are clued 3, 2, 2 and 3, and until now they had too much slack to place anywhere. The filled rows along the top pin each run against the top edge, everything below it is ruled out, and the grid finishes. The picture is the RiddlePortal gate.

When it stalls

Harder puzzles, same rules.

Some puzzles run out of line reasoning before they are finished. At that point you pick a square, assume it is filled, and follow the consequences until either the puzzle finishes or a line becomes impossible. An impossible line proves the assumption wrong, which makes the opposite true, and that is a deduction rather than a guess.

It only works when the puzzle has exactly one solution. Every puzzle in these books was machine-checked for that before it was printed, which is why a contradiction you find is always real information.

The easy volume never asks for it. Those puzzles come out under line reasoning alone, which is what makes them a good place to learn. The hard volume is built around the technique.

Practice on five.

The free sample is five puzzles with their solutions, in all five formats, with no email address or account. They are somewhere to try the four techniques on a grid whose answer you have not already read.