A comparison of several enumerative algorithms for Sudoku
Leandro C Coelho and
Gilbert Laporte
Additional contact information
Leandro C Coelho: 1] CIRRELT—Interuniversity Research Center on Enterprise Networks, Logistics and Transportation, Québec, Canada[2] Université Laval, Québec, Canada
Gilbert Laporte: 1] CIRRELT—Interuniversity Research Center on Enterprise Networks, Logistics and Transportation, Québec, Canada[2] HEC Montréal, Montréal, Canada
Journal of the Operational Research Society, 2014, vol. 65, issue 10, 1602-1610
Abstract:
Sudoku is a puzzle played of an n × n grid where n is the square of a positive integer m. The most common size is n=9. The grid is partitioned into n subgrids of size m × m. The player must place exactly one number from the set N={1, …, n} in each row and each column of as well as in each subgrid. A grid is provided with some numbers already in place, called givens. In this paper, some relationships between Sudoku and several operations research problems are presented. We model the problem by means of two mathematical programming formulations. The first one consists of an integer linear programming model, while the second one is a tighter non-linear integer programming formulation. We then describe several enumerative algorithms to solve the puzzle and compare their relative efficiencies. Two basic backtracking algorithms are first described for the general Sudoku. We then solve both formulations by means of constraint programming. Computational experiments are performed to compare the efficiency and effectiveness of the proposed algorithms. Our implementation of a backtracking algorithm can solve most benchmark instances of size 9 within 0.02 s, while no such instance was solved within that time by any other method. Our implementation is also much faster than an existing alternative algorithm.
Date: 2014
References: Add references at CitEc
Citations: View citations in EconPapers (1)
Downloads: (external link)
http://www.palgrave-journals.com/jors/journal/v65/n10/pdf/jors2013114a.pdf Link to full text PDF (application/pdf)
http://www.palgrave-journals.com/jors/journal/v65/n10/full/jors2013114a.html Link to full text HTML (text/html)
Access to full text is restricted to subscribers.
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:pal:jorsoc:v:65:y:2014:i:10:p:1602-1610
Ordering information: This journal article can be ordered from
http://www.springer. ... search/journal/41274
Access Statistics for this article
Journal of the Operational Research Society is currently edited by Tom Archibald and Jonathan Crook
More articles in Journal of the Operational Research Society from Palgrave Macmillan, The OR Society
Bibliographic data for series maintained by Sonal Shukla () and Springer Nature Abstracting and Indexing ().