Solving Sudoku

A Range of Techniques to Crack Even the Hardest Puzzles

The rules of Sudoku are very simple. The 9 x 9 grid has nine rows, nine columns and nine 3 x 3 regions. To reach a solution the rows columns and regions must contain only one each of the numbers 1 to 9. In some variations of the puzzle, such as Sudoku X and Windows Sudoku, additional regions are added that also require to have just one each of the numbers 1 to 9.

As Sudoku puzzles become harder your solving techniques need to become more sophisticated. Indeed there are some puzzles that can only be solved using one or more of the complex techniques. Here are 9 ways to go about inserting numbers into the grid, or removing candidates from a cell, with confidence, presented in increasing level of sophistication. Most experienced Sudoku puzzlers will start with the simple methods and only progress to the harder ones when they cannot place numbers with the easier ones.

Placing Numbers

Sole Candidate

When a given Cell can only contain a single number, that number is the Sole Candidate and can be placed in that Cell. This happens when all other numbers apart from the Sole Candidate exist in any of the Cell's Block, Row or Column. In the example shown on the left, the highlighted Cell can only contain the number 3, as all the other eight numbers have already been placed in the highlighted Cell's Block, Row or Column.

Unique Candidate

For any given Block, Row or Column it may be possible to find a Unique Candidate for one of the Cells by eliminating all other possibilities. In the example, the positioning of the number 8's outside Block 4 means the highlighted Cell is the only possible position for number 8 inside Block 4. So 8 can be confidently placed in the highlighted cell.

Removing Candidates

Block and Column/Row Interaction

This method will help remove candidate numbers by limiting placement of a number to a specific Row or Column within a Block. This eliminates that number as a candidate from that Row or Column in the adjacent Blocks. In the example, number 2 can only be placed in one of the two highlighted Cells in Row 5. This eliminates number 2 from any other position in Row 5 as shown.

This method can be combined with the Unique Candidate method to find a unique Cell for number 2 in either of Block 5 or 6.

Block/Block Interaction

The method is similar to the previous method, but affects only a single Block. It limits a number to being the candidate for only 3 Cells in that Block. The example shows how this works in practice. Number 6 must be placed in the highlighted Cells of Block 1 and 2. This eliminates number 6 as a candidate in Rows 1 and 3 in Block 3, limiting it to the three Cells of Row 2.

Again this method can be combined with the Unique Candidate method to find a unique Cell for number 6 in Block 3. There would need to be additional number 6's placed in Blocks 6 and 9, or further Block/Column or Block/Block Interaction affecting Block 3, to identify the unique Cell.

Naked Subset

A Naked Subset is a pair of Cells in a Row or Column having the same pair of candidate numbers. In the example, Row 1 and Row 5 of Column 6 can only contain number 4 or number 7, as highlighted in green. Since these two Cells are the only possible positions for these numbers, they can be eliminated as candidates from all the other Cells in the Column, highlighted in red.

With numbers 4 and 7 removed, Row 2 has a Sole Candidate of number 1 and Row 6 has a Sole Candidate of number 2. So you can confidently place number 1 in Row 2 of this Column and number 2 in Row 6.

We have now placed number 2 in Row 6 so it can be eliminated as a candidate in Rows 4 and 8. This leaves number 6 as Sole Candidate in Row 4, and after placing this it is eliminated as candidate in Row 8, leaving number 3 as Sole Candidate in that Cell.

This method also works with three numbers in three Cells using the same logic to eliminate those numbers as candidates in the remain Cells.

Hidden Subset

This is similar to the Naked Subset method, but affects only the Cells of the Hidden Subset. What you are looking for are three candidate numbers that only appear in three Cells of a Row or Column, with the added criteria of two of the numbers being limited to two of the Cells.

This is best seen in the example. Here the numbers 5, 6 and 7 only appear as candidates in Rows 5, 6 and 8 of the Column, with numbers 6 and 7 limited to Rows 5 and 6.

Since we have three numbers that can only be placed in these three Cells, the additional candidate numbers in those Cells can be removed. So numbers 2 and 3 can be removed as candidates from Rows 5,6 and 8 of this Column, leaving number 5 as the Sole Candidate in Row 8. You can confidently place number 5 in this Cell, and you are left with a Naked Subset of numbers 6 and 7 in Rows 5 and 6.

X-Wing

To form an X-Wing you need to identify a square or rectangle of Cells that all contain the same candidate number, whose position is restricted. In the example we will assume the number 3 is a candidate in the 4 green highlighted Cells.

If number 3 is only a candidate for the highlighted Cells in Column 2, and is also only a candidate for the highlighted Cells in Column 8, then we can eliminate number 3 as a candidate in the red highlighted Cells of Rows 2 and 8. This is because number 3 must be placed in diagonally opposite corners of the square/rectangle for the Column restrictions to work.

Swordfish

This method is a more complex version of X-Wing. It might seem like too much effort to go through but some puzzles cannot be solved without using this method.

You are looking for the numbers restricted in position in Columns that form squares or rectangles with pairs of possible positions in Rows. This will eliminate the number as a candidate in the Rows. Or you could have numbers restricted in position in Rows that form pairs of possible positions in Columns. This will eliminate the number as a candidate in the Columns.

In the example, the highlighted Cells are the only candidate positions for the number 4 in Columns 2, 4, 7 and 9.

The number 4 must be placed in one of the two highlighted Cells in each Column. Because the Cells are also paired in Rows, there must be a number 4 placed in one of the green highlighted Cells in each of Rows 2, 4, 6, and 8. This allows us to eliminate the number 4 as a candidate in the red highlighted Cells of these Rows.

There are only two possible placement patterns in this type of shape. Either the four number 4's will all be placed in the green highlighted Cells, or they will all be placed in the blue highlighted Cells.

As you can see this ensures each Row and Column have only one number 4.

It can be difficult to recognize the complex shape of the Swordfish pattern when solving. But there is a way to make it a little easier.

You look for candidate numbers that only appear twice in multiple Columns (Row elimination).

You can, of course, look for candidate numbers that only appear twice in multiple Rows (Column elimination).

Then starting at one of these numbers alternate going horizontally and vertically to the next forming a chain.

If your chain returns to the starting Cell you have identified a Swordfish pattern.

Forcing Chain

The Forcing Chain method is a placement method rather than an elimination method, but is not easy to use. Similar to X-Wing and Swordfish, you are looking for squares or rectangles, but with an additional square in one corner as shown in the example. There must only be two candidate numbers in each of the highlighted Cells, no more.

Starting at the marked Cell chose one of the candidate numbers. We'll choose number 5 first. This forces the highlighted Cell in the same Block to contain number 7. In turn this forces the Cell in Block 5 to be number 5. The two Cells in Column 2 are not forced to contain any specific candidate.

Starting again at the marked Cell, choose number 3. This forces the Cell in Block 7 to be number 1. In turn, this forces the Cell in Block 4 to be number 7, so the Cell in Block 5 is number 5. Finally the second Cell in Block 8 must be number 7.

Comparing these two chains we can see the Cell in Block 5 contains number 5 on both occasions and the top right Cell in Block 8 contains number 7 each time. So you can confidently place the numbers in these positions as they are the only possible option regardless of how the chain is forced.

We hope this helps you solving our tough Sudoku puzzles.