Settings

Colours
Text size
Mistakes
Timer

Imir as Gaeilge

Learn

XY-wing

What it is

The XY-wing uses three cells, each with exactly two candidates. One cell is the pivot. The other two are the wings (some books call them pincers). The pattern looks like this:

  • The pivot has candidates X and Y.
  • One wing has candidates X and Z, and shares a row, column or box with the pivot.
  • The other wing has candidates Y and Z, and also shares a row, column or box with the pivot.

Here X, Y and Z just stand for three different digits.

Whatever the pivot turns out to be, one of the wings must be Z. So any cell that can see both wings (shares a unit with each of them) cannot be Z, and you can remove Z from it.

It is sometimes called a Y-wing. Same pattern, different name.

How to spot it

You need full pencil marks, and you are looking at cells with exactly two candidates.

  1. Pick a two-candidate cell as a possible pivot. Say it has 3 and 7.
  2. Look at the cells it can see (its row, column and box) for another two-candidate cell containing one of its digits plus a new one, such as 3 and 9.
  3. Look for a third two-candidate cell the pivot can see, containing the pivot’s other digit and the same new digit: here, 7 and 9.

If you find all three, look for cells that see both wings and have the shared digit (here 9) as a candidate.

A worked example

Here is the situation:

  • The pivot is at row 2, column 2, with candidates 3 and 7.
  • Wing one is at row 2, column 7, with candidates 3 and 9. It shares row 2 with the pivot.
  • Wing two is at row 6, column 2, with candidates 7 and 9. It shares column 2 with the pivot.

Now reason it through:

  • If the pivot is 3, wing one cannot be 3 (same row), so wing one is 9.
  • If the pivot is 7, wing two cannot be 7 (same column), so wing two is 9.

The pivot must be 3 or 7, so one of the two wings is definitely 9. We just do not know which.

Now look at row 6, column 7. It shares row 6 with wing two and column 7 with wing one. Whichever wing is 9, this cell can see it. So row 6, column 7 cannot be 9.

If that cell had candidates 1, 4 and 9, remove the 9 and you are left with 1 and 4.

Where to look for eliminations

The cells that see both wings depend on where the wings are. When the wings are in different rows, columns and boxes, as in the example, there is usually just one such cell: the fourth corner of a rectangle. When one wing shares a box with the pivot, there can be several cells that see both wings. Check them all.

A common mistake

The pivot must see both wings, but the wings do not need to see each other. People sometimes reject a perfectly good XY-wing because the wings are far apart. That is fine.

The bigger mistake is removing Z from cells that see only one wing. A cell that shares a row with wing one but nothing with wing two could still be 9, if wing two turns out to be the 9. Only cells that see both wings are safe to clear.

Also, all three cells must have exactly two candidates. If the pivot has a third candidate, you may be looking at an XYZ-wing instead.

When you will need it

The XY-wing is one of the techniques added at Expert level on sudoku.ie, along with the XYZ-wing and the swordfish. You will need it for some Saturday puzzles. It is often the move that breaks open an Expert grid when everything else has stalled.