Solving Tips

Sudoku X-Wing Technique: Advanced Cross-Line Elimination Method

2025-01-24 · 9 min read

X-Wing is one of the most classic methods among advanced Sudoku techniques and an essential skill for solving difficult and expert-level Sudoku puzzles. Its name comes from the X-wing fighter in Star Wars, as the pattern formed by this technique visually resembles an X shape. The core concept is: when a candidate appears only in the same two column positions across two rows, that candidate can be eliminated from other cells in those two columns.

Core Principle:
If a number appears only in columns X and Y in row A, and also appears only in columns X and Y in row B, then this number must occupy one position in column X and one position in column Y across rows A and B. Therefore, this number cannot appear in other cells in columns X and Y (those not in rows A and B).

Before reading this article, it's recommended to master Sudoku row-column-box naming conventions and intermediate techniques, which will help you understand the analysis examples below.

Example Analysis: Row-based X-Wing

Let's look at a classic X-Wing example involving candidate 8 in row 3 and row 7.

Sudoku X-Wing Technique Example
Figure: Candidate 8 in rows 3 and 7 forms an X-Wing pattern

Analysis Process

1 Observe Row 3: In row 3, candidate 8 appears only in two positions: A3 and H3.
2 Observe Row 7: In row 7, candidate 8 also appears only in two positions: A7 and H7.
3 Identify X-Wing Pattern: Candidate 8 appears only in columns A and H in both rows 3 and 7, forming a rectangle with four corners: A3, H3, A7, H7. This is the X-Wing pattern.
X-Wing Rectangle Pattern
X-Wing Pattern

Four 8s form rectangle corners, X-shaped lines show elimination logic, red arrows indicate elimination direction

4 Understand the Logic: Since 8 in row 3 can only be placed in A3 or H3, and 8 in row 7 can only be placed in A7 or H7, there are two scenarios:
  • Scenario 1: If A3 is 8, then row 7 must have 8 at H7
  • Scenario 2: If H3 is 8, then row 7 must have 8 at A7

In either case, the 8s in columns A and H are occupied by rows 3 and 7.

5 Execute Elimination: Therefore, cells in column A except rows 3 and 7 cannot contain 8, and cells in column H except rows 3 and 7 cannot contain 8 either. Specifically:
  • Column A: Remove candidate 8 from A1, A2, A4, A5, A6, A8, A9
  • Column H: Remove candidate 8 from H1, H2, H4, H5, H6, H8, H9
Conclusion:
Rows 3 and 7 form an X-Wing pattern in columns A and H, therefore candidate 8 must be removed from other positions (rows 1, 2, 4, 5, 6, 8, 9) in columns A and H.

Two Forms of X-Wing

X-Wing can exist in two symmetric forms:

1. Row-based X-Wing

This is the case from the example above:

  • Observation Target: Two rows
  • Pattern Characteristic: A candidate appears only in the same two columns across these two rows
  • Elimination Target: Remove that candidate from other rows in those two columns

2. Column-based X-Wing

Opposite form but same principle:

  • Observation Target: Two columns
  • Pattern Characteristic: A candidate appears only in the same two rows across these two columns
  • Elimination Target: Remove that candidate from other columns in those two rows
Memory Tip:
Row-based X-Wing eliminates columns, Column-based X-Wing eliminates rows.
If the X-Wing is found in two rows, eliminate from columns; if found in two columns, eliminate from rows. This is because once the candidate's position is fixed in rows (or columns), the corresponding columns (or rows) are occupied.

How to Find X-Wing?

Finding X-Wing requires systematic observation:

1 Select a Candidate: Focus on one candidate (one of 1-9), analyze one at a time.
2 Find Rows (or Columns) with Only Two Candidate Positions: Identify rows (or columns) where the candidate appears in exactly two cells.
3 Look for a Pair: Check if there's another row (or column) where the candidate also appears in exactly two cells, and in the same two columns (or rows).
4 Confirm X-Wing Pattern: If you find such two rows (or two columns), an X-Wing pattern is formed, creating a rectangle with four corners.
5 Execute Elimination: Remove that candidate from other cells in the corresponding columns (or rows).
Important Notes:
  • X-Wing requires exactly two rows (or two columns), with the candidate appearing in exactly two positions in each row (or column)
  • The column (or row) positions of the candidate in these two rows (or columns) must be completely identical
  • If a candidate appears in 3 or more positions in a row, it cannot form an X-Wing
  • X-Wing is a cross-row-column technique and doesn't involve box concepts
  • Finding X-Wing is time-consuming, recommended to try after exhausting intermediate techniques

X-Wing's Relationship with Other Techniques

X-Wing vs Box-Line Reduction

Both involve row-column relationships but at different levels:

  • Box-Line Reduction: Observes within a single unit (row/column/box), utilizing the intersection of rows/columns and boxes
  • X-Wing: Observes across two units, utilizing the symmetric relationship between two rows (or two columns)

Extensions of X-Wing

X-Wing can be extended to more complex forms:

  • Swordfish: Extension to three rows and three columns
  • Jellyfish: Extension to four rows and four columns

These techniques follow the same principle as X-Wing, but involve more rows and columns, making them harder to identify.

Technique Summary

Key points for applying X-Wing technique:

  • Observation Dimension: Cross-row-column observation, looking for rectangular symmetric patterns
  • Identification Criteria: A candidate appears only in the same two columns (or rows) across two rows (or columns)
  • Pattern Formation: Four candidate positions form the four corners of a rectangle
  • Elimination Rule: Row-based X-Wing eliminates columns, Column-based X-Wing eliminates rows
  • Application Scenario: Advanced solving method when intermediate techniques cannot make progress
  • Identification Difficulty: Requires systematic analysis of each candidate's distribution, quite time-consuming
Practical Advice:
X-Wing is not common in practice, but often provides the breakthrough in difficult puzzles. Recommendations:
  • First exhaust all intermediate techniques (naked pairs, triples, hidden pairs, etc.)
  • Choose candidates with fewer occurrences for analysis (e.g., numbers with only 5-6 candidate positions)
  • Use candidate marking features to more easily see distribution patterns
  • Use notes or scratch paper to record each number's distribution across rows and columns

Practice Now

Practice Suggestions:
Start a difficult or expert-level Sudoku game and try using the X-Wing technique! Suggestions:
  • Choose difficult level, as easy puzzles usually don't require X-Wing
  • Patiently analyze each candidate's row and column distribution
  • Start by looking for candidates with the fewest occurrences
  • Mark the X-Wing immediately after finding it to avoid forgetting