Sudoku Explained

Expert 10 min read

XY-Chain — one digit, walked along a chain of pairs

Every cell on the chain has exactly two candidates, and each one forces the next. No guessing, no second assumption — just a digit falling out of the two possible ways to start.

The short version

An XY-Chain is a line of cells that each hold exactly two candidates. Walk from one to the next: each cell must share one of its digits with its neighbour, and must be visible to it.

Now look at the two ends. If they share a digit — say both carry an 8 — then that digit is decided.

Why: the first cell has only two candidates. If it takes the 8, an end is the 8. If it takes the other one, the second cell cannot repeat that digit, so it is forced to its other candidate, and that forces the next, all the way down until the far end is left with the 8.

Either way, one of the two ends holds the 8. So any cell that can see both ends cannot be 8.

Nothing was assumed. Every step is "this cell has two candidates and one of them is taken, so it must be the other".

Why the ends are enough

The chain looks like a long argument, but only its two ends matter.

end A = {x, d}  —  {d, e}  —  {e, f}  —  …  —  {g, x} = end B

Take the left end. If it is x, done. If it is not x, it is d, and d is now used — so the next cell, which is {d, e}, has to be e. That forces the cell after it, and so on, until the last cell has no choice but to be x.

So x is in A or in B. That is the whole theorem, and it never needs more than two candidates per cell — which is exactly why the chain is restricted to those cells.

A real board

Step 1 of 6

The board as it stands. Work out where the digit can still go.

cells that make the patterncells it acts oncandidates it removes

Cross 8 out of R1C2. The chain runs R1C4 – R7C4 – R5C4 – R5C2. R1C4 holds only 4 and 8, and R5C2 holds only 8 and 9, so both ends carry 8. Take R1C4 = 8 first: then one end already is 8. Take R1C4 = 4 instead: then R7C4 cannot take the 4 as well, so it must be 1, then R5C4 cannot take the 1 as well, so it must be 9, then R5C2 cannot take the 9 as well, so it must be 8. Either way one of R1C4 and R5C2 is 8, and R1C2 sees both ends, so it cannot be 8.

The chain here is four cells long, and it runs down column 4 before turning into row 5:

Both ends carry an 8: R1C4 and R5C2. Now test the first cell.

Either way, one of R1C4 and R5C2 is 8. R1C2 sits in row 1 with R1C4 and in column 2 with R5C2 — it sees both ends, so it cannot be 8.

Step through the board above to see it happen: the chain lights up one cell at a time, and only then does the 8 come off R1C2.

How to find one

You do not search for a chain. You extend one.

  1. Start at a cell with two candidates. Any of them. Beginners pick the one with the most neighbours.
  2. Look for a cell it sees that shares a digit. The neighbour must also hold exactly two candidates, and one of them must be a digit you already have.
  3. Step across. The shared digit is now "used", so the neighbour's other digit becomes the digit you carry forward.
  4. Repeat until the carried digit matches something at the start. If the number you are carrying appears in the starting cell's pair, the chain closes and the elimination is live.
  5. Check what sees both ends. The digit that both ends carry comes off every cell that is visible from both.

The fourth step is the one that decides everything. A chain that stops without closing is just a list of cells.

XY-Chain, XY-Wing, forcing chain

These three get confused constantly, and the differences matter when you are deciding what to look at.

CellsWhat it needsWhat it gives you
XY-Wing3A pivot with three candidates, two wings that both see itOne elimination
XY-Chain3 or moreEvery cell double, neighbours sharing a digit, ends sharing a digitOne elimination per cell that sees both ends
Forcing chainAnyOne assumption, then propagation until a contradictionWhatever the assumption touched

The XY-Wing is a chain of three cells with an extra condition — the middle cell has to hold all three digits. The forcing chain is more powerful and much slower: it leaves the two-candidate world entirely and follows every consequence of an assumption. In practice, look for chains first, and fall back to forcing when the board will not move.

The traps

Using a cell with three candidates. The logic only works while every cell has exactly two. One three-candidate cell breaks the "must be the other one" step, and the rest of the chain is worthless.

Reading the share wrong. Two cells can see each other and still share nothing. Check the actual candidates, not the feeling that they are related.

Forgetting that the ends must share a digit. A chain that ends on a different digit proves nothing. This is the most common way an XY-Chain appears to work when it does not.

Building the chain out of eliminated candidates. If you have already removed a candidate somewhere on the chain, the chain has to be built from the reduced list — and the diagram in your head is now one step out of date. Start from the candidates as they actually stand.

Going too long. Every extra cell is another chance to misread a pair. A four-cell chain you can verify is worth more than an eight-cell chain you cannot.

Where to use it

XY-Chains are the first technique on this site that is genuinely hard to spot by eye, and they are also the first that reliably cracks boards where every pattern technique has failed. The order to work in is: patterns, then fish, then wings, then chains, then forcing.

If you find yourself looking for a chain on every board, you are skipping the cheaper moves. Most Expert boards fall to a skyscraper or a W-Wing first — and those take seconds rather than minutes.

Questions people actually ask

What is an XY-Chain?

A sequence of cells that each hold exactly two candidates, where each cell shares one digit with the next and the two ends share the same digit. The shared digit at the ends must occupy one of the two ends, so it can be removed from any cell that sees both.

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

An XY-Wing is three cells: one pivot holding three candidates and two wings that both see it. An XY-Chain can be any length and needs no pivot — the cells only have to link to each other in a line, and the two ends do the work.

Is an XY-Chain the same as a forcing chain?

No. A forcing chain assumes a value and propagates until the board contradicts itself, which needs you to follow every consequence. An XY-Chain only walks through two-candidate cells, so each step is a single forced move and there is nothing to check afterwards.

How long can the chain be?

As long as you can follow it. In practice most useful ones run three to six cells; beyond that the risk of misreading a candidate outweighs the eliminations it finds.

Does the chain have to be a loop?

No. The ends do not need to see each other — they only need to both carry the same digit. If they do see each other, that is fine too, and the elimination still holds.

Where to go next