XY-Wing

By Sudoku Online Editorial Team ·

xy wing: Pivot r4c3 holds 4/9. Wing r6c2 holds 4/6 and wing r9c3 holds 9/6. Whichever w…Pivot r4c3 holds 4/9. Wing r6c2 holds 4/6 and wing r9c3 holds 9/6. Whichever way the pivot resolves, one wing becomes 6, so 6 is removed from every cell that sees both wings. Pattern cells: r4c3, r6c2, r9c3. Candidates removed: 6 from r5c3, 6 from r7c2, 6 from r8c2, 6 from r9c2.68579231496317583178629149328658569134638519689161893469692158
Pivot r4c3 holds 4/9. Wing r6c2 holds 4/6 and wing r9c3 holds 9/6. Whichever way the pivot resolves, one wing becomes 6, so 6 is removed from every cell that sees both wings.

An XY-Wing uses three cells that each have exactly two candidates. A "pivot" cell holds X and Y, one "wing" that sees the pivot holds X and Z, and another wing that sees the pivot holds Y and Z. Whichever way the pivot resolves, one wing becomes Z, so Z can be removed from any cell that sees both wings.

On this site XY-Wing first appears in Expert puzzles.

Three cells, three digits, one forced outcome

The earlier techniques in this series find sets of cells that must hold sets of digits. An XY-Wing is the first one built on a case split. The pivot has two candidates; it must take one of them. In either case, one wing is forced to become Z. You do not need to know which case is true, only that both lead to the same conclusion about Z in the cells the two wings share.

The diagram above is a real position from this site's Expert pool, drawn by the technique engine. The caption reads: the pivot r4c3 holds 4 and 9; one wing, r6c2, holds 4 and 6; the other wing, r9c3, holds 9 and 6. Whichever way the pivot resolves, one wing becomes 6, so 6 is removed from every cell that sees both wings. Notation is row first, then column, counted from the top left.

The logic, case by case

Call the pivot's digits X and Y (here 4 and 9) and the shared wing digit Z (here 6).

One of the two wings is therefore 6 in every possible case. Any cell that sees both wings would be looking at a 6 whichever wing wins, so it cannot be 6 itself. That is the entire technique, and it is airtight: a case split where both branches agree is a proof.

How to find one

  1. Fill in candidate notes and list the cells with exactly two candidates. These bivalue cells are the raw material.
  2. Choose one as the pivot, with candidates X and Y.
  3. Look among the cells that see the pivot (same row, column or box) for a bivalue cell with X and a new digit Z.
  4. Look among the cells that see the pivot for another bivalue cell with Y and the same Z.
  5. The two wings do not need to see each other. Find cells that see both wings and still list Z, and remove Z from them.

Because wings can lie in different groups from each other, the cells that see both wings are often at the crossing of a row and a column, or in a box that touches both. Draw lines from each wing along its row, column and box and look where they cross.

Common mistakes

Where the site's grading needs it

XY-Wing is a fourth-tier technique, with Swordfish and simple coloring. In the committed frequency data over 1,000 stored classic puzzles per tier, an XY-Wing was used in 0 puzzles at Easy, Medium and Hard, and in 607 Expert and 296 Evil puzzles. Among the three fourth-tier techniques it has the highest count in this sample. Each puzzle is solved cheapest technique first and a technique counts if used at least once; the figures are measured counts, and this page does not claim a cause for the lower Evil number. See how difficulty is graded and the frequency guide.

Why it is called a wing

Drawn on the grid, the pivot is the body and the two wings reach out on either side, one along its row and one along its column, or both along different groups. The name is a drawing habit, not a mathematical term. Related patterns, such as the XYZ-Wing, where the pivot holds three candidates, follow the same case-split idea, but the engine on this site does not implement them.

Relationship to the other fourth-tier techniques

Simple coloring and the XY-Wing both rely on forced alternatives. Coloring follows a chain of "this or that" links for one digit across the grid. The XY-Wing uses a short chain of three cells across three digits. If you understand why a chain of two-way choices leads to a forced outcome, you understand both.

Check your understanding

The answers: 5 from every cell that sees both wings; no, because the wings no longer share a common last digit; and yes, each wing must see the pivot.

A worked example

Follow the diagram. The pivot sits at r4c3 with candidates 4 and 9. The wing at r6c2 is in the pivot's box and holds 4 and 6; the wing at r9c3 is in the pivot's column and holds 9 and 6. Both wings see the pivot, and they share the extra digit 6. Now test both cases. If the pivot is 4, the first wing cannot be 4, so it is 6. If the pivot is 9, the second wing cannot be 9, so it is 6. Either way one wing is 6. Find the cells that see both wings. Each one would be looking at a 6 in one wing or the other, so none of them can be 6, and the 6 comes off their lists.

The pattern is easy to check mechanically, which is why the engine finds it quickly: for every bivalue cell as a pivot, test every pair of bivalue cells that see the pivot and share a third digit. On a human scale, the quickest route is to fill in notes, highlight all bivalue cells, and ask of each one whether two neighbours complete the pattern.

Why the wings need not see each other

Beginners often assume the wings must be in a common group. They do not. The wings are connected only through the pivot. What matters is the set of cells that see both wings, and those can sit at the crossing of the lines from each wing. When the two wings are in the same group, the set of cells that see both is larger, so check which case you are in before you start crossing out digits.

Practice

Play an Expert puzzle on the main board with notes on. When pairs, pointing patterns and fish have nothing, list the bivalue cells and test them as pivots. The level-two hint names the technique when an XY-Wing is the cheapest step available.

Previous: Swordfish. Next: simple coloring. Back to the technique list.