Literature Review
Literature Review
ARNAB K. MAJI
Department of IT, North Eastern Hill University
Shillong, Meghalaya
India
SUDIPTA ROY
Department of IT, Assam University
Silchar, Assam
India
RAJAT K. PAL
Department of CSE, University of Calcutta
Kolkata, West Bengal
India
Abstract:
"Sudoku" is the Japanese abbreviation of a longer phrase,
"Suuji wa dokushin ni kagiru", meaning "the digits must remain
single". It is a challenging numeric puzzle that trains our logical mind.
Solving a Sudoku puzzle requires no math, not even arithmetic. Even
so, the game poses a number of intriguing mathematical problems. The
problem of solving a given Sudoku puzzle finds numerous applications
in practice. All the existing Sudoku solving techniques are primarily
guess based heuristic or computation intensive soft computing
methodology. In case of solving 9x9 Sudoku Puzzle, in each of these
algorithms, we have to separately go through 81 cells and perform
backtracking for the individual cells. In this paper, an attempt has
been made to develop an algorithm which is minigrid based, i.e., we
have to individually go through nine minigrids (instead of 81 cells)
and perform backtracking only on them, which is less time consuming.
Moreover, no guessing is involved in the whole computation.
1126
Arnab K. Maji, Sudipta Roy, Rajat K. Pal – A Novel Algorithmic approach for
solving Sudoku puzzle in Guessed Free Manner
1. Introduction:
6 9 8 3 7 6 2 5 1 4 9 8
2 5 1 2 5 9 4 8 6 7 1 3
7 5 8 1 4 3 7 9 6 2 5
5 6 3 4 7 9 5 6 2 3 1 8 4
4 8 2 9 1 7 5 3 6
1 8 5 2 9 1 6 3 8 4 5 2 7 9
9 6 9 3 7 1 6 4 8 5 2
2 4 7 6 2 1 5 9 8 3 4 7
5 4 2 9 5 4 8 7 3 2 9 6 1
2. Literature Review:
Table 2: The lower bound on the number of clues given in each row
and column of a Sudoku instance for each corresponding level of
difficulty.
Difficulty level Lower bound on the number of
clues in each row and column
1 (Extremely Easy) 05
2 (Easy) 04
3 (Medium) 03
4 (Difficult) 02
5 (Evil) 00
2 6 8 5
4 5 7 2 3
7 5 1
5 4 6 8 2
6 1 7
9 8 7 6 5
7 5 6 9
(a)
1 3 134
9
1 3 2 6 8 79
1 4 5 1 4
4 5 7 1 7
8 91 6
1 9 1 9
2
1 3 1 8 6 8 1 3 4 1 3 4 1 3 4 1 2 2 4 7 18 4 96
6 5 7 9 7 9 5 7 9 8 9 8 9
8 8
8 9
9 4 6
2 8 2 3 2 3 3 4
879 5 1 3 6
7 8 9 41 97 4 9 8 9
2
5 3 4 6 1 7 8 9
27 39
2 8 6 1 4
2 3 37 49
3 4 4 9 7
5
4 9
18 29 1 2 5 6 1 2 3 1 2 1 3 1 2 2 4 1 3
4 8
5 9 8 9
8 9 4 7 9 3 4
6 8 1 2 1 4 3 4 8 4 8
1 2
8 9 498 3 8 4 7 7 9 7 6 5
31 2 1 2 39 4 4 2 4 1 3
7 3 8
5 6 9
3 8 3 4 8 4 8
(b)
1 3 1 3 4
9 1 2 6 8 7 9
1 4 5 1 4
91 6
4 5 7 1 9 1 9 2 1 7 8
1 3 1 3 4 1 3 4 1 3 4 2 4 138 49
1 8 6 8 1 2
6 5 7 9 7 9 5 7 9 7 8 6 8
9 5
93 6
8 79 2 8 8 9 2 3 2 3 3 4 45 6 1
46 81 97 2
5 3 4 4 97
1 9
8 9
2 3 3 4
2 8
6 1 4
2 3
5
3 4 4 7
91 2 1 2 5 6 1 2 3 41 92 1 3
8 94 1 2 2 4 1 3
8 9 4 8 5 9
4 7 9 3
8 3 4 8 4 8
1 2 9 3 68 1 2 1 4
7 9 7 6 5
4 7
(c) 9
4 1 3
1 2
7 8 81 92 5 6 9 2 4
8
EUROPEAN ACADEMIC 3 4I, ISSUE 6/ SEPTEMBER 20138
RESEARCH, VOL.
4 8
1132
Arnab K. Maji, Sudipta Roy, Rajat K. Pal – A Novel Algorithmic approach for
solving Sudoku puzzle in Guessed Free Manner
B. Naked single
If there is only one possible value existing in a blank
cell, then that value is known as a naked single (Lee 2006).
After assigning the probable values for each blank cell, as
shown in Figure 3(b), we obtain the naked singles 3, 9, and 3 at
locations [5,2], [5,8], and [8,3], respectively. So, we can directly
assign these values to these cells. Then we eliminate these
digits (or naked singles) from each of the corresponding row,
column, and minigrid. Hence, after elimination of these
numbers, as stated above, we obtain a modified (reduced) status
of each blank cell as shown in Figure 3(c), wherein several
other naked singles could be found (and this process is
recursive until no naked singles are found).
C. Hidden single
Sometimes there are blank cells that do, in fact, have
only one possible value based on the situation, but a simple
elimination of candidate in that cell‟s row, column and minigrid
does not make it obvious. This kind of possible value is known
as a hidden single (Lee 2006). Suppose, if we re-examine the
possible values in each cell of Figure 3(b), hidden single can
D. Lone ranger
Lone ranger is a term that is used to refer to a number
that is one of multiple possible values for a blank cell that
appears only once in a row, or column, or minigrid (Lee 2006).
To see what this means in practice, consider a row of a Sudoku
puzzle with all its possibilities for each of the cells (red digits
are either givens or already achieved), as shown in Figure 4. In
this row, six cells (with red digits) have already been filled in,
leaving three unsolved cells (second, eighth, and ninth) with
their probable values written in them.
3 6
2 7 4 1 5 9 8 6 7 6 7
E. Locked candidate
Sometimes it can be observed that a minigrid where the
only possible position for a number is in one row (or column)
within that block, although the position is not fixed for the
number. That number is known as a locked candidate (Lee
2006). Since the minigrid must contain the number in a row (or
2 4 5 8 7 9 3 4 5 1 6
4 6 4 6
9 9 1 8 2 5 7 4 9 3
3 5
9
5 3 9 1 4 6 8 5 9 2
1 4 4 5
7
3 4 3 6 9 2 8 1 4
5 6 5
6
4 5
3 2 4 5 1 8 9 6 7
145 4 6 3 4 1 4
6 9 8 9
2 3 6 7 5
3 4
5
3 4 2 5 6 8 1 3 7 9
4
4 6 3 4
7 9 6 9
3 9 5 2 1 3 4 8
8 1 3 9 3 9 7 4 6 2 5
F. Twin
If two same possible values are present for two blank
cells in a row (or column) of a Sudoku puzzle, they are referred
to as twin (Lee 2006). Consider the partially solved Sudoku
puzzle as shown in Figure 6(a). Observe the two cells [2,5] and
[2,6]. They both contain the values 2 and 3 (means either 2 or
EUROPEAN ACADEMIC RESEARCH, VOL. I, ISSUE 6/ SEPTEMBER 2013
1135
Arnab K. Maji, Sudipta Roy, Rajat K. Pal – A Novel Algorithmic approach for
solving Sudoku puzzle in Guessed Free Manner
3). So, if cell [2,5] takes value 2, then cell [2,6] must contain 3,
or vice versa. This type of situation is an example of twin.
Once a twin is identified, these values can be eliminated
by striking through from the same row, column, and minigrid
as shown in Figure 6(b), as the values cannot be probable
candidates in other blank cells along the same row (or column)
and in the same minigrid.
4 7 2 3 2 3 3 4 3 4
5 8
6 8 9 8 9
1 3 4 5 5
2 4 2 4
5
8 5 7 2 3 2 3 51
6 9
9 3 1 6 4 5 2 8 7
2 3
1 2 4
7 5 2 3 7 8 9 4
(a)
4 7 2 3 2 3 3 4
5 8
6 8 9 8 9
1 3 4
5
3 4
5
2 4 5
2 4
5
8 5
7 2 3 2 3 1 6 9
9 3 1 6 4 5 2 8 7
2 3
1 2 4 7 5 2 3 7 8 9 4
(b)
Figure 6. (a) A partial Sudoku instance with presence of twin 2 and 3
in cells [2,5] and [2,6]. (b) Elimination of probable values (that are 2
and 3) based on the twin from the second row (2 is deleted from cells
[2,1] and [2,3]) and from the same minigrid (2 and 3 are deleted from
cells [1,4] and [1,5]).
4 5
7 6
9 8 1 2 3
4 5 4 5
6 6
(a)
4 5 4 5
7 6 9 8 1 2 3 6
4 5
(b)
4 5
7 4 5 9 8 1 2 3 4 6
6
(c)
Figure 7. Example rows of Sudoku puzzles with different varieties of
triplet. (a) A triplet of Variety# 1 with same three possible values
present in three cells. (b) A triplet of Variety# 2 with same three
possible values present in two cells and the other cell containing any
two of them. (c) A triplet of Variety# 3 with three possible values
present in one cell and the two other cells containing two different
subsets of two possible values of the earlier three values.
G. Triplet
If three cells in a row (or column) are marked with a set
of same three possible values, they are referred to as triplet
(Lee 2006). Like twins, triplets are also useful for eliminating
some other possible values for other blank cells. Triplet has
several variations like the following.
Variety# 1: Three cells with same three possible values,
as shown in Figure 7(a).
Variety# 2: Two cells with same three possible values
and the other cell containing any two of the possible
values, as shown in Figure 7(b).
Variety# 3: One cell with three possible values and the
two other cells containing two different subsets of two
possible values of the former three values, as shown in
Figure 7(c).
H. Quad
Analogous to triplet, a quad consists of a set of four
possible values and these values are present in some form in
four blank cells in a row (or column) of the Sudoku instance
(Lee 2006). That is, if the values only exist in four (blank) cells
in a row (or column), while each cell contains at least two of the
four values, then other values (or numbers except the specified
four values) can be eliminated from each of the assumed cells
(forming the quad). Figure 8 shows a row of a Sudoku puzzle
where the quad comprising the digits 1, 2, 4, 7 formed by the
cells in column four, six, seven, and eight. So other possible
values can straightway be eliminated from these cells, as shown
by striking through the inapplicable digits in the figure.
1 2
1 2 1 2 1 4
3 5 8
4 7
1 8
4 8 7 8
7 8 6
9 9
will never get assigned to this value. The XWing technique can
easily be generalized but swordfish is a technique that further
makes the possibility of assigning a digit to a blank cell more
specific. On the other hand, hidden subset is a kind of technique
that is very similar to twin or triplet or quad that have already
been explained above.
On the other hand, all the soft computing based Sudoku
solvers either use Genetic algorithm (Mantere and Koljonen
2007) or Bee colony (Pacurib et al. 2009), which is exhaustive
and extremely time-consuming. Needless to mention that these
techniques use their own set of operators to execute the
respective algorithms. Genetic algorithms belong to the larger
class of evolutionary algorithms that generate solutions to
optimization problems using techniques inspired by natural
evolution, such as selection, crossover, mutation, and
inheritance.
The Simulated annealing based Sudoku solver is a
probabilistic Sudoku solver. The general design is capable of
solving a Sudoku instance of order up to fifteen [7]. It has been
claimed that the solver has solved in actual hardware Sudoku
puzzles of up to order 12 within the competition-imposed time
limits.
1 2 3
4 5 6
7 8 9
Figure 9: The structure of a 99 Sudoku puzzle (problem) with its
nine minigrids of size 33 each as numbered 1 through 9. Minigrid
number 1 consists of the cell locations [1, 1], [1, 2], [1, 3], [2, 1], [2, 2],
[2, 3], [3, 1], [3, 2], and [3, 3], minigrid number 2 consists of the cell
locations [1, 4], [1, 5], [1, 6], [2, 4], [2, 5], [2, 6], [3, 4], [3, 5], and [3, 6],
and so on.
Figure 1(a)), out of these seven valid permutations only one will
finally be accepted following the subsequent steps of the
algorithm.
Now the algorithm considers one valid permutation (out
of the seven permutations) of minigrid 3 and all given clues in
P, and generates all valid permutations for minigrid 1. If at
least one valid permutation for minigrid 1 is obtained, we
proceed for generating all valid permutations for minigrid 7
obeying all given clues in P and the assumed valid
permutations of minigrids 3 and 1; otherwise, a second valid
permutation of minigrid 3 is considered, for which in a similar
way, we generate all valid permutations for minigrid 1, and so
on.
This is how the algorithm proceeds and generates all
valid permutations of a minigrid under consideration obeying
the given clues in P and a set of assumed valid permutations,
one for each of the minigrids considered earlier in succession,
up to this point in time.
4. Conclusion
BIBLIOGRAPHY: