Hi All,
here is a sudoku solver I wrote recently. I tried it on just 3 probs,
the last ones from The Providence Journal, which it seems to solve.
## [output,feasible] = sudoku (input) - Try to solve a sudoku problem
##
## This function applies brutish force and may or may not work
properly. The
## method (1) excludes impossible values of cells within each group
(row,
## column and 3x3 block), (2) deduces the value of a cell that is the
only
## one to be able to assume that value within a group and (3) makes
guesses
## and sees where they lead (depth-first search). Does not check for
## unicity. May or may not detect unsolvalble cases properly.
##
## Please report success/failure to me <address@hidden>.
##
## input : 9 x 9 : initial grid w/ unknown values set to 0.
##
## output : 9 x 9 : final grid.
## feasible: true if a solution was found, 0 otherwise.
Good resolution for 2006: Do more useful things than the above!
Cheers,
Etienne
--
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne
<sudoku.m>