## XY-chain

The chain is composed of cell which contains 2 candidates. Two adjacent cells in the chain will have one candidate in common. The cell at the beginning and at the end of the chain might have candidates which can be eliminated. These candidates appears in both cells. The following examples will clarify this.

### First Example :

The chain starts at cell C1 with candidates(5,9). The next cell in the chain is E1. The cell E1 and C1 have candidate (2) in common. The third in the chain is I1. The cells I1 and E1 have candidate (2) in common. The chain ends with cell H3, which is connected to cell I1 through candidate (6).

All the cells which can 'see' the beginning and the end of the chain may have candidates which can be removed. In this case it means that de candidate (5) can be removed from cell A3, C3 and G1.

WHY??
Suppose that cell C1 has candidate (5) as solution. This means that de cells A3/C3/G1 cannot have candidate (5) as the solution.
Suppose the cell C1 has candidate (9) as solution. Cell E1 will then have candidate(2) as solution and in cell I1 it will be candidate (6). Therefore cell H3 will get the number (5) as solution. This means again that the cells A3/C3/G1 cannot have candidate (5) as the solution.

So, whatever candidate the solution is of cell C1, the cells A3/C3/G1 can never have de candidate (5) as a solution. Therefore candidate (5) can be removed from these cells.

### Second Example :

This example contains two XY chains.
The first chain starts at cell B2 and ends through D3-D8 at cell B8. The cells B1/B6/B9 can 'see' the beginning and the end of the chain. Both cells at the beginning and the end contain the number (8). This candidate can be removed from the cells B1/B6/B9.

The second chain comprises of the same cells, but the chain starts in this case at cell B3 and end at cell D3. The complete chain is B3-B8-D8-D3. The cells C3/E3/F3 can all 'see' the beginning and the end of the chain. These cells contain candidate (6), which also appear at the end and the beginning of the chain. Therefore candidate (6) can be removed from cells C3/E3/F3.