## Weird Fish

Advanced methods and approaches for solving Sudoku puzzles

### Weird Fish

For a week or so now I have been under the suspicion that I may be, on occasion, misapplying the swordfish construct. As until now I have misapplied it correctly (?!), I've blundered on waiting for the one to catch me out. It just turned up.

6 9 * * 7 8 2 * *
* 7 * * * 2 * 6 *
2 * * * 4 6 * * 9
* 1 * 2 6 * 3 * *
* * * 4 1 5 * * *
* * 6 8 * * * 2 *
7 * * * 8 * * * 2
* 4 * 6 * * * 5 *
* * * 7 * * * 8 3

I've made the original clues bold type and the six initial entries added by myself normal type.

I know there are many possible ways in at this point, but I want to concentrate on the 'swordfish' (if indeed it is one) made up of candidate 2's in cells r5c2, r5c3, r8c3, r8c5, r9c2, r9c3 and finally r9c5. My obviously flawed reading of this arrangement is that r9c3 can be removed as a candidate, as the conjugate pairing system described by so many excellent commentators seems to indicate that a candidate 2 in this cell is incorrect. Sadly, this is not the case, as a quick check indicated that the correct entry for cell r9c3 is indeed a 2.

Could someone please educate me as to how I have misunderstood the construct?
Karyobin

Posts: 396
Joined: 18 June 2005

First, the swordfish technique is not required to solve this puzzle. (That doesn't mean you are prevented from applying it.)

When looking for a swordfish, the first thing to try and find are three rows that each contain exactly two occurences of a given candidate. If you can't find any rows that satisfy this condition, look for columns that might.

In your puzzle, looking at the candidate 2's, we have the following.

Code: Select all
` . . . | . . . | . . . . . . | . . . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . 2 2 | . . . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . . 2 | . 2 . | . . . . 2 2 | . 2 . | . . .`

Row 5 has two candidate 2's and row 8 has two candidate 2's, but row 9 has three candidate 2's. We can't find a swordfish by looking at the rows, so lets try the columns. Column 2 has two candidate 2's and column 5 has two candidate 2's but column 3 has three candidate 2's. So there is not a swordfish present in the candidate 2's.

Let's look at the candidate 6's.

Code: Select all
` . . . | . . . | . . . . . . | . . . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . . . | . . . | 6 . 6 . . . | . . . | . . .-------+-------+------- . 6 . | . . . | 6 . . . . . | . . . | . . . . 6 . | . . . | 6 . .`

Let's look at the columns first. Column 2 has two candidate 6's but column 7 has three candidate 6's and column 9 has one candidate 6. We can't find a swordfish by looking at the columns, so lets try the rows. Row 5 has two candidate 6's, row 7 has two candidate 6's, and row 9 has two candidate 6's. The first set of conditions are satisfied!

When looking for a swordfish, once you have found three rows that each contain exactly two occurences of a given candidate, these three rows must share exactly three columns and each shared column must contain exactly two candidates in the rows being examined. (Or vice versa, found three columns... these three columns must share exactly three rows and each shared row must contain exactly two candidates in the columns being examined.)

Let's look at the rows of candidate 6's. The three rows (5, 7, and 9) share three columns (2, 7, and 9) but only column 2 contains exactly two candidate 6's in the rows being examined. Since the second condition cannot be satisifed, there is not a swordfish present in the candidate 6's.

I hope this explanation helped show why there isn't a swordfish present (at this point in the puzzle). If I have some more time, I'll post an example (with another detailed explanation) of a puzzle that requires the swordfish technique.

Update: Corrected a mistake.
Last edited by scrose on Sat Jul 02, 2005 10:13 am, edited 2 times in total.
scrose

Posts: 322
Joined: 31 May 2005

### Re: Weird Fish

Karyobin wrote:For a week or so now I have been under the suspicion that I may be, on occasion, misapplying the swordfish construct. As until now I have misapplied it correctly (?!), I've blundered on waiting for the one to catch me out. It just turned up.

6 9 * * 7 8 2 * *
* 7 * * * 2 * 6 *
2 * * * 4 6 * * 9
* 1 * 2 6 * 3 * *
* * * 4 1 5 * * *
* * 6 8 * * * 2 *
7 * * * 8 * * * 2
* 4 * 6 * * * 5 *
* * * 7 * * * 8 3

I've made the original clues bold type and the six initial entries added by myself normal type.

I know there are many possible ways in at this point, but I want to concentrate on the 'swordfish' (if indeed it is one) made up of candidate 2's in cells r5c2, r5c3, r8c3, r8c5, r9c2, r9c3 and finally r9c5. My obviously flawed reading of this arrangement is that r9c3 can be removed as a candidate, as the conjugate pairing system described by so many excellent commentators seems to indicate that a candidate 2 in this cell is incorrect. Sadly, this is not the case, as a quick check indicated that the correct entry for cell r9c3 is indeed a 2.

Could someone please educate me as to how I have misunderstood the construct?

Karyobin as far as I understand it a Swordfish should comprise three columns of two candidates in each column, whereas you have a column of three candidates.
There are other threads on the site that will explain it in better terms.

Looking at the puzzle I think the placement of the '2s' can be explained by the intersection of two potential x-wings at a common point.

X-wing A: (r5c2)(r5c3)(r9c2)(r9c3)
X-wing B: (r8c3)(r8c5)(r9c3)(r9c5)

The common point intersection is: (r9c3)

If we place a 2 in (r5c3) then a 2 goes in (r9c2) with the 2 eliminated from the common point (r9c3).
If the two is eliminated from the common point (r9c3) then (r9c5) must be a 2 this leads to a contradiction with a 2 in both (r9c2) and (r9c5).
Therefore (r5c3) cannot have a 2, therefore the 2 must go in (r5c2).
MCC

Posts: 1275
Joined: 08 June 2005

### Re: Weird Fish

Karyobin wrote:Could someone please educate me as to how I have misunderstood the construct?

You don't seem to have it nailed yet.

These are the 2s candidates at this point...
Code: Select all
`...|...|......|...|......|...|...-----------...|...|....22|...|......|...|...-----------...|...|.....2|.2.|....22|.2.|...`

The 2s in rows 5 & 8 form a conjugate pairs but not the 2s in row 9 (because there are three of them). Likewise, in the columns there are only 2 columns with conjugate pairs so it's not possible to construct a swordfish pattern here.

Have a look here for more on the swordfish pattern.

Edit: looks like three of us were typing together - and I was the slowest
angusj

Posts: 306
Joined: 12 June 2005

### Re: Weird Fish

MCC wrote:If we place a 2 in (r5c3) then a 2 goes in (r9c2) with the 2 eliminated from the common point (r9c3).
If the two is eliminated from the common point (r9c3) then (r9c5) must be a 2 this leads to a contradiction

No, this is not correct because r8c5 would then be 2 (not r9c5).
There is absolutely nothing you can do to safely eliminate 2s at this point.
angusj

Posts: 306
Joined: 12 June 2005

Well done you three, top stuff as always.

In fact I already understood the necessity of there being only two candidates in each row and column, but I must admit to always seeking for ways to bend the rules or, to be more specific, searching for similar distributions of candidates repeated in two or more puzzles. This can, inevitably, lead to numbers occasionally coming out of my bottom (as in this case). I shall, in future, be more rigorous with my application of tactics.
Karyobin

Posts: 396
Joined: 18 June 2005

scrose wrote:
Code: Select all
` . . . | . . . | . . . . . . | . . . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . 2 2 | . . . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . . 2 | . 2 . | . . . . 2 2 | . 2 . | . . .`

Row 5 has two candidate 2's and row 8 has two candidate 2's, but row 9 has three candidate 2's. We can't find a swordfish by looking at the rows

Actually, we can. It would work even the board looked like this, provided e.g. there are no more 2's in the rows:
Code: Select all
` . . . | . . . | . . . . . . | . . . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . 2 2 | . 2 . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . 2 2 | . 2 . | . . . . 2 2 | . 2 . | . . .`

We know that there must be three 2 in those 9 cells, one per column. Therefore candidate 2's can be removed from all other cells sharing the columns.
Nick70

Posts: 156
Joined: 16 June 2005

Nick70 wrote:
scrose wrote:We can't find a swordfish by looking at the rows

Actually, we can.

Actually, I'd have to agree with scrose unless my understanding of the swordfish definition is wrong.

However, you make a very valid (?new) observation that (no more than) three candidates in three rows sharing three columns safely excludes any other candidates in those columns. And of course this technique equally applies rotated 90deg (ie three candidates in three columns ...).

Edit: On further reflection, I'm tending to believe that my understanding of the swordfish definition was wrong by not being sufficiently generalised.
angusj

Posts: 306
Joined: 12 June 2005

Nick70 wrote:We know that there must be three 2 in those 9 cells, one per column. Therefore candidate 2's can be removed from all other cells sharing the columns.

Nick70, I agree with what you're saying, but I don't think your method gets us any further in the puzzle we were discussing. The candidates 2's shown below were the only candidates 2's left in the puzzle at that point. We could try to apply the method you suggested, but there simply aren't any candidate 2's to eliminate because the only ones present are contained in three rows/columns.

Code: Select all
` . . . | . . . | . . . . . . | . . . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . 2 2 | . . . | . . . . . . | . . . | . . .-------+-------+------- . . . | . . . | . . . . . 2 | . 2 . | . . . . 2 2 | . 2 . | . . .`
scrose

Posts: 322
Joined: 31 May 2005

scrose wrote:Nick70, I agree with what you're saying, but I don't think your method gets us any further in the puzzle we were discussing.

That's true. I was only pointing out that the commonly used definition of swordfish is unnecessarily restrictive (angusj, I think you had it right).
Nick70

Posts: 156
Joined: 16 June 2005

Nick70 wrote:I was only pointing out that the commonly used definition of swordfish is unnecessarily restrictive.

Because I was counting on that restrictive definition, my reasoning was incorrect when I said that the swordfish technique could not be applied as a result of row 9 having three candidate 2's.

Here is an example I cooked up that can be used to demonstrate your method. At least, I think it can...

Code: Select all
` . 4 4 | . . . | 4 . . 4 . . | . . . | . 4 4 . . . | 4 . 4 | . . .-------+-------+------- 4 . 4 | . . . | . 4 4 . . . | 4 . 4 | . . . . 4 4 | . . . | 4 . .-------+-------+------- . 4 4 | . . . | 4 . . 4 4 . | . 4 . | 4 . . 4 . . | . 4 . | . 4 .`
scrose

Posts: 322
Joined: 31 May 2005

Here are two real examples of Swordfishes where one of the rows has three possibilities instead of two.

Code: Select all
`..8.9.1.5.316.....4.............5.....3.1.6.....4.............7.....742.8.9.6.3....2.8.1.7.386.....9.............5.....6.1.3.....4.............4.....792.8.1.3.6..`
Nick70

Posts: 156
Joined: 16 June 2005

Nick70 wrote:Here are two real examples of Swordfishes where one of the rows has three possibilities instead of two.

Excellent examples, thanks Nick70!
Also, I'm no longer of the opinion that x-wing & swordfish are related to or are a variation of the coloring technique.
angusj

Posts: 306
Joined: 12 June 2005

Nick70 wrote:Here are two real examples of Swordfishes where one of the rows has three possibilities instead of two.
angusj wrote: Excellent examples, thanks Nick70!

Excellent examples, indeed! The first example took me a couple minutes until my brain adjusted to looking for a more general pattern. My perspective has broadened again.
scrose

Posts: 322
Joined: 31 May 2005

angusj wrote:Excellent examples, thanks Nick70!
Also, I'm no longer of the opinion that x-wing & swordfish are related to or are a variation of the coloring technique.

My pleasure

You are correct that swordfish is not a special case of coloring. Coloring requires pairs, while swordfish in general works on triplets. They are two completely different things, though some special swordfishes can be detected by coloring.

X-Wing however can be detected by coloring (+ recoloring), because it needs pairs. Coloring + recoloring is a rather advanced techinque however, so it's more natural to see it as a X-Wing.
Nick70

Posts: 156
Joined: 16 June 2005

Next