Sudoku Solver

Extreme

Aligned Pair Exclusion

A strategy that eliminates candidates by analyzing all possible combinations of values for two cells and excluding impossible ones.

Aligned Pair Exclusion (APE) is an expert strategy that works by "exhausting possibilities." Instead of finding where a number must go, it proves that certain combinations of numbers in two cells are impossible because of their shared neighbors.

If a candidate in one of the cells is only part of "impossible" combinations, that candidate can be safely eliminated.

Interactive Example

1 2 3 4 5 6 7 8 9
1
1 2 3 4 5 6 7 8 9
6
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
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
8
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 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
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
5
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
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
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
7
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
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
3
1 2 3 4 5 6 7 8 9
6
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
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
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
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
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
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
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
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
7
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

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

Real Example Walkthrough

In the puzzle above, APE targets Row 2 Column 8 (R2C8).

1. The Aligned Pair We focus on two cells in Box 3: - R2C8 (Candidates: {3, 4, 9}) - R3C8 (Candidates: {4, 7, 9}) These two cells align in the same column and box.

2. The Excluder Cells We look at neighbors that "see" both cells or specific candidates in them. - R4C8, R8C8 (in the same column) - R1C9, R2C7, R2C9 (in the same box/row)

3. The Logic: Testing Combinations We list every possible pair of values for {R2C8, R3C8}: - (3,4), (3,7), (3,9) - (4,4) - Impossible (same digit in unit) - (4,7), (4,9) - (9,4), (9,7), (9,9) - Impossible

Now we check against the Excluders. If we try to put a 3 in R2C8, we must pair it with 4, 7, or 9 in R3C8. - Case (3, 7): Check excluders. If R2C7=7 or R1C9=7, this might be blocked. - Case (3, 4): Check excluders. - Case (3, 9): Check excluders.

The solver determined that EVERY combination involving 3 in R2C8 leads to a clash with the fixed values or strong links in the excluder cells. - Specifically, the surrounding cells force situations where R2C8 and R3C8 cannot validly hold the 3-combination.

4. The Elimination Since 3 cannot be part of any valid pair combination for these two cells, it is removed from R2C8.

How to Spot It

  1. Find Bivalue/Trivalue Clusters: Look for two cells in the same box (and ideally same row/col) that have limited candidates (2 or 3 each).
  2. Look for "Almost" Sets: The cells usually have candidates that are also present in the surrounding peers.
  3. Mental Check: Ask, "If this cell is X, can the other cell be Y?" If surrounding cells block Y when this is X, that combination is dead.

Visual Guide

``` Box 3 Focus: [Excl] [Excl] [Excl] [Pair] [Excl] [Pair] [Excl]

Excluders "attack" the combinations allowed in the Pair. ```

Comparison Table

Strategy Focus Logic Type Complexity
Naked Pair 2 cells, same unit Candidates match exactly Easy
ALS-XZ 2 Sets of cells Restricted Common Candidate Hard
APE 2 cells, any unit Combinatorial Exclusion Expert

Common Mistakes

  • Overlooking Excluders: You must check all cells that see either of the pair cells.
  • Assuming Candidates: Ensure you only eliminate candidates that fail in all possible combinations. If even one combination works (e.g., 3 is possible with 7), you cannot eliminate 3.

  • Unique Rectangle: Uses pair logic to avoid deadly patterns.