Next / Previous / Contents / Shipman's homepage

2. Encoding the puzzle

The first step to getting a solution is to encode the initial state of the puzzle. Use an ordinary text editor to create a text file containing nine lines representing the nine rows of the puzzle.

On each line, type “.” for each empty cell, or the digit if the cell is initially filled in.

To make it easier to verify correct entry, and to give the puzzle more structure, you can add whitespace anywhere within a line, and you can add blank lines between rows.

Here is a file representing a complete puzzle. The spacing shown here is only a suggestion, but this spacing does make it easier to check the file against the original puzzle.

7 2 .   . . 5   1 . .
. 1 5   9 8 .   4 . .
. 8 .   . . 1   . . 6

. 4 .   . 3 .   6 . 5
3 . .   6 . 2   . . 7
9 . 1   . 7 .   . 2 .

5 . .   7 . .   . 9 .
. . 2   . 9 6   3 5 .
. . 4   2 . .   . 6 8