Han Shot First (SER 7.1)

Post puzzles for others to solve here.

Han Shot First (SER 7.1)

Postby mith » Tue Feb 02, 2021 11:48 pm

Code: Select all
+-------+-------+-------+
| . . 9 | . . . | . . . |
| 8 . . | . . 9 | 7 . . |
| . 7 . | . 6 . | . 5 . |
+-------+-------+-------+
| . 5 . | . 4 . | . 6 . |
| 9 . . | . . 3 | 8 . . |
| . . 2 | . . . | . . . |
+-------+-------+-------+
| . 6 . | . 5 . | 1 7 . |
| 2 . . | . . 8 | 4 . . |
| . . . | . 1 . | . . . |
+-------+-------+-------+
..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....
mith
 
Posts: 996
Joined: 14 July 2020

Re: Han Shot First (SER 7.1)

Postby Leren » Wed Feb 03, 2021 2:52 am

Code: Select all
*-------------------------------------------------------------*
| 56     1234 9     | 1234578 2378 12457 | 236   12348 123468 |
| 8      1234 56    | 12345   23   9     | 7     1234  12346  |
| 134    7    134   | 12348   6    124   | 239   5     123489 |
|-------------------+--------------------+--------------------|
| 137    5    1378  | 12789   4    127   | 239   6     12379  |
| 9      14   1467  | 12567   27   3     | 8     124   12457  |
| 13467 a1348 2     | 156789 e79-8 1567  | 359   1349  134579 |
|-------------------+--------------------+--------------------|
| 34     6    348   | 2349    5    24    | 1     7     2389   |
| 2     c139  1357  | 3679   d379  8     | 4     39    3569   |
| 3457  b3489 34578 | 234679  1    2467  | 23569 2389  235689 |
*-------------------------------------------------------------*

(8) r6c2 = (8-9) r9c2 = r8c2 - r8c5 = (9) r6c5 => - 8 r6c5; btte

PS Greedo thanks you, mith ! Leren
Last edited by Leren on Wed Feb 03, 2021 6:19 am, edited 1 time in total.
Leren
 
Posts: 5117
Joined: 03 June 2012

Re: Han Shot First (SER 7.1)

Postby denis_berthier » Wed Feb 03, 2021 4:25 am

Trying to make the best of Subsets and Finned Fish, I get:
Code: Select all
***********************************************************************************************
***  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
***********************************************************************************************
239 candidates, 1691 csp-links and 1691 links. Density = 5.95%
hidden-pairs-in-a-block: b1{n5 n6}{r1c1 r2c3} ==> r2c3 ≠ 4, r2c3 ≠ 3, r2c3 ≠ 1, r1c1 ≠ 4, r1c1 ≠ 3, r1c1 ≠ 1
finned-x-wing-in-rows: n9{r7 r4}{c4 c9} ==> r6c9 ≠ 9
finned-x-wing-in-columns: n9{c5 c8}{r6 r8} ==> r8c9 ≠ 9
swordfish-in-columns: n9{c2 c5 c8}{r9 r8 r6} ==> r9c9 ≠ 9, r9c7 ≠ 9, r9c4 ≠ 9, r8c4 ≠ 9, r6c7 ≠ 9, r6c4 ≠ 9
swordfish-in-columns: n8{c2 c5 c8}{r9 r6 r1} ==> r9c9 ≠ 8, r9c3 ≠ 8, r6c4 ≠ 8, r1c9 ≠ 8, r1c4 ≠ 8
hidden-pairs-in-a-block: b5{n8 n9}{r4c4 r6c5} ==> r6c5 ≠ 7, r4c4 ≠ 7, r4c4 ≠ 2, r4c4 ≠ 1
hidden-pairs-in-a-row: r9{n8 n9}{c2 c8} ==> r9c8 ≠ 3, r9c8 ≠ 2, r9c2 ≠ 4, r9c2 ≠ 3
swordfish-in-columns: n2{c2 c5 c8}{r1 r2 r5} ==> r5c9 ≠ 2, r5c4 ≠ 2, r2c9 ≠ 2, r2c4 ≠ 2, r1c9 ≠ 2, r1c7 ≠ 2, r1c6 ≠ 2, r1c4 ≠ 2
swordfish-in-columns: n5{c1 c6 c7}{r9 r1 r6} ==> r9c9 ≠ 5, r9c3 ≠ 5, r6c9 ≠ 5, r6c4 ≠ 5, r1c4 ≠ 5
swordfish-in-rows: n6{r2 r5 r8}{c9 c3 c4} ==> r9c9 ≠ 6, r9c4 ≠ 6, r6c4 ≠ 6, r1c9 ≠ 6
hidden-pairs-in-a-block: b5{n5 n6}{r5c4 r6c6} ==> r6c6 ≠ 7, r6c6 ≠ 1, r5c4 ≠ 7, r5c4 ≠ 1
hidden-pairs-in-a-block: b9{n5 n6}{r8c9 r9c7} ==> r9c7 ≠ 3, r9c7 ≠ 2, r8c9 ≠ 3
whip[1]: b9n2{r9c9 .} ==> r3c9 ≠ 2, r4c9 ≠ 2
hidden-pairs-in-a-column: c7{n2 n9}{r3 r4} ==> r4c7 ≠ 3, r3c7 ≠ 3
jellyfish-in-columns: n3{c2 c7 c5 c8}{r8 r6 r1 r2} ==> r8c4 ≠ 3, r8c3 ≠ 3, r6c9 ≠ 3, r6c1 ≠ 3, r2c9 ≠ 3, r2c4 ≠ 3, r1c9 ≠ 3, r1c4 ≠ 3
hidden-quads-in-a-column: c4{n2 n3 n9 n8}{r3 r9 r7 r4} ==> r9c4 ≠ 7, r9c4 ≠ 4, r7c4 ≠ 4, r3c4 ≠ 4, r3c4 ≠ 1
whip[1]: c4n4{r2 .} ==> r1c6 ≠ 4, r3c6 ≠ 4
naked-pairs-in-a-row: r9{c4 c9}{n2 n3} ==> r9c6 ≠ 2, r9c3 ≠ 3, r9c1 ≠ 3
hidden-quads-in-a-column: c9{n2 n3 n9 n8}{r7 r9 r4 r3} ==> r4c9 ≠ 7, r4c9 ≠ 1, r3c9 ≠ 4, r3c9 ≠ 1
whip[1]: r3n4{c3 .} ==> r1c2 ≠ 4, r2c2 ≠ 4
whip[1]: c2n4{r6 .} ==> r5c3 ≠ 4, r6c1 ≠ 4

Code: Select all
RESOLUTION STATE:
   56        123       9         147       2378      157       36        12348     14       
   8         123       56        145       23        9         7         1234      146       
   134       7         134       238       6         12        29        5         389       
   137       5         1378      89        4         127       29        6         39       
   9         14        167       56        27        3         8         124       1457     
   167       1348      2         17        89        56        35        1349      147       
   34        6         348       239       5         24        1         7         2389     
   2         139       157       67        379       8         4         39        56       
   457       89        47        23        1         467       56        89        23       


From this point, adding short bivalue-chains leads to the solution:

Code: Select all
biv-chain[3]: r1c9{n1 n4} - b2n4{r1c4 r2c4} - b2n5{r2c4 r1c6} ==> r1c6 ≠ 1
finned-x-wing-in-columns: n1{c6 c1}{r3 r4} ==> r4c3 ≠ 1
biv-chain[3]: r4c4{n8 n9} - r7n9{c4 c9} - c9n8{r7 r3} ==> r3c4 ≠ 8
stte
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: Han Shot First (SER 7.1)

Postby yzfwsf » Wed Feb 03, 2021 1:00 pm

AIC Type 2: 8r4c4 = r4c3 - r7c3 = (8-9)r7c9 = 9r7c4 => r4c4<>9; lclSTE
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: Han Shot First (SER 7.1)

Postby SteveG48 » Wed Feb 03, 2021 8:42 pm

Code: Select all
 *--------------------------------------------------------------------------------------*
 | 56     af1234     9        | 1234578 d2378     12457    | 236      12348    123468   |
 | 8      af1234     56       | 12345   c23       9        | 7        1234     12346    |
 |b134      7       b134      |c12348    6       c124      | 239      5        123489   |
 *----------------------------+----------------------------+----------------------------|
 | 137      5        1378     | 12789    4        127      | 239      6        12379    |
 | 9      af14       1467     | 12567    27       3        | 8        124      12457    |
 | 13467   f1348     2        | 156789  e789      1567     | 359      1349     134579   |
 *----------------------------+----------------------------+----------------------------|
 | 34       6        348      | 2349     5        24       | 1        7        2389     |
 | 2        39-1     1357     | 3679     379      8        | 4        39       3569     |
 | 3457     3489     34578    | 234679   1        2467     | 23569    2389     235689   |
 *--------------------------------------------------------------------------------------*


(1=234)r125c2 - (3=14)r3c13 - (1|4=238)b2p579 - 8r1c5 = r6c5 - (8=2341)r1256c2 => -1 r8c2 ; stte
Steve
User avatar
SteveG48
2019 Supporter
 
Posts: 4480
Joined: 08 November 2013
Location: Orlando, Florida

Re: Han Shot First (SER 7.1)

Postby mith » Thu Feb 04, 2021 10:16 pm

I thought the disparity here between the simplest-first approach and the one-step AIC approach was pretty fantastic. Going through all the basics and fish does make the last step simpler (you can do it with a W-Wing), but there are a large number of one-step solutions available right from the beginning (mostly involving 8s).
mith
 
Posts: 996
Joined: 14 July 2020

Re: Han Shot First (SER 7.1)

Postby denis_berthier » Fri Feb 05, 2021 8:28 am

Hi Mith,
When I see one of your puzzles, what I like is finding as many Subsets as possible. I generally don't try anything else.

But one can easily reproduce yzf... and Leren "one-step" solutions in SudoRules:
Code: Select all
(init-sudoku-string "..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....")
(try-to-eliminate-candidates 944)
whip[3]: r7n9{c4 c9} - r7n8{c9 c3} - r4n8{c3 .} ==> r4c4 ≠ 9
whip[1]: r4n9{c9 .} ==> r6c7 ≠ 9, r6c8 ≠ 9, r6c9 ≠ 9
whip[1]: c8n9{r9 .} ==> r7c9 ≠ 9, r8c9 ≠ 9, r9c7 ≠ 9, r9c9 ≠ 9
singles and whips[1] to the end


Code: Select all
(init-sudoku-string "..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....")
(try-to-eliminate-candidates 865)
whip[3]: c2n8{r6 r9} - c2n9{r9 r8} - c5n9{r8 .} ==> r6c5 ≠ 8
singles and whips[1] to the end


And there are probably many other similar "one-step" solutions. I didn't try them all, but this puzzle has 21 W1-backdoors: 898 496 992 988 785 183 382 379 974 873 368 965 862 949 844 343 839 234 122 418 815

How to find these backdoors in SudoRules?
1) Choose the following settings in the config file:
Code: Select all
(bind ?*Whips[1]* TRUE)
(bind ?*Backdoors* TRUE)

2) Type in the following command:
Code: Select all
(find-sudoku-backdoors "..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....")


For testing if one of these backdoors can be eliminated in one step, launch another instance of CLIPS, load whips and type
Code: Select all
(init-sudoku-string "..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....")
(try-to-eliminate-candidates xxx), where xxx is a candidate sharing any 2D-bivalue cell with any of the above backdoors.
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Using anti-backdoors

Postby denis_berthier » Fri Feb 05, 2021 8:30 am

Here is a new, simpler way of finding "one-step" solutions with SudoRules.

One can trivially define a T-anti-backdoor as a candidate that leads to a solution in T if it is eliminated (where T is a resolution theory with the confluence property).
There's now a simpler possibility in SudoRules, but it's still under testing:
1) Choose the following settings in the config file:
Code: Select all
(bind ?*Whips[1]* TRUE)
(bind ?*Anti-Backdoors* TRUE)

2) Type in the following command:
Code: Select all
(find-sudoku-anti-backdoors "..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....")

The result is as follows:
Code: Select all
13 W1-ANTI-BACKDOORS FOUND: (892 388 985 982 182 979 879 968 865 944 843 834 818)


You can now try if one of these W1-anti-backdoors can be eliminated in one step. Launch another instance of CLIPS, load whips and type
Code: Select all
(init-sudoku-string "..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....")
(try-to-eliminate-candidates xxx), where xxx is one of the above W1-anti-backdoors.

Only two of the above anti-backdoors can't be eliminated by a single whip, which means that the following 11 candidates lead to single step solutions in W:
(892 985 982 979 879 968 865 944 843 834 818)
Last edited by denis_berthier on Mon Feb 08, 2021 1:23 pm, edited 2 times in total.
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: Han Shot First (SER 7.1)

Postby denis_berthier » Mon Feb 08, 2021 11:30 am

.

With the new possibility of focusing bivalue-chains on chosen targets in SudoRules, you can now activate bivalue-chains instead of whips and you'll get the following simpler eliminations in the preceding examples (with bivalue-chains instead of whips):

Code: Select all
(init-sudoku-string "..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....")
(try-to-eliminate-candidates 944)
biv-chain[3]: r4n8{c4 c3} - r7n8{c3 c9} - r7n9{c9 c4} ==> r4c4 ≠ 9
whip[1]: r4n9{c9 .} ==> r6c7 ≠ 9, r6c8 ≠ 9, r6c9 ≠ 9
whip[1]: c8n9{r9 .} ==> r7c9 ≠ 9, r8c9 ≠ 9, r9c7 ≠ 9, r9c9 ≠ 9
singles and whips[1] to the end


Code: Select all
(init-sudoku-string "..9......8....97...7..6..5..5..4..6.9....38....2.......6..5.17.2....84......1....")
(try-to-eliminate-candidates 865)
biv-chain[3]: c2n8{r6 r9} - b7n9{r9c2 r8c2} - c5n9{r8 r6} ==> r6c5 ≠ 8
singles and whips[1] to the end


[Added:]
Of the 11 candidates that were found to lead to a single-step solution in W1 after a single candidate elimination, where this candidate can be eliminated by a whip, the following 7 can have this candidate eliminated by a bivalue-chain:
Code: Select all
892: biv-chain[4]: c8n8{r9 r1} - c5n8{r1 r6} - c5n9{r6 r8} - b7n9{r8c2 r9c2} ==> r9c2 ≠ 8, r9c8 ≠ 9
879: biv-chain[4]: r3n8{c9 c4} - c5n8{r1 r6} - c5n9{r6 r8} - r7n9{c4 c9} ==> r7c9 ≠ 8, r3c9 ≠ 9
865: biv-chain[3]: c2n8{r6 r9} - b7n9{r9c2 r8c2} - c5n9{r8 r6} ==> r6c5 ≠ 8
944: biv-chain[3]: r4n8{c4 c3} - r7n8{c3 c9} - r7n9{c9 c4} ==> r4c4 ≠ 9
843: biv-chain[6]: r7n8{c3 c9} - r7n9{c9 c4} - c5n9{r8 r6} - c5n8{r6 r1} - c8n8{r1 r9} - c2n8{r9 r6} ==> r4c3 ≠ 8, r9c2 ≠ 8
834: biv-chain[5]: r4n8{c4 c3} - r7n8{c3 c9} - r7n9{c9 c4} - c5n9{r8 r6} - c5n8{r6 r1} ==> r3c4 ≠ 8, r6c5 ≠ 8
818: biv-chain[6]: r3n8{c9 c4} - r4n8{c4 c3} - r7n8{c3 c9} - r7n9{c9 c4} - c5n9{r8 r6} - c5n8{r6 r1} ==> r1c8 ≠ 8, r1c9 ≠ 8, r3c4 ≠ 8
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris


Return to Puzzles