Sudoku Last Two Candidates - How to Decide Without Guessing and What to Check in Order
Near the end of a Sudoku, every remaining cell can look like a coin toss between two digits. In a puzzle with one solution there is no true fifty-fifty choice; a two-way choice that seems open means an unused clue is still on the grid. This article sorts the typical endgame two-way choices into four kinds and walks through a checking order, on a real endgame grid, for settling them without guessing.
Should the last two candidates be a guess?
Work far enough into a Sudoku and you may reach a point where every remaining cell looks like a choice between two digits, and either seems to fit. The fewer cells are left, the more it looks as if one digit would carry you to the end, and the more tempting it is to try. The short answer is that in a puzzle with one solution, no such choice is genuinely open. If either digit worked, the puzzle would have two answers. A two-way choice only looks open while some clue on the grid is still unused, and that clue is usually not an advanced technique but the basic habit of counting where each digit can go. This article sorts endgame two-way choices into four kinds and lays out a checking order, demonstrated on a real endgame grid, for settling them without a guess.
Four typical endgame two-way choices
Endgame two-way choices fall into four kinds by how they look. In the first, checking cell by cell shows two or more candidates everywhere, so nothing seems decidable. This kind can give way as soon as you count places digit by digit. In the second, cells with the same two candidates sit in the same row or column, each waiting on the other. Here, solving one cell outside the pair sets off a chain that settles them all. The third is a rectangle of four cells across two rows, two columns and two boxes that share the same pair, and the fourth is a grid where almost every cell has two candidates and just one cell has three. The third and fourth can only be settled by assuming that the puzzle has exactly one answer. The table below shows what each looks like and what settles it.
| What you see | On the grid | What settles it |
|---|---|---|
| Every cell looks like a two-way choice | Every cell has two or more candidates and none has just one | Counting places digit by digit finds a digit with only one place |
| Two-way choices linked to each other | Cells with the same two candidates sit in the same row or column | Once one cell elsewhere is solved, the rest follow in a chain |
| A rectangle of four cells with the same pair | Four cells across two rows, two columns and two boxes share one pair | A Unique Rectangle, which relies on the puzzle having one solution |
| Almost every cell has two candidates | Exactly one cell still has three candidates | BUG+1, which relies on the puzzle having one solution |
The first two are settled without assuming a unique solution. The last two are techniques that depend on the puzzle having only one answer.
Two-candidate cells and two-place digits
Two different things can feel like a two-way choice at the end. One is a cell with two candidates left, a choice about a cell. The other is a digit that has only two possible places within some row, column or box, a choice about a digit. The first is visible as soon as pencil marks are written; the second only shows when you pick a digit and scan a unit for it. Watching only the cells makes it easy to overlook clues that sit on the digit side. The two views complement each other. Even if a cell has two candidates, when one of those digits has only one place in that cell's row, column or box, the cell is decided. Conversely, a digit with two places is decided as soon as one of those places is shown to hold another digit. When an endgame cell looks like a two-way choice, counting for each of its two candidates how many places it has in the row, the column and the box applies both views at little cost. A digit with exactly two places in a unit is what chain techniques call a strong link, the foundation of many advanced techniques, not only in the endgame. A cell with exactly two candidates is called a bivalue cell, and the patterns behind Unique Rectangles and BUG+1 are arrangements of such cells.
A grid full of two-way choices
The grid shows an endgame with 17 cells left. Cells are named by row and column, so r1c9 is row 1, column 9. Writing out the candidates, every cell except r1c9 and r3c8 has exactly two, and no cell has only one. r7c7 and r7c9 both hold 7 and 8; r5c8 and r5c9 both hold 1 and 8. Looked at cell by cell, everything is a two-way choice, and guessing is tempting. Now switch to the digit side. Look for the cells in row 1 that can take a 9: of the five empty cells in row 1, only r1c9 has 9 as a candidate. With five candidates, r1c9 looks like the least decidable cell on the grid, yet as a place for 9 it is the only one. Once r1c9 is 9, the only place for 5 in row 1 is r1c5, and from there filling in each cell as it drops to one candidate completes all 17 cells. In order: with 5 in column 5, r2c5 becomes 6; with 6 in row 2, r2c8 becomes 2 and r2c1 becomes 7; then r1c1 is 8, r1c7 is 7 and r1c8 is 1. The 7-or-8 choice in row 7 is settled the moment r1c7 becomes 7. The obstacle was never difficulty, only looking from one direction.
- Row 1, where we count places for 9
- Two cells that look like 7 or 8
- The only place for 9
17 cells remain. Apart from r1c9 (candidates 1 / 5 / 7 / 8 / 9) and r3c8 (candidates 1 / 2 / 6 / 8), every cell has exactly two candidates. No cell has a single candidate, yet in row 1 only r1c9 can take a 9.
Settling it without a guess: the checking order
When a two-way choice stops you, apply the cheapest checks first. Start with missed candidates: has the digit you just placed been removed from the candidates in its row, column and box? Next, for each digit from 1 to 9, count its places in every row, column and box. As the grid above shows, an endgame full of two-way choices can collapse at this step. Third, if two cells in one unit have the same two candidates, remove those two digits from the other cells of that unit. This is the naked pair; in the endgame there are often no cells left to clear, but when one was missed it still pays off. Only when none of these settles it do you move on to checks that use an assumption or rely on uniqueness. The order in the table puts quick, low-risk checks first and those with stronger premises last.
| Step | What to check | If you find it |
|---|---|---|
| 1 | Has each solved digit been removed from the candidates in its row, column and box? | Clearing a missed candidate can leave a cell with one candidate |
| 2 | For each digit 1 to 9, count its places in every row, column and box | A digit with only one place is solved there |
| 3 | Are there two cells with the same two candidates in one row, column or box? | Remove those two digits from the other cells of that unit |
| 4 | Pick one two-candidate cell and briefly follow one of its candidates | Remove the candidate that leads to a contradiction; if none appears, decide nothing |
| 5 | Do four cells across two rows, two columns and two boxes share the same pair? | If the puzzle is guaranteed unique, break it with a Unique Rectangle |
| 6 | Is there exactly one three-candidate cell with all others at two? | If the puzzle is guaranteed unique, settle that cell with BUG+1 |
| 7 | Nothing so far settles it and both candidates still seem to work | Suspect an earlier error, or a puzzle with two solutions |
Steps 1 to 3 are quick and use neither assumptions nor uniqueness. Step 4 uses an assumption and steps 5 and 6 rely on uniqueness, so they come last.
Rules for checking with an assumption
Step 4 picks one two-candidate cell, places one candidate on trial and follows the consequences briefly. If a contradiction appears, that candidate can be removed. Writing in the branch that did not fail is no different from guessing. An assumption may settle something only when one branch reaches a contradiction, or when both candidates turn out to put the same digit in the same cell. If you try an assumption in the endgame, choose a two-candidate cell whose row and column also contain cells with few candidates; the line tends to stay short. Write trial digits in pencil or another color, and always erase them when you are done.
Two techniques that rely on uniqueness
Steps 5 and 6 rely on the puzzle having only one answer. The Unique Rectangle in step 5 uses the fact that when four cells across two rows, two columns and two boxes hold only the same pair, swapping the two digits would give a second answer. If the answer is unique, candidates that would complete that pattern can be removed. The related article and glossary entry cover its forms and use. BUG+1 in step 6 applies when exactly one empty cell has three candidates, every other empty cell has two, and removing one candidate from that cell would leave each candidate appearing exactly twice in every row, column and box. Left undecided, that pattern would have two answers, so the three-candidate cell takes the candidate that appears three times within its row, column or box. The guide to HoDoKu, a free program for analyzing and practicing Sudoku, warns that if some other candidate also appears three times in a unit, the pattern does not hold. One more point is worth knowing: uniqueness is not part of the rule for placing digits itself. HoDoKu's author describes whether to use such techniques as a matter of taste. The safe course is to use them on puzzles known to be unique, after the other checks.
Common mistakes and how to spot them
Endgame mistakes with two-way choices usually come from picking the wrong deciding clue. The first is counting candidates only cell by cell and calling it a two-way choice without counting places digit by digit. As the example shows, a cell with many candidates can be the only place for some digit. The test is to ask whether you have counted the places of every digit from 1 to 9 in every row, column and box. The second is a missed candidate: an old pencil mark left in place makes a cell that is actually decided look like a two-way choice. The third is spotting a Unique Rectangle shape and using it on a puzzle that is not guaranteed unique; on a puzzle with two answers, it leads to a wrong digit. The fourth is miscounting a BUG+1: if another three-candidate cell remains, or another unit has some candidate three times, the pattern does not hold. Working through the checking order from the top, without skipping steps, guards against all of these.
When the two-way choice will not go away
If both candidates still seem to work after the whole checking order, suspect either an error among the digits placed earlier or a puzzle that itself has two answers. Either way, guessing one digit and filling the grid does not count as solving it. Once counting places from the digit side becomes a habit, it helps find forced cells early in the puzzle as well as at the end.