Fishes & Single Digit Techniques

X-Wing, Swordfish, Jellyfish, Squirmbag...

These forms a family of related techniques where the locations for some possibility in rows and columns are considered.

The simplest pattern is the X-Wing where 2 rows and 2 columns are involved. In this example, R2 and R8 forms an X-Wing on possibility 6 for C1 and C5. The 6 of R2 must go either in C1 or C5 as do the 6 of R8. We don't know yet in which of the two cells the 6 will go for each row, but whichever the case, there will be a 6 in both two columns : either R2C1 and R8C5 will have 6 or R2C5 and R8C1 will have 6. Therefore, no other cell in C1 and C5 may have a 6 : R13..79C15 can't have 6, which forces R9C1 to be 3 and unlocks this puzzle. The cells forming the X-Wing will be at opposite diagonals corners of R28C15, in an X shape, hence the name. This is not too hard to spot since the cells forms a rectangle.

Here is another X-Wing, this time rotated, looking columns by columns instead of rows by rows. Here we have 2 columns C5 and C9 with only 2 possible locations in the same rows R2 and R9 for possibility 7. Therefore R29C1..46..8 can't have 7, which forces R2C2 to 8.

A Swordfish is an extension to this technique, involving 3 rows and 3 columns for some value. In this example, only the cells forming the Swordish are highlighted for the sake of clarity. There are only 3 same columns (C129) where a 9 may go in 3 rows (R347). Whichever the location of the 9 in the 3 rows, all of the 3 columns will have a 9 locked in these 3 rows. Therefore, no other cells of C129 may be 9. So R125689C129 can't have a 9, which forces R9C9 to 8 and unlocks this puzzle.

Like for naked and hidden triplets, quads... not all rows (or columns) need to have the possibility for each of the columns (or rows). Here R4 has only 2 possible locations for a 9. Anyhow, this still forms a Swordfish.

The Jellyfish involves 4 rows and 4 columns. In this example R3689 and C1348 forms a Jellyfish on 3, so we can remove 3 from the other cells of C1348.

The Squirmbag involves 5 rows and 5 columns. For a 3x3 Sudoku, this is indeed never searched. Like for naked and hidden subsets, there will always be a corresponding Jellyfish looking the other way, columns by columns instead or rows by rows or vice-versa.

The log will list basic fishes as rows and columns forms a fish on X -> not elsewhere in columns (or vice-versa).
For the first example, this gives : R28 and C15 forms an X-Wing on 6 -> not elsewhere in C15

Note: Basic fishes are in fact just a positional equivalent of a subset. Indeed, JSudoku uses the same algorithm for all subsets based solvers.

See also: Generalized X-Wing, Swordfish (222)

Skyscraper

The skyscraper pattern is a particular case of a turbot fish. It is very similar to the X-Wing, except it allows elminination on fewer cells only.

Here is an example of a skyscraper on 6:

The 6 for C1 is locked in two cells: R59C1. One of these cells must contain a 6. This is called a strong link alias conjugate pair.
The 6 for C6 is locked in R69C6, which also forms a strong link.
R9C16 cannot both contain a 6 since they are in R9. This is called a weak link.
Therefore R5C1 or R6C6 must contain a 6. Possibly both R5C1 and R6C6 contain 6.
Whichever the case, neither R5C45 nor R6C3 may be 6 (nor could R6C2) since they are buddies of both R5C1 and R6C6.

JSudoku uses Alternating Inference Chains (AIC) internally and the log uses Eureka notation:

(6): R5C1=R9C1-R9C6=R6C6 -> R5C45,R6C3<>6

Notice that a strong link is usually also a weak link, but not always as in the Empty Rectangle.

When all 3 links are strong links, the same deduction could be obtained using Simple coloring. Each of the successive nodes of the AIC having alternating colors.

Two String Kite

The Two String Kite pattern is another particular case of a turbot fish where the strong links are located in one row and one column and the weak link goes through a block / nonet.

This example from the same puzzle shows a Two String Kite pattern on 8:

R1C38 forms a strong link in R1
R37C1 forms a strong link in C1
R1C3 and R3C1 are weak linked through N1
Therefore at least one of R1C8 or R7C1 = 8.
Whichever the case R7C8 cannot be 8 since it is a buddy of both R1C8 and R7C1:

(8): R1C8=R1C3-R3C1=R7C1 -> R7C8<>8

Turbot Fish

The Turbot fish is a generalization of the Skyscraper and Two String Kite where the strong and weak links may be in any house.

This example shows a Turbot Fish on 9:

R57C6 forms a strong link in C6
R5C7,R6C8 forms a strong link in N6
R5C67 are weak linked through R5
Therefore at least one of R7C6 or R6C8 = 9.
Whichever the case R7C8 cannot be 9 since it is a buddy of both R7C6 and R6C8:

(9): R7C6=R5C6-R5C7=R6C8 -> R7C8<>9

Turbot Chain alias X-Chain

Following the AIC logic, we may form longer chains provided we alternate strong and weak links.

Any of the simpler Turbot Fish here over forms itself a strong chain since at least one of the end nodes of that chain must hold the digit. One of the end nodes of this strong chain may itself be weak linked to another strong link (or even chain !) to forms a longer strong chain. JSudoku will search for such chains of up to 4 strong links and 3 weak links, but it's usually a last ressort technique and it's unlikely it will solve the puzzle by logic.

Here is an example of a Turbot Chain on 3:

The end nodes of the chain are in R1C4 and R5C8. The strong links are in C4, R9 and R5. The weak links are in N8 and C9.

(3): R1C4=R8C4-R9C6=R9C9-R5C9=R5C8 -> R1C8<>3

Notice it can also be viewed as a two string kite in C4 & R9 weak linked to the strong link in R5.
Or a skyscraper in R5 & R9 weak linked to the strong link in C4.

Generalized X-Wing

This is a generalization of the X-Wing, Swordfish, Jellyfish which is more frequent is some variants like Diagonal Sudoku. It is based on strong links and uses the same AIC logic as Turbot fish and chains. The only difference beeing it forms a continuous loop, the two end nodes are also connected through a weak link. But this simple difference allows much more eliminations since each of the weak link in the loop must hold the value locked within the cells of the loop and consequently we can eliminate the value from all other cells for each weak link. In other words, each of the links in the continuous AIC loop becomes strong links.

As a simple example, compares a Skycraper with a regular X-Wing. If the two end cells of the skyscraper were located in the the same row (or column), then it would form an X-Wing and would also allow eliminating the value from all other cells in in both rows (or columns). Indeed, an X-Wing also forms a continuous AIC. The first X-Wing on 6 in R28C15 can be written as:

(6): ...R2C1=R2C5-R8C5=R8C1... -> R9C1,R379C5<>6

Here is an example of a Generalized X-Wing on 5 for a Sudoku-X with the Strong Links displayed:

The 5 for R7 is locked in R7C39 and the 5 for D\ is locked in R5C5,R9C9. Since R79C9 are in C9 and R5C5,R7C3 are in D/, this forms a continuous loop. Therefore no other cells of C9 and D/ may contain 5:

(5): ...R7C3=R7C9-R9C9=R5C5... -> R3C7,R46C9<>5

This pattern could allow further eliminations in R9C8 and R5C3. JSudoku will no do all eliminations at once, but will later remove them using some simpler technique. It will remove 5 from R9C8 by simple Intersection of C9 and N9. It will remove 5 from R5C3 by Pointing Pair on D/. In fact this can also be viewed as Generalized X-Wing with N9 and D/. JSudoku may see one or the other depending its internal state.

Notice JSudoku will never see a real Generalized X-Wing in a vanilla sudoku. Indeed the only case for vanilla in the basic X-Wing since it only has rows, columns and blocks/nonets.

Generalized Swordfish (222), Jellyfish (2222)...

The Generalized Swordfish is limited to the case where each house forming the pattern contains only two cells because the technique is based on strong links. This is indicated by the (222). Here is an example of a Generalized Swordfish on 2:

The 2 for C1 is locked in R26C1, the 2 for C4 is locked in R16C4, the 2 for R3 is locked in R3C26. These are the 3 strong links. The weak links (dotted lines) goes through N1, N2 and R6. Since each of the strong links is weak linked to the others, this forms a continuous loop:

(2): ...R2C1=R6C1-R6C4=R1C4-R3C6=R3C2... -> R12C2,R2C6,R6C29<>2

Because it forms a continuous loop, the 2 is locked within the loop's cells for all three weak links:
2 for N1 locked in R2C1,R3C2 -> R12C2<>2
2 for N2 locked in R1C4,R3C6 -> R2C6<>2
2 for R6 locked in R6C14 -> R6C29<>2

This can be extended to Generalized Jellyfish, which is a rarity.

This solver is extended for Killer Sudoku

Finned and Sashimi X-Wing

The Finned X-Wing is an hybrid of a basic X-Wing and a Skyscraper, so it's not too hard to spot and understand. The difference with a basic X-Wing is that one of the row (or column) contains extra cell(s) locked within the same block/nonet. These extra cell(s) forms the fin.

Here is an example of a Finned X-Wing on 4:

The 4 for C2 is locked in R569C2, the 4 for C5 is locked in R69C5. R9C25 are weak linked through R9. Thus at least one of R56C2 or R6C5 must hold a 4, possibly both R5C2 and R6C5. Whichever the case, R6C13 can't be 4 since they are buddies of all these three cells. The fin here is the single cell at R5C2 (but it could have been the two cells at R45C2).

Another way to view this pattern: either the fin R5C2 contains 4 or we have a basic X-Wing in R69C25.

The Sashimi X-Wing is exactly the same as the Finned X-Wing except it lacks the cell that would form a basic X-Wing. Nevertheless, the logic is the same and allows exaclty the same eliminations. JSudoku does not make any difference between the two and list them both as Finned X-Wing.

Notice that a Skyscraper can be viewed as a Sashimi X-Wing. In the above example, if R6C2 were not having 4, it would have formed a Sashimi X-Wing allowing exactly the same eliminations. It would also have formed a Skyscraper, this time allowing more potential eliminations in R5C46.

Note: the Finned X-Wing is a particular case of a Grouped Turbot Fish, just like the Skyscraper is a particular case of a regular Turbot Fish.

Finned and Sashimi Swordfish, Jellyfish...

Here is an example of a Finned Swordfish on 8:

The 8 of R248 is locked in C245 or in the fin in R8C3. Either R8C3 contains 8 or R248C245 forms a basic Swordfish. Whichever the case R9C2 can't be 8.

Here is an example of a Sashimi Jellyfish on 3:

The 3 of R1367 is locked in C2359 or in the fin in R7C1. Either R7C1 contains 3 or R1367C2359 forms a basic Jellyfish. Therefore R8C3 can't be 3. Since R7C3 lacks the candidate 3, it forms a sashimi Jellyfish.

Empty Rectangle

The Empty Rectangle pattern is formed by candidate for some block/nonet locked in one mini-row plus one mini-column and a strong link in a row (or column).

Here is an Empty Rectangle pattern for candidate 8:

The 8 for N1 is locked in R1C13 or R123C3. The empty rectangle is R23C12. The 8 for C7 is locked in R16C7 which forms a strong link. Since in R1C13 and R1C7 cannot both hold a 8 (weak link), at least one of R123C3 or R6C7 must hold a 8, possibly both. Whichever the case, R6C3 cannot have a 8 since it's a buddy of all four cells R123C3, R6C7.

JSudoku uses Grouped strong links internally and will log the AIC:

(8): R123C3=R1C13-R1C7=R6C7 -> R6C3<>8

Note: this is a particular case of a Grouped Trubot Fish where the Empty Rectange forms a grouped strong link in the block/nonet. This is a strong-only link: there is strong inference between (8)R123C3 and (8)R1C13 (if one is false, the other must be true), but there is no weak inference since they share R1C3 (both can be true when R1C3=8).

Grouped Turbot Fishes and Chains alias Weak Colors, Hinge

These are extensions to the Tubot Fish using grouped strong links.

Here is a Grouped Turbot Fish on 9 which is very similar to a Two String Kite:

The 9 for C2 is locked either in R2C2 or in one of R45C2 (grouped strong link). The 9 for R6 is locked in R6C14 (regular strong link). R45C2 and R6C1 cannot both contain a 9 (weak link in N4). Therefore R2C2 or R6C4 must contain a 9, possibly both. Whichever the case, R2C4 can't be 9 since it's a buddy of these two cells.

(9): R2C2=R45C2-R6C1=R6C4 -> R2C4<>9

Grouped X-Wing, Swordfish (222), Jellyfish (2222)...

These are extensions to the Generalized X-Wing using grouped strong links

Examples to come...


Simple Techniques | Fishes & Single Digit | Wings | XY-Chains, Loops & ALS | Uniqueness | Jigsaw, Windoku & Gatai | Greater/Less Than & Non-Consecutive | Killer | Innies/Outies | Advanced Killer | Square Wisdom | Contents

Copyright (C) 2006-2008 Jean-Christophe Godart. All rights reserved.