Morningwit

Hidden triples in Sudoku: three digits that fit only three squares

What you are looking for

A hidden triple is about digits, not squares. Pick a row, column or box and ask, for each missing digit, where it can still go. If three of those digits between them can only reach the same three squares, you have found a hidden triple.

It is the bigger sibling of the hidden pair. The HoDoKu solving guide says hidden triples work in the same way as hidden pairs, only with three cells and three candidates. What makes them "hidden" is that those three squares usually list other candidates as well, so the pattern does not jump out when you look at the squares. You see it only when you follow the digits.

The three digits do not all need to appear in all three squares. SudokuWiki explains that, just as with naked triples, the rule only needs three digits in total spread over three squares, so a mix such as [4,8], [4,9] and [8,9] is as valid as three copies of [4,8,9]. Each of the three digits just has to be absent from every other square in that row, column or box.

A Sudoku board with all pencil marks in column 1 shown. Rows 3, 8 and 9 of column 1 are highlighted; they are the only squares in the column that list 1, 4 or 9.

Why it works

Take the three digits in our example: 1, 4 and 9 in column 1. The column needs each of them once. Every square where any of them can go is one of three squares: rows 3, 8 and 9. So the column's 1, its 4 and its 9 must all end up in those three squares.

Three digits, three squares, one digit per square: the three squares are now fully booked. There is no room left in them for a 2, a 3 or an 8, even though the pencil marks still list those. Every candidate in those squares other than 1, 4 and 9 can be crossed out.

Notice what does not change. Unlike a naked pair, a hidden triple removes candidates only from inside the three squares. The other squares of the column were already free of 1, 4 and 9, which is what made the pattern a triple in the first place.

A worked example on a real board

This is a random board with one solution and 26 givens, seed 1550, made by the generator behind this site. It is not one the game serves. We let the solver use singles, pointing, claiming, naked pairs and triples, and hidden pairs. After 21 moves it had filled 41 squares and had nothing left to try. Column 1 at that point looked like this.

<div style="overflow-x:auto;"><table style="width:100%;border-collapse:collapse;font-size:0.9rem;min-width:480px;"><thead><tr><th style="text-align:left;padding:8px 10px;border-bottom:2px solid var(--ink);">Column 1, row</th><th style="text-align:left;padding:8px 10px;border-bottom:2px solid var(--ink);">Pencil marks at the stall</th><th style="text-align:left;padding:8px 10px;border-bottom:2px solid var(--ink);">Left after the cut</th></tr></thead><tbody><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 1</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">2, 7, 8</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">no change</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 2</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">5 (solved)</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">5</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 3</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">2, 4, 8, 9</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">4, 9</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 4</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">2, 6</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">no change</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 5</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">2, 6, 7, 8</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">no change</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 6</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">6, 7, 8</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">no change</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 7</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">2, 3</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">no change</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 8</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">1, 3, 9</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">1, 9</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Row 9</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">1, 2, 4, 9</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">1, 4, 9</td></tr></tbody></table></div>

Looking at the squares, nothing stands out: no two squares list the same candidates. Now switch to the digits. Here is where each missing digit can go in column 1.

<div style="overflow-x:auto;"><table style="width:100%;border-collapse:collapse;font-size:0.9rem;min-width:480px;"><thead><tr><th style="text-align:left;padding:8px 10px;border-bottom:2px solid var(--ink);">Digit</th><th style="text-align:left;padding:8px 10px;border-bottom:2px solid var(--ink);">Squares in column 1 where it can go</th></tr></thead><tbody><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">1</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">rows 8, 9</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">2</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">rows 1, 3, 4, 5, 7, 9</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">3</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">rows 7, 8</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">4</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">rows 3, 9</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">5</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">placed in row 2</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">6</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">rows 4, 5, 6</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">7</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">rows 1, 5, 6</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">8</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">rows 1, 3, 5, 6</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">9</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">rows 3, 8, 9</td></tr></tbody></table></div>

Digit 1 has two homes, rows 8 and 9. Digit 4 has two, rows 3 and 9. Digit 9 has three, rows 3, 8 and 9. Put together, those three digits can only reach rows 3, 8 and 9. That is the triple. Row 9 lists all three digits, while rows 3 and 8 list two each, which is the mixed case SudokuWiki describes.

Four candidates go. Row 3 loses its 2 and its 8, row 8 loses its 3, and row 9 loses its 2. Each of the three squares is left with only digits from the triple.

One of those cuts opens the board. Row 8, column 1 was one of only two places for the 3 in the bottom-left box; the other was row 7, column 1. With the 3 gone from row 8, the 3 has a single spot in that box, so row 7, column 1 = 3 is a hidden single. After that the solver finished the board using only singles: 5 hidden singles and 35 naked singles in total, ending on the board's only solution.

The same column after the hidden triple. In rows 3, 8 and 9 of column 1, the candidates 2, 8, 3 and 2 are struck through in red, leaving only 1, 4 and 9.

The naked set on the other side

Every hidden triple has a mirror image in the same row, column or box. In our example, column 1 had eight open squares. Three of them hold 1, 4 and 9. The other five, rows 1, 4, 5, 6 and 7, list only the digits 2, 3, 6, 7 and 8 between them. That is a naked set of five squares and five digits, and it removes exactly the same four candidates.

SudokuWiki uses the same kind of reasoning to explain why it does not cover hidden sets larger than quads: a hidden set of five would automatically come with a complementary hidden quad, since five plus four is nine. HoDoKu adds that finding larger hidden subsets needs a good short term memory, and that many players prefer to look for larger naked subsets once pencil marks are in. It is a matter of taste. If the naked side of a house is the smaller one, look there; if the hidden side is smaller, as in our column, look for the digits.

How often a board needs one

The game on this site does not use hidden triples when it grades or hints. Its solver stops at hidden pairs on the hidden side. To see how often a hidden triple actually matters, we generated 3,000 random boards with about 24 givens and ran the solver with the techniques listed in the example above.

<div style="overflow-x:auto;"><table style="width:100%;border-collapse:collapse;font-size:0.9rem;min-width:480px;"><thead><tr><th style="text-align:left;padding:8px 10px;border-bottom:2px solid var(--ink);">Hidden triple tally, random boards with 24 to 28 givens (most have 24), seeds 1000 to 3999</th><th style="text-align:left;padding:8px 10px;border-bottom:2px solid var(--ink);">Result</th></tr></thead><tbody><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Stalled with singles, locked candidates, naked pairs and triples, hidden pairs</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">1,124 of 3,000</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">A triple that removed something was waiting at the stall</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">22 of 1,124</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Where those 22 triples sat (first one found on each board)</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">11 in a box, 7 in a row, 4 in a column</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Open squares in the row, column or box that held the triple</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">7 or 8 in all 22</td></tr><tr><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">Solved to the end after using the triple</td><td style="padding:8px 10px;border-bottom:1px solid var(--rule, #ddd);vertical-align:top;">2 of 22</td></tr></tbody></table></div>

Two things stand out. First, the move is uncommon: the solver got stuck on 1,124 boards, and a useful hidden triple was there at that point on only 22. Second, every one of those 22 triples sat in a row, column or box with seven or eight open squares. With seven or eight open squares, the naked set on the other side of each triple was four or five squares wide, which is why the triple was the smaller thing to look for. Our own reading, not a tested result: part of the reason may be that this solver tries naked pairs and triples first, so a triple whose complementary naked set is that small would already have been found that way.

Our count has limits. We checked for a triple only at the first position where the solver could not move, and we counted the first triple found on each board, so these numbers describe these 3,000 boards rather than every Sudoku. The box, row and column split in particular may shift with a different search order.

How to scan for one, and mistakes that break it

Pick a row, column or box with many open squares, since that is where our 22 triples turned up. For each missing digit, list the squares where it can go, as in the second table. Throw out digits with four or more homes. From the rest, look for three digits whose squares, taken together, come to exactly three squares.

If you find only two digits sharing two squares, that is a hidden pair, and you can use it the same way. If three digits come to four squares, there is no triple, and nothing can be crossed out.

The most common slip is crossing out the wrong candidates. A hidden triple removes the other digits from the three squares; it does not remove 1, 4 or 9 from anywhere. The second is missing a stray mark. If row 5 of our column had also listed a 4, as a made-up case, the 4 would have four squares to choose from and there would be no triple at all. Keep your pencil marks current before you start, or turn on auto-notes on the Sudoku page to practise the digit scan on a full set of marks.

Finally, try the easy moves first. A useful hidden triple turned up on only 22 of our 3,000 boards, so check singles, pairs and locked candidates before you start tracing three digits at once. Our sudoku patterns page shows which moves come up most.

Questions

What is the difference between a hidden triple and a naked triple?

Naked means the squares are bare: three squares that, taken together, list only three digits. Hidden means three digits are confined to three squares, and those squares can carry extra marks. Source: HoDoKu, Naked Subsets guide.

Does each square need all three digits?

No. The squares may show two of the digits each, for example 4 and 8, 4 and 9, then 8 and 9; what matters is the total. Source: SudokuWiki, Hidden Candidates page.

What does a hidden triple remove?

Just the extra marks sitting in those squares. Nothing outside them changes, because the three digits were already missing from the rest of the house. Source: HoDoKu, Hidden Subsets guide.

Is there a hidden quad?

Yes, four digits in four squares. HoDoKu calls hidden quadruples relatively seldom and very hard to spot without pencil marks. Source: HoDoKu, Hidden Subsets guide.

Sources