sudoku and orthogonality john lorch undergraduate colloquium fall 2008

23
Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

Upload: posy-kennedy

Post on 03-Jan-2016

226 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

Sudoku and Orthogonality

John LorchUndergraduate ColloquiumFall 2008

Page 2: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

What is a sudoku puzzle?

Sudoku ‘single number

puzzle’ numbers 1-9 must

appear in every row, column, and block.

Typically appears in order n2: An n2×n2 array with n×n blocks.

1 7 9 6

8 9 6 7

2 1 5 3

5 2 4 8

2 8 7 3

5 6 2 4

4 3 1 6

6 8 1 5

Page 3: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Sudoku solution

The completion of the previous puzzle: all entries are filled in.

A sudoku solution is a completed puzzle.

1 5 7 4 3 8 9 2 6

3 8 4 9 2 6 5 7 1

2 9 6 1 7 5 4 8 3

9 3 5 2 6 4 8 1 7

8 7 1 5 9 3 6 4 2

4 6 2 8 1 7 3 5 9

5 1 3 6 8 2 7 9 4

7 4 9 3 5 1 2 6 8

6 2 8 7 4 9 1 3 5

Page 4: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Sudoku and Latin squares

A latin square of order n is an n×n array with n distinct symbols. Each symbol appears once in each row and column.

Literature on latin squares dates to Euler (1782).

Sudoku solution: a latin square with additional condition on blocks.

Non-sudoku Latin square

Sudoku

1 2 3 4

2 1 4 3

3 4 1 2

4 3 2 1

1 2 4 3

3 4 2 1

4 3 1 2

2 1 3 4

Page 5: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Questions about sudoku

Natural questions: How many sudoku solutions exist for a given order? What is the minimum number of entries determining

a unique completion? What can symmetry groups tell us about sudoku? What is known about orthogonal sudoku puzzles?

Our purpose: investigate orthogonality

Page 6: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Orthogonal Latin squares

Two latin squares are orthogonal if superimposition yields all possible ordered pairs of symbols.

Orthogonality is preserved by Relabeling either

square Rearrangement applied

to both squares

Orthogonal squares:

4 3 2 1

3 4 1 2

2 1 4 3

1 2 3 4

2 1 4 3

4 3 2 1

3 4 1 2

1 2 3 4

42 31 24 13

34 43 12 21

23 14 41 32

11 22 33 44

Page 7: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Orthogonal sudoku mates

Golomb’s problem: (MAA Monthly 2006) Do there exist pairs of orthogonal sudoku solutions?Answer: Yes

Our purpose, more specifically: Investigate methods for producing such

pairs.Make observations on these methods.

Page 8: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Background: Transversals

Transversal: A collection of locations and corresponding entries so that each row, column, and symbol is represented exactly once.

0 1 2 5 3 4 8 6 7

3 4 5 7 8 6 2 0 1

6 7 8 1 2 0 4 5 3

8 6 7 0 1 2 5 3 4

2 0 1 3 4 5 7 8 6

4 5 3 6 7 8 1 2 0

5 3 4 8 6 7 0 1 2

7 8 6 2 0 1 3 4 5

1 2 0 4 5 3 6 7 8

Page 9: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Background: Transversals

Transversal Theorem: A latin square of order n has an orthogonal mate if and only if it has n disjoint transversals. Proof of theorem yields a

method for producing an orthogonal mate.

Unfortunately, method fails to preserve sudoku block condition.

2 1 4 3

4 3 2 1

3 4 1 2

1 2 3 4

1 2 3 4

2 1 4 3

3 4 1 2

4 3 2 1

21

31

11

41

Page 10: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 1: Combing transversals

Consider an order 4 solution with transversal. To get orthogonal sudoku mate, we can’t apply transversal theorem directly.

Instead: Use transversals as rows (left to right combing)

1 2 4 3

3 4 2 1

4 3 1 2

2 1 3 4

1 4 3 2

3 2 1 4

4 1 2 3

2 3 4 1

11 24 43 32

33 42 21 14

44 31 12 23

22 13 34 41

Page 11: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 1: Combing transversals

Illustration of method with solution, yielding an orthogonal pair.

A C B

B A C

C B A

0 4 8 3 7 2 6 1 5

3 7 2 6 1 5 0 4 8

6 1 5 0 4 8 3 7 2

8 0 3 2 5 7 4 6 1

2 5 7 4 6 1 8 0 3

4 6 1 8 0 3 2 5 7

5 8 0 7 2 4 1 3 6

7 2 4 1 3 6 5 8 0

1 3 6 5 8 0 7 2 4

0 1 2 5 3 4 8 6 7

3 4 5 7 8 6 2 0 1

6 7 8 1 2 0 4 5 3

8 6 7 0 1 2 5 3 4

2 0 1 3 4 5 7 8 6

4 5 3 6 7 8 1 2 0

5 3 4 8 6 7 0 1 2

7 8 6 2 0 1 3 4 5

1 2 0 4 5 3 6 7 8

Page 12: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 1: Combing transversals

A different choice of transversal can yield non-orthogonal solutions:

0 1 2 5 3 4 8 6 7

3 4 5 7 8 6 2 0 1

6 7 8 1 2 0 4 5 3

8 6 7 0 1 2 5 3 4

2 0 1 3 4 5 7 8 6

4 5 3 6 7 8 1 2 0

5 3 4 8 6 7 0 1 2

7 8 6 2 0 1 3 4 5

1 2 0 4 5 3 6 7 8

0 7 5 6 4 2 3 1 8

3 1 8 0 7 5 6 4 2

6 4 2 3 1 8 0 7 5

8 5 1 4 0 7 2 6 3

2 6 3 8 5 1 4 0 7

4 0 7 2 6 3 8 5 1

5 2 6 1 8 4 7 3 0

7 3 0 5 2 6 1 8 4

1 8 4 7 3 0 5 2 6

Page 13: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 1: Combing transversals

Theorem: For a ‘block symmetric’ solution the combing method produces a sudoku solution.

Proof: Rows have distinct symbols since transversals do. Columns have distinct symbols since each (new)

column is a permutation of the corresponding original column.

Blocks are rearranged and permuted, so still have distinct symbols in each block.

Page 14: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 1: Combing transversals

Conjecture: Given a block symmetric sudoku solution, there is a choice of transversal for which the combing method produces an orthogonal sudoku mate.

Page 15: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 2: Block Permutations

Let α and β permute the rows and columns of block K, respectively, so that:

Row i of Kα is row i+1 of K (cycle up)

Column j of Kβ is column j+1 of K (cycle left)

K

Kα Kβ

1 2 0

4 5 3

7 8 6

0 1 2

3 4 5

6 7 8

3 4 5

6 7 8

0 1 2

Page 16: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 2: Block Permutations

Theorem (Keedwell, 2007): Solutions

and

are orthogonal sudoku mates. One can extend the pattern to obtain orthogonal sudoku pairs of all square orders.

K Kα Kα2

Kαβ Kα2β Kβ

Kα2β2 Kβ2 Kαβ2

K Kαβ Kα2β2

Kβ Kαβ2 Kα2

Kβ2 Kα Kα2β

Page 17: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 2: Block permutations

Keedwell’s proof: Apply transversal theorem.

0 1 2 4 5 3 8 6 7

3 4 5 7 8 6 2 0 1

6 7 8 1 2 0 5 3 4

1 2 0 5 3 4 6 7 8

4 5 3 8 6 7 0 1 2

7 8 6 2 0 1 3 4 5

2 0 1 3 4 5 7 8 6

5 3 4 6 7 8 1 2 0

8 6 7 0 1 2 4 5 3

0 1 2 3 4 5 6 7 8

3 4 5 6 7 8 0 1 2

6 7 8 0 1 2 3 4 5

4 5 3 7 8 6 1 2 0

7 8 6 1 2 0 4 5 3

1 2 0 4 5 3 7 8 6

8 6 7 2 0 1 5 3 4

2 0 1 5 3 4 8 6 7

5 3 4 8 6 7 2 0 1

Page 18: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 2: Block permutations

Another approach: Identify sudoku

block locations with Zn

2

Each Keedwell solution has an exponent array

Exponent arrays are functions

Zn2 Zn

2

Z32

(0,0) (0,1) (0,2)

(1,0) (1,1) (1,2)

(2,0) (2,1) (2,2)

K Kα Kα2

Kαβ Kα2β Kβ

Kα2β2 Kβ2 Kαβ2

(0,0) (1,0) (2,0)

(1,1) (2,1) (0,1)

(2,2) (0,2) (1,2)

Page 19: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Method 2: Block permutations

Theorems: Two Keedwell sudoku solutions of order n2

are orthogonal if and only if the difference of their exponent arrays determines a bijection Zn

2 Zn2

The maximum size of an orthogonal family of sudoku solutions of order n2 is larger than or equal to p(p-1), where p is the smallest prime factor of n.

Page 20: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

Applications and Connections

An easy proof of Keedwell’s Theorem:

Exponent arrays corresponding to Keedwell’s solutions are F1(i,j)=(i+j,j) and F2(i,j)=(i,i+j). Note (F2-F1)(i,j)=(-j,i) is a bijection Zn

2 Zn2, so the original sudoku

solutions are orthogonal.

Page 21: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Applications and Connections

Construction of 6 MOSu of order 9.

M0 M1 M2

M3 M4 M5K Kα2β Kαβ2

Kαβ Kβ2 Kα2

Kα2β2 Kα Kβ

K Kαβ2 Kα2β

Kα2β K Kαβ2

Kαβ2 Kα2β K

K Kα2 Kα

Kα2β2 Kαβ2 Kβ2

Kαβ Kβ Kα2β

K Kα2β2 Kαβ

Kβ2 Kα2β Kα

Kβ Kα2 Kαβ2

K Kαβ Kα2β2

Kαβ2 Kα2 Kβ

Kα2β Kβ2 Kα

K Kα Kα2

Kβ Kαβ Kα2β

Kβ2 Kαβ2 Kα2β2

Page 22: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Applications and Connections

Observations M1 can be achieved from M0 via combing (method

1); M2 achieved from M0 via another transversal method not discussed here. Can transversal methods be used to obtain other solutions in the collection?

Can also get 6 MOSu of order 9 by looking at the addition table for GF(9). In general, field theory and finite projective spaces can be used to determine results about orthogonality.

Page 23: Sudoku and Orthogonality John Lorch Undergraduate Colloquium Fall 2008

04/20/23 Sudoku and Orthogonality: John Lorch

Collaborators/References

Joint with Lisa Mantini (Oklahoma State)Principal references:

C. Colbourn and J. Dinitz, Mutually orthogonal latin squares, Journal of Statistical Planning and Inference 95 (2001), 9-48.

A. Keedwell, On sudoku squares, Bulletin of the ICA 50 (2007), 52-60.

J. Lorch, Mutually orthogonal families of linear sudoku solutions, preprint. http://www.cs.bsu.edu/homepages/jdlorch/lorchsudoku.pdf