## Big fish

Advanced methods and approaches for solving Sudoku puzzles
ronk wrote:Of course, the argument works just as well with the swordfish in r359c124.

Here I'm not following you ronk. Can you explain?

Havard
Havard

Posts: 377
Joined: 25 December 2005

Havard wrote:
ronk wrote:Of course, the argument works just as well with the swordfish in r359c124.

Here I'm not following you ronk. Can you explain?

The (row-defined) swordfish in r359c124 and the complementary (col-defined) jellyfish in r1246c3679 have exactly the same fin cells r3c3 and r3c9 ... so the deductions are the same.

You're probably looking for the deduction chains to be wholly contained within the swordfish ... as they are for the jellyfish. This is not the case, however.
ronk
2012 Supporter

Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

I am not sure, but I think I might have caught the legendary Franken-Squirmbag thought to be extinct for centuries... If this find is confirmed, we need to ask ourselves these questions:

1: Is he tasty?

2: Does he taste so good that we should be fishing for him?

3: Does he have a smaller complimentary fish, and if not is the rule of jellyfish being the biggest fish in the pond under threat?

I found him in the Top95, nr. 72:

Code: Select all
`Squirmbag in columns: 1 2 5 6 8139X   3459X  1359   | 6      7      12     | 249    8      34913789X 3479X  6      | 48     89X    12     | 5      279X   3479789X   2      79-    | 458    589X   3      | 479    6      1---------------------+----------------------+---------------------369X   1      4      | 38     368    7      | 689    5      2679X   679X   8      | 1      2      5      | 3      4      6792      3567   357    | 9      368    4      | 1678   17     678---------------------+----------------------+---------------------13679X 3679X  2      | 357    35     89X    | 468    179X   45685      8      179    | 27     4      6      | 1279   3      794      3679X  379    | 2357   1      89X    | 68     279X   5689X 9X 9  | .  .  .  | 9  .  99X 9X .  | .  9X .  | .  9X 99X .  9- | .  9X .  | 9  .  .---------+----------+---------9X .  .  | .  .  .  | 9  .  .9X 9X .  | .  .  .  | .  .  9.  .  .  | 9  .  .  | .  .  .---------+----------+---------9X 9X .  | .  .  9X | .  9X ..  .  9  | .  .  .  | 9  .  9.  9X 9  | .  .  9X | .  9X .`

Frightful, is he not?

Havard
Havard

Posts: 377
Joined: 25 December 2005

Hi Havard,

There is an XYZ-Wing, followed by an XY-Wing that spoils the fun here:

Code: Select all
`.------------------.------------------.------------------.| 139   3459  1359 | 6     7     12   | 249   8     349  || 13789 3479  6    | 48    89    12   | 5     279   3479 || 789   2     79   | 458   589   3    | 479   6     1    |:------------------+------------------+------------------:| 369   1     4    | 38    368   7    | 689   5     2    || 679   679   8    | 1     2     5    | 3     4     679  || 2     3567  357  | 9     368   4    | 1678 *17    678  |:------------------+------------------+------------------:| 13679 3679  2    | 357   35    89   | 468  -179   4568 || 5     8     179  | 27    4     6    | 1279  3    *79   || 4     3679  379  | 2357  1     89   | 68   *279   568  |'------------------'------------------'------------------'`

However, when I disable XYZ-Wing in my solver, it only discovers the same elimination with a template check, so there is no smaller fish that my solver can catch in this pond.

I nominate this rare creature for the Greenpeace Fish-to-Avoid list, because I think we should leave it alone.

Ruud.
Ruud

Posts: 664
Joined: 28 October 2005

Ruud wrote:I nominate this rare creature for the Greenpeace Fish-to-Avoid list, because I think we should leave it alone.

Ruud.

But being a Norwegian, that is only a bigger incentive to haul it in!

Havard
Havard

Posts: 377
Joined: 25 December 2005

Havard wrote:3: Does he have a smaller complimentary fish, and if not is the rule of jellyfish being the biggest fish in the pond under threat?

Given that r3c3=9 creates an x-wing in r18c79 eliminating all 9s in box 6, I think a smaller [edit: fish] exists. Maybe that's a complementary "franken-swordfish" in r138c379 ... but I couldn't catch one if my life depended on it. I rarely even recognize frankenfish others catch.

[edit: But grouped coloring using the ER in box 9 yields the same exclusion.
Code: Select all
` 9  9  9  |  .  .  .  |  9  .  9       9  9  .  |  .  A  .  |  .  b  9         9  . -9  |  .  a  .  |  9  .  .  ----------+-----------+---------- 9  .  .  |  .  .  .  |  9  .  .   9  9  .  |  .  .  .  |  .  .  9       .  .  .  |  9  .  .  |  .  .  .      ----------+-----------+---------- 9  9  .  |  .  .  9  |  .  B  .         .  .  B  |  .  .  .  |  b  .  b     .  9  9  |  .  .  9  |  .  B  .      `
Since colors A and b share row 2, candidates that see both a and B may be excluded. Therefore, r3c3<>9.]
ronk
2012 Supporter

Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

heh. I revisited the old "is there a simple alternative for this template discovery"-thread to find some nice ponds for my new fishing-tech, and found this puzzle:

Code: Select all
`. . 3 | 6 . . | . 9 7 1 . . | . 9 . | 6 2 3 6 9 . | 2 7 3 | 1 . 5 ------+-------+------ 3 . 6 | . . . | 7 . 9 . 5 . | . 3 9 | . 6 . 4 . 9 | . . 6 | 3 . . ------+-------+------ 9 3 1 | . . 8 | . 7 6 7 4 . | 3 6 . | 9 . . . 6 . | 9 . 7 | . 3 . Mr. Nishio says we can eliminate in R5C34 and R46C8... (marked with -) 8 8 . | . 8 . | 8 . . . 8 8 | 8 . . | . . . . . 8 | . . . | . 8 . ------+-------+------ . 8 . | 8 8 . | .-8 . 8 .-8 |-8 . . | 8 . 8 . 8 . | 8 8 . | .-8 8 ------+-------+------ . . . | . . 8 | . . . . . 8 | . . . | . 8 8 8 . 8 | . . . | 8 . 8 `

Here is the "fish" that will do those eliminations:
Code: Select all
`Cannibalistic Franken-Jellyfish in columns: 1 4 5 7258X   28     3      | 6      1458X  14     | 48X    9      71      78     4578   | 58X    9      45     | 6      2      36      9      48     | 2      7      3      | 1      48     5---------------------+----------------------+---------------------3      128    6      | 1458X  2458X  245    | 7      1458   928X    5      278    | 1478X- 3      9      | 248X   6      12484      1278   9      | 1578X  258X   6      | 3      158    128---------------------+----------------------+---------------------9      3      1      | 45     245    8      | 245    7      67      4      258    | 3      6      125    | 9      18     128258X   6      258    | 9      1245   7      | 2458X  3      12488X  8   .   | .   8X  .   | 8X  .   ..   8   8   | 8X  .   .   | .   .   ..   .   8   | .   .   .   | .   8   .------------+-------------+------------.   8   .   | 8X  8X  .   | .   8   .8X  .   8   | 8X- .   .   | 8X  .   8.   8   .   | 8X  8X  .   | .   8   8------------+-------------+------------.   .   .   | .   .   8   | .   .   ..   .   8   | .   .   .   | .   8   88X  .   8   | .   .   .   | 8X  .   8Franken-Jellyfish in rows: 3 5 8 9258   28    3     | 6     1458  14    | 48    9     71     78    4578  | 58    9     45    | 6     2     36     9     48X   | 2     7     3     | 1     48X   5------------------+-------------------+------------------3     128   6     | 1458  2458  245   | 7     1458- 928X   5     278X  | 147   3     9     | 248X  6     1248X4     1278  9     | 1578  258   6     | 3     158-  128------------------+-------------------+------------------9     3     1     | 45    245   8     | 245   7     67     4     258X  | 3     6     125   | 9     18X   128X258X  6     258X  | 9     1245  7     | 2458X 3     1248X8  8  .  | .  8  .  | 8  .  ..  8  8  | 8  .  .  | .  .  ..  .  8X | .  .  .  | .  8X .---------+----------+---------.  8  .  | 8  8  .  | .  8- .8X .  8X | .  .  .  | 8X .  8X.  8  .  | 8  8  .  | .  8- 8---------+----------+---------.  .  .  | .  .  8  | .  .  ..  .  8X | .  .  .  | .  8X 8X8X .  8X | .  .  .  | 8X .  8XFranken-Squirmbag in columns: 1 2 4 5 7258X  28X   3     | 6     1458X 14    | 48X   9     71     78X   4578  | 58X   9     45    | 6     2     36     9     48    | 2     7     3     | 1     48    5------------------+-------------------+------------------3     128X  6     | 1458X 2458X 245   | 7     145   928X   5     278-  | 147   3     9     | 248X  6     12484     1278X 9     | 1578X 258X  6     | 3     15    128------------------+-------------------+------------------9     3     1     | 45    245   8     | 245   7     67     4     258   | 3     6     125   | 9     18    128258X  6     258   | 9     1245  7     | 2458X 3     12488X 8X .  | .  8X .  | 8X .  ..  8X 8  | 8X .  .  | .  .  ..  .  8  | .  .  .  | .  8  .---------+----------+---------.  8X .  | 8X 8X .  | .  .  .8X .  8- | .  .  .  | 8X .  8.  8X .  | 8X 8X .  | .  .  8---------+----------+---------.  .  .  | .  .  8  | .  .  ..  .  8  | .  .  .  | .  8  88X .  8  | .  .  .  | 8X .  8`

if nothing else, it's good for laughs!

Havard
Havard

Posts: 377
Joined: 25 December 2005

This may have already come up (its been a while since I've gone through the posts), but in starting to think about coding up big fish I came across this schitzophrenic fish. Can't quite seem to figure out which is its body and which is its fin. Nothing big, just a little more fun
Code: Select all
`. . . | . .  . | #  #  . . . . | . .  . | #  #  . . . . | . .  . | #  #  . ------+--------+-|--|--- . . . | . X# . | |  |  * . . . | * |  * | X# X# . . . . | . |  . | |  |  . ------+---|----+-|--|--- . . . | . |  . | |  |  . . . . | . |  . | |  |  . . . . | . X  . | X  X  . `
Last edited by Mike Barker on Sat May 06, 2006 10:07 am, edited 1 time in total.
Mike Barker

Posts: 458
Joined: 22 January 2006

Mike Barker wrote:This may have already come up (its been a while since I've gone through the posts), but in starting to thing about coding up big fish I came across this schitzophrenic fish. Can't quite seem to figure out which is its body and which is its fin. Nothing big, just a little more fun
Code: Select all
`. . . | . .  . | #  #  . . . . | . .  . | #  #  . . . . | . .  . | #  #  . ------+--------+-|--|--- . . . | . X# . | |  |  * . . . | * |  * | X# X# . . . . | . |  . | |  |  . ------+---|----+-|--|--- . . . | . |  . | |  |  . . . . | . |  . | |  |  . . . . | . X  . | X  X  . `

This is what you would call a frankenfish type 1 AND type 2...

The type 1 is the same as an ER in this case, and is responsible for the elimination in r4c9. (the whole box 6 can be full of candidates, and it will still be valid.) The other two was pointed out by MJ as a type 2, and can have an additional 2 candidates in box5 along the fish-line, and still be valid. Here you satisfy both conditions, and hence you get the best(?) of two worlds...

Havard
Havard

Posts: 377
Joined: 25 December 2005

I think of your "frankenfish" in terms of Almost Constraint Subsets (ACS). The constraint subset principle applies to the following:
Code: Select all
` . . . | . . . | X X *  . . . | . . . | X X *  . . . | . . . | X X * -------+-------+-|-|---  . . . | . . . | | | .  * * * | * X * | X X *  . . . | . | . | | | . -------+---|---+-|-|---  . . . | . | . | | | .  . . . | . | . | | | .  * * * | * X * | X X *Fig. 1 (no extra candidates) `

Because all candidates in three units of set A (c5,c7,c8) are "covered" by three units of set B (b3,r5,r9), all other candidates in set B may be excluded as shown.

If extra candidates -- limited in number and existing only at certain locations -- prevent constraint subsets, then we have almost constraint subsets. Consider the following "frankefish type 1":
Code: Select all
` . . . | . . . | X X .  . . . | . . . | X X .  . . . | . . . | X X . -------+-------+-|-|---  . . . | . . . | | | .  . . . | . X . | X X .  . . . | . | . | | | . -------+---|---+-|-|---  . . . | . | . | # # *  . . . | . | . | # # *  . . . | . X . | X X *  Fig. 2 (if an extra candidate '#' is ultimately true)`

There are two possiblities, either
1. one of the extra candidates is ultimately true, and any candidate that sees all extras may be excluded, or
2. none of the extra candidates is ultimately true, and the Constraint Subsets and exclusions of Fig. 1 apply.
Exclusions common to both possibilities are then valid, and for this example ...
Code: Select all
` . . . | . . . | X X .  . . . | . . . | X X .  . . . | . . . | X X . -------+-------+-|-|---  . . . | . . . | | | .  . . . | . X . | X X .  . . . | . | . | | | . -------+---|---+-|-|---  . . . | . | . | # # .  . . . | . | . | # # .  . . . | . X . | X X *  Fig. 3 (whether or not an extra candidate '#' is ultimately true)`

... r9c9<>X is true in either case.

An identical argument may be made for "frankenfish type 2".
Code: Select all
` . . . | . . . | X X .  . . . | . . . | X X .  . . . | . . . | X X . -------+-------+-|-|---  . . . | . # . | | | .  . . . | * X * | X X .  . . . | . # . | | | . -------+---|---+-|-|---  . . . | . | . | | | .  . . . | . | . | | | .  . . . | . X . | X X .  Fig. 4 `

P.S. Havard, this is the type of logic argument I was looking for in our earlier discussion. Of course, I was expecting your argument to be in "fish" terms.
ronk
2012 Supporter

Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Havard, in trying to understand some of your eliminations here it seems you are using something beyond what I understood to be Frankenfish, but which are still valid. It seems like you've got the following Frankenfish

Code: Select all
`Franken Swordfish . . . | * X * | X X *  . . . | * X * | X X *  . . . | * X * | X X * -------+-------+-|-|---  . . . | . . . | | | *  * * * | * . * | X X *  . . . | . . . | . . * -------+-------+-------  . . . | . . . | . . .  . . . | . . . | . . .  . . . | . . . | . . . which is easy to show based on contraint sets {C5, C7, C8} are covered by {B2, B3, R5} or {B2, B3, B6}`

Code: Select all
`Franken Jellyfish . . . | * X X | X X *  . . . | * X X | X X *  . . . | * X X | X X * -------+---|-|-+-|-|---  . . . | . | | | | | .  * * * | * X X | X X *  . . . | . | | | | | . -------+---|-|-+-|-|---  . . . | . | | | | | .  . . . | . | | | | | .  * * * | * X X | X X * which is again easy to show based on contraint sets {C5, C6, C7, C8} are covered by {B2, B3,  R5, R9}`

Code: Select all
`Franken Jellyfish . . . | . . . | X X *  * X * | * X * | X X *  . | . | . | . | X X * ---|---+---|---+-|-|---  . | . | . | . | | | .  * X * | * X * | X X *  . | . | . | . | | | . ---|---+---|---+-|-|---  . | . | . | . | | | .  . | . | . | . | | | .  * X * | * X * | X X * let me try almost constraint sets.  if the digit is in r2c2, then the remaining elements of the fish {C5, C7, C8} can be covered by {B3, R5, R9}.  if the digit is not in r2c2 then the remaining elements of the fish {C2, C5, C7, C8} can be covered by {B2, B3, R5, R9}.  In either case the eliminations as shown are possible.`

Code: Select all
`Franken Jellyfish . . . | . # . | X X .  . X . | * X * | X X .  . | . | . # . | X X . ---|---+---|---+-|-|---  . | . | . | . | | | .  . X . | . X . | X X .  . | . | . | . | | | . ---|---+---|---+-|-|---  . | . | . | . | | | .  . | . | . | . | | | .  . X . | . X . | X X .again with almost constraint sets if a fin element contains the digit then the eliminations can be made.  If not then we have the previous situation and the two eliminations can still be made. `

So, Havard, did I miss the memo, have you been holding out on us, or am I missing something? I'm still trying to apply these rules to your Franken Jellyfish - it looks right, I'm just not there yet. On the other hand your cannabalistic jellyfish is, as I pointed out previously, a finned swordfish:
Code: Select all
`+------------------+------------------+-------------------+| *258    28     3 |     6 *1458   14 |   *48     9     7 ||    1    78  4578 |    58     9   45 |     6     2     3 ||    6     9    48 |     2     7    3 |     1    48     5 |+------------------+------------------+-------------------+|    3   128     6 |  1458 *2458  245 |     7  1458     9 ||  *28     5   278 | -1478     3    9 |  *248     6  1248 ||    4  1278     9 |  1578  *258    6 |     3   158   128 |+------------------+------------------+-------------------+|    9     3     1 |    45   245    8 |   245     7     6 ||    7     4   258 |     3     6  125 |     9    18   128 || *258     6   258 |     9  1245    7 | *2458     3  1248 |+------------------+------------------+-------------------+`

and your Frankensquirmbag is a generalized VWXYZ-wing. Since this is not a fish, I'm not sure its a valid comparison, but I still need to work on my Frankenfish detector to understand what it is if only fish are considered.
Code: Select all
`+------------------+------------------+------------------+|  258    28     3 |     6  1458   14 |    48    9     7 ||    1    78  4578 |    58     9   45 |     6    2     3 ||    6     9    48 |     2     7    3 |     1   48     5 |+------------------+------------------+------------------+|    3   128     6 |  1458  2458  245 |     7 *145     9 ||  #28     5  -278 |   147     3    9 |  *248    6 *1248 ||    4  1278     9 |  1578   258    6 |     3  *15   128 |+------------------+------------------+------------------+|    9     3     1 |    45   245    8 |   245    7     6 ||    7     4   258 |     3     6  125 |     9   18   128 ||  258     6   258 |     9  1245    7 |  2458    3  1248 |+------------------+------------------+------------------+`

Thanks for the examples. Maybe someday I'll catch up with you.

Ron, thanks for the demonstration of almost constraint sets. When I first looked at constraint sets based on your suggestion here, I felt in my heart that they should be applicable to Frankenfish, but didn't know how. Your demonstration of almost constraint sets was great.
Last edited by Mike Barker on Wed May 10, 2006 8:02 am, edited 1 time in total.
Mike Barker

Posts: 458
Joined: 22 January 2006

Mike Barker wrote:
Code: Select all
`Franken Jellyfish . . . | . . . | X X *  * X * | * X * | X X *  . | . | . | . | X X * ---|---+---|---+-|-|---  . | . | . | . | | | .  * X * | * X * | X X *  . | . | . | . | | | . ---|---+---|---+-|-|---  . | . | . | . | | | .  . | . | . | . | | | .  * X * | * X * | X X * let me try almost constraint sets.  if the digit is in r2c2, then the remaining elements of the fish {C5, C7, C8} can be covered by {B3, R5, R9}.  if the digit is not in r2c2 then the remaining elements of the fish {C2, C5, C7, C8} can be covered by {B2, B3, R5, R9}.  In either case the eliminations as shown are possible.`

While not incorrect, the "almost" is not necessary. Columns 2, 5, 7 and 8 are simply covered by box 3 and rows 2, 5 and 9. And since box 3 and row 2 intersect, r2c7<>X and r2c8<>X are valid exclusions too.

Mike Barker wrote:
Code: Select all
`Franken Jellyfish . . . | . # . | X X .  . X . | * X * | X X .  . | . | . # . | X X . ---|---+---|---+-|-|---  . | . | . | . | | | .  . X . | . X . | X X .  . | . | . | . | | | . ---|---+---|---+-|-|---  . | . | . | . | | | .  . | . | . | . | | | .  . X . | . X . | X X .again with almost constraint sets if a fin element contains the digit then the eliminations can be made.  If not then we have the previous situation and the two eliminations can still be made. `

That's a true "almost" constraint set.

Mike Barker wrote:Ron, thanks for the demonstration of almost constraint sets. When I first looked at constraint sets based on your suggestion here, I felt in my heart that they should be applicable to Frankenfish, but didn't know how. Your demonstration of almost constraint sets was great.

You're welcome. I came upon the almost constraint set outlook because I just wasn't getting frankenfish (still not, I guess). I found myself always "backtesting" Havard's exclusions because they weren't obvious. It was too much like T&E. That said, like you, I haven't yet made ACS cover (pun intended) all of Havard's exclusions.

P.S. Your link is broken ... due to a missing '#' (repaired in the quote above).
ronk
2012 Supporter

Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Mike Barker wrote:
Code: Select all
`Franken Jellyfish . . . | . . . |  X  X *  * X * | * X * | *X *X *  . | . | . | . |  X  X * ---|---+---|---+--|--|---  . | . | . | . |  |  | .  * X * | * X * |  X  X *  . | . | . | . |  |  | . ---|---+---|---+--|--|---  . | . | . | . |  |  | .  . | . | . | . |  |  | .  * X * | * X * |  X  X * `

If that's a franken jellyfish (r2c78<>X added), then the following should be too.

Code: Select all
`Franken Jellyfish ??? . * . | . * . | X  X (.) . X---|---X . |(.)(.)(.) . * . | . * . | X  X (.)-------+-------+---------  . * . | . * . | *  *  .  . X---|---X---|-X--X  .  . * . | . * . | *  *  . -------+-------+---------  . * . | . * . | *  *  .  . * . | . * . | *  *  .  . X---|---X---|-X--X  . cells of box 3 are also be part of the fish`

But I can't catch frankenfish. Can anyone?
ronk
2012 Supporter

Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Based on the way you've drawn it, it looks at first that A={R2, R5, R8, B3} is covered by B={C2, C5, C7, C8}, but that is only true if r13c9 do not contain the digit (note by construction r2c789 do not). So without the added constraint I don't believe the fish is valid.

Code: Select all
` . * . | . * . | X X . ---X---|---X---|-------  . * . | . * . | X X . -------+-------+-------  . * . | . * . | * * . ---X---|---X---|-X-X---  . * . | . * . | * * . -------+-------+-------  . * . | . * . | * * .  . * . | . * . | * * . ---X---|---X---|-X-X---`
Mike Barker

Posts: 458
Joined: 22 January 2006

Mike Barker wrote:that is only true if r13c9 do not contain the digit (note by construction r2c789 do not).

I mean those cells to be without candidates, but wasn't sure how to illustrate it. I edited the post using MJ's "(.)" for the empty cells in box 3, but like the following better.
Code: Select all
` . * . | . * . | X  X  -  - X - | - X - | -  -  -  . * . | . * . | X  X  - -------+-------+---------  . * . | . * . | *  *  .  - X - | - X - | X  X  -  . * . | . * . | *  *  . -------+-------+---------  . * . | . * . | *  *  .  . * . | . * . | *  *  .  - X - | - X - | X  X  - '-' indicates cells void of candidate X'*' indicates cells for potential candidate X exclusions`

Mike Barker wrote:it looks at first that A={R2, R5, R8, B3} is covered by B={C2, C5, C7, C8}

I figured you'd pick up on that right away, but I'm actually looking for someone to explain the exclusions in frankenfish terms ... not constraint set terms.
ronk
2012 Supporter

Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

PreviousNext