playr.co.uk/sudoku

Are you a sudoku.playr?

Basic Techniques

Line and Box Intersections

Subset Techniques

Seafood Techniques

Chain Techniques

Other Techniques

XY-Wing

This technique is similar to an X wing, and similar to a short forcing chain, but is is sufficiently different from both to warrant it's own name.

The pattern begins by finding a cell with two candidate numbers, X and Y. Then, a cell that is in the same row (column, or block) that has two candidates, X and another number, Z. Then, find another cell in the same column (row, or block) that has Y, and that same other number, Z. Once the pattern has been found, the number Z can be removed from all of the intersections of the houses that contain the XZ and YZ cells, except the XY, XZ and YZ cells themselves.

The way this works is similar to forcing chains, in that whichever value goes in the XY cells (X or Y), it will be impossible to put a Z in any of the intersection cells. The intersection isn't just be limited to rows and columns, the blocks can be included as well. Therefore the actual area of intersection can be quite large.

 XY 
  
  
 YZ 
   
   
   
   
   
 XZ 
  
  
 Z 
   
   
   
   
   
  
  
  
   
   
   
  
  
  
Example 1: XY-Wing Pattern
Houses of XZ and YZ, Intersection of XZ and YZ

Marked are the three cells that form the pattern, and the Z cell, which is at the intersection of then XZ and YZ cells. If The XY cell is set to X, then the only value that XZ can be is Z, so the cell that has the Z in, cannot be Z, as there is already a Z in that row. Looking at it the other way round, if XY is set to Y, then the only value that YZ can be is Z, so once again our Z cell cannot contain Z.

It is also possible that some of the cells in the pattern may appear in the same block. This is stil a valid pattern, but there are more intersections to consider.

   
   
   
   
   
   
   
   
   
ZXYZ
   
XZ  
   
   
   
 YZ 
   
ZZZ
   
   
   
   
   
   
   
   
   
Example 2: XY-Wing Pattern
Houses of XZ, Houses of YZ,
Intersection of XZ with YZ Intersection of YZ with XZ

The pattern here is the same, with the marked XY, XZ and YZ cells. It is slightly different, because XY and XZ don't share the same row, but they do share the same block, so setting XY to X will still force XZ to be Z. Because they share the same block, we consider the entirety of that block when we work out the intersection of XZ and YZ. Therefore the z cannot appear in any of the intersection cells.

324 5
1 4 74 5 78
961 4
94 5 67
1 4 621 5 6
1 438
4 681
934 6
275
64 5 7 93 4 7 9
815 7
24 5 73 4 7
281 5
35 6 74
1 5 6 791 5 6
1 3 4 71 4 54 7
6 792
1 3 4 71 4 5 68
1 4 731 4 6 7
4 782
54 7 94 6 7 9
4 5 6 74 5 6 79
4 6 713
84 6 72
824 6 7
54 69
1 4 6 71 4 63
Example 3: XY-Wing Pattern
XY cell, Intersection of XZ and YZ houses
XZ cell, Houses XZ is in,
YZ cell, Houses YZ is in

In this example, XY is [r4,c9], XZ is [r5,c7] and YZ is [r2,c9]. The XY candidates are 4 and 7, the XZ candidates are 7 and 6, and the YZ candidates are 4 and 6. Therefore Z is 6. XZ is in the middle right block, and YZ is in the top right block. The only place where all of the houses that XZ and YZ intersect is at [r1,c7]. This means that Z can be removed from that intersection, so we can remove 6 from [r1,c7].

Further Information

Keywords

block, candidate, candidates, cell, cells, column, forcing chains, house, intersection, row, sudoku, value, xy-wing