An XY-wing is made of three cells, each with exactly two candidates. The pivot has the candidates X and Y. One pincer shares a row, column or box with the pivot and has X and Z. The other pincer shares a row, column or box with the pivot and has Y and Z.
If the pivot becomes X, the first pincer cannot be X, so it is Z. If the pivot becomes Y, the second pincer is Z for the same reason. One of the pincers is therefore Z. A cell that shares a row, column or box with both pincers cannot be Z.
An example
- Outlined cells: the pattern
- Shaded: the rows, columns and boxes it works in
- Struck-through digit: eliminated
The pivot has 7 and 8. The pincer in row 7, column 7 shares its row and has 4 and 7. The pincer in row 9, column 2 shares its box and has 4 and 8. If the pivot is 7, the first pincer is 4. If it is 8, the second pincer is 4. The cell in row 7, column 2 is in the same row as the first pincer and the same box as the second, so it cannot be 4.
- Outlined cells: the pattern
- Shaded: the rows, columns and boxes it works in
- Struck-through digit: eliminated
Here Z = 8. Both pincers see the cell in row 3, column 3, and both see the cell in row 9, column 2: the pincer in row 7 through box 7 and the pincer in row 3 through column 2. The 8 is crossed out in both.
How to find an XY-wing
Start from cells with exactly two candidates. Pick one as the pivot and look among the cells it sees for two other cells with two candidates, each sharing one digit with the pivot and sharing a third digit with each other. It takes more searching than an X-wing, which is why XY-wing belongs to expert, together with swordfish.