What is an XY-Wing in sudoku?

An XY-Wing is a three-cell pattern. A middle cell with two candidates, X and Y, sees two wing cells: one holds X and Z, the other Y and Z. Whatever the middle cell turns out to be, one of the wings becomes Z. So any cell that sees both wings cannot be Z, and you erase that candidate.

Players also call it the Y-Wing, and the cells pivot and pincers. Despite the name it has nothing to do with the X-Wing. This guide explains the logic, walks through a real puzzle where an XY-Wing removes the 8 from two cells and places a 9, compares it with the XYZ-Wing, and gives you a routine for finding it.

1122334455667788992457359798611985746325763578215749426575878913573912486819634275279681475263287568216835694356842689891758
  • Pattern
  • Removed candidate
Whatever row 8, column 7 becomes, one wing is 8, so the 8 goes from row 9, columns 5 and 6.

The logic in plain words

Everything in an XY-Wing happens in cells with exactly two candidates. Call the middle cell's candidates X and Y. It has two choices, and each choice sets off one wing:

  • If the middle cell is X, the wing that holds X and Z can't be X any more (they see each other), so that wing is Z.
  • If the middle cell is Y, the wing that holds Y and Z can't be Y, so that wing is Z.

There is no third option. So in every case at least one wing is Z. A cell that sees both wings would clash with whichever wing holds the Z, so it cannot be Z. You don't need to know which wing it is.

The two wings don't have to see each other, and they usually don't. What matters is that each wing sees the middle cell, and the cell you clear sees both wings.

Worked example: clearing the 8

The diagram shows a real position with every candidate filled in. The three cells of the pattern are in the bottom right.

  • Step 1: find the middle cell. Row 8, column 7 holds only 5 and 6.
  • Step 2: find the two wings. Row 9, column 9 holds 5 and 8; it sees the middle cell because both are in box 9. Row 8, column 5 holds 6 and 8; it sees the middle cell because both are in row 8. Each wing shares one digit with the middle cell (5 or 6), and both wings share the 8.
  • Step 3: follow both cases. If row 8, column 7 is 5, then row 9, column 9 can't be 5, so it is 8. If row 8, column 7 is 6, then row 8, column 5 can't be 6, so it is 8. Either way, one wing holds the 8.
  • Step 4: clear the cells that see both wings. Row 9, column 5 and row 9, column 6 see row 9, column 9 through row 9, and row 8, column 5 through box 8. Both lose their candidate 8.
  • Step 5: collect the payoff. Row 9, column 6 had only 8 and 9, so it is now a 9. Row 9, column 5 drops from 6, 8, 9 to 6 and 9.

The board is a real Classic puzzle from Sudoku by Joseph, where Classic has six levels from Casual to Diabolic.

XY-Wing vs XYZ-Wing

The XYZ-Wing is the same idea with a busier middle cell. The middle cell holds three candidates, X, Y and Z, and the wings again hold X and Z, and Y and Z. Now the middle cell itself might be Z, so there are three cases, and in each one of the three cells is Z: the middle cell or one of the wings.

That changes where you can erase. In an XY-Wing you clear Z from cells that see both wings. In an XYZ-Wing you clear Z only from cells that see all three cells, middle and both wings. Since a wing that shares a box with the middle cell is needed for that, XYZ-Wing eliminations are rarer, usually one or two cells inside that box.

Both belong to a wider family of bent sets and short chains. If you like the XY-Wing's "either way" reasoning, the Skyscraper uses the same idea on a single digit.

Common mistakes

  • Wings that don't see the middle cell. Each wing must share a row, column or box with the middle cell. Otherwise the middle cell's choice doesn't force anything.
  • Cells with extra candidates. All three cells must hold exactly two candidates. A wing with 5, 7 and 8 isn't forced to be 8 when the 5 is gone.
  • Clearing a cell that sees only one wing. The target must see both wings. A cell next to just one of them keeps its Z.
  • Erasing the wrong digit. Only Z, the digit the two wings share, is removed. X and Y stay wherever they are.

How to spot an XY-Wing

  1. Mark the two-candidate cells

    An XY-Wing is built only from cells with exactly two candidates. On a full set of pencil marks they are easy to pick out.

  2. Try each as the middle cell

    For a cell with X and Y, look in its row, column and box for two-candidate cells that hold X plus something, and Y plus something.

  3. Check the shared third digit

    If one of those cells holds X and Z and another holds Y and Z, with the same Z, you have an XY-Wing.

  4. Find the cells that see both wings

    Look where the wings' rows, columns and boxes overlap. Remove Z from every cell there, then check for new singles.

Frequently asked questions

Is the XY-Wing the same as the Y-Wing?

Yes. XY-Wing and Y-Wing are two names for the same pattern. The middle cell is also called the pivot or hinge, and the wings are called pincers.

Do the two wings have to see each other?

No. They only need to see the middle cell. In the example, the wings sit in row 9, column 9 and row 8, column 5, which share no row, column or box.

Is the XY-Wing related to the X-Wing?

Only by name. The X-Wing is a one-digit pattern across two rows and two columns. The XY-Wing is a three-cell pattern built on two-candidate cells.

Find XY-Wings on real puzzles

12 variants, a Daily Challenge with streaks — and never any lives, coins or energy bars. The download is free.