Sudoku Offline

The X-Wing in sudoku

Two rows with the same two columns for one digit clear that digit from the rest of both columns.

An X-Wing is one digit in four cells. In two rows the digit has only two possible places, and both rows have them in the same two columns. The two rows will use up the digit in both columns, so every other cell of those columns loses it.

46377633987251438458363285646298263761212581812528915918915914451251258125615624124515696797979279121791917979158144513537857159147915791359344548595948
X-Wing. In rows 2 and 9 the 8 fits only in columns 2 and 8. Those rows use up the 8 in each of these columns. Remove 8 from R1C2.

Why it works

Call the rows A and B and the columns 1 and 2. If the digit in row A sits in column 1, row B cannot use column 1 and takes column 2. If row A takes column 2, row B takes column 1. Both columns get their digit from these rows either way. You still do not know which of the two diagonals is right, and you do not need to.

The pattern can be turned by ninety degrees. Two columns whose only places are in the same two rows clear the rest of those rows.

3587942958247327436185934782547212697462477842413827161616161691691695689353693689681581535138591913538185919353561565656969
Another X-Wing. In columns 3 and 5 the 5 fits only in rows 6 and 8. Those columns use up the 5 in each of these rows. Remove 5 from R6C1, R8C6 and R8C7.

How to find an X-Wing

  1. Pick a digit that is still missing from at least three rows and make sure its candidates are complete.
  2. Go through the rows and write down those where the digit has exactly two places, with their columns.
  3. Look for two rows with the same two columns.
  4. Search both columns for other cells with the digit. If there are none, the X-Wing is real but gives you nothing.
  5. Erase the digit there and check both columns and their boxes for a new single.
  6. Repeat from the second step with columns in place of rows.

Try the digits one by one. An X-Wing never mixes two digits, so the rest of the notes can be ignored while you look.

The common mistake

The two places must be the only ones in their row. If a row has a third place for the digit, the argument fails, even when four candidates make a neat rectangle. The rule about exactly two applies to the rows you start from. The columns may contain as many as they like, since those extra ones are what you erase.

People also erase in the wrong direction. When you counted in rows, you erase in columns. When you counted in columns, you erase in rows.

Where the four corners lie

An X-Wing worth looking for has its corners in four different boxes. If two corners share a box, pointing pairs and box/line reductions already remove the same candidates, so finish those first.

Practice

Choose a digit, count its places and name the two lines before you look. The three boards are new.

1487359854337864756312498271297635589872396582626696917122729125259154934938956454568141848134613126717124237151451446913469139126724146237
In columns 1 and 5 the 4 fits only in rows 5 and 9. Those columns use up the 4 in each of these rows. Remove 4 from R5C2, R5C6, R9C2 and R9C6.
31972943639785429945382238542315461223168454568267858251567678167858572781812447816361361616767161677916978967846947478978578959378937858577894789467678
In rows 1 and 9 the 4 fits only in columns 5 and 7. Those rows use up the 4 in each of these columns. Remove 4 from R7C7.
6498429889514284365799784566129384673952841184699481237235127371353516167135635767373612121232312575725372735725372672356357
In rows 4 and 8 the 2 fits only in columns 1 and 7. Those rows use up the 2 in each of these columns. Remove 2 from R1C1, R5C1 and R9C7.

X-Wings turn up in our Evil puzzles. Three lines in place of two make a Swordfish. For a puzzle of your own, the solver marks the X-Wing when it is the next step.

Questions

Does an X-Wing place a digit?

It only erases candidates. The digit you place comes from the single that may appear afterwards.

How many candidates can an X-Wing remove?

Each of the two columns has seven cells outside the two rows, so fourteen is the ceiling. Real ones remove a few.

Is it still an X-Wing with three places in a row?

No. A third place in one of the two rows breaks it. If the extra places share a box with a corner there is a separate technique, the finned X-Wing, which our solver does not use.

When should I look for one?

When singles, pointing pairs, box/line reductions, pairs and triples give nothing more. Our solver tries them in that order too.

Keep reading