The Science Behind SUDOKU Solving a Sudoku Puzzle Requires No Math, Not Even Arithmetic

The Science Behind SUDOKU Solving a Sudoku Puzzle Requires No Math, Not Even Arithmetic

YOUR CHALLENGE: Insert a number from 1 to 9 in each cell without repeating any of those digits in the same row, column or subgrid (3×3 box). The solutions to the moderately diffi cult Sudoku in the center and to others in this article appear at www.sciam. com, along with additional puzzles. 80 SCIENTIFIC AMERICAN COPYRIGHT 2006 SCIENTIFIC AMERICAN, INC. The Science behind SUDOKU Solving a Sudoku puzzle requires no math, not even arithmetic. Even so, the game poses a number of intriguing mathematical problems BY JEAN-PAUL DELAHAYE ne might expect a game of logic to appeal to very few diagonals add up to the same sum. Indeed, aside from the people—mathematicians, maybe, computer geeks, numbers and the grid, Sudoku has almost nothing to do with compulsive gamblers. Yet in a very short time, Sudoku the magic square—but everything to do with the Latin square has become extraordinarily popular, bringing to mind [see box on next page]. Othe Rubik’s cube craze of the early 1980s. A Latin square of order n is a matrix of n2 cells (n cells on Unlike the three-dimensional Rubik’s cube, a Sudoku puz- a side), fi lled with n symbols such that the same symbol never zle is a fl at, square grid. Typically it contains 81 cells (nine appears twice in the same row or column (each of the n sym- rows and nine columns) and is divided into nine smaller bols is thus used precisely n times). The origin of those grids squares containing nine cells each; call them subgrids. The dates back to the Middle Ages; later, mathematician Leon- game begins with numbers already printed in some cells. The hard Euler (1707–1783) named them Latin squares and stud- player must fi ll in the empty cells with the numbers 1 to 9 in ied them. such a way that no digit appears twice in the same row, col- A standard Sudoku is like an order-9 Latin square, differ- umn or subgrid. Each puzzle has one unique solution. ing only in its added requirement that each subgrid contain the Ironically, despite being a game of numbers, Sudoku numbers 1 through 9. The fi rst such puzzle appeared in the demands not an iota of mathematics of its solvers. In May 1979 edition of Dell Pencil Puzzles and Word Games fact, no operation—including addition or multipli- and, according to research done by Will Shortz, the crossword cation—helps in completing a grid, which in theo- editor of the New York Times, was apparently created by a ry could be fi lled with any set of nine different retired architect named Howard Garns. Garns died in India- symbols (letters, colors, icons and so on). Nev- napolis in 1989 (or 1981; accounts vary), too early to witness ertheless, Sudoku presents mathematicians the global success of his invention. and computer scientists with a host of chal- The game, published by Dell as “Number Place,” jumped lenging issues. to a magazine in Japan in 1984, which ultimately named it “Sudoku,” loosely translated as “single numbers.” The maga- Family Tree zine trademarked that moniker, and so copycats in Japan used on e t hi ng is not unresolved, however: the “Number Place” name. In yet another Sudoku-related the game’s roots. The ancestor of Sudoku is not, irony, then, the Japanese call the puzzle by its English name, as is commonly presumed, the magic square—an ar- and English speakers call it by its Japanese name. ray in which the integers in all the rows, columns and Sudoku owes its subsequent success to Wayne Gould, a peri- www.sciam.com SCIENTIFIC AMERICAN 81 COPYRIGHT 2006 SCIENTIFIC AMERICAN, INC. SUDOKU’S PREDECESSORS A Sudoku grid is a special kind of Latin square. Latin squares, which Cell 5 8 6 4 2 1 3 7 9 were so named by the 18th- 3 2 7 9 6 5 4 8 1 century mathematician Leonhard 1 2 3 4 9 1 4 3 7 8 6 2 5 Euler, are n×n matrices that are 2 3 4 1 fi lled with n symbols in such a way 1 6 3 5 8 4 7 9 2 3 4 1 2 that the same symbol never 2 4 5 1 9 7 8 6 3 appears twice in the same row or 4 1 2 3 column. Two examples are shown. 8 7 9 6 3 2 5 1 4 Small Latin square The standard completed Sudoku (n = 4) 7 5 8 2 1 3 9 4 6 grid (also known as a solution 6 3 1 7 4 9 2 5 8 grid) is a 9×9 Latin square that Subgrid 4 9 2 8 5 6 1 3 7 meets the additional constraint of having each of its nine subgrids Latin square that is also a completed contain the digits 1 to 9. Sudoku grid (n = 9) Leonhard Euler patetic retired judge living in Hong There are only 12 Latin squares of particular grid by elementary opera- Kong, who came across it while visiting order 3 and 576 of order 4, but 5,524,- tions. This result, from Bertram Felgen- Japan in 1997 and wrote a computer 751,496,156,892,842,531,225,600 of hauer of the Technical University of program that automatically generates order 9. Group theory, however, says Dresden in Germany and Frazer Jarvis Sudoku grids. At the end of 2004 the that a grid that can be derived from an- of the University of Sheffi eld in England, London Times accepted his proposal to other is equivalent to the original. For has now been verified several times. publish the puzzles, and in January instance, if I systematically replaced (Verifi cation matters for results that are 2005 the Daily Telegraph followed suit. each number with some other (say, 1 be- obtained this way.) Since then, several dozen daily papers in came 2, and 2 became 7, and so on), or If we count only once those grids countries all over the world have taken if I swapped two rows or columns, the that can be reduced to equivalent con- to printing the game, some even putting fi nal results would all be essentially the fi gurations, then the number shrinks to it on the cover page as a promotional same. If one counts only the reduced 5,472,730,538—slightly lower than the come-on. Specialty magazines and en- forms, then the number of Latin squares population of humans on the earth. De- tire books devoted to this diversion have of order 9 is 377,597,570,964,258,816 spite this reduction, Sudoku devotees sprung up, as have tournaments, Web (a result reported in Discrete Mathe- need not fear any shortage of puzzles. sites and blogs. matics in 1975 by Stanley E. Bammel Note that a complete Sudoku solu- and Jerome Rothstein, then at Ohio tion grid may be arrived at in more than State University). one way from any starting, or clue, grid EMANUEL HANDMANN, 1753, ORIGINAL PASTEL AT KUNSTMUSEUM BASEL As Many Grids as Humans ) ; it did not take long for mathe- Exactly how many Sudoku grids can (that is, an incomplete grid whose solu- maticians to begin playing “how many” exist has been rather diffi cult to estab- tion is a given complete version). No- page this games with Sudoku. For instance, they lish. Today only the use of logic (to sim- body has yet succeeded in determining and soon asked how many unique fi lled-in, plify the problem) and computers (to how many different starting grids there or “solution,” grids can be constructed. examine possibilities systematically) are. Moreover, a Sudoku starting grid is Clearly, the answer has to be smaller makes it possible to estimate the number really only interesting to a mathemati- than the number of Latin squares be- of valid Sudoku solution grids: 6,670,- cian if it is minimal—that is, if removing cause of the added constraints imposed 903,752,021,072,936,960. That num- a single number will mean the solution preceding pages by the subgrids. ber includes all those derived from any is no longer unique. No one has fi gured out the number of possible minimal grids, which would amount to the ulti- Overview/Scientifi c Sudoku mate count of distinct Sudoku puzzles. ■ Sudoku is more than just an entertaining logic game for players; it also raises It is a challenge that is sure to be taken a host of deeper issues for mathematicians. up in the near future. ■ Such problems include: How many Sudoku grids can be constructed? What is Another problem of minimality also the minimal number of starting clues that will yield one unique solution? Does remains unsolved—to wit, what is the Sudoku belong to the class of hard problems known as NP-complete? smallest number of digits a puzzle mak- ■ Puzzle mavens have come up with an array of approaches to attacking er can place in a starting grid and still Sudokus and with entertaining variations on the game. guarantee a unique solution? The an- swer seems to be 17. Gordon Royle of JEN CHRISTIANSEN; SOURCE: JEAN-PAUL DELAHAYE ( 82 SCIENTIFIC AMERICAN JUNE 2006 COPYRIGHT 2006 SCIENTIFIC AMERICAN, INC. the University of Western Australia has collected more than 38,000 exam- Another problem: What is the smallest ples that fi t this criterion and cannot number of digits that can be put in a starting be translated into one another by per- forming elementary operations.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us