Fig 1 - uploaded by Rhydian Lewis
Content may be subject to copyright.
Example of an order-3 Sudoku puzzle. This particular grid is logic-solvable. 

Example of an order-3 Sudoku puzzle. This particular grid is logic-solvable. 

Source publication
Conference Paper
Full-text available
Sudoku is a notorious logic-based puzzle that is popular with puzzle enthusiasts the world over. From a computational perspective, Su- doku is also a problem that belongs to the set of NP-complete problems, implying that we cannot hope to nd a polynomially bounded algorithm for solving the problem in general. Considering this feature, in this paper...

Contexts in source publication

Context 1
... future work, it is interesting to note that Sudoku can also be modelled as a graph colouring problem. This is done by considering each of the n 4 cells in a grid as a node, and then adding edges between any two nodes corresponding to a pair of cells in the same row, column, and/or box (meaning that the n 2 nodes occurring in each row/column/box will form a clique of size n 2 .) Further edges can then also be added due to the pre-filled cells that are supplied with the puzzle -for example in fig. 1 it is clear that nodes (cells) 9 (top right) and 10 (first on second row) should never be the same colour, and so we can add an extra edge between these in order to ensure that they will never be allocated the same colour in a feasible solution. Given such a graph, the task is to then colour the nodes using exactly n 2 colours. Graph colouring has, of course, been widely studied in the past (see [14], for one example) and in the future it is likely that various techniques from this field could show applicability to Sudoku and, indeed, vice-versa. 4 Finally, it is worth stressing that although Sudoku itself might not seem to have great practical implications in a real-world/industrial context, to its credit it is a problem that is very easy to understand, and it is certainly the case that it has encouraged many people to take an interest in constraint satisfaction problems. Perhaps more importantly though, it is noticeable that Sudoku features various similarities with other important combinatorial optimisation problems, and so its study should allow us to gain deeper insights into these as well. As an example, consider a typical timetabling problem where the aim is to assign a number of events to a limited number of timeslots and rooms in accordance with a set of constraints. In these problems it is common, among other things, to encounter pre-assignment constraints (e.g. "event 3 must be scheduled into room 6 in timeslot 8", etc.). In the past, various stochastic search techniques have been applied to handle these sorts of constraints in timetabling (see, for example, some of the works in [15]). However, it is noticable that this sort of constraint is actually very similar to the constraints introduced by the fixed cells in Sudoku. This suggests that it should also be useful to consider hybrid algorithms (of the sort described here) for these sorts of problems as well. Here, we refer the reader to papers by Merlot et al. [15] and Duong and Lam [16], where some preliminary work on this matter has been ...
Context 2
... its simplest form, Sudoku can be defined as follows. Given an n 2 × n 2 grid divided into n 2 distinct n × n boxes (denoted by the bold lines in fig. 1), the aim is to fill the grid so that three separate criteria are ...
Context 3
... some of the cells in a Sudoku grid will have been pre-filled by the puzzle master (see fig. 1). The player will then use these to logically determine the values for other cells in the grid, eventually allowing him-or-her to complete the puzzle. As can be imagined, how many and which cells the puzzle-master chooses to fill will therefore be particularly important if the puzzle is to be enjoyable for the player. Generally speaking, a "good" puzzle (from the player's perspective) should be configured in such a way so that is logic-solvable -that is, the player should be able to complete the puzzle in a logical sequence of steps using forward- chaining logic only (obviously the deductive abilities of different players will vary). In particular, a player should not usually be required to make random choices, especially when the grid is still quite empty, because if this guess turns out to be wrong, he-or-she will then have to go through the unsatisfying process of backtracking and re-guessing. For these reasons "good" Sudoku puzzles tend to have just one possible solution in each ...

Similar publications

Article
Full-text available
Constraint programming provides a number of ways to solve any given problem. Pure constraint models use primitive constraints and variables to achieve the desired functionality. However it is often the case that, through necessity or inclination, researchers extend constraint toolkits by building customized global constraints around existing or nov...

Citations

... The paper concludes that puzzles of higher order can be tackled by heuristic techniques and are able to outperform exact methods when solving such problems. The ideas and problem formulation presented in this paper have since then been extended in [9] and [10]. Those articles introduce constraint propagation techniques to reduce the search space before applying the meta-heuristic driven search process. ...
... Although basic local search often can produce satisfying results, it has been shown in the literature ( [9], [10]) that the introduction of constraint programming methods can bring significant improvements to the algorithm. ...
... One simple variant which was first described in [9] uses constraint propagation to reduce the domains for each cell variable until all variables are arc consistent before performing local search. Any unfixed cell that has only one possible domain value left can then be considered as a prefixed cell containing that value. ...
Article
Sudoku is not only a popular puzzle but also an interesting and challenging constraint satisfaction problem. Therefore, automatic solving methods have been the subject of several publications in the past two decades. Although current methods provide good solutions for small-sized puzzles, larger instances remain challenging. This article introduces a new local search technique based on the min-conflicts heuristic for Sudoku. Furthermore, the authors propose an innovative hybrid search technique that exploits constraint programming as a perturbation technique within the iterated local search framework. They experimentally evaluate their methods on challenging benchmarks for Sudoku and report improvements over state-of-the-art solutions. To show the generalizability of the proposed approach, they also applied their method on another challenging scheduling problem. The results show that the proposed method is also robust in another problem domain.
... The Sudoku game can be reduced to a satisfiability problem. It has been solved by constraint programming (CP) (Simonis, 2005) by a hybrid of CP and stochastic search (Lewis, 2007a), by neighbourhood search metaheuristics (Lewis, 2007b), and by genetic algorithms Koljonen, 2006, 2007). A Sudoku is a special case of a Latin square, an n × n grid filled with n distinct numbers, each occurring exactly once in each row and in each column (Dénes and Keedwell, 1974). ...
... A comparison of these results with the findings of Lewis (2007a, b) and with our own experiments using the algorithm of Lewis (2007b) shows that the methods proposed in this paper can solve Sudokus with the same number of givens within less computing time. Neighbourhood search (Lewis, 2007b) and the hybrid CP (Lewis, 2007a) algorithms have proved to scale well for instances of size n = 25, solving them in about 200 s. Neither of our two backtracking implementations could solve an instance of this size; however, CP could find a solution within 264 s when applied to the three-index model, and within 0.30 s when applied to the two-index model. ...
Article
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.
... 세로줄(column)에 1부터 9까지의 숫자가 한 번씩만 들어가야 한다. Yue와 Lee, 2006; Geem, 2007; Lewis, 2007a Lewis, , 2007b Santos-Garcia, 2007; Bartlett 등, 2008; Gradwohl 등, 2009; Moon 등, 2009; 등). ...
Article
Full-text available
Sudoku is a famous Latin-square-based number-placement puzzle. Mo and Xu (2008) proposed Sudoku square designs based on the idea of Sudoku. Using several Sudoku square designs which are mutually orthogonal, we can suggest the orthogonal Sudoku square designs with block effect discrimination.
... [1] An order-N sudoku puzzle has 4N 4 constraints: Each of the N 2 rows, columns, blocks must have exactly N 2 values, while each of the N 4 cells must be filled with only one value. [2] 3 Progressive Stochastic Search ...
Article
Using stochastic search methods to find solutions to Constraing Satisfaction Problems (CSPs) has been reasonably successful in the recent years, with the deterministic search methods performing worse in many combinatorially hard problems. This motivated us to test this 'superiority'of Stochas-tic Search methods over Deterministic Search methods. In this project, we implement Progressive Stochastic Search and Incremental Progressive Stochastic Search as methods to solve Sudoku puzzles of order-2,3 and 4. The results show that these methods do converge to correct solutions, build-ing heuristics during the process, without exploiting any problem-specific standard solving methods. The timings show that deterministic methods have an extremely fast convergence, solving order-2 & 3 puzzles in time less than 20 ms. On the other hand, PSS solves order-2 puzzles in about 11.554 µ, order-3 puzzles in about 545.850 ms, easy, intermediate & hard order-4 puzzles in about 2, 12 and 30 minutes respectively. 1 Previous Work This project is based on a 2003 paper titled 'PSS for solving CSPs'[1], by Bryan Chi-ho Lam and Ho-fung Leung. PSS requires no previous knowledge of the problem and builds heuristics during the period problem is being solved. The paper also suggests a modified PSS algorithm, termed as Incremental Progressive Stochastic Search (IPSS). The results talk about timing comparisons when PSS, IPSS, max-PSS, max-IPSS and LSDL are tested over N-queens problem, permutation generation problem, Latin squares, Quasigroup completion problems and random CSPs. Stochastic optimization approaches have previously been applied to solve sudoku CSP. Perez and Marwala used Cultural Genetic Algorithm (CGA), Repulsive Particle Swarm Optimization (RPSO), Quantum Simulated Annealing (QSA) and Hybrid Genetic Algorithm with Simulated Annealing (HGASA) to solve sudoku CSP[4].
Conference Paper
There are several possible algorithms to automatically solve Sudoku boards; the most notable is the backtracking algorithm, that takes a brute-force approach to finding solutions for each board configuration. The performance of the backtracking algorithm is usually said to depend mainly on two implementation aspects: finding the next available empty cell in the board and finding the options of available legal number that are relevant to the given cell. While these pieces of the backtracking algorithm can vary in efficiency based on their implementation, tests show that the algorithm itself also relies on the statistical distribution of the guesses that it attempts to “plug in” to the board in every given cell. The backtracking algorithm uses an array of the legal numbers in the cell to attempt a solution before it moves on to the next cell. If a solution cannot be found, it backtracks and attempts to solve the board again with a different guess choice. The more errors the solver makes, the more backtracks it must perform, which decreases its overall efficiency and increases its effective runtime. Tests of the solving algorithm were performed using 195 base solutions with multiple initial board configurations were performed to analyze the difference in the algorithm performance by comparing the number of recursive backtracks between sequential and randomly distributed guesses. Analysis show that using values that are given in a shuffled array significantly reduces the number of backtracks done by the solver and, as a result, improve the total effective efficiency of the algorithm as a whole.