XY-Wing

expert

The XY-Wing strategy involves three cells with 2 candidates each, forming a pattern where one cell (the pivot) shares a candidate with two others (the wings). If the pivot has candidates X and Y, and the wings have pairs XZ and YZ, the candidate Z can be eliminated from any cell that sees both wings.

XY-Wing is an effective strategy for eliminating candidates in Sudoku puzzles. Although considered advanced, it is relatively easy to spot. Sometimes referred to as Y-Wing, XY-Wing is a powerful tool for narrowing down possibilities.

What is XY-Wing?

  • Involves three cells and three different digits.
  • Each cell has two candidates from the three, distinct from the other two cells.
  • One cell (the pivot) sees the other two cells (the wings).
  • The two wing cells do not see each other.

In the image below, cells 1, 2, and 3 form an XY-Wing. They contain three digits: A, B, and C. Each cell has two different candidates:

  • Cell 1: A and B (pivot)
  • Cell 2: B and C
  • Cell 3: A and C

Cell 1 is the pivot, which sees both cells 2 and 3. Cells 2 and 3 do not see each other.

Once you spot an XY-Wing, you can eliminate the shared digit (digit C) from all cells that see both cells 2 and 3.

In the image below, cell 2 and cell 3 share digit C. We can eliminate C from all cells that see both cells 2 and 3 (highlighted in red).

Why is this true?

  • If cell 1 is A, cell 3 must be C.
  • If cell 1 is B, cell 2 must be C.

In either case, one of cells 2 or 3 must contain C, allowing us to eliminate C from all cells that see both cells 2 and 3.

XY-Wing Example 1

Example 1

In the image below, cells B9, H7, and I9 form an XY-Wing, with I9 as the pivot. The three digits are 1, 6, and 8, with each cell containing a unique pair of these digits.

  • I9 sees both B9 and H7.
  • B9 and H7 do not see each other.

Digit 1 is common between B9 and H7, meaning one of these cells must contain 1.

  • If I9 is 6, then B9 must be 1.
  • If I9 is 8, then H7 must be 1.

Thus, we can eliminate 1 from any cell that sees both B9 and H7. In this case, we can eliminate 1 from B7.

XY-Wing Example 2

Example 2

Cells A2, A5, and B4 form an XY-Wing, with A5 as the pivot. Either A2 or B4 must be 2. Therefore, we can eliminate 2 from all cells that see both A2 and B4 (highlighted in red).

XY-Wing Example 3

Example 3

In this example, the board includes the Diagonal variant, where each main diagonal must contain all digits from 1 to 9.

Cells F4, G3, and G7 form an XY-Wing, with G3 as the pivot. F4 and G3 see each other due to the Diagonal rule. Digit 3 is common between F4 and G7, meaning one of these cells must contain 3. We can eliminate 3 from all cells that see both F4 and G7 (highlighted in red).

XY-Wing Example 4

Practise this strategy with built-in step-by-step hints inside our apps.

Get Logic Wiz →