template challenge

Post puzzles for others to solve here.

template challenge

Postby denis_berthier » Thu Nov 07, 2024 4:26 pm

.
Code: Select all
+-------+-------+-------+
! . . . ! . . . ! . 7 1 !
! 9 . . ! . . . ! . 6 . !
! . 2 . ! . . . ! . . . !
+-------+-------+-------+
! . . 4 ! . 7 . ! . . . !
! . 3 . ! . . . ! 4 . . !
! . . . ! 9 1 . ! . . . !
+-------+-------+-------+
! 7 . . ! 6 . . ! . . 8 !
! . . . ! 3 . . ! 2 . . !
! 1 . . ! . . . ! . . . !
+-------+-------+-------+
.......719......6..2.........4.7.....3....4.....91....7..6....8...3..2..1........ 4.4/1.2/1.2
denis_berthier
2010 Supporter
 
Posts: 4233
Joined: 19 June 2007
Location: Paris

Re: template challenge

Postby pjb » Fri Nov 08, 2024 12:09 am

Code: Select all
 3458    458     6      | 258    23589  258-9  |  589    7      1     
 9       1       58     | 7      4      58     |  3      6      2     
 358     2       7      | 1      35689  5689   |  58-9   45     49     
------------------------+----------------------+----------------------
 6       9       4      | 28     7      3      |  1      28     5     
 28      3       1      | 258    2568   2568   |  4      9      7     
 258     7       58     | 9      1      4      |  6      28     3     
------------------------+----------------------+----------------------
 7      b45      23     | 6      25-9   1      |ac59   a345    8     
 458     4568    9      | 3      58     7      |  2      1      46     
 1       568     23     | 4      2589   2589   |  7     a35     6-9     


I'll pass for now on templates, so:

(9=4)r7c78, r9c8 - (4=5)r7c2 - (5=9)r7c7 => -9 r13c7, r7c5, r9c9; stte

Phil
pjb
2014 Supporter
 
Posts: 2672
Joined: 11 September 2011
Location: Sydney, Australia

Re: template challenge

Postby denis_berthier » Fri Nov 08, 2024 12:40 am

.
I selected this puzzle because it is trivial to solve by usual techniques. The interest is only in case one uses templates.
.
denis_berthier
2010 Supporter
 
Posts: 4233
Joined: 19 June 2007
Location: Paris

Re: template challenge

Postby P.O. » Fri Nov 08, 2024 4:25 am

the puzzle is in 3-template and is solved with these 2 combinations: (1 7 9) (3 4 5)
Hidden Text: Show
Code: Select all
.......719......6..2.........4.7.....3....4.....91....7..6....8...3..2..1........

#VT: (5 28 19 21 3862 92 7 742 132)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:(15 24) (39 48) (3 12 21) (19 22 23) nil (37 39 45) (15) nil nil

34568    4568     568      2458     2345689  25689    3589     7        1                 
9        14578    1578     14578    3458     58       358      6        2                 
3568     2        15678    1578     35689    56789    3589     34589    3459             
2568     15689    4        258      7        3        15689    12589    569               
258      3        15789    258      2568     2568     4        12589    579               
2568     5678     5678     9        1        4        35678    2358     3567             
7        459      2359     6        2459     1259     1359     13459    8                 
4568     45689    5689     3        4589     15789    2        1459     45679             
1        45689    235689   24578    24589    25789    35679    3459     345679           
264 candidates.



1: (1 7 9)   13 instances

#VT: (1 28 19 21 3862 92 1 742 13)
Cells: (11 22 34 39 60 71) nil nil nil nil nil (13 21 45 47 69 79) nil (29 44)
SetVC: ( n1r2c2   n7r2c4   n7r3c3   n1r3c4   n9r4c2   n1r4c7
         n1r5c3   n9r5c8   n7r5c9   n7r6c2   n1r7c6   n7r8c6
         n1r8c8   n7r9c7   n4r2c5   n6r6c7   n5r4c9   n3r6c9
         n3r2c7   n4r9c4   n6r4c1 )

#VT: (1 28 4 3 46 8 1 742 13)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil (37) (5 6) nil nil nil

3458    4568    568     258     23589   2589    589     7       1               
9       1       58      7       4       58      3       6       2               
358     2       7       1       35689   5689    589     458     49               
6       9       4       28      7       3       1       28      5               
28      3       1       258     2568    2568    4       9       7               
258     7       58      9       1       4       6       28      3               
7       45      2359    6       259     1       59      345     8               
458     4568    5689    3       589     7       2       1       469             
1       568     235689  4       2589    2589    7       35      69               
126 candidates.



2: (3 4 5)   43 instances

#VT: (1 28 3 3 33 8 1 742 13)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil (19 56) nil nil nil nil
EraseCC: ( n4r7c2   n4r3c8   n4r8c9   n4r1c1   n6r9c9   n9r7c7
           n9r3c9   n3r3c1   n3r1c5   n9r1c6   n2r1c4   n5r5c4
           n8r4c4   n2r4c8   n8r6c8   n5r6c3   n8r2c3   n5r2c6
           n2r6c1   n6r1c3   n8r5c1   n5r8c1   n9r8c3   n8r8c5
           n8r9c2   n2r9c6   n5r1c2   n8r1c7   n6r3c5   n8r3c6
           n5r3c7   n2r5c5   n6r5c6   n5r7c5   n3r7c8   n6r8c2
           n3r9c3   n9r9c5   n5r9c8   n2r7c3 )
4 5 6   2 3 9   8 7 1
9 1 8   7 4 5   3 6 2
3 2 7   1 6 8   5 4 9
6 9 4   8 7 3   1 2 5
8 3 1   5 2 6   4 9 7
2 7 5   9 1 4   6 8 3
7 4 2   6 5 1   9 3 8
5 6 9   3 8 7   2 1 4
1 8 3   4 9 2   7 5 6

try this one
P.O.
 
Posts: 1759
Joined: 07 June 2021

Re: template challenge

Postby denis_berthier » Fri Nov 08, 2024 4:37 am

.
This is not a solution as long as the combinations appear out of thin air.
.
denis_berthier
2010 Supporter
 
Posts: 4233
Joined: 19 June 2007
Location: Paris

Re: template challenge

Postby P.O. » Fri Nov 08, 2024 4:47 am

obviously this is a solution, apply these two combinations and you will see
P.O.
 
Posts: 1759
Joined: 07 June 2021

Re: template challenge

Postby denis_berthier » Fri Nov 08, 2024 4:51 am

P.O. wrote:obviously this is a solution, apply these two combinations and you will see

The question is, how do you find it? How many other combinations do you need to try?
denis_berthier
2010 Supporter
 
Posts: 4233
Joined: 19 June 2007
Location: Paris

Re: template challenge

Postby P.O. » Fri Nov 08, 2024 5:19 am

it is the same process as looking for a onestep solution with the usual techniques, i determine the level of difficulty and look for the shortest combination of techniques available to me that provides the solution

for this puzzle i determine its classification, 3-template, and then i look for the smallest number of the 84 combinations of size 3 that gives the solution
simplest-first method:
Hidden Text: Show
Code: Select all
.......719......6..2.........4.7.....3....4.....91....7..6....8...3..2..1........

34568    4568     3568     2458     2345689  25689    3589     7        1                 
9        14578    13578    14578    3458     1578     358      6        2                 
34568    2        135678   14578    345689   156789   3589     34589    3459             
2568     15689    4        258      7        3        15689    12589    569               
2568     3        1256789  258      2568     2568     4        12589    5679             
2568     5678     25678    9        1        4        35678    2358     3567             
7        459      2359     6        2459     1259     1359     13459    8                 
4568     45689    5689     3        4589     15789    2        1459     45679             
1        45689    235689   24578    24589    25789    35679    3459     345679           
278 candidates.


#VT: (5 28 19 21 3862 92 7 742 132)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:(15 24) (39 48) (3 12 21) (19 22 23) nil (37 39 45) (15) nil nil
 2combs
#VT: (3 28 19 21 3411 92 3 673 107)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:(35 62) nil nil nil nil nil (12 48 54 81) nil nil
 2combs
#VT: (3 27 19 19 3063 80 3 662 91)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil nil nil nil nil nil
 3combs
#VT: (1 27 19 15 1453 52 1 324 4)
Cells: (11 22 34 39 60 71) nil nil nil nil nil (13 21 45 47 69 79) nil (29 44
                                                                        66)
SetVC: ( n1r2c2   n7r2c4   n7r3c3   n1r3c4   n9r4c2   n1r4c7
         n1r5c3   n9r5c8   n7r5c9   n7r6c2   n1r7c6   n9r8c3
         n7r8c6   n1r8c8   n7r9c7   n4r2c5   n6r6c7   n5r4c9
         n3r6c9   n3r2c7   n4r9c4   n6r4c1 )

#VT: (1 27 4 3 43 6 1 324 4)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil (37) (5 6) nil (75) (23)
 2combs
#VT: (1 6 3 3 41 6 1 16 4)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil (40) nil nil nil nil nil (26) nil
 2combs
#VT: (1 5 3 3 34 6 1 16 4)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil (5) nil nil nil nil nil nil nil
 2combs
#VT: (1 5 3 3 32 6 1 16 4)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil (6) nil nil nil nil
 3combs
#VT: (1 5 3 3 8 4 1 14 3)
Cells: nil nil nil nil nil (3) nil nil nil
SetVC: ( n6r1c3 )

#VT: (1 5 3 3 8 4 1 14 3)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil (5 7 19 23 24 56 57 75) nil nil nil (5 78)
EraseCC: ( n4r7c2   n4r3c8   n4r8c9   n4r1c1   n5r3c7   n6r9c9
           n6r8c2   n8r1c7   n9r9c5   n9r7c7   n9r3c9   n9r1c6
           n5r1c2   n2r1c4   n3r1c5   n8r2c3   n5r2c6   n3r3c1
           n8r4c4   n2r4c8   n5r5c4   n5r6c3   n8r6c8   n8r9c2
           n2r9c6   n6r5c6   n2r6c1   n5r7c5   n3r7c8   n5r8c1
           n8r8c5   n3r9c3   n5r9c8   n6r3c5   n8r3c6   n8r5c1
           n2r5c5   n2r7c3 )
4 5 6   2 3 9   8 7 1
9 1 8   7 4 5   3 6 2
3 2 7   1 6 8   5 4 9
6 9 4   8 7 3   1 2 5
8 3 1   5 2 6   4 9 7
2 7 5   9 1 4   6 8 3
7 4 2   6 5 1   9 3 8
5 6 9   3 8 7   2 1 4
1 8 3   4 9 2   7 5 6

(2 2 3 2 2 2 3)
puzzle in 3(2)-Template
P.O.
 
Posts: 1759
Joined: 07 June 2021

Re: template challenge

Postby denis_berthier » Fri Nov 08, 2024 5:46 am

.
My main question was: how many templates do you need to consider to conclude it's "3-template"?
.
denis_berthier
2010 Supporter
 
Posts: 4233
Joined: 19 June 2007
Location: Paris

Re: template challenge

Postby P.O. » Fri Nov 08, 2024 6:38 am

if you mean how many instances of the combinations are produced during the simplest-first method, here they are for each combination in lexical order ((1 2) (1 3) ...) and ((1 2 3) (1 2 4) ...)
Hidden Text: Show
Code: Select all
.......719......6..2.........4.7.....3....4.....91....7..6....8...3..2..1........

34568    4568     3568     2458     2345689  25689    3589     7        1                 
9        14578    13578    14578    3458     1578     358      6        2                 
34568    2        135678   14578    345689   156789   3589     34589    3459             
2568     15689    4        258      7        3        15689    12589    569               
2568     3        1256789  258      2568     2568     4        12589    5679             
2568     5678     25678    9        1        4        35678    2358     3567             
7        459      2359     6        2459     1259     1359     13459    8                 
4568     45689    5689     3        4589     15789    2        1459     45679             
1        45689    235689   24578    24589    25789    35679    3459     345679           
278 candidates.


#VT: (5 28 19 21 3862 92 7 742 132)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:(15 24) (39 48) (3 12 21) (19 22 23) nil (37 39 45) (15) nil nil

36 2-comb instances
(116 84 72 9649 336 4 1930 234 206 464 40436 1344 186 7450 1946 137 28263 941
 103 7228 1428 30765 1231 102 8198 1450 129464 13668 844400 205918 328 26572
 5734 2888 384 46112)
 
 2combs
#VT: (3 28 19 21 3411 92 3 673 107)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:(35 62) nil nil nil nil nil (12 48 54 81) nil nil

36 2-comb instances
(70 53 43 5512 186 4 1192 142 206 464 36311 1344 74 6811 1551 137 25418 941 49
 6673 1132 27473 1231 33 7400 1243 113650 5612 664867 147556 128 23979 4569
 1130 150 33612)
 
 2combs
#VT: (3 27 19 19 3063 80 3 662 91)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil nil nil nil nil nil

36 2-comb instances
(70 53 39 5172 166 4 1175 142 196 402 31750 1179 71 6357 1291 125 23128 809 49
 6550 995 22358 965 33 6716 912 89267 5336 584232 113959 128 20629 3428 1130
 122 28033)

84 3-comb instances
(457 706 46523 2100 81 9469 1801 236 35321 1605 59 11046 1469 24951 1437 17
 7593 960 101174 3210 545336 89172 108 24082 3300 672 13 23349 899 77459 4243
 447 22326 4888 163873 10601 592 46458 9572 434306 47597 1701032 567427 1621
 91654 24212 9041 1502 134316 47506 2943 192 20173 2836 307281 34549 1965620
 439356 1043 99530 19732 9224 1101 151211 398554 20237 1993772 378208 933
 131458 21131 6235 679 138537 73002 5532437 1369948 530691 84424 9063921 18280
 2216 363227 20730)
 
 3combs
#VT: (1 27 19 15 1453 52 1 324 4)
Cells: (11 22 34 39 60 71) nil nil nil nil nil (13 21 45 47 69 79) nil (29 44 66)
SetVC: ( n1r2c2   n7r2c4   n7r3c3   n1r3c4   n9r4c2   n1r4c7
         n1r5c3   n9r5c8   n7r5c9   n7r6c2   n1r7c6   n9r8c3
         n7r8c6   n1r8c8   n7r9c7   n4r2c5   n6r6c7   n5r4c9
         n3r6c9   n3r2c7   n4r9c4   n6r4c1 )

#VT: (1 27 4 3 43 6 1 324 4)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil (37) (5 6) nil (75) (23)

36 2-comb instances
(22 4 3 43 6 1 251 4 45 69 442 72 27 3305 61 5 92 15 4 748 14 56 10 3 435 8 142
 43 2763 95 6 674 18 213 4 620)
 
 2combs
#VT: (1 6 3 3 41 6 1 16 4)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil (40) nil nil nil nil nil (26) nil

36 2-comb instances
(6 3 3 41 6 1 16 4 7 18 113 24 6 38 14 5 69 13 3 39 10 56 10 3 35 8 134 41 79
 90 6 48 18 16 4 37)
 
 2combs
#VT: (1 5 3 3 34 6 1 16 4)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil (5) nil nil nil nil nil nil nil

36 2-comb instances
(5 3 3 34 6 1 16 4 7 15 68 18 5 31 11 5 62 13 3 39 10 45 10 3 35 8 102 34 73 76
 6 48 18 16 4 37)
 
 2combs
#VT: (1 5 3 3 32 6 1 16 4)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil (6) nil nil nil nil

36 2-comb instances
(5 3 3 32 6 1 16 4 7 15 68 18 5 31 11 5 56 13 3 39 10 42 10 3 35 8 94 32 71 74
 6 48 18 16 4 37)

84 3-comb instances
(7 15 68 18 5 31 11 5 56 13 3 39 10 42 10 3 35 8 94 32 71 74 6 48 18 16 4 37 11
 65 18 7 39 10 85 32 15 72 21 143 68 63 69 18 48 28 31 11 39 32 14 5 51 12 107
 56 115 108 13 72 27 39 10 68 50 42 67 72 10 38 13 35 8 53 94 88 167 71 74 75
 48 18 86 37)
 
 3combs
#VT: (1 5 3 3 8 4 1 14 3)
Cells: nil nil nil nil nil (3) nil nil nil
SetVC: ( n6r1c3 )

#VT: (1 5 3 3 8 4 1 14 3)
Cells: nil nil nil nil nil nil nil nil nil
Candidates:nil nil nil nil (5 7 19 23 24 56 57 75) nil nil nil (5 78)
EraseCC: ( n4r7c2   n4r3c8   n4r8c9   n4r1c1   n5r3c7   n6r9c9
           n6r8c2   n8r1c7   n9r9c5   n9r7c7   n9r3c9   n9r1c6
           n5r1c2   n2r1c4   n3r1c5   n8r2c3   n5r2c6   n3r3c1
           n8r4c4   n2r4c8   n5r5c4   n5r6c3   n8r6c8   n8r9c2
           n2r9c6   n6r5c6   n2r6c1   n5r7c5   n3r7c8   n5r8c1
           n8r8c5   n3r9c3   n5r9c8   n6r3c5   n8r3c6   n8r5c1
           n2r5c5   n2r7c3 )
4 5 6   2 3 9   8 7 1
9 1 8   7 4 5   3 6 2
3 2 7   1 6 8   5 4 9
6 9 4   8 7 3   1 2 5
8 3 1   5 2 6   4 9 7
2 7 5   9 1 4   6 8 3
7 4 2   6 5 1   9 3 8
5 6 9   3 8 7   2 1 4
1 8 3   4 9 2   7 5 6

(2 2 3 2 2 2 3)
puzzle in 3(2)-Template
P.O.
 
Posts: 1759
Joined: 07 June 2021

Re: template challenge

Postby denis_berthier » Fri Nov 08, 2024 6:53 am

.
illegible.
I'm asking for a simple answer: how many templates (of any size) did you have to consider? Total number.
denis_berthier
2010 Supporter
 
Posts: 4233
Joined: 19 June 2007
Location: Paris

Re: template challenge

Postby P.O. » Fri Nov 08, 2024 7:04 am

you have all the information you need to satisfy your curiosity if you don't know how to use it i can't help you
P.O.
 
Posts: 1759
Joined: 07 June 2021

Re: template challenge

Postby denis_berthier » Fri Nov 08, 2024 7:13 am

P.O. wrote:you have all the information you need to satisfy your curiosity if you don't know how to use it i can't help you

I see.
You don't know and/or don't want to give the unique number of interest because it is huge.

That was my point with this trivial puzzle. A template-based solution requires to consider huge numbers of templates of sizes 1, 2 and 3. I'll give an idea of these numbers later.
Blue, could you try your program on this puzzle?
.
denis_berthier
2010 Supporter
 
Posts: 4233
Joined: 19 June 2007
Location: Paris

Re: template challenge

Postby blue » Fri Nov 08, 2024 10:48 am

Hi Denis,

Crap: this is the solution for a completely different puzzle.
I'll leave it here, since P.O. references it below.
Sorry :(


Lots of single digit templates for:
    digit 3, that doesn't appear in the puzzle
    digit 8, that only appears once
    digit 9, that only appears once
Here's the output, with the counts you're looking for added in.

Hidden Text: Show
Code: Select all
puzzle: .2..5....4.......7...6..1....17..........5.2.8.......6....4..5...7...9...6...2...
after singles
+-------------------+--------------------+--------------------+
| 13679     2  3689 | 13489     5 134789 |  3468 34689   3489 |
|     4 13589 35689 | 12389 12389   1389 | 23568  3689      7 |
|  3579 35789  3589 |     6 23789  34789 |     1  3489 234589 |
+-------------------+--------------------+--------------------+
| 23569  3459     1 |     7 23689  34689 |  3458  3489  34589 |
|  3679  3479  3469 | 13489 13689      5 |  3478     2  13489 |
|     8 34579 23459 | 12349  1239   1349 |  3457 13479      6 |
+-------------------+--------------------+--------------------+
|  1239  1389  2389 |  1389     4 136789 | 23678     5   1238 |
|  1235 13458     7 |  1358  1368   1368 |     9 13468  12348 |
|  1359     6 34589 | 13589 13789      2 |  3478 13478   1348 |
+-------------------+--------------------+--------------------+
{ 50 2 5898 60 14 13 6 684 674 }
*** Entering level 1 ***
wasted {?} (50)
no template for digit 2 includes r2c5 -> elimination: 2r2c5
no template for digit 2 includes r6c5 -> elimination: 2r6c5
no template for digit 2 includes r7c1 -> elimination: 2r7c1
no template for digit 2 includes r7c9 -> elimination: 2r7c9
{ 50 2 5898 60 14 13 6 684 674 }
wasted {?} (7349)
+-------------------+--------------------+--------------------+
| 13679     2  3689 | 13489     5 134789 |  3468 34689   3489 |
|     4 13589 35689 | 12389  1389   1389 | 23568  3689      7 |
|  3579 35789  3589 |     6 23789  34789 |     1  3489 234589 |
+-------------------+--------------------+--------------------+
| 23569  3459     1 |     7 23689  34689 |  3458  3489  34589 |
|  3679  3479  3469 | 13489 13689      5 |  3478     2  13489 |
|     8 34579 23459 | 12349   139   1349 |  3457 13479      6 |
+-------------------+--------------------+--------------------+
|   139  1389  2389 |  1389     4 136789 | 23678     5    138 |
|  1235 13458     7 |  1358  1368   1368 |     9 13468  12348 |
|  1359     6 34589 | 13589 13789      2 |  3478 13478   1348 |
+-------------------+--------------------+--------------------+
*** Entering level 2 ***
wasted {?,?} (114448)
pruning tlist for d=3, after {2,3} [5334]
{ 50 2 4700 60 14 13 6 684 674 }
wasted {?} (4700)
wasted {?,?} (98280)
pruning tlist for d=4, after {2,4} [62]
{ 50 2 4700 56 14 13 6 684 674 }
wasted {?} (56)
wasted {?,?} (103186)
pruning tlist for d=5, after {2,5} [8]
{ 50 2 4700 56 8 13 6 684 674 }
no template for digit 5 includes r3c2 -> elimination: 5r3c2
no template for digit 5 includes r4c1 -> elimination: 5r4c1
no template for digit 5 includes r8c2 -> elimination: 5r8c2
{ 50 2 4700 56 8 13 6 684 674 }
wasted {?,?} (285)
pruning tlist for d=3, after {3,5} [15480]
{ 50 2 4508 56 8 13 6 684 674 }
wasted {?} (4508)
wasted {?,?} (205289)
pruning tlist for d=4, after {4,5} [221]
{ 50 2 4508 54 8 13 6 684 674 }
wasted {?} (54)
wasted {?,?} (95346)
pruning tlist for d=6, after {2,6} [9]
{ 50 2 4508 54 8 9 6 684 674 }
wasted {?} (9)
wasted {?,?} (300)
pruning tlist for d=3, after {3,6} [17913]
{ 50 2 4491 54 8 9 6 684 674 }
wasted {?} (4491)
wasted {?,?} (219007)
pruning tlist for d=1, after {1,7} [82]
{ 35 2 4491 54 8 9 6 684 674 }
wasted {?} (35)
wasted {?,?} (54)
pruning tlist for d=3, after {1,3} [60879]
{ 35 2 4455 54 8 9 6 684 674 }
wasted {?} (4455)
wasted {?,?} (192605)
pruning tlist for d=3, after {3,7} [12371]
{ 35 2 4274 54 8 9 6 684 674 }
wasted {?} (4274)
wasted {?,?} (196416)
pruning tlist for d=6, after {6,7} [20]
{ 35 2 4274 54 8 7 6 684 674 }
no template for digit 6 includes r1c1 -> elimination: 6r1c1
no template for digit 6 includes r5c3 -> elimination: 6r5c3
{ 35 2 4274 54 8 7 6 684 674 }
wasted {?,?} (184)
pruning tlist for d=3, after {3,6} [13192]
{ 35 2 4153 54 8 7 6 684 674 }
wasted {?} (4153)
wasted {?,?} (187562)
pruning tlist for d=8, after {1,8} [9538]
{ 35 2 4153 54 8 7 6 668 674 }
wasted {?} (668)
wasted {?,?} (9538)
pruning tlist for d=8, after {2,8} [742]
{ 35 2 4153 54 8 7 6 585 674 }
wasted {?} (585)
wasted {?,?} (819712)
pruning tlist for d=8, after {5,8} [2370]
{ 35 2 4153 54 8 7 6 574 674 }
wasted {?} (574)
wasted {?,?} (807501)
pruning tlist for d=8, after {6,8} [1691]
{ 35 2 4153 54 8 7 6 570 674 }
wasted {?} (570)
wasted {?,?} (805422)
pruning tlist for d=9, after {1,9} [8478]
{ 35 2 4153 54 8 7 6 570 655 }
wasted {?} (655)
wasted {?,?} (8478)
pruning tlist for d=9, after {2,9} [774]
{ 35 2 4153 54 8 7 6 570 597 }
wasted {?} (597)
wasted {?,?} (835357)
pruning tlist for d=9, after {5,9} [2111]
{ 35 2 4153 54 8 7 6 570 585 }
wasted {?} (585)
wasted {?,?} (819109)
pruning tlist for d=9, after {6,9} [2115]
{ 35 2 4153 54 8 7 6 570 574 }
wasted {?} (574)
wasted {?,?} (804332)
pruning tlist for d=9, after {7,9} [1499]
{ 35 2 4153 54 8 7 6 570 528 }
wasted {?} (528)
wasted {?,?} (846358)
+------------------+--------------------+--------------------+
| 1379     2  3689 | 13489     5 134789 |  3468 34689   3489 |
|    4 13589 35689 | 12389  1389   1389 | 23568  3689      7 |
| 3579  3789  3589 |     6 23789  34789 |     1  3489 234589 |
+------------------+--------------------+--------------------+
| 2369  3459     1 |     7 23689  34689 |  3458  3489  34589 |
| 3679  3479   349 | 13489 13689      5 |  3478     2  13489 |
|    8 34579 23459 | 12349   139   1349 |  3457 13479      6 |
+------------------+--------------------+--------------------+
|  139  1389  2389 |  1389     4 136789 | 23678     5    138 |
| 1235  1348     7 |  1358  1368   1368 |     9 13468  12348 |
| 1359     6 34589 | 13589 13789      2 |  3478 13478   1348 |
+------------------+--------------------+--------------------+
*** Entering level 3 ***
wasted {?,?,?} (671810)
pruning tlist for d=3, after {2,3,4} [49480]
{ 35 2 4132 54 8 7 6 570 528 }
wasted {?} (4132)
wasted {?,?} (1662894)
wasted {?,?,?} (718993)
pruning tlist for d=3, after {1,3,5} [115276]
{ 35 2 4061 54 8 7 6 570 528 }
wasted {?} (4061)
wasted {?,?} (1635035)
wasted {?,?,?} (827785)
pruning tlist for d=3, after {2,3,5} [6785]
{ 35 2 2972 54 8 7 6 570 528 }
no template for digit 3 includes r2c7 -> elimination: 3r2c7
no template for digit 3 includes r3c9 -> elimination: 3r3c9
{ 35 2 2972 54 8 7 6 570 528 }
wasted {?,?} (1183145)
wasted {?,?,?} (631035)
pruning tlist for d=4, after {2,4,5} [85]
{ 35 2 2972 35 8 7 6 570 528 }
no template for digit 4 includes r3c9 -> elimination: 4r3c9
{ 35 2 2972 35 8 7 6 570 528 }
wasted {?,?} (54268)
wasted {?,?,?} (295410)
pruning tlist for d=3, after {2,3,4} [22453]
{ 35 2 2917 35 8 7 6 570 528 }
wasted {?} (2917)
wasted {?,?} (1139675)
wasted {?,?,?} (518276)
pruning tlist for d=1, after {1,2,6} [137]
{ 31 2 2917 35 8 7 6 570 528 }
wasted {?} (31)
wasted {?,?} (50526)
wasted {?,?,?} (377993)
pruning tlist for d=3, after {1,3,6} [76418]
{ 31 2 2906 35 8 7 6 570 528 }
wasted {?} (2906)
wasted {?,?} (1130480)
wasted {?,?,?} (550687)
pruning tlist for d=3, after {2,3,6} [5437]
{ 31 2 2298 35 8 7 6 570 528 }
no template for digit 3 includes r4c1 -> elimination: 3r4c1
{ 31 2 2298 35 8 7 6 570 528 }
wasted {?,?} (893570)
wasted {?,?,?} (445180)
pruning tlist for d=4, after {2,4,6} [100]
{ 31 2 2298 32 8 7 6 570 528 }
wasted {?} (32)
wasted {?,?} (42259)
wasted {?,?,?} (336419)
pruning tlist for d=6, after {2,5,6} [20]
{ 31 2 2298 32 8 6 6 570 528 }
no template for digit 6 includes r2c7 -> elimination: 6r2c7
{ 31 2 2298 32 8 6 6 570 528 }
wasted {?,?} (148)
pruning tlist for d=3, after {3,6} [6169]
{ 31 2 2200 32 8 6 6 570 528 }
wasted {?} (2200)
wasted {?,?} (490083)
pruning tlist for d=8, after {6,8} [1475]
{ 31 2 2200 32 8 6 6 563 528 }
wasted {?} (563)
wasted {?,?} (790944)
pruning tlist for d=9, after {6,9} [1634]
{ 31 2 2200 32 8 6 6 563 514 }
wasted {?} (514)
wasted {?,?} (480925)
wasted {?,?,?} (389814)
pruning tlist for d=3, after {2,3,6} [4609]
{ 31 2 2088 32 8 6 6 563 514 }
wasted {?} (2088)
wasted {?,?} (789824)
wasted {?,?,?} (377928)
pruning tlist for d=4, after {2,4,6} [81]
{ 31 2 2088 29 8 6 6 563 514 }
no template for digit 4 includes r6c8 -> elimination: 4r6c8
{ 31 2 2088 29 8 6 6 563 514 }
wasted {?,?} (35812)
wasted {?,?,?} (262721)
pruning tlist for d=3, after {3,5,6} [12261]
{ 31 2 1974 29 8 6 6 563 514 }
wasted {?} (1974)
wasted {?,?} (747807)
wasted {?,?,?} (391682)
pruning tlist for d=1, after {1,2,7} [61]
{ 26 2 1974 29 8 6 6 563 514 }
wasted {?} (26)
wasted {?,?} (32005)
wasted {?,?,?} (146936)
pruning tlist for d=3, after {1,3,5} [40495]
{ 26 2 1971 29 8 6 6 563 514 }
wasted {?} (1971)
wasted {?,?} (742719)
wasted {?,?,?} (349081)
pruning tlist for d=3, after {1,3,7} [22462]
{ 26 2 1863 29 8 6 6 563 514 }
wasted {?} (1863)
wasted {?,?} (699537)
wasted {?,?,?} (354889)
pruning tlist for d=3, after {2,3,7} [3651]
{ 26 2 1462 29 8 6 6 563 514 }
no template for digit 3 includes r3c5 -> elimination: 3r3c5
no template for digit 3 includes r7c7 -> elimination: 3r7c7
{ 26 2 1462 29 8 6 6 563 514 }
wasted {?,?} (544194)
wasted {?,?,?} (310043)
pruning tlist for d=7, after {2,5,7} [22]
{ 26 2 1462 29 8 6 5 563 514 }
no template for digit 7 includes r5c7 -> elimination: 7r5c7
no template for digit 7 includes r6c2 -> elimination: 7r6c2
{ 26 2 1462 29 8 6 5 563 514 }
wasted {?,?} (58)
pruning tlist for d=3, after {3,7} [4183]
{ 26 2 1438 29 8 6 5 563 514 }
wasted {?} (1438)
wasted {?,?} (45074)
pruning tlist for d=4, after {4,7} [91]
{ 26 2 1438 28 8 6 5 563 514 }
wasted {?} (28)
wasted {?,?} (518388)
pruning tlist for d=9, after {7,9} [1149]
{ 26 2 1438 28 8 6 5 563 469 }
wasted {?} (469)
wasted {?,?} (325619)
wasted {?,?,?} (248770)
pruning tlist for d=3, after {1,3,7} [16689]
{ 26 2 1437 28 8 6 5 563 469 }
wasted {?} (1437)
wasted {?,?} (513637)
wasted {?,?,?} (261313)
pruning tlist for d=3, after {2,3,7} [3174]
{ 26 2 1396 28 8 6 5 563 469 }
wasted {?} (1396)
wasted {?,?} (498512)
wasted {?,?,?} (257006)
pruning tlist for d=4, after {2,4,7} [58]
{ 26 2 1396 25 8 6 5 563 469 }
no template for digit 4 includes r5c2 -> elimination: 4r5c2
{ 26 2 1396 25 8 6 5 563 469 }
wasted {?,?} (23143)
wasted {?,?,?} (170953)
pruning tlist for d=1, after {1,6,7} [92]
{ 21 2 1396 25 8 6 5 563 469 }
no template for digit 1 includes r7c6 -> elimination: 1r7c6
{ 21 2 1396 25 8 6 5 563 469 }
wasted {?,?} (37)
pruning tlist for d=3, after {1,3} [11493]
{ 21 2 1387 25 8 6 5 563 469 }
wasted {?} (1387)
wasted {?,?} (39035)
pruning tlist for d=8, after {1,8} [4919]
{ 21 2 1387 25 8 6 5 556 469 }
wasted {?} (556)
wasted {?,?} (565816)
wasted {?,?,?} (78666)
pruning tlist for d=3, after {1,3,5} [22573]
{ 21 2 1383 25 8 6 5 556 469 }
wasted {?} (1383)
wasted {?,?} (485491)
wasted {?,?,?} (192060)
pruning tlist for d=3, after {1,3,7} [12257]
{ 21 2 1343 25 8 6 5 556 469 }
wasted {?} (1343)
wasted {?,?} (471200)
wasted {?,?,?} (235828)
pruning tlist for d=2, after {2,6,7} [2]
pruning tlist for d=6, after {2,6,7} [2]
pruning tlist for d=7, after {2,6,7} [2]
{ 21 1 1343 25 8 1 2 556 469 }
every template for digit 2 includes r2c7 -> placement: 2r2c7
every template for digit 2 includes r3c5 -> placement: 2r3c5
every template for digit 2 includes r4c1 -> placement: 2r4c1
every template for digit 2 includes r6c4 -> placement: 2r6c4
every template for digit 2 includes r7c3 -> placement: 2r7c3
every template for digit 2 includes r8c9 -> placement: 2r8c9
stte
solved: max level = 3
+-------+-------+-------+
| 1 2 3 | 4 5 7 | 6 8 9 |
| 4 5 6 | 1 8 9 | 2 3 7 |
| 7 8 9 | 6 2 3 | 1 4 5 |
+-------+-------+-------+
| 2 3 1 | 7 6 8 | 5 9 4 |
| 6 7 4 | 3 9 5 | 8 2 1 |
| 8 9 5 | 2 1 4 | 3 7 6 |
+-------+-------+-------+
| 3 1 2 | 9 4 6 | 7 5 8 |
| 5 4 7 | 8 3 1 | 9 6 2 |
| 9 6 8 | 5 7 2 | 4 1 3 |
+-------+-------+-------+
CPU time : 0.48s

For how to read it, as it enters "level 3", the output is:

Code: Select all
*** Entering level 3 ***
wasted {?,?,?} (671810)
pruning tlist for d=3, after {2,3,4} [49480]
{ 35 2 4132 54 8 7 6 570 528 }
wasted {?} (4132)
wasted {?,?} (1662894)
wasted {?,?,?} (718993)
pruning tlist for d=3, after {1,3,5} [115276]
{ 35 2 4061 54 8 7 6 570 528 }
...

It means:
  1. it checked 671810 3-templates in dead end {d1,d2,d3} lists, then
  2. when it got to the {2,3,4} list, with 49480 entries, it found (template) eliminations for digit 3
  3. the new template counts, by digit, were { 35 2 4132 54 8 7 6 570 528 }
  4. it checked 4132 single digit templates and found nothing new
  5. it checked 1662894 2-digit templates (in some number of {d1,d2} lists), and found nothing new
  6. it checked 718993 3-digit templates, finding nothing new, until
  7. it got to the {1,3,5} list, with 115276 entries, and found (template) eliminations for digit 3
  8. the new template counts, by digit, were { 35 2 4061 54 8 7 6 570 528 }
  9. ...
Last edited by blue on Fri Nov 08, 2024 2:41 pm, edited 1 time in total.
blue
 
Posts: 1052
Joined: 11 March 2013

Re: template challenge

Postby denis_berthier » Fri Nov 08, 2024 12:12 pm

.
Thanks, Blue
I can't make direct comparisons with SudoRules, because the implementations are very different, but I see that the orders of magnitude are the same:
You say: "it checked 1,662,894 2-digit templates (in some number of {d1,d2} lists), and found nothing new"
and that's only for 2-digit templates (and maybe only part of them - not clear for me here).

Here's the SudoRules resolution path, upto depth 2:

Code: Select all
Resolution state after Singles:
   +-------------------------+-------------------------+-------------------------+
   ! 34568   4568    3568    ! 2458    2345689 25689   ! 3589    7       1       !
   ! 9       14578   13578   ! 14578   3458    1578    ! 358     6       2       !
   ! 34568   2       135678  ! 14578   345689  156789  ! 3589    34589   3459    !
   +-------------------------+-------------------------+-------------------------+
   ! 2568    15689   4       ! 258     7       3       ! 15689   12589   569     !
   ! 2568    3       1256789 ! 258     2568    2568    ! 4       12589   5679    !
   ! 2568    5678    25678   ! 9       1       4       ! 35678   2358    3567    !
   +-------------------------+-------------------------+-------------------------+
   ! 7       459     2359    ! 6       2459    1259    ! 1359    13459   8       !
   ! 4568    45689   5689    ! 3       4589    15789   ! 2       1459    45679   !
   ! 1       45689   235689  ! 24578   24589   25789   ! 35679   3459    345679  !
   +-------------------------+-------------------------+-------------------------+

278 candidates, 0 csp-links and 0 links. Density = 0.0%
Starting non trivial part of solution.
entering level T1 with <Fact-3764>
candidate in no template[1] for digit 2 ==> r6c3≠2
candidate in no template[1] for digit 6 ==> r5c9≠6
candidate in no template[1] for digit 6 ==> r5c3≠6
candidate in no template[1] for digit 2 ==> r5c3≠2
candidate in no template[1] for digit 6 ==> r5c1≠6
candidate in no template[1] for digit 1 ==> r3c6≠1
candidate in no template[1] for digit 4 ==> r3c5≠4
candidate in no template[1] for digit 4 ==> r3c4≠4
candidate in no template[1] for digit 3 ==> r3c3≠3
candidate in no template[1] for digit 4 ==> r3c1≠4
candidate in no template[1] for digit 7 ==> r2c6≠7 *
candidate in no template[1] for digit 1 ==> r2c6≠1
candidate in no template[1] for digit 3 ==> r2c3≠3
candidate in no template[1] for digit 3 ==> r1c3≠3
entering level T2 with <Fact-8673>
candidate in no template[1] for digit 1 ==> r4c8≠1
candidate in no template[1] for digit 1 ==> r7c8≠1
candidate in no template[1] for digit 7 ==> r2c3≠7
candidate in no template[1] for digit 7 ==> r6c3≠7
candidate in no template[1] for digit 7 ==> r6c9≠7
candidate in no template[1] for digit 7 ==> r9c9≠7
entering level T3 with <Fact-1428445>

(*) is the only elimination in T1 that is not equivalent to a whip[1]


The difference <Fact-1428445> - <Fact-3764> i.e. 1,424,681 is the number of templates[2] that have to be considered once the full power of T1 has been exhausted.
Note that one has to consider all these templates[2] in order to make sure no elimination (of candidates and templates[1]) allowed in T2 is missed, before activating any rules in T3.

This number alone (close to yours, and not enough to solve the puzzle) shows the total absurdity of a template solution for this puzzle.

Note that the (partial) solution I've given here hides in fact most of the elimination steps (it hides all the eliminations of templates[1]).
In order to see them, you can set global variable ?*print-templates* to TRUE in SudoRules. You will be submerged with them, but that'll give you the real number of steps involved.
.
denis_berthier
2010 Supporter
 
Posts: 4233
Joined: 19 June 2007
Location: Paris

Next

Return to Puzzles

cron