How to solve Sudoku

The objective is to fill each empty cell with a number (1-9) that doesn't exist in its row, column, or minigrid. First, build a candidate list for each cell by using the CRME techniques — Column, Row, Minigrid Elimination. CRME is well suited to be a computer algorithm, but not a fast human way to solve Sudoku.

When you are ready, please try it on the Online Sudoku program. No download or plugin installation needed.

Other elimination techniques include, but not limited to, Naked Twins, Naked Triplets, Hidden Twins, Box Claim, Row Claim, Double Claim, Swordfish, X-Wing, XY-Wing, XYZ-Wing, Conjugate Pairs, Remote Pair Chain, Forcing Loop, and Forcing Chain.

CRME

CRME

In each and every empty cell, you start with all numbers from 1 to 9, and eliminate all numbers that are used in the same row, column, and minigrid as the empty cell. In the highlighted cell with '7 8', the 1st row already has '9', '1', '2', '6'; the 2nd column has '6', '5', '2', '4', '3'; the minigrid has '9', '6', '1'. Hence, only '7', '8' are not eliminated, and can be written in the candidate list as shown.


Only Candidate

Only Candidate

When there is only one candidate in a cell anytime, the number must be the correct one for the cell. As indicated in the hightlighted cell, '6' can be filled in, after the CRME process eliminated all but one. The cell can now be used for remaining empty cells with CRME.

The candidate list shows every possible number for a cell. Consequently, if there is only one number, it must be the correct number for the cell. However, if there is none, either there is no solution or a mistake has been made.

Until all cells are filled, you may have to repeat using at least CRME and this technique, and the following techniques depending on the difficulty of your Sudoku puzzle.


Loner

Loner

Looking for loners is considered one of the basic techniques.

The number in the candidate list is correct for the cell, when the candidate number occurs only once in all of the candidates in the same row/column/minigrid. In a solution, each number (1-9) must appear only once in its row/column/minigrid. When a number doesn't appear in the candidate lists, either there is no solution or a mistake has been made.

As shown in the highlighted cell, '1' doesn't exist in the candidates in other cells in the same minigrid (or row). So, other candidate numbers are esentially eliminated, making '1' the only candidate.


Naked Twins

Naked Twins

When the candidates for two cells in the same row/column/minigrid are the same two numbers, those two numbers can be eliminated from the candidate lists in other cells.

The two highlighted cells in the picture with the same two candidates ('4', '7') reside in the same minigrid. Hence, '4' and '7' can be removed from the candidate lists in other cells in the minigrid. In addition, it applies to the same column because the highlighted cells also reside in the same column.

If one highlighted cell contains '4', the other must contain '7'. Because '4' and '7' must occupy the two highlighted cells, the two numbers are not possible for other cells in the same minigrid and column.


Naked Triplets

Naked Triplets

In each of the three hightlighted cells in the same row or minigrid, the candidates are limited to three numbers ('1', '2', '5'). Because each of these three numbers must reside in one of the three cells, the three candidate numbers can be eliminated from other cells in the same row or minigrid. This rule also applies to the column, if the three cells reside in the same column.

Other Naked Multiplets (Quadruplets, etc.) work similarly. However, they are rare and seldom worth the trouble of spotting them.


Hidden Twins

Hidden Twins

The two highlighted cells contain two candidate numbers ('5', '9') that don't exist in other cells in the same minigrid. If arbitrarily one cell uses '5', the other cell to take '9' due to the Loner rule. Because these two cells must have either '5' or '9', other candidate numbers ('1', '4', '6', '8') can be eliminated from the two highlighted cells. This rule applies to the row or minigrid, if the two cells are in the same row or minigrid.

Other Hidden Multiplets (Triplets, Quadruplets, etc.) work similarly. However, they are rare and seldom worth the trouble of spotting them.


Box Claim

Box Claim

When a candidate number occurs in some cells in the minigrid, and all these cells lie in only one row or column, the candidate number can be eliminated from other cells in the row or column.

For the three highlighted cells with '4' circled, one of them in the same minigrid must be '4'. As a result, '4' can be deleted from other cells in the row, because '4' is claimed already by a cell on the same row.


Row Claim

Row Claim

Box Claim and Row Claim work in opposite ways. Because the highlighted cells with '9' circled are the only cells in the same row that has '9', '9' can be deleted from other cells in the minigrid that the highlighted cells all belong to.

Column Claim differs from Row Claim in that the only cells in a column that has the candidate number all belong to one minigrid.


Double Claim

Double Claim

When the only cells in two minigrids that contains a candidate number lie in the same two columns/rows, the candidate number can be removed from other cells in the 3rd minigrid that lie in the two columns/rows.

The highlighted cells with '2' circled lie in only two columns in two minigrids. If one column claims '2' for one of the cells in a minigrid, the other column in another minigrid must claim '2' to obey the rule that the same number can't be in one column. Therefore, '2' is not possible for the two columns in the 3rd minigrid.


Swordfish

Swordfish

When a candidate number occurs in at most three cells in each of the three rows/columns, and all of the cells happen to be in the same three columns/rows, the candidate number can be eliminated from other cells in the three columns/rows.

The highlighted cells with '3' circled reside in only three columns. Because they are the only occurences in the rows, all three columns can claim '3'.


X-Wing

X-Wing

In the highlighted cells, '4' occurs in only two cells in each of the two rows, and the cells belong to the same two columns. If one of the highlighted cells in one of two columns is '4', the diagonal cell in another column must be '4'. Therefore, the two columns can claim '4' which can be eliminated from other cells in the two columns.

This rule applies as well, when rows and columns are switched.


XY-Wing

XY-Wing

When one cell with candidates X, Y is in the same row, column, or minigrid as two cells with candidates X, Z and Y, Z, candidate Z can be eliminated from the cells in the same row, column, or minigrid by both cells XZ and YZ.

Let X='5', Y='6', Z='9'. If the highlighted cell XY is '5', cell XZ must be '9'. On the other hand, '6' in cell XZ forces cell YZ to take '9'. The only two possibilities require Z to be in one of the two cells. Therefore, the cells in the same row, column, or minigrid as both cells can't have Z.


XYZ-Wing

XYZ-Wing

It is similar to XY-Wing. Cell XYZ is in the same row, column, or minigrid as both cells XY, YZ.

'8' is the common candidate number among the three cells. One of the three cells must be '8'. Therefore, '8' can be eliminated from other cells in the same row, column, or minigrid as all the three cells.


Conjugate Pairs

Conjugate Pairs

The highlighted cells with '3' circled form a chain. Each link connects a pair of cells that contain the only two occurences of '3' in the same row, column, or minigrid.

When a positive cell is '3', the linked negative cells must not have '3', forcing other positive cells to be '3'. Hence, either all positive cells are '3', or all negative cells are '3'. Since the two highlighted negative cells reside in the same row, they can't both be '3'. Consequently, all positive cells must be '3'. '3' can be eliminated from all negative cells.


Remote Pair Chain

Remote Pair Chain

The highlighted cells with '5 9' are linked by the same row, column, or minigrid. Cell A is 5 cells away from cell B. Because they are odd number of cells away, if one is '5', the other must be '9'. '5' and '9' can be removed from the cells in the same row, column, minigrid as both cells A and B.


Forcing Loop

Forcing Loop

The cells, each with only two candidate numbers, form a loop. Each pair of linked cells in the loop can be in the same row, column, or minigrid and must share a candidate number not shared by the cells before. The shared number can be eliminated from other cells in the same row, column, minigrid as the pair.

If cell A is '6', cell B is '8'. If cell A is '7', cell D is '2', cell C is '8', and cell D ends up with '6'. Because cell A or B must claim '6', '6' can be removed from the other cells within the same row as the pair AB. Likewise for AD, CD, and BC, '7', '2', and '8', respectively, can be eliminated.


Forcing Chain

Forcing Chain

The cells can't complete a loop, because the highlighted cell A doesn't share just one but two candidates with cell E. Instead, the cells form a chain.

If cell A is '4', cell B must be '5', forcing cell C to be '1', cell D to be '3', cell E to be '4'. Because cells A and E can't both be '4' in the same column, cell A must be '3', forcing cell E to be '4'.


BACK TO THE TOP