The hardest sudokus (new thread)

Everything about Sudoku that doesn't fit in one of the other sections

Re: The hardest sudokus (new thread)

Postby denis_berthier » Sat Apr 09, 2022 8:07 am

1to9only wrote:
denis_berthier wrote:1-to-9-only, does PGP-Explainer always produce the same result as standard SE?

Yes. PGExplainer should produce the same rating as the original (304,777 bytes) SE.
It also has the same misrating bug as SE, as has been noted before in the Patterns Game threads.
PGExplainer was created to rate puzzles submitted to the Patterns Game where g.r.emlin still uses original SE!
It rates very hard puzzles about 3-4 times faster.

Good, bug included. It's probably gonna become my standard SE rater, with or without uniqueness.
denis_berthier
2010 Supporter
 
Posts: 4190
Joined: 19 June 2007
Location: Paris

Re:

Postby denis_berthier » Mon Apr 11, 2022 11:01 am


I downloaded PGExplainer and compiled it (due to strong security reasons, MacOS can't use pre-compiled .jar files, unless signed by an official developer):
javac *.java
jar cvf PGExplainer.jar *.class

But then, when I use any of these command lines:
java -jar PGExplainer.jar --input=puzzles.txt --output=output.txt
java -jar PGExplainer.jar serate --input=puzzles.txt --output=output.txt
java -jar PGExplainer.jar sudoku.serate --input=puzzles.txt --output=output.txt

I get an error: no principal manifest attribute in PGExplainer.jar
which is surprising because the first line output by "jar cvf PGExplainer.jar *.class" was:
manifest added
Do you have an idea of what's happening?

BTW, I suggest you add a few lines to your README.md, saying how to compile and archive (jar) the source code. Anyone with a recent Mac will have to do this.
denis_berthier
2010 Supporter
 
Posts: 4190
Joined: 19 June 2007
Location: Paris

Postby 1to9only » Mon Apr 11, 2022 11:50 am

You can unzip the jar file to find out what the file structure looks like (and copy the MANIFEST.MF file off this!).

My directory structure looks a bit like this:
Code: Select all
PGExplainer
|
+- class
|  +- META-INF          <- MANIFEST.MF file in this folder
|  +- sudoku            <- compiled class files in this folder
|
+- src
   +- sudoku            <- java source files in this folder

MANIFEST.MF
Code: Select all
Manifest-Version: 1.0
Main-Class: sudoku.serate
Specification-Title: "Sudoku Explainer with serate entry point"
Implementation-Title: "formatted rate entry point"
Specification-Vendor: "Nicolas Juillerat"
Specification-Version: "2022.4.4"
Implementation-Version: "2022.4.4"
Name: SudokuExplainer+serate
Implementation-Vendor: "1to9only"

The file is slightly modified from my SukakuExplainer!

Edit: Changed one line to: Main-Class: sudoku.serate
This means the code entry point dont need specify, this will work: java.exe -jar PGExplainer.jar --input=puzzle.txt --output=output.txt

Compile
Code: Select all
cd PGExplainer
javac.exe -g:none -Xlint -d class src\sudoku\*.java

Build jar
Code: Select all
cd PGExplainer
if exist PGExplainer.jar del PGExplainer.jar
cd class
jar.exe -cfm ..\PGExplainer.jar META-INF\MANIFEST.MF *
cd ..

Untested commands, and I do not have Apple kit to test on!
Last edited by 1to9only on Mon Apr 11, 2022 1:26 pm, edited 2 times in total.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: Re:

Postby 1to9only » Mon Apr 11, 2022 11:59 am

denis_berthier wrote:BTW, I suggest you add a few lines to your README.md, saying how to compile and archive (jar) the source code. Anyone with a recent Mac will have to do this.

The README.md stays asis. The problem is an Apple problem.
Next someone will want to know how to build it on a Droid!
If this ever happens, I'll delete the project.
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: The hardest sudokus (new thread)

Postby mith » Mon Apr 11, 2022 2:53 pm

Denis, regarding your "min-expands" (assuming I understand what you mean!), they definitely don't need to be minimal in the usual sense - for example, Loki expands to 29c, and that 29c has exactly one other minimal puzzle which also expands back to the 29c. So that 29c is an absolute min-expand.

It shouldn't be a particularly hard thing to track, and there isn't much concern about a grid being kicked out of min-expand status - as soon as a potential min-expand is minimized, I singles-expand all the minimals and add any new expanded forms immediately. So if any puzzle has been minimized and is still a min-expand, then it will remain so. Once I write a script to compare the solution-minlex strings I can find these as a "pre-publication" step whenever I post an update.

At the moment, the minimizer is still playing catch-up - it has processed about 90% of the now 137k expanded forms. I will likely let the scripts run as they are for another day or two, and then turn off the minimal neighborhood scripts and let the others finish before getting a next update ready. (I'm also processing hendrik's new batch - very small number that were in the database with low skfr, otherwise new.)
mith
 
Posts: 996
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby mith » Mon Apr 11, 2022 3:07 pm

Other status updates:

The "transform" script is very fast and basically always current. The "depth_adder" script (adding one given from the solution in all possible ways to an expanded form and checking if it's still depth 3) is a bit slower, but has processed over 99%. The "minimizer" script is next at around 90%.

The "serate" script has rated about 25% of the puzzles. (I need to switch over to PGExplainer.) Expanded forms are currently in the 24c-38c range (with the lower clue counts tending to expand quite a bit more with basics), and I have it rating lower clue counts first right now, so almost all the puzzles at 29c or less are rated. (Once I get this "min-expand" thing added, I'll prefer those instead.)

On the minimal side (closing in on 500k), the {-2+1} script has processed a bit less than 25%, {-1+2} around 2%, and {-2+2} less than 1%. I'm going to be optimizing this a bit to focus on minimals with higher rated expanded forms - right now, it's just basing it on clue count. Otherwise, I'm going to look into whether I can outperform gsf for the actual neighborhood search - generating them is still the most significant bottleneck. (I will also be running some neighborhood tests on the "min-expand" puzzles once those are marked to see how efficient they are at generating new puzzles.)
mith
 
Posts: 996
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby denis_berthier » Mon Apr 11, 2022 3:57 pm

mith wrote:Denis, regarding your "min-expands" (assuming I understand what you mean!), they definitely don't need to be minimal in the usual sense - for example, Loki expands to 29c, and that 29c has exactly one other minimal puzzle which also expands back to the 29c. So that 29c is an absolute min-expand.

OK, good example.
denis_berthier
2010 Supporter
 
Posts: 4190
Joined: 19 June 2007
Location: Paris

Re: The hardest sudokus (new thread)

Postby mith » Tue Apr 12, 2022 3:16 pm

Up to 39c now, with three (closely related) examples:

Code: Select all
.....1..2.12....3.45...3.16....1.3.5...7852.1521.34....6415..2313....65.2.536.1.4
.....1..2.12....3.4.5..3.16....1.3.5...7852.1251.34....4615..231.3...65.52.36.1.4
.....1..2.12....3.4.5..3.16....1.3.5...7852.1521.34....4615..231.3...65.25.36.1.4


Smallest expanded forms are still 24c, with 4 examples now. Minimals range from 22c to 31c.

I've turned off a couple scripts now, and am letting the minimizer script catch up. The number of puzzles left to process is going down (~8k now, out of 158k), but it's prioritizing smaller clue count so the remaining ones are going to take longer. Anyway, once that's done and all the scripts operating on the expanded database have settled, I'll get an update together (in a csv format; 158k expanded forms and 565k minimals is a bit much for google sheets...)
mith
 
Posts: 996
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby mith » Mon Apr 18, 2022 7:00 pm

Here is the smallest example so far of a depth 3 puzzle which can't be expanded by basics:

Code: Select all
........1..2..3.4..1..45..........563.5...2.46.....31....2....5.54678....6...9...  ED=11.0/7.2/2.6


The trivalue oddagon here has four guardian cells in three different boxes.
mith
 
Posts: 996
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby denis_berthier » Tue Apr 19, 2022 3:28 am

mith wrote:Here is the smallest example so far of a depth 3 puzzle which can't be expanded by basics:
Code: Select all
........1..2..3.4..1..45..........563.5...2.46.....31....2....5.54678....6...9...  ED=11.0/7.2/2.6

The trivalue oddagon here has four guardian cells in three different boxes.

Interesting as an example of T&E-depth 3 AND as an example of no expansion.

As for using the trivalue oddagon impossible pattern, there's a much simper way of solving than trying to use a forcing net based on 4 different candidates.

Code: Select all
Resolution state after Singles and whips[1]:
   +----------------------+----------------------+----------------------+
   ! 45789  34789  36789  ! 789    2689   267    ! 56789  36789  1      !
   ! 5789   789    2      ! 1789   1689   3      ! 56789  4      789    !
   ! 789    1      36789  ! 789    4      5      ! 6789   236789 23789  !
   +----------------------+----------------------+----------------------+
   ! 14789  24789  1789   ! 34789  2389   247    ! 789    5      6      !
   ! 3      789    5      ! 1789   1689   167    ! 2      789    4      !
   ! 6      24789  789    ! 45789  2589   247    ! 3      1      789    !
   +----------------------+----------------------+----------------------+
   ! 1789   3789   13789  ! 2      13     14     ! 146789 6789   5      !
   ! 129    5      4      ! 6      7      8      ! 19     239    239    !
   ! 1278   6      1378   ! 1345   135    9      ! 1478   278    278    !
   +----------------------+----------------------+----------------------+
216 candidates.

hidden-triplets-in-a-column: c4{n3 n4 n5}{r9 r4 r6} ==> r9c4≠1, r6c4≠9, r6c4≠8, r6c4≠7, r4c4≠9, r4c4≠8, r4c4≠7
biv-chain[4]: r2n6{c7 c5} - b5n6{r5c5 r5c6} - c6n1{r5 r7} - r7n4{c6 c7} ==> r7c7≠6
hidden-single-in-a-block ==> r7c8=6
biv-chain[5]: c2n3{r1 r7} - r7c5{n3 n1} - c6n1{r7 r5} - c6n6{r5 r1} - b1n6{r1c3 r3c3} ==> r3c3≠3
whip[1]: r3n3{c9 .} ==> r1c8≠3
hidden-pairs-in-a-block: b3{n2 n3}{r3c8 r3c9} ==> r3c9≠9, r3c9≠8, r3c9≠7, r3c8≠9, r3c8≠8, r3c8≠7
biv-chain[6]: r1n5{c7 c1} - b1n4{r1c1 r1c2} - c2n3{r1 r7} - r7c5{n3 n1} - c6n1{r7 r5} - c6n6{r5 r1} ==> r1c7≠6
biv-chain[5]: b1n4{r1c1 r1c2} - b1n3{r1c2 r1c3} - c3n6{r1 r3} - c7n6{r3 r2} - b3n5{r2c7 r1c7} ==> r1c1≠5
singles ==> r2c1=5, r1c7=5
whip[12]: c2n2{r4 r6} - c2n4{r6 r1} - c2n3{r1 r7} - r7c5{n3 n1} - r7c6{n1 n4} - r6c6{n4 n7} - r6c3{n7 n8} - r5c2{n8 n7} - r4c3{n7 n1} - r9c3{n1 n7} - r7n7{c3 c7} - r4n7{c7 .} ==> r4c2≠9
PUZZLE 0 IS NOT SOLVED. 53 VALUES MISSING.
Final resolution state:
   +-------------------+-------------------+-------------------+
   ! 4789  34789 36789 ! 789   2689  267   ! 5     789   1     !
   ! 5     789   2     ! 1789  1689  3     ! 6789  4     789   !
   ! 789   1     6789  ! 789   4     5     ! 6789  23    23    !
   +-------------------+-------------------+-------------------+
   ! 14789 2478  1789  ! 34    2389  247   ! 789   5     6     !
   ! 3     789   5     ! 1789  1689  167   ! 2     789   4     !
   ! 6     24789 789   ! 45    2589  247   ! 3     1     789   !
   +-------------------+-------------------+-------------------+
   ! 1789  3789  13789 ! 2     13    14    ! 14789 6     5     !
   ! 129   5     4     ! 6     7     8     ! 19    239   239   !
   ! 1278  6     1378  ! 345   135   9     ! 1478  278   278   !
   +-------------------+-------------------+-------------------+


Note that the final whip[12] is not necessary for the rest of the solution.

Let's apply eleven's replacement method: replace all the occurrences of 7, 8 or 9 (including the decided values) by the 3 of them: 789
Code: Select all
+-------------------+-------------------+-------------------+
! 4789  34789 36789 ! 789   26789 26789 ! 5     789   1     !
! 5     789   2     ! 1789  16789 3     ! 6789  4     789   !
! 789   1     6789  ! 789   4     5     ! 6789  23    23    !
+-------------------+-------------------+-------------------+
! 14789 24789 1789  ! 34    23789 24789 ! 789   5     6     !
! 3     789   5     ! 1789  16789 16789 ! 2     789   4     !
! 6     24789 789   ! 45    2589  247   ! 3     1     789   !
+-------------------+-------------------+-------------------+
! 1789  3789  13789 ! 2     13    14    ! 14789 6     5     !
! 12789 5     4     ! 6     789   789   ! 1789  23789 23789 !
! 12789 6     13789 ! 345   135   789   ! 14789 2789  2789  !
+-------------------+-------------------+-------------------+


Arbitrarily replace the diagonal of 789's in b6 by 7, 8, 9 and solve:
Code: Select all
(solve-sukaku-grid
+-------------------+-------------------+-------------------+
! 4789  34789 36789 ! 789   26789 26789 ! 5     789   1     !
! 5     789   2     ! 1789  16789 3     ! 6789  4     789   !
! 789   1     6789  ! 789   4     5     ! 6789  23    23    !
+-------------------+-------------------+-------------------+
! 14789 24789 1789  ! 34    23789 24789 ! 7     5     6     !
! 3     789   5     ! 1789  16789 16789 ! 2     8     4     !
! 6     24789 789   ! 45    2589  247   ! 3     1     9     !
+-------------------+-------------------+-------------------+
! 1789  3789  13789 ! 2     13    14    ! 14789 6     5     !
! 12789 5     4     ! 6     789   789   ! 1789  23789 23789 !
! 12789 6     13789 ! 345   135   789   ! 14789 2789  2789  !
+-------------------+-------------------+-------------------+
)

Code: Select all
whip[1]: r7n7{c3 .} ==> r9c3≠7, r8c1≠7, r9c1≠7
whip[1]: c4n8{r3 .} ==> r2c5≠8, r1c5≠8, r1c6≠8
z-chain[4]: r1c8{n9 n7} - r2c9{n7 n8} - r2c2{n8 n7} - r5c2{n7 .} ==> r1c2≠9
z-chain[4]: r2c9{n7 n8} - r2c2{n8 n9} - r5c2{n9 n7} - c4n7{r5 .} ==> r2c5≠7
whip[4]: r5c2{n9 n7} - r6n7{c3 c6} - r9c6{n7 n8} - r8c6{n8 .} ==> r5c6≠9
whip[5]: c4n9{r3 r5} - r5c2{n9 n7} - r6n7{c3 c6} - r9c6{n7 n8} - r8c6{n8 .} ==> r1c6≠9
whip[6]: r6c3{n8 n7} - r5c2{n7 n9} - r2c2{n9 n7} - r3n7{c3 c4} - r3n8{c4 c7} - r2c9{n8 .} ==> r1c3≠8
whip[5]: r2n1{c4 c5} - r7c5{n1 n3} - c2n3{r7 r1} - r1n4{c2 c1} - r1n8{c1 .} ==> r2c4≠8
whip[6]: r1c8{n7 n9} - r1c4{n9 n8} - r3c4{n8 n9} - r2n9{c5 c2} - r5c2{n9 n7} - c4n7{r5 .} ==> r1c6≠7
whip[6]: c4n1{r5 r2} - b2n7{r2c4 r1c5} - r1c8{n7 n9} - c4n9{r1 r3} - b1n9{r3c1 r2c2} - r5c2{n9 .} ==> r5c4≠7
whip[1]: c4n7{r3 .} ==> r1c5≠7
biv-chain[5]: c2n3{r1 r7} - r7c5{n3 n1} - b2n1{r2c5 r2c4} - r5c4{n1 n9} - r5c2{n9 n7} ==> r1c2≠7
whip[5]: r2n6{c7 c5} - r1c6{n6 n2} - r1c5{n2 n9} - r1c8{n9 n7} - r2c9{n7 .} ==> r2c7≠8
biv-chain[3]: b3n7{r1c8 r2c9} - b3n8{r2c9 r3c7} - b2n8{r3c4 r1c4} ==> r1c4≠7
biv-chain[4]: b2n7{r3c4 r2c4} - b2n1{r2c4 r2c5} - r2n6{c5 c7} - r3n6{c7 c3} ==> r3c3≠7
biv-chain[5]: c2n3{r1 r7} - r7c5{n3 n1} - b2n1{r2c5 r2c4} - c4n7{r2 r3} - b2n8{r3c4 r1c4} ==> r1c2≠8
whip[5]: c4n7{r3 r2} - r2n1{c4 c5} - r2n6{c5 c7} - b3n9{r2c7 r1c8} - b3n7{r1c8 .} ==> r3c4≠9
whip[4]: r7n9{c3 c7} - r2c7{n9 n6} - r3n6{c7 c3} - r3n9{c3 .} ==> r9c1≠9
whip[4]: r7n9{c3 c7} - r2c7{n9 n6} - r3n6{c7 c3} - r3n9{c3 .} ==> r8c1≠9
whip[5]: c2n3{r7 r1} - r1n4{c2 c1} - r1n8{c1 c4} - r3c4{n8 n7} - c1n7{r3 .} ==> r7c2≠7
biv-chain[6]: r3c4{n7 n8} - r1n8{c4 c1} - r1n4{c1 c2} - c2n3{r1 r7} - r7c5{n3 n1} - b2n1{r2c5 r2c4} ==> r2c4≠7
singles ==> r3c4=7, r1c4=8
hidden-pairs-in-a-row: r2{n7 n8}{c2 c9} ==> r2c2≠9
biv-chain[3]: c1n7{r7 r1} - r2c2{n7 n8} - r3c1{n8 n9} ==> r7c1≠9
biv-chain[3]: r5c2{n9 n7} - r2c2{n7 n8} - r3c1{n8 n9} ==> r4c1≠9
whip[1]: c1n9{r3 .} ==> r1c3≠9, r3c3≠9
biv-chain[4]: r1c8{n9 n7} - r2n7{c9 c2} - r5c2{n7 n9} - c4n9{r5 r2} ==> r2c7≠9, r1c5≠9
singles ==> r2c7=6, r3c3=6
finned-x-wing-in-rows: n8{r3 r7}{c7 c1} ==> r9c1≠8, r8c1≠8
naked-pairs-in-a-block: b7{r8c1 r9c1}{n1 n2} ==> r9c3≠1, r7c3≠1, r7c1≠1
hidden-single-in-a-column ==> r4c3=1
whip[1]: c3n9{r9 .} ==> r7c2≠9
biv-chain[3]: c2n3{r7 r1} - r1c3{n3 n7} - r2c2{n7 n8} ==> r7c2≠8
stte
   743826591
   582193647
   916745823
   491382756
   375961284
   628457319
   837214965
   254679138
   169538472

Make the proper permutation of 7,8, 9 to stick to the original givens in b8 (in the present case, permute 8 and 9).

A puzzle that was in T&E(3) is now solved in W6.

It seems to me that such a method will apply for any case of a possible trivalue oddagon that has at least one block with no additional candidate. And it will be much simpler than forcing nets based on 3, 4 or more cells.
denis_berthier
2010 Supporter
 
Posts: 4190
Joined: 19 June 2007
Location: Paris

Re: The hardest sudokus (new thread)

Postby ghfick » Tue Apr 19, 2022 6:21 am

The pattern yielding so many interesting steps involves 12 cells each containing the same three digits and then one or more cells with extra digits. I am curious if one or more of these 12 cells could contain fewer than the three digits. i.e. could one or more of the cells be bi-value cells with just two of the three digits? Could one or more cells contain a given [or a placement?] If so, why is the logic still sound? If not, why not? Could the extra digit(s) be in an otherwise bi-value cell?
Are there examples with the harder puzzles? I may have an example but this puzzle is solved without the need for the pattern.
Maybe this matter has been discussed already. If so, sorry but then please direct to such.
ghfick
 
Posts: 233
Joined: 06 April 2016
Location: Calgary, Alberta, Canada youtube.com/@gordonfick

Re: The hardest sudokus (new thread)

Postby denis_berthier » Tue Apr 19, 2022 7:28 am

ghfick wrote:The pattern yielding so many interesting steps involves 12 cells each containing the same three digits and then one or more cells with extra digits. I am curious if one or more of these 12 cells could contain fewer than the three digits. i.e. could one or more of the cells be bi-value cells with just two of the three digits? Could one or more cells contain a given [or a placement?] If so, why is the logic still sound? If not, why not? Could the extra digit(s) be in an otherwise bi-value cell?

It was one of the topics of the tridagon thread: http://forum.enjoysudoku.com/the-tridagon-rule-t39859.html
But I've been busy with other things.
What's obvious is, in case there are only additional candidates in only one cell (tridagon elimination rules), there may be less than 3 candidates in that cell.
It's also obvious that some cyclic patterns in each block, instead of the full 123 pattern, still allow eliminations. However, most of these patterns will be degenerated and not in T&E(3).
In cases with additional candidates in more than 1 cell, it becomes more complicated.
Some work remains to be done.
denis_berthier
2010 Supporter
 
Posts: 4190
Joined: 19 June 2007
Location: Paris

Re: The hardest sudokus (new thread)

Postby marek stefanik » Tue Apr 19, 2022 1:50 pm

Code: Select all
.---------------------.-----------------.-----------------------.
| 45789  34789  36789 | 789   2689 d267 | 56789   36789   1     |
| 5789   789    2     | 1789 e1689  3   |f56789   4       789   |
| 789    1      36789 | 789   4     5   | 6789    236789  23789 |
:---------------------+-----------------+-----------------------:
| 14789  24789  1789  | 34    2389  247 | 789     5       6     |
| 3      789    5     | 1789  1689 c167 | 2       789     4     |
| 6      24789  789   | 45    2589  247 | 3       1       789   |
:---------------------+-----------------+-----------------------:
| 1789   3789   13789 | 2     13   b14  |a146789  6789    5     |
| 129    5      4     | 6     7     8   | 19      239     239   |
| 1278   6      1378  | 345   135   9   | 1478    278     278   |
'---------------------'-----------------'-----------------------'
4r7c7 = (4–1)r7c6 = (1–6)r5c6 = r1c6 – r2c5 = 6r2c7 => –6r7c7

Suppose -13r7c23.
Code: Select all
.---------------------.-----------------.---------------------.
| 4–5789 3–4789#6789–3| 789   2689  267 | 5789–6#789–3  1     |
| 5–789 #789    2     | 1789  1689  3   | 56789  4     #789   |
|#789    1      3789–6| 789   4     5   |#6789   23789  23789 |
:---------------------+-----------------+---------------------:
|#789–14 24789  1–789 | 34    2389  247 |#789    5      6     |
| 3     #789    5     | 1789  1689  167 | 2     #789    4     |
| 6      24789 #789   | 45    2589  247 | 3      1     #789   |
:---------------------+-----------------+---------------------:
| 1789   789    789   | 2     13    14  | 14789  6      5     |
| 129    5      4     | 6     7     8   | 19     239    239   |
| 1278   6      3–178 | 345   135   9   | 1478   278    278   |
'---------------------'-----------------'---------------------'
HS 3b7, 1c3, 3b1, 4b1, 5b1
TH 789b1346 internals 6r1c3, 6r3c7 => –6r3c3, –6r1c7

Code: Select all
.-------------------.-----------------.---------------------.
| 4     3      6–789| 789   2689  267 | 56789 a789    1     |
| 5    c789    2    | 1–789 6–189 3   | 56789  4      789   |
| 789   1      789  |b789   4     5   | 6789   23789  23789 |
:-------------------+-----------------+---------------------:
| 789   24789  1    | 34    2389  247 | 789    5      6     |
| 3    d789    5    |d789–1 1689  167 | 2     d789    4     |
| 6     24789  789  | 45    2589  247 | 3      1      789   |
:-------------------+-----------------+---------------------:
| 1789  789    789  | 2     13    14  | 14789  6      5     |
| 129   5      4    | 6     7     8   | 19     239    239   |
| 1278  6      3    | 45    15    9   | 1478   278    278   |
'-------------------'-----------------'---------------------'
HS 6b1, 6b2, 1b2
the digit in r1c8 is forced into r3c4 in b2, r2c2 in b1 and eliminated out of the 789 triple in r5c248, ie. contra.

Therefore (1|3)r7c23, virtual pair 13r7c235 => -13r7c167.
Code: Select all
.---------------------.--------------.---------------.
| 4789   34789  3789  | 789  2    6  | 5    x–yz  1   |
| 5    yz789    2     | 1   x89   3  | 6    4  yz789 |
|x789    1      6     | 789  4    5  | 789  23   23  |
:---------------------+--------------+---------------:
| 14789  24789  1789  | 34   389  27 | 789  5    6   |
| 3    yz789    5     |x89   6    1  | 2  yz789  4   |
| 6      24789  789   | 45   589  27 | 3    1    x–yz|
:---------------------+--------------+---------------:
| 789    3789   13789 | 2    13   4  |x789  6    5   |
| 29     5      4     | 6    7    8  | 1    239  239 |
| 1278   6     x1378  | 35   135  9  | 4    278  278 |
'---------------------'--------------'---------------'
Let x be the digit in r2c5 and yz be the remaining digit among 789.
HS xc4; remote pair yzr25 => –yzr1c8, -yzr6c9 => NS xr1c8, xr6c9; HS xb1, xb9, xb7
x appears both in r2c5 and r9c3 => x=8, stte

ghfick wrote:I am curious if one or more of these 12 cells could contain fewer than the three digits.
The pattern doesn't rely on uniqueness. It simply doesn't have a solution.
When you remove some of the candidates (whether during the solve or in the initial state), the number of solutions obviously cannot increase, so it still won't have a solution.
That means that any missing candidates have no effect on its eliminations.

Marek
marek stefanik
 
Posts: 359
Joined: 05 May 2021

Re: The hardest sudokus (new thread)

Postby mith » Tue Apr 19, 2022 8:08 pm

Small update: The minimizer script caught up, so I'm going to start getting scripts together for relating the expanded forms. Currently at 215739 expanded forms and about 1.07 million minimals.

With the minimizer script caught up, I tweaked it for efficiency - any time an expanded form is found by this script (which finds all minimals and then singles-expands them) that is already in the database, we can update the flag for the minimizer script on that puzzle as well. (We can only find expanded forms which are contained in the original puzzle.) Because of this, I am now running it prioritizing high clue count. What tends to happen is one of the scripts will hit a new neighborhood, the adder script will expand as far as possible, and now the minimizer will run on the most expanded form of the puzzle and catch many of the sub-puzzles in the process.

I also turned back on the minimal_adder script {-1+2}; it's finding a new expanded form at a rate of about 1 for every 22 minimals, whereas the reducer script is finding them at a rate of about 1 for every 150 minimals. (The latter is a lot faster, though, and has processed over 40% of the minimals.)

Anyway, once I get the other scripts ready I'll shut these down and process everything for sharing.

Have SE rated just over 50% of the expanded forms, including everything under 30c or over 34c. Three 11.9s (nothing new) and 36 11.8s; sixteen 39c (some of which are 11.0 even with uniqueness) and five 24c (the latest is 11.7).
mith
 
Posts: 996
Joined: 14 July 2020

Re: The hardest sudokus (new thread)

Postby eleven » Tue Apr 19, 2022 10:03 pm

Yet another way to solve the above puzzle with moderate steps.
Hidden Text: Show
Those 2 chains, hidden pair and UR 23 bring it here:
3r79c3 = 314r7c256 - (4=276)r461c6 - r1c3 = 6r3c3 => -3r3c3
6r7c8 = 64r7c76 - (4=276)r461c6 - r1c78 = 6r23c7 => -6r7c7
Code: Select all
+-----------------------+----------------------+-----------------------+
|  45789  34789  36789  | 789    2689   267    | a56789  789    1      |
| c5789  c789    2      | 1789   1689   3      | b56789  4      789    |
| c789    1     c6789   | 789    4      5      | b6789   23     23     |
+-----------------------+----------------------+-----------------------+
|  14789  24789  1789   | 34     2389   247    |  789    5      6      |
|  3      789    5      | 1789   1689   167    |  2      789    4      |
|  6      24789  789    | 45     2589   247    |  3      1      789    |
+-----------------------+----------------------+-----------------------+
|  1789   3789   13789  | 2      13     14     |  478    6      5      |
|  2      5      4      | 6      7      8      |  1      39     39     |
|  178    6      1378   | 345    135    9      |  478    278    278    |
+-----------------------+----------------------+-----------------------+

56r1c7 = 56r23c7 - (6=5)b1p4579 - r2c7 = 5r1c7 => -789r1c7
Code: Select all
+-----------------------+-----------------------+-----------------------+
|  45789  34789  36789  |  789    2689   267    |  56    #789    1      |
|  5789  #789    2      | a1789  b1689   3      | #789+56 4     #789    |
| #789    1     #789+6  | #789    4      5      |  6789   23     23     |
+-----------------------+-----------------------+-----------------------+
|  14789  24789  1789   |  34     2389   247    |  789    5      6      |
|  3     #789    5      | #789+1  1689   167    |  2     #789    4      |
|  6      24789  789    |  45     2589   247    |  3      1      789    |
+-----------------------+-----------------------+-----------------------+
|  1789   3789   13789  |  2      13     14     |  478    6      5      |
|  2      5      4      |  6      7      8      |  1      39     39     |
|  178    6      1378   |  345    135    9      |  478    278    278    |
+-----------------------+-----------------------+-----------------------+

Deadly pattern 789 in marked cells (r1c8,r2c279,r3c134,r5c248)
(the digit in r2c2 goes to r3c4 and r1c8 too, thus killing all in r5)
Externals 56r2c7,6r3c3,1r5c4
6r3c3 -> 6r2c7
1r5c4 -> 1r2c5 -> 6r2c7
=> 56r2c7
Code: Select all
+------------------------+---------------------+-----------------------+
| a45789 b34789 c#3789   | 789    2689   267   |  56    #789    1      |
|  5789  #789     2      | 1789   1689   3     |  56     4     #789    |
| #789    1       6      | 789    4      5     | #789    23     23     |
+------------------------+---------------------+-----------------------+
| #14789  24789   1789   | 34     2389   247   | #789    5      6      |
|  3     #789     5      | 1789   1689   167   |  2     #789    4      |
|  6      24789  #789    | 45     2589   247   |  3      1     #789    |
+------------------------+---------------------+-----------------------+
|  1789  e3789   d13789  | 2     e13    e14    |  478    6      5      |
|  2      5       4      | 6      7      8     |  1      39     39     |
| A178    6      d1378   | 35-4   135    9     | A478   A278   A278    |
+------------------------+---------------------+-----------------------+

TH in marked cells, externals 3r1c3,14r4c1
4r4c1 -> 4r1c2 -> 3r1c3
3r1c3 -> 314r7c256
1r4c1 -> 7824r9c1897
=> -4r9c4

The puzzle then can be solved with skyscraper, w-wing and remote pair.
eleven
 
Posts: 3150
Joined: 10 February 2008

PreviousNext

Return to General