A constraint is a restriction placed on the Sudoku puzzle. All constraints are derived from the Rule.
Sometimes, constraint is used as an alias for House.
- Unit Constraints
- Each row must contain one of each digit.
- Each column must contain one of each digit.
- Each box must contain one of each digit.
Sudoku is a Constraint Satisfaction Problem (CSP). The grid must be completed in such a way that all constraints are satisfied. The size of each house matches the number of available digits. In a standard Sudoku, there are 9 digits and each house therefore contains 9 cells. With 27 houses, there are 243 unit constraints. In addition, there are 81 cell constraints, giving a total of 324 constraints.
Each of these 324 constraints has 9 possible candidates.