Among the advanced Sudoku techniques, XY-Wing is the one that most often gets the reaction “how did you see that?” It uses just three cells and produces an elimination that seems to come from nowhere — a cell losing a candidate because of a pattern spread across a different part of the grid. Once you understand the logic, it feels inevitable. Until you do, it looks like magic. And it isn’t just theory: our toughest printable grid can’t be finished without one.
The Setup: Pivot and Two Wings
XY-Wing needs three bivalue cells — cells with exactly two candidates each — called the pivot, wing 1 and wing 2. The pivot holds X and Y. Wing 1 holds X and Z. Wing 2 holds Y and Z. The pivot must see both wings (share a row, column or box with each). The wings don’t need to see each other.
Wing 1: {X, Z} — sees the pivot
Wing 2: {Y, Z} — sees the pivot
Z is the digit the two wings share.
X is shared by the pivot and wing 1.
Y is shared by the pivot and wing 2.
The Logic: Why Z Gets Eliminated
The pivot must be either X or Y. Follow both cases:
If the pivot is X: wing 1 sees the pivot, so it can’t be X. It only has {X, Z}, so wing 1 must be Z.
If the pivot is Y: wing 2 sees the pivot, so it can’t be Y. It only has {Y, Z}, so wing 2 must be Z.
Either way, one of the two wings is Z. So any cell that sees both wings can’t be Z — whichever wing turns out to hold it will rule it out. Remove Z from every such cell.
A Real XY-Wing in Our Hard Sudoku #3
We ran all eight of our Sudoku through a step-by-step solver that only uses human techniques. Seven of them never need anything fancier than pairs and triples. Hard Sudoku #3 is different. Singles fill 53 of the 81 squares, a naked triple tidies up some candidates, and then the grid stops. Even X-Wing, Swordfish and Simple Colouring can’t move it on. It needs an XY-Wing.
That single elimination is enough to restart the solve, which then needs an X-Wing and, later on, a second XY-Wing centred in row 4. If you can find both, you’ve solved the hardest grid in our library without a single guess.
Finding XY-Wing Patterns
With full pencil marks, list the cells with exactly two candidates. Each one is a possible pivot. For a pivot holding {X, Y}, look among the cells it sees for one holding X plus some other digit — call that digit Z. Then look for a second cell the pivot sees that holds exactly {Y, Z}. If you find it, you have an XY-Wing.
Now find every cell that sees both wings and check whether it still lists Z. If it does, erase it. Often you get just one elimination — but in a hard puzzle, one is frequently all it takes to set off a run of simpler deductions.
XY-Wing vs. XYZ-Wing
Once XY-Wing feels natural, XYZ-Wing is the next step. Its pivot holds three candidates {X, Y, Z} instead of two. The logic is similar, but because the pivot itself might be Z, only cells that see the pivot and both wings can lose Z — a tighter condition. None of our current grids needs an XYZ-Wing, so master XY-Wing on Hard #3 first; the extension follows from the same reasoning.