Morrison 1 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, Morrison 2 . . . , 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. (1) 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: Morrison 3 Figure 2: Basic structure of Sudoku puzzle 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 Sudoku – “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. Morrison 4 (12) Figure 3: Different pieces of a Sudoku grid 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. Morrison 2 6 3 5 1 7 9 5 8 2 6 3 4 1 7 9 5 8 Figure 4: Completing a row 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 9 3 5 8 7 6 2 4 7 9 3 1 5 8 6 Figure 5: Completing a 3 x 3 subgrid 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, Morrison 6 and box. So, we can use these constraints to help us fill in the missing occurrence(s) of each number. 3 7 1 6 8 4 2 9 3 7 1 6 8 4 5 2 4 9 6 4 9 3 5 8 3 5 7 2 7 2 1 7 3 7 4 8 1 5 2 6 8 1 5 2 9 6 Figure 6: Completing multiple three-number series 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. Morrison 1 3 4 6 9 8 1 3 4 7 6 2 9 5 8 4 7 9 4 7 9 5 3 5 8 3 6 2 1 6 2 1 2 9 7 2 9 7 8 1 5 3 4 8 1 5 3 4 6 7 Figure 7: Completing a column of 3 x 3 subgrids 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. 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 Morrison 8 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. 7 6 3 5 2 1 3 2 6 5 6 1 2 9 8 7 1 6 5 4 3 3 2 3 7 4 2 6 9 8 5 1 2 1 6 48 7 3 48 2 148 6 7 9 3 5 1 3 2 6 9 5 4 8 7 9 5 3 1 6 2 (11) Figure 8: “Twin” cells 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, we are one step closer to solving this puzzle. The “twin” strategy can be helpful for deducing the contents of empty cells when there is seemingly not enough information to do so. By relying on the fact that both of the “twin” cells cannot contain anything other than the two designated numbers, both can be removed from play in that particular row, column, or box. This leaves the reader with much more information to go on – there are two less possible numbers for each remaining empty cell. This, hopefully, is indicative of an answer to the contents of at least one cell, or at least puts the reader two numbers Morrison 9 closer to such an answer. Using strategies such as the “twin” method and the one-cell fillin, the reader can deduce the solution to the Sudoku puzzle as a whole. All Sudoku puzzles follow this same basic strategy set, albeit in different combinations and situations, and with other twists thrown in. But the deductive logic necessary to solve such a puzzle is present across all forms of Sudoku. An example of a relatively simple Sudoku puzzle is as follows; it is considered to be of the simpler variety because of its number placement and the amount of numbers given in the puzzle. Figure 9: Easy Sudoku puzzle (“Very Easy Sudoku Puzzles”) This puzzle initially involves the three-number series method. For example, cells Eh and Ii each contain a 5; thus, cell Bg must be a 5 as well. We can continue solving the puzzle in this manner until we have exhausted all three-number series situations for the time being. Then, we can use the “twin” cell method – at this point, cell Ee and cell Ef can (after the initial solving) only contain 1 or 9. Thus, we know that neither of those Morrison 10 numbers can be contained in the rest of the row or the center box, making it easier to fill in those other empty cells. The reader can employ the basic techniques of single-cell, three-number series, and “twin”-cell solutions in this particular puzzle in order to reach the solution, so long as he or she remembers how to stack these strategies as the puzzle progresses: they must all be built upon in order to reach the final solution. The deductive logic present in Sudoku puzzles appeals to the general public. The math puzzle has become wildly popular over the past few decades, largely due to its nontraditional association with math. The basic concepts behind the mathematical puzzle were introduced in the thirteenth century and later explored by Euler as the Latin square, but hit the mainstream population when introduced as Sudoku. The basic strategies behind solving a Sudoku puzzle are relatively common-sense and easy to understand. They do not involve upper-level math, such as calculus or linear algebra, but the deductive logic involved offers the reader a taste of math without full, immediate immersion. “Mathematics…is really characterized by the use of deductive logic. If the problem you are contemplating can be solved solely through deductive logic, then you are working on a math problem”: Sudoku, then, truly is a mathematical puzzle (Rosenhouse and Taalman 18). Its roots in deductive logic appeal to the general public, who may not see such reasoning as “true” mathematics, though it is undoubtedly so. Sudoku offers a glimpse into the world of math and mathematical puzzles, requiring deductive logic and allowing even those who dislike math most to find a way in which to connect. Morrison 11 Works Cited Block, Seymour S., and Santiago A. Tavares. Before Sudoku: The World of Magic Squares. New York: Oxford University Press, 2009. Print. Delahaye, Jean-Paul. "The Science Behind Sudoku." Scientific American 2006: 80. Print. Klyve, Dominic, and Lee Stemkoski. Greco-Latin Squares and a Mistaken Conjecture of Euler. Dartmouth College, 2003. Print. Rosenhouse, Jason, and Laura Taalman. Taking Sudoku Seriously: The Math Behind the World's Most Popular Pencil Puzzle. New York: Oxford University Press, 2011. Print. "Sudoku History." Sudoku. Web. May 13, 2013 <http://www.conceptispuzzles.com/index.aspx?uri=puzzle/sudoku/history>. "Very Easy Sudoku Puzzles 01-04 - Target Time: 6 mins." About.com Puzzles. Web. <http://puzzles.about.com/library/sudoku/blprsudokuxe01.htm>.