Download presentation
Presentation is loading. Please wait.
1
Patrick MacKinnon & Claude-Michelle Chavy-Waddy
The Algebra of Sudoku Patrick MacKinnon & Claude-Michelle Chavy-Waddy
2
Outline Introduction to the Sudoku Counting Sudoku and Shidoku
Sudoku Symmetries, Permutations, and Groups Linear Algebraic Properties of Sudoku Super Fun Activity Exam Questions
3
What is a Sudoku? A type of Latin Square Extra constraints
n × n array of n different characters no repetition in rows no repetition in columns Extra constraints latin square is divided into sections of dimension √n × √n this forces n to be a perfect square no repetition in sections Regular sudoku has dimension 9×9 sudoku puzzles have characters missing and requires logic to solve Figure 1: An example of a latin square Figure 1: An example of a sudoku
4
History of Sudoku The word Sudoku comes from Japan Su meaning 'number'
Doku meaning 'single' The game has roots in France French puzzle makers began experimenting with 9×9 magic squares with sections In 1895, La France, refined these to the Modern Sudoku without the sections The modern Sudoku designed by Howard Garns, published as Number Place Became popular internationally and then became renamed Sudoku in Japan "Use the numbers 1 to 9 each nine times to complete the grid in such a way so that the horizontal, vertical, and two main diagonal lines all add up to the same total." It simplified the 9×9 magic square puzzle so that each row, column and broken diagonals contained only the numbers 1–9, but did not mark the sub-squares
5
Variants of Sudoku Many different variations of the sudoku puzzle
Nonomino or a Jigsaw Sudoku Hypersudoku Killer Sudoku Many different sizes of the sudoku puzzle The 4×4 sudoku is the smallest possible size. Referred to as the Shidoku Figure: A nonomino or a Jigsaw Sudoku Figure: A hypersudoku Figure: A killer sudoku puzzle and corresponding solution
6
Counting the Number of Sudoku
A Sudoku puzzle is any sudoku with missing entries that has a unique solution. A Sudoku is a completed sudoku puzzle (no missing entries). In 2006, Ferlgenhauer and Jarvis counted 6, 670, 903, 752, 021, 072, 936, 960, or 6.7 x1021 possible 9x9 Sudoku. 5, 472, 730, 538 essentially different 9x9 Sudoku (Jarvis and Russell).
7
Counting Shidoku 4! ways to fill the first block.
4 * 3 possible ways to fill next two entries. There is a unique solution to a Sudoku puzzle of this form. 4! * 4 * 3 = 288 possible 4x4 Sudoku. 4 3 2 1
8
→ → 4 2 1 3 4 2 1 3 4 2 3 1 4 2 1 3 4 2 1 3 4 2 1 3
9
Counting Shidoku Consider the following Sudoku: 4 2 1 3 3 2 1 4
Notice the Sudoku on the right can be obtained by rotating the left puzzle by 90 degrees clockwise. These two puzzles are considered equivalent. 4 2 1 3 3 2 1 4
10
Symmetries of a Sudoku The symmetries of a Sudoku include any transformation of a Sudoku grid always yielding a valid Sudoku. These include: Rotations (90, 180, 270 degrees). Reflections (same as symmetries of a square). Relabeling elements (e.g. 2 becomes 4 and vice versa). Permutations of columns, rows or blocks such that every entry belonging to a particular row, block or column must remain in that particular row, block and column.
11
Possible Permutation Types
Adjacent columns in a stack of blocks Sets of stacked blocks 3. Stacked rows of adjacent blocks Sets of adjacent blocks. 4 2 1 3 2 1 3 4 4 2 1 3 1 3 4 2 4 2 1 3 4 2 1 3 4 2 1 3 2 4 3 1
12
Shidoku Groups The set of valid Shidoku forms a group under composition of the symmetries of a Sudoku. The composition of two symmetries of a 4x4 Sudoku yields another valid 4x4 Sudoku, so group has closure. (since any symmetry preserves the elements of each row, column and block). The identity is a rotation by 0°. The inverse of each element is the reverse of each transformation. Composition is associative. Two Sudoku are essentially different if and only if one cannot be obtained from the other through any sequence of symmetry compositions.
13
Counting Essentially Different Shidoku
The following grid is equivalent to all other possibilities. Through relabelling entries, the symmetries of a square and permutations of pairs of columns, blocks or rows. Shaded entry has only one valid element. Cannot choose B or C (rule of one). Could choose A or D but D cannot go anywhere else. So must choose D. 3 possibilities for second shaded entry. A B C D ↓ A B C D
14
3 possibilities for essentially distinct grids.
Recall that a 4x4 grid with all elements in the first block filled along with top left to bottom right diagonal entries has a unique solution. 3 possibilities for essentially distinct grids. 2nd and 3rd grids are equivalent. 2/288 4x4 Sudoku are essentially different. Choosing A: Choosing B: Choosing C: Switch C & B ↓ A B C D A B C D A B C D A C B D
15
Partitions of the Sudoku solution set
A partition of a set S is a collection of nonempty subsets of S such that every element is in exactly one subset. The sudoku solution set can be partitioned into subsets of all equivalent solutions. 4x4: partition consists 2 subsets of essentially different sudoku. 9x9: 5, 472, 730, 538 subsets form a partition of the solution set. The subsets of these partitions are equivalence classes. Reflexive: A sudoku is equivalent to itself. Symmetric: If a sudoku X is equivalent to another sudoku Y, then Y is equivalent to X. Transitive: If X is equivalent to Y, and Y is equivalent to Z, then X is equivalent to Z.
16
Sudoku’s Linear Algebraic Properties
Determinants Eigenvalues Transpose Orthogonality
17
The Sudoku Matrix Is any complete n×n sudoku such that it is represented as an n×n matrix and uses the lowest set of positive integers as its elements
18
Eigenvalues and Eigenvectors
Remember that a vector v is an eigenvector iff there is a square matrix A such that Av = λv where λ is a scalar Not all squares matrices have corresponding eigenvalues , but every sudoku matrix does Due to being a magic square det(S − λI) = αλn + βλn−1 + · · · + ζλ0 = ∑αiλi n i=0
19
Eigenvalues and Eigenvectors
det(S − λI) = αλn + βλn−1 + · · · + ζλ0 = ∑αiλi n i=0 We could follow the formula, but since we know that every sudoku is a magic square, there is an easier way The eigenvector must be of dimension 9×1. Since each column contains the same numbers, simply add the elements of a column. λ = = 45 for arbitrary sudoku sizes: λ = … + n = n × (n + 1) / 2 = 45 ×
20
Transpose The transpose of a matrix is a matrix such that every aij element in the original matrix becomes the aji element of the transpose matrix For every sudoku matrix that we transpose, the result is different valid sudoku that follows the sudoku rules. The transpose will never equal the original sudoku because it is impossible for a sudoku to have such symmetry. 4×4 example of this on board
21
Orthogonality A matrix, S of dimension n×n, is orthogonal if and only if ST×S = In ST denotes the transpose of S In denotes the identity matrix of an n×n matrix If det(S) = 0, then then S cannot be orthogonal. this can be seen from: det(ST·S) = det(ST) det(S) and det(In) = 1 If det(S) ≠ 0, then ST must equal S -1 for S to be orthogonal this is not possible for a sudoku as S-1 will always contain fractions therefore sudoku matrices are never orthogonal
22
Super Fun Activity
24
Exam Questions What is the is the eigenvector and the corresponding eigenvalue for a 16×16 sudoku? What is a Shidoku? Explain how to find the total number of Shidoku solution possibilities. How many of these are essentially different?
25
References Merciadri, L. (2009). Sudoku, the golden ratio, determinants, eigenvectors and matrices in $\mathbb Z$ ; sudoku, le nombre d'or, déterminants, vecteurs propres et matrices dans $\mathbb Z$ Carlos Arcos, Gary Brookfield, & Mike Krebs. (2010). Mini-Sudoku and Groups. Mathematics Magazine, 83(2), 111–122.
26
Questions or Comments
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.