
Sudoku Algorithms

Chains

Chains are the most complicated Sudoku solving techniques. This strategy is used when no other technique allows solving the Sudoku. A Chain is a sequence of related candidates. Making an assumption on one candidate might affect other candidates in a Chain. If a Chain of implications leads to a contradiction, the assumption can be excluded from the list of possibilities. A Chain is the most powerful and the most complicated Sudoku solving technique.
A picture on the left represents an example of a Chain technique. If we made an assumption that the cell A1 has value '9' then the cell A7 should have value '3', D7 should have value '9', and D2 value '5'. In this case, candidates 9 and 5 can be excluded from the cells B2 and C2. This assumption leads to a contradiction, since in the box (1x1) both cells B2 and C2 cannot have the same value '3'. Since our assumption that cell A1 has value 9 leads to a contradiction, we can remove our assumed value 9 from the list of possible candidates in the cell A1.

Here is another example of a chain (see picture on the left). If we assume that the cell B3 has value '1' then cell G3 should have value '8', G8 should have value '3', and G7 should have value '1'. The value 1 in G7 would lead to a value '8' in cell F7. Value 8 in F7 would exclude candidate 8 from cells E9 and F9, while value 3 in cell G9 would exclude value 3 in E9. It would lead to a contradiction, since two sells E9 and F9 in box (2x3) cannot have the same value '5'. The contradiction allows us to remove the value 1 from the list of candidates in cell B3.

A picture on the left presents a more complicated example of the Chain technique. The solution consists of several steps:
 Step 1: Assume that the cell C1 has value '5'.
 Step 2: Remove value 5 from the list of possible candidates from cells B1 and C3 in the block (1x1) and from cell D1 in the column 1.
 Step 3. Since we had removed 5 from the list of possible candidates in cell B1, the value '4' is a Naked Single candidate in the cell B1, and we can assign value 4 to the cell.
 Step 4: Remove value 4 from the list of possible candidates from cell C3.
 Step 5: Since we had removed hint 5 from the cell C3 in step 2, and a hint 4 in step 4, value '8' is a Naked Single candidate in the cell C3. We can assign value 8 to the cell C3.
 Step 6: Since we had removed 5 from the list of available candidates in the cell D1, value '9' is a Naked Single candidate in the cell D1. We can assign value 9 to the cell D1.
 Step 7: Remove value 9 and 8 from the list of possible candidates from the cell F3, since value 9 is already in the cell D1 and value 8 in the cell C3.
 Step 8: Since we had removed 9 and 8 from the list of available candidates in the cell F3, value '5' is a Naked Single candidate in the cell F3. We can assign value 5 to the cell F3.
 Step 9: Remove 5 from the list of possible candidates in the cell E2, since value 5 is already in the cell’s F3 block (2x1), and assign value '8' to the cell E2, since it is a Naked Single candidate.
 Step 10: Remove 8 from the list of possible candidates in the cell I2, since value 8 is already in the cell’s E2 column 2, and assign value '5' to the cell I2, since it is a Naked Single candidate.
 Step 11: Remove 5 from the list of possible candidates in the cell F9, since value 5 is already in the cell’s F3 row F, and assign value '4' to the cell F9, since it is a Naked Single candidate.
 Step 12: Remove 4 from the list of possible candidates in the cell I9, since value 4 is already in the cell’s F9 column 9, and assign value '5' to the cell I9, since it is a Naked Single candidate.
 Step 13: Now we have a contradiction, since there is value '5' in the cells I2 and I9. That means that our initial assumption was wrong, and we can remove value 5 from the list of hints in the cell C1.
The examples above show that the Chain technique is very effective, but can became pretty complicated with a number of steps growing.


