/ GETTING STARTED

Sudoku Solving Techniques

I advocate learning the Possibility Matrix Method first, which guarantees a solution to a Sudoku puzzle of any complexity. Of the unlimited number of approaches, we’ll learn the 12 top most popular sudoku solving techniques, which should normally be sufficient to solve most of the puzzles that appear in newspapers and magazines. You may discover that some of these Approaches overlap with the steps in the Possibility Matrix Method, but nevertheless, Let’s see this approaches

Approach 1 Naked Singles

Let’s start with the obvious. If there’s a Cell that can obviously take one and only one value, we could fill it with that value.

Sudoku Solving Techniques 1

What values can Cell (6,8), marked ‘?’ in black take? Obviously nothing other than ‘6’. So you can fill it with the value ‘6’. This is called the ‘Singles’ or ‘Naked Singles’ Approach.

Approach 2 Hidden Singles

If a certain value is required in a Row/ Column/ Major Square, but except for one Cell the other Cells in that Row or Column or Major Square can either not take the value because of the occurrence of the value in the respective ‘other Rows/ Columns/ Major Squares’ or if the other prospective Cells are already filled with other values, we could fill that one Cell with that value.

Sudoku Solving Techniques 2

Rows 4 and 6 already have ‘7’s. Row 5 doesn’t yet have one. The ‘7’ in Row 5 can’t be in the Mid Left or Mid Right Major Squares as there are ‘7’s in them already. This leaves us with only 3 candidate squares, viz., Cells (5, 4), (5, 5) and (5, 6). However, (5, 5) and (5, 6) are already filled with other values. So, the value ‘7’ for Row can only be placed in Cell (5, 4) marked ‘?’ in black. This is called the ‘Hidden Singles’ Approach.

Together, both the Approaches (1 & 2) are also called ‘Unique Value’ Approaches.

Interchanging (and slightly modifying) Rows & Columns, you may have the pattern as below: Let’s see this with the help of an example.

Sudoku Solving Techniques 3 Sudoku Solving Techniques 4

Or, even as:

Sudoku Solving Techniques 5

The above 2 Approaches are fairly simple, and chances of detection of such instances in a puzzle are high. After repeatedly applying the above 2 Approaches, if you’re unable to solve a puzzle, you may have to start applying the more complex Approaches that follow.

Approach 3 Row/Column-Major Square Interaction

Sometimes, even if a certain value is not yet there in a Row (or Column), you can still eliminate that value as a possibility from a set of Cells in that Row (or Column). This is because we may not yet have reached the stage where we can fix that value to any specific Cell in that Row (or Column), but yet, from the interactions with a Major Square, and from the occupied values in other Cells in the Row (or Column), it is clear that soon a Cell in that Row (or Column) would definitely take that value. So, you can rule out the chances of other Cells in that Row (or Column) taking the same value. Let’s learn this through an example:

Sudoku Solving Techniques 6

Cells (3,4), (3,5), (3,6), (3,7), (3,8) and (3,9), marked ‘?’ in red, can’t take the value ‘6’.

Why? Because, the Top Major Square still needs a ‘6’; and leaving out the already occupied Cells and the Cells in column 3 (because Column 3 already has a ‘6’) in the Top Major Square, the only 2 possible positions for the value ‘6’ are Cells (3, 1) and (3, 2). In either case, no other Cell in Row 3 can take the value ‘6’.

Interchanging (and slightly modifying) Rows & Columns, you may have the pattern as below:

Sudoku Solving Techniques 7

This is called ‘Direct Interaction’ or ‘Row/Column-Major Square Interaction’ or ‘Row/Column-Block Interaction’ Approach.

Approach 4 Indirect Interaction

Let’s see a situation that’s similar to the above, but this time, it is across 2 Major Squares instead of Row/Column-Major Square. Here, though a certain value is not yet there in a Major Square, you can still eliminate that value from a set of Cells in the adjoining Major Squares (i.e., in the same Rows/ Columns). This is because we may not yet have reached the stage where we can fix that value to any specific Cell in that Major Square, but yet, from the interactions with the other Major Squares, and from the occupied values in the Major Square, it is clear that soon a Cell in that Major Square would definitely take the value. So, you can rule out the chances of other Cells in that Row (or Column) taking the same value. Let’s see this through an example:

Sudoku Solving Techniques 8

Here, both the Top Right and Bottom Right Major Squares still need a ‘5’. Given the puzzle above, the only candidate Cells for ‘5’ in the Top Right Major Square are Cells (3, 8) and (3, 9). And the only candidate Cells for ‘5’ in the Bottom Right Major Square are Cells (7, 9) and (8, 8). Whichever of these Cells takes the value ‘5’ in these 2 Major Squares, it is clear that there’s no place for another ‘5’ in these 2 Columns in the Mid Right Major Square. So, we can eliminate the possibility of value ‘5’ from being allotted to Cells (4, 8), (4, 9), (5, 8), (5, 9), (6, 8), and (6, 9), all marked ‘?’ in red. And ‘5’ in this Major Square can only appear in one of the 3 Cells (4,7), (5,7) and (6,7), marked ‘?’ in black.

This is called ‘Indirect Interaction’ or ‘Major Square-Major Square Interaction’ or ‘Block-Block Interaction’ Approach.

Approach 5 Reduction

If, among the possible set of values that a Cell can take, one or more values have been taken by one or more Cells in its Row/ Column/ Major Square, then you can rule out these values for the Cell.

Let’s see this through an example:

Sudoku Solving Techniques 9

Let’s say that through other inferences, we know that Cell (5,5) can only take the values {4,5,6,7}, and the values ‘4, ‘5’, ‘6’ were obtained successfully only in the last step.

Now, Cell (5,5) can take only the value ‘7’, as below.

Sudoku Solving Techniques 10

This is called the ‘Reduction’ Approach.

Approach 6 Naked Groups

If, among the possible set of values that certain Cells can take, a certain subset of values will necessarily have to be shared only among certain Cells, then, you can rule out these values from the other Cells.

Let’s see this through an example:

In a Row, there are 4 Cells yet to be filled in. And the possible values in these Cells are:

{1,2}, {1,2}, {1,2,3,4}, and {1,2,3,4}.

Whereas the Cells with the possible values {1,2,3,4} can take any one of the 4 values, there are 2 Cells that can only take one of 2 values ‘1’ or ‘2’. Either of the Cells can take the value ‘1’ and the other can take the value ‘2’. This means that, in either case, the other 2 Cells cannot take the values ‘1’ and ‘2’. So, you can eliminate these values from the possibilities for these Cells and so, the set of possible values reduces to: {1,2}, {1,2}, {3,4}, and {3,4}.

In a slightly more complex form, a similar situation could be as below:

{1,2,3}, {1,2,3,4,5}, {1,2,3}, {1,2,3,6,7}, {1,2,3,4,6}, {1,2,3,5,7}, and {1,2,3}.

And this will reduce to:

{1,2,3}, {4,5}, {1,2,3}, {6,7}, {4,6}, {5,7}, and {1,2,3}.

This is called ‘Naked Groups’ or ‘Naked Subsets’ Approach. This approach can be applied to Rows, Columns as well as Major Squares.

Approach 7 Hidden Groups

This is very similar to the previous Approach. Here, among the possible values that certain set of Cells can take, the subset of values that will necessarily have to be shared only among certain Cells is not apparent but has to be deduced. Here again, you can rule out these values from the other Cells.

Let’s slightly modify the example above and see how and when to apply this:

Let’s say 7 Cells can take the following possible values:

{1,3}, {1,2,3,4,5}, {2,3}, {1,2,3,6,7}, {1,2,3,4,6}, {1,2,3,5,7}, and {1,2}.

We can see that still, the red-colored Cell-values means that these 3 Cells can take no value other than ‘1’, ‘2’ and ‘3’ among them. This means that these values are not available to the other Cells. So, you can reduce this also to:

{1,3}, {4,5}, {2,3}, {6,7}, {4,6}, {5,7}, and {1,2}.

This is called ‘Hidden Groups’ or ‘Hidden Subsets’ Approach. This approach can also be applied to Rows, Columns as well as Major Squares.

Approach 8 X-Wing

If, among the possible set of values that certain Cells can take in a Row (or Column), a certain value will necessarily have to be taken between a couple of pairs in the same Row (or Column), then, you can rule out these values from the other Cells in their Columns (or Rows).

We’ll see this through an example.

Sudoku Solving Techniques 11

Where ‘x’, ‘y’ (here ‘4’), and ‘p’, ‘q’ are single values, and ‘A’, ‘B’, ‘M’ and ‘N’ can be any set of one or more values. And let’s say that ‘4’ is not a possible value in any other Cell in these Rows (3 and 9). (That is, if you were to construct a Possibility Matrix, ‘4’ can’t figure in any other Cell in these 2 Rows.)

Let’s see this with some values in the place of x, y, etc.

Sudoku Solving Techniques 12

In this case, if Cell (3, 2) takes the value ‘4’, then, Cell (3, 9) can’t take the value ‘4’. And Cell (9, 2) can’t take the value ‘4’ either. This leaves us with Cell (9,9) taking the value ‘4’.

Likewise, if Cell (3,9) takes the value ‘4’, then, Cell (9,2) will also take the value ‘4’.

So, either Cell (3, 2) and (9, 9) take the value ‘4’, or Cell (3, 9) and (9, 2) take the value ‘4’.

In either case, no other Cell in these 2 Columns can take the value ‘4’.

You can eliminate the value ‘4’ from the possible set of values {4,7,8}, {4,7,9} in Column 2 and {1,2,4} and {1,2,4,6} in Column 9. This reduces them to {7,8}, {7,9} in Column 2 and {1,2} and {1,2,6} in Column 9. (i.e., More generically, {A, 4}, {B, 4}, {M, 4} and {N, 4} reduce to: ({A}, {B}, {M} and {N}).

This is called ‘X-Wing’ Approach. You can have the Rows and Columns interchanged here, and this approach is still applicable.

Approach 9 Sword-Fish

This is similar to the previous approach, but in 3 Rows (or Columns). Here, there are 2 candidates for a value in each Row (or Column). And these candidates fall in the same set of 3 Columns (or Rows). Then, you can rule out this value from the other Cells in their Columns (or Rows).

We’ll see this through an example.

Sudoku Solving Techniques 13

Where ‘x’, ‘y’, ‘z’, ‘p” ‘q’, and ‘r’ are any values (and ‘A’, ‘B’, ‘M’, ‘N’, and ‘L’) are any set of values, and ‘4’ is not a possible value in any other Cell in these Rows (3, 4 and 9), you can eliminate the value ‘4’ from the possible set of values ({A,4}, {B,4}, {M,4}, {N,4}, and{L,4}) in all other cells in these Columns.

Let’s see what the given situation means. This means that either Cell (3,2) or Cell (3,3) must be a ‘4’; and, either Cell (4,3) or Cell (4,9) must be a ‘4’; and, either Cell (9,2) or Cell (9,9) must be a ‘4’.

However, if Cell (3,2) is a ‘4’, Cell (3,3) can’t be a ‘4’ and Cell (9,2) can’t be a ‘4’ either. The only Cell in R9 that can be a ‘4’ is (Cell (9,9); so, Cell (4,9) can’t be a ‘4’. Since R4 still needs a ‘4’, Cell (4,3) must be a’4’.

Alternatively, if Cell (3,3) is a ‘4’, Cell (4,3) can’t be a ‘4’, and Cell (3,2) can’t be a ‘4’ either; Since R4 needs a ‘4’, Cell (4,9) must be a ‘4’, which means Cell (9,9) can’t be a ‘4’. Since R9 needs a ‘4’, Cell (9,2) must be a ‘4’.

Let’s now see what this boils down to Column-wise: Either Cell (3,2) is a ‘4’ or Cell (9,2); and, either Cell (3,3) is a ‘4’ or Cell (4,3); and, either Cell (3,9) is a ‘4’ or Cell (9,9).

That is, one of the Cells in each of these Columns is a ‘4’. So, no other Cell in these Columns can be a ‘4’.

So, ({A,4}, {B,4}, {M,4}, {N,4}, and{L,4}) reduce to ({A}, {B}, {M}, {N}, and{L}).

This is called ‘Sword-Fish’ Approach. You can have the Rows and Columns interchanged here, and this approach is still applicable.

Approach 10 XY-Wing

This is also somewhat similar to the previous ones in the sense that it helps eliminate certain possibilities based on ‘not so apparent’ logic.

The logic here is that, if you have a row-column, (or) row-major square (or) column-major square intersection where 4 (or more) cells have a x- y, x-z, y-z formation, you can rule the possibility of ‘z’ in the fourth Cell. Here, x, y and z represent a specific value between ‘1’ and ‘9’.

Sudoku Solving Techniques 14

Cell (2, 3) can be only ‘x’ or ‘y’. Let’s say it is ‘x’. Then, Cell (2, 8) has to be ‘z’. Then, Cell (7, 8) can’t be ‘Z’.

On the other hand, let’s say Cell (2, 3) is ‘y’. Then, Cell (7,3) has to be ‘z’, and so, Cell (7, 8) can’t be ‘Z’.

So, in any case, Cell (7, 8) can’t be ‘z’, whenever we have a formation like this. So, we can see that we can eliminate ‘z’ from Cell (7, 8), as below:

Sudoku Solving Techniques 15

Example:

Sudoku Solving Techniques 16

Reduces to

Sudoku Solving Techniques 17

This is called ‘XY-Wing’ Approach. We have seen only the case of row-column interaction. The same obviously holds true for row-major square interaction and column-major square interaction.

Approach 11 Coloring

In certain situations, the linking of Cells across Rows, Columns and Major Squares is not apparent, particularly when they are not in the same Rows or Columns, but if we use color pencils and shade them, we may be able to understand the linking better and eliminate certain possibilities. Let’s see this through an example.

Sudoku Solving Techniques 18

Let’s say only Cells (2, 3) or (3, 1) can hold the value ‘5’ in the Top Left Major Square. And let’s also say only Cells 2, 8) or (3, 7) can have the value ‘5’. And let’s also say that we need a ‘5’ for Row 7.

When one of the Cells in the Top Left and Top Right Major Squares takes the value ‘5’, the other cannot. Such Cells are ‘Alternatives’ to each other. Let’s Color Alternatives differently, and see if it helps us resolve some Cells.

Sudoku Solving Techniques 19

Here, we can see that if Cell (2, 3) takes the value ‘5’, Cell (3, 1) can’t; but Cell (3, 7) can, and Cell (2, 8) can’t; and Cell (7, 3) can’t. And we have a conflict in Cell (7, 7); while it is an alternative to Cell (3, 7) and so it should take the color different from it, it should also take the color alternative to Cell (3, 7) and so it should take the color different from it too. So, we see that Row 7 cannot have a ‘5’ while we need one. So, this cannot be the solution.

Let’s look at the alternative solution. If Cell (3, 1) takes the value ‘5’, Cell (2, 8) and Cell (7, 3) can take the value ‘5’ too, and our requirements are completely met.

So, we can see how coloring has helped us resolve this conflict. Sometimes, we may not be able to completely resolve such conflicts with this Approach, but we may only be able to eliminate the possibility of some values in certain Cells as we have seen with the previous approaches.

This is called ‘Coloring’ Approach.

Let’s see one more complex example:

Sudoku Solving Techniques 20

Here, we find that the value ‘7’ is required to be filled into 6 rows, 6 columns and 6 Major Squares.

If we were to fill in Cell (9,2) with a ‘7’, lets see what all possibilities of filling in the value ‘7’ remain.

Sudoku Solving Techniques 21

Now, we can fill in ‘7’ only in 4 more columns, whereas we require ‘7’ in 5 more columns. So, we could eliminate the possibility of Cell (9,2) being filled in with a ‘7’.

So, the Table reduces to:

Sudoku Solving Techniques 22

Approach 12 Forcing Chains

Then you can’t make a direct deduction, see if a series of deductions (based on the logic: “if this Cell takes this W value”) leads to a resolution of the right Cell for a value. This is similar to the Coloring Approach, but is different in the sense that we are not looking for just only one value here, but a series of values. In a manner of speaking, this is similar to the “X-Y Wing Approach”, except that, in this approach, we need not look for a pattern of the position of the Cells like in “X-Y Wing Approach”. And therefore, this is no Axiom, and the deductions must be made on a case-to-case basis. Let’s see this Approach through an example.

Sudoku Solving Techniques 23

If Cell (2, 2) takes the value ‘1’, Cell (2,8) will take ‘2’, Cell (3, 9) will take ‘3’, Cell (8, 9) will take ‘4’ and Cell (8, 2) will take ‘5’. And there are no conflicts.

However, if Cell (2, 2) takes the value ‘2’, Cell (2,8) will take ‘3’, Cell (3, 9) will take ‘4’, Cell (8, 9) will take ‘5’ and Cell (8, 2) will take ‘2’. Now there is a conflict. So, this set of values is not right.

So, we are able to deduce that we should go with the assumption that Cell (2, 2) takes the value ‘1’, and fill up the rest of the Cells on this basis.

This is called ‘Forcing Chains’ Approach.