## Does Sudoku has any mathematical equation?

Programs which generate, solve, and analyze Sudoku puzzles

### Does Sudoku has any mathematical equation?

I want to use some optimization software to solve it, such as LINDO.

But What is the object function and the constrain for this problem.

Thanks
Guest

Posts: 312
Joined: 25 November 2005

It's not really an optimisation problem, though. I doubt you'd get far with linear programming tools.
PaulIQ164

Posts: 533
Joined: 16 July 2005

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)
dukuso

Posts: 479
Joined: 25 June 2005

### For an example

For an example of a solver using mathematical programming see
http://www.optimizationpartner.se/sudoku

-Optimizer
Optimizer

Posts: 4
Joined: 20 August 2005