Colouring/Swordfish.

Advanced methods and approaches for solving Sudoku puzzles

Colouring/Swordfish.

Postby Del » Sun Dec 04, 2005 3:32 pm

The relevant page in www.simes.clara.co.uk/programs/sudokutechnique12.htm gives a grid to illustrate the application of the technique of Colouring. I find that one can also apply the Swordfish technique to this grid to eliminate the same two candidates. Both techniques use the proposition of true/false to a chain of cells, so are they truly different?
Can anyone supply a grid to which one could use one technique and not the other?

Regards,
Del.
Del
 
Posts: 13
Joined: 27 October 2005

Postby tso » Sun Dec 04, 2005 7:03 pm

Coloring is more of a *technique* to find exclusions, while Swordfish is a specific *pattern* that can make exclusions. In some cases, coloring might *find* Swordfish. However, very few grids that can be solved by coloring are hiding a Swordfish AND most Swordfish will NOT be found by coloring, at least not by what most people take to be "simple coloring". Taking a random example:

Starting position:
Code: Select all
 *-----------*
 |2..|..4|.8.|
 |.9.|6..|..4|
 |.6.|...|13.|
 |---+---+---|
 |..9|46.|...|
 |3..|.1.|..8|
 |...|.32|7..|
 |---+---+---|
 |.36|...|.9.|
 |7..|..6|.4.|
 |.2.|7..|..3|
 *-----------*


Code: Select all
 *-----------*
 |253|174|986|
 |.9.|6.3|.74|
 |467|...|13.|
 |---+---+---|
 |..9|467|32.|
 |372|.1.|468|
 |64.|832|7.9|
 |---+---+---|
 |.36|24.|.97|
 |7..|396|.4.|
 |924|7..|6.3|
 *-----------*


Here are is a grid showing where a 5 can still go:
Code: Select all
 *--------------------------------------------------*
 | .    .    .    | .    .    .    | .    .    .    |
 | .    .    .    | .    5    .    | 5    .    .    |
 | .    .    .    | 5    5    5    | .    .    5    |
 |----------------+----------------+----------------|
 |r5    .    .    | .    .    .    | .    .   b5    |
 | .    .    .    | 5    .    5    | .    .    .    |
 | .    .   b5    | .    .    .    | .   r5    .    |
 |----------------+----------------+----------------|
 |b5    .    .    | .    .    5    | 5    .    .    |
 | .    .   r5    | .    .    .    |[5]   .    5    |
 | .    .    .    | .    5    5    | .   b5    .    |
 *--------------------------------------------------*


Starting with r4c1, I've colored conjugates opposite colors. But r8c7 is in row 8 with a red cell and box 9 with a blue one. Since either the reds or the blues must be 5s, the 5 in r8c7 can be excluded. This allows further coloring as row 8 now has a pair of conjugates:


Code: Select all
 *--------------------------------------------------*
 | .    .    .    | .    .    .    | .    .    .    |
 | .    .    .    | .    5    .    | 5    .    .    |
 | .    .    .    | 5    5    5    | .    .    5    |
 |----------------+----------------+----------------|
 |r5    .    .    | .    .    .    | .    .   b5    |
 | .    .    .    | 5    .    5    | .    .    .    |
 | .    .   b5    | .    .    .    | .   r5    .    |
 |----------------+----------------+----------------|
 |b5    .    .    | .    .    5    | 5    .    .    |
 | .    .   r5    | .    .    .    | .   .    b5    |
 | .    .    .    | .    5    5    | .   b5    .    |
 *--------------------------------------------------*


Now there are two blue cells in box nine, allowing the exclusion of ALL blue 5s.

No Swordfish here.


Now, as to Swordfish -- in the following grids, the [1]s in brackets form a Swordfish, excluding all other 1s in the three columns they reside in:

Code: Select all
. . . | . 1 . | . . .
. . . | . 1 . | . . .
. .[1]| .[1]. | . . .
------+-------+------
. . . | . . . | . . .
. .[1]| . . . |[1]. .
. . . | . . . | . . .
------+-------+------
. . . | .[1]. |[1]. .
. . . | . 1 . | 1 . .
. . 1 | . 1 . | 1 . .


Code: Select all
. . . | . 1 . | . . .
. . . | . 1 . | . . .
. .[1]| .[1]. | . . .
------+-------+------
. . . | . . . | . . .
. .[1]| . . . |[1]. .
. . . | . . . | . . .
------+-------+------
. .[1]| .[1]. |[1]. .
. . 1 | . 1 . | 1 . .
. . 1 | . 1 . | 1 . .


Code: Select all
. . . | . 1 . | . . .
. . . | . 1 . | . . .
. .[1]| .[1]. | . . .
------+-------+------
. . . | . . . | . . .
. .[1]| .[1]. |[1]. .
. . . | . . . | . . .
------+-------+------
. .[1]| .[1]. |[1]. .
. . 1 | . 1 . | 1 . .
. . 1 | . 1 . | 1 . .


Code: Select all
. . . | . 1 . | . . .
. . . | . 1 . | . . .
. .[1]| .[1]. |[1]. .
------+-------+------
. . . | . . . | . . .
. .[1]| .[1]. |[1]. .
. . . | . . . | . . .
------+-------+------
. .[1]| .[1]. |[1]. .
. . 1 | . 1 . | 1 . .
. . 1 | . 1 . | 1 . .


In the first, "advanced coloring", as described in the link you gave, would still work, the simplest form as demonstrated above would fail.

In the other three, coloring cannot be applied at all. In the last, there isn't a single pair of conjugates in the grid.
tso
 
Posts: 798
Joined: 22 June 2005

Postby Del » Mon Dec 05, 2005 7:20 pm

Thank you very much for your detailed reply. If you don't object I will translate it, (to the best of my ability), for use on a french forum where the topic is currently being discussed.

Regards,
Del.
Del
 
Posts: 13
Joined: 27 October 2005


Return to Advanced solving techniques

cron