sudoku made quicker















From 'elementary' to 'fiendish', any sudoku grid appearing in a newspaper or puzzle book can be solved using just two, or occasionally three, basic search routines. Familiarisation with these will lead to quicker solving. The following step-by-step completion of a fairly difficult asymmetric puzzle demonstrates the object search method with the help of 'stripped down' solving grids.


rules:
•  the cell rule: every digit from 1 to 9 must appear in each of the nine cells of the grid (a cell is a 3x3 formation of squares) and therefore no one digit can appear twice in a cell.
•  the row rule: every digit from 1 to 9 must appear across each of the nine rows of the grid and therefore no one digit can appear twice in a row.
•  the column rule: every digit from 1 to 9 must appear down each of the nine columns of the grid and therefore no one digit can appear twice in a column.


conventions:
•  shaded squares are blocked to the object digit (because of the row or column rule).
•  X signifies the only squares in a particular cell the object digit may occupy.
•  N signifies a square occupied by a digit other than the object digit.
•  the numbering of rows and columns starts from the top left corner of the grid.
•  only the information relevant to the case is shown in the solving grids.


the puzzle grid:

 the puzzle grid

print out puzzle grid


The simplest and quickest search routine moves from top left cell to bottom right cell while focused on a particular digit in the order 1 to 9. Rows and columns that pass through the target cell are checked to see if their contents isolate the object digit according to the rules. The process is repeated as long as squares can be filled.


object digit: 3
target cell: bottom centre

 digit 3 to bottom centre cell


object digit: 3
target cell: bottom right

 digit 3 to bottom right cell


object digit: 4
target cell: bottom right

 digit 4 to bottom right cell


object digit: 5
target cell: bottom left

 digit 5 to bottom left cell


object digit: 7
target cell: top centre

 digit 7 to top centre cell

Whatever the outcome of the X squares, the top row of the target cell will be blocked to the digit 7.

In detail: the presence of a 7 in one of the middle squares of the top left cell precludes the same digit from appearing in the middle squares of the top right cell (row rule); all the bottom squares of the top right cell are occupied by other digits; therefore the 7 for the top right cell must appear in one of its top squares, although it is not yet known which. The squares of the target cell that are affected by this unresolved situation are marked by box-shading to convey the concept even though one of them contains a digit.


object digit: 7
target cell: bottom left

 digit 7 to bottom left cell


object digit: 8
target cell: top left

 digit 8 to top left cell


object digit: 6
target cell: bottom left

 digit 6 to bottom left cell


object digit: 8
target row: row 9

 digit 8 to row 9


Row 9 of the puzzle grid can now be completed by filling the only available square with the only missing digit (9).


object digit: 8
target cell: middle centre

 digit 8 to middle centre cell


object digit: 8
target cell: middle right

 digit 8 to middle right cell

Whatever the outcome of the X squares, the right column of the target cell will be blocked to the digit 8.


object digit: 9
target cell: top centre

 digit 9 to top centre cell

Whatever the outcome of the X squares, the top row of the target cell will be blocked to the digit 9.


object digit: 9
target cell: middle centre

 digit 9 to middle centre cell

Whatever the outcome of the X squares, the top row of the target cell will be blocked to the digit 9.


object digit: 9
target cell: middle right

 digit 9 to middle right cell

Whatever the outcome of the X squares, the left column of the target cell will be blocked to the digit 9.


At this point, the 'digit and cell' routine seems unable to isolate a digit. The solving process switches to the search for a single.

A single is the only digit that will fit into a particular square once all rules have been applied. The search routine requires the systematic checking of every unfilled square to see if it will take just one digit. Looking for a single is potentially a time consuming exercise and at a relatively early stage may prove unproductive, as here. However, by noting the squares that will take just two digits, a couple might be discovered.

A couple (sometimes called a double or twins) exists when two squares of the same cell, row or column present an either/or option for two particular digits while being blocked to all other digits. Whatever the outcome, neither digit will occupy any other square in the cell, row or column and both digits can be discarded as possibilities for those other squares. An example follows.


object search: couple
target column: column 5

 couple in column 5

In detail: digits 1, 2, 3, 8, 9 are blocked from the couple squares by the column rule; digits 5, 6 are blocked by the row rule. Only the digits 4 and 7 remain as possibilities. Since the two squares must eventually be filled by the only two digits available to them, no other square of the column is able to take either digit.


object digit: 4
target cell: top centre

 digit 4 to top centre cell

Whatever the outcome of the X squares (which contain the couple 4 and 7), the centre column of the target cell will be blocked to the digit 4.


object digit: 4
target cell: top left

 digit 4 to top left cell


object search: single
target row: row 3

 single in row 3

Digits 1, 3, 4, 7, 8, 9 are blocked from the single square by the row rule; digits 5, 6 are blocked by the column rule.


object search: single
target row: row 3

 single in row 3

Digits 1, 2, 3, 4, 7, 8, 9 are blocked from the single square by the row rule; digit 5 is blocked by the column rule.

Row 3 of the puzzle grid can now be completed by filling the only available square with the only missing digit (5).


object search: single
target column: column 1

 single in column 1

Digits 1, 4, 5, 6, 7, 8, 9 are blocked from the single square by the column rule; digit 2 is blocked by the cell rule.

Column 1 of the puzzle grid can now be completed by filling the only available square with the only missing digit (2).


object digit: 4
target cell: middle centre

 digit 4 to middle centre cell

Whatever the outcome of the X squares, the bottom row of the target cell will be blocked to the digit 4.


object search: single
target row: row 1

 single in row 1

In detail: for the top left cell, the digit 1 is limited to the top row; for the top centre cell, the digit 2 is limited also to the top row. Whatever the outcome of these cells, digits 1 and 2 are blocked from the top row of the top right cell. Digits 3, 4, 5, 6, 8, 9 are blocked from the single square by the column rule.


object search: single
target column: column 8

 single in column 8

Digits 3, 4, 5, 6, 7, 8, 9 are blocked from the single square by the column rule; digit 2 is blocked by the row rule.

Column 8 of the puzzle grid can now be completed by filling the only available square with the only missing digit (2).


object digit: 1
target cell: top right

 digit 1 to top right cell

Whatever the outcome of the X squares, the top row of the target cell will be blocked to the digit 1.


object search: single
target column: column 4

 single in column 4

Digits 3, 4, 6, 7, 8, 9 are blocked from the single square by the column rule; digits 1, 2 are blocked by the row rule.


object search: single
target column: column 4

 single in column 4

Digits 3, 4, 5, 6, 7, 8, 9 are blocked from the single square by the column rule; digit 1 is blocked by the cell rule.

Column 4 of the puzzle grid can now be completed by filling the only available square with the only missing digit (1).


object digit: 5
target cell: top centre

 digit 5 to top centre cell

The target cell can now be completed by filling the only available square with the only missing digit (6).


object digit: 5
target cell: top right

 digit 5 to top right cell

The target cell can now be completed by filling the only available square with the only missing digit (6).


object digit: 1
target cell: middle centre

 digit 1 to middle centre cell

The target cell can now be completed by filling the only available square with the only missing digit (6).

Column 6 can now be completed by filling the only available square with the only missing digit (2).


object digit: 5
target cell: middle right

 digit 5 to middle right cell


object search: single
target row: row 5

 single in row 5

Digits 2, 4, 5, 6, 7, 8, 9 are blocked from the single square by the row rule; digit 3 is blocked by the column rule.

Row 5 of the puzzle grid can now be completed by filling the only available square with the only missing digit (3).


object digit: 6
target cell: middle left

 digit 6 to middle left cell

The target cell can now be completed by filling the only available square with the only missing digit (4).


object digit: 1
target cell: top left

 digit 1 to top left cell

The target cell can now be completed by filling the only available square with the only missing digit (9).

Column 2 of the puzzle grid can now be completed by filling the only available square with the only missing digit (4).


object digit: 3
target cell: middle right

 digit 3 to middle right cell

Row 6 of the puzzle grid can now be completed by filling the only available square with the only missing digit (7).


object digit: 4
target cell: bottom centre

 digit 4 to bottom centre cell

The target cell cell can now be completed by filling the only available square with the only missing digit (7).


object digit: 6
target cell: middle right

 digit 6 to middle right cell

The target cell can now be completed by filling the only available square with the only missing digit (2).


object digit: 7
target cell: bottom right

 digit 7 to bottom right cell

Column 9 can now be completed by filling the only available square with the only missing digit (8).


object digit: 8
target cell: bottom left

 digit 8 to bottom left cell

The target cell can now be completed by filling the only available square with the only missing digit (9).

Row 7 can now be completed by filling the only available square with the only missing digit (2).

Row 8 and the grid can now be completed by filling the only available square with the only missing digit (9).


the completed grid:

 the completed grid





By the way...

1.  A variation of the search routine for a single focuses on the digit rather than the square. This works as follows. A row, for example, may have five digits already in place, say 1, 3, 4, 5, 8. Check to see where the 2 of the row might go. If (at least) two of the remaining unfilled squares in the row could possibly accommodate the 2, move on to the next unplaced digit, 6. And so on. If the target digit can fit into one square only and no other, then that's another digit for the row. This quick and often rewarding method is better applied when the solving is well advanced. For row also read column and cell.

2.  Once in a while, a couple exposes a second couple. If, for example, a couple is contained within a column (as seen in the above worked example), the presence of the couple means the two particular digits can be eliminated as possibilities from any other unfilled square of the column. The elimination may reduce the availability of one of those squares to two digits, and the same two digits could be the only possibilities for a further square in the associated cell or row. The eventual outcome might be a filled square in a part of the grid that would seem unlikely to be influenced by the original couple.

3.  Occasionally, a threesome (or triplet) is to be found. Three squares in the same row, column or cell could attract the same three digits as possibilities. Those digits can be eliminated from all other squares in the same domain. One of the three squares need carry only two of the digits as possibilities, and the trick will still work. In theory but unlikely to be pursued in practice are combinations beyond a threesome.



top

sudoku made easier

3 worked examples





urbanrim.org.uk


©   2005, 2006, 2007

Please mention this source in any reproduction


HOME PAGE