I've just upgraded my solver to handle arguments of this type, which I call 'Conditional Disjoint Subsets', as one of two possible disjoint subsets is created depending upon the value in some cell. This puzzle is particularly interesting as it involves a classic
Two-Sector Disjoint Subsets pattern, two conditional patterns and a disjoint subset that's dependent upon a forcing chain. (
bennys - you didn't mention that the puzzle is still difficult to solve after your elimination
).
Here's the log for the tricky first six moves:
- Code: Select all
1. Consider the chain r1c8-1-r1c6~1~r9c6-1-r9c8.
The cell r9c8 must contain the value 1 if the cell r1c8 doesn't.
Therefore, these two cells are the only candidates for the value 1 in Column 8.
- The moves r2c8:=1 and r8c8:=1 have been eliminated.
Consider the chain r1c6-1-r1c8-1-r9c8-1-r9c6.
The cell r9c6 must contain the value 1 if the cell r1c6 doesn't.
Therefore, these two cells are the only candidates for the value 1 in Column 6.
- The moves r2c6:=1 and r8c6:=1 have been eliminated.
The cells r8c7 and r8c8 contain 1 value from {1,3} and 1 value from {2,5,7}.
The values 1 and 3 occupy 2 of the cells r8c7, r8c8 and r8c4 in some order.
- The moves r8c5:=3 and r8c6:=3 have been eliminated.
Consider the cell r8c4.
When it contains the value 1, the value 7 in Row 8 must appear in the cells r8c3, r8c6 or r8c7.
When it contains the value 3, the value 7 in Box 8 must appear in the cells r8c6 or r9c5.
Whichever value it contains, the cell r8c5 cannot contain the value 7.
When it contains the value 1, the value 8 in Row 8 must appear in the cells r8c3, r8c6 or r8c7.
When it contains the value 3, the value 8 in Box 8 must appear in the cells r8c6 or r9c5.
Whichever value it contains, the cell r8c5 cannot contain the value 8.
- The moves r8c5:=7 and r8c5:=8 have been eliminated.
The value 5 is the only candidate for the cell r8c5.
2. The cell r2c8 is the only candidate for the value 5 in Column 8.
3. The cell r3c3 is the only candidate for the value 5 in Row 3.
4. The cell r7c9 is the only candidate for the value 5 in Row 7.
5. Consider the chain r3c5~2~r3c9-2-r4c9-2-r4c6-2-r5c5.
When the cell r3c5 contains the value 2, so does the cell r5c5 - a contradiction.
Therefore, the cell r3c5 cannot contain the value 2.
- The move r3c5:=2 has been eliminated.
Consider the chain r8c8-2-r5c8-2-r4c9-2-r4c6-3-r4c4-3-r8c4-3-r8c8.
The cell r8c8 must contain the value 3 if it doesn't contain the value 2.
Therefore, these two values are the only candidates for the cell r8c8.
- The move r8c8:=7 has been eliminated.
The value 7 in Column 7 must lie in Box 9.
- The moves r2c7:=7 and r3c7:=7 have been eliminated.
Consider the chain r4c4-3-r8c4-3-r8c8-2-r5c8-2-r5c5.
The cells r4c4 and r5c5 contain one value from the set {3,2} and the value 6.
The value 6 occupies 1 of the cells r4c4 and r5c5.
- The move r4c6:=6 has been eliminated.
Consider the chain r1c6-1-r9c6-1-r8c4-1-r8c7-7-r8c6.
When the cell r1c6 contains the value 7, so does the cell r8c6 - a contradiction.
Therefore, the cell r1c6 cannot contain the value 7.
- The move r1c6:=7 has been eliminated.
The values 2, 3, 7 and 8 occupy the cells r2c5, r2c6, r3c5 and r3c6 in some order.
- The moves r2c5:=6, r2c6:=6, r3c5:=6 and r3c6:=6 have been eliminated.
The cell r3c7 is the only candidate for the value 6 in Row 3.
6. The values 1, 6 and 9 occupy the cells r1c6, r7c6 and r9c6 in some order.
- The moves r7c6:=7, r9c6:=3 and r9c6:=8 have been eliminated.
Consider the chain r3c6-2-r3c9-2-r4c9-2-r4c6.
The cell r4c6 must contain the value 2 if the cell r3c6 doesn't.
Therefore, these two cells are the only candidates for the value 2 in Column 6.
- The move r2c6:=2 has been eliminated.
The values 1, 2, 3, 6 and 9 occupy the cells r1c6, r3c6, r4c6, r7c6 and r9c6 in some order.
- The move r3c6:=7 has been eliminated.
Consider the cell r3c5.
When it contains the value 7, the value 2 in Column 5 must appear in the cells r5c5 or r7c5.
When it contains the value 3, the value 2 in Box 2 must appear in the cells r1c6, r2c4 or r3c6.
Whichever value it contains, the cell r2c5 cannot contain the value 2.
- The move r2c5:=2 has been eliminated.
The cell r2c7 is the only candidate for the value 2 in Row 2.