SudokuHint

Unique Rectangle: A Sudoku Uniqueness Strategy

A Unique Rectangle in Sudoku is a pattern of four cells forming a rectangle that, if completed, would create a puzzle with two valid solutions. Candidates that would complete this ambiguous rectangle can be eliminated based on the fundamental rule that a proper Sudoku puzzle has exactly one solution. This advanced solving strategy uses the puzzle's inherent uniqueness as a tool, allowing you to make logical deductions that would be impossible if you considered only the standard row, column, and box constraints. While not a standard rule-based technique like an [X-Wing](/techniques/x-wing), it is a powerful logical argument for cracking very difficult puzzles. Mastering this concept is a key step in [how to solve hard Sudoku](/blog/how-to-solve-hard-sudoku) puzzles that resist other methods.

By SudokuHint TeamLast updated

The Uniqueness Principle: The Foundation of the Strategy

All valid, well-formed Sudoku puzzles are designed to have one and only one solution. This is not just a convention; it is a core property that solvers can rely on. The Unique Rectangle technique turns this property into an active solving tool. The logic is deductive: if placing certain digits would create a scenario where the puzzle could be solved in two different ways, then that placement must be wrong, because the correct puzzle has a single solution. This principle applies only to the original puzzle's solution. It does not apply to solving steps or intermediate states, nor does it apply to invalid or poorly constructed puzzles. For the strategy to be safe, you must be confident you are solving a proper, single-solution puzzle.

What is a Deadly Rectangle?

A Deadly Rectangle is the potential pattern that the Unique Rectangle strategy prevents. It consists of four cells that occupy the intersection of two rows and two columns. Crucially, these four cells must be spread across only two 3x3 boxes (forming a rectangle, not a square). In each of these four cells, the only possible candidates are the same two digits (e.g., 7 and 9).

If this pattern were allowed to exist in the final solution, a deadly problem arises. You could swap the two digits (all the 7s for 9s and vice versa) within those four cells, and the puzzle would still satisfy all Sudoku rules—rows, columns, and boxes would still contain one of each digit. This would create two valid solutions, violating the uniqueness principle. Therefore, a true Deadly Rectangle cannot be the correct solution to a proper puzzle. The Unique Rectangle strategy identifies early warning signs of this pattern and eliminates candidates to break it.

Why a Deadly Rectangle Cannot Exist

The impossibility of a Deadly Rectangle is a direct consequence of the puzzle's single-solution guarantee. Consider a completed puzzle grid. If it contained a rectangle of four cells across two rows, two columns, and two boxes, all containing only the pair {5,8} in some arrangement, the entire puzzle would be ambiguous. Swapping 5 and 8 in just those four cells would produce a second, equally valid grid. Since the puzzle author intended one solution, the solving path that leads to this ambiguous rectangle must contain an error. The Unique Rectangle technique works by spotting the formation of this rectangle in its incomplete, candidate stage and removing the candidate or making the placement that prevents the deadly, two-solution state from ever being reached.

Types of Unique Rectangles and Their Eliminations

There are several common subtypes of Unique Rectangles, categorized by how the extra candidates are distributed. Each type provides a specific logical path for an elimination.

**Type 1 (The Naked Subset Rectangle):** This is the simplest. Three of the four rectangle cells contain only the deadly pair {A,B}. The fourth cell contains the deadly pair {A,B} plus one or more extra candidates {X, Y...}. Since allowing the fourth cell to be either A or B would complete the Deadly Rectangle, it cannot be. Therefore, you can eliminate candidates A and B from that fourth cell, leaving only the extra candidates. For example, if three cells are {3,8} and the fourth is {3,8,5}, you eliminate 3 and 8, forcing a 5 in that cell.

**Type 2 (The Conjugate Pair Rectangle):** In this type, all four cells initially share the deadly pair {A,B}. However, in one of the two rows or columns that form the rectangle, the digit A (or B) is restricted to only those two rectangle cells. This creates a strong link or conjugate pair for A in that row/column. To avoid the Deadly Rectangle, at least one of the four cells must *not* be {A,B}. The only way out is if the digit from the conjugate pair (A) appears in one of the rectangle cells in that row/column. Consequently, you can eliminate the other deadly digit (B) from all cells in that row/column *outside* the rectangle, as B cannot occupy those rectangle cells if A is placed there.

**Type 3 (The Subset Rectangle):** This type involves using the extra candidates in the rectangle cells to form a naked subset (pair, triple) with other cells in a row or column shared by the rectangle. If the extra candidates in two rectangle cells, combined with one non-rectangle cell in their row, form a Naked Triple of digits {X,Y,Z}, then you can eliminate those digits from other cells in that row. The logic is complex: the deadly pair {A,B} cannot occupy both rectangle cells, so at least one must be from {X,Y,Z}, effectively making that set occupy three cells in the row.

**Type 4 (The Common Candidate Rectangle):** Here, the escape from the Deadly Rectangle is provided by a box constraint. If one of the two boxes containing the rectangle cells has one of the deadly digits (say, A) locked into the rectangle cells *within that box* (meaning A cannot go elsewhere in that box), then you can eliminate the other deadly digit (B) from the two rectangle cells in that box. This forces one of them to be A, breaking the deadly pattern.

  • Always verify the rectangle is across two rows, two columns, and exactly two boxes before applying the rule.
  • Type 1 is the most common and easiest to spot. Look for a rectangle where three corners are a bi-value pair.
  • Uniqueness strategies are a last resort. Always look for standard techniques like Y-Wing first.
Key insight: The core logic is always the same: identify the potential for a two-solution Deadly Rectangle and make the move that guarantees the puzzle remains unique.

When is it Safe to Use Uniqueness Strategies?

The Unique Rectangle technique is perfectly logical and safe, but with one critical assumption: you are solving a well-formed puzzle that has a single, unique solution. This is almost always true for puzzles from reputable sources, books, competitions, and major newspapers. The strategy is considered standard for solving very hard and expert-level puzzles. You should avoid using uniqueness-based deductions if you are solving a puzzle that might be invalid, such as a randomly generated grid or a puzzle you created yourself that may have multiple solutions. In those cases, the foundational principle does not hold. For all standard solving, however, recognizing a Unique Rectangle is a powerful and valid way to break a stubborn logjam.

Key Facts

  • A Unique Rectangle is a solving technique that uses the rule that a proper Sudoku puzzle must have exactly one solution.
  • The pattern involves four cells forming a rectangle across two rows, two columns, and two 3x3 boxes.
  • A 'Deadly Rectangle' occurs if these four cells contain only the same two candidate digits in the final solution, creating ambiguity.
  • Because a Deadly Rectangle would permit two valid solutions, it cannot be correct in a well-formed puzzle.
  • Unique Rectangle Type 1 eliminates the deadly pair candidates from a cell that has extra candidates.
  • Unique Rectangle Type 2 uses a conjugate pair in a row or column to eliminate one of the deadly digits elsewhere in that line.
  • The technique is only valid when applied to puzzles known to have a single, unique solution.
  • Spotting a Unique Rectangle often provides the key deduction needed to solve very difficult Sudoku puzzles.

Frequently Asked Questions

Is the Unique Rectangle technique cheating?

No. It is a standard advanced technique based on the logical premise of a puzzle's unique solution. It is widely used in competitive solving and for cracking the hardest published puzzles.

Can I use Unique Rectangles on any Sudoku puzzle?

Only on puzzles guaranteed to have one solution, like those from reputable sources. Avoid it on random or potentially invalid puzzles where the uniqueness principle may not hold.

What's the difference between Type 1 and Type 2 Unique Rectangles?

Type 1 has one cell with extra candidates; you eliminate the deadly pair from it. Type 2 uses a conjugate pair in a row/column to eliminate one deadly digit from other cells in that line.

Do I need to assume uniqueness to solve Sudoku?

No. Basic and intermediate techniques never use it. Uniqueness strategies are optional advanced tools for puzzles that resist all standard logical methods.