Table Of ContentPermutation Puzzles: A Mathematical Perspective
15Puzzle,OvalTrack,Rubik’sCubeandOtherMathematicalToys
Lecture Notes
Jamie Mulholland
Department of Mathematics
Simon Fraser University
(cid:13)c DraftdateJune30,2016
Contents
Contents i
Preface vii
GreekAlphabet ix
1 PermutationPuzzles 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 ACollectionofPuzzles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 WhichbringsustotheDefinitionofaPermutationPuzzle . . . . . . . . . . . . . . . . . . . . 10
1.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2 ABitofSetTheory 15
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 SetsandSubsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3 LawsofSetTheory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.4 ExamplesUsingSageMath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3 Permutations 21
3.1 Permutation: PreliminaryDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Permutation: MathematicalDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.3 ComposingPermutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.4 AssociativityofPermutationComposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.5 InversesofPermutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.6 TheSymmetricGroupS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
n
3.7 RulesforExponents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.8 OrderofaPermutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
i
ii CONTENTS
4 Permutations: CycleNotation 39
4.1 Permutations: CycleNotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.2 ProductsofPermutations: Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.3 PropertiesofCycleForm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.4 OrderofaPermutation: Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.5 InverseofaPermutation: Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.6 SummaryofPermutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.7 WorkingwithPermutationsinSageMath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5 FromPuzzlesToPermutations 51
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.2 Swap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.3 15-Puzzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.4 OvalTrackPuzzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.5 HungarianRings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.6 Rubik’sCube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6 Permutations: Productsof2-Cycles 67
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.2 Productof2-Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
6.3 SolvabilityofSwap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
7 Permutations: TheParityTheorem 71
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
7.2 VariationofSwap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
7.3 ProofoftheParityTheorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
7.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
8 Permutations: A and3-Cycles 83
n
8.1 SwapVariation: AChallenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
8.2 TheAlternatingGroupA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
n
8.3 Productsof3-cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
8.4 VariationsofSwap: Revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
8.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
CONTENTS iii
9 The15-Puzzle 91
9.1 SolvabilityCriteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
9.2 ProofofSolvabilityCriteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
9.3 StrategyforSolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
9.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
10 Groups 103
10.1 Group: Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
10.2 SomeEverydayExamplesofGroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
10.3 FurtherExamplesofGroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
10.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
11 Subgroups 125
11.1 Subgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
11.2 ExamplesofSubgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
11.3 TheCenterofaGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
11.4 Lagrange’sTheorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
11.5 CyclicGroupsRevisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
11.6 Cayley’sTheorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
11.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
12 PuzzleGroups 135
12.1 PuzzleGroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
12.2 Rubik’sCube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
12.3 HungarianRings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
12.4 15-Puzzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
12.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
13 Commutators 147
13.1 Commutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
13.2 CreatingPuzzlemoveswithCommutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
13.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
14 Conjugates 161
14.1 Conjugates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
14.2 ModifyingPuzzlemoveswithConjugates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
14.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
15 TheOvalTrackPuzzle 173
iv CONTENTS
15.1 OvalTrackwithT =(14)(23) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
15.2 VariationsoftheOvalTrackT move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
15.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
16 TheHungarianRingsPuzzle 189
16.1 HungarianRings-Numberedversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
16.2 BuildingSmallCycles: ToolsforOurEnd-GameToolbox . . . . . . . . . . . . . . . . . . . . . 191
16.3 Solvingtheend-game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
16.4 HungarianRings-Colouredversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
16.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
17 Partitions&EquivalenceRelations 199
17.1 PartitionsofaSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
17.2 Relations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
17.3 EquivalenceRelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
17.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
18 Cosets&Lagrange’sTheorem 209
18.1 Cosets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
18.2 Lagrange’sTheorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
18.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
19 Rubik’sCube: Beginnings 217
19.1 Rubik’sCubeterminologyandnotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
19.2 ImpossibleMoves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
19.3 ACatalogofBasicMoveSequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
19.4 StrategyforSolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
19.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
20 Rubik’sCube: TheFundamentalTheoremofCubology 231
20.1 Rubik’sCube-AModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
20.2 TheFundamentalTheoremofCubology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
20.3 Whenaretwoassembledcubesequivalent? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
20.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
21 Rubik’sCube: SubgroupsoftheCubeGroup 245
21.1 BuildingBigGroupsfromSmallerOnes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
21.2 SomeSubgroupsofRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
3
21.3 StructureoftheCubeGroupRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
3
CONTENTS v
21.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
22 Symmetry&CountingI:TheOrbit-StabilizerTheorem 253
22.1 Orbits&Stabilizers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
22.2 PermutationsActingonSets: ApplicationoftheOrbit-StabilizerTheorem . . . . . . . . . . . 257
22.3 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
23 Symmetry&CountingII:Burnside’sTheorem 265
23.1 AMotivatingExample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
23.2 Burnside’sTheorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
23.3 ApplicationsofBurnside’sTheorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
23.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
24 LightsOut 275
24.1 LightsOut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
24.2 LightsOut: AMatrixModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
24.3 Summaryof5×5lightsoutpuzzle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
24.4 EigenvaluesandEigenvectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
24.5 Othersizedgameboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
24.6 Light-ChasingStrategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
24.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
A SageMath 291
A.1 SageMathBasics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
A.2 VariablesandStatements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
A.3 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
A.4 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
A.5 Commands/Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
A.6 if,while,andforstatements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
A.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
B BasicPropertiesofIntegers 303
B.1 DivisibilityandtheEuclideanAlgorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
B.2 PrimeNumbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
B.3 Euler’sφ-function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
B.4 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Bibliography 309
vi CONTENTS
Index 310
Preface
ThesearethenotesforthecourseMath302-MathematicsofPermutationsPuzzles. Theaimofthecourse
istoprovideanintroductiontogrouptheoryforstudentsinthemathematicsminorprogram. Grouptheory
isaverypowerfulbranchofmathematics,butisoftendifficultforonetoenterintoduetoitsveryabstract
nature. PuzzleslikeRubik’scubecanprovideconcretemodelsforsomeoftheseabstractions.
Theheaderofeachpagecontainsanimage whichtakesyourightbacktothetableofcontents.
Anumberofonlineresourcesareavailableonthewebsiteaccompanyingthesenotes[10]:
http://www.sfu.ca/jtmulhol/math302/
Noprojectsuchasthiscanbefreefromerrorsandincompleteness. Iwillbegratefultoeveryonewhopoints
outanytypos,incorrectstatements,orsendsanyothersuggestiononhowtoimprovethismanuscript.
JamieMulholland
SimonFraserUniversity
j mulholland@sfu.ca
June30,2016
vii
viii
Greek Alphabet
lower capital name pronunciation lower capital name pronunciation
case case
α A alpha (al-fah) ν N nu (new)
β B beta (bay-tah) ξ Ξ xi (zie)
γ Γ gamma (gam-ah) o O omicron (om-e-cron)
δ ∆ delta (del-ta) π Π pi (pie)
ε E epsilon (ep-si-lon) ρ P rho (roe)
ζ Z zeta (zay-tah) σ Σ sigma (sig-mah)
η H eta (ay-tah) τ T tau (taw)
θ Θ theta (thay-tah) υ Υ upsilon (up-si-lon)
ι I iota (eye-o-tah) φ Φ phi (fie)
κ K kappa (cap-pah) χ X chi (kie)
λ Λ lambda (lamb-dah) ψ Ψ psi (si)
µ M mu (mew) ω Ω omega (oh-may-gah)
ix