3.7.237. Sudoku

A constraint that can be used for modelling the Sudoku puzzle problem. A Sudoku square is an 9Γ—9 array in which 9 distinct numbers in [1,9] are arranged so that the following two conditions hold:

  • Each number occurs once in each row and column.

  • The numbers in each major 3Γ—3 block are distinct.

Figure 3.7.65. A partially Sudoku square and its completion
ctrs/sudoku

The Sudoku puzzle problem is to complete a partially filled board in order to get a Sudoku square. PartΒ (A) of FigureΒ 3.7.65 gives a partially filled Sudoku board, while partΒ (B) provides a possible completion.