Monday, July 09, 2007

Sodoko

One of the latest crazes to hit the world recently is Sudoku, the game of Number Place, wherein you are given a 9x9 square divided into 3x3 squares or blocks, with some of the cells filled in with numbers from 1 to 9. The object is to fill the remaining cells so that each row, column and 3x3 block has one and only one of each number from 1-9. That automatically makes a completed Sudoku puzzle a Latin Square.

Just today I received in the mail a book written by Philip Riley and Laura Taalman, entitled Color Sudoku. It is a collection of unusual Sudoku puzzles. The cells in these puzzles are colored with usually 9 colors, and the object now is to make it so that you have one and only one of each color in each row, column, and color; or in some cases, in each row, column, 3x3 block, and color. Some of these have each position in the blocks as a separate color. For example, the upper left cell of each block will be one color, the center left will be a different color, and so forth.

I call this game Sodoko, and I would like to show why I call it that and show an interesting symmetry; in particular, for each Sodoko puzzle, there is another Sodoko puzzle that looks completely different, yet is essentially the same puzzle; I call this the "dual puzzle".

In an ordinary Sudoku grid, some of the cells are filled in with numbers. For example, in row 3, column 6, there could be a 7. This can be thought of as the triple 367. However, we can break down the 9 digits into doubles of digits from 0, 1, and 2: 1 is 00, 2 is 01, 3 is 02, 4 is 10, 5 is 11, 6 is 12, 7 is 20, 8 is 21, and 9 is 22. Then our cell with the 7 in it can be expressed as 021220. This shows that each filled cell can be represented as a 6-tuple of elements from {0, 1, 2}, or alternatively, as a 6-tuple of elements from the finite field of 3 elements, Z3. A Sudoku puzzle then is a database, where there are 6 fields, and each record has an element of Z3 in it for each field.

The requirement that there be only one and only one digit of each kind in each row can be expressed by saying that if you specify only fields F1, F2, F5, and F6, then the resulting database contains no duplicates. In SQL language, that could be rendered as something like "select F3, F4, F5, F6 from sudoku". The requirement then says that this query contains no duplicates and contains each combination of digits in F3 and F4. Note that we omit F1 and F2 from the fields, so we can say that this requirement is a 12 requirement.

The requirement that there be only one and only one digit of each kind in each column can be expressed by saying that if you specify only fields F3, F4, F5, and F6, the resulting query has no duplicates and contains each combination in fields F1 and F2; hence this is a 34 requirement. Finally the requirement that each 3x3 block has one and only one digit of each kind is the same as saying that if you specify only digits F2, F4, F5, and F6, there are no duplicates. So we say that this is a 24 requirement. This is because specifying F1 and F3 specifies a 3x3 block. Note that the three requirements can be diagramed 12. 24; 43, and this diagram would have 1 and 3 at the upper corners of a square, and 2 and 4 at the lower cornerss. Connecting the diagram using 12. 24; 43 results in something that looks like a U, and I note that there are two U's in "Sudoku".

How about the requirement that each color has one and only one of each digit? That can be thought of as specifying F1, F3, F5, and F6 and requiring that this have no duplicates. This is because F2 and F4 describe the coordinates within a 3x3 square, for example, 12 is the bottom center cell of the square. All the bottom center cells is a color. So now we are including requirement 13, which connects the two top ends of the U and makes it into an O. So likewise, I replace the U's in "Sudoku" with O's and get Sodoko.

I also note that each Sodoko puzzle has a twin puzzle that looks different but is essentially the same puzzle. This is done by interchanging fields F2 and F3. A row is represented by the first two coordinates, but now this is F1 and F3, so this corresponds to a block in the original puzzle. A column now corresponds to a color. A block corresponds to a row, and a color corresponds to a column. I call this the dual puzzle of the original puzzle. Therefore the two puzzles have equal difficulty, and if you complete one, you can complete the other simply by reading the numbers off from the first puzzle.

Sodoko is in some ways more satisfying than Sudoku, as it is more symmetrical. It is a little harder, and adds a bit of pizzazz to Sudoku, so go buy "Color Sudoku" and try a few of them.