English
Notify me when available

Hidden pairs in sudoku show up when you track each digit

A hidden pair is two digits that can each go in only two cells of a row, column or box, and those are the same two cells for both digits. The two cells must hold those two digits, so every other candidate in them can go. To find one, count where each missing digit can still go in a unit. Reading the cells one by one hides it.

What is a hidden pair in sudoku?

A hidden pair is two digits locked into two cells of one unit. A unit is a row, a column or a 3×3 box, and a candidate is a digit that can still go in an empty cell. Inside the unit, the first digit has exactly two possible cells and the second digit has the same two. One of them goes in each cell, so nothing else fits there.

The pair is "hidden" because both cells still carry other candidates, often several of them. In the example below, one cell shows seven candidates and the other shows six. You won't notice anything by looking at the cells. You notice it by looking at the digits.

How do you find hidden pairs?

Work digit by digit inside one unit, with full pencil marks for that unit. Pencil marks are the small candidate digits you write in each empty cell.

  1. Pick a row, column or box and pencil in every candidate for its empty cells.
  2. List the digits that are still missing from that unit.
  3. For each missing digit, count the cells where it can go.
  4. Keep the digits that have exactly two cells.
  5. Look for two of those digits that share the same two cells.
  6. Erase every other candidate from those two cells, then look for singles in the units they belong to.

A short tally in the margin speeds this up. Write each two-cell digit with its cells, for example "7 in c4 and c5". Two identical entries mean a hidden pair. A digit with three or more cells drops out of the tally.

Where is the hidden pair in this example grid?

It sits in row 7 and uses the digits 7 and 9. In the text, r7c4 means the cell in row 7, column 4.

Row 7 has one given, the 6 in column 6. Its eight empty cells hold between three and seven candidates each, and no cell has only two. Count the digits instead. Eight digits are missing from the row. The 7 can go only in r7c4 and r7c5, because the other cells of the row already see a 7 in their column or box. The 9 has the same two cells. The other six missing digits have five places or more.

Hidden pairs, grid before the techniqueHidden pairs, grid after the technique
Hidden pair on the digits 7 and 9 in row 7. The 7 and the 9 can go only in r7c4 and r7c5. The candidates 1, 2, 3, 4 and 8 are removed from r7c4, and 1, 2, 4 and 8 from r7c5.

After the pair, r7c4 and r7c5 hold only 7 and 9. That is nine candidates gone in one step, five from the first cell and four from the second. The grid was checked by script before publication. It has a single solution, its pencil marks are the raw candidates left by the givens, and simpler techniques do not produce these nine eliminations.

Why can you remove the other candidates?

Because row 7 needs one 7 and one 9, and both digits are confined to r7c4 and r7c5. Suppose a 1 went into r7c4. The 7 and the 9 would then have one cell left between them, which breaks the rules. The same argument removes each of the other candidates from both cells.

The hidden pair doesn't tell you which of the two cells gets the 7. It only fixes the pair of digits. Once the two cells are cleaned up, they form a naked pair you can see. If the two cells also share a box, that naked pair may remove 7 and 9 from the rest of the box, so check it before moving on.

Hidden pair or naked pair, which should you look for first?

Look for naked pairs first, since they jump out once your pencil marks are complete. A naked pair is two cells in a unit holding the same two candidates and nothing else, and it removes those two digits from the other cells. The hidden pair runs the other way round. It keeps its two digits and clears everything else out of its two cells.

The two techniques mirror each other. In row 7, the six other empty cells hold only six digits between them, 1, 2, 3, 4, 5 and 8. Those six cells form a naked set of six, and it removes exactly the same nine candidates. A six-cell set is hard to read. Two digits with two places each are quick to count, which is the reason to learn hidden pairs.

Naked pairs and hidden pairs compared, from the definition of each technique
TechniqueYou start fromYou look forYou remove
Naked pairCellsTwo cells with the same two candidates and no othersThose two digits, from the other cells of the unit
Hidden pairDigitsTwo digits with the same two cells and no othersEvery other candidate, from those two cells

When does a hidden pair fool you?

The costliest mistake is a missing pencil mark. If you forgot a 9 somewhere in the unit, the 9 looks like it has two places when it has three. The candidates you then erase may include the right one. Recount both digits across the whole unit before you clear the two cells.

Two digits with two places each are not enough on their own. Their places must be the same two cells. If they overlap in only one cell, there is no pair and nothing to remove. If one of the digits is down to a single cell, you have a hidden single, so place it.

A correct hidden pair can also be useless. When the two cells already hold only those two digits, there is nothing left to erase and the pattern is a plain naked pair. A hidden pair doesn't place a digit either. They set up the next move, which you find by rescanning the units around the two cells.

Where do hidden pairs fit among the other techniques?

Hidden pairs come after the singles, in the same tier as naked pairs. The guide to sudoku techniques places naked and hidden pairs at the Extreme level, after the pointing pairs and claiming of the Expert level. If you don't yet have a fixed scanning order, the article on how to solve a sudoku sets one up before you reach the pairs.

Hidden pairs are the smallest member of a larger family. Bernhard Hobiger, who wrote the HoDoKu solver, describes hidden pairs, hidden triples and hidden quadruples as hidden subsets that all work the same way. A hidden triple locks three digits into three cells, with the same logic and more counting.

Questions about hidden pairs

Can a hidden pair be in a box?

Yes. You can find one in a row, a column or a 3×3 box. The test stays the same, two digits that have the same two cells and no others in that unit.

Do you need pencil marks to spot hidden pairs?

For the unit you're checking, yes. One missing candidate is enough to create a fake pair. The rest of the grid can wait until you move to the next unit.

How is a hidden pair different from a hidden single?

A hidden single is one digit with one possible cell in a unit, so you write it in. A hidden pair applies the same idea to two digits and two cells. It reserves the cells without placing anything.

Which units should you check first on a hard grid?

The units where a missing digit already has only two places. A quick digit-by-digit tally finds them. A nearly empty row like row 7 in the example can hold a pair even though it looks like the least promising place to search.

What should you learn after hidden pairs?

Hidden triples, then the X-Wing in sudoku. In SudoKoum, the Strategies screen shows hidden pairs and hidden triples among the app's 14 techniques.

How can you practise finding hidden pairs?

Take the grid in this article, cover the second image and find the nine candidates to remove on your own. On your next grids, tally the two-place digits in each row. You can also challenge a friend on the same grid and compare how you each got through it.

Sources

  • Bernhard Hobiger, Solving Techniques - Hidden Subsets (Hidden Pair, Hidden Triple, Hidden Quadruple), HoDoKu, 2008-2012

Be there at launch

SudoKoum is coming to the App Store and Google Play. Leave your email and get a single message, the day the app ships.

Notify me when available