Y-Wing (XY-Wing)
Volodymyr Sakhan ·
The Y-Wing — also called XY-Wing — is an advanced sudoku technique that uses three bi-value cells to force a candidate elimination. Unlike row- or column-based patterns, Y-Wing works across the whole board: you can spot it using pencil marks once simpler methods are exhausted.
This guide explains the logic, walks through two worked examples with diagrams, and shows you how to scan for the pattern efficiently. If you are comfortable with naked pairs and hidden singles, you are ready for Y-Wing.
What Is Y-Wing (XY-Wing)?
A Y-Wing uses exactly three bi-value cells — cells that each contain precisely two candidates. The three cells play distinct roles:
- Pivot (AB): the central cell with candidates A and B. It must see both pincers.
- Pincer 1 (AC): shares candidate A with the pivot and candidate C with Pincer 2.
- Pincer 2 (BC): shares candidate B with the pivot and candidate C with Pincer 1.
The technique is named after its shape: the two pincers branch out from the pivot like the arms of the letter Y. "Sees" means sharing a row, column, or 3×3 box.
When to Use Y-Wing
Y-Wing is an advanced technique. Reach for it when simpler methods have stalled:
- You have filled in all cells solvable by singles (last free cell, hidden singles, last possible number).
- Naked pairs, hidden pairs, and pointing pairs have been applied without breaking the deadlock.
- Your pencil marks are complete and accurate — Y-Wing cannot work without them.
How Y-Wing Logic Works
The reasoning is a forced two-case argument. Because the pivot contains only A and B, exactly one of them must be true:
- If pivot = A, then Pincer 1 (AC) cannot be A, so Pincer 1 must be C.
- If pivot = B, then Pincer 2 (BC) cannot be B, so Pincer 2 must be C.
Either way, at least one pincer will hold C. Any empty cell that sees both pincers simultaneously is blocked from being C in either case — so C can be safely eliminated from it.
Step-by-Step Examples
The two examples below show Y-Wing in different orientations to demonstrate that the technique is not limited to a single row or column.
Example 1: Rectangular Alignment
Pivot I1 holds {3, 7}. Pincer C1 holds {4, 7} and Pincer I5 holds {3, 4}. The three cells form a rectangle: pivot and Pincer C1 share row 1, pivot and Pincer I5 share column I. Candidate 4 can be eliminated from C5, which sits at the opposite corner of that rectangle.
- Add pencil marks. Scan for cells with exactly two candidates.
- Find I1 with {3, 7} — this is the pivot.
- Look for bi-value cells that see I1 and share one of its candidates.
- C1 has {4, 7} — shares 7 with the pivot and sees it via row 1. This is Pincer 1.
- I5 has {3, 4} — shares 3 with the pivot and sees it via column I. This is Pincer 2.
- Both pincers share candidate 4 — this is C, the elimination target.
- If I1 = 7, then C1 cannot be 7, so C1 = 4.
- If I1 = 3, then I5 cannot be 3, so I5 = 4.
- Either way, one of C1 or I5 will be 4.
- C5 sees C1 via column C and sees I5 via row 5 — eliminate 4 from C5.
The pivot sits at the corner of a rectangle; whichever way it resolves, 4 is forced into one of the pincers — and C5, at the opposite corner, always sees whichever pincer holds 4.
Example 2: Box-Spanning Elimination
Here the pivot sees one pincer via a row and the other via a shared box. The elimination cell sees the two pincers via a box and a row respectively.
- Find D1 with {3, 4} — the pivot.
- Look for bi-value cells that see D1 and share one of its candidates.
- C1 has {4, 7} — shares 4 with D1 and sees it via row 1. This is Pincer 1.
- F2 has {3, 7} — shares 3 with D1 and sees it via the top-middle box (rows 1–3, cols D–F). This is Pincer 2.
- Both pincers share candidate 7 — the elimination target.
- If D1 = 4, then C1 cannot be 4, so C1 = 7.
- If D1 = 3, then F2 cannot be 3, so F2 = 7.
- Either way, 7 must be in C1 or F2.
- A2 sees C1 via the top-left box (rows 1–3, cols A–C) and sees F2 via row 2 — eliminate 7 from A2.
This example shows that pincers do not need to be in the same row or column — as long as the elimination cell sees both pincers (here via a box and a row), the logic holds just as well.
How to Spot Y-Wing
Follow this four-step scan with your pencil marks filled in:
- List all cells with exactly two candidates — these are your bi-value cells.
- For each bi-value cell as a candidate pivot, find two other bi-value cells that each share one candidate with it and together have a third shared candidate.
- Confirm the pivot sees both pincers (shares a row, column, or box with each one).
- Find empty cells that see both pincers simultaneously — eliminate the shared candidate from them.
Y-Wing can span boxes and is easy to miss on a casual scan. Work methodically through your bi-value cells rather than hoping to spot the pattern by eye. If you find many bi-value cells, consider X-Wing and other advanced techniques as well — they often apply to the same difficult puzzles.
Practice Y-Wing Online
Y-Wing appears in hard and expert-level puzzles. Open a hard sudoku on OnSudoku, enable the notes mode, fill in your pencil marks, and look for the bi-value pivot pattern described above.
Y-Wing is one of several advanced techniques covered in our full solving guide. Once you are comfortable with it, try extending your skills to XYZ-Wing, which adds a third candidate to the pivot.
Frequently Asked Questions
Ready to practice Y-Wing? Play hard sudoku and try spotting the pivot-pincer pattern — or create a free account to save your progress.