ArticlePDF Available

On the number of Sudoku Grids

Authors:

Abstract

The subject of the number of sudoku grids has sparked much recent attention in Mathematics Today (R. Franklin (October 2012), Charles Evans (April 2013) and Ian Stewart (June 2013)). This feature addresses known results for numbers of sudoku grids of different sizes, and explains how a well formed symmetry group can be used to simplify the enumeration of sudoku grids.
On the Number of Sudoku Grids
Siˆan K. Jones CMath MIMA1,Stephanie Perkins CMath
MIMA1and Paul A. Roach CMath MIMA1
1University of South Wales
July 18, 2013
The subject of the number of Sudoku grids has sparked much recent atten-
tion in Mathematics Today (R. Franklin (October 2012), Charles Evans (April
2013) and Ian Stewart (June 2013)). This feature addresses known results for
numbers of Sudoku grids of different sizes, and explains how a well-formed sym-
metry group can be used to simplify the enumeration of Sudoku grids.
Sudoku is usually thought of as a 9 ×9 puzzle which is further subdivided
into mini-grids of size 3×3, with each of the 81 cells of the grid to be filled with
the digits 1 to 9 such that each digit appears exactly once in each row, column
and mini-grid. In fact, although published Sudoku puzzles are generally 9 ×9 in
size, other dimensions can be used, and for every non-prime dimension nthere
is an n×nSudoku grid. However, for some sizes of Sudoku more than one size
of mini-grids can be chosen. As examples, a 6 ×6 Sudoku (known as Rudoku)
can have mini-grids of size 3 ×2 or 2 ×3 (although these are essentially a rota-
tion from one to the other), and a 12 ×12 Sudoku can have mini-grids of size
either 3 ×4 or 6 ×2 (leading to very different puzzles). Published puzzles show
incomplete grids, with a number of cells pre-filled with fixed, or given digits,
chosen to ensure that a solution is unique.
1
(a) Row (b) Column (c) Cell (d) Mini-Grid
(e) Band (f) Stack (g) Tier (h) Pillar
Figure 1: Illustration of Terminology Used for Sudoku Grids
Formally a Sudoku grid, Sx,y, is a n×narray subdivided into nmini-grids
of size x×y(where n=xy); the values 1, . . . , n are contained within the ar-
ray in such a way that each value occurs exactly once in every row,column
and mini-grid. We denote a Sudoku grid of size n×nwith mini-grids of size
x×y, where n=xy as Sx,y , and the number of ways of arranging the values
in Sx,y as Sx,y(n). Sx,y a,b is a specific mini-grid in band aand stack bof Sx,y
and [Sx,ya,b ]i,j a specific cell in tier iand pillar jof the mini-grid Sx,y a,b. (See
Figure 1.)
Counting the number of Sudoku grids is known to be a difficult problem,
similar in nature to that of counting the number of Latin squares. It is pro-
posed in [1] that adaptations of methods used for counting the number of Latin
squares could be used to count the number of Sudoku grids. The number of
Sudoku grids has been calculated (and in most cases verified) for sizes up to
12 ×12 (with mini-grids of size 3 ×4). An historical account of this work, which
mostly comprises computational calculations rather than mathematical proof, is
given in [2]. Mathematical proofs for the numbers of Sudoku grids of small sizes
have been achieved, with proofs for larger sizes still being elusive. Counting the
number of 4 ×4 Sudoku grids is trivial (and a full mathematical enumeration
is given as an example in [3]), and the only known non-trivial mathematical
enumeration is for 6 ×6 Sudoku grids [4]. The method of counting employed
requires categorisation of the arrangements of numbers within partially filled
grids. The properties of these partially filled grids are analysed and the number
of ways of completing them calculated. A similar counting method is performed
to enumerate the first band of a 9 ×9 Sudoku grid in [5], but the number of
ways of completing the grid is then calculated computationally.
2
Sudoku grids possess a great deal of structure and therefore there are a num-
ber of symmetry operations applicable. However, as stated in [6] and [7] some
of these symmetry operations result in grids which are ‘fixed’. A Sudoku grid is
fixed if the application of some symmetry operation on it results in an identical
grid (examples of this are given in [8]). However there are a number of opera-
tions for which no fixed grid can be produced, and these allow us to construct
reduced Sudoku grids, which are comparable to reduced Latin squares. A re-
duced Latin square is one in which the values in the first row and first column
are in numerical order. The concept of reduction is not as straightforward for
Sudoku grids, but a similar approach can be adopted [3].
Areduced Sudoku grid, sx,y,is a Sudoku grid, Sx,y, having the following
properties:
the values in Sx,y1,1are in canonical form, [Sx,y 1,1]i,j = (i1)y+j;
for each mini-grid Sx,y1,b , for b= 2, . . . , x, the values in [Sx,y1,b ]1,j for
j= 1, . . . , y are increasing;
for each mini-grid Sx,ya,1, for a= 2, . . . , y , the values in [Sx,y a,1]i,1for
i= 1, . . . , x are increasing;
[Sx,y1,b ]1,1<[Sx,y 1,b+1]1,1for b= 2, . . . , x 1;
[Sx,ya,1]1,1<[Sx,y a+1,1]1,1for a= 2, . . . , y 1.
An example of a reduced Sudoku grid is given in Figure 2(a), and an iso-
morphic Sudoku grid that can be formed from it (by permuting the values
(1,9,2,5,8)(3,7,6)(4) and permuting the rows and columns) is given in Figure
2(b).
1 2 3 4 5 9 6 7 8
4 5 6 7 1 8 3 9 2
7 8 9 3 6 2 1 5 4
2 9 4 5 7 6 8 1 3
6 7 1 8 4 3 5 2 9
8 3 5 9 2 1 4 6 7
3 6 7 1 9 4 2 8 5
5 4 2 6 8 7 9 3 1
9 1 8 2 3 5 7 4 6
(a) A Reduced Sudoku Grid
9 5 7 6 1 3 2 8 4
4 8 3 2 5 7 1 9 6
6 1 2 8 4 9 5 3 7
1 7 8 3 6 4 9 5 2
5 2 4 9 7 1 3 6 8
3 6 9 5 2 8 7 4 1
8 4 5 7 9 2 6 1 3
2 9 1 4 3 6 8 7 5
7 3 6 1 8 5 4 2 9
(b) A Sudoku Grid Isomorphic to
(a)
Figure 2: An Example Sudoku Grid in Reduced Form and a Sudoku Grid
Isomorphic to it
3
Every Sudoku grid is isomorphic to exactly one reduced Sudoku grid, and
hence the number of Sudoku grids is a multiple of the number of reduced Sudoku
grids.
Theorem 1 ([3]).If sx,y(n)is the number of reduced Sudoku grids of size n×n
with mini-grids of size x×y(where n=xy)then Sx,y(n)is given by
Sx,y(n) = (n1)!x!yy!xsx,y (n) (1)
For a 9 ×9 Sudoku grid the size of the symmetry group is 1,881,169,920. In
[5], the number of 9×9 Sudoku grids was determined to be 6,670,903,752,021,072,936,960.
This value is divisible by the size of the symmetry group, suggesting that there
are 3,546,146,300,288 reduced Sudoku grids.
For many years researchers have attempted to find a general equation to
determine the number of Latin squares of any given size. This problem remains
open, and this is also the case for Sudoku grids. Any progress in either domain
will provide insight for the other.
References
[1] S. K. Jones, On Properties of Sudoku and Similar Combinatorial Structures.
PhD thesis, University of Glamorgan, 2010.
[2] Forum Contributors, “Mathematics of Sudoku,” Wikipedia.org.http://en.
wikipedia.org/wiki/Mathematics_of_Sudoku Last Accessed 13.11.08.
[3] S. K. Jones, S. Perkins, and P. A. Roach, “The structure of reduced Sudoku
grids and the Sudoku symmetry group,” International Journal of Combina-
torics, vol. 2012, 2012. Article ID 760310, 6 pages.
[4] S. K. Jones, S. Perkins, and P. A. Roach, “On the number of 6 ×6 Sudoku
grids,” Journal of Combinatorial Mathematics and Combinatorial Comput-
ing, 2012. Accepted April 2012.
[5] B. Felgenhauer and F. Jarvis, “Mathematics of Sudoku I,” Mathematical
Spectrum, vol. 39, pp. 15–22, September 2006.
[6] I. Stewart, “Sudoku arrays,” Mathematics Today, vol. 49, p. 142, June 2013.
[7] R. A. Bailey, P. J. Cameron, and R. Connelly, “Sudoku, Gerechte designs,
Resolutions, Affine Space, Speads, Reguli and Hamming Codes,” American
Mathematical Monthly, vol. 115 (5), pp. 383–404, 2008.
[8] S. K. Jones, S. Perkins, and P. A. Roach, “Properties, isomorphisms and enu-
meration of 2-Quasi-Magic Sudoku grids,” Discrete Mathematics, vol. 311,
no. 1, pp. 1098–1110, 2009.
4
... In fact, except for S 2 , which is trivial to calculate, and S 2,3 , which has been calculated "mathematically" [13], the other known values of S R,C have been calculated employing heavy computations. (For more information we refer to [12].) There are also some heuristics that may be used to estimate S n , and more generally S R,C , that give good approximations in the cases where the exact value is known; see [32] and the references there. ...
Article
Full-text available
We provide an upper bound on the number of n²×n² Sudoku squares, and explain intuitively why there is reason to believe that the bound is tight up to a multiplicative factor of a much smaller order of magnitude. A similar bound is established for Sudoku squares with rectangular regions.
Article
Full-text available
The authors interpret the nine by nine Sudoku puzzle as a graph coloring problem. Viewed this way, they can generalize the puzzle to arbitrary size. They compute the chromatic number of the resulting graph, and they estimate the number of “Sudoku squares” of any given size.
Thesis
Full-text available
This thesis presents the first combinatorial enumeration of 6×6 Sudoku (Rodoku) grids and 2-Quasi-Magic Sudoku grids (a 9 × 9 Sudoku variant with additional constraints). Various known enumeration techniques are combined to construct a novel approach to enumerating Latin squares and Sudoku grids, which is applied here to grid sizes up to 6 × 6. Chapter 1 is introductory in nature and contains a literature survey. In Chapter 2 a case-by-case analysis providing a full enumeration of the number of Rodoku grids is given. This confirms the computational result previously given in the literature. The technique of case-by-case analysis is also employed in Chapter 3 to enumerate the number of 2-Quasi-Magic Sudoku grids. A 2-Quasi-Magic Sudoku grid is a 9 × 9 Sudoku grid with the added constraints that the rows, columns and diagonals in the mini-grids sum to an integer in the interval [13, 17]. Further, the number of non-isomorphic 2-Quasi-Magic Sudoku grids is determined. In Chapter 4 known enumeration techniques are combined in a novel way to provide a new approach to the enumeration of Latin squares. Equivalence classes in the derangements of 1, . . . , n are considered first. Then Latin rectangles of depth three are enumerated, and their equivalence classes are identified. Both types of equivalence classes are employed in the enumeration of Latin squares, and demonstrated for sizes 4 × 4, 5 × 5 and 6 × 6. Techniques developed in Chapter 4 are applied in Chapter 5 to allow the enumeration of Sudoku grids. The approach is demonstrated to work for Sudoku grids of sizes 4 × 4 and 6 × 6. In Appendices E and F additional work is given discussing the properties of Sudoku and 2-Quasi Magic Sudoku puzzles, and to that of the formation of an automated solution to these puzzles.
Article
Full-text available
Partially filled 6x6 Sudoku grids are categorised based on the arrangement of the values in the first three rows. This categorisation is then employed to determine the number of $6 \times 6$ Sudoku grids.
Article
Full-text available
A Sudoku grid is a constrained Latin square. In this paper a reduced Sudoku grid is described, the properties of which differ, through necessity, from that of a reduced Latin square. The Sudoku symmetry group is presented and applied to determine a mathematical relationship between the number of reduced Sudoku grids and the total number of Sudoku grids for any size. This relationship simplifies the enumeration of Sudoku grids and an example of the use of this method is given.
Article
Full-text available
The popular Sudoku puzzles are 9 by 9 tables divided into nine 3 by 3 sub-tables or blocks. Digits 1 through 9 appear in some of the entries. Other entries are blank. The goal is to fill the blank entries with digits 1 through 9 in such a way that each digit appears exactly once in each row and in each column and in each block. Cayley tables are group operation tables. As such, each group element always appears exactly once in each row and in each column, two thirds of being a Sudoku-like table. Cayley-Sudoku tables are Cayley tables arranged in such a way as to satisfy the additional requirement. Namely, the Cayley table may be divided into blocks with each group element appearing exactly once in each block. We show three ways to construct nontrivial Cayley-Sudoku tables for finite groups, present a Cayley-Sudoku puzzle to solve, and give several suggestions for additional investigations.
Article
We (1) determine the number of Latin rectangles with 11 columns and each possible number of rows, including the Latin squares of order 11, (2) answer some questions of Alter by showing that the number of reduced Latin squares of order n is divisible by f! where f is a particular integer close to \(\frac{1}{2}n,\) (3) provide a formula for the number of Latin squares in terms of permanents of (+1, −1)-matrices, (4) find the extremal values for the number of 1-factorisations of k-regular bipartite graphs on 2n vertices whenever 1 ≤ k ≤ n ≤ 11, (5) show that the proportion of Latin squares with a non-trivial symmetry group tends quickly to zero as the order increases.
Article
We (1) determine the number of Latin rectangles with 11 columns and each possible number of rows, including the Latin squares of order~11, (2) answer some questions of Alter by showing that the number of reduced Latin squares of order $n$ is divisible by $f!$ where $f$ is a particular integer close to $\frac12n$, (3) provide a formula for the number of Latin squares in terms of permanents of $(+1,-1)$-matrices, (4) find the extremal values for the number of 1-factorisations of $k$-regular bipartite graphs on $2n$ vertices whenever $1\leq k\leq n\leq11$, (5) show that the proportion of Latin squares with a non-trivial symmetry group tends quickly to zero as the order increases. Comment: 11 pages