Swordfish--Please explain

Advanced methods and approaches for solving Sudoku puzzles

Swordfish--Please explain

Postby sheila08 » Thu Dec 15, 2005 7:48 pm

I would really appreciate someone's taking the time to explain to me in simple English what a Swordfish is. I for some reason don't get it. Perhaps I, like Pooh, have a little brain? Anyway, could someone please help? Thank you.

Cheers, Sheila
sheila08
 
Posts: 27
Joined: 08 July 2005

Re: Swordfish--Please explain

Postby angusj » Thu Dec 15, 2005 10:22 pm

sheila08 wrote:I would really appreciate someone's taking the time to explain to me in simple English what a Swordfish is.


Description:
http://angusj.com/sudoku/hints.php#swordfish
Proof:
http://forum.enjoysudoku.com/viewtopic.php?p=13113#p13113
angusj
 
Posts: 306
Joined: 12 June 2005

Re: Swordfish--Please explain

Postby QBasicMac » Thu Dec 15, 2005 11:30 pm

sheila08 wrote:in simple English


Hi - I live in Tysons Corner. Does one say "Cheers" in Alexandria?

You have to first be keeping accurate pencilmarks. I presume you know that.

OK, you try to find a digit such that there are three rows that have only two or three occurrences of the digit in the row, such as
xx5 x5x 5xx <1
xxx xxx xxx
xx5 x5x xxx <2

xxx xxx xxx
xx5 xxx 5xx <3

xx^ x^x ^xx < The columns involved

Notice that I chose the case where, in such rows, the 5's appear in the same column. (5 means some candidates which include a 5)

xx5 x5x 5xx
xxx x5x xx5
xxx xxx xxx
xx5 x5x xxx

would NOT be a swordfish. There are some 5's that are not in the same column.

OK, having found a swordfish, you can now eliminate all other 5's in the columns involved.

xx5 x5x 5xx < row of swordfish
xxx xxx xxx
xx5 x5x xxx < row of swordfish

xxx xxx xxx
xx5 xxx 5xx < row of swordfish
xx5 xxx xxx <----Can eliminate that 5.

xxx xxx xxx
xxx x5x xxx <----Can eliminate that 5.
xxx xxx xxx

That's about it, except the same is true if you use columns and rows, i.e. rotate the puzzle 90 degrees.

Mac
QBasicMac
 
Posts: 441
Joined: 13 July 2005

Postby sweetbix » Sat Dec 17, 2005 9:20 pm

Code: Select all
xx5 x5x 5xx < row of swordfish
xxx xxx xxx
xx5 x5x xxx < row of swordfish

xxx xxx xxx
xx5 xxx 5xx < row of swordfish
xx5 xxx xxx <----Can eliminate that 5.

xxx xxx xxx
xxx x5x xxx <----Can eliminate that 5.
xxx xxx xxx

OR can a swordfish have just one cell in a row?

Code: Select all
xx5 x5x 5xx <----Can eliminate those 5s
xxx xxx xxx
xx5 x5x xxx <----Can eliminate those 5s

xxx xxx xxx
xx5 xxx 5xx < row of swordfish
xx5 xxx xxx < row of swordfish

xxx xxx xxx
xxx x5x xxx < row of swordfish
xxx xxx xxx


Also in another example given before can a swordfish be all in one band?

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


OR
Code: Select all
. . . | . 1 . | . . .
. . . | . 1 . | . . .
. . 1 | . 1 . | 1 . .
------+-------+------
. . . | . . . | . . .
. . 1 | . 1 . | 1 . .
. . . | . . . | . . .
------+-------+------
. .[1]| .[1]. |[1]. .
. .[1]|. [1]. |[1] . .
. .[1]| .[1]. |[1]. . 
sweetbix
 
Posts: 58
Joined: 10 December 2005

Postby ronk » Sat Dec 17, 2005 9:46 pm

sweetbix wrote:OR can a swordfish have just one cell in a row?

That's a degenerative case that's not normally considered a true swordfish.

If a row has only one cell with candidate x (naked single or hidden single), that cell can be set to candidate x and the "swordfish" degenerates into an x-wing.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby QBasicMac » Sun Dec 18, 2005 4:14 am

sweetbix wrote:
Code: Select all
xx5 x5x 5xx <----Can eliminate those 5s
xxx xxx xxx
xx5 x5x xxx <----Can eliminate those 5s

xxx xxx xxx
xx5 xxx 5xx < row of swordfish
xx5 xxx xxx < row of swordfish

xxx xxx xxx
xxx x5x xxx < row of swordfish
xxx xxx xxx



ronk already said this, but I will repeat another way

If, in solving the puzzle, you see
xxx x5x xxx

you would immediately place "5" in the cell as a solution. Often, that leads to immediate solution of the whole puzzle so you never happen to see that there was a swordfish pattern. It is not necessary to find swordfishes or X-Wings or anything else complex if simple stuff solves the puzzle.

Mac
QBasicMac
 
Posts: 441
Joined: 13 July 2005

Postby QBasicMac » Sun Dec 18, 2005 4:25 am

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



Interesting question to me as I haven't run across this pattern yet. It may be that something in the nature of SuDoku puzzles rules out this ever occurring. Or it just might be it is rare.

But if it does occur, I see no reason why it wouldn't be a valid swordfish. Maybe someone else disagrees. (?)
Mac
QBasicMac
 
Posts: 441
Joined: 13 July 2005

Postby Shazbot » Sun Dec 18, 2005 5:01 am

A swordfish where EVERY ONE of the 9 intersecting cells contains the candidate? I see no reason why that wouldn't be possible. And it's not a problem either, as a swordfish pattern allows you to eliminate candidates from OTHER cells, not place a candidate within the pattern. I don't recall that I've ever come across one though. An idea you COULD try is to look for this sort of pattern very early in the puzzle - the more candidates you eliminate via other means (as ronk says, reducing the swordfish to something more simple), the fewer there are to occupy those 9 cells.

Though if you wanted a swordfish where each intersecting cell was in a different box, as in your illustration, you'd need a puzzle that had one number without any clues to begin with.
Shazbot
 
Posts: 220
Joined: 24 September 2005

Postby sweetbix » Sun Dec 18, 2005 9:43 am

I just used these examples because they had been posted e.g. xxx x5x xxx was in your example QBasicMac and I wondered why you had used it.

I asked the question because the examples look like you can use the swordfish two conflicting ways.
Code: Select all
. . . | . 1 . | . . .
. . . | . 1 . | . . .
. .[1]| .[1]. |[1]. .
------+-------+------
. . . | . . . | . . .
. .[1]| .[1]. |[1]. .
. . . | . . . | . . .
------+-------+------
. .[1]| .[1]. |[1]. .
. . 1 | . 1 . | 1 . .
. . 1 | . 1 . | 1 . .   

This way eliminates all 1s except the middle 3 rows


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

and this way eliminates all 1s except the bottom 3 rows.

They can't both be right, as this would leave only row 7 with 1s.

Is it just the way they've been set for an example i.e. there's no 1 possibility in column 1 or 2 or 8 or 9, so if these were all in then some of these rows wouldn't be swordfish?
sweetbix
 
Posts: 58
Joined: 10 December 2005

Postby Shazbot » Sun Dec 18, 2005 9:48 am

I believe Mac has only shown you the candidate 1s that are affected - either the ones that make up the swordfish or the ones that can be eliminated because of it. Obviously, rows 4 and 6, and columns 1, 2, 4, 6, 8 and 9 must have 1s as well, but they're not shown for simplicity (though yes it can be confusing if you're thinking what's shown are the only places for a 1 in the grid).
Shazbot
 
Posts: 220
Joined: 24 September 2005

Postby sweetbix » Sun Dec 18, 2005 9:58 am

The grid with 1s was from another example by tso.

If the missing 1s are in the empty rows then in that case they won't affect the swordfish. I'm still not sure how to see the swordfish in the 1s given in the grid. It looks to me like there are two ways which can't both be right.
sweetbix
 
Posts: 58
Joined: 10 December 2005

Postby ronk » Sun Dec 18, 2005 11:42 am

sweetbix wrote:The grid with 1s was from another example by tso.

But neither grid with 1s is a real world example, and I think it's a disservice to use such illustrations. Look at your first grid with 1s...
Code: Select all
. . . | . 1 . | . . .
. . . | . 1 . | . . .
. .[1]| .[1]. |[1]. .
------+-------+------
. . . | . . . | . . .
. .[1]| .[1]. |[1]. .
. . . | . . . | . . .
------+-------+------
. .[1]| .[1]. |[1]. .
. . 1 | . 1 . | 1 . .
. . 1 | . 1 . | 1 . . 

The absence of candidates in columns 8 and 9 would mean there are placements in those columns. Assuming these two placements *are not* in box 9, they would necessarily be in boxes 3 and 6 ... meaning there would be *no* candidates in those boxes ... but there are.

And BTW, a naked single that's not yet placed is still a candidate.
Last edited by ronk on Sun Dec 18, 2005 9:20 am, edited 1 time in total.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby sweetbix » Sun Dec 18, 2005 12:59 pm

This example is not from a real puzzle. It came from this discussion http://forum.enjoysudoku.com/viewtopic.php?p=15349#p15349 and it was intended to explain swordfish.

Perhaps you have answered my question. When you see an example like the one given do you just assume that it means something like this?
Code: Select all
1 1 . | 1 1 1 | . 1 1
1 1 . | 1 1 1 | . 1 1
. .[1]| .[1]. |[1]. .
------+-------+------
1 1 . | 1 . 1 | . 1 1
. .[1]| .[1]. |[1]. .
1 1 . | 1 . 1 | . 1 1
------+-------+------
. .[1]| .[1]. |[1]. .
1 1 1 | 1 1 1 | 1 1 1
1 1 1 | 1 1 1 | 1 1 1 
sweetbix
 
Posts: 58
Joined: 10 December 2005

Postby ronk » Sun Dec 18, 2005 1:38 pm

sweetbix wrote:Perhaps you have answered my question. When you see an example like the one given do you just assume that it means something like this?

Yes. The location of the swordfish is usually clear and I tend to visualize a grid like this ...
Code: Select all
. . * | . * . | * . .
. . * | . * . | * . .
. . 1 | . 1 . | 1 . .
------+-------+------
. . * | . * . | * . .
. . 1 | . 1 . | 1 . .
. . * | . * . | * . .
------+-------+------
. . 1 | . 1 . | 1 . .
. . * | . * . | * . .
. . * | . * . | * . . 

... as no other 1s in the rows defining the swordfish is obvious. Then with potential eliminations only in the columns of the swordfish (the '*' cells), I have no concern about possible candidates elsewhere. Much less clutter on the grid ... and in the brain too, I guess.:)
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby QBasicMac » Sun Dec 18, 2005 5:18 pm

Err, glad that you're still able to figure out what's the question, ronk. Carry on!

I got confused a few posts back and am totally lost. Don't bother to explain:D I lost interest.

Mac
QBasicMac
 
Posts: 441
Joined: 13 July 2005

Next

Return to Advanced solving techniques