How To Solve Sudoku puzzles
Solving SuDoku puzzles is easier than it looks and can be solved using just a few simple techniques. It's all done by observation and logic; you don't need any maths and you don't need to guess.
Here is a classical SuDoku puzzle with 9 rows and 9 columns.; it's a grid 9 squares wide and 9 squares deep. The grid is further divided INTO nine 3x3 square boxes.
Some of the squares already have numbers in them. Your task is to fill in the blank squares. There's only one rule: Each row, column and box must end up containing all of the numbers FROM 1 to 9. That means that each number can only appear once in a row, column or box.
Solving SuDoku is all about eliminating the impossible numbers by looking at the same thing in different ways.
The crosshatching and slicing/dicing techniques shown in the first part of this page are enough, on their own, to solve most easy puzzles. To solve more difficult puzzles you need to use crosshatching in combination with other techniques. These are described in the second part of this page.
1. Crosshatching: Finding squares for numbers.
The obvious way to solve a SuDoku puzzle is to find the right numbers to go in the squares. However the best way to start is the other way round - finding the right squares to hold the numbers. This uses a technique called 'crosshatching', which can solve many 'easy' rated puzzles on its own.
Look at the top-right box of our sample puzzle (outlined in blue). It has five empty squares. All the numbers FROM 1 to 9 must appear in the box, so the missing numbers are 1,2,3,5 and 9.

Lets see if we can work out which square the missing 2 will go into. To do this, we'll use the fact that a number can only appear once in any row or column. We start by looking across the rows that run through this box, to see if any of them already contain a 2. Here's the result:

That's it! The first two rows already contain 2s, which means that squares in those rows can not contain the 2 for this box. That's all we need to know, because the third row only has one empty square, so this is the place for the 2.
Now let's see if we can place the 3 for this box.

There's only one empty square that the 3 can possibly go into. You can see now why this technique is called 'crosshatching' - the lines FROM rows and columns outside the square criss-cross each other.
Of course you don't always get a result first time. Here's what happens when we try to place the 5:

There's only one 5 already in the rows and columns that run through this box. That leaves three empty squares as possible homes for the 5. For the time being, this box's 5 (and its 1 and 9) have to remain unsolved.
Now we move on to the next box on the left:

Here we're crosshatching for 3, the first missing number in this box. Remember how we treat the 3 we placed in the first box as if it had been pre-printed on the puzzle. We still can not place this box's 3 though, so we'll move on to the next missing number, and so on.
In SuDoku, accuracy is essential. If the 3 in the first box is wrong, we'll be starting a chain of errors that may prove impossible to unravel. Only place a number when you can prove, logically, that it belongs there. Never guess, and never follow hunches!
An important factor in crosshatching and SuDoku in general is that the more numbers you place, the more likely you are to place others - including ones you couldn't place earlier.
Placing numbers in the second box may well make it possible to go back and place missing numbers in the first. It's good to get INTO the habit of looking backwards as well as forwards, re-checking whether the numbers you've just placed have made numbers placeable elsewhere in the puzzle.
2. Slicing and dicing
In SuDoku it pays to look at the same thing in different ways. By using crosshatching slightly differently, you can often get quicker results.
Instead of looking at a single box and its missing numbers, you can look at a GROUP of three boxes running across or down the puzzle, trying to place each number FROM 1 to 9 in as many of the boxes as you can.
In this example we are trying to place 7s in the three right-hand boxes:The stack of boxes starts out with just one 7 in place (bottom box). This solves the middle box's 7 and entering that immediately solves the top box's 7 as well.
This 'chain reaction' of solving wouldn't occur in single-box crosshatching. It happens here because we're focussing on a single number across multiple boxes - looking at things differently.
Crosshatching and slicing/dicing are basically the same thing, but slicing/dicing can be more efficient, and often feels less laborious than working through the empty squares in a single box. Although that's what you will have to do in ORDER to solve tough puzzles, so be prepared!.
It's a good idea to start any puzzle by slicing and dicing, perhaps switching to single-box crosshatching if you get stuck.
Most easy and many moderate puzzles can be solved that way - just make a first 'pass' through the whole puzzle placing all the numbers you can, then go back and start again, seeing if any more numbers can now be placed. Keep doing that, and eventually you'll fill the whole puzzle.
In practice you'll soon find that you stop working in passes through the whole puzzle, and begin darting to whichever area looks most likely to have solvable squares.
If you get stuck (i.e. you can't place any more numbers), then it's worth making another methodical pass through the whole puzzle. This will often reveal a solvable square you've missed.
On tough puzzles crosshatching and slicing/dicing will eventually run out of steam - you'll make a pass through the whole puzzle without being able to place any more numbers. When this happens it's time to switch to a different approach, using the solving techniques described in the following lines.
The first step, however, is more crosshatching. This time you need to go through the entire puzzle, box by box, crosshatching each box for all its missing numbers. As you do that, you make a note of which squares each missing number can possibly go into. This is called 'pencilling in'.
3. Pencilling in.
It's called 'pencilling-in' because on a printed puzzle many people use a pencil, so that they can rub numbers out later. The solving techniques needed for more difficult puzzles all depend on HAVING an accurate list of the candidates numbers for each empty square. You can build this list by pencilling the candidates in as you make a complete crosshatching pass through the puzzle.
Looking at the top-right box of our original puzzle, crosshatching produced three possible squares where the missing 5 could go. 1 and 9 were also unsolved for this box. Here's the box with all its missing numbers pencilled INTO their possible squares:
This list must be complete and accurate, otherwise you risk creating another chain of errors. That's why it's essential to crosshatch every missing number for every box before starting the next stage of solving.
Candidate lists must also be kept up to date (the reasons for this will become obvious later!). Here's what it means:

On the left is is the top-right box, and the one below it. We've just entered a 5 in the bottom-right square of the lower box. Now we remove that square's candidate list. We also remove 5 FROM the candidate list at the top of the same column, and the left of the same row. Here's how the boxes look afterwards:

Whenever you fill in a square, remove the number you've used FROM all candidate lists in the same row, column and box. Here are the areas we needed to CHECK for candidate 5s after filling in this square:

Don't worry if that looks complex - in practice it's quick and easy to scan through the same row, column and box as the square you've just filled. When you're crosshatching the puzzle, remember to UPDATE any candidate lists that are affected by numbers you place.
4. Rules to solve SuDoku puzzles
It's always worth starting the solving process with a quick slice/dice, because it might solve a square or two even on the toughest puzzle. However if the puzzle is rated 'hard' or tougher, crosshatching techniques will soon stop producing results. It's best to cut your losses, do the full pencilling-in crosshatch, and move on to some serious solving.
In difficult puzzles with 24 or fewer starting squares, the initial crosshatching run will produce few solved squares, and long lists of candidates. Don't be afraid, the lists will soon start to shorten as you apply the rules described below.
This part of the solving process is where you switch approach and start finding numbers for squares instead of squares for numbers. You do this by checking your pencilled-in candidate lists for a series of rules, and acting on them.
There are lots of rules and more being discovered all the time, but a basic set of five will solve most puzzles up to 'really tough' ones. It's worth practicing these until you find yourself recognising the patterns instinctively (it doesn't take long), then adding more rules to your repertoire as they're needed.
Always remember that all rules depend on your candidate lists being complete, accurate and up to date. Get them wrong and you'll soon have big problems!
The first two rules let you solve squares immediately.
Rule 1 - Single-candidate squares: When a square has just one candidate, that number goes INTO the square.
Here's the mid-right box again, as it was before we entered the 5:
The mid-left and bottom-left squares each have only one candidate, so we can put those numbers INTO the squares. Some squares will be single-candidate FROM the start of the puzzle. Most, however, will start with multiple candidates and gradually reduce down to single-candidate status. This will happen as you remove numbers that you've placed in other squares in the same row, column and box, and as you apply the last three rules described below.
Rule 2 - Single-square candidates: When a candidate number appears just once in an area (row, column or box), that number goes INTO the square.
The number 6 only appears in one square's candidate list within this box (top-middle). This must, therefore, be the right place for the 6. The remaining three rules let you remove numbers FROM candidate lists, reducing them down towards meeting one of the first two rules.
Rule 3 - Number claiming: When a candidate number only appears in one row or column of a box, the box 'claims' that number within the entire row or column.
Here's the top-right box again:

The number 1 only appears as a candidate in the top row of the box. This means it will have to go somewhere in that row (although we don't know in which square yet). This in turn means that it can't go anywhere else in that row, outside of this box.
You can read across the row, and remove 1 FROM any candidate lists outside of this box, even though you haven't actually placed 1 yet.

In this example, we can remove the 1 FROM the left-hand square's candidate list. This makes the square single-candidate (7) - square solved!
Claims also work during crosshatching. Here we're crosshatching the top-left box for 1:

We can rule out the top row, because the top-right box has already claimed that row's 1. This lets us place the 1 in the bottom-left square of the box.
Rule 4 - Pairs: When two squares in the same area (row, column or box) have identical two-number candidate lists, you can remove both numbers FROM other candidate lists in that area.
Here's the second row of the puzzle:

Two of the squares have the same candidate list - 67. This means that between them, they will use up the 6 and 7 for this row. That means that the other square can't possibly contain a 6. We can remove the 6 FROM its candidate list, leaving just 9 - square solved!
The squares in a pair must have exactly two candidates. If one of the above squares had been 679, it couldn't have been part of a pair.
Rule 5 - Triples: Three squares in an area (row, column or box) form a triple when:
None of them has more than three candidates. Their candidate lists are all full or sub sets of the same three-candidate list (explained below!).
You can remove numbers that appear in the triple FROM other candidate lists in the same area.
Here's the fourth row of the puzzle:

Note the three squares in the middle, with candidates of 234, 23 and 23. These form a triple.
234 is the full, three-candidate list, and 23 is a subset of it. Because there are three squares, and none of them have any candidate numbers outside of those in the three-candidate list, they must use up the three candidate numbers (2, 3 and 4) between them. This lets us remove the 4 FROM the other two candidate lists in this row, solving their squares.
It's worth looking hard for subset triples. In this example, the 23 lists make an obvious pair, but it's the triple that instantly solves the two outside squares (once you've dispensed with them, you can treat the 23s as a pair again, and use them to solve the 234!). A subset (or 'hidden') triple is often the pattern that will unlock a seemingly impossible puzzle.
It doesn't matter if some (or all) of the squares don't have the full candidate list. What matters is that between them they cover the list, the whole list and nothing but the list. That means they must use up all three of the list's numbers between them.
In case all that's put you off, here's an example of a more obvious triple - they do exist!:

Pairs and triples are, in fact, variations of the same pattern, sometimes called 'disjoint subsets'. We can express rule 5 in general terms, like this:
A set of N squares in an area forms a GROUP when: a) None of the squares has more than N candidates; b) Their candidate lists are all full or sub sets of the same N-candidate list.
Using complete, up-to-date candidate lists and the five rules described above, you can solve all but the most extreme SuDoku puzzles. It's just a matter of scanning through the puzzle, looking for the claim, single-square candidate or triple that will unlock the next stage of the solution.
The harder the puzzle, the harder they tend to be to find, and the fewer easy pairs and single-candidate squares present themselves. But the hard-to-spot rules are in there somewhere - you've just got to find them!
The keys to successful solving are: • Total accuracy - never put a number in a square or candidate list unless you're absolutely sure it's right. • Completeness - make sure to crosshatch every missing number in every box, so that you start the second stage of solving with complete candidate lists. • Maintenance - whenever you place a number in a square, UPDATE all the candidate lists in the same row, column and box, straight away (this includes numbers placed during crosshatching).
If the rules described above won't solve a puzzle, then there are two possibilities:
It's a genuinely extreme, but solvable, puzzle, which requires extra rules to solve. In very extreme cases this may involve an element of guesswork although many people don't regard such puzzles as proper SuDoku.
It's not a genuine SuDoku puzzle, because it either: a. Has more than one possible solution, requiring you to make guesses in ORDER to find one of them. (Note that this isn't the same as a single-solution puzzle that requires guesswork - although it may seem pretty similar!) b. Doesn't have a solution at all.
Assuming the puzzle is genuine, a good place to start is with rules 6 and 7 (yes, there are rules 6 and 7!). Here they are:
Rule 6 - Excluded candidates: Within an area (row, column or box), when a set of N candidate lists contain all occurrences of a set of N candidate numbers, other numbers can be removed FROM those lists.
Note that N is the same both times, so it's three lists containing all occurrences of the same three candidates, and so on. The important thing when looking for this pattern is to make sure none of the candidates appear anywhere else in the area.
Rule 7 - Box line reduction: If all occurrences of a candidate within a row or column fall inside the same box, then other occurrences of that candidate can be removed FROM that box.
What if I still can't solve it?
If the puzzle still won't budge, and you're confident that it's valid, then you'll need to enter the exotic world of X Wings, Swordfish and Nishio.
X Wing and Swordfish are patterns that span multiple rows and columns, claiming a candidate number that can then be eliminated FROM other lists in the relevant columns/rows. They're (fairly) easy to understand but very hard to spot.
Nishio is controversial, as some people regard it as guesswork (you try a number and see if it leads to a dead end) and therefore not proper, logical SuDoku solving. The best explanations of these patterns are in Simon Armstrong's and Angus Johnson's SuDoku solving guides. They describe all the other techniques too.
One other rare possibility is the remote pair, which is surprisingly simple once you get to grips with it. It's described at http://www.scanraid.com/RemotePairs.htm.
It's worth remembering that spotting these patterns (or using Nishios) is only essential in a small minority of genuinely extreme puzzles. Most puzzles, even 'really tough' and 'fiendish' ones, can be solved by finding every last triple, claim and so on.
Guessing is, in fact, one of the quickest and simplest ways to solve a SuDoku - if you're a computer. If you're not, then it's best avoided if at all possible. Guessing should only be used near the end of a puzzle, when there are few squares left to solve.
Extra tips - checking that everything is still correct.
Sometimes you might suspect that errors have crept INTO your candidate lists. One way to CHECK is to re-crosshatch the box where you think the error is, crosshatching for all its missing numbers.
There is, however, another way to CHECK how many candidates a square has. Just read through the row, column and box it belongs to, crossing off all the numbers that appear in them including any claimed numbers, as long as you're completely sure of them. The numbers that don't appear are that square's candidates.
Here's the whole puzzle, with the row, column and box relevant to the square at row 2, column 1 highlighted:

Check off the numbers that already appear in these areas, and you'll find the list reads 1,2,3,4,6,7,8,9 - only 5 is missing.
This technique (like crosshatching) will only restore the starting value of a candidates list, not any reductions you'd found by applying the rules described above.
Errors in candidate lists are relatively easy to deal with. Errors in placed numbers are much more dangerous, because they can corrupt all the candidate-list calculations around them. Always double (or triple) CHECK that a number is right before placing it as a square's value. Never guess!
6. Quick Solving Summary
1. Try slicing and dicing to solve any easy squares. Don't spend too long on it though. 2. Crosshatch the entire puzzle box-by-box, pencilling-in complete candidate lists. 3. Scan the puzzle for the following rules: - Single-candidate squares - solve immediately - Single-square candidates within an area (row/column/box) - solve immediately. - Claims by a box - remove the claimed candidate FROM the same row/column in other boxes. - Pairs within an area - remove the pair squares' candidates FROM other lists within that area. - Triples within an area - remove the triple candidates FROM others lists within that area. 4. Whenever you solve a square, immediately CHECK and UPDATE all candidate lists in the same row, column and box. 5. Whenever you've updated a candidate list, CHECK to see if one of the rules now applies (e.g. you've created a triple, or a box is now claiming a number). 6. Never guess! (Unless you're absolutely sure you have to!)
Have fun!
Source: Paul Stephens, UK
|