Sudoku

the basics and a worked example

Prepared by Brian Williams in May and August 2005
as ‘Sudoku made easier’ and ‘Sudoku made quicker’.
Material combined in March 2011.




 suuji wa dokushin ni kagiru




the basics




 the sudoku standard grid

The word sudoku is the contraction of a Japanese phrase which may be translated as ‘limiting to single digits’ – to pronounce it with the ‘o’ as in ‘dock’ is nearer the original.

A standard sudoku grid contains 81 squares formed by 9 columns and 9 rows. The whole is divided into 9 cells each of 9 squares (3x3). Three cells in line horizontally across the grid are sometimes referred to as a band, and three cells vertically as a stack.

Any number, or digit, placed in a square is given the power to ‘block’ the cell, the column, and the row that the digit inhabits. This means the same digit cannot appear again in any of those domains (as defined by the ‘rules’ of suduko). In all, each digit will block 20 squares as well as filling its own – influencing about one quarter of the entire grid.

print blank grid

The challenge is to complete the puzzle grid so that every cell, column and row displays the digits 1 to 9, one appearance for each digit in whatever necessary order. A typical ‘medium’ puzzle may have about thirty digits supplied by the setter, though the number of squares filled does not necessarily determine the level of difficulty.

Solving a sudoku puzzle is a process of logic rather than guesswork (which usually leads to more guesswork, and on to failure) or the ‘what if?’ substitution approach. Although the puzzle uses digits, these are merely convenient symbols and they have no numerical value as such within the grid. No mathematical knowledge is required for sudoku.

A potentially useful feature of the sudoku solving process – indeed, a lifeline in some cases – is the occurrence of a double, sometimes called a couple, or twins. Within the one domain (i.e. cell, column, row), two squares may be blocked to all but the same two digits. Which digit goes where is not yet decided, but the knowledge that only those squares can take only those digits means that both of the digits can be eliminated from all other squares in the domain. An example is shown in step 15 of the worked example.

Similarly, a triple (trio, threesome, triplets) may be found. If three squares within the one domain are recognised as taking only three digits (or if two of the squares will take the three digits and another square two of the digits) then the three digits can be discarded for all the other squares of the domain. The useful application of a triple is rare.

solving methods

A column-and-row scan, sometimes called cross-hatching, looks for vacancies in cells by visually filling the lines occupied by a particular digit. For each digit, 1 to 9 in order, the grid is swept from top left to bottom right. The method is demonstrated in the worked example.

Occasionally, the column-and-row scan will stall (fail to find a vacancy), and an individual square check is the way forward. This more demanding procedure is rewarded when eight digits are found to be blocking a square which can then be filled by the single unblocked digit. The method also locates doubles. More likely to work as the grid fills.

An alternative to the individual square check is to ask of columns and rows in turn where could the 1 be placed, the 2, and so on. For the most part, there will be too many squares for too many digits, but the effort may well discover that only one digit will fit a certain square. Again, a filling grid offers the better prospect of a result.

The elimination grid (see below) is designed for really stubborn puzzles. On the elimination grid, the normal square is replaced by an array containing the digits 1 to 9. By highlighting digits that are known and striking through digits that are blocked, all remaining possibilities are clearly shown. To reduce the risk of error when using the elimination grid, an alignment guide called the L-piece is recommended. A primed elimination grid is available at the worked example.







worked example




Have a look at this step-by-step completion of a fairly difficult asymmetric puzzle. Two solving methods are used – column-and-row scan, and individual square check (see the solving methods panel for description).

Print puzzle on standard grid
Print puzzle on elimination grid

 sudoku puzzle grid



 sudoku step 1
⟨ 1
Digits 1 and 2 offer nothing to begin with but digit 3 is well positioned for blocking at the bottom of the grid.

2 ⟩
And again.
 sudoku step 2
 sudoku step 3
⟨ 3
Now digit 4.

4 ⟩
So to digit 5.
 sudoku step 4
 sudoku step 5
⟨ 5
A 7 in the middle row of the top left cell blocks the middle row of the top right cell, leaving only the top row of that cell for its own 7 (possible squares pencilled). The blocking effect carries across to the top centre cell.

6 ⟩
Another 7, simpler.

 sudoku step 6
 sudoku step 7
⟨ 7
Top storey 8.

8 ⟩
A new sweep, and a 6 in the basement.
 sudoku step 8
 sudoku step 9
⟨ 9
Digit 8 will slot into a nearly filled bottom row. The row is finished by placing the only missing digit, 9.

10 ⟩
A further 8.
 sudoku step 10
 sudoku step 11
⟨ 11
Similarly to the situation in step 5, digit 8 can be pencilled in and its blocking influence used.

12 ⟩
The turn of 9.

 sudoku step 12
 sudoku step 13
⟨ 13
Another pencilled-in 9.

14 ⟩
One more.
 sudoku step 14
 sudoku step 15
⟨ 15
The sweep comes to a temporary halt. However, a double to the rescue. Only the digits 4 and 7 may fill two of the squares in the centre column (the tagged squares show the blocking digits).

16 ⟩
Digit 4 is pencilled in to get things going again.
 sudoku step 16
 sudoku step 17
⟨ 17
A much easier 4.

18 ⟩
Switch to individual square checking. The tagged squares leave only the possibly for a 2 in a square in the top left cell.
 sudoku step 18
 sudoku step 19
⟨ 19
The same method for the same row produces a 6, which puts a 5 in the only square left.

20 ⟩
Continuing with the method, a digit 3 is the only possibility for the top left square. A 2 completes the column.
 sudoku step 20
 sudoku step 21
⟨ 21
A pencilled-in 4 gives a result in the middle cell.

22 ⟩
Combination of methods. Digit 1 must go top row of top left cell, and (thanks to a placing in the central cell) digit 2 must go in the same row in the top centre cell. These pencilled-in digits and those of the tagged squares leave only a 7 for the top centre square of the top right cell.
 sudoku step 22
 sudoku step 23
⟨ 23
The last digit’s column produces (from individual square checking) a 1, and is completed by a 2.

24 ⟩
A fresh sweep. Pencilled-in squares force a 1.
 sudoku step 24
 sudoku step 25
⟨ 25
Individual square check for a 5...

26 ⟩
...continuing for a 2, and a column-filling 1.
 sudoku step 26
 sudoku step 27
⟨ 27
Sweep finds an easy 5 which gives a 6 to complete the cell.

28 ⟩
Another 5, another 6.
 sudoku step 28
 sudoku step 29
⟨ 29
There’s a square for a 1 in the central cell. The cell is filled by a 6, and the column by a 2.

30 ⟩
Digit 5 again.
 sudoku step 30
 sudoku step 31
⟨ 31
A 1 from individual square checking, and a 3 to complete the row.

32 ⟩
A straightforward 6, plus a 4 to fill the cell.
 sudoku step 32
 sudoku step 33
⟨ 33
The top left cell takes a 1 and completes with a 9, then a 4 fills the column that accepted the 9.

34 ⟩
Digit 3 to the middle right cell, leading to completion of a row with a 7.
 sudoku step 34
 sudoku step 35
⟨ 35
A simple 4 offers up a cell for completion, again with a 7.

36 ⟩
A 6 and a 2.
 sudoku step 36
 sudoku step 37
⟨ 37
Now a 7 and an 8...

38 ⟩
..with a final 8 from which the grid is filled.
 sudoku step 38