User:Abzol/sandbox

$$ \begin{array}{cc|ccccc|} ~ & ~ & ~ & 1 & ~ & ~ & ~ \\ ~ & ~ & 3 & 3 & 3 & 4 & 3 \\ \hline ~ & 1 & ? & ? & ? & ? & ? \\ 1 & 2 & ? & ? & ? & ? & ? \\ ~ & 5 & ? & ? & ? & ? & ? \\ ~ & 5 & ? & ? & ? & ? & ? \\ ~ & 3 & ? & ? & ? & ? & ? \\ \hline \end{array} $$ Let's solve for this simple nonogram.

Seemingly some people think that you will ever have to do multiple row or line calculations at once - under the definition that a nonogram is only valid as long as there exists only one unique solution, this does not happen.

Since you won't (because this puzzle does in fact only have one solution), we can leisurely solve for one row at a time. Let's.

The first row, $$ \begin{bmatrix} ? & ? & ? & ? & ? \end{bmatrix} $$, to a human obviously has five possible solutions (calculatable for rows with only one hint by $$solutions = row - (hint - 1)$$, which for this would run as $$5 = 5 - (1 - 0)$$.)

Moving those solutions into a matrix gives us the following matrix, where each row represents one possibility:

$$ \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix} $$ We now calculate the average of each column, giving us the following: $$ \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \\ \hline \frac{1}{5} & \frac{1}{5} & \frac{1}{5} & \frac{1}{5} & \frac{1}{5} \end{bmatrix} $$