# The Sudoku shuffle

I've been puzzling my puzzler about Sudoku solutions. The thing is, people already know how many solutions there are, but I don't. Rather than read about it, I'll just derive it here, or try until "bored" of it!

### Counting in beautiful simplicity

I will start with the following board. It has got all the 1's and nothing else.

Hey, I see a cube! A skewered cube. No pun intended. If it was intended, I'd have simply said $$(x^{3})^{2}$$!!!! So, I'm convinced that the above board is actually the only answer board. Other boards are just shuffled versions with more numbers included. Here's my thought process.

1. I see each row in a family of 3 and each column in a family of 3. That's 6 groups in all.
2. Next, I pivot rows and columns maintaining the families of 3.
3. Lastly, I stare at it with my imagination until I see every puzzle's 1's placement accounted.
4. I notice how each family of 3 rows has a small number of ways to pivot, and so does each family of 3 columns. That's $$3!$$ ways for each family.
5. Because I have 6 independent families the product of pivots is $$(3!)^{6}$$.
6. Now that's a squared cube!

My first conclusion is that a skewered cube of 1s and its shuffles form a squared cube of possibilities.

### Numbering 1s' locations

I can describe the cell location of each 1 with a vector.

1. To prepare, I number the cells in a 3x3 block, proceeding top to bottom, left to right (column first) 1 4 7 2 5 8 3 6 9
2. To create the vector, I proceed from block to block starting left to right, then top to bottom (row first ordering)
3. For each block, I write down the number of the cell which contains a 1.
4. With these steps, I form this vector from the picture above: [0, 1, 2, 3, 4, 5, 6, 7, 8]
5. For visualization, I rewrite this sequence in base 3 with line breaks (to match block location) and colors in column digit families:
00  002
1112
2222

6. Or colors in row digit families:
00  002
1112
2222
7. Swapping numbers in each of the 6 families above is equivalent to pivoting rows or columns in families of 3 [Counting in beautiful simplicity].

### Numbering all digit locations

Beginning with the 1s, I can assign a prototypical numbering to each number by a simple rotation:
00 01 02 10 11 12 20 21 22 *** prototypical numbering of cells of 1
01 02 10 11 12 20 21 22 00 *** of 2
02 10 11 12 20 21 22 00 01 *** of 3
10 11 12 20 21 22 00 01 02 *** of 4
11 12 20 21 22 00 01 02 10 *** of 5
12 20 21 22 00 01 02 10 11 *** of 6
20 21 22 00 01 02 10 11 12 *** of 7
21 22 00 01 02 10 11 12 20 *** of 8
22 00 01 02 10 11 12 20 21 *** of 9

The above 9x9 matrix (base 3, modulo 9) represents a single solved Sudoku puzzle.

Let $$G_{b}^{n}$$ be any such matrix of a valid Sudoku solution.

1. $$9$$ options to choose $$G_{1}^{1}$$.  This is the location of the 1 in the first block (top-left 3x3 square).
2. $$\frac{9!}{9}$$ options to dependently choose $$G_{1}^{n}, n>1$$.  This is all remaining contents of block 1 (top-left 3x3 square)
3. $$\frac{{3!}^{6}}{9}$$ options to dependently choose $$G_{b}^{1}, b>1$$.  This is the location of all remaining 1s.
Thus far that's $$8!{3!}^{6}$$ options
00 01 02 10 11 12 20 21 22 *** of 1
01 02 10 11 12 20 21 22 00 *** of 2
02 10 11 12 20 21 22 00 01 *** of 3
10 11 12 20 21 22 00 01 02 *** of 4
11 12 20 21 22 00 01 02 10 *** of 5
12 20 21 22 00 01 02 10 11 *** of 6
20 21 22 00 01 02 10 11 12 *** of 7
21 22 00 01 02 10 11 12 20 *** of 8
22 00 01 02 10 11 12 20 21 *** of 9
1. Dependently choose $$G_{b}^{2}, b>1$$. This is all remaining contents of block 2 (top-middle 3x3 square)... How many options?

To be continued.