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.
Z
XY
Z
XZ
YZ
Z
Z
Z
Example 2: XY-Wing Pattern Houses of XZ,Houses of YZ, Intersection of XZ with YZIntersection 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.
3
2
4 5
1 4 7
4 5 7
8
9
6
1 4
9
4 5 6
7
1 4 6
2
1 5 6
1 4
3
8
4 6
8
1
9
3
4 6
2
7
5
6
4 5 7 9
3 4 7 9
8
1
5 7
2
4 5 7
3 4 7
2
8
1 5
3
5 6 7
4
1 5 6 7
9
1 5 6
1 3 4 7
1 4 5
4 7
6 7
9
2
1 3 4 7
1 4 5 6
8
1 4 7
3
1 4 6 7
4 7
8
2
5
4 7 9
4 6 7 9
4 5 6 7
4 5 6 7
9
4 6 7
1
3
8
4 6 7
2
8
2
4 6 7
5
4 6
9
1 4 6 7
1 4 6
3
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].