The XYZ-Wing Technique, Explained
The XYZ-Wing sudoku technique is one small, rewarding step beyond the XY-Wing, trading a slightly busier pivot for eliminations the plain XY-Wing simply cannot reach.
A quick recap of the XY-Wing
In an XY-Wing you have a pivot cell holding two candidates, call them X and Y, that sees two other cells. One of those cells holds X and Z, the other holds Y and Z. Whatever value the pivot finally takes, one of the two wings is forced to become Z, because if the pivot is X the XZ wing must be Z, and if the pivot is Y the YZ wing must be Z. So any cell that sees both wings cannot possibly be Z, and you erase Z from it with complete confidence. The XY-Wing is elegant precisely because the pivot itself can never be Z, which keeps the target condition simple: a victim only needs to see the two wings. Hold that detail firmly in mind, because it is the exact thing the XYZ-Wing changes, and confusing the two conditions is the most common way people misapply the trick. If you have never met the XY-Wing before, it is well worth solving a few boards with it first, because the XYZ-Wing tends to feel almost obvious once the two candidate version sits comfortably in your head, and almost baffling if it does not.
What changes in the XYZ-Wing
The XYZ-Wing keeps the same three cell shape, but the pivot now carries three candidates, X, Y and Z, instead of two. The two wings are still bivalue cells, one holding X and Z and the other holding Y and Z, and both must be seen by the pivot. The name simply lists what the pivot contains, X, Y and Z together. Because the pivot can now end up as Z itself, the group of three cells, pivot plus both wings, is guaranteed to contain a Z somewhere among them no matter how the values fall. The logic tightens by exactly one cell, and that single change matters, because it means a valid target must now also see the pivot before you are allowed to remove Z. That extra requirement is the whole price of admission for the extra reach the technique gives you. The payoff is real, because plenty of positions offer a three candidate cell wedged neatly beside two matching bivalue neighbours in the same box, exactly the shape an ordinary XY-Wing would walk straight past without a second glance.
A worked example on the grid
Suppose the pivot at r5c5 holds the candidates 2, 5 and 8, so X is 2, Y is 5 and Z is 8. A wing at r5c2 holds only 2 and 8, sharing row 5 with the pivot. A second wing at r4c4 holds only 5 and 8, sharing box 5 with the pivot. Now trace the three cases carefully. If r5c5 is 2, then r5c2, which sees it along row 5, cannot be 2 and must therefore be 8. If r5c5 is 5, then r4c4, which shares box 5, cannot be 5 and must therefore be 8. If r5c5 is 8, the pivot itself is simply the 8. In every possible case an 8 lands somewhere among r5c5, r5c2 and r4c4, which is exactly the guarantee the technique promises, and it is what lets you clear a candidate elsewhere.
The elimination it gives you
- Find a three candidate pivot XYZ that sees a wing holding XZ and a separate wing holding YZ.
- Confirm that between the pivot and its two wings, one of the three must end up as Z.
- Look for any cell that sees all three of those cells at once, the pivot and both wings together.
- That cell cannot be Z, because a Z is already committed among the three, so erase Z from it.
- Rescan the affected row, column and box, since clearing that candidate often frees a fresh single.
Finishing the example, and why the target must see the pivot
In the grid above, look for a cell that sees the pivot r5c5 and both wings r5c2 and r4c4. The cell r5c4 qualifies neatly: it shares row 5 with r5c5 and r5c2, and it shares column 4 and box 5 with r4c4. Since one of those three cells must be an 8, r5c4 can never be 8, so you strike the candidate 8 out of r5c4, and that often unlocks a hidden single in column 4 or box 5. This is the one rule to burn into memory. In an XY-Wing the pivot can never be Z, so a victim only needs to see both wings, but in an XYZ-Wing the pivot can be Z, so a victim must see the pivot as well as both wings. In practice that usually forces the target into the same box as the pivot, and forgetting it is the classic misstep. Reach for this tool when singles and pairs have run dry; the Extreme puzzles in Shapedoku each carry a single guaranteed solution, so any wing you spot is real logic and never a lucky guess. Mark up your candidates fully before you go hunting, since a wing of this kind is almost impossible to see without clean, complete pencil marks already in place.
Ready to put it into practice?
Play Shapedoku free in your browser. No download, no login, just colorful shape Sudoku.
Play the Web App