Sudoku Solver

Expert

Unique Rectangle (Type 1)

Use the "Deadly Pattern" rule to eliminate candidates that would cause the puzzle to have two valid solutions.

Unique Rectangle (Type 1) is a "uniqueness" strategy. Unlike other strategies that use pure logic to find what must be true, this strategy uses the rules of Sudoku design to find what cannot be true.

The Golden Rule: A valid Sudoku puzzle must have exactly one unique solution.

If a pattern exists that would allow for two valid solutions, we know that pattern is impossible.

Interactive Example

1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
3
1 2 3 4 5 6 7 8 9
5
1 2 3 4 5 6 7 8 9
8
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
6
1 2 3 4 5 6 7 8 9
5
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
6
1 2 3 4 5 6 7 8 9
8
1 2 3 4 5 6 7 8 9
7
1 2 3 4 5 6 7 8 9
3
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
8
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
9
1 2 3 4 5 6 7 8 9
5
1 2 3 4 5 6 7 8 9
4
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
6
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
2
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
3
1 2 3 4 5 6 7 8 9
6
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
5
1 2 3 4 5 6 7 8 9
7
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
2
1 2 3 4 5 6 7 8 9
4
1 2 3 4 5 6 7 8 9
8
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
5
1 2 3 4 5 6 7 8 9
6
1 2 3 4 5 6 7 8 9
8
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
3
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
4
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
4
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
6
1 2 3 4 5 6 7 8 9
3
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
2
1 2 3 4 5 6 7 8 9
3
1 2 3 4 5 6 7 8 9
7
1 2 3 4 5 6 7 8 9
6
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9
9
1 2 3 4 5 6 7 8 9
8
1 2 3 4 5 6 7 8 9

Click "Apply Logic" to see the strategy in action.

The "Deadly Pattern"

Imagine four cells forming a rectangle (2 rows, 2 columns, within 2 boxes) that all contain the exact same pair, like {1, 2}.

  • R1C7: {1, 2}
  • R1C8: {1, 2}
  • R4C7: {1, 2}
  • R4C8: {1, 2}

If this state existed, you could swap the 1s and 2s diagonally and both arrangements would result in a valid Sudoku.

Since a proper Sudoku cannot have two solutions, this state (four identical bivalue cells in a rectangle) is called a Deadly Pattern. We must avoid it.

Real Example Explanation

In the example above:

  1. Three Floor Cells: Look at R1C7, R1C8, and R4C8. They contain only {1, 2}.
  2. The Target: Look at the fourth corner, R4C7 (highlighted).
    • It contains {1, 2} plus extra candidates.
  3. The Logic:
    • If R4C7 were reduced to just {1, 2}, we would create the Deadly Pattern—four identical bivalue cells forming a rectangle.
    • To prevent the Deadly Pattern, R4C7 CANNOT be 1 or 2.
    • It must be one of the "extra" candidates.
  4. The Elimination:
    • We remove 1 and 2 from R4C7.
    • This leaves only the extra candidates, breaking the deadly pattern.

How to Spot It

  1. Find a Pair: Look for two bivalue cells in the same row or column (the "Floor").
  2. Find a Third Corner: Look for another bivalue cell in the rectangle that matches the pair.
  3. Check the Fourth Corner:
    • Does it span exactly two boxes? (e.g. Columns 3 and 9 are in different boxes).
    • Does the fourth cell have the pair plus extra candidates?
  4. Eliminate: Remove the pair candidates from the fourth cell.

Related Strategies