Morrison Olivia Morrison Prof. Winkler Writing Assignment #4 05.23.2013 Sudoku: Deductive Logic and Latin Squares The mathematical puzzle of Sudoku is a popular brainteaser with ties to a famous mathematical puzzle, and involves both strategy and deductive logic to reach a solution. There are two base strategies to solve a Sudoku puzzle, focusing on the row/column and smaller grid aspects of the game respectively. These methods can be stacked on top of each other in such a way that each step brings the reader generally one space closer to a final solution. If the methods are correctly followed, a solution is forthcoming. The strategic and sensible aspects of Sudoku make it a popular, widely-played game across all different levels of mathematical training and study. The game of Sudoku, printed in magazines and books across the world and played by everyone from elementary 1
17
Embed
math.dartmouth.edupw/math7/morrison6.docx · Web viewSudoku: Deductive Logic and Latin Squares. The mathematical puzzle of Sudoku is a popular brainteaser with ties to a famous
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Morrison
Olivia Morrison
Prof. Winkler
Writing Assignment #4
05.23.2013
Sudoku: Deductive Logic and Latin Squares
The mathematical puzzle of Sudoku is a popular brainteaser with ties to a famous
mathematical puzzle, and involves both strategy and deductive logic to reach a solution.
There are two base strategies to solve a Sudoku puzzle, focusing on the row/column and
smaller grid aspects of the game respectively. These methods can be stacked on top of
each other in such a way that each step brings the reader generally one space closer to a
final solution. If the methods are correctly followed, a solution is forthcoming. The
strategic and sensible aspects of Sudoku make it a popular, widely-played game across all
different levels of mathematical training and study.
The game of Sudoku, printed in magazines and books across the world and played
by everyone from elementary schoolers to retirees, has its roots in the work of a famous
mathematician. Leonhard Euler (1707-1783), a Swiss mathematician and physicist,
developed the idea of Latin squares (“Sudoku History”). He published his ideas in a
paper titled Recherches sur une nouvelle espèce de quarre magique (Investigations on a
New Species of Magic Square), where he explored the concept of magic squares – a
concept dating as far back as the thirteenth century (“Sudoku History”). Euler’s Latin
squares had a set of rules similar to the constraints in a game of Sudoku today: “A Latin
square (of order n) is an n by n array of n distinct symbols (usually the set of integers
(1)
1
Morrison
{1, . . . , n} is often used for convenience) such that each symbol appears exactly once in
each row and column” (Klyve and Stemkoski 1). So, there cannot be any repeated
numbers in a given row or column, and every number must appear in a given row or
column. The following examples of Latin squares (of orders 3, 4, and 5, respectively)
illustrate the concept on a smaller scale, aiding in comprehension.
We can see from these examples that each number can only appear once in each row and
column. Thus, there is a finite number of ways in which the numbers can be arranged.
Finding one such way in which to arrange the numbers of a Latin square was an idea that
appealed to Howard Garns. Mr. Garns invented the game of Sudoku as it is known today
in 1979. He took “Euler’s Latin square and applied it to a 9 x 9 grid and added nine 3 x 3
subgrids, each with the numbers 1 to 9” (Block and Tavares 7). Each number in the set
{1, 2, …, 9} must only appear once inside each 3 x 3 section, as well as once in each row
and column: “A standard Sudoku is like an order-9 Latin square, differing only in its
added requirement that each subgrid contain the numbers 1 through 9” (Delahaye 81).
This added third condition restricts the number of ways that a Sudoku grid can be made
successfully. The grid’s basic shape is as follows:
Figure 2: Basic structure of Sudoku puzzleFigure 2: Basic structure of Sudoku puzzleFigure 2: Basic structure of Sudoku puzzleFigure 2: Basic structure of Sudoku puzzleFigure 2: Basic structure of Sudoku puzzleFigure 2: Basic structure of Sudoku puzzleFigure 2: Basic structure of Sudoku puzzle
2
Morrison
The game of Sudoku initially became popular in Japan, where it was discovered in 1984
(Block and Tavares 7). The Japanese originally named the puzzle Suji wa dokushin ni
kagiru, or “the numbers must be single” (7). Over time, the name was shortened to Su-
doku – “single numbers” (7). Sudoku gained widespread popularity in Japan and across
the globe, and was eventually rediscovered and popularized in the United States
beginning in 2005 (9). It has since spread worldwide to “at least 70 countries, over 600
newspapers, with clubs, online chat rooms, videos, card games, competitions, and many
books” (9-10). Sudoku’s rise to popularity was sudden and far-reaching. The puzzle’s use
of logic and reasoning makes it accessible to even those not well versed in mathematics,
creating a wide-scoped appeal to the general public.
Sudoku puzzles can be approached from several different strategic angles, using a
variety of methods to reach an overall solution. The basic aspects of the Sudoku grid are
essential to learning the strategies involved in the puzzle. An empty Sudoku grid with
highlighted pieces is shown in Figure 3.
Figure 3: Different pieces of a Sudoku grid
(12)
3
Morrison
Each row is labeled with a different capital letter, A through I, and each column with a
lowercase letter, also a through i (12). This prevents confusion: each cell (smallest
square) gets its own name. For example, the top-most cell is labeled Aa (12). The 3 x 3
subgrid can also be called a “box” (12). Each row, column, and box must contain the
numbers 1 through 9 in its nine cells. In any given Sudoku puzzle, not all of these cells
contain a number. It is up to the reader to fill in the blank cells and thus complete the
puzzle.
The basic strategy involved with solving a Sudoku puzzle is logic-based:
wherever there is a blank cell, the reader must deduce its contents from the given
information. There are several base strategies to accomplish one’s goal of completely
solving the Sudoku puzzle. First, there is the basic filling of a row or column: if all
numbers but one are present in a given row or column, then the missing number must fill
the open cell.
Figure 4: Completing a row
2 6 3 4 1 7 9 5 8
2 6 3 1 7 9 5 8
4
Morrison
In this case, we see that 4 is the only missing number in the set {1, 2, …, 9}, and thus we
place it in the open space. This is perhaps the most obvious strategy involved in solving a
Sudoku puzzle. The next strategy is somewhat similar, though it involves solving an
isolated 3 x 3 subgrid embedded in the 9 x 9 overall grid.
2 4 7 9 3 1
2 4 7 9 3
Figure 5: Completing a 3 x 3 subgrid
2 4 7 9 3 1
2 4 7 9 3 1
2 4 7 9 3 1
2 4 7 9 3 1
2 4 7 9 3 1
2 4 7 9 3 1
2 4 7 9 3
2 4 7 9 3
2 4 7 9 3
2 4 7 9 3
2 4 7 9 3
2 4 7 9 3
5
Morrison
Eight of the nine boxes in the 3 x 3 subgrid are filled, so we use the remaining number –
1 – to fill the open cell. This method uses the same basic strategy as the previously
mentioned row- and column-
focused approach. The row-,
column-, and box- filling
strategy can be repeated with
a series of three numbers,
rather than an isolated row,
column, or box. We know that each
row,
column, and box can only contain one of each number. So, in a set of three boxes (one
column of boxes), the same number can only appear three times. Each occurrence of the
number must be in a separate row, column, and box. So, we can use these constraints to
help us fill in the missing occurrence(s) of each number.
2 7
Figure 6: Completing multiple three-number series
9 3 71 6 8 4 5 26 4 95 8 37 2 13 7 48 1 52 9 62 6
8 1 5 77 2 5 3 4 94 21 6 8 3 7
6
Morrison
Let us label the rows A through I, as before, and the columns a through c. Then we can
begin to deduce the contents of
the empty cells. Beginning
with 1, we see that cells Ba and Hb
each contain a 1. So, the final 1
must be present in the second box,
in column c. That leaves us with cell
Fc, where we can place the last 1. We
can repeat this strategy
for all of the other numbers
that appear twice, eventually solving the puzzle.
Of course, Sudoku is generally not so easily solved, and involves the use of all
three of these strategies at the same time to solve the puzzle as a whole. The reader must
look at both the rows (or columns) and boxes in order to fill in the blank spaces. The
following is an example of three stacked 3 x 3 subgrids with selected open cells – one
column of 3 x 3 boxes from a full Sudoku puzzle.
Figure 7: Completing a column of 3 x 3 subgrids
3 4 68 1 52 9 76 2 15 8 34 7 99 5 87 6 21 3 4
3 4 8 1 52 9 76 2 15 34 7 99 8 6 1 3 4
7
Morrison
There are several ways in which to approach this piece of a Sudoku puzzle. We can start
by looking for any situations in which we can use our first two methods. The bottom 3 x
3 box is only missing one number, so we can fill in that open cell with a 6. That means
that the right-most column is only missing one number, so we can complete it as well
(using a 2). We can repeat this sequence beginning with the middle box, which is also
only missing one number. We fill it in with an 8, and then see that the middle column is
now missing only one number – a 5. So we fill that in, leaving only one open cell in the
top 3 x 3 box. We place a 7 in the final blank cell, having completed the puzzle using a
combination of our previously learned strategies.
8
Morrison
The aforementioned basic strategies are not the only methods of finding the
solution to a Sudoku puzzle, however. When the answer to a blank cell does not present
itself clearly, we can sometimes rely on a two-cell method; we can find a twin. A twin is
“a pair of cells in the same region having the same two candidate values” (Rosenhouse
and Taalman 12). Twins can eliminate
possible numbers for other cells. For
example, if (as we will see in Figure 8) there
are three blank cells in a column and two can
only be filled by the same two possible
numbers, then the contents of the third
cell can be deduced.
We see from this image that (using the notation from Figure 3) both cell Gb and cell Gd
can only be filled by a 4 or an 8, while cell Gf can be filled by a 1, 4, or 8. Thus, because
the 4 and the 8 must be used to fill cells Gb and Gd, cell Gf must contain a 1. From there,