Solver App for Android and iPhone Strategies for Number Puzzles of all kinds
 
Print Version Get the SudokuWiki Newsletter
 
Solvers
Puzzles
Basic Strategies
Tough Strategies
Diabolical Strategies
Extreme Strategies
Depreciated Strategies
Str8ts
Other
The Logic of Sudoku
Order Str8ts Book 1
Order Now!
Order Str8ts Book 2
Order Now!
  Aligned Pair Exclusion
This is an interesting strategy, known by the short-hand as APE, since it overlaps with Y-Wings and XYZ-Wings but uses very different logic. APE logic will solve an XY-Wing (3 bi-values) and an XYZ-Wing (bi-value <-> tri-value <-> bi-value).
There are two types of APE - the normal APE and Extended APE.

Aligned Pair Exclusion - Type 1

The Aligned Pair Exclusion can be succinctly stated: Any two cells aligned on a row or column within the same box CANNOT duplicate the contents of any two-candidate cell they both see.

The Y-Wing strategy has some diagrams (see Figure 2) to show how cells can see other cells along the row, column or box and how they intersect or overlap. In Figure 1 [F8/F9] (ringed in green) are the two cells we want to reduce and both cells can see the yellow, green and orange cells.

Lets consider all the possible pairs of numbers that will fit in [F8/F9].
Excluding 1/1 and 6/6 (which are impossible), these are:

1 and 5
1 and 6
2 and 1
2 and 5
2 and 6
6 and 1
6 and 5
9 and 1
9 and 5
9 and 6
APE example 1
APE example 1: Load Example or : From the Start
If any of the these pair solutions were true we'd be able to remove those solutions from the candidates in all the other highlighted squares. The strategy asks us to look at all the bi-value cells [F8/F9] can 'see'. Cells E7, E8 and F5 containing 2/5 and 2/6 and 1/2 match some of the options we have for [F8/F9]. Any of these pairs would remove ALL candidates from one of our coloured cells which is illogical, Captain. This means we can exclude them from possible solutions for [F8/F9]. This leaves us with a shorter list:

1/5, 1/6, 6/1, 9/1, 9/5 and 9/6.

What are we left with? According to our new list 2 has been excluded completely from the pairs so it can't be a solution in [F8/F9], therefore we can remove it.

Credits - Rod Hagglund first popularised this method. (links now dead).

Aligned Pair Exclusion - Type 2

The Extended Aligned Pair Exclusion includes tri-values spread over two cells as part of the attack. APE 2 Says that any two cells with only abc excludes combinations ab, ac and bc from the pair under consideration.

This example is very clear since tri-value in [D9/F9] is conveniently 5/6/9 in both cells. (see next example for alternative tri-value formations).

Lets consider all the possible pairs of numbers in [H9/J9] first. These are:

1 and 3
6 and 3
9 and 3
1 and 9
6 and 9
9 and 9 (impossible)
Extended APE example 1
Extended APE example 1: Load Example or : From the Start
Cell J7 removes a 3/6 as a pair.
Cell G8 also removes 1/9 as a pair.

Now the tri-value: These are 5/6, 5/9 and 6/9. Removing these from the possibles for [H9/J9] leaves us:

1 and 3
6 and 3
9 and 3
1 and 9
6 and 9

1 and 3 only fit one way round (cell H9 then J9). Likewise 3 and 9 only fit in J9 and H9. So we can confidently remove 6 from H9 and 9 from J9.

So the double cells with three values gives us a great deal more pairs to use to whittle down the target cells. And indeed these are more common, so look out for them if you plan to use APE.


In this second example there are two-cell tri-value groups. [A4/B4] containing 6/8/9 gives us the combinations 6/8, 6/9 and 8/9 while [A2/A9] gives us 1/5, 5/9 and 1/9.

All the possible pairs of numbers in the target cells [A5/A6] are:

5 and 4
5 and 9 - excluded by [A2/A9]
6 and 4
6 and 9 - excluded by [A4/B4]
8 and 4
8 and 9 - excluded by [A4/B4]

So that removes 9 from any combinated and we can place 4 in A6 and crack on with the puzzle.
Extended APE example 2
Extended APE example 2: Load Example or : From the Start
Credits: Myth Jellies came up with the insight for Type 2.


Go back to Pattern OverlayContinue to Empty Rectangles




 
   
Comments

Your Name/Handle

Email Address - required for confirmation (it will not be displayed here)

Your comment or question

Please enter the
letters you see:
arrow
Enter these letters Remember me


Please keep your comments relevant to this article.
Email addresses are never displayed, but they are required to confirm your comments. When you enter your name and email address, you'll be sent a link to
confirm your comment. Line breaks and paragraphs are automatically converted — no need to use <p> or <br> tags.


Comments - Talk

Wednesday 19-Dec-2012

... by: S. Lee

I love this site, but I want to point out some point.

Besides the chaining strategies, there is also a family of strategies that make use of the concept of 'wing'. Indeed, the following strategies

XY-Wing
XYZ-Wing
XYZW-Wing
Aligned Pair Exclusion (possibly partially)
Sue-De-Coq (possibly partially)

can be understand as special cases of the strategy named 'Bent-Naked subset' as is illustrated in Sudoku Assistant (http://www.stolaf.edu/people/hansonr/sudoku/explain.htm). This strategy admits two rules as follows:

Setting) Let A and B be a subset of two overlapping units (such as row-box). Let

Wa = [portion of A that does not overlap with B] = A-B
Wb = [portion of B that does not overlap with A] = B-A
U = [union of A and B] = A∪B

so that both Wa and Wb form two wings of U. Assume that U is 'bent-locked', in the sense that the number of candidates on the cells in U is equal to the number of cells in U.

Rule 1) If there is no common candidate between two wings Wa and Wb, then A behaves like a genuine naked subset with candidates of Wa in each unit, and likewise for B.

Rule 2) If there is a unique candidate k between two wings Wa and Wb, then for every cell that can see the candidate k in U, we can eliminate the candidate k from the cell.

The power of this strategy is that we do not care what happens in the intersection part A∩B, except that it affects the total number of the candidate in U = A∪B. Conceptually it involves neither the concept of bi-valued cells nor that of tri-valued cell, though they appear in many examples. Even this does not involve the notion of ALS. All the matter reduces to the problem of candidate counting in U, Wa and Wb.

Of course, the disadvantage of this strategy is that there is no guide for the choice of A and B. Thus it is of no harm to understand that both APE and Sue-De-Coq are special guidelines for choosing the pair (A, B).

In the 1st APE example, we actually have

Wa = {1,2}[F5]
Wb = {2,5,6}[E7|E8]
U = {1,2,5,6}[F5|E7|E8|F9]

Clearly U forms a bent-locked subset. Since there is a unique candidate, namely 2, in both wings Wa and Wb, we can eliminate the candidate 2 in F8 as F8 can see all the candidates 2 in the subset U by the Rule 2.

Other two examples can also be analyzed by exactly the same manner:

Extended APE example 1:
Wa = {5,6,9}[D9|F9]
Wb = {1,9}[G8]
U = {1,5,6,9}[D9|F9|G8|H9]
=> 9 in J9 is eliminated by Rule 2

Wa = {5,6,9}[D9|F9]
Wb = {3,6}[J7]
U = {3,5,6,9}[D9|F9|J7|J9]
=> 6 in H9 is eliminated by Rule 2

Extended APE example 2:
Wa = {1,5,9}[A2|A9]
Wb = {8,9}[B4]
U = {1,5,6,8,9}[A2|A9|B4|A4|A5]
=> 9 in A6 is eliminated by Rule 2

Sue-De-Coq example 1:
Wa = {2,8}[B2]
Wb = {3,5}[F3]
U = {2,3,5,8}[B2|F3|D2|E2]
=> By the Rule 1,
The triple A = [B2|F3|D2] behaves like a naked pair with candidates {2, 8} in column 2, eliminating 8 in C2, 2 in G2 and 8 in J2.
The triple B = [F3|D2|E2] behaves like a naked pair with candidates {3, 5} in box B1, eliminating 3 in E3.

Sue-De-Coq example 2:
Wa = {6,8}[E2]
Wb = {1,3,7}[D9|F9]
U = {1,3,6,8,9}[E2|D9|F9|E7|E8]
=> By the Rule 1,
The triple [E2|E7|E8] behaves like a naked pair with candidates {6,8} in the row E, eliminating 6 and 8 in the other cells in the row E.
The quadraple [D9|F9|E7|E8] behaves like a naked triple with candidates {1,3,7} in the box B3, eliminating 1, 3, 7 in the other cells in the box B3.

In fact, we may extend the bent-naked subset strategy to a more general setting, though it becomes slightly harder to identify, as the naked triple is harder to apply than the naked pair.


Monday 25-Jun-2012

... by: ad.joe

General structure of the APE
------------------------------------
Maybe it's not easy to put this straight, but in fact there are eliminations in 2 boxes:

g k p | _ _ _ | Y Z _
_ _ _ | _ _ _ | _ _ _
_ _ X | _ _ _ | a b c

The "wings" are X=2#, Y=2*, Z=2+

Then XYZ eliminates 2 on the aligned cells abcgkp ...

(provided that these have "not much more than #*+ on it", so you have to "cross-check")

- Doesn't the APE-structure look like an xy-wing (y-wing)? Only the function does work backwards and there is no pivot necessary!!
So you could also call it a BACKWING or a BACKSWING!

- And of course, in an X-Sudoku the 2 aligned fields need not be in the same box
(as long as one of the two is on a diagonal).


Friday 22-Jun-2012

... by: ad.joe

How to tease out the APE:
-----------------------------------
First, it's not our job to solve one of the examples in another way. But it's nice that all is so understandable.
(Matt, I'd add three words: duplicate the contents of any "ONE of the" two-candidate cells they both see. )
So, as we look for the third cell of an xy-wing (having seen two "similar" ones at first), what can we do here:
Let's solve it by cross-checking: We assume that the most FREQUENT number of the bivalue cells can be eliminated in the two cells in question.
We assume this number being correct there and quickly end in error, quicker than in looking up all combinations.
(Who'd think that we would not score more than 90 percent, he/she can feel free to try with the other numbers)


Sunday 18-Dec-2011

... by:

I want this software. how I can have it?

Andrew Stuart writes:

See Sudoku Solver for Mobile Devices

Wednesday 2-Jun-2010

... by: Bruce A Rogers

In the first example, APE strategy is not necessary. The simpler X-wing strategy, using cells C, A, and Y, will eliminate option 7 at r4c7, r5c1, and r5c2. The solution follows immediately by solving hidden singles.

Monday 8-Feb-2010

... by: Phil Gooda

I actually managed to understand all this, except for one thing......why bother, there is a far simpler soultion within that box? Let me demonstrate by considering ONLY that box and naming the cells as follows:

A B C
D E F
G H I ..... which means that my C is the X mentioned, and my F is the Y mentioned.

Cells B, C and G contain 3 numbers and only 3 numbers between them. Therefore those 3 numbers cannot appear in the other cells. Which immediately gives you the paired 5/9 in F and I, which means that E has to be 4. Why bother doing all the APE stuff?


Monday 25-Jan-2010

... by: Patrick Barnaby

An XY-Chain removes 7 from r8c8. A Bilocation Graph reveals a 2 at r7c2 and then you'll have a naked 7 and then a naked 8 and then quite a few hidden singles on the first and second rows. So this is easier than APE except the Bilocational graph techinque.

Thursday 12-Nov-2009

... by: Matt Lala

I love the site but some of the explanations need help. Or I guess I do. I think this is one of the less clear ones.

The rule you have says:
Any two cells aligned on a row or column within the same box CANNOT duplicate the contents of any two-candidate cell they both see.

If I take that literally in the first example... X in the first example can see the bivalues 25 and 37. It cannot duplicate the contents of those cells. Therefore... it can't be 2,5,3 or 7? Obviously that's not what was meant.

Or is it... if the two aligned cells see some bivalue cells, and they both mutually share a certain candidate [that's part of those bivalue cells] then that shared candidate can go? But no, that's not it either.

If either if the cells see two bivalue cells, and those two bivalue cells both share a candidate with the cell under consideration... that shared one goes?

Does one actually have to enumerate the possibilities? This seems like something that can be spotted with a glance, if only it can be made clear the exact conditions needed.


Wednesday 30-Sep-2009

... by: Bernard Gervais

align pair type 2
I found more than one numerical solution for this example.
Best regards.
BG


Wednesday 30-Sep-2009

... by: Bernard Gervais

Excellent site, thank you.
for example 1, I use the unicity concept which pinpoints A4 = 1.
Best regards.


Post a Comment using Facebook...


Article created on 11-April-2008. Views: 46854
This page was last modified on 27-February-2012, at 08:08.
All text is copyright and for personal use only but may be reproduced with the permission of the author.
Copyright Andrew Stuart @ Syndicated Puzzles Inc, 2012