Advanced technique

XY-Wing (Y-Wing)

An XY-Wing uses three squares with two candidates each: a pivot {X, Y} and two wings {X, Z} and {Y, Z}. Whatever the pivot is, one wing becomes Z, so any square that sees both wings cannot be Z.

What is a xy-wing?

Find a pivot with candidates X and Y. Find a wing it can see with X and Z, and another wing it can see with Y and Z. If the pivot is X, the first wing is Z; if the pivot is Y, the second wing is Z. Every square that sees both wings loses Z.

Example

The pivot at row 1, column 8 is 1 or 8. Its wings at row 5, column 8 {1, 5} and row 4, column 8 {5, 8} share the digit 5. One wing must be 5, so 5 can be removed from row 4, column 7, which sees both wings.

Sudoku practice board. Rows and columns are numbered from the top left.
Row 1, column 1: 6
Row 1, column 2: empty
Row 1, column 3: empty
Row 1, column 4: empty
Row 1, column 5: empty
Row 1, column 6: 2
Row 1, column 7: 4
Row 1, column 8: candidates 1, 8
Row 1, column 9: empty
Row 2, column 1: empty
Row 2, column 2: 2
Row 2, column 3: 1
Row 2, column 4: empty
Row 2, column 5: empty
Row 2, column 6: empty
Row 2, column 7: empty
Row 2, column 8: empty
Row 2, column 9: 5
Row 3, column 1: empty
Row 3, column 2: 9
Row 3, column 3: empty
Row 3, column 4: empty
Row 3, column 5: empty
Row 3, column 6: empty
Row 3, column 7: empty
Row 3, column 8: 3
Row 3, column 9: empty
Row 4, column 1: empty
Row 4, column 2: empty
Row 4, column 3: 7
Row 4, column 4: empty
Row 4, column 5: 1
Row 4, column 6: empty
Row 4, column 7: candidates 2, 3, 5, 8
Row 4, column 8: candidates 5, 8
Row 4, column 9: 6
Row 5, column 1: empty
Row 5, column 2: 8
Row 5, column 3: empty
Row 5, column 4: 6
Row 5, column 5: empty
Row 5, column 6: 3
Row 5, column 7: empty
Row 5, column 8: candidates 1, 5
Row 5, column 9: empty
Row 6, column 1: empty
Row 6, column 2: empty
Row 6, column 3: empty
Row 6, column 4: empty
Row 6, column 5: 2
Row 6, column 6: 8
Row 6, column 7: empty
Row 6, column 8: 9
Row 6, column 9: empty
Row 7, column 1: empty
Row 7, column 2: 6
Row 7, column 3: empty
Row 7, column 4: empty
Row 7, column 5: empty
Row 7, column 6: empty
Row 7, column 7: 1
Row 7, column 8: 2
Row 7, column 9: empty
Row 8, column 1: 2
Row 8, column 2: empty
Row 8, column 3: empty
Row 8, column 4: empty
Row 8, column 5: 9
Row 8, column 6: empty
Row 8, column 7: empty
Row 8, column 8: 4
Row 8, column 9: empty
Row 9, column 1: 1
Row 9, column 2: 4
Row 9, column 3: 8
Row 9, column 4: empty
Row 9, column 5: empty
Row 9, column 6: empty
Row 9, column 7: empty
Row 9, column 8: 7
Row 9, column 9: empty

Target square: row 4, column 7. Remove candidate 5.

Pattern squares: row 1, column 8; row 5, column 8; row 4, column 8.

The pivot r1c8 has candidates 1 and 8. Either pivot choice forces 5 into one of the wings at r5c8 and r4c8. r4c7 sees both wings, so it cannot contain 5.

Small numbers are the candidates of the squares used in this step.

How to find it, step by step

  1. Look for squares with exactly two candidates.
  2. Pick one as the pivot, with candidates X and Y.
  3. Find a wing that shares a unit with the pivot and has X plus a new digit Z.
  4. Find a second wing that shares a unit with the pivot and has Y and the same Z.
  5. Remove Z from any square that shares a unit with both wings.

Why it works

The pivot must be X or Y. If it is X, the first wing cannot be X, so it is Z. If it is Y, the second wing is Z. One of the wings is always Z, so a square that sees both can never be Z.

Common mistakes

  • Choosing wings that do not share a unit with the pivot.
  • Using wings whose shared digit Z is different.
  • Removing Z from squares that see only one wing.

Questions

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

Yes. Both names describe the same pattern of a pivot and two wings, each with two candidates.

What is an XYZ-Wing?

An XYZ-Wing is a variation where the pivot has three candidates X, Y and Z. Only squares that see the pivot and both wings can lose Z.

Try it yourself

Work through guided exercises built around this technique, or use it in today's daily Sudoku.

All Sudoku techniques