Abstract: |
The popular logic puzzle, Sudoku, consists of placing the digits 1, …, 9 into a 9×9 grid, such that each digit appears only once in each row, column, and subdivided ‘mini-grid’ of size 3×3. Uniqueness of solution of a puzzle is ensured by the positioning of a number of given values. Quasi-Magic Sudoku adds the further constraint that within each mini-grid, every row, column and diagonal must sum to 15±Δ, where Δ is chosen to take a value between 2 and 8. Recently Sudoku has been shown to have potential for the generation of erasure correction codes. The additional quasi-magic constraint results in far fewer given values being required to ensure uniqueness of solution, raising the prospect of improved usefulness in code generation. Recent work has highlighted useful domain knowledge concerning cell interrelationships in Quasi-Magic Sudoku for the case Δ = 2, providing pruning conditions to reduce the size of search space that need be examined to ensure uniqueness of solution. This paper examines the usefulness of the identified rich knowledge in restricting search space size. The knowledge is implemented as pruning conditions in a backtracking implementation of a Quasi-Magic Sudoku solver, with a further cell ordering heuristic. Analysis of the improvement in processing time, and thereby of the potential usefulness of Quasi-Magic Sudoku for code generation, is provided.
|