XY-Chain is another colouring method. If you have understood the principles of colouring,
this method should not be too difficult to spot and apply in-game.

Chains are formed by only using bi-value cells, i.e. cells containing two candidates.
There are two types of links: within a cell and outside of a cell. If, within a cell, only one
candidate has been coloured, then the other must be coloured with the opposite colour. If two candidates are in different cells,
see each other and are the only two candidates within a row, column or a square, we can colour them with different colours.

Please note, that we use a dashed line here purely for better user interface. All links are **strong** and the dashed line
has nothing to do with the **weak** links in X-Cycles.

Let us consider the first chain: **(2, C1)** **⇔** **(9, C1)** **⇔** **(9, D1)**
**⇔** **(1, D1)** **⇔** **(1, D8)** **⇔** **(9, D8)** **⇔**
**(9, E8)** **⇔** **(2, E8)** **⇔** **(2, E7)** **⇔** **(1, E7)**
**⇔** **(1, I7)** **⇔** **(2, I7)**. As with previous colouring strategies,
we do not know which colour is **ON** and which colour is **OFF**.
What we do know is that if **(2, C1)** is **OFF** and **(2, I7)** is **ON**,
then **I1** cannot be **2**. Conversely,
if **(2, C1)** is **ON** and **(2, I7)** is **OFF** then **I1** still cannot be **2**.
In both cases we can eliminate the candidate **2** from **I1**.

The elimination rule for XY-Chains is similar to Rule 1 in X-Cycles. The difference is that we are only allowed to eliminate
candidates from the end-points of the chain, where as in X-Cycles, we can consider any two candidates in the loop.

Load in Solver

In the second example there are two eliminations. Looking at the endpoints of the chain, we see that
**(4, A9)** and **(4, D7)** have different colours.
We know that there will be a **4** in one of these two cells, but we do not in know which one.
However both cells **(4, A7)** and **(4, D9)** see the endpoints of the chain and they cannot have a value of **4**.

Load in Solver