Sudoku Swordfish Technique Explained: The 3x3 Extension of X-Wing
Swordfish is an extended version of X-Wing, and is a more complex and powerful advanced Sudoku technique. Its name comes from the shape of a swordfish, as this technique involves three rows and three columns, forming a larger pattern than X-Wing. The core principle is: when a candidate appears in three rows, each appearing in no more than three columns, and these three columns are the same, that candidate can be eliminated from other cells in those three columns.
If a digit appears in rows A, B, and C only in certain positions within columns X, Y, and Z (each row appearing in at most two or three of these columns), then this digit must occupy certain positions within columns X, Y, and Z across these three rows. Therefore, other cells in columns X, Y, and Z (not in these three rows) cannot contain this digit.
Swordfish Rule
If a candidate appears across three rows only in the same three column positions,
Then that candidate can be eliminated from other rows in those three columns (not in the Swordfish's three rows).
Before reading this article, we recommend mastering the X-Wing technique, as Swordfish is a direct extension of X-Wing.
Case Analysis: Row-Based Swordfish
Let's examine a Swordfish example involving candidate 4 in rows 2, 4, and 8.
Current Board Data
Based on the CSV81 format candidate data, let's focus on the distribution of candidate 4 in rows 2, 4, and 8:
Row 2 cells:
- R2C1: Given digit 2
- R2C2: Candidates {1, 4}
- R2C3: Candidates {1, 4}
- R2C4: Candidates {5, 7}
- R2C5: Candidates {6, 8}
- R2C6: Candidates {6, 8}
- R2C7: Given digit 3
- R2C8: Candidates {5, 7}
- R2C9: Given digit 9
Row 4 cells:
- R4C1: Given digit 1
- R4C2: Given digit 8
- R4C3: Candidates {2, 4}
- R4C4: Filled digit 3
- R4C5: Candidates {4, 5}
- R4C6: Given digit 9
- R4C7: Candidates {2, 5}
- R4C8: Filled digit 6
- R4C9: Given digit 7
Row 8 cells:
- R8C1: Given digit 9
- R8C2: Candidates {1, 2, 4, 5, 7}
- R8C3: Candidates {1, 2, 4}
- R8C4: Candidates {1, 5, 7}
- R8C5: Candidates {4, 5, 7}
- R8C6: Given digit 3
- R8C7: Given digit 6
- R8C8: Candidates {2, 5, 7}
- R8C9: Filled digit 8
Analysis Process
- Row 2: column 2 ✓, column 3 ✓ (two columns)
- Row 4: column 3 ✓, column 5 ✓ (two columns)
- Row 8: column 2 ✓, column 3 ✓, column 5 ✓ (three columns)
Combined, the three rows only involve columns 2, 3, and 5, which forms a Swordfish pattern.
- R6C2: Candidates {2, 4, 5}
- R7C2: Candidates {1, 2, 4, 5, 6, 7}
- R9C2: Candidates {2, 4, 5, 6, 7}
In column 5, besides rows 4 and 8, there are other cells containing candidate 4:
- R6C5: Candidates {1, 4, 8}
- R7C5: Candidates {2, 4, 5, 6, 7}
- R6C2: Remove candidate 4 (keep 2,5)
- R7C2: Remove candidate 4 (keep 1,2,5,6,7)
- R9C2: Remove candidate 4 (keep 2,5,6,7)
- R6C5: Remove candidate 4 (keep 1,8)
- R7C5: Remove candidate 4 (keep 2,5,6,7)
Swordfish: In rows 2, 4, and 8, candidate 4 is distributed only in columns 2, 3, and 5.
Action: Remove candidate 4 from R6C2, R7C2, R9C2, R6C5, R7C5.
Key Characteristics of Swordfish
1. Not Every Row Needs to Appear in All Three Columns
This is an important distinction between Swordfish and X-Wing:
- X-Wing: In two rows, each row has the candidate appearing in exactly the same two columns
- Swordfish: In three rows, each row can have the candidate appearing in 2 or 3 of the columns, as long as combined they don't exceed three columns
In the example above, row 2 has candidate 4 only in columns 2 and 3, row 4 only in columns 3 and 5, and row 8 in columns 2, 3, and 5. Although no single row has the candidate in exactly two columns, the three rows combined cover columns 2, 3, and 5, which is sufficient to form a Swordfish.
2. Number of Columns Must Equal Number of Rows
Swordfish requires three rows corresponding to three columns (or three columns corresponding to three rows):
- If the candidate in three rows only involves two columns, it's an incomplete pattern and cannot use Swordfish
- If the candidate in three rows involves four columns, it also cannot form a Swordfish
- It must be exactly a three-row-three-column correspondence
Two Forms of Swordfish
Similar to X-Wing, Swordfish also has two symmetric forms:
1. Row-Based Swordfish
This is the situation in the example above:
- Observation target: Three rows
- Pattern characteristic: A candidate appears in these three rows only in the same three columns (or two of them)
- Elimination target: Remove the candidate from other rows in these three columns
2. Column-Based Swordfish
Opposite form but same principle:
- Observation target: Three columns
- Pattern characteristic: A candidate appears in these three columns only in the same three rows (or two of them)
- Elimination target: Remove the candidate from other columns in these three rows
Row-based Swordfish eliminates columns, column-based Swordfish eliminates rows.
This is completely consistent with X-Wing rules, just extended from 2x2 to 3x3.
How to Find Swordfish?
Finding Swordfish is more difficult than X-Wing and requires more systematic analysis:
- Swordfish requires exactly three rows (or three columns), involving exactly three columns (or three rows)
- Each row can have the candidate appearing in 2 or 3 columns, but combined the three rows cannot exceed three columns
- If a row has the candidate appearing in 4 or more positions, it's usually not suitable for forming a Swordfish
- Swordfish is very rare and won't appear in most Sudoku puzzles
- Finding Swordfish is very time-consuming; try it only after using all other techniques
Swordfish and Other Techniques
X-Wing vs Swordfish
| Comparison | X-Wing | Swordfish |
|---|---|---|
| Number of rows | 2 rows (or 2 columns) | 3 rows (or 3 columns) |
| Number of columns | 2 columns (or 2 rows) | 3 columns (or 3 rows) |
| Pattern characteristic | Each row must have candidate in exactly two columns | Each row can have candidate in 2-3 columns |
| Identification difficulty | Difficult | Very difficult |
| Frequency | Occasional | Rare |
More Advanced Extensions
Swordfish can be further extended:
- Jellyfish: Four-row-four-column extension
- Squirmbag: Five-row-five-column extension (extremely rare, almost never encountered)
These techniques follow the same principle as Swordfish, just involving more rows and columns, with exponentially increasing identification difficulty.
Technique Summary
Key points for applying the Swordfish technique:
- Essence: X-Wing extended from 2x2 to 3x3 pattern
- Identification condition: A candidate in three rows (or three columns) combined only involves three columns (or three rows)
- Flexibility: Each row doesn't need to have the candidate in all three columns, as long as the three rows combined cover these three columns
- Elimination rule: Row-based Swordfish eliminates columns, column-based Swordfish eliminates rows
- Application scenario: Last resort when X-Wing and all other intermediate and basic advanced techniques cannot make progress
- Identification difficulty: Requires systematic analysis of candidate distribution across multiple rows and columns, very time-consuming
- Frequency: Very rare, most difficult puzzles don't require it
Swordfish is extremely rare in practice, only occasionally appearing in the most difficult expert-level puzzles. Recommendations:
- First exhaust all intermediate techniques and X-Wing
- Choose the digit with the fewest candidates for analysis (e.g., digits with only 6-9 candidate positions remaining)
- Use pen and paper to record each digit's distribution across rows and columns to help discover three-row-three-column combinations
- Some Sudoku software provides Swordfish hints, which can be helpful for learning
- If you've tried for 30 minutes and still can't find one, the puzzle may not need Swordfish; check if you've missed simpler techniques
Practice Now
Start an expert-level Sudoku game and try using the Swordfish technique! Recommendations:
- Choose the highest difficulty; only expert-level puzzles may require Swordfish
- Make sure you've mastered the X-Wing technique first
- Systematically analyze each candidate, looking for three-row-three-column patterns
- Be patient; Swordfish is very rare and difficult to discover