Solving Tips

XY-Chain Technique: Chain Reasoning with Bi-value Cells

2025-06-05 · 10 min read

XY-Chain is a powerful chain reasoning method among advanced Sudoku techniques. It is an extension of the XY-Wing, using chain structures formed by multiple bi-value cells (cells with only two candidates) for candidate elimination.

Core Principle:
An XY-Chain consists of a series of bi-value cells where adjacent cells share one candidate. The start and end of the chain each have an unshared candidate. If these two numbers are the same (called Z), then cells that can see both the chain start and end can eliminate candidate Z. This is because: following the chain logic, Z must appear in either the chain start or end.
XY-Chain Principle Animation
XY-Chain Principle: Start{Z,A} and End{C,Z} share candidate Z, Z must be at Start or End, eliminate Z from common visible area

Before reading this article, it's recommended to understand Sudoku naming conventions, Naked Pairs, and XY-Wing basics.

Structure of XY-Chain

XY-Chain contains the following key elements:

  • Chain Nodes: Each node is a bi-value cell {A,B}
  • Chain Links: Adjacent nodes must "see" each other (same row, column, or box) and share one candidate
  • Chain Start and End: Each has one candidate not shared with its adjacent node
  • Elimination Condition: When the unshared candidates of chain start and end are the same, elimination can occur

Chain notation: A(x,y) → B(y,z) → C(z,w) → ... where parentheses contain candidates, arrows show chain direction, and adjacent nodes share one number (like y, z).

Why Does XY-Chain Work?

1 Chain Propagation: Suppose the chain is A{X,Y} → B{Y,Z} → C{Z,W}. If A=X, then B must =Z (since B cannot =Y), then C must =W (since C cannot =Z).
2 Two Possibilities: The chain start has two candidates {P,Q}, where Q is shared with the next node. If chain start =P, reasoning ends; if chain start =Q, the logic propagates along the chain to the end.
3 Key Conclusion: If the chain start's unshared number P equals the chain end's unshared number, then P must appear in either the chain start or end.
4 Elimination Target: Cells that can see both chain start and end cannot contain P (because P must be in chain start or end).

Example 1: 4-Node XY-Chain

Let's look at a simple 4-node XY-Chain example.

XY-Chain Example 1
Figure 1: XY-Chain R2C2{3,7} → R2C6{3,5} → R9C6{2,5} → R9C7{2,7}, can eliminate 7 from R2C7
Open this example in solver

Analysis Process

1 Identify Chain Nodes:
  • R2C2: candidates {3, 7} (chain start)
  • R2C6: candidates {3, 5}
  • R9C6: candidates {2, 5}
  • R9C7: candidates {2, 7} (chain end)
2 Verify Chain Links:
  • R2C2 and R2C6 are in the same row (Row 2), sharing candidate 3
  • R2C6 and R9C6 are in the same column (Column 6), sharing candidate 5
  • R9C6 and R9C7 are in the same row (Row 9), sharing candidate 2
3 Determine Elimination Number:
  • Chain start R2C2{3,7}'s unshared number = 7 (3 is shared with R2C6)
  • Chain end R9C7{2,7}'s unshared number = 7 (2 is shared with R9C6)
  • They're the same! Z = 7
4 Reasoning Process:
  • If R2C2=7 → 7 is in chain start
  • If R2C2=3 → R2C6 cannot be 3 → R2C6=5 → R9C6 cannot be 5 → R9C6=2 → R9C7 cannot be 2 → R9C7=7 → 7 is in chain end
  • Either way, 7 must be in R2C2 or R9C7
5 Find Elimination Target: R2C7 can see both chain start R2C2 (same row) and chain end R9C7 (same column).
Conclusion:
XY-Chain: R2C2{3,7} → R2C6{3,5} → R9C6{2,5} → R9C7{2,7}
Can eliminate candidate 7 from R2C7.

Example 2: 10-Node Long Chain

XY-Chains can be very long. Here's a 10-node example demonstrating the powerful chain reasoning ability.

XY-Chain Example 2
Figure 2: XY-Chain R2C5{1,5} → R2C1{1,5} → R1C1{5,8} → R1C7{7,8} → R3C7{7,8} → R3C2{4,8} → R7C2{4,8} → R8C1{4,8} → R8C7{4,9} → R8C3{5,9}, can eliminate 5 from R8C5
Open this example in solver

Analysis Process

1 Identify Chain Nodes (10 nodes):
  • R2C5: {1, 5} (chain start)
  • R2C1: {1, 5}
  • R1C1: {5, 8}
  • R1C7: {7, 8}
  • R3C7: {7, 8}
  • R3C2: {4, 8}
  • R7C2: {4, 8}
  • R8C1: {4, 8}
  • R8C7: {4, 9}
  • R8C3: {5, 9} (chain end)
2 Verify Chain Links:
  • R2C5 → R2C1: same row, sharing 1 (or 5)
  • R2C1 → R1C1: same column, sharing 5
  • R1C1 → R1C7: same row, sharing 8
  • R1C7 → R3C7: same column, sharing 7 (or 8)
  • R3C7 → R3C2: same row, sharing 8
  • R3C2 → R7C2: same column, sharing 4 (or 8)
  • R7C2 → R8C1: same box, sharing 8
  • R8C1 → R8C7: same row, sharing 4
  • R8C7 → R8C3: same row, sharing 9
3 Determine Elimination Number:
  • Chain start R2C5{1,5}'s unshared number = 5 (1 is shared with R2C1)
  • Chain end R8C3{5,9}'s unshared number = 5 (9 is shared with R8C7)
  • They're the same! Z = 5
4 Reasoning Conclusion: Whether chain start R2C5 is 1 or 5, candidate 5 must appear in either chain start R2C5 or chain end R8C3.
5 Find Elimination Target: R8C5 can see both chain start R2C5 (same column) and chain end R8C3 (same row).
Conclusion:
XY-Chain (10 nodes): R2C5 → R2C1 → R1C1 → R1C7 → R3C7 → R3C2 → R7C2 → R8C1 → R8C7 → R8C3
Can eliminate candidate 5 from R8C5.

How to Find XY-Chains?

Finding XY-Chains requires a systematic approach:

1 Mark Bi-value Cells: First identify all cells with only two candidates.
2 Choose Starting Point: Select a bi-value cell as chain start, record its two candidates {P,Q}.
3 Extend the Chain: Find bi-value cells that can "see" the current node and share one candidate as the next node.
4 Check Termination Condition: After each extension, check if the chain end's unshared number equals the chain start's unshared number P.
5 Find Elimination Targets: Find cells that can see both chain start and end and contain P.
Important Notes:
  • Every node in the chain must be a bi-value cell
  • Adjacent nodes must see each other (same row, column, or box)
  • Adjacent nodes must share one candidate
  • Elimination condition: chain start and end's unshared candidates are the same
  • XY-Wing is a special case of XY-Chain (a chain of length 3)

Relationship Between XY-Chain and XY-Wing

XY-Wing can be viewed as an XY-Chain of length 3:

  • XY-Wing: Pivot{X,Y} → Wing1{X,Z} → Wing2{Y,Z}... etc., this is not actually standard chain form
  • Actual Relationship: XY-Wing structure is "Y"-shaped, while XY-Chain is linear
  • Common Point: Both use bi-value cells for logical elimination
  • Difference: XY-Chain requires chain connection, XY-Wing requires pivot to see both wings

Technique Summary

Key points for applying XY-Chain:

  • Node Requirement: All nodes are bi-value cells
  • Connection Requirement: Adjacent nodes can see each other and share one candidate
  • Elimination Condition: Chain start and end's unshared candidates are the same
  • Elimination Target: The shared candidate in cells that can see both chain start and end
  • Chain Length: Theoretically unlimited, longer chains are harder to find but more powerful
Practice Now:
Start a Sudoku game and try using XY-Chain for elimination! First find all bi-value cells, then try to connect them into a chain.