Continuing this as a Living Post - last update July 16, 2025Below are two lists of
416-group ED band occupancy I got from the
1to9only github. The first list is a compact list in five columns. I edited that list to a single column list which I may
editin comparison to older lists I have seen: particularly one by
gsf (Glenn S. Fowler). Just for
clarification / amplification these
416 gangster groups are for the first horizontal band (rows 1,2,3) of the
5,472,730,538 essentially different grids in minlex order. The quantities in this list should add to:
5,472,730,538. This is JUST the start so that I can talk about them either in this post or others posts that may reference it. Please comment if you find my understanding to be incorrect!.
Referencing the Wikipedia article at
https://en.wikipedia.org/wiki/Mathematics_of_Sudoku The
ED exists to map the number:
6,670,903,752,021,072,936,960 of possible filled grids to a set of
equivalence classes which is
5,472,730,538 long and on this forum is called the
ED. The list is usually shown in a
minlex order (think dictionary order). Further, we speak of
chutes composed of three horizontal
bands and three vertical
towers in reference to the 9x9 Sudoku grid. So the
band referenced is the first band consisting or rows 1,2,3. So the
ED can be further divided into these
416 groups. It seems there are multiple ways of generating those groups (and the
ED itself). As far as I can tell the preferred one is what I will call the
row minlex order. (In fact on this forum
Gordon F. Royle said that an
equivalence class may be represented by any item in that class. But for consistency a
rule is most often used. Ordering by maxlex, blocks, or even a graph renumbering order using a
nauty library could be done as well as any other consistent method)
At the very bottom of this post is Prof
Gordon F. Royle's post (slightly edited by me) from much earlier on this forum of a general defintion for a
Sudoku canon. He is a graph theory scientist and mathematician from Australia. His post is
VERY edifying as a general response to what has become the
canon on this forum. Jokingly the term
canonize (even with it's Vatican overtones!) has been applied to this process. And others talked about any other rule being a
normalization.
This forum has always been difficult for me to navigate. However, here are three key links to some of the development of the idea of a
canon for Sudoku and the
ED minlex
ordering. I will edit this as I go....
- http://forum.enjoysudoku.com/canonical-puzzle-form-t3054.html
- http://forum.enjoysudoku.com/canonical-form-t5215.html
- http://forum.enjoysudoku.com/high-density-files-for-solution-grids-and-18-clues-puzzles-t42669.html#p345076
I find this link on the
numerology of Sudoku very useful https://sudopedia.sudocue.net/index.php/Mathematics_of_SudokuLook at the following for a bit on how symmetry gives us that
ED#- Code: Select all
3,359,232
3,359,232 is the number geometric permutations excluding relabeling. It is a rather odd number at first glance.
2 x 6^8 = 3,359,232
but it isn't so formidable to calculate. Let's consider towers. There are three towers which have six possible arrangements:
123 132 213 231 312 321
So if we summarize over all the allow swapping we have:
6 = ways three towers can be arranged.
6 = ways that three floors can be arranged
6 = ways that three rows in floor 1 can be arranged
6 = ways that three rows in floor 2 can be arranged
6 = ways that three rows in floor 3 can be arranged
6 = ways that three columns in tower 1 can be arranged
6 = ways that three columns in tower 2 can be arranged
6 = ways that three columns in tower 3 can be arranged
So this gives us the 6^8 part of the magic number. The 2 reflects the fact that if you take a mirror image along the diagonal, then permutations of floors, towers, rows or columns can't create the corresponding permutation.
362,880
Let's consider a "random" grid for which the first line is
+-----------------------+
| 6 3 4 | 8 1 9 | 2 5 7 |
Let's renumber the grid with the following scheme:
6 = 1
3 = 2
4 = 3
8 = 4
1 = 5
9 = 6
2 = 7
5 = 8
7 = 9
to get:
+-----------------------+
| 1 2 3 | 4 5 6 | 7 8 9 |
Obviously by a simple renumbering the first row of any grid can be made to correspond with the first row shown above. Thus there are 9! arrangements for the first row which can be renumbered to the target row 123456789.
9! = 362,880 = number of ways to renumber a grid
729
9^3
Also it is possible to think of all of the possible Sudoku grids as being on the surface of a 729 dimensional space. This higher-dimensional analogue of 2-D polygons and 3-D polyhedra is called a polytope. The polytope is a nice model since it allows movement from one solution grid to the next.
by 1to9only in Five Columns- Code: Select all
001 1007170 101 13768854 201 3165254 301 119226 401 1
002 25502082 102 26929453 202 3064062 302 20203 402 0
003 16538087 103 26382806 203 2966309 303 62246 403 0
004 8417906 104 4359314 204 2932890 304 63613 404 0
005 48737791 105 25997296 205 2841380 305 69669 405 4
006 96229042 106 25467197 206 2701985 306 58811 406 0
007 15765443 107 24888528 207 2628788 307 21225 407 19
008 5306280 108 24423300 208 2532198 308 56942 408 0
009 8136013 109 23988326 209 2443960 309 55120 409 0
010 47174193 110 23541927 210 1243959 310 49427 410 0
011 46788396 111 23070530 211 2317171 311 91869 411 3
012 46177270 112 22609142 212 2357854 312 89983 412 0
013 15340394 113 22100458 213 1137589 313 80765 413 0
014 45397270 114 10879514 214 1083228 314 43270 414 0
015 45600758 115 21378062 215 2183311 315 74594 415 0
016 1631576 116 20985174 216 2244753 316 69012 416 1
017 15093541 117 20674972 217 2143677 317 73627
018 45101600 118 20107116 218 2100798 318 62449
019 44832423 119 19854606 219 1007465 319 59123
020 88782526 120 9732970 220 1970315 320 57580
021 44036568 121 19084488 221 1841722 321 47910
022 85627559 122 9491325 222 1873099 322 44876
023 42711122 123 18532281 223 1772301 323 46852
024 85102373 124 9142485 224 347777 324 46002
025 41847039 125 18075269 225 1968442 325 40108
026 41335391 126 17675306 226 1677704 326 37300
027 4455504 127 17545752 227 1521001 327 36969
028 41102914 128 16990098 228 1498734 328 31504
029 4591391 129 8369473 229 1515366 329 28919
030 4664261 130 16406705 230 1457098 330 27982
031 13606209 131 16189996 231 1331185 331 29202
032 40697707 132 15791769 232 1279569 332 25098
033 80468663 133 2613345 233 1262013 333 20652
034 79175610 134 15362664 234 1218744 334 10105
035 77979783 135 15272476 235 386642 335 19471
036 38536298 136 14918036 236 1182963 336 18996
037 76146967 137 7254450 237 570172 337 17212
038 74505665 138 14383075 238 1111083 338 14780
039 74154564 139 7011714 239 1076551 339 13660
040 72171447 140 13738161 240 167032 340 12324
041 36053455 141 13445152 241 533940 341 10597
042 70552290 142 6593805 242 1048083 342 9562
043 69437575 143 12918117 243 974591 343 9012
044 67978951 144 6403269 244 967788 344 8215
045 33904021 145 12568136 245 455310 345 7261
046 66337407 146 12354720 246 915249 346 3569
047 65880161 147 12036469 247 500537 347 7136
048 64996381 148 5931073 248 783336 348 455
049 63898062 149 5949060 249 822496 349 2935
050 62192220 150 11577852 250 377256 350 2990
051 61691475 151 11435633 251 408556 351 4836
052 60192385 152 11155974 252 437792 352 2156
053 29966384 153 10671486 253 387029 353 2141
054 29734495 154 10525735 254 140436 354 1959
055 58731513 155 10188634 255 361962 355 4171
056 57263818 156 10059617 256 354702 356 3376
057 57033275 157 9805813 257 675674 357 3171
058 55394556 158 9629320 258 661737 358 3150
059 55022930 159 9490222 259 313209 359 647
060 54018514 160 9280124 260 623191 360 1528
061 52964870 161 8844112 261 546083 361 2484
062 52242492 162 8628099 262 524804 362 2233
063 51245000 163 8429593 263 534167 363 1930
064 50540742 164 8227144 264 503384 364 1353
065 49644127 165 7998287 265 464985 365 1368
066 49190978 166 7813413 266 461786 366 1232
067 24077300 167 3839149 267 441645 367 1667
068 47978806 168 7548052 268 418773 368 925
069 47059527 169 7349287 269 424148 369 872
070 46231581 170 7146807 270 378441 370 928
071 22715795 171 6993422 271 361885 371 808
072 44778204 172 6828801 272 360821 372 560
073 44053469 173 6674911 273 176161 373 757
074 43401907 174 6476248 274 172023 374 451
075 21398806 175 3166465 275 165927 375 245
076 42061440 176 6205963 276 154694 376 333
077 41316125 177 6040631 277 150664 377 156
078 40571245 178 5882934 278 309399 378 193
079 40282447 179 5812748 279 144927 379 161
080 39233218 180 5615082 280 141820 380 23
081 38522319 181 5461387 281 137601 381 163
082 37881913 182 5367414 282 287667 382 154
083 37460193 183 5222068 283 246093 383 111
084 18460204 184 5072949 284 123480 384 124
085 36127803 185 4918277 285 124070 385 87
086 35584769 186 4778878 286 116970 386 49
087 34821531 187 4641003 287 117351 387 66
088 34334716 188 4539624 288 110418 388 125
089 33769162 189 4407284 289 37988 389 27
090 33174401 190 2186822 290 109351 390 59
091 32520037 191 4220821 291 211267 391 19
092 31945541 192 4158097 292 209636 392 41
093 31221072 193 4070158 293 189161 393 2
094 30579410 194 3857103 294 188766 394 16
095 29977732 195 3785628 295 171584 395 0
096 29390061 196 3693474 296 152633 396 11
097 14518368 197 3555681 297 147806 397 0
098 14372444 198 3453089 298 70955 398 0
099 28268021 199 3345667 299 133302 399 10
100 27849953 200 3252227 300 139754 400 0
by 1to9only in One Column- Code: Select all
001 1007170
002 25502082
003 16538087
004 8417906
005 48737791
006 96229042
007 15765443
008 5306280
009 8136013
010 47174193
011 46788396
012 46177270
013 15340394
014 45397270
015 45600758
016 1631576
017 15093541
018 45101600
019 44832423
020 88782526
021 44036568
022 85627559
023 42711122
024 85102373
025 41847039
026 41335391
027 4455504
028 41102914
029 4591391
030 4664261
031 13606209
032 40697707
033 80468663
034 79175610
035 77979783
036 38536298
037 76146967
038 74505665
039 74154564
040 72171447
041 36053455
042 70552290
043 69437575
044 67978951
045 33904021
046 66337407
047 65880161
048 64996381
049 63898062
050 62192220
051 61691475
052 60192385
053 29966384
054 29734495
055 58731513
056 57263818
057 57033275
058 55394556
059 55022930
060 54018514
061 52964870
062 52242492
063 51245000
064 50540742
065 49644127
066 49190978
067 24077300
068 47978806
069 47059527
070 46231581
071 22715795
072 44778204
073 44053469
074 43401907
075 21398806
076 42061440
077 41316125
078 40571245
079 40282447
080 39233218
081 38522319
082 37881913
083 37460193
084 18460204
085 36127803
086 35584769
087 34821531
088 34334716
089 33769162
090 33174401
091 32520037
092 31945541
093 31221072
094 30579410
095 29977732
096 29390061
097 14518368
098 14372444
099 28268021
100 27849953
101 13768854
102 26929453
103 26382806
104 4359314
105 25997296
106 25467197
107 24888528
108 24423300
109 23988326
110 23541927
111 23070530
112 22609142
113 22100458
114 10879514
115 21378062
116 20985174
117 20674972
118 20107116
119 19854606
120 9732970
121 19084488
122 9491325
123 18532281
124 9142485
125 18075269
126 17675306
127 17545752
128 16990098
129 8369473
130 16406705
131 16189996
132 15791769
133 2613345
134 15362664
135 15272476
136 14918036
137 7254450
138 14383075
139 7011714
140 13738161
141 13445152
142 6593805
143 12918117
144 6403269
145 12568136
146 12354720
147 12036469
148 5931073
149 5949060
150 11577852
151 11435633
152 11155974
153 10671486
154 10525735
155 10188634
156 10059617
157 9805813
158 9629320
159 9490222
160 9280124
161 8844112
162 8628099
163 8429593
164 8227144
165 7998287
166 7813413
167 3839149
168 7548052
169 7349287
170 7146807
171 6993422
172 6828801
173 6674911
174 6476248
175 3166465
176 6205963
177 6040631
178 5882934
179 5812748
180 5615082
181 5461387
182 5367414
183 5222068
184 5072949
185 4918277
186 4778878
187 4641003
188 4539624
189 4407284
190 2186822
191 4220821
192 4158097
193 4070158
194 3857103
195 3785628
196 3693474
197 3555681
198 3453089
199 3345667
200 3252227
201 3165254
202 3064062
203 2966309
204 2932890
205 2841380
206 2701985
207 2628788
208 2532198
209 2443960
210 1243959
211 2317171
212 2357854
213 1137589
214 1083228
215 2183311
216 2244753
217 2143677
218 2100798
219 1007465
220 1970315
221 1841722
222 1873099
223 1772301
224 347777
225 1968442
226 1677704
227 1521001
228 1498734
229 1515366
230 1457098
231 1331185
232 1279569
233 1262013
234 1218744
235 386642
236 1182963
237 570172
238 1111083
239 1076551
240 167032
241 533940
242 1048083
243 974591
244 967788
245 455310
246 915249
247 500537
248 783336
249 822496
250 377256
251 408556
252 437792
253 387029
254 140436
255 361962
256 354702
257 675674
258 661737
259 313209
260 623191
261 546083
262 524804
263 534167
264 503384
265 464985
266 461786
267 441645
268 418773
269 424148
270 378441
271 361885
272 360821
273 176161
274 172023
275 165927
276 154694
277 150664
278 309399
279 144927
280 141820
281 137601
282 287667
283 246093
284 123480
285 124070
286 116970
287 117351
288 110418
289 37988
290 109351
291 211267
292 209636
293 189161
294 188766
295 171584
296 152633
297 147806
298 70955
299 133302
300 139754
301 119226
302 20203
303 62246
304 63613
305 69669
306 58811
307 21225
308 56942
309 55120
310 49427
311 91869
312 89983
313 80765
314 43270
315 74594
316 69012
317 73627
318 62449
319 59123
320 57580
321 47910
322 44876
323 46852
324 46002
325 40108
326 37300
327 36969
328 31504
329 28919
330 27982
331 29202
332 25098
333 20652
334 10105
335 19471
336 18996
337 17212
338 14780
339 13660
340 12324
341 10597
342 9562
343 9012
344 8215
345 7261
346 3569
347 7136
348 455
349 2935
350 2990
351 4836
352 2156
353 2141
354 1959
355 4171
356 3376
357 3171
358 3150
359 647
360 1528
361 2484
362 2233
363 1930
364 1353
365 1368
366 1232
367 1667
368 925
369 872
370 928
371 808
372 560
373 757
374 451
375 245
376 333
377 156
378 193
379 161
380 23
381 163
382 154
383 111
384 124
385 87
386 49
387 66
388 125
389 27
390 59
391 19
392 41
393 2
394 16
395 0
396 11
397 0
398 0
399 10
400 0
401 1
402 0
403 0
404 0
405 4
406 0
407 19
408 0
409 0
410 0
411 3
412 0
413 0
414 0
415 0
416 1
Gordon R. Royle on "Canonical Form:Gordon F. Royle wrote:The basic idea is that there are a number of operations that turn a grid (partially filled or complete, valid puzzle or pseudo-puzzle) into one that is entirely equivalent. This means that each grid comes with a large collection of equivalent grids, called the "equivalence class" of that grid. In general, each of these sets of equivalent grids will contain 9! x 6^8 x 2 grids, but sometimes fewer.
For searching, counting and a variety of other mathematical purposes, we usually want to treat an entire equivalence class of grids as a single object, because every grid in that class is "essentially the same". But for programming, solving and so on, we need to actually use a specific individual grid to represent the entire equivalence class. So the concept of a CANONICAL grid is to choose SOME RULE hat picks out ONE individual grid from the entire equivalence class and DEFINE that grid to be the "canonical" one.
Wolfgang gave one example of such a rule: pick the grid from the class whose completion is the lowest 81-digit number. But there are plenty of other possible rules and they don't need to involve finding the grid's completion, and so they don't need to be restricted to valid puzzles. Here are some choices..
(a) Write each grid as a number in decimal with "0" for the empty spaces and from all of these choose the one that gives the SMALLEST number as the canonical one
[ this will agree with Wolfgang's order for complete grids ]
(b) .. as before .. but choose the LARGEST number as the canonical one [so complete canonical grids will start with 987654321
(c) Write each grid as a number, but block-by-block, rather than row-by-row... then choose the smallest, or largest or whatever.
One that I use is:
(d) Convert grid to a graph, use the graph-labelling program nauty, and then convert graph back to a grid.
The ONLY advantage of the last one is that it is very fast for puzzles with few clues. For 17 clue puzzles I can find the canonical grids at the rate of about 4000 per second (on a standardish 2.4G PIV). Given that I am processing millions of 17/18-clue puzzles, I need to work quickly with the canonical version to avoid repetitions. Its disadvantage is that the canonical version of a puzzle has no human interpretation - it just seems like an arbitrarily chosen grid.