Sudoku Solver

Expert

Swordfish (Column)

A 3x3 pattern where a candidate appears in only three columns, restricted to the same three rows.

Swordfish (Column) is an advanced strategy that expands on the logic of the X-Wing. While an X-Wing uses a 2x2 pattern (2 columns, 2 rows), a Swordfish uses a 3x3 pattern (3 columns, 3 rows).

It eliminates candidates by proving that "since the numbers for these 3 columns MUST be in these 3 rows, no other cells in those rows can have that number."

Interactive Example

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

Click "Apply Logic" to see the strategy in action.

Real Example Walkthrough

In the example puzzle above, the strategy targets the number 1:

1. The Base Sets (Columns) We look at three specific columns: - Column 4 - Column 5 - Column 9

In these three columns, the candidate 1 appears only in three rows: - Row 1 - Row 4 - Row 8

2. The Pattern Let's map out where 1 can go in our base columns: - Col 4: Locked to Rows 1, 4 - Col 5: Locked to Rows 1, 8 - Col 9: Locked to Rows 4, 8

Notice that across all three columns, the candidates are restricted entirely to Rows 1, 4, and 8.

3. The Logic - We need to place three 1s—one for Column 4, one for Column 5, and one for Column 9. - We have exactly three rows available for them (Row 1, 4, 8). - Therefore, these three rows must contain the 1s for our three columns. - Consequently, no other cell in Row 1, Row 4, or Row 8 can contain a 1.

4. The Elimination We can eliminate 1 from any cell in the cover rows (1, 4, 8) that is NOT part of our Swordfish pattern. - Eliminate 1 from R1C7 inside Row 1. - Eliminate 1 from R4C6 inside Row 4.

How to Spot a Swordfish

Finding a Swordfish is difficult because the pattern can be incomplete (not every intersection needs a candidate).

  1. Pick a Candidate: Focus on one number at a time (e.g., all the 1s).
  2. Count Candidates in Columns: Look for columns where the candidate appears 2 or 3 times.
  3. Find the Match: Look for three such columns where the candidates perfectly align into just three rows.
    • It's okay if a column completely misses one of the rows (like Col 4 having candidates only in Rows 1 and 4, missing Row 8).
    • As long as the total set of rows across all 3 columns is exactly 3 rows, it works.

Visual Guide

Here is a simplified view of a perfect Swordfish interaction:

C1 C2 C3 R1 X . X <- Row 1 (Cover Set) R2 . X X <- Row 2 (Cover Set) R3 X X . <- Row 3 (Cover Set) ^ ^ ^ | | | Col Col Col 1 2 3 (Base Sets)

  • Each Base Column has candidates restricted to Rows 1, 2, 3.
  • Therefore, Rows 1, 2, 3 must contain the solutions for these columns.
  • Any other X in Rows 1, 2, 3 (not in these columns) can be eliminated.

Common Mistakes

  • Confusing Base and Cover Sets: Remember, if you start with Columns (Base), you eliminate from Rows (Cover). If you start with Rows, you eliminate from Columns.
  • Counting Too Many Rows: If your three columns span across 4 rows, it's not a Swordfish. It must be exactly 3 rows.
  • Eliminating from Base Sets: You never eliminate from the columns you used to build the pattern. You eliminate horizontally from the rows crossing through them.

Tips for Beginners

  • Use Candidate Highlighting: Most solvers verify highlighting. Select a number to see all its positions. This makes patterns like Swordfish jump out visually.
  • Look for "Almost" X-Wings: Often a Swordfish looks like a messy X-Wing with an extra column attached.
  • Check Bi-Value Cells: Cells with only 2 options are often key parts of these patterns.

Comparison Table

Strategy Pattern Size Base Sets Cover Sets Logic
X-Wing 2x2 2 Columns 2 Rows Locked 2x2 box
Swordfish 3x3 3 Columns 3 Rows Locked 3x3 grid
Jellyfish 4x4 4 Columns 4 Rows Locked 4x4 grid

Related Strategies

  • X-Wing (Column): The simpler 2x2 version of this strategy.
  • Jellyfish (Column): The expanded 4x4 version.
  • Finned Swordfish: A Swordfish that's "almost" perfect but has a few extra candidates.