XY-Wing: how a pivot and two pincers clear a digit
An XY-Wing uses three cells with two candidates each to remove one digit from a cell that sees both outer cells. It is one of the techniques Hush's Expert level is built on, together with Swordfish and XYZ-Wing.
The XY-Wing is one of the most useful expert techniques, because it works when the simpler patterns have stopped. It needs only three cells with exactly two candidates each, and it can clear a digit from cells that are far from the pivot. You will need it on Expert puzzles, once singles, pairs, X-Wings and Swordfish are no longer enough.
What is an XY-Wing?
An XY-Wing is a pattern of three bivalue cells, meaning cells with exactly two candidates. The pivot holds {X, Y}. Two pincers each share a row, column or box with the pivot. One pincer holds {X, Z} and the other holds {Y, Z}. Whichever digit the pivot takes, one of the pincers must be Z. So any cell that sees both pincers cannot be Z.
How it works
Cells are written as r#c#, row first and then column. So r9c8 is row 9, column 8.
The logic has two cases. If the pivot is X, the pincer that holds {X, Z} sees the pivot and cannot be X, so it must be Z. If the pivot is Y, the pincer that holds {Y, Z} must be Z instead. Either way, one of the pincers is Z. A cell that sees both pincers therefore cannot be Z, because the Z is already taken by one of them.
The method has three steps:
- Find a pivot. Look for a cell with exactly two candidates, {X, Y}.
- Find two pincers. Look for one bivalue cell {X, Z} and one bivalue cell {Y, Z} that each see the pivot.
- Remove Z from a target. Find a cell that sees both pincers and contains Z. Remove Z from it.
The first diagram shows the pattern. The pivot is r1c1 with {1,2}. The pincers are r1c5 with {1,3}, which sees the pivot along row 1, and r5c1 with {2,3}, which sees the pivot down column 1. Cell r5c5 sees both pincers, since it shares column 5 with r1c5 and row 5 with r5c1. So 3 can be removed from r5c5. The cells marked x are the three pattern cells, and the cell marked - is where 3 is removed.
How to spot it
- List the bivalue cells first. Go through the unsolved cells and mark those with exactly two candidates. An XY-Wing is built only from these.
- Look for a shared digit. A pivot {X, Y} needs one pincer with X and another with Y. Both pincers also share a third digit, Z.
- Check the sees relationship. Each pincer must share a row, column or box with the pivot. Write the reason down before you rely on it.
- Search for a target. Look for a cell that sees both pincers and still holds Z. Check the rows and columns of each pincer, and the boxes they share with the target.
- Confirm that Z is there. If the target does not hold Z as a candidate, there is nothing to remove, so keep searching.
A worked example
The second diagram shows a pattern with the pivot in row 2. The pivot is r2c2 {4,6}. The first pincer is r2c8 {4,9}, which sees the pivot along row 2. The second pincer is r9c2 {6,9}, which sees the pivot down column 2. The shared digit 9 is Z.
Now follow the two cases. If the pivot is 4, the pincer r2c8 cannot be 4, so it must be 9. If the pivot is 6, the pincer r9c2 cannot be 6, so it must be 9. Either way, one of the two pincers is 9.
The target is r9c8. It sees r2c8 down column 8, and it sees r9c2 along row 9. Whichever pincer is 9, r9c8 is not 9. If r9c8 holds {2,7,9}, the 9 is removed and it becomes {2,7}. The pivot and both pincers keep their candidates.
XYZ-Wing: the next step
An XYZ-Wing is a variant in which the pivot has three candidates, {X, Y, Z}. The pincers are still {X, Z} and {Y, Z}, and both must see the pivot. The difference is in the removal. Because the pivot itself might be Z, a cell that sees only the two pincers is not enough. Z can be removed only from a cell that sees all three cells of the pattern: the pivot and both pincers.
Here is why. Suppose a cell that sees all three were Z. Then the pivot cannot be Z, and neither pincer can be Z. So the pincer with {X, Z} must be X, and the pincer with {Y, Z} must be Y. But the pivot sees both pincers, so it cannot be X or Y either. The pivot would have no possible value, which is a contradiction.
The third diagram shows an XYZ-Wing with X = 1, Y = 2 and Z = 3. The pivot is r1c1 {1,2,3}. The pincers are r1c3 {1,3} and r4c1 {2,3}. The cells r2c1 and r3c1 see all three cells, since they share column 1 with the pivot and r4c1, and box 1 with the pivot and r1c3. So 3 can be removed from both of them.
Common mistakes
- Using a pivot with three candidates in a plain XY-Wing. An XY-Wing pivot has exactly two candidates. A three-candidate pivot is the XYZ-Wing, with a different removal rule.
- Accepting a pincer that does not see the pivot. Each pincer must share a unit with the pivot. Without that link, the logic fails.
- Removing Z from a cell that sees only one pincer. The target must see both pincers.
- Forgetting the target must hold Z. If Z is not a candidate, there is nothing to remove.
- Confusing the roles of the digits. Z is the digit shared by both pincers and absent from the pivot in the basic case. The pivot’s two digits are X and Y.
Practice XY-Wing in Hush
Hush rates the XY-Wing as an Expert technique. Expert puzzles in Hush need at least one of Swordfish, XY-Wing or XYZ-Wing. The first 10 solved Hard or Expert puzzles are free, and Hush Plus, a one-time purchase at $4.99, unlocks unlimited Hard and Expert puzzles. Highlights for row, column, box and matching numbers help you see which cells still hold a candidate, and notes clean themselves up when you place a number, so your bivalue cells stay easy to find.
Review X-Wing and Swordfish first, because both train you to check whole rows and columns for one digit. For a broader view of the Expert level, read about Expert sudoku or return to the technique guides. If you are comparing apps for Expert play, the Hush vs Good Sudoku comparison covers the differences. If you want a quieter place to practice, sudoku without ads explains why Hush has none.
You now know every technique Hush’s Expert level uses: Swordfish, XY-Wing and XYZ-Wing.
Frequently asked questions
What is an XY-Wing in sudoku?
An XY-Wing is a pattern of three cells that each have exactly two candidates. The pivot has X and Y, and two pincers have X and Z and Y and Z. Any cell that sees both pincers cannot hold Z.
What is the pivot and what is a pincer in an XY-Wing?
The pivot is the central cell with candidates X and Y. A pincer is one of the two outer cells, and each one shares a row, column or box with the pivot. Each pincer shares one candidate with the pivot and holds the third digit, Z.
What is an XYZ-Wing?
An XYZ-Wing is a variant in which the pivot has three candidates, X, Y and Z. Z can then be removed only from cells that see all three cells of the pattern, including the pivot.
Which Hush level includes the XY-Wing?
Expert. Hush rates difficulty by the techniques a puzzle needs, and Expert needs at least one of Swordfish, XY-Wing or XYZ-Wing. The first 10 solved Hard or Expert puzzles are free, and Hush Plus unlocks unlimited Hard and Expert puzzles.