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

4 posts
• Page **1** of **1**

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

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

Thanks

- Guest
**Posts:**312**Joined:**25 November 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)

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 of a solver using mathematical programming see

http://www.optimizationpartner.se/sudoku

-Optimizer

http://www.optimizationpartner.se/sudoku

-Optimizer

- Optimizer
**Posts:**4**Joined:**20 August 2005

4 posts
• Page **1** of **1**