Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's a reverse example: Nonogram #18,950,614 (in section 759) is "21-1-12-21-12+4-21-1-3-11". If we fill in every cell that absolutely must be filled in based only on the data shown in a single row or column (plus the Xs that the JavaScript shows us), we get to this point:

         2  1
        41131
    1 2 ___#_
    2 1 ##x#x
    1 2 #__#_
      1 #xxxx
    2 1 _#_x#
I believe at this point the tactic of "just find a cell that must be black based only on data from its row or column" fails. We can continue only by "using our heads" (i.e. "backtracking"), or by starting to mark cells that must be empty based on data from only their row or column. The cell with the capital X below must be empty because of data in row 3. But the JavaScript didn't auto-mark it with an X. Maybe this is just a logic bug in the JavaScript?:

         2  1
        41131
    1 2 ___#_
    2 1 ##x#x
    1 2 #X_#_
      1 #xxxx
    2 1 _#_x#
And from there we can solve column 2, row 1, row 3, and row 5, in that order.


Isn't that situation covered in the original description? They said that marking squares that must be empty is fair game. The only thing not permitted is forced backtracking.

I don't think it's a bug in the javascript either, it seems intentional that it only fills in the x's automatically if you've filled in the squares for that row/column.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: