Generating highly balanced sudoku problems as hard problems

  • Authors:
  • Carlos Ansótegui;Ramón Béjar;Cèsar Fernández;Carla Gomes;Carles Mateu

  • Affiliations:
  • Departament d'Informàtica i Enginyeria Industrial, Universitat de Lleida, Lleida, Spain 25001;Departament d'Informàtica i Enginyeria Industrial, Universitat de Lleida, Lleida, Spain 25001;Departament d'Informàtica i Enginyeria Industrial, Universitat de Lleida, Lleida, Spain 25001;Department of Computer Science, Cornell University, Ithaca, USA 14853;Departament d'Informàtica i Enginyeria Industrial, Universitat de Lleida, Lleida, Spain 25001

  • Venue:
  • Journal of Heuristics
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Sudoku problems are some of the most known and enjoyed pastimes, with a never diminishing popularity, but, for the last few years those problems have gone from an entertainment to an interesting research area, a twofold interesting area, in fact. On the one side Sudoku problems, being a variant of Gerechte Designs and Latin Squares, are being actively used for experimental design, as in Bailey et al. (Am. Math. Mon. 115:383---404, 2008; J. Agron. Crop Sci. 165:121---130, 1990), Morgan (Latin squares and related experimental designs. Wiley, New York, 2008) and Vaughan (Electron. J. Comb. 16, 2009). On the other hand, Sudoku problems, as simple as they seem, are really hard structured combinatorial search problems, and thanks to their characteristics and behavior, they can be used as benchmark problems for refining and testing solving algorithms and approaches. Also, thanks to their high inner structure, their study can contribute more than studies of random problems to our goal of solving real-world problems and applications and understanding problem characteristics that make them hard to solve. In this work we use two techniques for solving and modeling Sudoku problems, namely, Constraint Satisfaction Problem (CSP) and Satisfiability Problem (SAT) approaches. To this effect we define the Generalized Sudoku Problem (GSP), where regions can be of rectangular shape, problems can be of any order, and solution existence is not guaranteed. With respect to the worst-case complexity, we prove that GSP with block regions of m rows and n columns with m驴n is NP-complete. For studying the empirical hardness of GSP, we define a series of instance generators, that differ in the balancing level they guarantee between the constraints of the problem, by finely controlling how the holes are distributed in the cells of the GSP. Experimentally, we show that the more balanced are the constraints, the higher the complexity of solving the GSP instances, and that GSP is harder than the Quasigroup Completion Problem (QCP), a problem generalized by GSP. Finally, we provide a study of the correlation between backbone variables--variables with the same value in all the solutions of an instance--and hardness of GSP.