Sudoku unique rectangle: the uniqueness-based elimination
Most sudoku techniques work by figuring out where a digit must go. The unique rectangle works backwards: it figures out where a digit can’tgo by exploiting the fact that a well-formed sudoku has exactly one solution. It’s one of the more elegant advanced techniques, and once you see it, you’ll spot it on most Expert puzzles.
The setup
A unique rectangle (UR) involves four cells arranged in a rectangle:
- Two rows, call them
rAandrB. - Two columns, call them
cXandcY. - The four cells at the intersections — (rA,cX), (rA,cY), (rB,cX), (rB,cY) — span only two 3×3 boxes. That’s the critical constraint.
The four cells must share their candidates from a set of two digits, call them {a, b}. In the purest form, all four cells have exactly the candidates {a, b}.
The deadly pattern
Suppose all four cells of the rectangle had exactly the candidates {a, b} and nothing else. What happens?
You could solve it two ways. Either:
- Diagonal A:
aat (rA,cX) and (rB,cY), withbat (rA,cY) and (rB,cX). - Diagonal B: the swap —
bat (rA,cX) and (rB,cY), withaat (rA,cY) and (rB,cX).
Both diagonal arrangements satisfy every row, column, and box constraint. The rest of the grid has no way to tell them apart — they’re isomorphic. So the puzzle would have two valid solutions.
That can’t happen. A well-formed sudoku has exactly one solution by definition. So the pure-rectangle candidate distribution must be impossible. That’s the “deadly pattern” — and it’s the hook for the technique.
Type 1: the strongest case
The simplest unique rectangle appears when three of the four cells have exactly the candidates {a, b} and the fourth cell has those two candidates plus extras — say {a, b, c, e}.
If the fourth cell resolved to either a or b, you’d be back to the deadly pattern. So the fourth cell cannot be a or b. Erase those two candidates from it, leaving {c, e}. That’s the elimination — and on a 2-extra-candidate cell like this, you may have just exposed a naked single.
Type 2: the slightly broader case
Now suppose three cells of the rectangle have exactly {a, b}, and the fourth has {a, b, c} — exactly one extra candidate. Same deadly-pattern argument: if c isn’t the answer in that cell, you’re back to the deadly pattern. So c must be the answer in that cell. Place it.
Even better, c is now committed to that cell, which means it can be eliminated from every other cell that sees it. A Type 2 UR is often a one-move puzzle-breaker on Expert difficulty.
Type 3 and beyond
Type 3 occurs when two cells in the rectangle have the base candidates plus extras — like two cells with {a, b, c} and {a, b, d} — and the other two are pure {a, b}. The extras form a virtual naked subset in their shared unit, allowing further eliminations.
Types 4, 5, and 6 (and Type 4's “hidden” cousins) layer on top of pointing logic and box-line reduction. They’re rarer and harder to spot manually; Types 1 and 2 cover 80%+ of UR opportunities that appear in published puzzles.
What it looks like on a real grid
The two-box constraint, restated
Why does the rectangle need to span exactly two boxes? Because if it spans four boxes (one corner in each), the rest of the boxes can constrain the diagonals differently. The deadly pattern argument relies on the row/column/box constraints not being able to distinguish the two diagonal arrangements — and that only works when the four cells live in two boxes.
The fast check: are the four candidate cells in two adjacent 3×3 boxes (horizontally or vertically), with two cells per box? If yes, the UR analysis applies. If the cells span four boxes, you’re looking at a different pattern (usually a fish or a chain).
When to use uniqueness techniques
Some solvers consider uniqueness-based techniques philosophically iffy — they depend on assuming the puzzle is well-formed rather than purely logical deduction from the grid. In practice every published sudoku iswell-formed (constructors enforce uniqueness), so it’s safe.
On Melio, every puzzle (Easy through Extreme) is uniqueness-checked before being served, so UR techniques are always valid. They’re primarily useful on Expert and Extreme — Easy and Medium puzzles don’t require them.
Scan pattern:
- Find two bivalue cells in the same row sharing the same two candidates.
- Check the same column-pair for matching cells in another row.
- If you find three matching corners and a near-match fourth corner — that’s your UR.
- Confirm the four cells span only two boxes.
Why it matters
The UR is the technique that finally separates strong Expert solvers from solvers who get stuck. It’s not a pattern-matching technique like X-wing; it’s a constraint-meta-reasoning technique. Internalize it and you’ll:
- Crack Expert puzzles that resist X-wing and Y-wing.
- Read other people’s solve walkthroughs without getting lost when they invoke uniqueness.
- Build the mental habit of reasoning about the puzzle as a whole, not just individual cells, which is a prerequisite for harder advanced techniques (forcing chains, almost-locked sets, Aligned Triple Exclusion).