XY-Wing (Y-Wing)

Used in Classic 9×9 Sudoku, 6×6 Sudoku, Difference Sudoku, Irregular 6×6 Sudoku, Relational 6×6 Sudoku, Odd/Even Sudoku, Windowed Sudoku, Killer Sudoku, Skyscraper Sudoku 5×5 and Triangle Sudoku.

An XY-wing (also called a Y-wing) uses three cells with two candidates each. One of them, the pivot, holds X or Y. It sees two other cells, the wings: one holds X or Z, the other Y or Z. Whichever digit the pivot turns out to be, one of the wings is forced to Z. So any cell that sees both wings can't be Z.

Spelled out: if the pivot is X, the X-or-Z wing can't be X (it sees the pivot), so it's Z. If the pivot is Y, the Y-or-Z wing is Z for the same reason. One of the wings is always Z, and you don't need to know which.

"Sees" means shares a row, column or box. The pivot has to see both wings, but the wings don't have to see each other. That's what lets the pattern reach across the board in a way an X-wing can't.

An example

A classic 9×9 board with candidates. Three cells are shaded: 1, 9 in the fifth row's third column, 1, 6 in the fifth row's eighth column, and 6, 9 in the eighth row's third column. The 6 is ringed in the last two, and struck from the cell in the eighth row's eighth column.

The pivot is the fifth row's third-column cell, with candidates 1 and 9. It sees two other two-candidate cells:

  • along its row, the eighth-column cell, 1 or 6,
  • down its column, the eighth-row cell, 6 or 9.

If the pivot is 1, the row's wing can't be 1, so it's 6. If the pivot is 9, the column's wing can't be 9, so it's 6. Either way, one of the wings is a 6.

Now find the cells that see both wings. The eighth row's eighth-column cell is in the same column as one wing and the same row as the other. Whichever wing holds the 6, that cell can't. Its candidates go from 6, 9 to just 9, a naked single, and the puzzle runs on from there.

How to look for them

  • Start from two-candidate cells. Late in a hard puzzle there are usually a handful. Take each one in turn as a possible pivot.
  • Look for wings that share one digit with the pivot each and one digit with each other. For a pivot of 1, 9, you want a 1-or-something and a 9-or-the-same-something among the cells it sees.
  • Then look where the wings' houses cross. The cells that see both wings are where the elimination lands. When a wing shares the pivot's box, that's often a few cells of the box. When the wings are in the pivot's row and column, like here, it's the one cell at the far corner.

Where it fits

The XY-wing is an Expert technique here, with the X-wing and the swordfish, and it's the one Expert Classic 9×9 puzzles call for most. It's tried after the two fish, so the app's hint names it only when neither applies. It works on every variant. In killer sudoku, two cells in the same cage also count as seeing each other, since a cage can't repeat a digit.

More techniques

  • Naked Single (Obvious Single): A cell with only one candidate left must hold it. The first thing to look for in any sudoku, and how to spot it quickly.
  • Hidden Single: When a digit fits in only one cell of a row, column or box, it goes there, even if that cell has other candidates.
  • Naked Pair (Obvious Pair): Two cells in a house with the same two candidates take both digits between them, so the rest of the house can't have either.
  • Naked Triple (Obvious Triple): Three cells in a house whose candidates use only three digits take all three, even when no cell shows all of them.
  • Hidden Pair: Two digits that fit in only the same two cells of a house claim those cells, so every other candidate there can go.
  • Hidden Triple: Three digits confined to the same three cells of a house claim them, clearing out every other candidate in those cells.
  • Pointing Pairs and Triples: A digit confined to one line inside a box (or to one box along a line) can be removed from the rest of that line or box.
  • X-Wing: A digit confined to the same two columns in two rows (or the same two rows in two columns) can be cleared from the rest of those lines.
  • Swordfish: The X-wing over three lines: a digit confined to three columns across three rows can be removed from the rest of those columns.