Lesson 8 of 8

X-Wing

An X-Wing is a digit that can go in only two cells of one row, and only two cells of another row, with both pairs sitting in the same two columns. Wherever the digit lands in the first row, it takes one of those two columns, so the second row is forced into the other. Every remaining cell in both columns can be cleared.

Level
Advanced

The pattern

What it does.

The four cells form a rectangle, and the digit has to occupy two opposite corners of it. Which pair of corners isn't yet known, and doesn't need to be: either way, both columns are spent.

The same argument runs with rows and columns swapped, which is what makes the pattern worth scanning for in both directions. It's the first technique in the lessons that needs you to follow a single digit across the whole grid.

Example

A worked example.

X-Wing: the pattern is highlighted, and the candidates it removes are crossed out. 49 givens.
  1. Follow one digit

    Pick a digit and look for rows where it has exactly two possible cells left. Two homes in a row is the shape to hunt for, so work digit by digit rather than cell by cell.

  2. Find a matching pair of rows

    Compare two of those rows. If their two cells sit in the same two columns, you have the rectangle. If the columns differ, keep looking.

  3. Read the four corners

    The digit must appear once in each row, and the two rows can't share a column, so the four cells resolve into one of two diagonals. You don't need to know which.

  4. Clear both columns

    Remove the digit from every other cell in those two columns. The two cells of the rectangle keep it; everything else in the columns loses it.

Spotting it

How to spot it.

  • Scan for the digit, not for the cell. An X-Wing is invisible from any single cell, because each of the four cells looks unremarkable on its own.
  • A digit with only two possible cells in several rows is the strongest signal. Nearly finished rows give you the pairs for free.
  • Remember to try it the other way round, with two columns that each have two homes in the same two rows.

Where it stops working

An X-Wing never places a digit, so the columns it clears have to be useful somewhere else: the eliminations should leave a single candidate, a pair or a locked candidate behind, or the pattern was correct but unhelpful. It also needs a complete candidate list. A third possible cell for the digit in either row means there's no X-Wing, and the eliminations would be wrong.

Keep going

Related topics.

New to sudoku? The rules take two minutes to read, and the first-puzzle walkthrough covers the basics that come before any of these.

Practice it in Sudoku Mori.

X-Wing is lesson 8 in the game, with a worked example and three practice puzzles. Lesson puzzles are separate from your daily ones, and you can redo any lesson whenever you like.