Hi Denis, regarding your resolution by templates of
this puzzle, your implementation reports: "candidate in no template[1] for digit 7 ==> r7c1≠7"
removing the 7 from r7c1 which is cell 55 means that cell 55 does not appear in any of the possible templates for 7 and since it is eliminated by combinations of 4, combinations of 2 and 3 leave at least one template for 7 which contains cell 55
as only templates for 3,7,8 and 9 have cell 55 it is this combination (3 7 8 9) which eliminates the template(s) for 7 which have cell 55 and allows the elimination r7c1<>7
so by forming this combination and checking all its instances none will be found composed of a template for 3, a template for 8, a template for 9 and a template for 7 having cell 55
it is easy to retrieve the possible templates for a value: among the 46656 templates, these are those which have all the cells of the value considered and no cells of the other values
when initializing the puzzle there are 62 possible templates for 3, 28 for 7, 43 for 8 and 31 for 9
- Code: Select all
3:
62: ((2 13 27 32 44 48 55 69 79) (2 15 27 32 44 46 58 66 79)
(2 15 27 32 44 48 55 67 79) (2 15 27 32 44 48 58 64 79)
(2 17 24 32 37 54 58 66 79) (2 17 24 32 45 46 58 66 79)
(2 17 24 32 45 48 55 67 79) (2 17 24 32 45 48 58 64 79)
(2 18 24 32 44 46 58 66 79) (2 18 24 32 44 48 55 67 79)
(2 18 24 32 44 48 58 64 79) (3 13 27 32 44 46 56 69 79)
(3 15 27 32 44 46 56 67 79) (3 15 27 32 44 46 58 65 79)
(3 17 24 32 37 54 56 67 79) (3 17 24 32 37 54 58 65 79)
(3 17 24 32 38 54 55 67 79) (3 17 24 32 38 54 58 64 79)
(3 17 24 32 45 46 56 67 79) (3 17 24 32 45 46 58 65 79)
(3 18 24 32 44 46 56 67 79) (3 18 24 32 44 46 58 65 79)
(4 10 27 32 44 48 56 69 79) (6 10 27 32 44 48 56 67 79)
(6 10 27 32 44 48 58 65 79) (8 10 24 32 38 54 58 66 79)
(8 10 24 32 45 48 56 67 79) (8 10 24 32 45 48 58 65 79)
(4 12 27 32 44 46 56 69 79) (6 12 27 32 44 46 56 67 79)
(6 12 27 32 44 46 58 65 79) (8 12 24 32 37 54 56 67 79)
(8 12 24 32 37 54 58 65 79) (8 12 24 32 38 54 55 67 79)
(8 12 24 32 38 54 58 64 79) (8 12 24 32 45 46 56 67 79)
(8 12 24 32 45 46 58 65 79) (4 17 19 32 45 48 56 69 79)
(4 18 19 32 44 48 56 69 79) (6 17 19 32 38 54 58 66 79)
(6 17 19 32 45 48 56 67 79) (6 17 19 32 45 48 58 65 79)
(6 18 19 32 44 48 56 67 79) (6 18 19 32 44 48 58 65 79)
(8 13 19 32 45 48 56 69 79) (8 15 19 32 38 54 58 66 79)
(8 15 19 32 45 48 56 67 79) (8 15 19 32 45 48 58 65 79)
(4 17 20 32 45 48 55 69 79) (4 18 20 32 44 48 55 69 79)
(6 17 20 32 37 54 58 66 79) (6 17 20 32 45 46 58 66 79)
(6 17 20 32 45 48 55 67 79) (6 17 20 32 45 48 58 64 79)
(6 18 20 32 44 46 58 66 79) (6 18 20 32 44 48 55 67 79)
(6 18 20 32 44 48 58 64 79) (8 13 20 32 45 48 55 69 79)
(8 15 20 32 37 54 58 66 79) (8 15 20 32 45 46 58 66 79)
(8 15 20 32 45 48 55 67 79) (8 15 20 32 45 48 58 64 79))
7:
28: ((2 18 22 30 41 53 55 70 78) (2 18 22 30 41 53 61 64 78)
(2 18 22 30 41 53 61 69 73) (2 18 22 33 37 53 59 70 75)
(2 18 22 33 37 53 61 68 75) (3 18 22 29 41 53 55 70 78)
(3 18 22 29 41 53 61 64 78) (3 18 22 29 41 53 61 69 73)
(3 18 22 33 37 53 59 70 74) (3 18 22 33 37 53 61 68 74)
(3 18 22 33 38 53 59 70 73) (3 18 22 33 38 53 61 68 73)
(7 10 22 29 41 53 63 66 78) (7 10 22 29 41 53 63 69 75)
(7 10 22 30 41 53 56 69 81) (7 10 22 30 41 53 63 65 78)
(7 10 22 30 41 53 63 69 74) (7 10 22 33 38 53 59 66 81)
(7 10 22 33 38 53 63 68 75) (7 12 22 29 41 53 55 69 81)
(7 12 22 29 41 53 63 64 78) (7 12 22 29 41 53 63 69 73)
(7 12 22 33 37 53 56 68 81) (7 12 22 33 37 53 59 65 81)
(7 12 22 33 37 53 63 68 74) (7 12 22 33 38 53 55 68 81)
(7 12 22 33 38 53 59 64 81) (7 12 22 33 38 53 63 68 73))
8:
43: ((5 17 21 34 40 47 55 69 81) (5 17 21 34 40 47 63 64 78)
(5 17 21 34 40 47 63 69 73) (5 17 21 36 40 47 55 70 78)
(5 17 21 36 40 47 61 64 78) (5 17 21 36 40 47 61 69 73)
(5 18 21 34 40 47 55 69 80) (5 18 21 34 40 47 55 71 78)
(5 18 21 35 40 47 55 70 78) (5 18 21 35 40 47 61 64 78)
(5 18 21 35 40 47 61 69 73) (6 17 21 34 40 47 55 68 81)
(6 17 21 34 40 47 59 64 81) (6 17 21 34 40 47 63 68 73)
(6 17 21 36 40 47 59 70 73) (6 17 21 36 40 47 61 68 73)
(6 18 21 34 40 47 55 68 80) (6 18 21 34 40 47 59 64 80)
(6 18 21 34 40 47 59 71 73) (6 18 21 35 40 47 59 70 73)
(6 18 21 35 40 47 61 68 73) (7 14 21 35 40 47 55 69 81)
(7 14 21 35 40 47 63 64 78) (7 14 21 35 40 47 63 69 73)
(7 14 21 36 40 47 55 69 80) (7 14 21 36 40 47 55 71 78)
(8 14 21 34 40 47 55 69 81) (8 14 21 34 40 47 63 64 78)
(8 14 21 34 40 47 63 69 73) (8 14 21 36 40 47 55 70 78)
(8 14 21 36 40 47 61 64 78) (8 14 21 36 40 47 61 69 73)
(7 15 21 35 40 47 55 68 81) (7 15 21 35 40 47 59 64 81)
(7 15 21 35 40 47 63 68 73) (7 15 21 36 40 47 55 68 80)
(7 15 21 36 40 47 59 64 80) (7 15 21 36 40 47 59 71 73)
(8 15 21 34 40 47 55 68 81) (8 15 21 34 40 47 59 64 81)
(8 15 21 34 40 47 63 68 73) (8 15 21 36 40 47 59 70 73)
(8 15 21 36 40 47 61 68 73))
9:
31: ((9 10 24 31 43 48 56 71 77) (9 10 24 31 44 48 56 70 77)
(9 10 24 31 44 48 61 65 77) (9 12 24 31 37 52 56 71 77)
(9 12 24 31 38 52 55 71 77) (9 12 24 31 43 46 56 71 77)
(9 12 24 31 44 46 56 70 77) (9 12 24 31 44 46 61 65 77)
(9 13 19 29 44 51 61 66 77) (9 13 19 30 43 51 56 71 77)
(9 13 19 30 44 51 56 70 77) (9 13 19 30 44 51 61 65 77)
(9 13 19 35 38 51 61 66 77) (9 13 19 33 43 48 56 71 77)
(9 13 19 33 44 48 56 70 77) (9 13 19 33 44 48 61 65 77)
(9 15 19 31 43 48 56 71 77) (9 15 19 31 44 48 56 70 77)
(9 15 19 31 44 48 61 65 77) (9 13 20 30 43 51 55 71 77)
(9 13 20 30 44 51 55 70 77) (9 13 20 30 44 51 61 64 77)
(9 13 20 35 37 51 61 66 77) (9 13 20 33 44 46 61 66 77)
(9 13 20 33 43 48 55 71 77) (9 13 20 33 44 48 55 70 77)
(9 13 20 33 44 48 61 64 77) (9 15 20 31 44 46 61 66 77)
(9 15 20 31 43 48 55 71 77) (9 15 20 31 44 48 55 70 77)
(9 15 20 31 44 48 61 64 77))
we easily observe that there are 4 templates for 7 containing cell 55:
- Code: Select all
1: (2 18 22 30 41 53 55 70 78)
2: (3 18 22 29 41 53 55 70 78)
3: (7 12 22 29 41 53 55 69 81)
4: (7 12 22 33 38 53 55 68 81)
to form the instances of the combination (3 7 8 9) the simplest is to take a template for 3, look for a template for 7 which is compatible with it, i.e. disjoint, then a template for 8 compatible with the two previous ones and finally a template for 9 in order to form a set of 4 templates pairwise disjoint
doing this i find 17184 instances of the combination (3 7 8 9) whose templates are pairwise disjoint, filtering these combinations to retain only those having the template for 7 with cell 55 i find 1726 and distributing them in the 4 categories formed by the 4 templates for 7 having cell 55, i find:
- Code: Select all
1: 608
2: 541
3: 338
4: 239
here a sample for each category:
- Code: Select all
1:
.73.8...9...9.3.879.87....3..7.3.89..9.87..3.38...9.7.73....9.8..93.87..8...973..
.73.8...9...9.3.87.987....3..7.3.89.9..87..3.38...9.7.73....9.8..93.87..8...973..
.73..8..9...9.3.879.87....3..7.3.89..9.87..3.38...9.7.73..8.9..8.93..7......973.8
.73..8..9...9.3.87.987....3..7.3.89.9..87..3.38...9.7.73..8.9..8.93..7......973.8
.73..8..9...9.3.879.87....3..7.3.89..9.87..3.38...9.7.73....9.8..938.7..8...973..
.73..8..9...9.3.87.987....3..7.3.89.9..87..3.38...9.7.73....9.8..938.7..8...973..
.73....89...983..79.87....3..7.3.89..9.87..3.38...9.7.73....9.8..93.87..8...973..
.73....89...983..7.987....3..7.3.89.9..87..3.38...9.7.73....9.8..93.87..8...973..
.73.8...9..9..3.87..87.9..3..793.8..9..87..3.38....97.79.3....8.3...879.8...973..
.73.8...9...9.3.879.87....3..7.3.89..9.87..3.38...9.7.7..3..9.8.39..87..8...973..
.73.8...9...9.3.879.87....3..7.398.....87.93.389....7.79.3....8.3...879.8...973..
.73.8...9...9.3.87.987....3..7.3.89.9..87..3.38...9.7.7..3..9.8.39..87..8...973..
.73.8...9..9..3.87..87.9..3..793...89..87..3.38....97.79.3..8...3...879.8...973..
.73.8...9...9.3.879.87....3..7.39..8...87.93.389....7.79.3..8...3...879.8...973..
.73..8..9..9..3.87..87.9..3..793.8..9..87..3.38....97.79.38....83....79.....973.8
.73..8..9...9.3.879.87....3..7.3.89..9.87..3.38...9.7.7..38.9..839...7......973.8
.73..8..9...9.3.879.87....3..7.398.....87.93.389....7.79.38....83....79.....973.8
.73..8..9...9.3.87.987....3..7.3.89.9..87..3.38...9.7.7..38.9..839...7......973.8
.73..8..9..9..3.87..87.9..3..793.8..9..87..3.38....97.79.3....8.3..8.79.8...973..
.73..8..9...9.3.879.87....3..7.3.89..9.87..3.38...9.7.7..3..9.8.39.8.7..8...973..
2:
.37.8...9..9..3.87..87.9..3.7.93.8..9..87..3.38....97.79.3....8..3..879.8...973..
.37.8...9...9.3.879.87....3.79.3.8.....87.93.38...9.7.79.3....8..3..879.8...973..
.37.8...9...9.3.879.87....3.7..398.....87.93.389....7.79.3....8..3..879.8...973..
.37.8...9..9..3.87..87.9..3.7.93...89..87..3.38....97.79.3..8....3..879.8...973..
.37.8...9...9.3.879.87....3.79.3...8...87.93.38...9.7.79.3..8....3..879.8...973..
.37.8...9...9.3.879.87....3.7..39..8...87.93.389....7.79.3..8....3..879.8...973..
.37..8..9..9..3.87..87.9..3.7.93.8..9..87..3.38....97.79.38....8.3...79.....973.8
.37..8..9...9.3.879.87....3.79.3.8.....87.93.38...9.7.79.38....8.3...79.....973.8
.37..8..9...9.3.879.87....3.7..398.....87.93.389....7.79.38....8.3...79.....973.8
.37..8..9..9..3.87..87.9..3.7.93.8..9..87..3.38....97.79.3....8..3.8.79.8...973..
.37..8..9...9.3.879.87....3.79.3.8.....87.93.38...9.7.79.3....8..3.8.79.8...973..
.37..8..9...9.3.879.87....3.7..398.....87.93.389....7.79.3....8..3.8.79.8...973..
.37..8..9..9..3.87..87.9..3.7.93...89..87..3.38....97.79.3..8....3.8.79.8...973..
.37..8..9...9.3.879.87....3.79.3...8...87.93.38...9.7.79.3..8....3.8.79.8...973..
.37..8..9...9.3.879.87....3.7..39..8...87.93.389....7.79.3..8....3.8.79.8...973..
.37...8.9..9.83..7..87.9..3.7.93..8.9..87..3.38....97.79.3....8..3..879.8...973..
.37...8.9...983..79.87....3.79.3..8....87.93.38...9.7.79.3....8..3..879.8...973..
.37...8.9...983..79.87....3.7..39.8....87.93.389....7.79.3....8..3..879.8...973..
.37....89..9.83..7..87.9..3.7.93.8..9..87..3.38....97.79.3....8..3..879.8...973..
.37....89...983..79.87....3.79.3.8.....87.93.38...9.7.79.3....8..3..879.8...973..
3:
.3..8.7.9..79.3.8.9.87....3.79.3.8.....87.93.38...9.7.79.3....88.3..7.9.....983.7
.3..8.7.9..79.3.8.9.87....3.7..398.....87.93.389....7.79.3....88.3..7.9.....983.7
.3..8.7.9..79.3.8.9.87....3.79.3...8...87.93.38...9.7.79.3..8..8.3..7.9.....983.7
.3..8.7.9..79.3.8.9.87....3.7..39..8...87.93.389....7.79.3..8..8.3..7.9.....983.7
.3..8.7.9..79.3..89.87....3.79.3..8....87.93.38...9.7.79.3..8..8.3..7.9.....983.7
.3..8.7.9..79.3..89.87....3.7..39.8....87.93.389....7.79.3..8..8.3..7.9.....983.7
.3...87.9..79.3.8.9.87....3.79.3.8.....87.93.38...9.7.79.3....8..3.87.9.8...9.3.7
.3...87.9..79.3.8.9.87....3.7..398.....87.93.389....7.79.3....8..3.87.9.8...9.3.7
.3...87.9..79.3.8.9.87....3.79.3...8...87.93.38...9.7.79.38......3..789.8...9.3.7
.3...87.9..79.3.8.9.87....3.7..39..8...87.93.389....7.79.38......3..789.8...9.3.7
.3...87.9..79.3.8.9.87....3.79.3...8...87.93.38...9.7.79.3..8....3.87.9.8...9.3.7
.3...87.9..79.3.8.9.87....3.7..39..8...87.93.389....7.79.3..8....3.87.9.8...9.3.7
.3...87.9..79.3..89.87....3.79.3.8.....87.93.38...9.7.79.38....8.3..7.9.....9.387
.3...87.9..79.3..89.87....3.7..398.....87.93.389....7.79.38....8.3..7.9.....9.387
.3...87.9..79.3..89.87....3.79.3..8....87.93.38...9.7.79.38......3..789.8...9.3.7
.3...87.9..79.3..89.87....3.7..39.8....87.93.389....7.79.38......3..789.8...9.3.7
.3...87.9..79.3..89.87....3.79.3..8....87.93.38...9.7.79.3..8....3.87.9.8...9.3.7
.3...87.9..79.3..89.87....3.7..39.8....87.93.389....7.79.3..8....3.87.9.8...9.3.7
.3....789..7983...9.87....3.79.3.8.....87.93.38...9.7.79.3....88.3..7.9.....983.7
.3....789..7983...9.87....3.7..398.....87.93.389....7.79.3....88.3..7.9.....983.7
4:
.3..8.7.9..79.3.8.9.87....3..9.378...7.8..93.38...9.7.79.3....88.3.7..9.....983.7
.3..8.7.9..79.3.8.9.87....3..9.378...7.8..93.38...9.7.79.3....8..3.78.9.8...9.3.7
.3..8.7.9..79.3.8.9.87....3..9.37..8.7.8..93.38...9.7.79.3..8..8.3.7..9.....983.7
.3..8.7.9..79.3.8.9.87....3..9.37..8.7.8..93.38...9.7.79.3..8....3.78.9.8...9.3.7
.3..8.7.9..79.3..89.87....3..9.37.8..7.8..93.38...9.7.79.3..8..8.3.7..9.....983.7
.3..8.7.9..79.3..89.87....3..9.37.8..7.8..93.38...9.7.79.3..8....3.78.9.8...9.3.7
.3...87.9..79.3.8.9.87....3..9.37..8.7.8..93.38...9.7.79.38......3.7.89.8...9.3.7
.3...87.9..79.3..89.87....3..9.378...7.8..93.38...9.7.79.38....8.3.7..9.....9.387
.3...87.9..79.3..89.87....3..9.37.8..7.8..93.38...9.7.79.38......3.7.89.8...9.3.7
.3....789..7983...9.87....3..9.378...7.8..93.38...9.7.79.3....88.3.7..9.....983.7
.3....789..7983...9.87....3..9.378...7.8..93.38...9.7.79.3....8..3.78.9.8...9.3.7
.3....789..7983...9.87....3..9.37..8.7.8..93.38...9.7.79.3..8..8.3.7..9.....983.7
.3....789..7983...9.87....3..9.37..8.7.8..93.38...9.7.79.3..8....3.78.9.8...9.3.7
..3.8.7.9..79.3.8..987....3....3789.97.8...3.38...9.7.73....9.88.937........983.7
..3.8.7.9..79.3.8..987....3....3789.97.8...3.38...9.7.73....9.8..9378...8...9.3.7
..3..87.9..79.3.8..987....3....37.9897.8...3.38...9.7.73..8.9....937.8..8...9.3.7
..3..87.9..79.3..8.987....3....3789.97.8...3.38...9.7.73..8.9..8.937........9.387
..3..87.9..79.3..8.987....3....3789.97.8...3.38...9.7.73..8.9....937..8.8...9.3.7
..3...789..7983....987....3....3789.97.8...3.38...9.7.73....9.88.937........983.7
..3...789..7983....987....3....3789.97.8...3.38...9.7.73....9.8..9378...8...9.3.7
so whatever the template(s) for 7 with cell 55 eliminated by the combinations of 2 and 3 the one(s) which remain are not eliminated by the combinations of 4
and my conclusion is: at this stage of the resolution by combination of templates, with a combinatorial argument it is not possible to eliminate 7 from r7c1, so the question i ask myself now is: how does the logic you use work to know which template to eliminate?