Theoretically, it may sound inelegant to some players (esp those anti-forcing-chain users). However whenever i apply colouring, i find it makes perfect logical sense. As some of you know, x-wing, swordfish, turbotfish, even the recently proposed skewed swordfish are applications of colouring in a way. Like how wolfgang put it, "In principle it is the same, just another notation." I must stress that however, colouring does cover those techniques and possibly more. Here's an example:
x-wing vs colouring:
- Code: Select all
6 6 6 | . . 6 | 6 . .
. . 6 | 6 . . | . . .
. . 6 | . . . | 6 . .
---------+---------+---------
6 6 6 | . . . | . 6 .
6 6 . | . . . | . 6 .
. . . | . . . | . . .
---------+---------+---------
. . . | . . . | . . .
6 6 . | 6 . 6 | . . .
. . 6 | 6 . . | . . .
Upon finding an x-wing on row 2 and 9, you eliminate four 6s on column 3 and 4.
With colouring,
- Code: Select all
6 6 [6]| . . -6 | 6 . .
. . -6 |+6 . . | . . .
. . [6]| . . . |+-6 . .
---------+---------+---------
6 6 [6]| . . . | . 6 .
6 6 . | . . . | . 6 .
. . . | . . . | . . .
---------+---------+---------
. . . | . . . | . . .
6 6 . |[6] . +6 | . . .
. . +6 |-6 . . | . . .
Case 1:
1) 6 in r2c4
2) 6 in r8c6
3) 6 in r9c3
4) 6 can only be on row 1 in block (1,1) (eliminate 6 in r1c7)
5) 6 in r3c7
Case 2:
1) 6 in r1c6 (or you can start with r2c3 or r9c3 since there are only 2 possibilities on each row for 6s. The result will still be the same)
2a) 6 in r3c7
2b) 6 can only be on column 3 in block (1,1)
3) 6 can only be on row 8 in block (3,1)
4) 6 in r9c4
You would be able to eliminate the same four digits as with the x-wing method and at the same time, fill in the digit 6 in r3c7 upon completion of your application of colouring. Some may argue that hey, after eliminating the four digits, i will be able to see that there are only 1 possible option for 6 in row 3, which is at r3c7. The first advantage of colouring is that it opens up more of the puzzle at the end of your chain of thoughts, as oppose to fixed, defined techniques where u might need to re-examine the puzzle and look for another clue in order to keep you going. I do not plan to go through the comparison with swordfish, turbotfish and skewed swordfish as the concept are the same as the above. But a bit of research and testing will lead you to discover that wherever any of those technique can be applied, colouring can be applied as well.
The second advantage of colouring is that it is a relatively easier technique to apply (imo) as compared to finding a defined pattern. All you need are 2 possibilities of a particular candidate in a row, column or 3x3 block. Start from there and follow the chain.
I'm sure that most, if not all of the sudoku players generate (whether consciously or unconsciously) their own set of algorithm whereby they follow a step-by-step procedure of increasing order of difficulty to solve a puzzle (ie. start looking in puzzle for easiest technique and slowly move up to the more difficult ones). For me, my set of algorithm is simply
i) basic methods (singles, block-row-column elimination, naked pairs/triplets/quads)
ii) solving with 1 candidate involved at a time (ie. colouring)
iii) solving with 2 candidates involved at a time (ie. xy-wing)
iv) solving with 3 candidates involved (ie. xyz-wing)
Many of the hardest puzzles requires only up to ii). Jeff's example in his xyz-wing post which doesn't seem to be able to be solved by simple techniques:
can actually be solved by colouring.
Isolating candidate 4 and apply colouring (or plus-minusing):
- Code: Select all
. . . | . . . | . . .
. . . | 4 . 4 | . . .
. . . | . . . | . . .
---------+---------+---------
. 4 . | . +4 . | . . .
. . . | 4 4 4 | . . +4
+4 . . | . 4 . | . . 4
---------+---------+---------
. 4 . | 4 . 4 | . . .
4 . . | 4 . . |+4 . .
. +4 . | . [4] . |-4 . .
1) 4 can only be at column 2 in block (3,1) (eliminate 4 from r4c2)
2) 4 at r6c1
3) 4 at r5c9
4) 4 at r4c5
5) 4 at r9c2 (optional to solve, but i've a purpose in including this, will show you why later)
Case 2: (4 at r9c7)
Both cases eliminates 4 from r9c5, leaving only 5 as the possible candidate. Hence, i've only used up to ii) in my algorithm, and this puzzle doesn't actually seem as hard as any other puzzle which requires up to ii) as well.
There is also another trick to colouring, whereby you start case1 with one of the pair of candidate in a unit, finish the chain, and start case2 with a candidate of a different pair of which has NOT been used.
To clarify, here's the same example i used earlier:
- Code: Select all
. . . | . . . | . . .
. . . | 4 . 4 | . . .
. . . | . . . | . . .
---------+---------+---------
. 4 . | . +4 . | . . .
. . . | 4 4 4 | . . +4
+4 . . | . 4 . | . . 4
---------+---------+---------
. 4 . | 4 . 4 | . . .
4 . . | 4 . . |+4 . .
. +4 . | . [4] . |-4 . .
Case 2 starting from r9c7 does not seem to get you anywhere further.
However, we know for a fact that if r6c1 is not a 4, then r4c2 MUST be 4. Since the 1st chain involves having 4 in r6c1, we can then start Case2 with:
1) 4 in r4c2
2) 4 in r1c8
3) 4 in r9c7
Hence you should be able to see why i finished up the last bit of the first chain in my first attempt. The occurance of 4 in r9c2 in chain 1, together with the occurance of 4 in r4c2 in this new chain, will enable you to eliminate 4 in r7c2.
Another illustration of this similar trick on the same puzzle..
More candidates can actually be reduced in the same example. Considering possible 2s:
- Code: Select all
. . . | . . . | . . .
2 . +2 |(2) . (2)| . . .
. [2] . | 2 . 2 | . . .
---------+---------+---------
. -2 . | . +2 . | . . .
. . . | . . . | . . .
+2 . . | . -2 . | . . .
---------+---------+---------
. [2] . | 2 . 2 | . . .
2 . 2 | 2 . . |+2 . .
. +2 . | . . . |-2 . .
Case 1: (2 in r8c7)
1) 2 can only be on row 7 in block(3,2) (eliminate 2 from r7c2)
2) 2 in r9c2
3) 2 in r6c1
4a) 2 in r2c3 (note: this eliminates 2 from r2c4 and r2c6)
4b) 2 in r4c5
Case 2: (2 in r4c2, since r6c1 has been used by the first chain)
1a) 2 in r6c5
1b) 2 can only be on row 2 in block(1,1) (eliminate 2 from r2c4 and r2c6)
1c) 2 can only be on row 8 in block(3,1) (eliminate 2 from r8c4 and r8c7)
2) 2 in r9c7
Each of both cases eliminates 2 from r3c2 and r7c2. In addition, another two 2s at r8c4 and r8c7 can be eliminated as well if you follow through the entire chain.
Combining the elimination of candidate 2 & 4 in r7c2, you can then fill in the only possible candidate 9 in r7c2.
Limitations of this technique:
a) Like any other techniques, eliminating candidates with colouring sometimes gets your nowhere. One example would be Addlan's puzzle:
- Code: Select all
. . 2 | . 9 . | 1 . 7
. 3 8 | 6 . . | . . .
4 . . | . . . | . . .
---------+---------+---------
. . . | . . 5 | . . .
. . 9 | . 1 . | 3 . .
. . . | 4 . . | . . .
---------+---------+---------
. . . | . . . | . . 4
. . . | . . 7 | 9 2 .
8 . 6 | . 3 . | 7 . .
This puzzle is beyond ii) and even seems to be beyond iv), hence of course, beyond me (unless by trial and error ) However, i must mention that after technique i) has been exausted, colouring will be able to open up puzzles or reveal more naked/hidden pairs/triplets/quads 90% (modest assumption) of the time.
b) Colouring has its own inelegance occasionally. One particular example (taken from Nick's post:
possible 3s:
- Code: Select all
. . . | 3 . . | . 3 .
. . . | . . . | . . .
. . . | . 3 . | . 3 3
------+-------+------
3 . . | . 3 . | . 3 .
3 . . | . . 3 | . . 3
3 . 3 | . 3 . | . . .
------+-------+------
. . 3 | . . 3 | . . .
3 . 3 | 3 . . | . . .
. . . | . . . | . . .
If we start colouring (plus-minusing) by choosing the pair of 3s at column 4, we would end up fine like what wolfgang achieved:
- Code: Select all
. . . |-3 . . | .[3].
. . . | . . . | . . .
. . . | .[3]. | . 3+3
------+-------+------
3 . . | . 3 . | . 3 .
3 . . | . .+3 | . . 3
3 . 3 | . 3 . | . . .
------+-------+------
. . 3 | . . 3 | . . .
3 . 3 |+3 . . | . . .
. . . | . . . | . . .
Case 1: (3 in r1c4)
1) 3 in r7c6
Case 2: (3 in r3c5)
1) 3 in r1c8
2) 3 in r5c9
3) huh:?: All candidates of 3 in block(2,2) has been eliminated!
In this case, we will meet with inconsistency and hence end up similar with the 'proof by contradiction' technique which people might dislike. However, if it doesn't bother you, this simply means that case2 is invalid and that the candidate of the first digit you chose (3 in r3c5 in this example) for case2 can be eliminated from that cell.
c) Colouring is currently unavailable to pappocom's program and perhaps some other sudoku programs. In the event that u want to use colouring on a sudoku program, you might have to sketch the individual candidates on a paper unless you can visualize the two entire chain in your mind. And for pen-pencil-paper sudoku players, colouring (i use circles and triangles) might be messy if there were long chains.
I am not, in any way, condemning or trying to belittle those who use other defined and established techniques. My post here is to recommend something which is easy to grasp, yet useful for those players who can't be bothered to learn the pattern and tricks of every technique out there. Currently, colouring does not seem popular among sudoku players, which was what driven me to write this.
PS. I just realized how long this post is after previewing again. Sorry for any instances of insanity caused.