← StudyX Devlog

How to Solve Sudoku: The First Techniques Beginners Should Learn

OBARA HirokiOBARA Hiroki · DeveloperSudoku365How-To
How to Solve Sudoku: The First Techniques Beginners Should Learn

The rules of sudoku fit in three lines. Fill a 9 × 9 grid with the digits 1 to 9. Each row, each column and each of the nine 3 × 3 boxes contains every digit exactly once. The digits already given, the clues, stay as they are.

That is all, and yet a fresh grid can leave a beginner with no idea where to begin. This post lists the techniques I think a beginner should learn first, in the order I would learn them. For an easy puzzle, the first three are enough to reach the end.

A few words first. A row runs across, a column runs down, and a box is one of the 3 × 3 squares with a thick border. The digits that could still go in an empty cell are its candidates.

1. Find where a digit goes in a box (hidden single)

The first technique is to pick one digit and ask where it can go inside a single box.

Say the top-left box has no 5 yet. If row 1 has a 5 somewhere else, in another box, then the top-left box cannot have its 5 in row 1. If row 2 also has a 5 in another box, row 2 is out too. If there is a 5 far down column 2, column 2 is out. Cross off lines like this and sometimes only one cell in the box is left. That is where the 5 goes.

Here is an example I made up. A dot is an empty cell.

. . . | . . 5 | . . .
. . . | . . . | . 5 .
8 . . | . . . | . . .

. . . | . . . | . . .
. . . | . . . | . . .
. 5 . | . . . | . . .

In the top-left box, the 5 cannot be in row 1 or row 2, since both rows already have a 5, and it cannot be in column 2, since there is a 5 lower down. That leaves row 3, columns 1 and 3. Column 1 already holds the 8. So the 5 goes in row 3, column 3.

What I like about this technique is that you only need to hold one digit in your head and look across the grid. Start with the digit that appears most often among the clues. It crosses off the most lines, so its places are easiest to find. Go through 1 to 9, checking all nine boxes for each. At the start, this alone fills a surprising number of cells.

2. Find where a digit goes in a row or column

The same idea works for rows and columns. If a row has no 7 yet, look at its empty cells and cross off every one whose column or box already has a 7. If only one is left, that is the 7.

It is easier to miss than the box version. Rows and columns with only two or three empty cells are worth checking this way first.

3. Find the digit for a cell (naked single)

Techniques 1 and 2 start from a digit and look for its cell. The third works the other way round. It starts from a cell and looks for its digit.

Pick an empty cell and collect every digit in its row, its column and its box. If eight different digits are already there, the ninth is the answer.

This becomes useful once the grid is partly filled. Early on, too many candidates remain. When techniques 1 and 2 stop working, go through the cells in the fullest rows and boxes one by one.

When to start pencil marks

When techniques 1 to 3 run dry, it is time for pencil marks: small candidate digits written in the corner of each empty cell.

I don’t think you need to mark every cell from the start. Marking the whole grid takes time, and a single wrong mark can spoil everything that follows. I find it more reliable to go as far as techniques 1 to 3 allow, and then start marking the boxes with the fewest empty cells.

Each time you place a digit, remove it from the marks in the same row, column and box. Forget this, and your marks will show more candidates than really exist.

4. Use the box and the line together (pointing)

With pencil marks, a new technique appears. It is called pointing, or locked candidates.

Say that inside one box, the 7 can only go in two cells, and both are in the same row. You do not know which yet. But you do know that this box’s 7 lies somewhere on that row. So no other cell in that row, in the other boxes, can be a 7. You can remove 7 from their marks.

It works the other way too. If, inside a row, every candidate 7 lies in the same box, then the other cells of that box, in other rows, cannot be 7.

This technique does not place a digit. It only removes candidates. But removing them often opens up technique 1 or 3 somewhere else.

5. Use a pair of cells (naked pair)

One more is worth learning early. Say two cells in the same row both have exactly the candidates 2 and 6. Between them, those two cells must use up the 2 and the 6. You may not know which is which, but no other cell in that row can be 2 or 6. Remove them from the other marks. The same holds in columns and boxes.

A way of solving I would avoid

There is one habit I would avoid: putting in a digit without a reason, just to see.

Sudoku puzzles are normally made to have exactly one solution. That means every cell can be decided by following a reason. A guess that turns out right was not solved, only lucky. A guess that turns out wrong spoils every cell decided after it, and you will not know where things went wrong.

When you are stuck, ask yourself whether you can say why a digit goes in a cell before you write it. If you cannot, there is a digit or a box you have not looked at yet.

The order

So the order is this. Find a digit’s place in a box. Do the same in rows and columns. Find the digit for a cell. When you stop, write pencil marks. Then use pointing and naked pairs to remove candidates.

The first three work in your head, without marks, and they are enough for easy puzzles. The last two only show up once you have marks, and they are needed from medium puzzles on.

Practising with Sudoku365

Sudoku365 is a sudoku app I make for iPhone, iPad and Android. It has four difficulties, Easy, Medium, Hard and Expert, with 300 puzzles each, 1,200 in total.

All 300 Easy puzzles in the app have been checked with a solver, and every one can be finished with techniques 1 to 3 from this post. None of the Medium puzzles can be finished with those three alone. Adding technique 4, pointing, is enough for roughly seven in ten of them. So I would start with Easy to get used to the first three, and move to Medium to practise the techniques that need pencil marks.

A few features help with practice. Selecting a cell highlights its row, column and box, and every cell with the same digit, which makes technique 1 easier to see. Turn on Notes to write candidates. With Remove numbers from notes switched on in settings (it is on by default), placing a digit clears it from the related notes for you. Hide placed number buttons, also on by default, removes the button for any digit that is placed nine times, so you can see what is left.

With Show incorrect numbers on (the default), a wrong digit shows up at once and counts as a mistake. Three mistakes end the game. A guess is caught straight away, which makes it good practice for placing digits only for a reason.

The app is free with ads, and a one-time Remove Ads purchase turns them off. For your first puzzle, see Getting Started with Sudoku365. For streaks and stats, see Sudoku365 Tips.

Sudoku moves forward on reasons, not luck. Find a reason for one cell and the next reason usually appears. One digit and one box is a good place to begin.

Download on the App Store Download on Google Play