Journal home page
General information
Submit an item
Download style files
Copyright
Contact us
logo for The PracTeX Journal TUG logo

Distractions: Sudoku; contest winners and answers

The Editors

This column offers some amusements as a distraction from writing serious LaTeX and TeX documents. In this issue there is one puzzle with three levels of entries (and prizes). Feel free to suggest or send ideas for other distractions.


Sudoku - a simple yet challenging puzzle

sudoku grid

Sudoku rules: Complete the grid so that every row, column, and 3-by-3 box contains every digit, 1 to 9.

The puzzle shown above is an easy one -- give it a try. The solution is shown at the end of this page, but try solving it on your own before looking. Hint: In the top row, a 1 may be placed in the 7th square only. It can't go in the 1st, 2nd, or 6th squares since those 3-by-3 boxes already have a 1.

The contest: Typeset this grid using TeX macros. You may use LaTeX, ConTeXt, plain TeX, AMSTeX, or your favorite set of macros.

For some ideas on how to compose the basic grid, see Will Robertson's Square cells paper. There is also a Sudoku package on CTAN, but for this contest you must write original macros.

Beginners category. Typeset the grid as shown above. This category is open to those who have been using TeX for less than one year.

Regular category. Create a new macro, \sudoku{file}, which reads a sudoku puzzle file and then typesets the grid. A sudoku puzzle file is a simple text file with nine lines, and each line has nine characters: the digits 1-9 or (.) for a blank square.

For Wizards only. Create a new macro, \sudokusolve{file}, which which reads an easy sudoku puzzle file, solves it, and then typesets the solved grid. See this Sudoku web site for some sample automated solving methods.

How to enter the contest: Send your source file and either a pdf or dvi file to Sudoku. Put your name in the subject line of the email. Entries must be received by January 15, 2006. After the closing date we will select submissions at random and the first three in each category with correct answers will receive a souvenir PracTeX postcard.

More about Sudoku. A good site to start with is Sudoku Solver. It has a free automated solver that will show you step-by-step how it's done. There are numerous other sites that offer free and shareware Sudoku solvers and sample puzzles. Warning: these puzzles can be addictive.


Winners of the previous Distractions contests

Winners of the Pitfalls Contest:
Gianluca Pignalberi
Ed Thoele
Mads Sorensen
Reinaldo Pis Diez
Brian Elmegaard

Winners of the Web Treasure Hunt:
Barbara Beeton
Joy Morris
Javier Mateos
Klaus Hoeppner

Answers.

TeX Bug
	  cartoon
The prize: a TeX Bug cartoon postcard














sudoku grid

Solution to the Sudoku puzzle.


Page generated June 9, 2010 ; TUG home page; search; contact webmaster.