This commit is contained in:
Miloslav Ciz 2025-03-22 08:02:47 +01:00
parent 390c8b8a4c
commit 3d11ef05d8
36 changed files with 2003 additions and 1984 deletions

View file

@ -6,9 +6,9 @@ Nonogram (so named after Non Ishida but known by various other names such as gri
{ Nonogram has a [free](free_software.md), [suckless](suckless.md) implementation in Simon Tatham's Portable Puzzle Collection under the name "pattern". ~drummyfish }
**Rules** are simple: we have a two dimensional grid, each square can be either black or white, initially all squares are white (at least in the paper version, in computer implementations the squares may be gray, meaning unknown color). The goal is to fill some squares black and so reveal a hidden picture according to clues given on the sides (usually left and top) of the grid. Each row and each column has a clue consisting of N numbers; each such clue says the lengths of continuous black-colored segments that are contained in that row/column, in that order, with at least one white square between them. For example a clue "2 3" under some column says the column from top to bottom will begin with a number (even zero) of white squares, then exactly two black squares will appear, then at least one white square and then exactly three black squares.
**Rules** of the game are simple: we have a two dimensional grid, each square can be either black or white, initially all squares are white (at least in the paper version, in computer implementations the squares may be gray, meaning unknown color). The goal is to fill some squares black and so reveal a hidden picture according to clues given on the sides (usually left and top) of the grid. Each row and each column has a clue consisting of N numbers; each such clue says the lengths of continuous black-colored segments that are contained in that row/column, in that order, with at least one white square between them. For example a clue "2 3" under some column says the column from top to bottom will begin with a number (even zero) of white squares, then exactly two black squares will appear, then at least one white square and then exactly three black squares.
The fact that **nonograms don't generally have a unique solution** is easy to see from a trivial example of a 2x2 grid with clue numbers 1 in each column and row: two possible solutions will satisfy these clues (a checkerboard pattern and its inversion). It appears (according to someone's 2022 master's thesis that focused solely on this problem) that deciding or even estimating the number of solutions of given nonogram is neither easy nor fast.
The fact that **nonograms don't generally have a unique solution** is easily exposed by a trivial example of a 2x2 grid with clue numbers 1 in each column and row: two possible solutions will satisfy these clues (a checkerboard pattern and its inversion). It appears (according to someone's 2022 master's thesis that focused solely on this problem) that deciding or even estimating the number of solutions of given nonogram is neither easy nor fast.
```
1 1 1 2
@ -40,4 +40,5 @@ While constructing clues from given picture is trivial, solving nonogram is **[N
## See Also
- [sudoku](sudoku.md)
- [sudoku](sudoku.md)
- [minigame](minigame.md)