by dukuso » Fri Oct 28, 2005 7:59 am
it's a constraint satisfaction problem.
You can solve it with "eclipse" or such.
81 variables, one for each cell,
27 constraints :
alldifferent(x1,x2,..,x9)
alldifferent(x73,x74,..,x81)
...
alldifferent(x1,x10,..,x73)
...
alldifferent(x1,x2,x3,x10,x11,x12,x19,x20,x21)
...
you see the pattern.
domains are {1,2,3,4,5,6,7,8,9} for empty cells or e.g.
{7} if there is a clue 7 in that cell (variable)