## Notes

You must view this page in a CSS compatible browser (like Internet Explorer, Mozilla or Opera), or else you won't see the filled-in cells or the borders. Here's an image of a possible rendering with CSS enabled:

And without:

And the actual nonogram in HTML:

1 | 2 | 2 | 2 | 1 | 2 | 1 | 2 | 2 | 1 | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|

4 | 1 | 3 | • | • | ||||||||

8 | • | • |

## What is it?

A nonogram is a puzzle in which the objective is to figure out which cells are filled and which cells are empty by utilizing numbers provided at the sides of the grid. By finding information in a row, you get additional information about the respective column(s). You then use this information to find out more about the row(s), et cetera, until the whole puzzle is completed, much like a normal crossword. Usually the filled cells will form a picture of something, like a bird, a telephone, a boat, a king, or a church. But it doesn't *have* to depict something.

A nonogram consists of a grid with numbers on its sides, giving information about the rows and columns. A 5x5 grid would look like this:

And with numbers on its sides:

1 | 1 | 5 | 1 | 1 | |||
---|---|---|---|---|---|---|---|

1 | |||||||

3 | |||||||

1 | 1 | 1 | |||||

1 | |||||||

1 |

And completely solved:

1 | 1 | 5 | 1 | 1 | |||
---|---|---|---|---|---|---|---|

1 | • | • | • | • | |||

3 | • | • | |||||

1 | 1 | 1 | • | • | |||

1 | • | • | • | • | |||

1 | • | • | • | • |

An arrow! Neat, huh?

The numbers on the sides of the table are called clues. (Some people also call them rules. I will stick to calling them clues.) These tell you how many consecutively filled squares there are in each cluster. Each number beside a row (or above a column) describes a cluster, and the clusters **must** appear in the order they are given in the clues with at least one blank square between them. This is rather logical, since if there were no blank cell to separate them, they would run into each other and no longer be independent clusters. A known blank square is usually marked with a small dot. Realize that it's just as important to figure out which cells are empty as to figure out which cells aren't; this will become evident very quickly. Consider the following row:

4 |
---|

There is only one cluster here, and the cluster has four consecutively filled cells. Since there are only four cells in which they can be placed, they will necessarily have to be placed in those four cells:

4 |
---|

As you can see, if the number of the cluster equals the number of available cells in a row, there's only one position in which the cluster can be placed (this is immediately evident; I'm just over-stating it for clarity). Let's say we have the clues 4 and 2 in a row with 7 empty cells:

4 | 2 |
---|

Just as before, there's only one possible way to fill this row. You might immediately think that the total length of this row is 4+2, but it's actually 4+1+2 since you need to add at least one blank cell between the two clusters, or else they will run into each other (forming one cluster of six filled cells):

4 | 2 | • |
---|

Consider the following row:

6 |
---|

Can we know anything about the placement of this cluster? Indeed we can. Imagine the cluster being moved from the far left to the far right:

6 | ||||||||
---|---|---|---|---|---|---|---|---|

6 | ||||||||

6 |

It naturally follows that at least the middle four cells should be filled since they overlap in our left-to-right test:

6 |
---|

So: If the length of the cluster is at least half the length of the row, you can know something about its position. The same holds true for rows with multiple clusters. Imagine the clusters as a single line, with the minimum one empty cell between them, then move the whole line from the left to the right (again showing all the steps for clarity; this isn't necessary every time you do this check, but there's a caveat, explained shortly):

9 | 7 | • | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

9 | 7 | • | |||||||||||||||||||

9 | 7 | • | |||||||||||||||||||

9 | 7 | • | |||||||||||||||||||

9 | 7 |

If we didn't try all possible combinations, and instead only did the far most left and far most right ones, it might look as if cell number 11 and 12 should be filled:

9 | 7 | • | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

9 | 7 | • | |||||||||||||||||||

9 | 7 |

This mistake is easy to avoid, however, if you keep in mind that only overlapping cells **that belong to the same cluster** should be filled.

Even though it should be obvious, it's worth pointing out: If you have a known empty cell in a row such that the first (or last, depending) cluster in that row can't fit on one side, mark all those cells as empty. Example:

5 | 6 | • |
---|

There is not enough space to the left for five cells, so we mark those cells as empty:

5 | 6 | • | • | • | • | • |
---|

From here, we can again imagine the two clusters as one line with the minimum one empty cell between them to extract even more information about that row:

5 | 6 | • | • | • | • | • | • | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

5 | 6 | • | • | • | • | • | • | |||||||||||||

5 | 6 | • | • | • | • | • |

(Notice how cell number 12 isn't filled here.)

Another thing which should be obvious but is worth pointing out anyway: If we know that the first or last cells in a row is filled, it necessarily follows that that is the beginning of the first (or last) clue:

4 | 1 | 1 | 3 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

4 | 1 | 1 | 3 | • | • |

Say we have a row like this:

3 |
---|

Since there's only one cluster here, it follows that the cell already filled must be a part of that cluster. Let's see how far out it can stretch, on both sides:

3 | |||||||||
---|---|---|---|---|---|---|---|---|---|

3 |

We see that it will never extend onto the two first and the two last cells. This means that these cells must be empty:

3 | • | • | • | • |
---|

All the examples given here are done in rows, but the same principles apply to columns as well. (Rows are easier to code and manage, and columns waste vertical space.)

## Linkage

- Nonogram Solver
- Informative site about nonograms. Has an extensive link page.