English

Reducing the generalised Sudoku problem to the Hamiltonian cycle problem

Data Structures and Algorithms 2016-03-10 v1 Discrete Mathematics Combinatorics

Abstract

The generalised Sudoku problem with NN symbols is known to be NP-complete, and hence is equivalent to any other NP-complete problem, even for the standard restricted version where NN is a perfect square. In particular, generalised Sudoku is equivalent to the, classical, Hamiltonian cycle problem. A constructive algorithm is given that reduces generalised Sudoku to the Hamiltonian cycle problem, where the resultant instance of Hamiltonian cycle problem is sparse, and has O(N3)O(N^3) vertices. The Hamiltonian cycle problem instance so constructed is a directed graph, and so a (known) conversion to undirected Hamiltonian cycle problem is also provided so that it can be submitted to the best heuristics. A simple algorithm for obtaining the valid Sudoku solution from the Hamiltonian cycle is provided. Techniques to reduce the size of the resultant graph are also discussed.

Keywords

Cite

@article{arxiv.1603.03019,
  title  = {Reducing the generalised Sudoku problem to the Hamiltonian cycle problem},
  author = {Michael Haythorpe},
  journal= {arXiv preprint arXiv:1603.03019},
  year   = {2016}
}
R2 v1 2026-06-22T13:07:31.499Z