But my uninvolved opinion has been that I don't like using minLex for puzzles. I can see the attraction if all you want is a simple way of getting a puzzle.
The reason I dislike minLex puzzles is because they result in random reorderings of the minLex solution grid.
How anyone could look at minLex puzzles and try to do any serious analysis is not clear to me.
But that is my bias, I understand it, and I own it.
That being said, I have been analyzing the structure of Sudoku grids since 2018 and have never used minLex nor looked at puzzles.
So recently I decided to look at the 49158 17 clue puzzles, which are in puzzle minLex order.
To do this, I read them in and used JCZSolver() solver to get the solution grid in whatever random reordering it currently occupied.
JCZSolver() is likely the first software I've used that I had not written myself. I had written solvers before but didn't feel like writing another and I heard it was quick.
Then I wrote a minLex routine for grids which lead me to writing a minLex routine for bands and stacks to pick a winner for band 1.
With a little intelligence bands can be minLexed in 108 steps for M0 and 72 steps for non-M0, instead of the 7776 steps for a brute force band minLex.
The results for each band was a minLex 416 member. So the lowest 416 number would end up as band1.
I had not really understood what automorphisms were until after I had done my own Nmin enumeration (5472730538) and could confirm the numbers of automorphic grids.
So to me the automorphism count(AMC) is just the number of steps I do divided by the number of results I get back. So for bands 7776/3888 = AMC 2, or in my case 72/36 or 108/54.
The trick I have been using is to take the result and store it in a list and a hash. Then the AMC = list.count/hash.count. So I have been applying this trick on all the new code I write.
When I was doing the band minLex I was getting AMC numbers. I had always known that many of the 416 had reduced counts but did not understand why.
When I saw this I ask why this was happening and where the extra results were going and I had an epiphany. The hash was a coset, which implies a subgroup.
So each of the 416 has an associated subgroup as does all the automorphic grids.
So when I get the minLex for the 6 bands and stacks I can pick a winner unless there are duplicate minimum 416 values, in which case I let them duke it out.
Here's a Truth. The smaller the object the higher the odds that it will be automorphic. When we extend the object we reduce the odds of automorphism.
If I use a hash and store the reorders as the values I can get both reorders that causes a AMC of 2 and the distance between them is the same as the subgroup distance.
But this takes time and memory. If all I do is keep track of the minimum value from the 7776 gyrations then I can get both reorders by using the subgroup.
When I get a winner for band1 then all the columns have been set and symbols relabeled, so all I have to do is reorder rows in band 2 and 3 to get column 1 in minimum order.
But if band 1 is automorphic I have to try all the elements of the subgroup and then work on band 2 and 3 again, keeping track of the string for the grid and keep the minimum.
Then knowing the reorder map to get to grid minLex, I can use it to navigate the puzzle into its grid minLex version.
Then I can group the puzzles that have the same solution grid and sort them.
This allows me to look at the Strangely Familiar 29 or 20, etc.
Now to my point.
There are six of the 17 clue puzzles that lead to AMC 2 solution grids 12498, 18679, 23847, 34844, 35709, and 35716.
When we reorder the puzzles we end up with two solutions for each.
- Code: Select all
12498 123456789456789231789132546268573914374961825915824673537618492691247358842395167 count 2
12498 .2.4.......6....3....1..5.........14....6....9.5.2..........4.2.........8..39....
12498 1......8......92..7...3....26.5.....................73.3.6.8....9.............1.7
18679 123456789456789123798231564261894357534627891987513246315968472642175938879342615 count 2
18679 ...4...8...6...1...........2..8.............1..7.1.2.6....6..7..4...5.3.8........
18679 ..34.........8.1................4...5.....8....75.3.4..1..6...2....7..3.8........
23847 123456789456789123789123465238574691671892354945361872392647518517938246864215937 count 2
23847 ..3.5.7............8.1..........4..1...8.2..49.5............5...1...8.........93.
23847 .2...67.............91...........6....1.9..........8.2....4..1....93..4.86.......
34844 123456789456789132789213456245698371638147925971532864364975218517824693892361547 count 2
34844 ...4....9..6.8....7..2...5........7..3.1...........86.....75....1......3....6....
34844 ...4....9..6.8...27......5........7..3.1...........86.....75....1......3....6....
35709 123456789456789132789213456248695371635147928971832564364978215592361847817524693 count 4
35709 ...4...89.56......7..2............7..3.1...........56.....78.......6.....1......3
35716 ...4...89.56.....27...............7..3.1...........56.....78.......6.....1......3
35716 ...45...9..6......78.2............7..3.1...........56.....78.......6.....1......3
35709 ...45...9..6.....278..............7..3.1...........56.....78.......6.....1......3
So each AMC 2 grid has two puzzles that reduce to the same minLex puzzle and the same solution grid.
If I just look at the input puzzles and count the number of resultant grids I get this distribution.
- Code: Select all
Total Grids = 46301
[1: 44,134, 2: 1,778, 3: 252, 4: 83, 5: 17, 6: 21, 7: 6, 8: 4, 9: 1, 11: 1, 12: 1, 14: 1, 20: 1, 29: 1] = 49,158
But if I look at the solution grids and count the 17 clue puzzles I get this distribution.
- Code: Select all
Total Grids = 46301
[1: 44,130, 2: 1,781, 3: 252, 4: 84, 5: 17, 6: 21, 7: 6, 8: 4, 9: 1, 11: 1, 12: 1, 14: 1, 20: 1, 29: 1] = 49,164
That their grids are automorphic should be irrelevant.
I think the second distribution is more accurate, with maybe an asterisk saying 4 grids are AMC2 with 1 solution and 1 is AMC2 with 2 solutions.
Not sure if anyone has posted this distribution before.
Wade