x-wing
a pattern across two rows and two columns that looks like an x (or rectangle). this eliminates candidates from columns.
what it means
an x-wing occurs when a candidate number appears exactly twice in two different rows, and those occurrences are in the same two columns. this forms a rectangle where the number must occupy opposite corners.
the "two rows of soldiers" analogy
imagine two rows of soldiers lining up in formation. each row needs exactly one soldier at position a or position b.
- row 1 puts a soldier at column 1 OR column 6
- row 4 puts a soldier at column 1 OR column 6
- together, they form an x pattern
- either way, those two columns are "used up"
since the number 5 must appear in both rows, and only at those column positions, those columns cannot have 5 anywhere else!
example 1: spot the x pattern
look at rows 1 and 4. the number 5 appears as a candidate in exactly the same two columns (columns 2 and 7).
rows 1 and 4 both have 5 only in columns 2 and 7
example 2: the rectangle shape
the four cells with 5 form the corners of a rectangle. the dashed lines show the two possible diagonals (the "x").
the four corners form an x-wing pattern
two possible solutions:
- option a: 5 at (row1,col2) and (row4,col7) — diagonal 1
- option b: 5 at (row1,col7) and (row4,col2) — diagonal 2
either way, columns 2 and 7 will have their 5s in rows 1 and 4!
example 3: the elimination
since 5 must be in rows 1 and 4 for both columns, we can eliminate 5 from all other cells in those columns.
before: 5 appears in multiple cells
after: 5 eliminated from columns 2 and 7
example 4: column-based x-wing
x-wings can also work the other way: two columns with the same candidate in the same two rows. this eliminates from the rows instead.
columns 3 and 8 both have 7 only in rows 1 and 5
since 7 must be in columns 3 and 8 for both rows, we can eliminate 7 from all other cells in rows 1 and 5.
why it works
let's think through the logic:
- the number must appear exactly once in each row
- in row 1, the number can only be in column 2 or column 7
- in row 4, the number can only be in column 2 or column 7
- the number must be on one diagonal or the other
- either way, columns 2 and 7 have their number in rows 1 and 4
- therefore, other rows in those columns cannot have that number
those columns are "used up" by the x-wing pattern!
when to look for x-wings
- when simpler techniques (singles, pairs) are exhausted
- when a candidate appears exactly twice in multiple rows
- scan for candidates that form rectangle corners
- check both row-based and column-based patterns
tips for finding x-wings
- focus on one candidate number at a time
- mark all cells where that candidate appears
- look for two rows where the candidate appears in the same two columns
- also check for two columns where the candidate appears in the same two rows
- use computer assistance or pencil marks to track candidates
summary
- an x-wing is a pattern across two rows and two columns
- the same candidate appears exactly twice in each row, in the same columns
- the four cells form the corners of a rectangle
- the number must occupy opposite corners (one diagonal or the other)
- eliminate that candidate from other cells in those columns (or rows)
- works both ways: row-based eliminates from columns, column-based eliminates from rows