Combinatorial Explorations in Su-Doku

Combinatorial Explorations in Su-Doku
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Su-Doku, a popular combinatorial puzzle, provides an excellent testbench for heuristic explorations. Several interesting questions arise from its deceptively simple set of rules. How many distinct Su-Doku grids are there? How to find a solution to a Su-Doku puzzle? Is there a unique solution to a given Su-Doku puzzle? What is a good estimation of a puzzle’s difficulty? What is the minimum puzzle size (the number of “givens”)? This paper explores how these questions are related to the well-known alldifferent constraint which emerges in a wide variety of Constraint Satisfaction Problems (CSP) and compares various algorithmic approaches based on different formulations of Su-Doku.


💡 Research Summary

The paper treats the popular puzzle Sudoku as a canonical Constraint Satisfaction Problem (CSP) and investigates how the well‑known “alldifferent” global constraint can be exploited to design efficient propagation‑search solvers. After a brief introduction that generalises Sudoku to an n²×n² grid (with n² symbols per row, column and block), the authors formalise each cell as a variable xᵢⱼ whose domain is the set Mₙ² = {1,…,n²}. The essential Sudoku rule – each symbol appears exactly once in every row, column and block – is precisely an alldifferent constraint applied to three families of variable sets (rows, columns, blocks).

The paper’s main technical contribution is the description and implementation of a very simple algorithm, dubbed PS‑1‑2, that relies exclusively on two forms of propagation derived from alldifferent and on a binary depth‑first search limited to pair‑domains. Propagation proceeds in four elementary steps: (1) assign a value to a cell, shrinking its domain to a singleton; (2) delete that value from the domains of all cells sharing the same row, column or block; (3) apply the dual “single‑candidate” rule – if a value appears in only one domain of a given row/column/block, force that cell to take the value; (4) detect empty domains (failure) or full singletonisation (solution). The authors implement domains as packed bit‑vectors, allowing the four steps to be executed with constant‑time bit operations. Step 3 requires a transposition of the domain matrix so that for each symbol the algorithm can quickly test whether it occurs in exactly one cell of a row/column/block.

When propagation reaches a quiescent state but not all domains are singletons, the algorithm enters the search phase. It scans for any variable whose domain size is exactly two (a “pair”) and then branches on the two possible values. The first branch assigns the higher value, calls the propagation routine again, and recurses; if this branch fails, the algorithm backtracks, restores the saved bit‑vector state, assigns the lower value, and repeats. No deeper branching is performed – the search is strictly binary, hence the “2” in the name. The “1” denotes that only the basic alldifferent‑based unicity propagation (and its dual) is used; no more sophisticated consistency techniques (e.g., arc‑consistency, hidden‑tuple filtering) are employed.

The implementation is written in C under Cygwin. Core functions are solveStep (which iteratively applies propagation and the dual reduction) and pairReduce (the recursive binary search). The code stores the entire domain state in a global array of bit‑vectors, copies it before each speculative assignment, and restores it on backtrack. Counters track the number of propagation steps, reduction steps, and search calls for experimental analysis.

Experimental evaluation focuses on two classes of puzzles: (a) the set of minimal 9×9 Sudoku instances with exactly 17 givens compiled by Gordon Royle, and (b) a randomly chosen medium‑difficulty puzzle. For a representative minimal puzzle the solver performed 77 propagation operations and 11 binary search calls, solving the puzzle after a total of 77+11 = 88 elementary operations. The trace table in the paper shows that the search depth never exceeded two levels; most pair‑domains were resolved by propagation alone. The authors note that the strong pruning power of alldifferent propagation explains why the binary search remains shallow even for puzzles with very few clues.

Beyond the algorithmic core, the paper discusses the relationship between human‑style solving techniques (e.g., “Fish”, “XY‑Wing”, “XY‑Chain”) and the propagation‑search framework. While human solvers employ a large catalogue of pattern‑based heuristics, the authors argue that these heuristics can be viewed as specialized forms of domain reduction that are not captured by the naïve alldifferent propagation. Consequently, measuring puzzle difficulty solely by the number of givens is insufficient; the depth of propagation required before search, the frequency of pair‑domains, and the complexity of required patterns all contribute to perceived difficulty.

The authors also highlight that Sudoku’s alldifferent constraints are a special case of permutation constraints, linking Sudoku to other combinatorial CSPs such as Latin squares and graph coloring. This observation suggests that techniques developed for Sudoku may transfer to a broader class of problems, and vice‑versa.

In conclusion, the paper demonstrates that a minimalistic CSP formulation—using only basic alldifferent propagation and binary search on pair‑domains—can solve virtually all standard Sudoku instances efficiently. The work provides a clear, reproducible baseline for future research, and it points toward several extensions: incorporating stronger consistency checks (e.g., full arc‑consistency), integrating automated pattern detection to emulate human heuristics, and exploring hybrid approaches that balance propagation intensity against search depth. Such extensions could improve performance on the hardest minimal puzzles and yield more nuanced difficulty estimators.


Comments & Academic Discussion

Loading comments...

Leave a Comment