How many different $2 \times 2$ Sudokus are there?

158 Views Asked by At

PROBLEM
How many different $2 \times 2$ Sudokus are there?

APPROACH
This seems pretty easy to brute force. There are $576$ Latin squares of size $4$ (which are the sudokus without restriction on boxes), of which $288$ are valid sudokus.
One way two sudokus are not different is by permuting the symbols.

Example

1 2 | 3 4        2 1 | 3 4
3 4 | 1 2        3 4 | 2 1
----+----        ----+----
2 1 | 4 3        1 2 | 4 3
4 3 | 2 1        4 3 | 1 2

are equivalent because it simply renames $1\rightarrow2$ and $2 \rightarrow 1.$

This is also called Relabeling Symbols specifically.

An easy way to prevent relabeling is to fix the first row to 1 2 | 3 4. Now there are 24 Latin squares (which makes sense, since each one would represent $1\times2\times3\times4$ permutations of the numbers, and $24\times24=576$), and $12$ of these are valid sudokus $(12\times24=288)$.

Now they are grouped by Row Permutations (where exchanging the rows will lead them to being equivalent)

1 2 | 3 4      1 2 | 3 4        1 2 | 3 4      1 2 | 3 4
3 4 | 1 2      3 4 | 1 2        4 3 | 2 1      4 3 | 2 1
----+----      ----+----        ----+----      ----+----
2 1 | 4 3      4 3 | 2 1        2 1 | 4 3      3 4 | 1 2
4 3 | 2 1      2 1 | 4 3        3 4 | 1 2      2 1 | 4 3



1 2 | 3 4      1 2 | 3 4
3 4 | 1 2      3 4 | 1 2
----+----      ----+----
2 3 | 4 1      4 1 | 2 3
4 1 | 2 3      2 3 | 4 1



1 2 | 3 4      1 2 | 3 4        1 2 | 3 4      1 2 | 3 4
3 4 | 2 1      3 4 | 2 1        4 3 | 1 2      4 3 | 1 2
----+----      ----+----        ----+----      ----+----
2 1 | 4 3      4 3 | 1 2        2 1 | 4 3      3 4 | 2 1
4 3 | 1 2      2 1 | 4 3        3 4 | 2 1      2 1 | 4 3



1 2 | 3 4      1 2 | 3 4
4 3 | 2 1      4 3 | 2 1
----+----      ----+----
2 4 | 1 3      3 1 | 4 2
3 1 | 4 2      2 4 | 1 3

Does this mean that there are $4$ essentially different $2\times2$ sudokus? Are there any more transformations that lead to equivalence?

I've ruled out stack/column/band transformations, since the first row is fixed to 1 2 | 3 4. I am unsure if the row transformations are all essentially equivalent (in particular, swapping a row in the first band with a row in the second band), so there could be $6$ different puzzles. A post on this ancient forum claims that there are only $2$ essentially different puzzles, but I can't find any more transformations.

Here is a link to the brute force code I've used: https://wandbox.org/permlink/6vhSnSRPaqCX4cse

Also is there any slick reasoning why exactly half of all $4\times4$ Latin squares are valid sudokus?

2

There are 2 best solutions below

1
On BEST ANSWER

The transformations you can apply to a sudoku are: permuting the numbers, rotating the sudoku, band permutation, line or column permutation inside a band, horizontal, vertical or diagonal symmetry... All of these transformations form a group, many of these transformations can be deduced from other, see wikipedia for a more detailed description of the group of transformations.

Your first sudoku is equivalent to the third one by the following transformations:

1 2 | 3 4 
3 4 | 1 2 
----+---- 
2 1 | 4 3 
4 3 | 2 1

Rotation to the right:

4 2 | 3 1 
3 1 | 4 2 
----+---- 
2 4 | 1 3 
1 3 | 2 4

Permutation of the two first columns:

2 4 | 3 1 
1 3 | 4 2 
----+---- 
4 2 | 1 3 
3 1 | 2 4

Taking permutation $\sigma = (4, 1, 3, 2)$

1 2 | 3 4 
4 3 | 2 1 
----+---- 
2 1 | 4 3 
3 4 | 1 2

By combining transformations, you should reduce the number of non equivalent tranformations to 2.

0
On

Here is proof that every sudoku of this size is equivalent to one of two grids.

Up to permutation of symbols, you can assume the uppermost quadrant looks like

1 2 | a b
3 4 | . .
----+----
c . | . .
d . | . .

By possibly switching the third and fourth columns, we can ensure that $(a,b)=(3,4)$. By possibly switching the third and fourth rows, we can also ensure that $(c,d)=(2,4).$ These two choices force the placement of the 4 in the lower right quadrant. So far, we have

1 2 | 3 4
3 4 | . .
----+----
2 . | 4 .
4 . | . .

There are then three choices for the location of the 1 in the lower right quadrant. Each of these forces the rest of the grid, leading to one of three possible grids.

1 2 | 3 4        1 2 | 3 4        1 2 | 3 4 
3 4 | 1 2        3 4 | 1 2        3 4 | 2 1 
----+----        ----+----        ----+---- 
2 1 | 4 3        2 3 | 4 1        2 1 | 4 3 
4 3 | 2 1        4 1 | 2 3        4 3 | 1 2 

Finally, the last two of these grids are equivalent to each other, which can be seen by reflecting the middle grid through the diagonal line of symmetry going from the top left to the bottom right, and then swapping 2 with 3.