Constraint satisfaction problem
From Sudopedia
Jump to navigationJump to searchConstraint Satisfaction Problems can be solved using Donald Knuth’s Dancing Links algorithm.
Another way to model Sudoku as a constraint‑satisfaction problem is to treat it as a Binary Integer Linear Program.
x(i,j,k) = 1- if cell
(i, j)in the grid **is** equal tok
The cell‑constraint is then:
- Cell constraint
- ‘‘Sum over
kofx(i,j,k)= 1 for alliandj.’’
The remaining three constraints (row, column and block) can be expressed in the same way—as simple linear sums.