Permutation Puzzles A Mathematical Perspective Jamie Mulholland Copyright(cid:13)c 2021JamieMulholland SELF PUBLISHED http://www.sfu.ca/~jtmulhol/permutationpuzzles LicensedundertheCreativeCommonsAttribution-NonCommercial-ShareAlike4.0License(the “License”). YoumaynotusethisdocumentexceptincompliancewiththeLicense. Youmayobtain a copy of the License at http://creativecommons.org/licenses/by-nc-sa/4.0/. Unless requiredbyapplicablelaworagreedtoinwriting,softwaredistributedundertheLicenseisdis- tributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressorimplied. SeetheLicenseforthespecificlanguagegoverningpermissionsandlimitations undertheLicense. Firstprinting,May2011 Contents I Part One: Foundations 1 Permutation Puzzles ........................................... 11 1.1 Introduction 11 1.2 ACollectionofPuzzles 12 1.3 WhichbringsustotheDefinitionofaPermutationPuzzle 22 1.4 Exercises 22 2 A Bit of Set Theory ............................................ 25 2.1 Introduction 25 2.2 SetsandSubsets 25 2.3 LawsofSetTheory 26 2.4 ExamplesUsingSageMath 28 2.5 Exercises 30 II Part Two: Permutations 3 Permutations ................................................. 33 3.1 Permutation: PreliminaryDefinition 33 3.2 Permutation: MathematicalDefinition 35 3.3 ComposingPermutations 38 3.4 AssociativityofPermutationComposition 41 3.5 InversesofPermutations 42 3.6 TheSymmetricGroupS 45 n 3.7 RulesforExponents 46 3.8 OrderofaPermutation 47 3.9 Exercises 48 4 Permutations: Cycle Notation ................................. 51 4.1 Permutations: CycleNotation 51 4.2 ProductsofPermutations: Revisited 54 4.3 PropertiesofCycleForm 55 4.4 OrderofaPermutation: Revisited 55 4.5 InverseofaPermutation: Revisited 57 4.6 SummaryofPermutations 58 4.7 WorkingwithPermutationsinSageMath 59 4.8 Exercises 59 5 From Puzzles To Permutations .................................. 63 5.1 Introduction 63 5.2 Swap 64 5.3 15-Puzzle 66 5.4 OvalTrackPuzzle 67 5.5 HungarianRings 70 5.6 Rubik’sCube 71 5.7 Exercises 74 6 Permutations: Products of 2-Cycles ............................ 79 6.1 Introduction 79 6.2 Productof2-Cycles 80 6.3 SolvabilityofSwap 81 6.4 Exercises 82 7 Permutations: The Parity Theorem .............................. 83 7.1 Introduction 83 7.2 VariationofSwap 85 7.3 ProofoftheParityTheorem 86 7.4 Exercises 91 8 Permutations: A and 3-Cycles ................................ 95 n 8.1 SwapVariation: AChallenge 95 8.2 TheAlternatingGroupA 95 n 8.3 Productsof3-cycles 97 8.4 VariationsofSwap: Revisited 99 8.5 Exercises 100 9 The 15-Puzzle ................................................ 103 9.1 SolvabilityCriteria 103 9.2 ProofofSolvabilityCriteria 105 9.3 StrategyforSolution 108 9.4 Exercises 109 III Part Three: Group Theory 10 Groups ...................................................... 117 10.1 Group: Definition 117 10.2 SomeEverydayExamplesofGroups 120 10.3 FurtherExamplesofGroups 122 10.4 Exercises 134 11 Subgroups .................................................. 139 11.1 Subgroups 139 11.2 ExamplesofSubgroups 140 11.3 TheCenterofaGroup 141 11.4 Lagrange’sTheorem 142 11.5 CyclicGroupsRevisited 143 11.6 Cayley’sTheorem 145 11.7 Exercises 146 12 Puzzle Groups ............................................... 149 12.1 PuzzleGroups 149 12.2 Rubik’sCube 150 12.3 HungarianRings 157 12.4 15-Puzzle 158 12.5 Exercises 158 13 Commutators ............................................... 161 13.1 Commutators 161 13.2 CreatingPuzzlemoveswithCommutators 162 13.3 Exercises 170 14 Conjugates ................................................. 175 14.1 Conjugates 175 14.2 ModifyingPuzzlemoveswithConjugates 177 14.3 Exercises 183 15 The Oval Track Puzzle ........................................ 187 15.1 OvalTrackwithT =(14)(23) 187 15.2 VariationsoftheOvalTrackT move 198 15.3 Exercises 199 16 The Hungarian Rings Puzzle .................................. 203 16.1 HungarianRings-Numberedversion 203 16.2 BuildingSmallCycles: ToolsforOurEnd-GameToolbox 205 16.3 Solvingtheend-game 210 16.4 HungarianRings-Colouredversion 210 16.5 Exercises 210 17 Partitions & Equivalence Relations ............................ 211 17.1 PartitionsofaSet 211 17.2 Relations 212 17.3 EquivalenceRelation 213 17.4 Exercises 217 18 Cosets & Lagrange’s Theorem ................................ 221 18.1 Cosets 221 18.2 Lagrange’sTheorem 224 18.3 Exercises 226 IV Part Four: Rubiks’ Cube 19 Rubik’s Cube: Beginnings .................................... 231 19.1 Rubik’sCubeterminologyandnotation 231 19.2 ImpossibleMoves 235 19.3 ACatalogofBasicMoveSequences 236 19.4 StrategyforSolution 237 19.5 Exercises 241 20 Rubik’s Cube: The Fundamental Theorem ..................... 243 20.1 Rubik’sCube-AModel 243 20.2 TheFundamentalTheoremofCubology 247 20.3 Whenaretwoassembledcubesequivalent? 249 20.4 Exercises 252 21 Rubik’s Cube: Subgroups of the Cube Group .................. 257 21.1 BuildingBigGroupsfromSmallerOnes 257 21.2 SomeSubgroupsofRC 258 3 21.3 StructureoftheCubeGroupRC 260 3 21.4 Exercises 262 V Part Five: Symmetry & Counting 22 The Orbit-Stabilizer Theorem .................................. 265 22.1 Orbits&Stabilizers 265 22.2 PermutationsActingonSets: ApplicationoftheOrbit-StabilizerTheorem 269 22.3 Exercises 276 23 Burnside’s Theorem .......................................... 279 23.1 AMotivatingExample 279 23.2 Burnside’sTheorem 281 23.3 ApplicationsofBurnside’sTheorem 282 23.4 Exercises 288 VI Part Six: Light’s Out 24 Lights Out ................................................... 293 24.1 LightsOut 293 24.2 LightsOut: AMatrixModel 294 24.3 Summaryof5×5lightsoutpuzzle 303 24.4 EigenvaluesandEigenvectors 305 24.5 Othersizedgameboards 305 24.6 Light-ChasingStrategy 306 24.7 Exercises 307 VII Appendix A SageMath ................................................... 311 A.1 SageMathBasics 311 A.2 VariablesandStatements 314 A.3 Lists 315 A.4 Sets 317 A.5 Commands/Functions 318 A.6 if,while,andfor statements 319 A.7 Exercises 322 B Basic Properties of Integers ................................... 323 B.1 DivisibilityandtheEuclideanAlgorithm 323 B.2 PrimeNumbers 326 B.3 Euler’sφ-function 327 B.4 ModularArithmetic 328 B.5 Exercises 329 Bibliography ................................................ 333 Articles 333 Books 333 WebSites 334 Index ....................................................... 335 I Part One: Foundations 1 Permutation Puzzles .................. 11 1.1 Introduction 1.2 ACollectionofPuzzles 1.3 WhichbringsustotheDefinitionofaPermutation Puzzle 1.4 Exercises 2 A Bit of Set Theory ................... 25 2.1 Introduction 2.2 SetsandSubsets 2.3 LawsofSetTheory 2.4 ExamplesUsingSageMath 2.5 Exercises