Strategy · Sudoku

X-Wing

Fish · Two rows, the same two columns

Learn it here, then practice it in Sudoku by DvalinIts hints keep teaching as you play: where to look, which technique to use, and why it works.

In short: when a number can go in only two cells in each of two rows, and those four cells line up in the same two columns, the number must land on opposite corners of that rectangle. That means it can't go anywhere else in those two columns.

When you need it

Most puzzles at the easier levels can be finished with singles alone. In harder puzzles you reach a point where every number has at least two possible places, no cell is down to one number, and pairs and pointing don't move anything either. X-Wing is often the first technique that breaks that kind of logjam. It never fills in a number by itself. Instead, it removes a number from your notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks., and that removal usually opens up a single somewhere nearby.

Because X-Wing works entirely with notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks., it only works if your notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks. are complete and correct. If you've been filling in notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks. by hand, take a moment to check them before you go looking for one.

The pattern

Pick one number. Look for two rows where that number has exactly two possible cells. If those two pairs of cells sit in the same two columns, the four cells form the corners of a rectangle. That rectangle is the X-Wing.

The same pattern works with rows and columns swapped: two columns where a number has exactly two spots each, lined up in the same two rows. The logic and the result are the same, just turned on its side.

Why it works

Every row needs the number once. The top row of the rectangle can only put it in its left corner or its right corner, and the same goes for the bottom row. That leaves just two possibilities:

It can't be top-left and bottom-left, because the two would share a column. Whichever way it falls, the number ends up once in the left column and once in the right column, both times inside the rectangle. Each column needs the number only once, so no other cell in those two columns can hold it. You can remove it from their notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks., even though you don't yet know which diagonal is the right one.

A worked example

This is the board from the X-Wing lesson in Sudoku by Dvalin, with all of the notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks. filled in. Blue numbers have been placed by the player. Black numbers were given at the start.

112233445566778899156164393981527931572615482785416936742678123937585367921417129235483764812712962735293925482576115671261256712393923574829
Step 1. Look at the number 2. In row 4 it can go only in columns 3 and 6, and in row 8 it can also go only in columns 3 and 6. Those four cells, in gold, are the corners of an X-Wing.

Row 4 has to put its 2 in column 3 or column 6. So does row 8. Whichever way it works out, columns 3 and 6 each get their 2 from rows 4 and 8.

112233445566778899156164393981527931572615482785416936742678123937585367921417129235483764812712962735293925482576115671261256712393923574829
Step 2. Columns 3 and 6 are now spoken for, so the 2s in the red cells, in rows 7 and 9 of those columns, can be removed from the notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks..

With those 2s gone, look at the cells they came from. The cell in row 7, column 6 had only 2 and 7 left, so now it must be 7, and the puzzle moves again. That's typical: the X-Wing itself only removes notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks., and the payoff is the single it uncovers.

How to spot one

  1. Go one number at a time. X-Wings are about a single number, so scan for 1s, then 2s, and so on, rather than looking at the whole board at once.
  2. Find rows with exactly two spots. For the number you're checking, note every row where it has only two possible cells. Skip rows where it's already placed.
  3. Compare their columns. If two of those rows use the same pair of columns, you've found an X-Wing.
  4. Check that it does something. Look up and down the two columns. If the number appears in the notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks. of any other cell there, those notesNotes The small numbers in an empty cell showing what could still go there. Also called candidates or pencil marks. can go. If not, the X-Wing is real but doesn't help yet.
  5. Then turn it sideways. Repeat with columns that have exactly two spots, and compare their rows.

Numbers that have already been placed six or seven times are good places to start. With only a few copies left to place, they're more likely to be down to two spots in several rows.

Common mistakes

Practice it in Sudoku by DvalinSudoku by Dvalin's hints teach X-Wing the same way, one step at a time: where to look, the technique to use, then why it works. The built-in Help walks through this example on the real board.