X-Wing Sudoku Technique
The step where Sudoku stops being local. Everything before this works inside one unit; the X-Wing needs four cells in four different ones.
Also called: x wing, double line, rectangle elimination.
What an X-Wing is
Pick a digit. Find two rows in which that digit has exactly two possible cells, and where both rows use the same pair of columns. The four cells form the corners of a rectangle.
Whichever way it resolves, the digit ends up on one diagonal of that rectangle — top-left with bottom-right, or top-right with bottom-left. Either way, both columns are used.
Since both columns are already spending their copy of the digit inside the rectangle, the digit can be removed from those two columns everywhere else in the grid.
The pattern works identically with rows and columns swapped: two columns with two candidates each, sharing two rows, eliminate along the rows.
How to spot one
- Go digit by digit, not cell by cell. For one digit, note every row where it has exactly two homes left.
- Compare those rows pairwise and check whether any two share their column pair. That comparison is the whole search.
- Then repeat the sweep with columns. A grid often contains a column X-Wing and no row one.
Worked example
| Digit 4 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|
| Row 1 | × | ||||||||
| Row 2 | × | ||||||||
| Row 3 | 4 | 4 | |||||||
| Row 4 | |||||||||
| Row 5 | × | × | |||||||
| Row 6 | × | ||||||||
| Row 7 | |||||||||
| Row 8 | 4 | 4 | |||||||
| Row 9 | × |
4 marks a cell where the digit can still go. × marks a candidate this technique removes. Blank cells are not part of the pattern.
- Row 3 can take its 4 only at column 2 or column 7. Row 8 is in exactly the same position.
- If row 3 puts its 4 in column 2, row 8 is forced into column 7, and the other way round. Both columns are consumed either way.
- Every other 4 in columns 2 and 7 can therefore be struck — six eliminations here, across rows 1, 2, 5, 6 and 9.
What it eliminates
The digit, from both columns of the rectangle in every row other than the two that formed it (or from both rows, for the column-based version).
When you need it
Around the Hard boundary, near 34 clues and below. It is the usual answer when pairs, triples and locked candidates have all been exhausted and the grid still will not move.
Difficulty here is set by how many clues are left in the grid: Easy starts from 46, Medium 40 and Hard 34, with Extreme and Insane stripped further still. Fewer clues is what makes the techniques below necessary — the fewer digits you start with, the deeper you have to reason.