Unique Rectangle
A Unique Rectangle is a uniqueness technique: it relies on the fact that a proper Sudoku has exactly one solution. Four empty cells at the corners of a rectangle, in two rows, two columns and exactly two boxes, can never be filled with just two digits A and B, because A and B could then be swapped in all four corners and the puzzle would have two solutions. So when three corners have exactly the candidates A and B and the fourth has A, B and more, the fourth corner cannot be A or B, and both are removed from it. This page explains Type 1, the form the Bare Sudoku solver uses. The argument is valid because every Bare Sudoku puzzle is checked to have exactly one solution.
When to use it
When three corners of a rectangle are down to the same two candidates and the simpler patterns find nothing. Unique Rectangles are rare: only a small share of Bare Sudoku puzzles need one. They need complete notes, at least for the four corners.
How to spot it
Look for two cells in the same row with exactly the same two candidates, then for a third cell with that pair in the column of one of them. The fourth corner completes the rectangle. Check that the four cells lie in exactly two boxes and that the fourth corner has the pair plus at least one other candidate; then remove the pair from it. A rectangle spread over four boxes proves nothing, because swapping its digits would break the boxes.
Example
| c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | |
|---|---|---|---|---|---|---|---|---|---|
| r1 | 24 | 5 | 8 | 1 | 6 | 9 | 27 | 3 | |
| r2 | 7 | 1 | 9 | 3 | 2 | 4 | 68 | 56 | 58 |
| r3 | 24 | 6 | 3 | 5 | 8 | 7 | 1 | 9 | 24 |
| r4 | 9 | 4 | 6 | 7 | 5 | 3 | 28 | 12 | 128 |
| r5 | 3 | 7 | 2 | 8 | 1 | 6 | 5 | 4 | 9 |
| r6 | 1 | 8 | 5 | 4 | 9 | 2 | 3 | 7 | 6 |
| r7 | 5 | 2 | 7 | 6 | 4 | 1 | 9 | 8 | 3 |
| r8 | 8 | 9 | 4 | 2 | 3 | 5 | 67 | 16 | 17 |
| r9 | 6 | 3 | 1 | 9 | 7 | 8 | 4 | 25 | 25 |
Bold digits are given, blue digits were placed while solving, small digits are candidates. Highlighted cells form the pattern, crossed-out candidates are removed, and a circled candidate is the digit to place.
- The empty cells r1c1, r1c9, r3c1, r3c9 are the corners of a rectangle in two rows and two columns, and they lie in exactly two boxes, 1 and 3.
- Three corners, r1c1, r3c1, r3c9, have exactly the candidates 2 and 4. The fourth corner, r1c9, has 2 and 4 plus 7.
- If r1c9 were 2 or 4, all four corners would hold only 2 and 4, and swapping the two digits in them would give a second solution. Every Bare Sudoku puzzle has exactly one solution, so this cannot happen.
- So r1c9 is neither 2 nor 4. Remove 2 and 4 from r1c9; it keeps 7.
Common mistakes
- Using a rectangle whose corners lie in four boxes. Swapping the digits would then break the boxes, so there is no second solution to avoid and nothing to remove.
- Removing the pair from the three corners that hold only it. The eliminations happen only in the fourth corner, the one with extra candidates.
- Using the technique on a puzzle that may have more than one solution. It relies on uniqueness; Bare Sudoku checks every puzzle for exactly one solution, but a puzzle from elsewhere may not be checked.
In Bare Sudoku
Needed from level: Expert
In the game, the hint says: Unique Rectangle
Frequently asked questions
What is a Unique Rectangle in Sudoku?
A pattern of four empty cells at the corners of a rectangle in two rows, two columns and two boxes. If three corners hold only the candidates A and B, the fourth corner cannot be A or B, because otherwise the puzzle would have two solutions, so A and B are removed from it.
Why is it safe to rely on uniqueness?
Because a proper Sudoku has exactly one solution, and Bare Sudoku checks that every puzzle it generates has exactly one. If the four corners held only A and B, swapping them would give a second solution, which cannot exist, so the fourth corner must take another digit.
Which type of Unique Rectangle does Bare Sudoku use?
Type 1, described on this page: three corners with exactly the same two candidates and a fourth corner with those two plus others. Bare Sudoku also finds the other types, usually numbered 2 to 6, which use extra candidates in two or more corners or strong links between them, and the Hidden Rectangle.
What is a deadly pattern?
Four corners of a rectangle in two rows, two columns and two boxes that hold the same two digits crosswise. The digits could be swapped without breaking any rule, so a puzzle with one solution never ends up with one. Unique Rectangles remove the candidates that would create it.
Previous technique: W-WingAll techniquesNext technique: Finned X-Wing