A picture hidden in the numbers

The clues along each row and column give the lengths of the filled runs. Every puzzle here is solvable line by line with no guessing, and proven to have exactly one picture.

HomeGames & Puzzles › Nonograms

Click to fill · click again to mark empty · drag to run along a line · arrow keys and space work too

How the puzzle is made, and why it never needs guessing

A random picture is drawn, its row and column clues are derived, and then the picture is thrown away. The clues alone are handed to a solver that works only by line reasoning: for one line, list every arrangement of its runs that fits what is already known, then keep whatever all of them agree on. A cell filled in every arrangement must be filled; a cell empty in every arrangement must be empty.

If that alone reproduces the picture, the puzzle is kept. If it does not, the candidate is discarded — a nonogram that needs a guess and a backtrack is technically valid and miserable to play.

Uniqueness is then checked separately, by counting solutions and stopping at two. Line-solvability ought to imply uniqueness, but trusting one check to establish the other is exactly how a wrong assumption ships. A nonogram with two valid pictures looks completely normal until a player draws the other one and is told they are wrong.

Reading the clues

A clue of 3 1 means a run of three filled cells, then at least one gap, then a single filled cell — in that order, though where they sit is the puzzle. A clue of 0 means the line is entirely empty.

The most useful early move is overlap. If a line of five has a clue of 3, the run can start at position one, two or three — and whichever it is, the middle cell is covered every time. That is the whole method in miniature: not working out where a run is, but finding what every possibility has in common.

Mark the empties

Clicking a second time marks a cell as definitely empty with a cross. Beginners often skip this and find the puzzle much harder than it needs to be — the crosses are what let you count remaining space in a line and rule placements out. The solver does exactly the same thing, and it is the reason these puzzles never require a guess.

Related

Sudoku for the same style of deduction on numbers, and the puzzle hub for everything else.

Questions people actually ask

Do I ever have to guess?

No. Every puzzle is solved by a line-only solver before it is published, and any candidate that cannot be finished that way is discarded. If you are stuck, there is always a line where the clue and what you have already marked settle at least one more cell — the hint will point at it.

Can a nonogram have two solutions?

In general yes, and that is why uniqueness is checked separately here rather than assumed. Being solvable line by line ought to imply a single answer, but trusting one check to establish the other is how a wrong assumption ships. Solutions are counted with the search stopping at two.

What does marking a cell empty do?

Nothing mechanical — it is a note to yourself, drawn as a cross. But it is most of the technique: knowing where a run cannot go is what lets you work out where it must. Players who skip the crosses find these far harder than they are.

What does a clue of 0 mean?

That the line is entirely empty. It is the most useful clue on the board, because it settles a whole row or column immediately.

Why is the picture never a recognisable object?

Because the puzzles are generated rather than drawn. A picture designed by a person can be a cat or a boat, but it also has to be checked for a unique solution afterwards and often is not. These are made the other way round: random pictures kept only when the clues admit exactly one answer and line reasoning alone finds it.