The Math Behind Sudoku
4. Solution Symmetries
The number of distinct Sudoku grids has been determined to be
N=6670903752021072936960≈6.671×10
21
. But sometimes we can transform one
filled-in grid to another in some hands-on way. For example, if we have a valid Sudoku
grid, then rotating it by 90° results in another grid, which may be distinct from the first
one, but is still valid. We can consider these grids to be essentially the same because
the transformation applied still leaves the grid as a Sudoku solution. Similary, if we
swap all the 3's with the 4's in the grid, we end up with another valid grid. We could
also take a Sudoku grid, switch the places of the fifth and sixth rows, and end up with
another valid grid. When we perform any of these operations on a valid grid, we
preserve the property of it being valid.
These kinds of operations are called symmetries of a grid. A symmetry of an object is
an operation that preserves a certain property of the object. It is interesting to note that
if we perform one symmetry and then another, the resultant transformation is itself a
symmetry. Also, included in the set of symmetries is the transformation that leaves the
object unchanged. For any symmetry, there is another one that undoes what the first
one does. Finally, performing one symmetry then a second then a third can be done by
grouping either the first and second together or the second and third together, and the
resultant transformation is the same either way.
These properties tell us that the set of symmetries of an object form a group. A group is
a set G along with an operation · which satisfies the following properties:
If g and h are elements of G, then so is g·h. (This is called closure under the group
operation.)
If g, h, and k are elements of G, then g·(h·k)=(g·h)·k. (This is called the associativity
property of the group operation.)
There is an element e in G such that g·e=e·g=g for all g in G. (This element e is called
the identity element of G, since it leaves every element of G unchanged under the
operation.)
For any element g of G, there is another element h of G so that g·h=h·g=e, where e is
the identity element. (The element h is called the inverse of g, and is denoted by g
-1
.)
Notice that we used multiplicative notation for the operation of a group in the above
definition. We could also use additive notation, and in this case we would denote the
inverse of g by -g.