Top Banner
Sudoku: Is it Mathematics? Peter J. Cameron Forder lectures April 2008
78

Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Aug 25, 2018

Download

Documents

hanguyet
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Sudoku: Is it Mathematics?

Peter J. Cameron

Forder lecturesApril 2008

Page 2: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

There’s no mathematics involved. Use logic and reasoningto solve the puzzle.

Instructions in The Independent

Mathematics 6= reasoning and logic???

Page 3: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

There’s no mathematics involved. Use logic and reasoningto solve the puzzle.

Instructions in The Independent

Mathematics 6= reasoning and logic???

Page 4: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Technology transfer

To criticize mathematics for its abstraction is to miss thepoint entirely. Abstraction is what makes mathematicswork. If you concentrate too closely on too limited anapplication of a mathematical idea, you rob themathematician of his most important tools: analogy,generality, and simplicity. Mathematics is the ultimate intechnology transfer.

Ian Stewart, Does God play dice? The mathematics of chaos,Penguin, London, 1990.

Page 5: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler

Page 6: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

The bridges of Konigsberg

Is it possible to walk around the town, crossing each bridgeexactly once?

Euler showed: No!

Page 7: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

The bridges of Konigsberg

Is it possible to walk around the town, crossing each bridgeexactly once?Euler showed: No!

Page 8: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

What is mathematics?

Leonhard Euler, Letter to Carl Ehler, mayor of Danzig, 3 April1736:

Thus you see, most noble Sir, how this type of solution [tothe Konigsberg bridge problem] bears little relationship tomathematics, and I do not understand why you expect amathematician to produce it, rather than anyone else, forthe solution is based on reason alone, and its discovery doesnot depend on any mathematical principle . . .

In the meantime, most noble Sir, you have assigned thisquestion to the geometry of position, but I am ignorant as towhat this new discipline involves, and as to which types ofproblem Leibniz and Wolff expected to see expressed in thisway.

Page 9: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

What is mathematics?

Leonhard Euler, Letter to Carl Ehler, mayor of Danzig, 3 April1736:

Thus you see, most noble Sir, how this type of solution [tothe Konigsberg bridge problem] bears little relationship tomathematics, and I do not understand why you expect amathematician to produce it, rather than anyone else, forthe solution is based on reason alone, and its discovery doesnot depend on any mathematical principle . . .

In the meantime, most noble Sir, you have assigned thisquestion to the geometry of position, but I am ignorant as towhat this new discipline involves, and as to which types ofproblem Leibniz and Wolff expected to see expressed in thisway.

Page 10: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

What is mathematics?

Leonhard Euler, Letter to Carl Ehler, mayor of Danzig, 3 April1736:

Thus you see, most noble Sir, how this type of solution [tothe Konigsberg bridge problem] bears little relationship tomathematics, and I do not understand why you expect amathematician to produce it, rather than anyone else, forthe solution is based on reason alone, and its discovery doesnot depend on any mathematical principle . . .

In the meantime, most noble Sir, you have assigned thisquestion to the geometry of position, but I am ignorant as towhat this new discipline involves, and as to which types ofproblem Leibniz and Wolff expected to see expressed in thisway.

Page 11: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Durer’s Melancholia

16 3 2 135 10 11 89 6 7 124 15 14 1

All rows, columns, and diagonals sum to 34. The date of thepicture is included in the square.

Page 12: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Durer’s Melancholia

16 3 2 135 10 11 89 6 7 124 15 14 1

All rows, columns, and diagonals sum to 34.

The date of thepicture is included in the square.

Page 13: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Durer’s Melancholia

16 3 2 135 10 11 89 6 7 124 15 14 1

All rows, columns, and diagonals sum to 34. The date of thepicture is included in the square.

Page 14: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s construction

Take a Graeco-Latin square of order n.

Replace the symbols by0, 1, . . . , n− 1. Interpret the result as a two-digit number in basen. Add one.

Cβ Aγ Bα

Aα Bβ Cγ

Bγ Cα Aβ

21 02 1000 11 2212 20 01

8 3 41 5 96 7 2

Some rearrangement may be needed to get the diagonal sumscorrect.

So for which n do Graeco-Latin squares exist?

Page 15: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s construction

Take a Graeco-Latin square of order n. Replace the symbols by0, 1, . . . , n− 1.

Interpret the result as a two-digit number in basen. Add one.

Cβ Aγ Bα

Aα Bβ Cγ

Bγ Cα Aβ

21 02 1000 11 2212 20 01

8 3 41 5 96 7 2

Some rearrangement may be needed to get the diagonal sumscorrect.

So for which n do Graeco-Latin squares exist?

Page 16: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s construction

Take a Graeco-Latin square of order n. Replace the symbols by0, 1, . . . , n− 1. Interpret the result as a two-digit number in basen. Add one.

Cβ Aγ Bα

Aα Bβ Cγ

Bγ Cα Aβ

21 02 1000 11 2212 20 01

8 3 41 5 96 7 2

Some rearrangement may be needed to get the diagonal sumscorrect.

So for which n do Graeco-Latin squares exist?

Page 17: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s construction

Take a Graeco-Latin square of order n. Replace the symbols by0, 1, . . . , n− 1. Interpret the result as a two-digit number in basen. Add one.

Cβ Aγ Bα

Aα Bβ Cγ

Bγ Cα Aβ

21 02 1000 11 2212 20 01

8 3 41 5 96 7 2

Some rearrangement may be needed to get the diagonal sumscorrect.

So for which n do Graeco-Latin squares exist?

Page 18: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s construction

Take a Graeco-Latin square of order n. Replace the symbols by0, 1, . . . , n− 1. Interpret the result as a two-digit number in basen. Add one.

Cβ Aγ Bα

Aα Bβ Cγ

Bγ Cα Aβ

21 02 1000 11 2212 20 01

8 3 41 5 96 7 2

Some rearrangement may be needed to get the diagonal sumscorrect.

So for which n do Graeco-Latin squares exist?

Page 19: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s officers

Six different regiments have six officers, each one holding adifferent rank (of six different ranks altogether). Can these36 officers be arranged in a square formation so that eachrow and column contains one officer of each rank and onefrom each regiment?

Trial and error suggests the answer is “No”:

Page 20: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s officers

Six different regiments have six officers, each one holding adifferent rank (of six different ranks altogether). Can these36 officers be arranged in a square formation so that eachrow and column contains one officer of each rank and onefrom each regiment?

Trial and error suggests the answer is “No”:

Page 21: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,
Page 22: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s conjeture

Euler knew how to construct a Graeco-Latin square of everyorder n not congruent to 2 mod 4.

It is trivial that there is no Graeco-Latin square of order 2.

In 1900, Tarry confirmed that there is no Graeco-Latin square oforder 6.

In 1960, Bose, Shrikhande and Parker showed that, apart fromthese two cases, Euler was wrong: Graeco-Latin squares existfor all other orders.

Page 23: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s conjeture

Euler knew how to construct a Graeco-Latin square of everyorder n not congruent to 2 mod 4.

It is trivial that there is no Graeco-Latin square of order 2.

In 1900, Tarry confirmed that there is no Graeco-Latin square oforder 6.

In 1960, Bose, Shrikhande and Parker showed that, apart fromthese two cases, Euler was wrong: Graeco-Latin squares existfor all other orders.

Page 24: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s conjeture

Euler knew how to construct a Graeco-Latin square of everyorder n not congruent to 2 mod 4.

It is trivial that there is no Graeco-Latin square of order 2.

In 1900, Tarry confirmed that there is no Graeco-Latin square oforder 6.

In 1960, Bose, Shrikhande and Parker showed that, apart fromthese two cases, Euler was wrong: Graeco-Latin squares existfor all other orders.

Page 25: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Euler’s conjeture

Euler knew how to construct a Graeco-Latin square of everyorder n not congruent to 2 mod 4.

It is trivial that there is no Graeco-Latin square of order 2.

In 1900, Tarry confirmed that there is no Graeco-Latin square oforder 6.

In 1960, Bose, Shrikhande and Parker showed that, apart fromthese two cases, Euler was wrong: Graeco-Latin squares existfor all other orders.

Page 26: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Latin squares

A Latin square is the type of structure formed by the Latinletters in a Graeco-Latin square: that is, each symbol occursexactly once in each row or column.

There is no question about the existence of Latin squares: thereis a Latin square of any order. But we still don’t know manythings about them, for example, how many there are.

We also don’t know whether there is an efficient way to decideif a given Latin square can be extended to a Graeco-Latinsquare.

Page 27: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Latin squares

A Latin square is the type of structure formed by the Latinletters in a Graeco-Latin square: that is, each symbol occursexactly once in each row or column.

There is no question about the existence of Latin squares: thereis a Latin square of any order. But we still don’t know manythings about them, for example, how many there are.

We also don’t know whether there is an efficient way to decideif a given Latin square can be extended to a Graeco-Latinsquare.

Page 28: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Latin squares

A Latin square is the type of structure formed by the Latinletters in a Graeco-Latin square: that is, each symbol occursexactly once in each row or column.

There is no question about the existence of Latin squares: thereis a Latin square of any order. But we still don’t know manythings about them, for example, how many there are.

We also don’t know whether there is an efficient way to decideif a given Latin square can be extended to a Graeco-Latinsquare.

Page 29: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Latin squares in statistics

Latin squares were introduced into statistics by R. A. Fisher.

They are useful for design of experiments in field trials wherethere may be spatial effects.

Page 30: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Latin squares in statistics

Latin squares were introduced into statistics by R. A. Fisher.

They are useful for design of experiments in field trials wherethere may be spatial effects.

Page 31: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Latin squares in statisticsA Latin square at Rothamsted Experimental Station.

This Latin square was designed by Rosemary Bailey. Thanks toSue Welham for the photograph.

It has the additional property of being complete: each orderedpair of distinct symbols occurs together once in a row and oncein a column.

Page 32: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Latin squares in statisticsA Latin square at Rothamsted Experimental Station.

This Latin square was designed by Rosemary Bailey. Thanks toSue Welham for the photograph.

It has the additional property of being complete: each orderedpair of distinct symbols occurs together once in a row and oncein a column.

Page 33: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Gerechte designs

W. Behrens: What if there is, for example, a boggy patch in themiddle of the field?

3 4 5 1 25 1 2 3 42 3 4 5 14 5 1 2 31 2 3 4 5

This is a gerechte design (a “fair design”).

Page 34: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Gerechte designs

W. Behrens: What if there is, for example, a boggy patch in themiddle of the field?

3 4 5 1 25 1 2 3 42 3 4 5 14 5 1 2 31 2 3 4 5

This is a gerechte design (a “fair design”).

Page 35: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Gerechte designs

W. Behrens: What if there is, for example, a boggy patch in themiddle of the field?

3 4 5 1 25 1 2 3 42 3 4 5 14 5 1 2 31 2 3 4 5

This is a gerechte design (a “fair design”).

Page 36: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Critical sets

John Nelder: A critical set is a partially filled Latin squarewhich can be completed in a unique way to a Latin square, butif any entry is deleted the completion is no longer unique.

1 22

3

Critical sets were designed to study the process of “stepping”between different Latin squares by means of trades.

Page 37: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Critical sets

John Nelder: A critical set is a partially filled Latin squarewhich can be completed in a unique way to a Latin square, butif any entry is deleted the completion is no longer unique.

1 22

3

Critical sets were designed to study the process of “stepping”between different Latin squares by means of trades.

Page 38: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Sudoku

So a Sudoku puzzle is a partial gerechte design for the partitionof a 9× 9 square into nine 3× 3 subsquares, which contains acritical set.

In fact Sudoku was invented by Howard Garns (a retired NewYork architect) in the 1980s, under the name “number place”.

It was popularised in Japan by Maki Kaji, who renamed it SuDoku.

New Zealander Wayne Gould popularised it in the West. Therest is history. . .

Page 39: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Sudoku

So a Sudoku puzzle is a partial gerechte design for the partitionof a 9× 9 square into nine 3× 3 subsquares, which contains acritical set.

In fact Sudoku was invented by Howard Garns (a retired NewYork architect) in the 1980s, under the name “number place”.

It was popularised in Japan by Maki Kaji, who renamed it SuDoku.

New Zealander Wayne Gould popularised it in the West. Therest is history. . .

Page 40: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Sudoku

So a Sudoku puzzle is a partial gerechte design for the partitionof a 9× 9 square into nine 3× 3 subsquares, which contains acritical set.

In fact Sudoku was invented by Howard Garns (a retired NewYork architect) in the 1980s, under the name “number place”.

It was popularised in Japan by Maki Kaji, who renamed it SuDoku.

New Zealander Wayne Gould popularised it in the West. Therest is history. . .

Page 41: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Sudoku

So a Sudoku puzzle is a partial gerechte design for the partitionof a 9× 9 square into nine 3× 3 subsquares, which contains acritical set.

In fact Sudoku was invented by Howard Garns (a retired NewYork architect) in the 1980s, under the name “number place”.

It was popularised in Japan by Maki Kaji, who renamed it SuDoku.

New Zealander Wayne Gould popularised it in the West. Therest is history. . .

Page 42: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

How many Sudoku solutions?

Felgenhauer and Jarvis, showed, by a massive computation,that the number of different Sudoku solutions (filled Sudokugrids) is

6 670 903 752 021 072 936 960.

This figure has been independently verified.

Page 43: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

How many Sudoku solutions?

Felgenhauer and Jarvis, showed, by a massive computation,that the number of different Sudoku solutions (filled Sudokugrids) is

6 670 903 752 021 072 936 960.

This figure has been independently verified.

Page 44: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

How many Sudoku solutions?

Felgenhauer and Jarvis, showed, by a massive computation,that the number of different Sudoku solutions (filled Sudokugrids) is

6 670 903 752 021 072 936 960.

This figure has been independently verified.

Page 45: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

How many Sudoku solutions?

We count Sudoku solutions up toI Permuting the numbers 1, . . . , 9;I Permuting rows and columns preserving the partitions

into 3 sets of 3;I Possibly transposing the grid.

The number of different solutions of ordinary Sudoku (withthese rules) is 5 472 730 538.This was computed by Jarvis and Russell using theOrbit-counting Lemma applied to the groupS9 × ((S3 wr S3) wr S2) of order 9! · 68 · 2 acting on the set ofsolutions counted by Felgenhauer and Jervis.

Page 46: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

How many Sudoku solutions?

We count Sudoku solutions up toI Permuting the numbers 1, . . . , 9;I Permuting rows and columns preserving the partitions

into 3 sets of 3;I Possibly transposing the grid.

The number of different solutions of ordinary Sudoku (withthese rules) is 5 472 730 538.

This was computed by Jarvis and Russell using theOrbit-counting Lemma applied to the groupS9 × ((S3 wr S3) wr S2) of order 9! · 68 · 2 acting on the set ofsolutions counted by Felgenhauer and Jervis.

Page 47: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

How many Sudoku solutions?

We count Sudoku solutions up toI Permuting the numbers 1, . . . , 9;I Permuting rows and columns preserving the partitions

into 3 sets of 3;I Possibly transposing the grid.

The number of different solutions of ordinary Sudoku (withthese rules) is 5 472 730 538.This was computed by Jarvis and Russell using theOrbit-counting Lemma applied to the groupS9 × ((S3 wr S3) wr S2) of order 9! · 68 · 2 acting on the set ofsolutions counted by Felgenhauer and Jervis.

Page 48: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Symmetric Sudoku

This was invented by Robert Connelly and independently byVaughan Jones. It s connected to some very interesting andimportant mathematical topics.

Each number from 1 to 9 should occur once in each set of thefollowing types:

I rows;I columns;I 3× 3 subsquares;I broken rows (one of these consists of three “short rows” in

the same position in the three subsquares in a largecolumn);

I broken columns (similarly defined);I locations (a location consists of the nine cells in a given

position, e.g. middle of bottom row, in each of the ninesubsquares).

Page 49: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Symmetric Sudoku

This was invented by Robert Connelly and independently byVaughan Jones. It s connected to some very interesting andimportant mathematical topics.

Each number from 1 to 9 should occur once in each set of thefollowing types:

I rows;I columns;I 3× 3 subsquares;I broken rows (one of these consists of three “short rows” in

the same position in the three subsquares in a largecolumn);

I broken columns (similarly defined);I locations (a location consists of the nine cells in a given

position, e.g. middle of bottom row, in each of the ninesubsquares).

Page 50: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Example

3 5 9 2 4 8 1 6 74 8 1 6 7 3 5 9 27 2 6 9 1 5 8 3 48 1 4 7 3 6 9 2 52 6 7 1 5 9 3 4 85 9 3 4 8 2 6 7 16 7 2 5 9 1 4 8 39 3 5 8 2 4 7 1 61 4 8 3 6 7 2 5 9

Rows Columns SubsquaresBroken rows Broken columns Locations

Page 51: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Example

3 5 9 2 4 8 1 6 74 8 1 6 7 3 5 9 27 2 6 9 1 5 8 3 48 1 4 7 3 6 9 2 52 6 7 1 5 9 3 4 85 9 3 4 8 2 6 7 16 7 2 5 9 1 4 8 39 3 5 8 2 4 7 1 61 4 8 3 6 7 2 5 9

Rows

Columns SubsquaresBroken rows Broken columns Locations

Page 52: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Example

3 5 9 2 4 8 1 6 74 8 1 6 7 3 5 9 27 2 6 9 1 5 8 3 48 1 4 7 3 6 9 2 52 6 7 1 5 9 3 4 85 9 3 4 8 2 6 7 16 7 2 5 9 1 4 8 39 3 5 8 2 4 7 1 61 4 8 3 6 7 2 5 9

Rows

Columns

SubsquaresBroken rows Broken columns Locations

Page 53: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Example

3 5 9 2 4 8 1 6 74 8 1 6 7 3 5 9 27 2 6 9 1 5 8 3 48 1 4 7 3 6 9 2 52 6 7 1 5 9 3 4 85 9 3 4 8 2 6 7 16 7 2 5 9 1 4 8 39 3 5 8 2 4 7 1 61 4 8 3 6 7 2 5 9

Rows Columns

Subsquares

Broken rows Broken columns Locations

Page 54: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Example

3 5 9 2 4 8 1 6 74 8 1 6 7 3 5 9 27 2 6 9 1 5 8 3 48 1 4 7 3 6 9 2 52 6 7 1 5 9 3 4 85 9 3 4 8 2 6 7 16 7 2 5 9 1 4 8 39 3 5 8 2 4 7 1 61 4 8 3 6 7 2 5 9

Rows Columns Subsquares

Broken rows

Broken columns Locations

Page 55: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Example

3 5 9 2 4 8 1 6 74 8 1 6 7 3 5 9 27 2 6 9 1 5 8 3 48 1 4 7 3 6 9 2 52 6 7 1 5 9 3 4 85 9 3 4 8 2 6 7 16 7 2 5 9 1 4 8 39 3 5 8 2 4 7 1 61 4 8 3 6 7 2 5 9

Rows Columns SubsquaresBroken rows

Broken columns

Locations

Page 56: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Example

3 5 9 2 4 8 1 6 74 8 1 6 7 3 5 9 27 2 6 9 1 5 8 3 48 1 4 7 3 6 9 2 52 6 7 1 5 9 3 4 85 9 3 4 8 2 6 7 16 7 2 5 9 1 4 8 39 3 5 8 2 4 7 1 61 4 8 3 6 7 2 5 9

Rows Columns SubsquaresBroken rows Broken columns

Locations

Page 57: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Affine geometry

We coordinatise the cells of the grid with F4, where F is theintegers mod 3, as follows:

I the first coordinate labels large rows;I the second coordinate labels small rows within large rows;I the third coordinate labels large columns;I the fourth coordinate labels small columns within large

columns.

Now the relevant regions are cosets of the following subspaces:

Rows x1 = x2 = 0 Columns x3 = x4 = 0Subsquares x1 = x3 = 0 Broken rows x2 = x3 = 0Broken columns x1 = x4 = 0 Locations x2 = x4 = 0

Page 58: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Affine geometry

We coordinatise the cells of the grid with F4, where F is theintegers mod 3, as follows:

I the first coordinate labels large rows;I the second coordinate labels small rows within large rows;I the third coordinate labels large columns;I the fourth coordinate labels small columns within large

columns.Now the relevant regions are cosets of the following subspaces:

Rows x1 = x2 = 0 Columns x3 = x4 = 0Subsquares x1 = x3 = 0 Broken rows x2 = x3 = 0Broken columns x1 = x4 = 0 Locations x2 = x4 = 0

Page 59: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Affine spaces and SET

The card game SET has 81 cards, each of which has fourattributes taking three possible values (number of symbols,shape, colour, and shading). A winning combination is a set ofthree cards on which either the attributes are all the same, orthey are all different.

Each card has four coordinates taken from F (the integersmod 3), so the set of cards is identified with the 4-dimensionalaffine space. Then the winning combinations are precisely theaffine lines!

Page 60: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Affine spaces and SET

The card game SET has 81 cards, each of which has fourattributes taking three possible values (number of symbols,shape, colour, and shading). A winning combination is a set ofthree cards on which either the attributes are all the same, orthey are all different.

Each card has four coordinates taken from F (the integersmod 3), so the set of cards is identified with the 4-dimensionalaffine space. Then the winning combinations are precisely theaffine lines!

Page 61: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Affine spaces and SET

The card game SET has 81 cards, each of which has fourattributes taking three possible values (number of symbols,shape, colour, and shading). A winning combination is a set ofthree cards on which either the attributes are all the same, orthey are all different.

Each card has four coordinates taken from F (the integersmod 3), so the set of cards is identified with the 4-dimensionalaffine space. Then the winning combinations are precisely theaffine lines!

Page 62: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Coding theory

Coding theory was invented in the 1950s by Shannon,Hamming and Golay to solve the problem of transmittinginformation accurately through a “noisy” channel, in whichsome symbols are randomly changed during transmission.

We transmit “words”, which are strings of symbols taken froma fixed alphabet (in practice the binary alphabet {0, 1}, thoughany alphabet could be used). The strategy is that, instead oftransmitting all possible strings, we restrict our messages tothose belonging to a suitable “code”. Codewords should havethe property that any two of them are so different that, even ifwe garble one a bit, it still resembles the original more closelythan it resembles any other.

Page 63: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Coding theory

Coding theory was invented in the 1950s by Shannon,Hamming and Golay to solve the problem of transmittinginformation accurately through a “noisy” channel, in whichsome symbols are randomly changed during transmission.

We transmit “words”, which are strings of symbols taken froma fixed alphabet (in practice the binary alphabet {0, 1}, thoughany alphabet could be used). The strategy is that, instead oftransmitting all possible strings, we restrict our messages tothose belonging to a suitable “code”. Codewords should havethe property that any two of them are so different that, even ifwe garble one a bit, it still resembles the original more closelythan it resembles any other.

Page 64: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

An example

Alphabet {0, 1, 2}.

C =

0000 1012 20210111 1120 21020222 1201 2210

.

Any two codewords have distance 3.

For example, to change 1012 into 0111 we have to change thefirst, second, and fourth symbols.

So the code will correct a single error.

For example, the word 1221 is one step away from 1201 but atleast two steps from any other codeword.

Page 65: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

An example

Alphabet {0, 1, 2}.

C =

0000 1012 20210111 1120 21020222 1201 2210

.

Any two codewords have distance 3.

For example, to change 1012 into 0111 we have to change thefirst, second, and fourth symbols.

So the code will correct a single error.

For example, the word 1221 is one step away from 1201 but atleast two steps from any other codeword.

Page 66: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

An example

Alphabet {0, 1, 2}.

C =

0000 1012 20210111 1120 21020222 1201 2210

.

Any two codewords have distance 3.

For example, to change 1012 into 0111 we have to change thefirst, second, and fourth symbols.

So the code will correct a single error.

For example, the word 1221 is one step away from 1201 but atleast two steps from any other codeword.

Page 67: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

An example

Alphabet {0, 1, 2}.

C =

0000 1012 20210111 1120 21020222 1201 2210

.

Any two codewords have distance 3.

For example, to change 1012 into 0111 we have to change thefirst, second, and fourth symbols.

So the code will correct a single error.

For example, the word 1221 is one step away from 1201 but atleast two steps from any other codeword.

Page 68: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

An example

Alphabet {0, 1, 2}.

C =

0000 1012 20210111 1120 21020222 1201 2210

.

Any two codewords have distance 3.

For example, to change 1012 into 0111 we have to change thefirst, second, and fourth symbols.

So the code will correct a single error.

For example, the word 1221 is one step away from 1201 but atleast two steps from any other codeword.

Page 69: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

An example

Alphabet {0, 1, 2}.

C =

0000 1012 20210111 1120 21020222 1201 2210

.

Any two codewords have distance 3.

For example, to change 1012 into 0111 we have to change thefirst, second, and fourth symbols.

So the code will correct a single error.

For example, the word 1221 is one step away from 1201 but atleast two steps from any other codeword.

Page 70: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Perfect codes

A code is a set C of “words” or n-tuples over a fixed alphabet F.The Hamming distance between two words v, w is the numberof coordinates where they differ; that is, the number of errorsneeded to change the transmitted word v into the receivedword w.

A code C is e-error-correcting if there is at most one word atdistance e or less from any codeword. [Equivalently, any twocodewords have distance at least 2e + 1.] We say that C isperfect e-error-correcting if “at most” is replaced here by“exactly”.

The example on the last slide is a perfect code.

Page 71: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Perfect codes

A code is a set C of “words” or n-tuples over a fixed alphabet F.The Hamming distance between two words v, w is the numberof coordinates where they differ; that is, the number of errorsneeded to change the transmitted word v into the receivedword w.

A code C is e-error-correcting if there is at most one word atdistance e or less from any codeword. [Equivalently, any twocodewords have distance at least 2e + 1.] We say that C isperfect e-error-correcting if “at most” is replaced here by“exactly”.

The example on the last slide is a perfect code.

Page 72: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Perfect codes

A code is a set C of “words” or n-tuples over a fixed alphabet F.The Hamming distance between two words v, w is the numberof coordinates where they differ; that is, the number of errorsneeded to change the transmitted word v into the receivedword w.

A code C is e-error-correcting if there is at most one word atdistance e or less from any codeword. [Equivalently, any twocodewords have distance at least 2e + 1.] We say that C isperfect e-error-correcting if “at most” is replaced here by“exactly”.

The example on the last slide is a perfect code.

Page 73: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Perfect codes and symmetric Sudoku

I The positions of any symbol in a symmetric Sudokusolution form a perfect code.

I So the entire solution is a partition of the affine space intonine perfect codes.

I Using the SET test, a perfect code is an affine subspace.I So there are only two different symmetric Sudoku

solutions.

No one would doubt that this really is mathematics!

Page 74: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Perfect codes and symmetric Sudoku

I The positions of any symbol in a symmetric Sudokusolution form a perfect code.

I So the entire solution is a partition of the affine space intonine perfect codes.

I Using the SET test, a perfect code is an affine subspace.I So there are only two different symmetric Sudoku

solutions.

No one would doubt that this really is mathematics!

Page 75: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Perfect codes and symmetric Sudoku

I The positions of any symbol in a symmetric Sudokusolution form a perfect code.

I So the entire solution is a partition of the affine space intonine perfect codes.

I Using the SET test, a perfect code is an affine subspace.

I So there are only two different symmetric Sudokusolutions.

No one would doubt that this really is mathematics!

Page 76: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Perfect codes and symmetric Sudoku

I The positions of any symbol in a symmetric Sudokusolution form a perfect code.

I So the entire solution is a partition of the affine space intonine perfect codes.

I Using the SET test, a perfect code is an affine subspace.I So there are only two different symmetric Sudoku

solutions.

No one would doubt that this really is mathematics!

Page 77: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

Perfect codes and symmetric Sudoku

I The positions of any symbol in a symmetric Sudokusolution form a perfect code.

I So the entire solution is a partition of the affine space intonine perfect codes.

I Using the SET test, a perfect code is an affine subspace.I So there are only two different symmetric Sudoku

solutions.

No one would doubt that this really is mathematics!

Page 78: Sudoku: Is it Mathematics? - QMUL Mathspjc/travel/forder/sudoku2.pdf · Sudoku: Is it Mathematics? Peter J. Cameron ... Ian Stewart, Does God play dice? The mathematics of chaos,

The two symmetric Sudoku solutions

@@@@@@

���������������

@@

@@

@@

�����

�����

�����

@@@@@@

���������������

@@

@@

@@

�����

�����

�����

@@@@@@

���������������

@@

@@

@@

�����

�����

�����

@@@@@@

���������������

@@

@@

@@

�����

�����

�����

@@ @@ @@�����

�����

�����

@@@@@@��

���

��

���

��

���

@@@@@@

���������������

@@

@@

@@

�����

�����

�����