Sudoku Dragon Sudoku Dragon

AddThis Social Bookmark Button

Sudoku Solver
Download Sudoku Dragon for a free 23 day trial on your PC. It has all the features you need to solve puzzles whether you are new to Sudoku or an expert.
Today's Dragon Tip
Learn the basics
Look through our range of easy to follow guides to puzzle solving strategies, make sure you are up-to-speed on all the main ways of solving the puzzle.
Read More

Sudoku Strategy

There are very few strategies that you need to know in order to solve Sudoku puzzles. Take a look at our sudoku introduction page for background on terminology and also our theory page. SudokuDragon comes with a range of tutorials that take you through these strategies step by step. We also have a discussion area on our strategy message board.

Only choice rule

There may be only one possible choice for a particular Sudoku square. In the simplest case you have a group (row, column or region) that has eight squares allocated leaving only one remaining choice available. So this number must go in that empty square.

Only possible Sudoku square allocation Looking at the second row (B) all the squares except the first one Ba have been allocated so the missing number 4 has no choice but to go in the square Ba. You can use this technique by just scanning for 8 allocated squares in any row, column or region.

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

Single possibility rule

When you look at individual squares you will often find that there is only one possiblity left for the square. If there eight squares solved in the group then this is just the same as the only choice rule. However because of the way that groups intersect you may have a group with more than one unallocated square and yet only one possibility exists for one of the squares. So there is no choice, the number must go in that square.

Single possibility strategy In this partially solved Sudoku there are quite a few readily solvable squares. Looking at the purple square Da and running through possibilities: 1;2;3;4;5 and 8 that are allocated in column a leaves only 6; 7 and 9 as possibilities. But in row D there is already a 6 and a 9 so that leaves 7 as the only possibility for square Da. All the green squares in the grid can also be solved using just the single possibility rule, so that makes it a very useful rule to have up your sleeve. To use this technique you look at a promising square and mentally run through each number in turn that might go in it, if you are left with only one number then that number must go in the square.

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

Only square rule

Often you will find a group of Sudoku squares where only one of the squares can take a particular number. For example if a group has seven squares allocated with only two numbers left to allocate it is often the case that an intersecting (or shared) group will mean that a number can not go in one of these two squares and so it must go in the other one. You are left with an 'only square' for a number to go in.

Forced allocation of Sudoku square In this case the highlighted column c has seven numbers allocated. The missing numbers are 1 and 3. But you can see that there is already a 3 in row I (square If) so a 3 cannot go in square Ic, the 3 is forced to be allocated in the other square Ac it is the only square in column c where a 3 can be allocated.

You will often find that the same square can be solved by the 'single possibility' rule as well as the 'only square' rule. It doesn't matter which rule you choose, it depends which one you find easiest.

Note: Whenever there are eight allocated in a group with only one remaining empty you can assign a symbol by applying either the 'only choice', 'single possibility' or 'only square' rules as all of them imply the same thing. It is a key feature of Sudoku that it can be solved in several ways using different strategies.

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

Two out of three rule

One of the most useful solution strategies involves a special form of the Only Square rule. Some Sudoku authors refer to it as 'slicing and slotting'. It is a quick way of spotting squares to solve as it can be easily done in your head by scanning the puzzle grid. It almost always finds a square or two you can immediately solve. At the heart of the technique is to take groups of three rows and columns in turn, working methodically through the whole grid. First look for all the 1s then all the 2s, 3s etc. all the way through to 9. Here's an example of how it works, for more details look at our 2 out of 3 strategy page or download our puzzle solver and take the free tutorial for this topic.

Two out of Three strategy Look at the top three rows where the '1's are located - they are in row A column e (Ae) and Row C column a (Ca) There is no '1' in row B, it must go in one of the blank squares. Because of the '1' in Ae it can not go in any other of the squares in region Ad that is Bd; Be or Bf. By force of elimination then there is only one place '1' can go in row B and that is in the highlighted square Bi. Using the same logic for the following three rows D; E; F there is once more two of them with a '1' in them: squares Eh and Ff. There is a '1' missing from row D and because of the '1' in Eh it can't be in Di, '1' must therefore be assigned to Dc. For the last three rows there are already three '1's Gd; Hb and Ig so there is no '1' left to allocate.

You can then look at the 2s in these three sets of three rows. In rows A; B; C there are '2's in Ai and Cb so there is a '2' missing in row B, but in this case there are three unallocated squares Bd; Be and Bf so it can't be quickly decided in which one the '2' should go. The same happens in rows D; E; F there are two '2's but both Ed and Ef are possible. Finally in G; H; I there are two '2's Gg and Hc and so there is a '2' missing in row I. The existing '2's mean there is only one place it can go - square Id. You can then continue this scan through all rows then all columns in groups of three and then through all the numbers '1' to '9' whenever you find a square you can allocate this may unlock other squares so it is usually worth starting again for the whole grid.

 To download this puzzle download click here

The general strategy is to scan rows and columns in groups of three and look to see where if anywhere the number being scanned has been allocated. If you find two out of the three then you know that the missing number can only go in only one of three squares in this row (or column), and more often than not only one of these is possible and must be allocated there. It will find some squares that you could also have found using the only choice, only square and single possibility rules.

When using the Sudoku Dragon software you can use the automatic allocation feature to automatically find and solve squares that can be solved with the 'only choice', 'single possibility' and 'only square' rules, leaving you free to concentrate on solving the harder squares.

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

Sub-group exclusion rule

More rarely needed in Sudoku, but exceptionally useful is the sub-group exclusion rule. This takes more explanation as instead of 'forcing' an allocation of a number to a particular square, it is an application of logic that 'excludes' possibilities that at first sight look possible. By excluding one possibility for a square may mean another possibility can then be safely assigned there as it was the only other alternative. Here's an example of the use of the sub-group rule.

Subgroups

A sub-group is a term used here to describe three squares in a row or column that intersect a Sudoku region. Every row and column has three sub-groups in the three regions it crosses. In this example the region Aa has been color coded to show the three subgroups it forms with columns a; b and c. The three pink squares are the sub-group intersecting region Aa and column a; the yellow squares the sub-group with column b and the green ones the sub-group with column c. The region also has three sub-groups with the rows A; B and C. Every square in the grid belongs to two sub-groups - one for the column it is in and one for the row it is in.

This strategy comes into play when you can prove that a number must only occur somewhere in a sub-group and not elsewhere in a group but it can't be directly deduced which of the three sub-group squares it must go in. The number must be placed in only within a sub-group but not elsewhere even though it may not lead to solving a specific square. It's all about narrowing down the possibilities a little. Having established an allocation can only be made within a sub-group then all other squares in the rest of that region can have this number safely excluded.


Our Sudoku Dragon has a free tutorial that explains what is going on step by step.

Subgroup exclusion Sudoku ruleHere is a brief example using the simpler 4x4 grid. SudokuDragon has been used with possibilities enabled and exclusions switched on so that the grid directly shows the squares where the exclusion rule comes into play.

First look at column d, you'll see that the '1' must go in the square Cd and that's the only place it can go in the region Cc. Applying the subgroup rule for the subgroup shared between column d and region Cc (highlighted in blue) means that '1' can only occur in this subgroup and can not go in any other square in the region, in this case squares Cc or Dc, so that is why '1' is shown as excluded with a dark background by the SudokuDragon puzzle solver. Moreover because Dc could only take a '1' or '4' it's now certain that '4' must be allocated here.

The other subgroup we could have used in this Sudoku puzzle example is the one shared between column a and region Cb (highlighted in red). Here we can tell that '4' must be allocated in Ca as that is the only place in column a that can take it. So using the subgroup rule '4' can not go in Cb or Db, and so we can safely assign '1' to Db.

Note that these 4x4 Sudoku examples do not really show the full impact of the scheme as it's impossible to have many solution strategies so the simpler rules could have been used to solve these squares much more easily.

Subgroup exclusion Sudoku ruleIn the more complex 9x9 puzzle the action happens in the central region Dd. It is the subgroup of this region with the highlighted row F that is of interest. Look at the squares in row F that a '5' can go, it can't go in Fa (because of Aa) nor in Fh (because of Dh) nor in Fi (because of Bi). That only leaves Fd and Ff both of which occur as a shared sub-group with region Dd. The subgroup exclusion rule implies that a '5' can not go in the remaining shared squares highlighted in purple : Ed or Ef.

Sudoku Dragon has highlighted quite a few possibilities in other squares that can be safely excluded using the same rule - for example the '8's in Ce and Cf and the '4's in Eg and Eh. This last example is particularly useful since square Eg is left with only one possibility with the '4' excluded, '7' must go there.

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

Hidden Twin exclusion rule

Occasionally you may find you need to use the twin (or triplet) exclusion rule in order to solve some of the more difficult Sudoku puzzles. It is the strategy to use when simpler strategies have been applied and they don't solve any more squares. In essence it is about spotting matching patterns of possibilities in a group (row, column or region). Spotting these groups takes time and it is quite easy to make mistakes, so this is where you need pencil and paper (or the SudokuDragon puzzle solver software).

In its simplest case there are two or more unallocated squares in a region and there are two numbers that can only go in the same two squares and no others. This does not help with allocating the numbers directly as the number could go in either square. However, if there is another possible number in either of the two squares then this number can be discounted as it is excluded because of the presence of a twin elsewhere in the group. It all stems from the presence of a twin. An example is the best way to get your mind around this rule.

Twin exclusion Sudoku rule Look at this 4x4 grid. There are a number of easier squares that could be filled in, but we'll ignore them as this is only to show the use of the twin rule. Look at the region Aa, none of the squares have yet been allocated. Both '2' and '3' must go somewhere in the region and there are only two squares into which they can go. We have a twin in squares Aa and Ba. In square Aa a '1' was also flagged as possible so this can now be safely excluded. In addition square Ba seems to allow a '4' but this is also excluded because of the same 'twin'. How does this work? There are only two ways that the twin of {2, 3} can be allocated, either as '2' in Aa and the '3' in Ba or alternatively '3' in Aa and the '2' in Ba. This does not allow the possibility of the '1' being allocated in Aa or the '4' being allocated in Ba - they must be allocated elsewhere. Whenever there are the same number of possibilities restricted to the same number of squares this logic can be applied. See the theory page for further explanation.

Our Sudoku Dragon software has a free tutorial that explains twins in more detail with an animated guide.

Note: The rule for twins extends to triplets too. If you find that three symbols have only three shared possible squares in a group (row, column or region) then all other possibilities in these three squares can be discounted too. And on it goes, the same sort of rule applies to quadruplets, quintuplets etc. but these are very rarely found in actual puzzles.

This rule is sometimes called the hidden twin rule as the twins are not immediately evident and discovering the twin is the challenge.

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

Naked Twin exclusion rule

Naked exclusion Sudoku rule Similar but slightly different is the use of 'naked' twins to exclude other possibilities in the group. In this case the twin squares are evident on their own (they are naked) and these are used to exclude possibilities in other squares in the same group. Here's how it works...

The 4x4 grid has the region Ca highlighted. The 'naked twins' are located in Ca and Cb. Because these two squares have no other possibilities we know that a '2' must go in Ca and '3' in Cb or else '3' in Ca and '2' in Cb, no other valid possibility exists. So looking at square Da the naked twin rule excludes '2' from occurring here, '1' must be allocated there. For the same reason the naked twin also eliminates '2' from square Cc.


General permutation rule

The 'twin' rules are examples of a general logical property of Sudoku puzzles. To follow this you may need to look at the theory of permutations. Each group is just a permutation of the numbers 1 to 9 (for a 9x9 grid). If you can identify a group within this permutation that is restricted to the same number of squares then you have a Sudoku permutation rule. [Note: In fact the 'only square'; 'single possibility' and 'only choice' are just special cases of this general rule - the subset size is one in this case.] There are more exotic situations for application of this general rule.

The twin, triplet, quadruplet rules are stated in terms of the size of the sub-group (2,3,4...) but a chain is also possible. A chain can take in any number of squares, for example if the first three squares in a group allow possibilities {1,7}; {4,7} and {1,4} we have a closed chain group of three symbols {1,4,7} this is not a twin or a triplet but the general permutation rule means that if you can spot it then 1, 4 and 7 elsewhere in the same group can be safely excluded as possibilities.

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

X-Wing and Swordfish

One of the more complicated Sudoku strategies is the 'X-Wing' and its variant the 'Swordfish'. These rules are useful for solving the really difficult Sudoku puzzles when everything else has been tried.

In looking for twins and permutations we have restricted ourselves to look at possibilities within a single group. The shared sub-group rule is an example of a rule where more than one intersecting group is used to determine possibilities. The X-Wing is similar in that it requires looking at multiple groups at once. A better name for this strategy might be 'Box' as the key feature is four squares forming the corners of a box. These squares must be the only permitted squares for that symbol in that row for one symbol (or column). This box arrangement now forms a two dimensional pairing. If the symbol spotted occurs in the top left of the box it must then occur in the bottom right square of the box. The only other alternative is if it occurs in the top right square in which case it must then occur in the bottom left square. No other option is possible for these squares and this symbol. The usefulness of this rule is that both the possible allocations put the symbol in the same two columns (or rows) involved and so knocks out possibilities anywhere else in the column (or row).

X-Wing Sudoku ruleHere's an example (and it takes time to find a good example of an X-Wing). Sudoku Dragon has highlighted all the squares where a '4' is allocated or looks like it can be allocated. The rows C and G are crucial. They both have only two squares that can take a 4: Ca, Cf, Ga and Gf - highlighted in green - this is a vital starting point. Moreover the '4's form the corners of a rectangular box (highlighted in orange). How is this useful? Well, because there must be a '4' in both column a (either in Ca or Ga) and also in column f (either in Cf or Gf), we can exclude all other possible '4's in these columns. So all the purple highlighted squares Aa, Ba, Bf and Ha can have the possibility of a '4' discounted. If you are lucky then eliminating the '4' will mean you can allocate one of these 'excluded' squares or at least a square in the same group as them.

 To download this puzzle download click here

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

Note: The term X-Wing is probably derived from the name of Star Wars fighter which had an X shaped cross-section.


Swordfish Sudoku rule Believe it or not the Swordfish is a further complication on top of the X-Wing, instead of four squares forming a box of possible allocations the Swordfish rule allows three linked pairs to form the group. In this case we have not just two pairs of two possibilities for '9' but three : in columns b; e and h. These squares are highlighted with a blue-grey shading. It's a box with an extension 'sword' jutting out on one side : hence the term 'Swordfish'. Because all these three columns have these coinciding end squares the same rule applies. Any '9's that we find in rows that link the columns can be safely excluded because we know that a '9' must occur in one of the two highighted squares in the row and so can't be located elsewhere. These excluded squares are highlighted in green (Fc; Gf and Fg).

 To download this puzzle download click here

Sudoku Tutorial For an extensive run-through example of this strategy tutorial click here

Of course, the Swordfish is not the end of the matter we can extend the logic to four interlinking pairs of possibilities and then five etc.. You'll feel a real sense of achievement if you locate a Swordfish and use it to solve a Sudoku puzzle!


Further strategies are also available for fiendishly difficult puzzles. These require a lot more thought and analysis to use in 'real' rather than 'theoretical' puzzles. These are the X-Y Wing and Alternate Pair techniques, they are explained in full on our separate Advanced Strategy page.

Backtracking or Trial and Error

When all else fails, there is one technique that is guaranteed to always work, indeed you can solve any Sudoku puzzle just using this strategy and nothing else. It's simply a matter of working logically through all the alternatives in each square until the puzzle is solved. Because there are so many alternatives (billions) you won't want to use it too often. You start with a square and choose arbitrarily one number from the available alternative possibilities.

This is a completely different type of strategy as it uses 'brute force' rather than 'logic'. It is the most contentious Sudoku solving technique and so we have a full description of it with examples on our separate guessing page.

AddThis Social Bookmark Button

Sudoku Dragon offers the best range of features for both the newbie and expert. It will solve and generate puzzles of all sorts of sizes. Read more...

donate If you found this page useful please consider making a donation to keep this web site flourishing. To donate, please click here

contributeAny comments on this page? Click here to contribute

See also

Sudoku Strategy Some of the more complex puzzle solving strategies explained.
Sudoku Solution Hints Good introduction to the various strategies for solving puzzles including X-Wing; XY-Wing.
Solving Sudoku Detailed step by step solution of puzzles.

Copyright © 2005-2009 Sudoku Dragon