Pocket Games

How to solve a Sudoku, from the easiest technique to the hardest

A well-made Sudoku can always be solved by reasoning, without guessing. The only difference between an easy grid and a hard one is which technique you need to take the next step. Here they are in order, with an example for each and a method for knowing when to move on to the next one.

Play Sudoku Rules and game page

How to read a grid

To talk about specific cells you need names for them. In this guide rows are numbered 1 to 9 from top to bottom and columns 1 to 9 from left to right: R3C7 is the cell in row 3, column 7. The nine 3×3 boxes are counted the way you read a page: box 1 is top left, box 3 top right, box 5 in the middle, box 9 bottom right.

A row, a column or a box is called a unit. Every cell belongs to three units, and every unit must hold the digits 1 to 9 exactly once. All the techniques below are different ways of squeezing that single rule.

The candidates of a cell are the digits that could still go there, given what is already on the grid. The first two techniques work without writing them down; from the third onwards it pays to note them.

1. The hidden single: start from the digit

This is always the place to start, because it is the fastest technique and it unlocks most easy grids. Pick a digit and a box and ask: where can the 5 go in here? Then look at the rows and columns running through the box: every 5 already placed in one of them rules out a whole line of cells.

In the example, box 1 already holds 7, 3 and 8. Outside the box there is a 5 in R1C6, one in R3C8 and one in R6C3. The first rules out all of row 1, the second all of row 3, the third all of column 3. Only one cell is left: the box’s 5 goes in R2C1.

7××
53×
××8

The × cells are ruled out by the 5s outside the box.

It is called “hidden” because, looking at R2C1 on its own, you might think other digits could fit there too. They could, but it does not matter: the box’s 5 has nowhere else to go.

The most efficient way to use it is scanning by digit: take the 1 and sweep the nine boxes, then the 2, and so on. Start with the digits that already appear most often on the grid, because they rule out the most cells. The same reasoning works for rows and columns: “in this row, where can the 9 go?”.

2. The naked single: start from the cell

The opposite reasoning. Take an empty cell and strike out every digit already present in its three units. If only one is left, that is the answer.

Example: cell R5C5. Row 5 already has 1, 3 and 8; column 5 has 2, 6 and 9; box 5 has 4 and 7. Across all three units only the 5 is missing, so R5C5 is a 5.

Applied across the whole grid it is slower than the hidden single, but it becomes very handy near the end, when few cells are empty and each has nearly full units. Easy grids are solved by alternating these two singles and nothing else.

3. When and how to write candidates

When no more singles jump out, you need to see the candidates. A common mistake is to write them in every cell from the start: you end up with an unreadable grid and spend ten minutes copying digits that the first scan would have solved anyway.

A two-step approach works better. First, place every single you can find without notes. Then, when you get stuck, write the candidates one unit at a time, starting with the units with the fewest empty cells: a box with three free cells has at most three candidates per cell, and that is where the next techniques find something.

The golden rule: every time you place a digit, remove it from the notes in its three units. A stale note will show you a pair or a triple that does not exist. On Pocket Games the game does it for you: when you place a correct digit, it disappears from the notes in its row, column and box.

4. Locked candidates

This is the first real step up, because you learn something without filling any cell: you remove candidates. It comes in two mirror-image versions.

From box to line (pointing)

In box 4 the 6 can only go in R5C1 or R5C3: both cells are in row 5. You do not know which of the two yet, but you know that the 6 of box 4 will be in row 5. So row 5 already has its 6, and the 6 can be removed from every other cell in the row, from R5C4 to R5C9. That removal often leaves a single in another box.

From line to box (claiming)

The reverse case. In row 8 the 2 can only go in R8C7 or R8C9, and both are in box 9. So the 2 of box 9 has to be on that row, and it can be removed from the other six cells of the box (the ones in rows 7 and 9). It works the same way with columns.

These two techniques are what separates a medium grid from an easy one, and you almost always find them by thinking box by box: the direction the eye looks at least.

5. Pairs

The naked pair

Two cells in the same unit whose candidates are exactly the same two digits. You do not know which goes where, but those two digits are reserved for those two cells and can be removed from the rest of the unit.

In row 3 of the example, 3, 4, 6 and 8 are already placed, and the five empty cells have these candidates:

CellCandidatesAfter the pair
R3C12 72 7
R3C22 5 75
R3C42 72 7
R3C61 2 51 5
R3C91 5 91 5 9

R3C1 and R3C4 form the pair {2, 7}. With 2 and 7 removed from the rest of the row, R3C2 is left with just the 5. R3C6 then loses its 5 and becomes 1, and R3C9 loses 1 and 5 and becomes 9. One observation has closed three cells.

The hidden pair

The same idea seen from the digits’ side. In box 7 the 1 and the 6 appear as candidates in only two cells: R7C1, which has {1, 4, 6, 8}, and R9C2, which has {1, 3, 6}. Since 1 and 6 must go there and have nowhere else, those two cells cannot hold anything else: both are cleaned down to {1, 6}. Hidden pairs are hard to spot precisely because the cells are full of other candidates that act as noise.

6. Triples

The pair generalises to three cells and three digits, with a twist: the three cells do not all need to contain all three digits. In column 5 there are three cells with candidates {1, 2}, {2, 3} and {1, 3}. Together they use only three digits, so 1, 2 and 3 are all reserved there and can be removed from the other cells of the column. If you only look for “full” triples like {1, 2, 3} three times, you will never see them.

Triples also have a hidden version: three digits that, within a unit, appear in only three cells. The same logic as for pairs applies, and it is even harder to notice. Quads exist but are rare, and a naked quad in a unit usually matches a hidden pair or triple in the remaining cells, which you will find first.

7. The X-wing

Here you stop reasoning about one unit and look at two at once. You need a digit that, in two different rows, can only go in two cells each, and the two pairs must sit in the same two columns.

In the example the 4 can only go in C3 or C8 in row 2, and again only in C3 or C8 in row 7. There are two possibilities: either the 4s are in R2C3 and R7C8, or in R2C8 and R7C3. Either way columns 3 and 8 already get their 4 in these rows, so the 4 can be removed from every other cell in columns 3 and 8 (the × marks on the grid).

××
44
××
××
××
××
44
××
××

The four corners are the only possible cells for the 4 in rows 2 and 7.

The name comes from the X drawn by the two possible solutions, crossing between the four corners. It also works with rows and columns swapped. The practical way to find one: pick a digit and look for rows where it has exactly two places. If two of those rows have their places in the same columns, you have an X-wing. Extended to three rows and three columns it becomes the Swordfish, which follows the same logic and is much rarer.

8. The Y-wing

The last technique worth knowing before you enter specialist territory. You need three cells with two candidates each:

If the pivot is 1, the first wing becomes 3. If the pivot is 2, the second wing becomes 3. You do not know which, but one of the wings will certainly be 3. So any cell that sees both wings cannot be 3. Here those are R1C2 and R1C3 (in the first wing’s row and the second wing’s box) and R3C7, R3C8, R3C9 (in the second wing’s row and the first wing’s box): the 3 comes out of all five.

Look for Y-wings starting from the cells with only two candidates: there are few of them, and for each one you just ask whether two cells it sees complete the triangle.

The method, in order

When a grid stalls, you rarely need a harder technique: you need to run the easy ones again after every bit of progress. Every placed digit and every removed candidate can create a single somewhere else. The order worth following:

  1. Hidden singles, scanning digit by digit from the most frequent to the least.
  2. Naked singles in nearly full units.
  3. Candidates where you are stuck, then locked candidates in every box.
  4. Pairs and triples, naked and hidden, starting from the units with the fewest empty cells.
  5. X-wing and Y-wing, only if nothing else has worked.

After every successful step, go back to step 1. It sounds slow but it is the opposite: an advanced technique found in the wrong place wastes more time than ten scans.

On Pocket Games: what each difficulty needs

Pocket Games grids are generated on the device and checked by a solver that uses only the techniques allowed for that difficulty: if the grid cannot be finished with them, it is not offered. That means you know in advance what you will need.

DifficultyGivens, at leastTechniques that are enough
Easy35naked and hidden singles
Medium28+ locked candidates
Hard26+ naked pairs

X-wings, Y-wings and triples are never required here: they are for the toughest Sudoku you find in specialist magazines and books. Knowing them still helps on Hard, because sometimes they offer a shortcut.

Three details of the game that change how you play:

The most common mistakes

Where to start

If you have never used locked candidates, try a Medium grid on Pocket Games and look for the first one on purpose: once you find it, you start seeing them everywhere. The full rules and the common questions about the game are on the Sudoku page, and you can play straight away in your browser without installing anything. More guides are on the guides page.