The Easy Way or the Hard Way

Post puzzles for others to solve here.

The Easy Way or the Hard Way

Postby mith » Wed Feb 10, 2021 12:30 am

Code: Select all
+-------+-------+-------+
| . . . | . . . | . . . |
| . . 9 | 8 . . | . 7 6 |
| . 5 . | 6 4 . | . 3 2 |
+-------+-------+-------+
| . 2 . | . 5 . | . . 3 |
| . . 8 | 7 . . | . 6 . |
| . . . | . . . | . . . |
+-------+-------+-------+
| . . . | . . . | . . . |
| . . 7 | 9 . . | . 8 . |
| . 3 . | . 2 . | . . 5 |
+-------+-------+-------+
...........98...76.5.64..32.2..5...3..87...6.....................79...8..3..2...5
mith
 
Posts: 996
Joined: 14 July 2020

Re: The Easy Way or the Hard Way

Postby Leren » Wed Feb 10, 2021 2:27 am

Code: Select all
*--------------------------------------------------------------------------------*
| 678     678     23       | 235     179-3   123579   | 14589   1459    1489     |
| 23      4       9        | 8       1-3     1235     | 15      7       6        |
| 78      5       1        | 6       4       79       | 89      3       2        |
|--------------------------+--------------------------+--------------------------|
| 14679   2       46       | 14      5       14689    | 14789   149     3        |
| 13459  a19      8        | 7      a139     12349    | 12459   6      a149      |
| 1345679 1679    35       | 23      1689-3  1234689  | 1245789 12459   14789    |
|--------------------------+--------------------------+--------------------------|
| 1245689 1689    25       | 35      1678-3  1345678  | 1234679 1249    1479     |
| 12456  a16      7        | 9      a136     13456    | 12346   8      a14       |
| 14689   3       46       | 14      2       14678    | 14679   149     5        |
*--------------------------------------------------------------------------------*

ALS XZ Rule: X = 4, Z = 3: (3=4) r5c259 - (4=3) r8c259 => - 3 r1267c5; stte

Leren
Leren
 
Posts: 5117
Joined: 03 June 2012

Re: The Easy Way or the Hard Way

Postby denis_berthier » Wed Feb 10, 2021 5:28 am

The easy way, with 31 Subsets (none harder than Swordfish):
easy way: Show
***********************************************************************************************
*** SudoRules 20.1.s based on CSP-Rules 2.1.s, config = SFin
*** Using CLIPS 6.32-r779
*** Download from: https://github.com/denis-berthier/CSP-Rules-V2.1
***********************************************************************************************
naked-single ==> r3c3 = 1
naked-single ==> r2c2 = 4
239 candidates, 1743 csp-links and 1743 links. Density = 6.13%
naked-pairs-in-a-column: c4{r4 r9}{n1 n4} ==> r7c4 ≠ 4, r7c4 ≠ 1, r6c4 ≠ 4, r6c4 ≠ 1, r1c4 ≠ 1
naked-pairs-in-a-column: c3{r4 r9}{n4 n6} ==> r7c3 ≠ 6, r7c3 ≠ 4, r6c3 ≠ 6, r6c3 ≠ 4, r1c3 ≠ 6
naked-pairs-in-a-block: b1{r1c3 r2c1}{n2 n3} ==> r1c1 ≠ 3, r1c1 ≠ 2
x-wing-in-columns: n4{c3 c4}{r4 r9} ==> r9c8 ≠ 4, r9c7 ≠ 4, r9c6 ≠ 4, r9c1 ≠ 4, r4c8 ≠ 4, r4c7 ≠ 4, r4c6 ≠ 4, r4c1 ≠ 4
naked-pairs-in-a-column: c8{r4 r9}{n1 n9} ==> r7c8 ≠ 9, r7c8 ≠ 1, r6c8 ≠ 9, r6c8 ≠ 1, r1c8 ≠ 9, r1c8 ≠ 1
x-wing-in-columns: n1{c4 c8}{r4 r9} ==> r9c7 ≠ 1, r9c6 ≠ 1, r9c1 ≠ 1, r4c7 ≠ 1, r4c6 ≠ 1, r4c1 ≠ 1
swordfish-in-columns: n2{c3 c4 c8}{r7 r1 r6} ==> r7c7 ≠ 2, r7c1 ≠ 2, r6c7 ≠ 2, r6c6 ≠ 2, r1c6 ≠ 2
swordfish-in-columns: n5{c3 c4 c8}{r6 r7 r1} ==> r7c6 ≠ 5, r7c1 ≠ 5, r6c7 ≠ 5, r6c1 ≠ 5, r1c7 ≠ 5, r1c6 ≠ 5
hidden-pairs-in-a-block: b2{n2 n5}{r1c4 r2c6} ==> r2c6 ≠ 3, r2c6 ≠ 1, r1c4 ≠ 3
hidden-pairs-in-a-block: b6{n2 n5}{r5c7 r6c8} ==> r6c8 ≠ 4, r5c7 ≠ 9, r5c7 ≠ 4, r5c7 ≠ 1
hidden-pairs-in-a-block: b7{n2 n5}{r7c3 r8c1} ==> r8c1 ≠ 6, r8c1 ≠ 4, r8c1 ≠ 1
finned-x-wing-in-rows: n3{r2 r5}{c1 c5} ==> r6c5 ≠ 3
naked-triplets-in-a-row: r6{c3 c4 c8}{n5 n3 n2} ==> r6c6 ≠ 3, r6c1 ≠ 3
hidden-pairs-in-a-block: b4{n3 n5}{r5c1 r6c3} ==> r5c1 ≠ 9, r5c1 ≠ 4, r5c1 ≠ 1
hidden-pairs-in-a-column: c1{n1 n4}{r6 r7} ==> r7c1 ≠ 9, r7c1 ≠ 8, r7c1 ≠ 6, r6c1 ≠ 9, r6c1 ≠ 7, r6c1 ≠ 6
hidden-pairs-in-a-block: b7{n8 n9}{r7c2 r9c1} ==> r9c1 ≠ 6, r7c2 ≠ 6, r7c2 ≠ 1
x-wing-in-columns: n9{c1 c8}{r4 r9} ==> r9c7 ≠ 9, r4c7 ≠ 9, r4c6 ≠ 9
finned-x-wing-in-rows: n4{r5 r8}{c6 c9} ==> r7c9 ≠ 4
swordfish-in-columns: n7{c2 c5 c9}{r6 r1 r7} ==> r7c7 ≠ 7, r7c6 ≠ 7, r6c7 ≠ 7, r1c6 ≠ 7, r1c1 ≠ 7
swordfish-in-rows: n8{r3 r4 r9}{c1 c7 c6} ==> r7c6 ≠ 8, r6c7 ≠ 8, r6c6 ≠ 8, r1c7 ≠ 8, r1c1 ≠ 8
naked-single ==> r1c1 = 6
hidden-pairs-in-a-block: b6{n7 n8}{r4c7 r6c9} ==> r6c9 ≠ 9, r6c9 ≠ 4, r6c9 ≠ 1
hidden-pairs-in-a-block: b8{n7 n8}{r7c5 r9c6} ==> r9c6 ≠ 6, r7c5 ≠ 6, r7c5 ≠ 3, r7c5 ≠ 1
x-wing-in-columns: n6{c2 c5}{r6 r8} ==> r8c7 ≠ 6, r8c6 ≠ 6, r6c6 ≠ 6
hidden-pairs-in-a-block: b5{n6 n8}{r4c6 r6c5} ==> r6c5 ≠ 9, r6c5 ≠ 1
naked-triplets-in-a-row: r6{c1 c6 c7}{n1 n4 n9} ==> r6c2 ≠ 9, r6c2 ≠ 1
x-wing-in-rows: n9{r3 r6}{c6 c7} ==> r7c7 ≠ 9, r5c6 ≠ 9, r1c7 ≠ 9, r1c6 ≠ 9
naked-pairs-in-a-block: b2{r1c6 r2c5}{n1 n3} ==> r1c5 ≠ 3, r1c5 ≠ 1
hidden-pairs-in-a-block: b3{n8 n9}{r1c9 r3c7} ==> r1c9 ≠ 4, r1c9 ≠ 1
whip[1]: b3n1{r2c7 .} ==> r6c7 ≠ 1, r7c7 ≠ 1, r8c7 ≠ 1
finned-x-wing-in-rows: n3{r1 r6}{c3 c6} ==> r5c6 ≠ 3
x-wing-in-rows: n3{r2 r5}{c1 c5} ==> r8c5 ≠ 3
naked-pairs-in-a-row: r8{c2 c5}{n1 n6} ==> r8c9 ≠ 1, r8c6 ≠ 1
stte


The hard way, via anti-backdoors and focused search:

This puzzle has 34 anti-backdoors and 34 W1-anti-backdoors (the same): 796 194 493 891 287 682 581 779 377 875 574 273 869 268 563 762 557 256 747 846 444 643 837 936 731 127 526 325 221 518 715 214 313 812

Trying each of them in turn, we find that none can be eliminated by a bivalue-chain or a z-chain, but 16 can be eliminated by a whip
Code: Select all
287 682 581 574 273 268 563 557 256 127 526 325 221 518 715 214 313

which provides 16 "single-step" solutions, with only singles to the end:

16 single-step solutions: Show
whip[11]: c8n2{r7 r6} - c8n5{r6 r1} - r2c7{n5 n1} - r2c5{n1 n3} - r8n3{c5 c6} - r5n3{c6 c1} - r5n5{c1 c7} - r5n2{c7 c6} - r5n4{c6 c9} - r8n4{c9 c1} - r8n5{c1 .} ==> r8c7 ≠ 2
stte

whip[9]: r9c3{n6 n4} - r9c4{n4 n1} - r8c5{n1 n3} - r2c5{n3 n1} - r2c7{n1 n5} - c8n5{r1 r6} - c3n5{r6 r7} - r7c4{n5 n4} - r4c4{n4 .} ==> r8c2 ≠ 6
stte

whip[10]: r5n5{c1 c7} - r2c7{n5 n1} - r2c5{n1 n3} - r2c1{n3 n2} - r8n2{c1 c7} - r5n2{c7 c6} - r5n3{c6 c1} - r5n4{c1 c9} - r8n4{c9 c6} - r8n3{c6 .} ==> r8c1 ≠ 5
stte

whip[11]: r8n5{c6 c1} - r5n5{c1 c7} - r2c7{n5 n1} - r2c5{n1 n3} - r2c1{n3 n2} - r8n2{c1 c7} - r5n2{c7 c6} - r5n3{c6 c1} - r5n4{c1 c9} - r8n4{c9 c6} - r8n3{c6 .} ==> r7c4 ≠ 5
stte

whip[12]: r8n2{c1 c7} - c8n2{r7 r6} - c8n5{r6 r1} - r2c7{n5 n1} - r2c5{n1 n3} - r8n3{c5 c6} - r5n3{c6 c1} - r5n5{c1 c7} - r5n2{c7 c6} - r5n4{c6 c9} - r8n4{c9 c1} - r8n5{c1 .} ==> r7c3 ≠ 2
stte

whip[12]: r5n2{c7 c6} - c4n2{r6 r1} - c3n2{r1 r7} - c3n5{r7 r6} - r5n5{c1 c7} - r2c7{n5 n1} - r2c5{n1 n3} - r5n3{c5 c1} - r5n4{c1 c9} - r8c9{n4 n1} - r8c5{n1 n6} - r8c2{n6 .} ==> r6c8 ≠ 2
stte

whip[11]: r5n5{c1 c7} - r2c7{n5 n1} - r2c5{n1 n3} - r2c1{n3 n2} - r8n2{c1 c7} - r5n2{c7 c6} - r5n3{c6 c1} - r5n4{c1 c9} - r8c9{n4 n1} - r8c5{n1 n6} - r8c2{n6 .} ==> r6c3 ≠ 5
stte

whip[10]: r2c7{n5 n1} - r2c5{n1 n3} - r2c1{n3 n2} - r8n2{c1 c7} - r5n2{c7 c6} - r5n3{c6 c1} - r5n4{c1 c9} - r8c9{n4 n1} - r8c5{n1 n6} - r8c2{n6 .} ==> r5c7 ≠ 5
stte

whip[11]: c4n2{r6 r1} - c3n2{r1 r7} - c3n5{r7 r6} - r5n5{c1 c7} - r2c7{n5 n1} - r2c5{n1 n3} - r5n3{c5 c1} - r5n4{c1 c9} - r8c9{n4 n1} - r8c5{n1 n6} - r8c2{n6 .} ==> r5c6 ≠ 2
stte

whip[10]: r2c5{n1 n3} - r2c1{n3 n2} - r8n2{c1 c7} - r5n2{c7 c6} - r5n3{c6 c1} - r5n5{c1 c7} - r5n4{c7 c9} - r8c9{n4 n1} - r8c5{n1 n6} - r8c2{n6 .} ==> r2c7 ≠ 1
stte

whip[10]: r8n5{c6 c1} - r5n5{c1 c7} - r5n2{c7 c6} - r2n2{c6 c1} - r2n3{c1 c5} - r5n3{c5 c1} - r5n4{c1 c9} - r8c9{n4 n1} - r8c5{n1 n6} - r8c2{n6 .} ==> r2c6 ≠ 5
stte

whip[9]: r2c1{n3 n2} - r8n2{c1 c7} - r5n2{c7 c6} - r5n3{c6 c1} - r5n5{c1 c7} - r5n4{c7 c9} - r8c9{n4 n1} - r8c5{n1 n6} - r8c2{n6 .} ==> r2c5 ≠ 3
stte

whip[12]: r8n2{c1 c7} - c8n2{r7 r6} - c8n5{r6 r1} - r2c7{n5 n1} - r2c5{n1 n3} - r8n3{c5 c6} - r5n3{c6 c1} - r5n5{c1 c7} - r5n2{c7 c6} - r5n4{c6 c9} - r8n4{c9 c1} - r8n5{c1 .} ==> r2c1 ≠ 2
stte

whip[11]: r2c7{n5 n1} - r2c5{n1 n3} - r2c1{n3 n2} - r8n2{c1 c7} - r5n2{c7 c6} - r5n3{c6 c1} - r5n5{c1 c7} - r5n4{c7 c9} - r8c9{n4 n1} - r8c5{n1 n6} - r8c2{n6 .} ==> r1c8 ≠ 5
stte

whip[11]: c4n5{r1 r7} - c4n3{r7 r6} - r5n3{c6 c1} - r5n5{c1 c7} - r5n2{c7 c6} - r5n4{c6 c9} - r8c9{n4 n1} - r8c2{n1 n6} - r8c5{n6 n3} - r2c5{n3 n1} - r2c7{n1 .} ==> r1c4 ≠ 2
stte

whip[12]: r2c1{n3 n2} - r8n2{c1 c7} - c7n3{r8 r7} - c4n3{r7 r6} - r5n3{c6 c1} - r5n5{c1 c7} - r2n5{c7 c6} - c6n3{r2 r8} - r8n5{c6 c1} - r8n4{c1 c9} - r5n4{c9 c6} - r5n2{c6 .} ==> r1c3 ≠ 3
stte


SudoRules doesn't have an ALS XZ rule - which in the present case makes Leren's solution simpler than any of the above whips (notice that the n3r2c5 elimination is enough for stte).
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: The Easy Way or the Hard Way

Postby ghfick » Wed Feb 10, 2021 8:29 am

MSLS: 2X3 : r58c259; 19r5, 16r8, 3c5, 4c9 => r58c167<>1, r1267c5<>3, r167c9<>4, r8c167<>6, r5c167<>9
ghfick
 
Posts: 233
Joined: 06 April 2016
Location: Calgary, Alberta, Canada youtube.com/@gordonfick

Re: The Easy Way or the Hard Way

Postby Cenoman » Wed Feb 10, 2021 10:17 am

One-step solution, without ALS/AHS, but yielding lclste finish only (so bad :( )
Code: Select all
 +------------------------+--------------------------+----------------------------+
 |  678       678    23   |  235   1379    123579    |  14589     1459    1489    |
 |  23        4      9    |  8    a13      1235      | b15        7       6       |
 |  78        5      1    |  6     4       79        |  89        3       2       |
 +------------------------+--------------------------+----------------------------+
 |  14679     2      46   |  14    5       14689     |  14789     149     3       |
 | d13459     19     8    |  7     139     12349     | c12459     6       149     |
 |  1345679   1679   35   |  23    13689   1234689   |  1245789   12459   14789   |
 +------------------------+--------------------------+----------------------------+
 |  1245689   1689   25   | g35    13678   1345678   |  1234679   1249    1479    |
 | e12456     16     7    |  9     16-3   f13456     |  12346     8       14      |
 |  14689     3      46   |  14    2       14678     |  14679     149     5       |
 +------------------------+--------------------------+----------------------------+

(3=1)r2c5 - (1=5)r2c7 - r5c7 = r5c1 - r8c1 = r8c6 - (5=3)r7c4 => -3 r8c5; lclste
{NP (16)r8c25, +4r8c9; NP(19)r5c29, +3r5c5; ste}

Comment on Leren's and Gordon's solutions:
They use the same six cells, that form a rank-0 logic (Gordon's MSLS).
Leren doesn't refer to the second restricted common 4c9, I guess, because it is not needed (-3 r2c5 is the effective elimination for ste finish)

(13469)r58c259: five digits, six cells, digits 3,4,6,9 can be only once, 1 must be twice (once in r5, once in r8)
=> -19 r5c167, -16 r5c167, -3 r1267c5, -4 r167c9
Other presentations of the same logic:
(Tags for the loop)
Code: Select all
 +------------------------+--------------------------+----------------------------+
 |  678       678    23   |  235   179-3   123579    |  14589     1459    189-4   |
 |  23        4      9    |  8     1-3     1235      |  15        7       6       |
 |  78        5      1    |  6     4       79        |  89        3       2       |
 +------------------------+--------------------------+----------------------------+
 |  14679     2      46   |  14    5       14689     |  14789     149     3       |
 | e345-19    19     8    |  7    f139    e234-19    | e12459     6      d149     |
 |  1345679   1679   35   |  23    1689-3  1234689   |  1245789   12459   1789-4  |
 +------------------------+--------------------------+----------------------------+
 |  1245689   1689   25   |  35    1678-3  1345678   |  1234679   1249    179-4   |
 | b245-16    16     7    |  9    a136    b345-16    | b234-16    8      c14      |
 |  14689     3      46   |  14    2       14678     |  14679     149     5       |
 +------------------------+--------------------------+----------------------------+

As a wink to a follower (who will recognise himself ;) ):
Sue de Coq: (1349)r5c59, (19)r5c2, (1346)r8c259 with RCs 1,9 and 3,4 resp. => -19 r5c167, -16 r5c167, -3 r1267c5, -4 r167c9

...can be written also as doubly linked ALS XZ rule (1349)r5c59, (1346)r8c259, RCs 3,4; same eliminations

...or as a loop: (3)r8c5 = (3-254)r8c167 = r8c9 - r5c9 = (4-253)r5c167 = (3)r5c5@ => same eliminations (my preference)
Cenoman
Cenoman
 
Posts: 2975
Joined: 21 November 2016
Location: France

Re: The Easy Way or the Hard Way

Postby mith » Wed Feb 10, 2021 5:23 pm

You can also view it as a death blossom: r8c9,1-{r8c25},4-{r5c259} => -3r1267c5 (More natural to view it as the ALS-XZ though, and it gives more eliminations.)

There are a ton of possible MSLS (YZF's solver finds over 100) in this puzzle, but only that 6 cell reduces it to singles (others reduce it to basics).
mith
 
Posts: 996
Joined: 14 July 2020

Re: The Easy Way or the Hard Way

Postby Leren » Fri Feb 12, 2021 7:41 am

The death blossom is also a loop with the same 19 eliminations as for other POVs.

The pattern can also be viewed as an ALS XY Wing Loop: (3=1) r8c25 - (1=4) r8c9 - (4=3) r5c259 and a 2 petal death blossom is also an ALS XY Wing with the second ALS a bi-value cell.

Leren
Leren
 
Posts: 5117
Joined: 03 June 2012


Return to Puzzles