XY-Chain Sudoku Technique

Updated

An XY-Chain links bivalue cells end to end, each one sharing a candidate with the next, so that the chain’s two endpoints agree on one value between them and that value can be erased from every cell both endpoints see.

When an XY-Chain applies

An XY-Wing is a three-cell XY-Chain. The same idea extends to any length: string together cells that each carry exactly two candidates, where consecutive cells share one value in common. At each interior cell, one of its two candidates connects back to the previous cell and the other connects forward to the next one — the two values alternate down the chain like a line of dominoes.

The proof follows the chain from one end. Assume the first cell does not hold the value that links it to the second cell. Then it must hold its other candidate. That forces the second cell away from the shared value, so the second cell must take its own other candidate, which forces the third cell, and so on to the last cell. That reasoning shows that whenever the first cell is not its own “other” candidate, the last cell ends up holding that same candidate. Combined with the case where the first cell is that candidate directly, one of the two endpoints always holds it.

Worked example

The chain r4c5 → r9c5 → r9c7 → r6c7 → r6c2 links candidates 1, 5, 1 and 4 in turn, leaving 9 as the value both endpoints agree on. The solver eliminates 9 from r4c2 and r6c6.
c1c2c3c4c5c6c7c8c9
r1953168742
r2862734951
r341759592836
r47496891931425
r5281645397
r6349527191468
r71538592159674
r8157438156219
r9629415715183
Pattern cells
r4c2, r4c7, r4c5
Eliminations
9 from r4c4

r4c5 holds 1 and 9. r9c5 holds 1 and 5, sharing 1 with r4c5. r9c7 also holds 1 and 5, sharing 5 with r9c5. r6c7 holds 1 and 4, sharing 1 with r9c7. r6c2 holds 4 and 9, sharing 4 with r6c7. If r4c5 is not 1, it must be 9 — the chain ends immediately. If r4c5 is 1, then r9c5 cannot be 1 and must be 5; then r9c7 cannot be 5 and must be 1; then r6c7 cannot be 1 and must be 4; then r6c2 cannot be 4 and must be 9. Either way, one of r4c5 or r6c2 ends up holding 9.

r4c2 sits in row 4 with r4c5 and in column 2 with r6c2, so it sees both endpoints. r6c6 sits in the same box as r4c5 and in row 6 with r6c2, so it sees both endpoints too. r4c2 was carrying 4 and 9, and r6c6 was carrying 1 and 9, before the deduction. Since 9 must land at one endpoint or the other, neither r4c2 nor r6c6 can hold it, and the solver removes both.

XY-Chains, alongside X-Chains and simple coloring, are the kind of technique that typically pushes a Sudoku-Explainer rating past 7.0 — the point where the grid needs reasoning across a whole path of cells rather than a fixed small pattern.

How to spot an XY-Chain

  1. Map every bivalue cellList every cell with exactly two remaining candidates, along with what those two candidates are.
  2. Link cells that share a candidateConnect two bivalue cells if they see each other and share exactly one candidate. That shared candidate is the link between them.
  3. Follow the chain to a consistent endpoint valueTrace a path where each cell’s incoming and outgoing links use its two different candidates, until the chain’s two endpoints share their remaining, unlinked candidate.
  4. Erase that candidate from shared peersRemove the endpoints’ shared candidate from any cell, outside the chain, that sees both endpoints.

Common mistakes

XY-Chain FAQ

Is an XY-Wing just a short XY-Chain?

Yes. An XY-Wing is the three-cell case: a pivot and two pincers. An XY-Chain is the general form, with as many intermediate cells as the board provides.

Do the chain cells need to be connected in a straight line?

No. Each link just needs the two cells to see each other, through any row, column or box. The chain can zigzag across the grid in any direction.

How is an XY-Chain different from an X-Chain?

An X-Chain follows one digit across many cells using strong and weak links on that single value. An XY-Chain follows bivalue cells instead, changing which digit is “active” at every step along the path.

Can an XY-Chain eliminate more than one candidate at once?

Yes, as the worked example shows. Every cell that sees both endpoints loses the shared candidate, and a chain’s endpoints can often be seen by more than one other cell.