Sudoku HowTo

Aligned Pair Exclusion

Aligned Pair Exclusion is often referred to as APE.

The final solution for any pair of cells cannot be the two values contained in a bi-value cell that is a buddy cell to both cells. It would not leave a valid candidate for the bi-value cell.

If a pair of cells are in the same unit they cannot contain the same value.

The Aligned Pair Exclusion strategy uses both these rules to exclude as many of the possible candidate combinations from two cells aligned in a unit as it can.

All possible candidate combinations are listed for an aligned pair of cells. All possible candidate combinations that exist in bi-value cells that are buddy cells to both cells in the aligned pair are removed from the list. All possible candidate combinations that are the same value in both cells are removed from the list. The solution for the pair of aligned cells has to come from the possible candidate combinations that are left over.

When the possible candidate combinations left over do not contain one of the original candidates in the aligned pair that candidate can be removed.

Aligned Pair Exclusion Type 2 is an extension of this strategy that also uses the candidate pairs from an almost locked set to exclude possible candidate combinations from the aligned pair of cells.
The blue cells are the Aligned Pair in the example in Figure 1. The green cells are all bi-value cells that are buddy cells to both the blue cells.

Listing all possible candidate combinations in the blue cells results in
1 - 1 #
1 - 7
1 - 8
1 - 9 *
6 - 1
6 - 7
6 - 8
6 - 9
8 - 1
8 - 7
8 - 8 #
8 - 9 *
9 - 1 *
9 - 7 *
9 - 8 *
9 - 9 #

The possible candidate combinations marked with a * are the candidate pairs contained in the bi-value cells that are buddy cells to both blue cells. These can be removed from the possible candidate combinations for the blue cells. If any of the candidate pairs marked with a * were to be used in the two blue cells it would leave one of the bi-value cells without a possible solution.

The possible candidate combinations marked with # cannot exist in a pair of cells in the same unit. The same value cannot be placed twice in the same unit. These can be removed from the possible candidate combinations for the blue cells.

The non excluded possible candidate combinations are
1 - 7
1 - 8
6 - 1
6 - 7
6 - 8
6 - 9
8 - 1
8 - 7

This list no longer contains a candidate combination with the candidate 9 in the first blue cell.

The candidate 9 can be removed from the first blue cell.

The Aligned Pair Exclusion logic works on any pair of cells, even if they are not aligned. In this case, the same candidate is legal in both cells and cannot be removed as a possible solution for the two cells. The candidate pairs in all bi-value cells that are buddy cells to both cells in the pair can be removed as above.

This is sometimes called Subset Exclusion.
Figure 2 shows an example of this. The blue pair of cells are not aligned in any unit but they have common buddy cells that are bi-value cells.

Listing all the candidate pair possibilities for the blue cells results in
1 - 2 *
1 - 6 *
1 - 7 *
4 - 2
4 - 6
4 - 7
7 - 2
7 - 6
7 - 7

There are bi-value cells with candidates pairs of 1 - 7, 1 - 6 and 1 - 2. These are marked with a *. Once these possibilities have been excluded there is no longer a candidate combination that includes a 1 in the first cell so it can be removed.The Aligned Pair Exclusion logic also works by using all two candidate combinations from a two cell almost locked set as long as both cells in the almost locked set are buddy cells to both cells in the aligned pair.

This works because, if the aligned pair used two of the possible candidates from a two cell/three candidate almost locked set, there would only be one candidate left for two cells in the almost locked set.

This has been referred to Aligned Pair Exclusion Type 2.
In the example in Figure 3 the list of possible candidate combinations is
3 - 3 #
3 - 5
3 - 7 +
5 - 3
5 - 5 #
5 - 7 *
7 - 3 +
7 - 5 *
7 - 7 #
8 - 3
8 - 5
8 - 7

The 3 - 3, 5 - 5 and 7 - 7 possible candidate combination can be removed because the two blue cells are in the same unit. (Box or row). There cannot be a 3, 5 or 7 in two cells in the same unit.

The 5 - 7 possible candidate combinations can be removed because they are in a bi-value cell (green) that is buddy cells to both the blue cells. If this combination was used as the solution for the two blue cells there would be an empty cell (green).

The 3 - 7 possible candidate combination can be removed because it is included in the two cell almost locked set shown as yellow cells. If the 3 and the 7 are used in the blue cells then there would only be a 2 left to fill the two yellow cells.

Reviewing the possible candidate combinations left over shows a list that no longer contains a 7 in the first blue cell.

The candidate 7 can be removed from the 1st cell in this aligned pair.

This process could be repeated using candidate combinations from 3 cell - 4 candidate almost locked sets. If the aligned pair of cells used two candidates from the 4 candidates available to solve a 3 cell almost locked set then the almost locked set would be one candidate short.

15 February 2015
by Arkis@cox.net
RE: Comments and feedback for alignedPairExclusion

Thanks for the update. Now quite clear. Still having trouble picking out likely candidates from the sea of numbers. Any hints or clues?
24 January 2015
by John
RE: Comments and feedback for alignedPairExclusion

Figure 3 certainly was not correct. Don't know how that happened. I have created another example and replaced Fig 3 above.
22 January 2015
by arkis@cox.net
RE: Comments and feedback for alignedPairExclusion

Am desparately seeking instruction in how to pick out candidate cells for aligned pair exclusion. Your initial discussion was great, but I think Figure 3 has been corrupted. The puzzle does not relate to the explination. At the very least, the yellow boxes do not contain an almost locked set. I'd love to work through the real example. Thanks, Arkis

Responses to articles are public.

Use the contact option on the menu to send an email to the website administrator if you do not want your comment visible to all users.
* Your Name
* Feedback
* Enter the letters from the CAPTCHA image.
Get New CAPTCHA
CAPTCHA Image
* Required Input
Submit Feedback
To submit this form, enter the letters you see on the red CAPTCHA image in the box next to the image. If you cannot read the image click 'New CAPTCHA' to get a different CAPTCHA image.

Using CAPTCHA verification helps reduce SPAM and web site abuse by making it harder for other computers to automatically access pages on this website.
hidden
Copyright © 2007 - 2024 John Ironmonger
This page last updated on March 11, 2015