Does Sudoku has any mathematical equation?

Programs which generate, solve, and analyze Sudoku puzzles

Does Sudoku has any mathematical equation?

Postby Guest » Fri Oct 28, 2005 5:02 am

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

Postby PaulIQ164 » Fri Oct 28, 2005 7:40 am

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

Postby 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)
dukuso
 
Posts: 479
Joined: 25 June 2005

For an example

Postby Optimizer » Fri Nov 04, 2005 10:43 am

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

-Optimizer
Optimizer
 
Posts: 4
Joined: 20 August 2005


Return to Software