SudokuP - Analysis

For fans of Killer Sudoku, Samurai Sudoku and other variants

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Tue Jan 09, 2018 6:24 pm

Not long at all - each class took 20 to 30 mins, which I ran in 3 parallel streams (god bless multiple core CPU's!) so all completed in a couple of hours. 8-)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Tue Jan 09, 2018 6:32 pm

Interesting that the number of unique grids (6.5 billion) is similar to standard Sudoku (5.5 billion).

One is tempted to actually write them to disk thus being able to rapidly generate random SudokuP's on demand.

I estimate 235GB for 9 x 32 bit value format which fits comfortably on my drive, so no point really in "efficient" and/or tricky encodings.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: SudokuP - Frequency Analysis

Postby Serg » Tue Jan 09, 2018 11:41 pm

Hi, Mathimagics!
Mathimagics wrote:Interesting that the number of unique grids (6.5 billion) is similar to standard Sudoku (5.5 billion).

What do you say about? What is "unique grids" and by what method did you calculate 6.5 billion?

Serg
Serg
2018 Supporter
 
Posts: 890
Joined: 01 June 2010
Location: Russia

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Wed Jan 10, 2018 9:19 am

Hi serg 8-)

My mistake, I shouldn't have used the word "unique"!

What meant was that we only need to store the 6,541,667,097 representative SudokuP grids corresponding to the 11 solved classes in order to represent the complete space of 201,105,135,151,764,480 different SudokuP grids.

From each different solution case for a given class with NE > 1 we can transform each grid into NE different grids by applying the same transformation that identified the class equivalence in the first place (obviously we need to remember these!).

As for uniqueness, that's really a different matter, which I will address shortly ...
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: SudokuP - Frequency Analysis

Postby Serg » Sat Jan 13, 2018 7:38 pm

Hi, Mathimagics!
Mathimagics wrote:Table of Class #, NE = number of equivalent classes, NG = number of grids, total = NE * NG:

Code: Select all
   #   NE      SudokuP        Total SudokuP
  ------------------------------------------
   1    1    969,349,902         969,349,902
   2   18    728,290,886      13,109,235,948
   3   12    655,641,170       7,867,694,040
   4   36    606,126,844      21,820,566,384
   5   36    595,526,742      21,438,962,712
   6   72    517,948,382      37,292,283,504
   7    9    598,102,466       5,382,922,194
   8    4    490,762,646       1,963,050,584
   9   36    547,152,562      19,697,492,232
  10   18    458,804,480       8,258,480,640
  11    2    373,961,017         747,922,034
  ------------------------------------------
      244  6,541,667,097     138,547,960,174


And 138,547,960,174 x 4 x 362,880 = 201,105,135,151,764,480

I've done all these calculations and confirm your (and Red Ed's ) results.

I confirm that there are 244 9-cell templates for "1" digit with following properties:
1. Cell r1c1 contains "1" digit.
2. Every cell of template "doesn't see" another template's cell - every row/column/P-set contains 1 cell of given template exactly.
3. If template's cell is located in B2 box, this cell must occupy r2 row.
4. If template's cell is located in B3 box, this cell must occupy r3 row.
5. If template's cell is located in B4 box, this cell must occupy c2 column.
6. If template's cell is located in B7 box, this cell must occupy c3 column.

Those 244 templates form 11 equivalence classes on the base of these isomorphic transformations:
1. Transposing - 2 ways.
2. Permutations of 3 bands - 6 ways.
3. Permutations of 3 stacks - 6 ways.
4. The same permutations of rows in every band - 6 ways.
5. The same permutations of columns in every stack - 6 ways.

Totally we have 2 x 6^4 = 2592 isomorphic transformations.

There are 976 templates for each other (not "1") digits. (Each template's cell is located in unique row/column/P-set and contains appropriate cell in B1 box.)
I counted all possible templates combinations giving P-sudoku and got the same numbers of P-sudoku grids in each class as Mathimagics exactly. Runnung times for every class processing varied from 52 minutes (class 11) to 2 hours (class 1) - it is comparable with Mathimagics timings, taking into account that my program used 1 CPU core.

It is surprising, that eleven found that Red Ed's post with "201,105,135,151,764,480" number. Well done, eleven!

But maybe it's more surprising, that nobody answered Red Ed. Such remarkable work was left completely unnoticed :( .

Serg
Serg
2018 Supporter
 
Posts: 890
Joined: 01 June 2010
Location: Russia

Re: SudokuP - Frequency Analysis

Postby eleven » Sat Jan 13, 2018 9:02 pm

Serg wrote:It is surprising, that eleven found that Red Ed's post with "201,105,135,151,764,480" number. Well done, eleven!

It's on wikipedia's site "Mathematics of Sudoku". So as soon as Coloin revealed that SudokuP is the same as "Disjoint Groups", it was easy to find.
eleven
 
Posts: 3153
Joined: 10 February 2008

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Sun Jan 14, 2018 2:14 pm

It seems that we can't easily identify the number of essentially diferent SudokuP grids in the same way that works for Sudoku (ie: using Burnside's lemma).

But we can still count the number of automorphic SudokuP grids, and do so very quickly (< 2 minutes). That turns out to be 78,257,944 (ignoring relabelling).

These occur in just 2 types of transformations (ie in just 2 of 54 conjugacy classes). Examples of each type are given below:

Type 1 (328,816 cases):
Code: Select all
          G           ==>             T(G)
 1 2 3 | 4 5 6 | 7 8 9      6 4 5 | 9 7 8 | 3 1 2
 7 8 9 | 1 2 3 | 4 5 6      3 1 2 | 6 4 5 | 9 7 8
 4 5 6 | 7 8 9 | 1 2 3      9 7 8 | 3 1 2 | 6 4 5
 ---------------------      ---------------------
 2 1 7 | 6 3 4 | 5 9 8      4 6 3 | 8 5 9 | 7 2 1
 5 9 8 | 2 1 7 | 6 3 4      7 2 1 | 4 6 3 | 8 5 9
 6 3 4 | 5 9 8 | 2 1 7      8 5 9 | 7 2 1 | 4 6 3
 ---------------------      ---------------------
 9 7 1 | 3 6 2 | 8 4 5      2 3 6 | 5 8 4 | 1 9 7
 8 4 5 | 9 7 1 | 3 6 2      1 9 7 | 2 3 6 | 5 8 4
 3 6 2 | 8 4 5 | 9 7 1      5 8 4 | 1 9 7 | 2 3 6

          G           ==>             T(G)
 1 2 3 | 4 5 6 | 7 8 9      8 7 9 | 1 3 2 | 6 4 5
 5 4 6 | 7 8 9 | 3 2 1      3 1 2 | 6 4 5 | 9 7 8
 7 9 8 | 3 2 1 | 4 5 6      6 5 4 | 9 7 8 | 1 3 2
 ---------------------      ---------------------
 6 3 4 | 8 7 5 | 9 1 2      2 9 1 | 4 6 3 | 5 8 7
 8 7 5 | 9 1 2 | 6 3 4      4 6 3 | 5 8 7 | 2 9 1
 9 1 2 | 6 3 4 | 8 7 5      5 8 7 | 2 9 1 | 4 6 3
 ---------------------      ---------------------
 3 6 1 | 5 4 7 | 2 9 8      9 2 8 | 3 1 6 | 7 5 4
 4 5 7 | 2 9 8 | 1 6 3      1 3 6 | 7 5 4 | 8 2 9
 2 8 9 | 1 6 3 | 5 4 7      7 4 5 | 8 2 9 | 3 1 6


Type 2 ( 77,929,128 cases):
Code: Select all
          G           ==>             T(G)
 1 2 3 | 4 5 6 | 7 8 9      1 3 2 | 7 9 8 | 4 6 5
 7 8 9 | 1 2 3 | 4 5 6      4 6 5 | 1 3 2 | 7 9 8
 4 5 6 | 7 8 9 | 1 2 3      7 9 8 | 4 6 5 | 1 3 2
 ---------------------      ---------------------
 2 1 4 | 5 9 8 | 6 3 7      3 1 7 | 9 5 6 | 8 2 4
 6 3 7 | 2 1 4 | 5 9 8      8 2 4 | 3 1 7 | 9 5 6
 5 9 8 | 6 3 7 | 2 1 4      9 5 6 | 8 2 4 | 3 1 7
 ---------------------      ---------------------
 3 7 1 | 8 4 2 | 9 6 5      2 4 1 | 6 7 3 | 5 8 9
 9 6 5 | 3 7 1 | 8 4 2      5 8 9 | 2 4 1 | 6 7 3
 8 4 2 | 9 6 5 | 3 7 1      6 7 3 | 5 8 9 | 2 4 1


          G           ==>             T(G)
 1 2 3 | 4 5 6 | 7 8 9      1 3 2 | 7 9 8 | 4 6 5
 6 5 4 | 8 7 9 | 3 2 1      8 9 7 | 6 4 5 | 2 3 1
 8 7 9 | 2 1 3 | 6 5 4      6 4 5 | 3 1 2 | 8 9 7
 ---------------------      ---------------------
 5 6 7 | 3 9 4 | 8 1 2      9 8 4 | 2 5 7 | 6 1 3
 4 9 2 | 1 8 7 | 5 6 3      7 5 3 | 1 6 4 | 9 8 2
 3 8 1 | 5 6 2 | 4 9 7      2 6 1 | 9 8 3 | 7 5 4
 ---------------------      ---------------------
 9 4 8 | 6 3 1 | 2 7 5      5 7 6 | 8 2 1 | 3 4 9
 2 1 6 | 7 4 5 | 9 3 8      3 1 8 | 4 7 9 | 5 2 6
 7 3 5 | 9 2 8 | 1 4 6      4 2 9 | 5 3 6 | 1 7 8
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: SudokuP - Frequency Analysis

Postby eleven » Sun Jan 14, 2018 6:09 pm

It's not clear to me, what you are doing here. What do you mean by automorphic SudokuP grids ? What are the transformations you apply ?
What i see is that your right sides are renumbered grids of the left side, and the first examples of both cases have an automorphism with Gliding Row symmetry (move the stacks right and the rows in all bands down to get the same grid).
For the other 2 examples i could not identify an automorphism symmetry (looking at the minirows).
eleven
 
Posts: 3153
Joined: 10 February 2008

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Sun Jan 14, 2018 10:24 pm

My apologies, eleven! The dog ate my description of what these examples represent and how they were produced.

The methodology is (or should be ) an emulation of the Russell & Jarvis method described in:

"There are 5,472,730,538 essentially different Sudoku grids"

and currently being discussed in companion thread "Unique Sudokus (Russell & Jarvis)".

So I used GAP to obtain a set of 54 conjugacy classes from the reduced permutation group defined just like theirs, but with only permutations of rows/cols in all 3 bands/stacks, not individual bands/stacks. This reflects the fact that only those transformations guarantee preservation of SudokuP property.

I then counted the number of automorphic (aka "invariant") grids for a representative transformation T of each class. Automorphic/invariant means that a grid G when transformed by T is just a relabelled G.

Only 2 of the 54 conjugacy classes produced automorphisms, you may recall that for normal Sudoku this figure was 26 of 175 classes.

============================================
Now, about those specific examples above! They are the first and last entries in the automorphism lists produced by my automorphism enumerator program for the two transformations T1 and T2 corresponding to the two conjugacy classes with automorphisms.

What exactly, however, are T1 and T2? The problem with the GAP results is that you get for each class a more-or-less random representative T, expressed in terms of cycles. These are not easily translated into combination of grid transformations to which they correspond.

Your observation of the same symmetry obvious in the first grid of each pair is, I think, just a case of those particular grids having multiple automorphisms, ie they are invariant under more than one T.

The two T's used for the examples are given below in their cyclic form, if anyone wants to verify that the examples above really are kosher. Actually it would be nice if somebody did just that! 8-)

They are listed as one cycle per line, each being a list of cell indices, along with the (R,C) pairs for each cell index.

T1:
Hidden Text: Show
Code: Select all
   (1,11,21) = (1,1)(2,2)(3,3)
   (2,12,19) = (1,2)(2,3)(3,1)
   (3,10,20) = (1,3)(2,1)(3,2)
   (4,14,24) = (1,4)(2,5)(3,6)
   (5,15,22) = (1,5)(2,6)(3,4)
   (6,13,23) = (1,6)(2,4)(3,5)
   (7,17,27) = (1,7)(2,8)(3,9)
   (8,18,25) = (1,8)(2,9)(3,7)
   (9,16,26) = (1,9)(2,7)(3,8)
   (28,38,48) = (4,1)(5,2)(6,3)
   (29,39,46) = (4,2)(5,3)(6,1)
   (30,37,47) = (4,3)(5,1)(6,2)
   (31,41,51) = (4,4)(5,5)(6,6)
   (32,42,49) = (4,5)(5,6)(6,4)
   (33,40,50) = (4,6)(5,4)(6,5)
   (34,44,54) = (4,7)(5,8)(6,9)
   (35,45,52) = (4,8)(5,9)(6,7)
   (36,43,53) = (4,9)(5,7)(6,8)
   (55,65,75) = (7,1)(8,2)(9,3)
   (56,66,73) = (7,2)(8,3)(9,1)
   (57,64,74) = (7,3)(8,1)(9,2)
   (58,68,78) = (7,4)(8,5)(9,6)
   (59,69,76) = (7,5)(8,6)(9,4)
   (60,67,77) = (7,6)(8,4)(9,5)
   (61,71,81) = (7,7)(8,8)(9,9)
   (62,72,79) = (7,8)(8,9)(9,7)
   (63,70,80) = (7,9)(8,7)(9,8)



T2:
Hidden Text: Show
Code: Select all
   (2,3) = (1,2)(1,3)
   (4,7) = (1,4)(1,7)
   (5,9) = (1,5)(1,9)
   (6,8) = (1,6)(1,8)
   (10,19) = (2,1)(3,1)
   (11,21) = (2,2)(3,3)
   (12,20) = (2,3)(3,2)
   (13,25) = (2,4)(3,7)
   (14,27) = (2,5)(3,9)
   (15,26) = (2,6)(3,8)
   (16,22) = (2,7)(3,4)
   (17,24) = (2,8)(3,6)
   (18,23) = (2,9)(3,5)
   (28,55) = (4,1)(7,1)
   (29,57) = (4,2)(7,3)
   (30,56) = (4,3)(7,2)
   (31,61) = (4,4)(7,7)
   (32,63) = (4,5)(7,9)
   (33,62) = (4,6)(7,8)
   (34,58) = (4,7)(7,4)
   (35,60) = (4,8)(7,6)
   (36,59) = (4,9)(7,5)
   (37,73) = (5,1)(9,1)
   (38,75) = (5,2)(9,3)
   (39,74) = (5,3)(9,2)
   (40,79) = (5,4)(9,7)
   (41,81) = (5,5)(9,9)
   (42,80) = (5,6)(9,8)
   (43,76) = (5,7)(9,4)
   (44,78) = (5,8)(9,6)
   (45,77) = (5,9)(9,5)
   (46,64) = (6,1)(8,1)
   (47,66) = (6,2)(8,3)
   (48,65) = (6,3)(8,2)
   (49,70) = (6,4)(8,7)
   (50,72) = (6,5)(8,9)
   (51,71) = (6,6)(8,8)
   (52,67) = (6,7)(8,4)
   (53,69) = (6,8)(8,6)
   (54,68) = (6,9)(8,5)
Last edited by Mathimagics on Mon Jan 15, 2018 2:42 pm, edited 1 time in total.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Sun Jan 14, 2018 10:52 pm

Mathimagics wrote:But we can still count the number of automorphic SudokuP grids, and do so very quickly (< 2 minutes). That turns out to be 78,257,944 (ignoring relabelling).


Aha, that doesn't take into account multiple automorphisms, does it! For completeness I still need to identify the number of grids with 1 or more non-trivial automorphism. I think this has been done for standard Sudoku?
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: SudokuP - Frequency Analysis

Postby eleven » Sun Jan 14, 2018 11:32 pm

Your first class has a mini-diagonal symmetry, move the columns right and the rows down in each stack/band (and renumber the 3-cycles). It is listed as number 10 in Red Ed's table.
But i can't find that in your example.
Your second one is not listed in that table, and i doubt, that it defines an automorphism for sudoku grids.
Instead i would expect Red Ed's classes 8,10,22,25,32,37,40,43,79,86,143,135,142,145 in your list, because they all don't use single row/column swaps (only those in all bands/stacks).
eleven
 
Posts: 3153
Joined: 10 February 2008

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Mon Jan 15, 2018 12:39 am

eleven wrote:Your first class has a mini-diagonal symmetry, move the columns right and the rows down in each stack/band (and renumber the 3-cycles). It is listed as number 10 in Red Ed's table.
But i can't find that in your example.


Ok, I really need to look into that, thanks!

eleven wrote:Your second one is not listed in that table, and i doubt, that it defines an automorphism for sudoku grids.

Isn't Red Ed's table just a list of one representative for each class? My class 1 rep happens to coincide with his class 10,rep but that's not always going to happen. GAP doesn't provide class representatives in any particular order.

eleven wrote:Instead i would expect Red Ed's classes 8,10,22,25,32,37,40,43,79,86,143,135,142,145 in your list, because they all don't use single row/column swaps (only those in all bands/stacks).

They should presumably correspond (but not necessarily with matching representatives) to classes in my full list of 54, but don't necessarily produce automorphisms for SudokuP.

I have given my set of 54 class representatives here in GAP format, perhaps you can find anomalies. I will double check my examples.

Thanks for the feedback! 8-)

Hidden Text: Show
Code: Select all
  (1,11,21)(2,12,19)(3,10,20)(4,14,24)(5,15,22)(6,13,23)(7,17,27)(8,18,25)(9,16,26)(28,38,48)(29,39,46)(30,37,47)(31,41,51)(32,42,49)(33,40,50)(34,44,54)(35,45,52)(36,43,53)(55,65,75)(56,66,73)(57,64,74)(58,68,78)(59,69,76)(60,67,77)(61,71,81)(62,72,79)(63,70,80),
  (1,19,10)(2,20,11)(3,21,12)(4,22,13)(5,23,14)(6,24,15)(7,25,16)(8,26,17)(9,27,18)(28,46,37)(29,47,38)(30,48,39)(31,49,40)(32,50,41)(33,51,42)(34,52,43)(35,53,44)(36,54,45)(55,73,64)(56,74,65)(57,75,66)(58,76,67)(59,77,68)(60,78,69)(61,79,70)(62,80,71)(63,81,72),
  (1,31,61)(2,32,62)(3,33,63)(4,34,55)(5,35,56)(6,36,57)(7,28,58)(8,29,59)(9,30,60)(10,40,70)(11,41,71)(12,42,72)(13,43,64)(14,44,65)(15,45,66)(16,37,67)(17,38,68)(18,39,69)(19,49,79)(20,50,80)(21,51,81)(22,52,73)(23,53,74)(24,54,75)(25,46,76)(26,47,77)(27,48,78),
  (1,41,81)(2,42,79)(3,40,80)(4,44,75)(5,45,73)(6,43,74)(7,38,78)(8,39,76)(9,37,77)(10,50,63)(11,51,61)(12,49,62)(13,53,57)(14,54,55)(15,52,56)(16,47,60)(17,48,58)(18,46,59)(19,32,72)(20,33,70)(21,31,71)(22,35,66)(23,36,64)(24,34,65)(25,29,69)(26,30,67)(27,28,68),
  (1,49,70)(2,50,71)(3,51,72)(4,52,64)(5,53,65)(6,54,66)(7,46,67)(8,47,68)(9,48,69)(10,31,79)(11,32,80)(12,33,81)(13,34,73)(14,35,74)(15,36,75)(16,28,76)(17,29,77)(18,30,78)(19,40,61)(20,41,62)(21,42,63)(22,43,55)(23,44,56)(24,45,57)(25,37,58)(26,38,59)(27,39,60),
  (1,55,28)(2,56,29)(3,57,30)(4,58,31)(5,59,32)(6,60,33)(7,61,34)(8,62,35)(9,63,36)(10,64,37)(11,65,38)(12,66,39)(13,67,40)(14,68,41)(15,69,42)(16,70,43)(17,71,44)(18,72,45)(19,73,46)(20,74,47)(21,75,48)(22,76,49)(23,77,50)(24,78,51)(25,79,52)(26,80,53)(27,81,54),
  (1,65,48)(2,66,46)(3,64,47)(4,68,51)(5,69,49)(6,67,50)(7,71,54)(8,72,52)(9,70,53)(10,74,30)(11,75,28)(12,73,29)(13,77,33)(14,78,31)(15,76,32)(16,80,36)(17,81,34)(18,79,35)(19,56,39)(20,57,37)(21,55,38)(22,59,42)(23,60,40)(24,58,41)(25,62,45)(26,63,43)(27,61,44),
  (1,73,37)(2,74,38)(3,75,39)(4,76,40)(5,77,41)(6,78,42)(7,79,43)(8,80,44)(9,81,45)(10,55,46)(11,56,47)(12,57,48)(13,58,49)(14,59,50)(15,60,51)(16,61,52)(17,62,53)(18,63,54)(19,64,28)(20,65,29)(21,66,30)(22,67,31)(23,68,32)(24,69,33)(25,70,34)(26,71,35)(27,72,36),
  (1,56,30)(2,57,28)(3,55,29)(4,59,33)(5,60,31)(6,58,32)(7,62,36)(8,63,34)(9,61,35)(10,65,39)(11,66,37)(12,64,38)(13,68,42)(14,69,40)(15,67,41)(16,71,45)(17,72,43)(18,70,44)(19,74,48)(20,75,46)(21,73,47)(22,77,51)(23,78,49)(24,76,50)(25,80,54)(26,81,52)(27,79,53),
  (2,10)(3,19)(4,28)(5,37)(6,46)(7,55)(8,64)(9,73)(12,20)(13,29)(14,38)(15,47)(16,56)(17,65)(18,74)(22,30)(23,39)(24,48)(25,57)(26,66)(27,75)(32,40)(33,49)(34,58)(35,67)(36,76)(42,50)(43,59)(44,68)(45,77)(52,60)(53,69)(54,78)(62,70)(63,79)(72,80),
  (1,11,21)(2,20,19,10,12,3)(4,38,24,28,14,48)(5,47,22,37,15,30)(6,29,23,46,13,39)(7,65,27,55,17,75)(8,74,25,64,18,57)(9,56,26,73,16,66)(31,41,51)(32,50,49,40,42,33)(34,68,54,58,44,78)(35,77,52,67,45,60)(36,59,53,76,43,69)(61,71,81)(62,80,79,70,72,63),
  (1,31,61)(2,40,62,10,32,70)(3,49,63,19,33,79)(4,58,55,28,34,7)(5,67,56,37,35,16)(6,76,57,46,36,25)(8,13,59,64,29,43)(9,22,60,73,30,52)(11,41,71)(12,50,72,20,42,80)(14,68,65,38,44,17)(15,77,66,47,45,26)(18,23,69,74,39,53)(21,51,81)(24,78,75,48,54,27),
  (1,41,81)(2,50,79,10,42,63)(3,32,80,19,40,72)(4,68,75,28,44,27)(5,77,73,37,45,9)(6,59,74,46,43,18)(7,14,78,55,38,54)(8,23,76,64,39,36)(11,51,61)(12,33,62,20,49,70)(13,69,57,29,53,25)(15,60,56,47,52,16)(17,24,58,65,48,34)(21,31,71)(22,67,66,30,35,26),
  (4,7)(5,8)(6,9)(13,16)(14,17)(15,18)(22,25)(23,26)(24,27)(28,55)(29,56)(30,57)(31,61)(32,62)(33,63)(34,58)(35,59)(36,60)(37,64)(38,65)(39,66)(40,70)(41,71)(42,72)(43,67)(44,68)(45,69)(46,73)(47,74)(48,75)(49,79)(50,80)(51,81)(52,76)(53,77)(54,78),
  (1,11,21)(2,12,19)(3,10,20)(4,17,24,7,14,27)(5,18,22,8,15,25)(6,16,23,9,13,26)(28,65,48,55,38,75)(29,66,46,56,39,73)(30,64,47,57,37,74)(31,71,51,61,41,81)(32,72,49,62,42,79)(33,70,50,63,40,80)(34,68,54,58,44,78)(35,69,52,59,45,76)(36,67,53,60,43,77),
  (1,19,10)(2,20,11)(3,21,12)(4,25,13,7,22,16)(5,26,14,8,23,17)(6,27,15,9,24,18)(28,73,37,55,46,64)(29,74,38,56,47,65)(30,75,39,57,48,66)(31,79,40,61,49,70)(32,80,41,62,50,71)(33,81,42,63,51,72)(34,76,43,58,52,67)(35,77,44,59,53,68)(36,78,45,60,54,69),
  (2,3)(5,6)(8,9)(10,19)(11,21)(12,20)(13,22)(14,24)(15,23)(16,25)(17,27)(18,26)(29,30)(32,33)(35,36)(37,46)(38,48)(39,47)(40,49)(41,51)(42,50)(43,52)(44,54)(45,53)(56,57)(59,60)(62,63)(64,73)(65,75)(66,74)(67,76)(68,78)(69,77)(70,79)(71,81)(72,80),
  (1,31,61)(2,33,62,3,32,63)(4,34,55)(5,36,56,6,35,57)(7,28,58)(8,30,59,9,29,60)(10,49,70,19,40,79)(11,51,71,21,41,81)(12,50,72,20,42,80)(13,52,64,22,43,73)(14,54,65,24,44,75)(15,53,66,23,45,74)(16,46,67,25,37,76)(17,48,68,27,38,78)(18,47,69,26,39,77),
  (1,55,28)(2,57,29,3,56,30)(4,58,31)(5,60,32,6,59,33)(7,61,34)(8,63,35,9,62,36)(10,73,37,19,64,46)(11,75,38,21,65,48)(12,74,39,20,66,47)(13,76,40,22,67,49)(14,78,41,24,68,51)(15,77,42,23,69,50)(16,79,43,25,70,52)(17,81,44,27,71,54)(18,80,45,26,72,53),
  (2,3)(4,7)(5,9)(6,8)(10,19)(11,21)(12,20)(13,25)(14,27)(15,26)(16,22)(17,24)(18,23)(28,55)(29,57)(30,56)(31,61)(32,63)(33,62)(34,58)(35,60)(36,59)(37,73)(38,75)(39,74)(40,79)(41,81)(42,80)(43,76)(44,78)(45,77)(46,64)(47,66)(48,65)(49,70)(50,72)(51,71)(52,67)(53,69)(54,68),
  (10,19)(11,20)(12,21)(13,22)(14,23)(15,24)(16,25)(17,26)(18,27)(28,55)(29,56)(30,57)(31,58)(32,59)(33,60)(34,61)(35,62)(36,63)(37,73)(38,74)(39,75)(40,76)(41,77)(42,78)(43,79)(44,80)(45,81)(46,64)(47,65)(48,66)(49,67)(50,68)(51,69)(52,70)(53,71)(54,72),
  (1,11,3,10,2,12)(4,14,6,13,5,15)(7,17,9,16,8,18)(19,20,21)(22,23,24)(25,26,27)(28,65,30,64,29,66)(31,68,33,67,32,69)(34,71,36,70,35,72)(37,56,39,55,38,57)(40,59,42,58,41,60)(43,62,45,61,44,63)(46,74,48,73,47,75)(49,77,51,76,50,78)(52,80,54,79,53,81),
  (1,31,7,28,4,34)(2,32,8,29,5,35)(3,33,9,30,6,36)(10,49,16,46,13,52)(11,50,17,47,14,53)(12,51,18,48,15,54)(19,40,25,37,22,43)(20,41,26,38,23,44)(21,42,27,39,24,45)(55,58,61)(56,59,62)(57,60,63)(64,76,70,73,67,79)(65,77,71,74,68,80)(66,78,72,75,69,81),
  (1,41,9,37,5,45)(2,42,7,38,6,43)(3,40,8,39,4,44)(10,32,18,28,14,36)(11,33,16,29,15,34)(12,31,17,30,13,35)(19,50,27,46,23,54)(20,51,25,47,24,52)(21,49,26,48,22,53)(55,68,63,64,59,72)(56,69,61,65,60,70)(57,67,62,66,58,71)(73,77,81)(74,78,79)(75,76,80),
  (2,10,3,19)(4,28,7,55)(5,37,9,73)(6,46,8,64)(11,12,21,20)(13,30,25,56)(14,39,27,74)(15,48,26,65)(16,57,22,29)(17,66,24,47)(18,75,23,38)(31,34,61,58)(32,43,63,76)(33,52,62,67)(35,70,60,49)(36,79,59,40)(41,45,81,77)(42,54,80,68)(44,72,78,50)(51,53,71,69),
  (4,7)(5,8)(6,9)(10,19)(11,20)(12,21)(13,25)(14,26)(15,27)(16,22)(17,23)(18,24)(31,34)(32,35)(33,36)(37,46)(38,47)(39,48)(40,52)(41,53)(42,54)(43,49)(44,50)(45,51)(58,61)(59,62)(60,63)(64,73)(65,74)(66,75)(67,79)(68,80)(69,81)(70,76)(71,77)(72,78),
  (1,11,3,10,2,12)(4,17,6,16,5,18)(7,14,9,13,8,15)(19,20,21)(22,26,24,25,23,27)(28,38,30,37,29,39)(31,44,33,43,32,45)(34,41,36,40,35,42)(46,47,48)(49,53,51,52,50,54)(55,65,57,64,56,66)(58,71,60,70,59,72)(61,68,63,67,62,69)(73,74,75)(76,80,78,79,77,81),
  (1,31,55,4,28,58)(2,32,56,5,29,59)(3,33,57,6,30,60)(7,34,61)(8,35,62)(9,36,63)(10,49,64,22,37,76)(11,50,65,23,38,77)(12,51,66,24,39,78)(13,46,67,19,40,73)(14,47,68,20,41,74)(15,48,69,21,42,75)(16,52,70,25,43,79)(17,53,71,26,44,80)(18,54,72,27,45,81),
  (1,41,57,13,29,69)(2,42,55,14,30,67)(3,40,56,15,28,68)(4,38,60,10,32,66)(5,39,58,11,33,64)(6,37,59,12,31,65)(7,44,63,16,35,72)(8,45,61,17,36,70)(9,43,62,18,34,71)(19,50,75,22,47,78)(20,51,73,23,48,76)(21,49,74,24,46,77)(25,53,81)(26,54,79)(27,52,80),
  (28,55)(29,56)(30,57)(31,58)(32,59)(33,60)(34,61)(35,62)(36,63)(37,64)(38,65)(39,66)(40,67)(41,68)(42,69)(43,70)(44,71)(45,72)(46,73)(47,74)(48,75)(49,76)(50,77)(51,78)(52,79)(53,80)(54,81),
  (1,11,21)(2,12,19)(3,10,20)(4,14,24)(5,15,22)(6,13,23)(7,17,27)(8,18,25)(9,16,26)(28,65,48,55,38,75)(29,66,46,56,39,73)(30,64,47,57,37,74)(31,68,51,58,41,78)(32,69,49,59,42,76)(33,67,50,60,40,77)(34,71,54,61,44,81)(35,72,52,62,45,79)(36,70,53,63,43,80),
  (1,19,10)(2,20,11)(3,21,12)(4,22,13)(5,23,14)(6,24,15)(7,25,16)(8,26,17)(9,27,18)(28,73,37,55,46,64)(29,74,38,56,47,65)(30,75,39,57,48,66)(31,76,40,58,49,67)(32,77,41,59,50,68)(33,78,42,60,51,69)(34,79,43,61,52,70)(35,80,44,62,53,71)(36,81,45,63,54,72),
  (1,2,3)(4,5,6)(7,8,9)(10,11,12)(13,14,15)(16,17,18)(19,20,21)(22,23,24)(25,26,27)(28,56,30,55,29,57)(31,59,33,58,32,60)(34,62,36,61,35,63)(37,65,39,64,38,66)(40,68,42,67,41,69)(43,71,45,70,44,72)(46,74,48,73,47,75)(49,77,51,76,50,78)(52,80,54,79,53,81),
  (1,31,7,28,4,34)(2,32,8,29,5,35)(3,33,9,30,6,36)(10,40,16,37,13,43)(11,41,17,38,14,44)(12,42,18,39,15,45)(19,49,25,46,22,52)(20,50,26,47,23,53)(21,51,27,48,24,54)(55,58,61)(56,59,62)(57,60,63)(64,67,70)(65,68,71)(66,69,72)(73,76,79)(74,77,80)(75,78,81),
  (1,41,27,28,14,54)(2,42,25,29,15,52)(3,40,26,30,13,53)(4,44,21,31,17,48)(5,45,19,32,18,46)(6,43,20,33,16,47)(7,38,24,34,11,51)(8,39,22,35,12,49)(9,37,23,36,10,50)(55,68,81)(56,69,79)(57,67,80)(58,71,75)(59,72,73)(60,70,74)(61,65,78)(62,66,76)(63,64,77),
  (1,49,16,28,22,43)(2,50,17,29,23,44)(3,51,18,30,24,45)(4,52,10,31,25,37)(5,53,11,32,26,38)(6,54,12,33,27,39)(7,46,13,34,19,40)(8,47,14,35,20,41)(9,48,15,36,21,42)(55,76,70)(56,77,71)(57,78,72)(58,79,64)(59,80,65)(60,81,66)(61,73,67)(62,74,68)(63,75,69),
  (1,32,9,28,5,36)(2,33,7,29,6,34)(3,31,8,30,4,35)(10,41,18,37,14,45)(11,42,16,38,15,43)(12,40,17,39,13,44)(19,50,27,46,23,54)(20,51,25,47,24,52)(21,49,26,48,22,53)(55,59,63)(56,60,61)(57,58,62)(64,68,72)(65,69,70)(66,67,71)(73,77,81)(74,78,79)(75,76,80),
  (2,10)(3,19)(4,28,7,55)(5,37,8,64)(6,46,9,73)(12,20)(13,29,16,56)(14,38,17,65)(15,47,18,74)(22,30,25,57)(23,39,26,66)(24,48,27,75)(31,34,61,58)(32,43,62,67)(33,52,63,76)(35,70,59,40)(36,79,60,49)(41,44,71,68)(42,53,72,77)(45,80,69,50)(51,54,81,78),
  (1,11,21)(2,20,19,10,12,3)(4,38,27,55,14,48,7,65,24,28,17,75)(5,47,25,64,15,30,8,74,22,37,18,57)(6,29,26,73,13,39,9,56,23,46,16,66)(31,44,81,58,41,54,61,68,51,34,71,78)(32,53,79,67,42,36,62,77,49,43,72,60)(33,35,80,76,40,45,63,59,50,52,70,69),
  (2,3)(5,6)(8,9)(10,19)(11,21)(12,20)(13,22)(14,24)(15,23)(16,25)(17,27)(18,26)(28,55)(29,57)(30,56)(31,58)(32,60)(33,59)(34,61)(35,63)(36,62)(37,73)(38,75)(39,74)(40,76)(41,78)(42,77)(43,79)(44,81)(45,80)(46,64)(47,66)(48,65)(49,67)(50,69)(51,68)(52,70)(53,72)(54,71),
  (1,31,7,28,4,34)(2,33,8,30,5,36)(3,32,9,29,6,35)(10,49,16,46,13,52)(11,51,17,48,14,54)(12,50,18,47,15,53)(19,40,25,37,22,43)(20,42,26,39,23,45)(21,41,27,38,24,44)(55,58,61)(56,60,62,57,59,63)(64,76,70,73,67,79)(65,78,71,75,68,81)(66,77,72,74,69,80),
  (10,19)(11,20)(12,21)(13,22)(14,23)(15,24)(16,25)(17,26)(18,27)(37,46)(38,47)(39,48)(40,49)(41,50)(42,51)(43,52)(44,53)(45,54)(64,73)(65,74)(66,75)(67,76)(68,77)(69,78)(70,79)(71,80)(72,81),
  (1,11,3,10,2,12)(4,14,6,13,5,15)(7,17,9,16,8,18)(19,20,21)(22,23,24)(25,26,27)(28,38,30,37,29,39)(31,41,33,40,32,42)(34,44,36,43,35,45)(46,47,48)(49,50,51)(52,53,54)(55,65,57,64,56,66)(58,68,60,67,59,69)(61,71,63,70,62,72)(73,74,75)(76,77,78)(79,80,81),
  (1,31,61)(2,32,62)(3,33,63)(4,34,55)(5,35,56)(6,36,57)(7,28,58)(8,29,59)(9,30,60)(10,49,70,19,40,79)(11,50,71,20,41,80)(12,51,72,21,42,81)(13,52,64,22,43,73)(14,53,65,23,44,74)(15,54,66,24,45,75)(16,46,67,25,37,76)(17,47,68,26,38,77)(18,48,69,27,39,78),
  (1,41,63,10,32,72)(2,42,61,11,33,70)(3,40,62,12,31,71)(4,44,57,13,35,66)(5,45,55,14,36,64)(6,43,56,15,34,65)(7,38,60,16,29,69)(8,39,58,17,30,67)(9,37,59,18,28,68)(19,50,81)(20,51,79)(21,49,80)(22,53,75)(23,54,73)(24,52,74)(25,47,78)(26,48,76)(27,46,77),
  (1,55,28)(2,56,29)(3,57,30)(4,58,31)(5,59,32)(6,60,33)(7,61,34)(8,62,35)(9,63,36)(10,73,37,19,64,46)(11,74,38,20,65,47)(12,75,39,21,66,48)(13,76,40,22,67,49)(14,77,41,23,68,50)(15,78,42,24,69,51)(16,79,43,25,70,52)(17,80,44,26,71,53)(18,81,45,27,72,54),
  (1,65,30,10,56,39)(2,66,28,11,57,37)(3,64,29,12,55,38)(4,68,33,13,59,42)(5,69,31,14,60,40)(6,67,32,15,58,41)(7,71,36,16,62,45)(8,72,34,17,63,43)(9,70,35,18,61,44)(19,74,48)(20,75,46)(21,73,47)(22,77,51)(23,78,49)(24,76,50)(25,80,54)(26,81,52)(27,79,53),
  (1,4,7)(2,5,8)(3,6,9)(10,22,16,19,13,25)(11,23,17,20,14,26)(12,24,18,21,15,27)(28,31,34)(29,32,35)(30,33,36)(37,49,43,46,40,52)(38,50,44,47,41,53)(39,51,45,48,42,54)(55,58,61)(56,59,62)(57,60,63)(64,76,70,73,67,79)(65,77,71,74,68,80)(66,78,72,75,69,81),
  (1,14,9,10,5,18)(2,15,7,11,6,16)(3,13,8,12,4,17)(19,23,27)(20,24,25)(21,22,26)(28,41,36,37,32,45)(29,42,34,38,33,43)(30,40,35,39,31,44)(46,50,54)(47,51,52)(48,49,53)(55,68,63,64,59,72)(56,69,61,65,60,70)(57,67,62,66,58,71)(73,77,81)(74,78,79)(75,76,80),
  (2,10,3,19)(4,28)(5,37,6,46)(7,55)(8,64,9,73)(11,12,21,20)(13,30,22,29)(14,39,24,47)(15,48,23,38)(16,57,25,56)(17,66,27,74)(18,75,26,65)(32,40,33,49)(34,58)(35,67,36,76)(41,42,51,50)(43,60,52,59)(44,69,54,77)(45,78,53,68)(62,70,63,79)(71,72,81,80),
  (1,31,61)(2,40,63,19,32,70,3,49,62,10,33,79)(4,58,55,28,34,7)(5,67,57,46,35,16,6,76,56,37,36,25)(8,13,60,73,29,43,9,22,59,64,30,52)(11,42,81,20,41,72,21,50,71,12,51,80)(14,69,75,47,44,18,24,77,65,39,54,26)(15,78,74,38,45,27,23,68,66,48,53,17),
  (4,7)(5,8)(6,9)(10,19)(11,20)(12,21)(13,25)(14,26)(15,27)(16,22)(17,23)(18,24)(28,55)(29,56)(30,57)(31,61)(32,62)(33,63)(34,58)(35,59)(36,60)(37,73)(38,74)(39,75)(40,79)(41,80)(42,81)(43,76)(44,77)(45,78)(46,64)(47,65)(48,66)(49,70)(50,71)(51,72)(52,67)(53,68)(54,69),
  (1,11,3,10,2,12)(4,17,6,16,5,18)(7,14,9,13,8,15)(19,20,21)(22,26,24,25,23,27)(28,65,30,64,29,66)(31,71,33,70,32,72)(34,68,36,67,35,69)(37,56,39,55,38,57)(40,62,42,61,41,63)(43,59,45,58,44,60)(46,74,48,73,47,75)(49,80,51,79,50,81)(52,77,54,76,53,78)
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Mon Jan 15, 2018 1:53 am

Hi eleven!

I have double-checked the grids above, and believe that you have confused symmetry with automorphism.

It is simply not true to say that the T transformation corresponding to Ed's class 10 is equivalent to "move the columns right and the rows down in each stack/band (and renumber the 3-cycles)".

What T actually does is, among other things, to cycle each mini-diagonal, and you can see in both examples it has done exactly that in every block. The remaining 6 cells in each block are cycled the same way in each block.

If you look at the cycle list you can see that's exactly what it does.

What you observe in case 1 as "G is itself shifted right one band and one row down" is a symmetry property of that particular G, and indeed one that is preserved by T, but isn't the same as T.

eleven wrote:Your second one is not listed in that table, and i doubt, that it defines an automorphism for sudoku grids.

The second pair of grids is also valid, and on inspection of the cycle list, I can now see that the transformation here is easily recognised as permuting the columns of G to 132798465.
[EDIT and permuting the rows to 132798465]

When applied to both examples, this gives T(G), which is just a relabelling, for these particular G's. So they too are automorphic.

The T's don't define automorphisms, they just identify valid grid transformations. A given grid is either automorphic, ie. invariant under one or more of these transformations, or not.
Last edited by Mathimagics on Mon Jan 15, 2018 3:17 pm, edited 1 time in total.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

Re: SudokuP - Frequency Analysis

Postby coloin » Mon Jan 15, 2018 11:04 am

Mathimagics wrote:But we can still count the number of automorphic SudokuP grids, and do so very quickly (< 2 minutes). That turns out to be 78,257,944 (ignoring relabelling).
Aha, that doesn't take into account multiple automorphisms, does it! For completeness I still need to identify the number of grids with 1 or more non-trivial automorphism. I think this has been done for standard Sudoku?


201,105,135,151,764,480 = no of different sudoku-p grids

/ 9!
/6^8 * 2

so there are only at most 164975 grids which have a sudoku-p grid

some will have only 1 sudoku-p grid and many will have >1

is this correct ?
coloin
 
Posts: 2494
Joined: 05 May 2005
Location: Devon

Re: SudokuP - Frequency Analysis

Postby Mathimagics » Mon Jan 15, 2018 1:17 pm

Hi coloin,

I don't think it makes sense to divide by 6 ^ 8 * 2 = 3,359,232, the applicable figure is 6 ^ 4 * 2 = 2,592 .

A quick recap of the state of play:

For normal Sudoku, we have:
Code: Select all
                 5,472,730,538  number of unique Sudoku solution grids
                     3,359,232  possible geometric permutations of solution grid
                       362,880  number of ways to renumber a grid

 6,671,248,172,291,458,990,080  = 5,472,730,538 * 3,359,232 * 362,880
 6,670,903,752,021,072,936,960  exact number of Sudoku solution grids
 -----------------------------
       344,420,270,386,053,120  = 949,129,933,824 x 362,880 (# of automorphisms)


Russell & Jarvis counted the # of automorphisms, from which they then obtained the number of unique (essentially different) grids.

For SudokuP we have:
Code: Select all
                             ?  number of unique SudokuP solution grids
                         2,592  possible geometric permutations of solution grid
                       362,880  number of ways to renumber a grid

                            ??  =  ? * 2,592 * 362,880
       201,105,135,151,764,480  exact number of SudokuP solution grids
       -----------------------
            28,398,242,718,720  = 78,257,944 * 362,880 (# of automorphisms)

Our problem is that no integer ? balances this account! As Serg has explained, this is due to the problem of non-universality of isomorphisms in SudokuP, in other words the non-applicability of Burnside's Lemma.
User avatar
Mathimagics
2017 Supporter
 
Posts: 1926
Joined: 27 May 2015
Location: Canberra

PreviousNext

Return to Sudoku variants