On May 16, 2012, at 1:09 PM, Mouse wrote:
[...] seems
much more satisfying than having solved a Sudoku puzzle -
although writing a program to solve Sudoku puzzles would also be a
fun effort.
I found it so. Writing code to generate sudoku was fun too, and gave
me an endless supply of sudoku that did not exhibit the patterns so
many newsstand books' sudoku do. It also gave me order-4 sudoku (where
the usual sudoku is order-3, ie, a 3x3 grid of 3x3 grids, this is a 4x4
grid of 4x4 grids). It could give me higher orders too, but even
order-4 is a bit too large for me to really enjoy solving it by hand.
My experience writing Sudoku solvers was for an algorithms class, which
was quite an interesting look at it. It was actually a rather boring
algorithm for solving, and the only part that was much challenge was
the data structure to bring the time down to O(n^6) instead of O(n^7),
where n is the order of the puzzle (e.g. 3 for a normal 9x9 puzzle).
I suspect someone more clever than I could get it down below that, but
that covers n^4 (all the cells of the puzzle) times n^2 (all the
possible values for each cell).
- Dave