# XY-Chain

- Difficulty: Master
- On the web: https://blinku.app/learn/xy-chain

In a chain of two-candidate cells, one end holds its digit, so a cell that sees both ends cannot hold it.

Start at a cell with two candidates: if it isn't A, it's B. A two-candidate cell it sees that also holds B is then its other digit, and so on, cell by cell. If the last cell comes out as A, one end or the other is A, so remove A from the cells that see both ends.

## This example, step by step

```text
  1 2 3   4 5 6   7 8 9
1 9 8 7 | . . . | . 4 5
2 . . 3 | 7 4 . | . . .
3 6 4 . | . . . | . 7 .
  ------+-------+------
4 2 . 5 | 4 . . | 7 . .
5 3 7 4 | 6 . . | . 5 8
6 8 . . | . . 7 | . 2 4
  ------+-------+------
7 4 3 6 | 8 7 5 | 2 9 1
8 7 . . | . 3 4 | 5 8 6
9 . . 8 | 2 6 . | 4 3 7
```

1. **Where to look**: A pointer first: link the marked cells into a chain through 1, 5, 6, and 9.
2. **XY-Chain**: Follow the chain: either row 5, column 7 is 9 or row 9, column 6 is 9, at least one of them. So no cell that shares a group with both ends can be 9.

## In hints

The hint first gives a direction. Blue marks the cells of the chain one by one, and orange strikes remove the digit from the cells that see both ends.
