X-Cycles and X-Chains in Sudoku

Follow one digit through strong and weak links, and the chain or loop it makes tells you where that digit cannot go.

Home › Blog › X-Cycles

Written by Brian Hamilton and Karan Hamilton.

Brian and Karan are the puzzle lovers and game makers behind Sudoku Online Puzzles. You can learn more on the About page.

Guides are reviewed for clarity, accuracy, and usefulness for solvers. See our editorial standards, puzzle testing process, or send a correction.

Take puzzle 370 from the bank behind our Evil sudoku page and let the eighteen techniques in our Sudoku Helper work on it. They stop with 42 cells still empty: nothing on their list applies, not a single, a pair, a fish, a wing, a Skyscraper or Simple Colouring. Now look at the 5s and nothing else. Six of them are tied into a ring that runs down column 2, along row 7, through box 8, along row 8, up column 9 and back along row 2, and that ring alone strikes out four more 5s. After that the helper’s own Skyscraper and a run of 42 naked singles finish the grid.

That ring is an X-cycle: one digit followed round the board through links that alternate between “one of these two must be it” and “these two cannot both be it”. Every board on this page is a real stall from our banks, every chain on it was found by our solver code rather than drawn in, and every claim in the captions has been checked against the puzzle’s only solution.

X-cycle, X-chain, nice loop: are they the same thing?

Nearly. The names come from different solvers and forums and overlap more than most guides admit. This is how this page uses them:

NameWhat it isWhat it gives
X-chainAn open chain on one digit, links alternating strong and weak, with a strong link at each endThe digit goes from every cell that sees both ends
X-cycle, continuousThe same chain closed into a loop, alternating all the way roundThe digit goes from the rest of every house a weak link runs through
X-cycle, discontinuousA loop where two links of the same kind meet at one cellThat cell is the digit (two strong links) or is not (two weak)
Nice loopAny closed alternating chain, on one digit or several. X-cycles are the single-digit onesThe same three rules
AIC (alternating inference chain)Any open alternating chain. An X-chain is a single-digit AICEliminations from candidates that see both ends
Turbot FishFor some solvers every four-cell X-chain; here, the four-cell ones that are neither a Skyscraper nor a 2-String KiteThe same as any X-chain

The X is the usual tag for a single digit, as in X-Wing. An XY-chain runs through two-candidate cells instead and changes digit at every step. Grouped X-cycles, which let two or three cells of one box act as a single link end, are outside this page.

In short: an X-chain is open, an X-cycle is closed, and a nice loop is the closed form on any number of digits. What changes the move you can make is not the name but whether the chain closes, and how.

What are strong and weak links in sudoku?

Every X-cycle is built from two kinds of link between cells that hold the same candidate, say 5:

  • Strong link: the 5 has exactly two places left in a row, column or box, a conjugate pair. At least one of them is 5: if one is not, the other is.
  • Weak link: two cells that see each other, in the same row, column or box, and both still hold 5. At most one of them is 5: if one is, the other is not.

A chain alternates the two, so the argument alternates too: not 5, so 5; so not 5, so 5. A strong link reasons from “is not” to “is”, a weak link from “is” to “is not”, and a single assumption travels from one end of the chain to the other without ever branching.

A strong link can always do a weak link’s job

The only two places for 5 in a house also see each other, so they cannot both be 5. Every strong link is therefore a weak link as well, and a chain may use one wherever it needs a weak link. Several popular guides define a weak link as “three or more candidates in the house”, which quietly forbids valid chains. The loop on puzzle 232 below depends on it: its link in column 7 joins the only two 8s in that column.

Chains are usually written on one line, with = for a strong link and a hyphen for a weak one. The ring on puzzle 370 is (5) r2c2=r7c2-r7c6=r8c5-r8c9=r2c9-r2c2: start at R2C2, strong to R7C2, weak to R7C6, and so on back to the start.

How does a continuous X-cycle remove candidates?

A loop is continuous when it has an even number of cells and the links alternate all the way round, never two strong or two weak side by side. Such a loop can only be filled two ways: every other cell is the digit, or the cells in between are. Either way each link has exactly one end that is the digit, so each weak link now behaves like a strong one. That is the first loop rule: the digit goes from every other cell of each house a weak link runs through.

On puzzle 370 the strong links are column 2, box 8 and column 9, and the weak links run along rows 7, 8 and 2. Row 7’s 5 must be R7C2 or R7C6, so the 5 in R7C1 goes. Row 8’s must be R8C5 or R8C9, so R8C8 loses its 5. Row 2’s must be R2C9 or R2C2, so R2C1 and R2C7 lose theirs. Four eliminations, and the loop never says which three of its six cells hold the 5s. It does not need to. (They are R2C2, R7C6 and R8C9.)

X-cycle: a continuous loop on 5 — before X-cycle: a continuous loop on 5 — the loop. pattern cells R2C2, R7C2, R7C6, R8C5, R8C9, R2C9. eliminations in R2C1, R2C7, R7C1, R8C8. candidates removed: 5 in R2C1; 5 in R2C7; 5 in R7C1; 5 in R8C8. Evil puzzle 370 where our 18 helper techniques stall, with every 5 that is still possible (plus R9C8’s 8). Six of them form a loop: strong links (solid) in column 2 (R2C2–R7C2), box 8 (R7C6–R8C5) and column 9 (R8C9–R2C9), joined by weak links (dashed) along row 7 (R7C2–R7C6), row 8 (R8C5–R8C9) and row 2 (R2C9–R2C2). Each link holds exactly one 5, so each of those three rows has its 5 on the loop, and the struck 5s at R2C1, R2C7, R7C1 and R8C8 go.. 2 3 5 7 4 8 5 5 6 8 9 2 5 7 5 5 8 6 3 1 5 4 2 6 5 5 5 2 7 5 8 7 9 5 6 8 5 4 5 5 1 5 2 6 6 1 5 8 7 5 5 5 9 6 3 4 5 8 1
Evil puzzle 370 where our 18 helper techniques stall, with every 5 that is still possible (plus R9C8’s 8). Six of them form a loop: strong links (solid) in column 2 (R2C2–R7C2), box 8 (R7C6–R8C5) and column 9 (R8C9–R2C9), joined by weak links (dashed) along row 7 (R7C2–R7C6), row 8 (R8C5–R8C9) and row 2 (R2C9–R2C2). Each link holds exactly one 5, so each of those three rows has its 5 on the loop, and the struck 5s at R2C1, R2C7, R7C1 and R8C8 go.
X-cycle: a continuous loop on 5 — after X-cycle: a continuous loop on 5 — after the loop. pattern cells R2C2, R7C2, R7C6, R8C5, R8C9, R2C9. pivot R6C5, R6C8. After the loop: four fewer 5s. Row 8 now has 5 only in R8C5 and R8C9, and with row 6 (R6C5, R6C8, blue) that is a Skyscraper the helper already knows. It clears the 5 from R9C8, leaving 8, and 42 naked singles finish the grid. In the solution the loop’s 5s are R2C2, R7C6 and R8C9: one end of every link.. 2 3 5 7 4 8 5 6 8 9 2 7 5 5 8 6 3 1 5 4 2 6 5 5 5 2 7 5 8 7 9 5 6 8 5 4 5 1 5 2 6 6 1 5 8 7 5 5 9 6 3 4 5 8 1
After the loop: four fewer 5s. Row 8 now has 5 only in R8C5 and R8C9, and with row 6 (R6C5, R6C8, blue) that is a Skyscraper the helper already knows. It clears the 5 from R9C8, leaving 8, and 42 naked singles finish the grid. In the solution the loop’s 5s are R2C2, R7C6 and R8C9: one end of every link.

Two more things about this board. The 5s are so tightly linked that five different loops give these same four eliminations, so another route round counts too. And such loops are rare: of 500 Evil puzzles, only this one and puzzle 350 had a continuous X-cycle at any point where our eighteen techniques stalled. Our solver, which plays the shortest chain it can find, did not even start with it. It took a 2-String Kite that removes only the 5 in R2C1, made one Almost Locked Set move, stalled again, and then used the loop for the other three.

The X-Wing is the smallest continuous X-cycle: two strong links in parallel rows, closed by two weak links down the columns, four cells in all. Its eliminations, the rest of those two columns, are exactly the first loop rule.

When does an X-cycle place a digit?

A loop with an odd number of cells cannot alternate all the way round. Somewhere two links of the same kind meet at one cell, the discontinuity, and the loop becomes a proof by contradiction about that cell. That gives the other two loop rules:

  • Two strong links meet (the second rule): the cell is the digit. Assume it is not, follow the chain round, and it comes back saying the cell is the digit.
  • Two weak links meet (the third rule): the cell is not the digit. Assume it is, and the chain comes back saying it is not.

Puzzle 232 at its first stall has the second kind, on 8. Suppose R1C8 is not 8. Row 1 then puts its 8 in R1C6, so R4C6 is not 8, so row 4’s 8 is R4C3, so R6C3 is not 8, so row 6’s 8 is R6C7, so R2C7 is not 8, and box 3, whose only 8s are R2C7 and R1C8, puts its 8 in R1C8. The assumption refutes itself: R1C8 is 8.

X-cycle: a discontinuous loop on 8 — before X-cycle: a discontinuous loop on 8 — the loop. pattern cells R1C6, R4C6, R4C3, R6C3, R6C7, R2C7. pivot R1C8. Evil puzzle 232 at its first stall, showing every 8 still possible (and all of R2C7’s and R5C8’s marks). Start at R1C8 (blue) and go round: strong in row 1 to R1C6, weak down column 6 to R4C6, strong in row 4 to R4C3, weak in column 3 to R6C3, strong in row 6 to R6C7, weak up column 7 to R2C7, strong in box 3 back to R1C8. The loop closes with two strong links meeting at R1C8, so R1C8 is 8. Column 7 holds 8 only in R2C7 and R6C7: a strong link doing a weak link’s job, which is always allowed.. 1 2 4 5 8 7 8 9 4 5 8 8 9 3 8 2 1 7 8 9 3 2 1 6 5 4 6 8 1 4 8 5 9 2 8 8 8 1 4 8 6 5 1 8 6 9 2 8 7 3 8 1 2 7 9 5 8 1 6 8 3 5 8 8 8 2 1 8
Evil puzzle 232 at its first stall, showing every 8 still possible (and all of R2C7’s and R5C8’s marks). Start at R1C8 (blue) and go round: strong in row 1 to R1C6, weak down column 6 to R4C6, strong in row 4 to R4C3, weak in column 3 to R6C3, strong in row 6 to R6C7, weak up column 7 to R2C7, strong in box 3 back to R1C8. The loop closes with two strong links meeting at R1C8, so R1C8 is 8. Column 7 holds 8 only in R2C7 and R6C7: a strong link doing a weak link’s job, which is always allowed.

The third rule is the one you will use most, usually without noticing a loop at all, because it is the open X-chain.

How does an open X-chain work?

An X-chain is the loop left open: links alternate, and the chain starts and ends with a strong link. Read it from either end and the same thing happens. If the first cell is not the digit, the strong link makes the next one the digit, the weak link clears the one after, and so on until the last strong link makes the far end the digit. So at least one end is the digit, and no cell that sees both ends can be. An open X-chain always has an even number of cells: four, six, eight.

Take the same board and leave out R2C7. Five links run from R1C8 to R6C7, strong at both ends. R2C7 sees R1C8 through box 3 and R6C7 through column 7; R5C8 sees R1C8 through column 8 and R6C7 through box 6. Both lose their 8, and both are then naked singles.

X-chain: an open chain on 8 — before X-chain: an open chain on 8 — the chain. pattern cells R1C8, R1C6, R4C6, R4C3, R6C3, R6C7. eliminations in R2C7, R5C8. candidates removed: 8 in R2C7; 8 in R5C8. The same board as an open X-chain: leave out R2C7 and five links run from R1C8 to R6C7, strong at both ends. If R1C8 is not 8, the links force R1C6, R4C3 and then R6C7 to be 8, so R1C8 or R6C7 is 8. R2C7 sees both (box 3 and column 7), and so does R5C8 (column 8 and box 6): their 8s are struck.. 1 2 4 5 8 7 8 9 4 5 8 8 9 3 8 2 1 7 8 9 3 2 1 6 5 4 6 8 1 4 8 5 9 2 8 8 8 1 4 8 6 5 1 8 6 9 2 8 7 3 8 1 2 7 9 5 8 1 6 8 3 5 8 8 8 2 1 8
The same board as an open X-chain: leave out R2C7 and five links run from R1C8 to R6C7, strong at both ends. If R1C8 is not 8, the links force R1C6, R4C3 and then R6C7 to be 8, so R1C8 or R6C7 is 8. R2C7 sees both (box 3 and column 7), and so does R5C8 (column 8 and box 6): their 8s are struck.
X-chain: an open chain on 8 — after X-chain: an open chain on 8 — after the chain. pattern cells R1C8, R6C7. pivot R2C7, R5C8. After: with their 8s gone, R2C7 can only be 3 and R5C8 only 4 (blue squares, written in). R1C8 now holds box 3’s only 8, the placement the loop made directly, and R6C7 column 7’s only 8. From here 34 naked singles finish the puzzle.. 1 2 4 5 8 7 8 9 4 5 8 8 9 3 2 1 7 8 9 3 2 1 6 5 4 6 8 1 4 8 5 9 2 8 8 8 1 4 6 5 1 8 6 9 2 8 7 3 8 1 2 7 9 5 8 1 6 8 3 5 8 8 8 2 1 8
After: with their 8s gone, R2C7 can only be 3 and R5C8 only 4 (blue squares, written in). R1C8 now holds box 3’s only 8, the placement the loop made directly, and R6C7 column 7’s only 8. From here 34 naked singles finish the puzzle.

Seen as loops, each of those eliminations is the third rule: the chain plus R5C8 closes with two weak links meeting at R5C8. And the placement on R1C8 is just this chain plus one hidden single: with R2C7’s 8 gone, R1C8 is the only 8 left in box 3. That holds for every loop where two strong links meet. Drop the last cell and an open chain one cell shorter removes the digit there, leaving a hidden single where the strong links met. It is why our solver, which plays the shortest chain first, met discontinuous loops at six stalls in four puzzles and never needed one.

Is a 2-String Kite an X-chain? Where the X-Wing, Skyscraper and colouring fit

Yes. Every four-cell X-chain is two strong links joined by one weak link, and the named single-digit patterns are the shapes four cells can take:

PatternAs an X-cycleIn the helper’s 18?
X-WingContinuous loop of 4 cells: strong links in two parallel rows (or columns), both ends lined upYes
SkyscraperOpen chain of 4: strong links in two parallel rows (or columns), one end lined upYes
2-String KiteOpen chain of 4: a strong link in a row and one in a column, near ends in the same boxNo
Turbot FishOpen chain of 4, any other shape, such as one with a strong link inside a boxNo
Simple ColouringChains and loops built from strong links onlyYes
Longer X-chains and X-cyclesOpen or closed, any shape, up to 16 cells in our searchNo

The 18 are the techniques the Sudoku Helper and our Sudoku Trainer know. Where they stall, the helper has found no X-Wing, Skyscraper or colouring move, so every X-chain on this page is a shape outside the list.

2-String Kite on 9: a four-cell X-chain — before 2-String Kite on 9: a four-cell X-chain — the chain. pattern cells R1C9, R1C1, R3C3, R6C3. eliminations in R6C9. candidates removed: 9 in R6C9. 2-String Kite on 9, Evil puzzle 12, showing every 9 still possible. A strong link in row 1 (R1C9–R1C1) and one in column 3 (R3C3–R6C3), tied by a weak link inside box 1. One of the ends, R1C9 or R6C3, is 9; R6C9 sees both, so its 9 goes.. 9 5 7 4 9 4 9 1 9 9 4 3 6 9 2 9 5 9 6 2 9 4 2 6 4 5 9 8 9 9 9 9 4 5 6 9 3 9 6 7 4 8 5 6 9 7 8 5 4 3 2 1 5 4 8 1 9 7 6
2-String Kite on 9, Evil puzzle 12, showing every 9 still possible. A strong link in row 1 (R1C9–R1C1) and one in column 3 (R3C3–R6C3), tied by a weak link inside box 1. One of the ends, R1C9 or R6C3, is 9; R6C9 sees both, so its 9 goes.
Turbot Fish on 4: a four-cell X-chain — before Turbot Fish on 4: a four-cell X-chain — the chain. pattern cells R5C2, R8C2, R8C9, R9C7. eliminations in R5C7. candidates removed: 4 in R5C7. Turbot Fish on 4, Evil puzzle 99, showing every 4 still possible. Strong in column 2 (R5C2–R8C2), weak along row 8 (R8C2–R8C9), strong in box 9 (R8C9–R9C7). One of R5C2 and R9C7 is 4; R5C7 sees both, so its 4 goes.. 2 3 4 9 7 5 4 5 4 9 2 8 5 6 4 4 3 4 2 4 4 4 4 4 1 3 4 6 4 5 7 4 3 2 8 4 5 2 9 4 4 5 6 8 3 4 4 7 4 8 4 5 6
Turbot Fish on 4, Evil puzzle 99, showing every 4 still possible. Strong in column 2 (R5C2–R8C2), weak along row 8 (R8C2–R8C9), strong in box 9 (R8C9–R9C7). One of R5C2 and R9C7 is 4; R5C7 sees both, so its 4 goes.

On puzzle 12 the 9 has two places in row 1 and two in column 3, and the near ends, R1C1 and R3C3, share box 1: a kite. On puzzle 99 the strong links are column 2 and box 9, joined along row 8: a Turbot Fish. These two shapes are most of what X-chains add in practice. Of the 94 X-chain moves our solver made on the Evil bank, 60 were one or the other.

Simple Colouring is the same idea held to strong links. Colour the two cells of each conjugate pair opposite colours and follow the cluster: a cell that sees both colours is an X-chain elimination, and two cells of one colour that see each other form a loop with two weak links meeting. What X-chains add is the genuine weak link, across a house that holds the digit three or more times, which colouring cannot cross. That is how an X-chain still finds something after colouring has run dry, which is where every board on this page is. 3D Medusa extends colouring the other way, across digits inside two-candidate cells.

How do you find an X-cycle on your own board?

  1. Pick one digit and look at nothing else. The diagrams here print only that digit for the same reason: among the other marks, the chain is close to invisible.
  2. Mark its strong links. Go through the rows, columns and boxes and note every house where the digit has exactly two places left.
  3. Join two strong links with a weak one. If an end of one sees an end of the other, you have a four-cell chain. Check every cell that sees both outer ends.
  4. Keep extending. From the far end, add a weak link to a cell that starts another strong link. After each strong link, check again for cells that see both ends.
  5. Watch for the chain coming home. If the far end links back to the first cell, you have a loop: count the cells and apply the rule that matches how it closes.
Check your pencil marks first

A strong link is a claim that a digit has only two places in a house. If your pencil marks are missing a candidate, you will see conjugate pairs that are not there, and a chain built on one can remove the answer. Every chain on this page was checked against the puzzle’s solution; on your own grid, the pencil marks are the only check you have.

Stuck after X-Wing and colouring? How often an X-chain is the answer

We can answer that from our own banks rather than by feel. We took the first 500 puzzles of the Evil bank and the first 500 of the Extreme bank, ran the helper’s eighteen techniques simplest-first until they stalled, then tried four more techniques in a fixed order, BUG, X-chains and X-cycles, XY-chains, then forcing chains, going back to the eighteen after every move.

What the solver knowsEvil puzzles finishedExtreme puzzles finished
The helper’s 18 techniques332 of 500 (66.4%)1 of 500
+ BUG3331
+ X-chains and X-cycles347 (69.4%)1

The first 500 lines of each bank, every puzzle checked to have exactly one solution. Each row adds one technique to the row above, so the gains depend on the order: BUG, X-chains, XY-chains, forcing chains. XY-chains take Evil to 377, and forcing chains, which come close to trial and error, finish the rest.

One stall in three

At the first point where the eighteen stall, which happens in 168 of the 500 Evil puzzles, an X-chain or X-cycle exists in 57: 33.9%. In 42 of those the shortest is four cells, a kite or Turbot Fish; in the other 15 it is six. Over every stall, our solver made 94 X-chain moves: 43 2-String Kites, 17 Turbot Fish, 32 six-cell chains and 2 continuous loops. All 75,786 X-chain deductions the search turned up along the way agreed with the solution.

So when you are stuck on an Evil puzzle, an X-chain is worth a look, and the four-cell ones first. They are not a master key, though: they finish 14 more puzzles of 500, and the other 153 need more. On Extreme they do nothing at all. Every Extreme puzzle the eighteen cannot finish, 499 of 500, stalls at the very start, with 57.5 empty cells and on average fewer than one cell holding just two candidates, and none of those starting positions contains a single X-chain.

What can’t these X-chains see?

Our search follows single cells only. It does not use grouped nodes, two or three cells of a box treated as one end of a link, so it misses grouped X-cycles, Empty Rectangles and many finned fish. To see what that costs, we ran pattern overlay at the same 168 first stalls: for each digit, try every way of placing it once in every row, column and box, and remove any candidate that appears in none of them. That catches everything one digit can tell you on its own. It found an elimination at 102 of the stalls; our X-chains found one at 57. The 45 in between are single-digit deductions that need groups, fins or several chains at once.

Overlay is a brute-force check, not a way to solve by hand, but it shows that a stuck board often has more to give on one digit than cell-to-cell chains reach. When the trouble is how the two-candidate cells interlock rather than where one digit can go, try an XY-chain next; the full list of techniques shows where each of these sits.