An Almost APE?

Advanced methods and approaches for solving Sudoku puzzles

An Almost APE?

Postby Sudtyro2 » Fri Jun 07, 2013 3:09 pm

Sometimes it can be a good learning experience to investigate alternative solution methods for the same deduction. Just recently, while manually working on the French Forum #283 puzzle (originally presented in 2008 by ttt in this forum), one late-stage grid appeared as follows.
Code: Select all
 -----------------+----------------+-------------------   
   569   58  5679 |     1   2    4 |    57     3   789   
     1   37     4 |     5  38  389 |   279     6    27   
  3589    2   359 |    39   6    7 |    45  -4589    1   
 -----------------+----------------+-------------------   
  3569   35     8 |   367   1  235 |   237   279     4   
     7    4    36 |   368   9  238 |     1    28     5   
     2    1   359 |   378   4   58 |     6   789  3789   
 -----------------+----------------+-------------------   
   358 3578  2357 |     4 358  389 |    29     1     6   
   345    9     1 |     2  35    6 |     8   457    37     
  3458    6    25 |   389   7    1 |  2345  2459   239   
 -----------------+----------------+-------------------

From here, one can readily develop the following Alternating Inference Chain (AIC): (4)r3c7=(4-3)r9c7=(3)r4c7-(3=5)r4c2-(5=8)r1c2-(8)r1c9=(8)r3c8 => r3c8<>4, which also places r3c7=4 and => r9c7<>4.

At this point, boxes b789 are shown below and can serve to illustrate some interesting alternative methods for the next elimination of interest, r9c8<>2. Methods are listed more or less in increasing order of difficulty (for me).
Code: Select all
 -----------------+----------------+-------------------   
   358 3578  2357 |     4 358  389 |   *29     1     6     
   345    9     1 |     2  35    6 |     8   457    37     
  3458    6   *25 |   389   7    1 |   235 -2459  *239   
 -----------------+----------------+-------------------


Method 1: Grouped AIC (2=359)r9c379-(9=2)r7c7 => r9c8<>2, which is equivalent to a WXYZ-Wing with W=9 and Z=2. This method seems straightforward and elegant.

Method 2: Subset Counting.
The four cells (2359)r9c379\r7c7 form a locked subset (LS) with total multiplicity of 5 (the one extra count is from the 2-digits). The presence of (2)r9c8 would eliminate all 2's in the LS and thereby reduce the multiplicity below 4. Hence, r9c8<>2. This method is a little more complicated and involves choosing an appropriate subset, doing some counting and having an understanding of multiplicity.

Method 3: Aligned Pair Exclusion (APE).
Cell r9c3 plus box b9 look promising for an APE to eliminate (2)r9c8 using the row pair r9c78 (Andrew Stuart's solver confirmed this). Combination 2-2 is obviously not allowed, while the starred cells eliminate the remaining ordered combinations 3-2 and 5-2. Note that Almost Locked Set (ALS) (239)r7c7\r9c9 is needed to eliminate the 3-2 combination. This method is definitely tougher to follow and requires choosing a suitable aligned pair and also knowing how an ALS affects the exclusions. At this point, I stumbled across...

Method 4: Almost APE.
Now, except for the presence of (4)r9c7 in the original full grid, the previous APE provides for the desired elimination, r9c8<>2. That, in turn, makes (4)r9c7 a “spoiler” of sorts, so one can form an Almost APE in the original grid with the strong link [APE]=(4)r9c7. Searching now for a suitable chain in that grid, one then finally arrives at

[APE]=(4)r9c7-(4)r3c7=(4-8)r3c8=(8)r1c9-(8)r1c2=(8)r7c2-(8)r9c1=(8-9)r9c4=(9)r7c6-(9=2)r7c7 => r9c8<>2.

Well, this method works, but that Almost APE is one ugly monkey. :)
Apparently, one can “almost” almost anything.
Sudtyro2
 
Posts: 754
Joined: 15 April 2013

Re: An Almost APE?

Postby eleven » Fri Jun 07, 2013 10:02 pm

Agreed.
(... but it seldom gives an elimination)
eleven
 
Posts: 3150
Joined: 10 February 2008

Re: An Almost APE?

Postby Sudtyro2 » Sat Jun 08, 2013 2:29 pm

eleven wrote:Agreed.
(... but it seldom gives an elimination)


Actually, as I understand it, most of the “standard” almost-patterns do provide useful eliminations. For example, a finned fish is really an almost-fish where the fin is the spoiler. The fish pattern is strongly linked to the fin as [fish]=fin-... So, if you can complete the AIC to make the same elimination as the fish pattern would, then you have a valid deduction.

Similarly, my Method-1 example uses an Almost Locked Set, (2359)r9c379, to establish a strong link between the 2-digits and the remaining (359) candidates. One then completes the AIC to effect the desired elimination.

The Almost-APE example was simply an exercise to see if the [APE]=(4)r9c7-... strong-link prescription would give the same elimination. It actually did so, albeit very painfully. Clearly, I would never have spotted that potential APE pattern in the original grid.
Sudtyro2
 
Posts: 754
Joined: 15 April 2013

Re: An Almost APE?

Postby eleven » Sun Jun 09, 2013 10:32 am

Sudtyro2 wrote:Actually, as I understand it, most of the “standard” almost-patterns do provide useful eliminations.

Yes, of course, in theory. What i meant is, that you can have hundreds of almost (and thousands of almost almost) patterns in a grid, which all would make eliminations, but however, those candidates are not there anymore.
E.g. only a small part of finnned fish patterns (the pattern itself does not include elimination candidates), you can find in a grid, also will provide a useful elimination.
eleven
 
Posts: 3150
Joined: 10 February 2008


Return to Advanced solving techniques