XYZ-wing
What it is
The XYZ-wing is a close relative of the XY-wing. The difference is that the pivot has three candidates instead of two. The pattern looks like this:
- The pivot has candidates X, Y and Z.
- One wing has candidates X and Z, and shares a row, column or box with the pivot.
- The other wing has candidates Y and Z, and also shares a row, column or box with the pivot.
The digit Z appears in all three cells. Whatever happens, one of the three cells must be Z. So any cell that can see all three of them (the pivot and both wings) cannot be Z.
Because the pivot is included, the cells that see all three are usually few. In most XYZ-wings, the pivot shares a box with one wing and a row or column with the other. The eliminations then happen in the two other cells where that row or column passes through the box.
How to spot it
You need full pencil marks.
- Look for a cell with exactly three candidates. That is your possible pivot.
- Look in its box for a two-candidate cell that uses two of its three digits.
- Look along its row or column for another two-candidate cell that uses the pivot’s third digit plus the digit both wings share.
Then find cells that share a unit with all three, and check whether they have Z as a candidate.
A worked example
Here is the situation:
- The pivot is at row 5, column 5, with candidates 2, 4 and 8.
- Wing one is at row 4, column 6, with candidates 2 and 8. It is in box 5 with the pivot.
- Wing two is at row 5, column 8, with candidates 4 and 8. It is in row 5 with the pivot.
The shared digit, Z, is 8. Now reason it through:
- If the pivot is 8, then it is the 8.
- If the pivot is 2, wing one cannot be 2 (same box), so wing one is 8.
- If the pivot is 4, wing two cannot be 4 (same row), so wing two is 8.
So one of the three cells must be 8.
Which cells can see all three? A cell must be in row 5 (to see wing two), and in box 5 (to see wing one). The pivot is already in both. So the cells that qualify are the other two cells of row 5 inside box 5: row 5, column 4 and row 5, column 6.
If row 5, column 4 has candidates 1, 8 and 9, remove the 8, leaving 1 and 9. If row 5, column 6 has 6 and 8, remove the 8 and place the 6.
How it differs from the XY-wing
In an XY-wing, the pivot cannot be Z, so you only need cells that see both wings. In an XYZ-wing, the pivot itself might be Z, so the cell must also see the pivot. That makes the eliminations rarer but the pattern a little easier to find, since everything is close together.
A common mistake
The most common mistake is treating an XYZ-wing like an XY-wing, and removing Z from cells that see both wings but not the pivot. In the example, row 4, column 8 sees wing one (same row) and wing two (same column), but not the pivot. That cell could still be 8, if the pivot turns out to be the 8. Only cells that see all three are safe.
Another slip is a wing with a third candidate. Both wings must have exactly two.
When you will need it
The XYZ-wing is one of the Expert techniques on sudoku.ie, alongside the XY-wing and the swordfish. You will meet it on some Saturday puzzles. It is less common than the XY-wing, but worth checking whenever you see a three-candidate cell with two-candidate neighbours.