4 steps sudoku

Post puzzles for others to solve here.

4 steps sudoku

Postby urhegyi » Wed Feb 17, 2021 5:17 pm

4-step.png
4-step.png (15.1 KiB) Viewed 653 times
Who can do better?
Code: Select all
.--------------------.------------------------.----------------------.
| 279     2789   1   | 5      3689     369    | 2378   4      2678   |
| 279     2789   3   | 12689  4        169    | 1278   12568  125678 |
| 24      5      6   | 7      138      13     | 1238   128    9      |
:--------------------+------------------------+----------------------:
| 12469   12469  7   | 14689  15689    14569  | 1248   3      12458  |
| 123469  12469  24  | 14689  1356789  134569 | 12478  12589  124578 |
| 8       149    5   | 149    1379     2      | 6      19     147    |
:--------------------+------------------------+----------------------:
| 124567  3      24  | 146    156      8      | 9      126    1246   |
| 1246    12468  248 | 3      169      7      | 5      1268   12468  |
| 1456    1468   9   | 146    2        1456   | 148    7      3      |
'--------------------'------------------------'----------------------'

Code: Select all
..15...4...3.4.....567....9..7....3..........8.5..26...3...89.....3.75....9.2..73
urhegyi
 
Posts: 748
Joined: 13 April 2020

Re: 4 steps sudoku

Postby Leren » Wed Feb 17, 2021 8:29 pm

Here is a two non-basics steps solution :

Code: Select all
*-----------------------------------------------*
| 2  7     1  | 5     68 9    | 3    4     68   |
| 9  8     3  | 2     4  16   | 7    156   156  |
| 4  5     6  | 7     18 3    |b12  c128   9    |
|-------------+---------------+-----------------|
| 16 249   7  | 489   16 45   | 24   3     258  |
| 3  12469 24 | 14689 7  1456 |a124 d12589 1258 |
| 8  149   5  | 149   3  2    | 6   e9-1   7    |
|-------------+---------------+-----------------|
| 7  3     24 | 146   5  8    | 9    126   1246 |
| 16 1246  8  | 3     9  7    | 5    126   1246 |
| 5  146   9  | 146   2  146  | 8    7     3    |
*-----------------------------------------------*

(1) r5c7 = (1-2) r2c7 = (2-8) r2c8 = (8-9) r5c8 = (9) r6c8 => - 1 r6c8

Code: Select all
*-------------------------------------------*
| 2   7    1  | 5   68  9   | 3   4    68   |
| 9   8    3  | 2   4   16  | 7   156  156  |
| 4   5    6  | 7   18  3   | 12  128  9    |
|-------------+-------------+---------------|
| 16  249  7  | 89  16  45  | 24  3    258  |
| 3   2469 24 | 89  7   456 | 124 1258 1258 |
| 8  A14   5  |B14  3   2   | 6   9    7    |
|-------------+-------------+---------------|
| 7   3    24 | 146 5   8   | 9   126  1246 |
| 16  1246 8  | 3   9   7   | 5   126  1246 |
| 5   6-14 9  | 146 2  B14  | 8   7    3    |
*-------------------------------------------*

Remote Pairs (14) => - 14 r9c2; stte

Is that "better" than a 4 step solution that uses 3 Skyscrapers/Kites/ER's + 1 W Wing :?

Leren
Leren
 
Posts: 5117
Joined: 03 June 2012

Re: 4 steps sudoku

Postby jco » Thu Feb 18, 2021 1:33 am

Greetings,
After basics, two steps with basics in between.
1. Kraken Row => -1 r9c2

Code: Select all
   1    2      3     4       5    6       7     8      9
.-----------------+--------------------+--------------------.
|  2    7      1  |  5       68   9    |  3     4      68   | 1
|  9    8      3  |  2       4    16   |  7     156    156  | 2
|  4    5      6  |  7      d18   3    | c12    128    9    | 3
|-----------------+--------------------+--------------------|
| f16   249    7  |  489    e16   45   |  24    3      258  | 4
|  3    12469  24 |  14689   7    1456 | b124   12589  1258 | 5
|  8  x 149    5  | u149     3    2    |  6    a19     7    | 6
|-----------------+--------------------+--------------------|
|  7    3      24 | v146     5    8    |  9     126    1246 | 7
| g16   1246   8  |  3       9    7    |  5     126    1246 | 8
|  5   -146    9  | v146     2   w146  |  8     7      3    | 9
'-----------------+--------------------+--------------------'


(1)r6c2
||
(1)r6c4-(1)r79c4=(1)r9c6
||
(1)r6c8-(1)r5c7=(1)r3c7-(1)r3c5=(1)r4c5-(1)r4c1=(1)r8c1
(+basics)

2. Kite
Code: Select all
  1    2       3     4      5   6      7    8      9
.-----------------+------------------+------------------.
| 2    7       1  |  5      68  9    | 3    4      68   | 1
| 9    8       3  |  2      4   16   | 7    156    156  | 2
| 4    5       6  |  7      18  3    | 12   128    9    | 3
|-----------------+------------------+------------------|
| 16   249     7  |  489    16  45   | 24   3      258  | 4
| 3    12469  b24 |  14689  7   1456 | 124  12589  1258 | 5
| 8   c149     5  | d149    3   2    | 6    19     7    | 6
|-----------------+------------------+------------------|
| 7    3      a24 | -46     5   8    | 9    126    1246 | 7
| 16   1246    8  |  3      9   7    | 5    26     246  | 8
| 5    46      9  |  146    2   146  | 8    7      3    | 9
'-----------------+------------------+------------------'
(4)r7c3=r5c3-r6c2=(4)r6c4 => -4 r7c4; ste
Regards,
jco

Edit: small corrections in the text.
Last edited by jco on Wed Mar 10, 2021 7:25 pm, edited 3 times in total.
JCO
jco
 
Posts: 742
Joined: 09 June 2020

Re: 4 steps sudoku

Postby denis_berthier » Thu Feb 18, 2021 5:43 am

.
If the challenge is to minimise the number of steps (not counting singles):

===> the first step is to find the anti-backdoors:
Code: Select all
(init-sudoku-string "..15...4...3.4.....567....9..7....3..........8.5..26...3...89.....3.75....9.2..73")
(find-anti-backdoors)

8 BRT-ANTI-BACKDOORS FOUND: n6r8c1 n6r4c5 n1r4c1 n8r3c8 n1r3c5 n6r2c6 n6r1c9 n8r1c5


===> the second step is to try each of them in turn:
-load some rules, here whips, by selecting (in the config file):
Code: Select all
(bind ?*whips* TRUE)

-and try each of the anti-backdoors (say nrc) in turn:
Code: Select all
(try-to-eliminate-candidates nrc)


It happens that any of the 8 above anti-backdoors can indeed be eliminated by a whip (there's of course no a priori guarantee for this to happen), giving rise to 8 different 1-step solutions:

Code: Select all
681 : whip[7]: r4c1{n6 n1} - c5n1{r4 r3} - c7n1{r3 r5} - r6c8{n1 n9} - r6c2{n9 n4} - r9c2{n4 n1} - c6n1{r9 .} ==> r8c1 ≠ 6
stte

645 : whip[8]: r5n6{c6 c2} - r4c1{n6 n1} - c5n1{r4 r3} - c7n1{r3 r5} - r6c8{n1 n9} - r6c2{n9 n4} - r9c2{n4 n1} - c6n1{r9 .} ==> r4c5 ≠ 6
stte

141 : whip[7]: c5n1{r4 r3} - c7n1{r3 r5} - c6n1{r5 r9} - c4n1{r9 r6} - r6n4{c4 c2} - r9c2{n4 n6} - b4n6{r4c2 .} ==> r4c1 ≠ 1
stte

838 : whip[9]: r3c5{n8 n1} - r4c5{n1 n6} - r5n6{c6 c2} - r4c1{n6 n1} - c7n1{r4 r5} - r6c8{n1 n9} - r6c2{n9 n4} - r9c2{n4 n1} - c6n1{r9 .} ==> r3c8 ≠ 8
stte

135 : whip[8]: r4c5{n1 n6} - r5n6{c6 c2} - r4c1{n6 n1} - c7n1{r4 r5} - r6c8{n1 n9} - r6c2{n9 n4} - r9c2{n4 n1} - c6n1{r9 .} ==> r3c5 ≠ 1
stte

626 : whip[9]: c5n6{r1 r4} - r5n6{c6 c2} - r4c1{n6 n1} - c5n1{r4 r3} - c7n1{r3 r5} - r6c8{n1 n9} - r6c2{n9 n4} - r9c2{n4 n1} - c6n1{r9 .} ==> r2c6 ≠ 6
stte

619 : whip[9]: c5n6{r1 r4} - r5n6{c6 c2} - r4c1{n6 n1} - c5n1{r4 r3} - c7n1{r3 r5} - r6c8{n1 n9} - r6c2{n9 n4} - r9c2{n4 n1} - c6n1{r9 .} ==> r1c9 ≠ 6
stte

815 : whip[9]: r3c5{n8 n1} - r4c5{n1 n6} - r5n6{c6 c2} - r4c1{n6 n1} - c7n1{r4 r5} - r6c8{n1 n9} - r6c2{n9 n4} - r9c2{n4 n1} - c6n1{r9 .} ==> r1c5 ≠ 8
stte


Note that none of the above eliminations can be done by a bivalue-chain or a z-chain.
Of course, if I had to select only one answer, I'd take one of the two shortest whips.

If one allows whips[1], there is an additional W1-anti-backdoor: n6r5c2, giving rise to one more 1-step solution (but this time, modulo steps in W1 (indeed, a single one in this case):
Code: Select all
whip[7]: r4c1{n6 n1} - c5n1{r4 r3} - c7n1{r3 r5} - r6c8{n1 n9} - r6c2{n9 n4} - r9c2{n4 n1} - c6n1{r9 .} ==> r5c2 ≠ 6
whip[1]: r5n6{c6 .} ==> r4c4 ≠ 6, r4c5 ≠ 6, r4c6 ≠ 6
stte



Another approach is to use nukes, i.e. Forcing-T&E, which can also solve this puzzle in one step:
Code: Select all
(init-sukaku-grid
    2         7         1         5         68        9         3         4         68
    9         8         3         2         4         16        7         156       156
    4         5         6         7         18        3         12        128       9
    16        12469     7         14689     168       1456      124       3         12458
    3         12469     24        14689     7         1456      124       12589     12458
    8         149       5         149       3         2         6         19        7
    7         3         24        146       5         8         9         126       1246
    16        1246      8         3         9         7         5         126       1246
    5         146       9         146       2         146       8         7         3
)
(apply-FTE-to-all-bivalue-pairs TRUE)

gives:
Code: Select all
FORCING-T&E(BRT) applied to bivalue candidates n1r4c1 and n1r8c1 :
===> 13 values decided in both cases: n2r3c7 n4r4c7 n1r5c7 n9r6c8 n2r8c2 n4r8c9 n4r7c3 n6r7c4 n4r9c6 n2r5c3 n6r5c6 n5r4c6 n6r1c5
===> 63 candidates eliminated in both cases: n8r1c5 n6r1c9 n6r2c6 n1r2c8 n1r2c9 n1r3c7 n2r3c8 n1r4c2 n2r4c2 n4r4c2 n1r4c4 n4r4c4 n6r4c4 n6r4c5 n1r4c6 n4r4c6 n6r4c6 n1r4c7 n2r4c7 n1r4c9 n4r4c9 n5r4c9 n8r4c9 n1r5c2 n2r5c2 n6r5c2 n4r5c3 n1r5c4 n6r5c4 n8r5c4 n1r5c6 n4r5c6 n5r5c6 n2r5c7 n4r5c7 n1r5c8 n2r5c8 n9r5c8 n1r5c9 n2r5c9 n4r5c9 n9r6c2 n9r6c4 n1r6c8 n2r7c3 n1r7c4 n4r7c4 n1r7c8 n6r7c8 n4r7c9 n6r7c9 n1r8c2 n4r8c2 n6r8c2 n2r8c8 n1r8c9 n2r8c9 n6r8c9 n4r9c2 n4r9c4 n6r9c4 n1r9c6 n6r9c6

RESOLUTION STATE:
   2         7         1         5         6         9         3         4         8         
   9         8         3         2         4         1         7         56        56       
   4         5         6         7         18        3         2         18        9         
   16        69        7         89        18        5         4         3         2         
   3         49        2         49        7         6         1         58        58       
   8         14        5         14        3         2         6         9         7         
   7         3         4         6         5         8         9         2         12       
   16        2         8         3         9         7         5         16        4         
   5         16        9         1         2         4         8         7         3         
stte




Notice that the regular solution for SudoRules is as follows:
CSP-Rules/SudoRules regular solution: Show
(solve "..15...4...3.4.....567....9..7....3..........8.5..26...3...89.....3.75....9.2..73")
***********************************************************************************************
*** SudoRules 20.1.s based on CSP-Rules 2.1.s, config = W+SFin
*** Using CLIPS 6.32-r779
*** Download from: https://github.com/denis-berthier/CSP-Rules-V2.1
***********************************************************************************************
20 singles
137 candidates, 620 csp-links and 620 links. Density = 6.66%
Code: Select all
RESOLUTION STATE:
   2         7         1         5         68        9         3         4         68       
   9         8         3         2         4         16        7         156       156       
   4         5         6         7         18        3         12        128       9         
   16        12469     7         14689     168       1456      124       3         12458     
   3         12469     24        14689     7         1456      124       12589     12458     
   8         149       5         149       3         2         6         19        7         
   7         3         24        146       5         8         9         126       1246     
   16        1246      8         3         9         7         5         126       1246     
   5         146       9         146       2         146       8         7         3         

whip[1]: c7n4{r5 .} ==> r5c9 ≠ 4, r4c9 ≠ 4
whip[1]: c4n8{r5 .} ==> r4c5 ≠ 8
naked-pairs-in-a-row: r4{c1 c5}{n1 n6} ==> r4c9 ≠ 1, r4c7 ≠ 1, r4c6 ≠ 6, r4c6 ≠ 1, r4c4 ≠ 6, r4c4 ≠ 1, r4c2 ≠ 6, r4c2 ≠ 1
finned-x-wing-in-rows: n4{r6 r9}{c2 c4} ==> r7c4 ≠ 4
whip[1]: b8n4{r9c6 .} ==> r9c2 ≠ 4
naked-pairs-in-a-block: b7{r8c1 r9c2}{n1 n6} ==> r8c2 ≠ 6, r8c2 ≠ 1
finned-x-wing-in-columns: n6{c2 c4}{r5 r9} ==> r9c6 ≠ 6
whip[1]: b8n6{r9c4 .} ==> r5c4 ≠ 6
finned-x-wing-in-columns: n1{c7 c5}{r3 r5} ==> r5c6 ≠ 1, r5c4 ≠ 1
biv-chain-cn[3]: c1n1{r8 r4} - c5n1{r4 r3} - c6n1{r2 r9} ==> r9c2 ≠ 1
stte

It uses only very elementary patterns. Needless to say that I prefer a few small easy steps to a single hard one.
denis_berthier
2010 Supporter
 
Posts: 4213
Joined: 19 June 2007
Location: Paris

Re: 4 steps sudoku

Postby AnotherLife » Thu Feb 18, 2021 12:39 pm

If we want to stick to one relatively simple method, we can solve this puzzle in 3 main steps by short X-Chains.
1. X-Chain on 4 (2-String Kite), then Locked Candidates and Naked Pair https://disk.yandex.ru/i/Qgxla7rikCNHvg
2 and 3. Two X-Chains on 1 (Skyscraper and X-Chain of length 6) https://disk.yandex.ru/i/FlYXspazn4cYlw
Now we have only Singles.
Bogdan
AnotherLife
 
Posts: 192
Joined: 07 January 2021
Location: Moscow, Russia

Re: 4 steps sudoku

Postby urhegyi » Thu Feb 18, 2021 1:23 pm

I learned today a new form of (dual) empty rectangle which helped me to understand this sudoku better.
Image
One of the two blue ones must be true and so it's easy to understand that R3C5 can't be 1 and must be 8!
urhegyi
 
Posts: 748
Joined: 13 April 2020

Re: 4 steps sudoku

Postby AnotherLife » Thu Feb 18, 2021 2:17 pm

urhegyi wrote:I learned today a new form of (dual) empty rectangle which helped me to understand this sudoku better.

Actually, you described my last X-Chain as a pattern. Standard empty rectangles are chains of length 4 but this one is of length 6.
Bogdan
AnotherLife
 
Posts: 192
Joined: 07 January 2021
Location: Moscow, Russia

Re: 4 steps sudoku

Postby jco » Fri Feb 19, 2021 10:49 am

Hello urhegyi,

urhegyi wrote:I learned today a new form of (dual) empty rectangle which helped me to understand this sudoku better. (...)
One of the two blue ones must be true and so it's easy to understand that R3C5 can't be 1 and must be 8!


Thanks for mentioning it. From the picture I guessed that came from YZF_Sudoku, so I checked the 3-steps resolution of the puzzle as given there (with standard configuration; shown as hidden text below).

Hidden Text: Show
Code: Select all
Hidden Single: 9 in b8 => r8c5=9
Hidden Single: 7 in b7 => r7c1=7
Hidden Single: 5 in b7 => r9c1=5
Hidden Single: 5 in b8 => r7c5=5
Hidden Single: 3 in b4 => r5c1=3
Hidden Single: 3 in b5 => r6c5=3
Hidden Single: 7 in b5 => r5c5=7
Hidden Single: 7 in b6 => r6c9=7
Hidden Single: 2 in b2 => r2c4=2
Hidden Single: 4 in b1 => r3c1=4
Hidden Single: 8 in c3 => r8c3=8
Hidden Single: 8 in b9 => r9c7=8
Naked Single: r2c1=9
Hidden Single: 9 in b2 => r1c6=9
Hidden Single: 3 in b2 => r3c6=3
Hidden Single: 3 in b3 => r1c7=3
Hidden Single: 7 in b3 => r2c7=7
Hidden Single: 7 in b1 => r1c2=7
Hidden Single: 2 in b1 => r1c1=2
Full House: r2c2=8
Locked Candidates 2 (Claiming): 8 in c4 => r4c5<>8
Locked Candidates 2 (Claiming): 4 in c7 => r4c9<>4,r5c9<>4
Naked Pair: in r4c1,r4c5 => r4c2<>16,r4c4<>16,r4c6<>16,r4c7<>1,r4c9<>1,
Skyscraper : 1 in r4c5,r5c7 connected by r3c57 => r5c46 <> 1
2-String Kite: 4 in r6c4,r7c3 connected by r5c3,r6c2 => r7c4 <> 4
Locked Candidates 1 (Pointing): 4 in b8 => r9c2<>4
Naked Pair: in r8c1,r9c2 => r8c2<>16,
Dual Empty Rectangle : 1 in b7 connected by r4,c6 => r3c5 <> 1
Hidden Single: 1 in b2 => r2c6=1
Hidden Single: 6 in b2 => r1c5=6
Full House: r1c9=8
Full House: r3c5=8
Full House: r4c5=1
Hidden Single: 8 in b6 => r5c8=8
Hidden Single: 9 in b6 => r6c8=9
Hidden Single: 8 in b5 => r4c4=8
Hidden Single: 9 in b5 => r5c4=9
Hidden Single: 6 in b5 => r5c6=6
Hidden Single: 5 in b5 => r4c6=5
Full House: r9c6=4
Full House: r6c4=4
Full House: r6c2=1
Hidden Single: 1 in b7 => r8c1=1
Full House: r4c1=6
Hidden Single: 6 in b7 => r9c2=6
Full House: r9c4=1
Full House: r7c4=6
Hidden Single: 5 in b6 => r5c9=5
Hidden Single: 1 in b6 => r5c7=1
Hidden Single: 4 in b6 => r4c7=4
Full House: r3c7=2
Full House: r3c8=1
Full House: r4c9=2
Full House: r4c2=9
Hidden Single: 1 in b9 => r7c9=1
Hidden Single: 4 in b9 => r8c9=4
Full House: r2c9=6
Full House: r2c8=5
Hidden Single: 6 in b9 => r8c8=6
Full House: r8c2=2
Full House: r5c2=4
Full House: r5c3=2
Full House: r7c3=4
Full House: r7c8=2

I've seen this move listed before (in YZF_Sudoku) but never bothered to look at it. It must happen less often than the usual ER because, for the one shown in the picture, it depends on having only two candidates in the ER box (we need strong link there). While the ER can be seen as a Grouped X-Chain, we have no group here, just plain X-Chain. It is a useful pattern for the manual solver and certainly for this reason was included in YZF_Sudoku.
Regards,
jco
EDIT: Slight change in the text. I visited the YZF_Sudoku thread and noticed that there is a "real" dual ER with Grouped X-Chain structure. This pattern was identified by ghfick.
EDIT2: corrected link (thanks to AnotherLife).
Last edited by jco on Fri Feb 19, 2021 10:48 pm, edited 3 times in total.
JCO
jco
 
Posts: 742
Joined: 09 June 2020

Re: 4 steps sudoku

Postby AnotherLife » Fri Feb 19, 2021 12:37 pm

jco wrote: I visited the YZF_Sudoku thread and noticed that there is a "real" [url=post295944.html?hilit=dual%20empty%20rectangle#p295944[/url]dual ER with Grouped X-Chain structure. This pattern was identified by ghfick.

This link does not work. Maybe you meant this one? [url] a-dual-then-more-of-the-same-then-more-work-t38318.html#p295944[/url]
By the way, I did not know this form of ER when solving the puzzle, and I found the corresponding elimination via X-Chain. As far as I see, HoDoKu does not identify this pattern.
Bogdan
AnotherLife
 
Posts: 192
Joined: 07 January 2021
Location: Moscow, Russia

Re: 4 steps sudoku

Postby jco » Fri Feb 19, 2021 1:29 pm

Hello AnotherLife,

AnotherLife wrote:This link does not work. Maybe you meant this one? [url]a-dual-then-more-of-the-same-then-more-work-t38318.html#p295944[/url]
By the way, I did not know this form of ER when solving the puzzle, and I found the corresponding elimination via X-Chain. As far as I see, HoDoKu does not identify this pattern.


That is the link, thanks. Regarding the pattern, it was identified last year and HoDoKu last major release by its creator Bernhard Hobiger dates a while back (2012; unfortunately the author passed away by that time). The version I have is the one mentioned in the thread "PseudoFish's Hodoku". In the code, the corresponding move for this puzzle is found among the X-Chains as:
Code: Select all
X-Chain: 1 r2c6 =1= r9c6 -1- r9c2 =1= r8c1 -1- r4c1 =1= r4c5 -1- r3c5 =1= r2c6 => r2c89,r3c5,r9c6<>1

IMHO the other patterns shown in the link are the proper dual ER. That moves can't be found (all in one) in HoDoKu. YZF_Sudoku has many powerful recent techniques not available in HoDoKu.
Regards,
jco
JCO
jco
 
Posts: 742
Joined: 09 June 2020

Re: 4 steps sudoku

Postby rjamil » Sun Feb 21, 2021 4:23 am

urhegyi wrote:I learned today a new form of (dual) empty rectangle which helped me to understand this sudoku better.

Hi,

If SpAce were present, he would have called Dual Empty Rectangle - Crab.

R. Jamil
rjamil
 
Posts: 774
Joined: 15 October 2014
Location: Karachi, Pakistan


Return to Puzzles