XY-Wing Sudoku Technique

Updated

An XY-Wing links three cells that each hold exactly two candidates so that, whichever value the middle cell turns out to hold, a shared candidate can be erased from any cell that sees both of the other two.

When an XY-Wing applies

The fish patterns reason about one digit across several units. An XY-Wing reasons about three digits across three cells instead. Pick a pivot cell with exactly two candidates, X and Y. Find two pincer cells, each seeing the pivot, where one pincer holds X and a third value Z, and the other holds Y and the same Z. The pivot must hold either X or Y — there is no third option — and whichever it holds forces one of the two pincers to hold Z instead.

If the pivot turns out to hold X, the X-sharing pincer cannot also hold X, so it must hold Z. If the pivot holds Y, the same argument forces the other pincer to hold Z. Either branch ends with some cell in the wing holding Z, so any cell that sees both pincers — even though it sees neither branch specifically — cannot hold Z itself.

The pivot does not need to see both pincers through the same kind of unit. One pincer might share the pivot’s row, and the other its box; what matters is that both pincers see each other closely enough that a target cell can see them both, usually because all three cells share a row, column or box in some combination.

Worked example

The pivot r4c7 holds 1 and 4. Pincer r4c5 holds 1 and 9; pincer r4c2 holds 4 and 9. Because r4c4 sees both pincers along row 4, the solver eliminates the shared value 9 there.
c1c2c3c4c5c6c7c8c9
r1953168742
r2862734951
r341759592836
r47496891931425
r5281645397
r6349527191468
r7153859219674
r8574386219
r9629417583
Pattern cells
r4c7, r4c2, r4c5
Eliminations
9 from r4c4

r4c7 is the pivot, with candidates 1 and 4. r4c5 shares the pivot’s candidate 1 and also carries 9. r4c2 shares the pivot’s candidate 4 and also carries 9. The pivot must hold either 1 or 4. If it holds 1, r4c5 cannot, so r4c5 must hold 9. If the pivot holds 4, r4c2 cannot, so r4c2 must hold 9 instead. Either way, one of the two pincers ends up holding 9.

r4c4 sits in row 4 alongside both r4c5 and r4c2, so it sees both pincers directly. It was carrying 8 and 9 before the deduction. Since one of the two pincers must hold 9 regardless of which value the pivot takes, r4c4 cannot hold 9 either, and the solver removes it, leaving 8 behind as a naked single for the next pass.

How to spot an XY-Wing

  1. Find a bivalue pivotLook for a cell with exactly two candidates, X and Y. Cells with only two candidates are the only useful pivots.
  2. Find two pincers that each see the pivotEach pincer must share a row, column or box with the pivot, hold exactly two candidates, and include one of X or Y.
  3. Check the pincers share a third valueBoth pincers must carry the same third candidate, Z, alongside their shared value with the pivot. If they do not match on Z, the wing does not close.
  4. Erase Z from cells that see both pincersAny cell, other than the pivot and pincers themselves, that sees both pincers cannot hold Z and can have it removed.

Common mistakes

XY-Wing FAQ

Does the pivot need to see both pincers through the same kind of unit?

No. One pincer might share the pivot’s row and the other its box. What matters is that each pincer individually sees the pivot, not that they see each other the same way.

Can an XY-Wing place a digit directly?

No, it only eliminates candidates. As with the fish patterns, the removal often exposes a naked or hidden single on the next pass, as it does in the worked example.

What is the difference between an XY-Wing and an XYZ-Wing?

An XYZ-Wing uses a pivot that already carries all three candidates, X, Y and Z, rather than just X and Y. That extra candidate tightens which cells the elimination can reach.

Why is it called a wing rather than a chain?

The three cells fan out from the pivot like two wings, and the deduction closes in exactly one step per branch. Chains, covered later in this list, extend the same either/or logic across more than three cells.