# Aligned Pair Exclusion (APE)

Aligned Pair Exclusion is a candidate elimination method based on the fact that an ALS can give up only one number before being locked with n numbers for n cells, and unable to give up another number. When you notice a pair of cells within a chute, with remainders containing ALS some of the same numbers, then it pays to systematically check that the pair cannot contain true candidates of two numbers from any remainder ALS.

Pick one of the cells, and for each of its candidates, test all combinations of two with candidates of the other cell. Sudoku lit has many suggested tabulations to do this, but here is an example to illustrate a very compact one, a logical expression for the possible combinations. You’re familiar with the use of algebraic addition (+) for logical ‘or’ and multiplication for logical ‘and’, from the description of chute contents of a Sue de Coq.

In this example, volume 4, book 4, # 5 from KrazyDad’s Insane collection, the aligned cells of SWr9 share units and numbers with three ALS, bv 18, 78, and 15.

We pick the fewer candidates and start with 1r9c3, allowing 71, since 51 and 81 are prohibited by bv 15r9c8 and 18r8c1. Then we add the combinations ending in 7, for the full description of   71+17+57.

Now the expression describes all possible combinations of solution values for the two cells. Looking at the left values, 8 must be dropped from r1c1.

We mark the elimination pair with rounded squares, and follow up on the new 8-clue.

There is a shortcut. If you see that one cell, left or right, will have all its numbers, left or right, on the list, in this case 1 and 7 on the right, then any candidate not among the ALS candidates will be eliminated.

You might wonder if r8 would have produced an APE if we had gotten to it first. The combinations of r8c1 and r8c3 would be 23+31+32+82+83, allowing all candidates to remain. This happens often with APE attempts.

### You may have noticed that my APE example above is also a short XY ANL, or XY wing, or that r1c1 is the hinge cell for a victimless WXYZ wing.  No problem with that.

Andrew Stuart’s treatment of APE on his sudokuwiki.org includes a variation of APE he calls Type 2. It is based on the fact that the target cells do not have to be aligned for ALS restrictions to produce eliminations. A combination of numbers in the target cells is excluded when both cells share a unit with an ALS containing both numbers. It doesn’t have to be the same unit, or even the same ALS.

Here is one of Andrew’s examples, translated into Sysudoku marking, which illustrates this possibility. In this arrangement, each target cell shares a unit with the same two ALS. Be sure you see why combinations 14, 15, and 17 are excluded.

Here, there are two choices for each target cell. As Andrew points out, the 1-candidate is also excluded from r2c2.

What about r3c9? Well, 6 allows all combinations from NWr2, just as 2 and 3 allow all from NEr3. It’s just when a target cell is “covered”  by ALS that eliminations are possible in the other target.

Perhaps more APE removals are possible when basic removals are less thorough, but in Sysudoku reviews they are rare.  APE is worth being aware of, but a systematic search would require laying out ALS along banks and towers on a copy of the basic grid, then selection and trial of target cells. That’s too much effort for too little reward, ahead of XY-chains and X-panel chains and fish and coloring.

As earlier reviews are updated, I will be taking a more systematic look at APE, including Type 2, before resorting to trials.  Here is a Type 2 example, from the KrazyDad Insane review of the last puzzle, v.4, b.10, #5. The original review post of did a trial of Single Alternate SdC  NWr1 = 437, which fails, allowing the remaining Sue de Coq NWr1 = (7+3)(5+8) to remove 8r2c2.

Here, the two cells r8c46 function as a single target cell, in line with ALS SWr8 and in the S box with ALS Sr7. The combinations (4+8+9)1 with target r7c1 are rejected by the two ALS, avoiding the SASdC trial above. The second SASdC trial, or a coloring trial, remains necessary

Here are three possible ways that ALS can restrict target cell placements in Type 2 configurations.

In the North bank, two ALS are shared by two target cells in the manner of Stuart’s example. The East tower illustrates the same plan, aligned vertically. In the West tower, only one (blue) ALS is shared by targets. Each target is attacked by a separate green ALS.  Restricting ALS can overlap.

Do comment if you’d like to report a Type 2 for this page.