Can you solve a sudoku without guessing?

The Sudokumania team ·

Guide cover: Can you solve a sudoku without guessing?

Yes. A well-made sudoku has one solution, and every number can be deduced from the ones already there: you never need to write a number at random to see whether it fits. When it looks like there's no other way, there's usually a move you haven't spotted yet, or a wrong note. This guide explains why, how we check it on Sudokumania and what to do when it feels like you have to guess.

One solution, and a reason for every number

The rules of sudoku don't say so, but every well-made sudoku has one solution. That's what makes it a logic game: if there's one solution, every empty cell has exactly one right number, and there's always a line of reasoning that finds it, starting from the given numbers.

A sudoku with two solutions, on the other hand, at some point puts you in front of a choice that no reasoning can make. It happens, for example, with four cells at the corners of a rectangle, across two rows, two columns and two boxes, that can only hold the 3 and the 7: you can fill them in two ways, swapping the 3 and the 7, and both follow the rules. There you can only guess, and in the end both choices give a valid grid. It's not a hard sudoku: it's a faulty one.

How we check it, on Sudokumania

Every Sudokumania sudoku comes from a program that works in two stages.

  1. One solution. The program starts from a full grid and removes the numbers two at a time, from cells that are symmetric about the center. After each pair it removes, it counts the solutions: if there's more than one, the two numbers stay where they are and it tries others.
  2. Solvable by reasoning. Then a second program solves it like a person would, with the techniques in our guides, at each step starting from the simplest. The sudoku is kept only if it gets all the way to the end with the techniques of its level. If it needs something harder, or if the program can't get there, it's thrown away and another one is made.

The techniques of each level are these:

So in every Sudokumania sudoku there's always a safe move to make. You don't always see it right away, but it's there.

Why guessing doesn't pay

Even when it goes well, a number written at random costs more than it saves.

  • You find the mistake late. A wrong number doesn't contradict itself right away: it can hold for ten or twenty moves, until two equal numbers clash somewhere else in the grid. By then you no longer know which move was the wrong one, and every number written after it is suspect.
  • Red won't save you. On Sudokumania a cell turns red when two equal numbers are in the same row, column or box (you can turn it off in Settings). It doesn't tell you whether a number is right compared with the solution: a wrong number that doesn't clash with anything isn't flagged.
  • You learn nothing. Being stuck is the moment when there's something new to see. If you get past it with a stroke of luck, on the next sudoku you'll get stuck in the same spot.

What to do when you get stuck

When it seems you have to choose between two numbers, stop and run these checks, in this order:

  1. Recheck your notes. It's the most frequent cause: a forgotten note, or one left where the number can no longer go, hides the right move or shows you one that isn't there. On Sudokumania notes are removed on their own when you write a number, if you haven't turned off “Remove notes automatically” in Settings; but a note erased by mistake doesn't come back on its own. How to write them and keep them in order is in the guide to pencil marks.
  2. Redo the scan, one number at a time. For each number from 1 to 9, go around the nine boxes: after so many moves you almost always find a new one.
  3. Look for hidden singles in rows and columns too, not only in boxes: they're the easiest to miss.
  4. Look at the notes of each box. If in a box a number can only go in one row or one column, it's an intersection, and it removes that number from the rest of the row or column.
  5. Look for two cells with the same two notes, or two numbers with the same two places: those are pairs, the first step of the hard ones.

If you still find nothing, a number you've already written may be wrong. Before looking for new techniques, go back over the last numbers you wrote: did you really see that they couldn't go anywhere else?

“If the 4 were here…”: guessing or reasoning?

There's a way of trying that isn't guessing. You ask yourself, “if this cell held a 4, what would happen?”, and you follow the consequences without writing anything. If you reach a contradiction, for example a cell left with no possible numbers, you've shown that the 4 doesn't go there, and you can remove that note. It's a proof by contradiction, and it's logic in every respect.

The techniques in the guides are, at bottom, proofs by contradiction so short that you see them at a glance. In the naked pair, if the 3 went in a third cell of the row, the two cells of the pair would be left with only one number for two cells: impossible. That's why the 3 is removed from the other cells.

The long argument, on the other hand, has two flaws. It's easy to get a step wrong, and if it doesn't reach a contradiction it proves nothing, unless you carry it all the way to the solution. In Sudokumania sudoku you never need it: there's always a shorter technique. If you use it, do it in your head or with notes, without writing the number. And if you've written a number to test it, there's Undo, which goes back one move at a time. For those who never need it there's also a stamp, “No Undo”: a sudoku completed without ever going back.

Outside Sudokumania

Not every sudoku you find around is checked like this. If a grid really forces you to choose at random, and you've rechecked the notes and the numbers, it may have more than one solution: it's not your fault.

There are also sudoku much harder than ours, which ask for long techniques like the XY-Wing. Even there, if the solution is unique, there's a line of reasoning that goes all the way: it's just longer to see.

In short

  • A well-made sudoku has one solution, and every number can be deduced from the ones already there.
  • On Sudokumania every sudoku is checked twice: it has one solution, and it can be solved with the techniques of its level.
  • When it seems you have to guess, recheck the notes and redo the scan: the move is there.
  • Asking yourself “if this were a 4…” and following the consequences is reasoning; writing a number and hoping it works isn't.

More guides

Settings

Default level

It's the sudoku you find on the home page when you open the site.

Appearance

Theme
Text

While playing

Marks two equal numbers in the same row, column or box in red.

When you place a number, it disappears from the notes in its row, column and box.

Your time is still measured for your statistics.

Language