Mathematics of the Rubik's Cube
Total Page:16
File Type:pdf, Size:1020Kb
Mathematics of the Rubik’s cube Associate Professor W. D. Joyner Spring Semester, 1996-7 2 Abstract These notes cover enough group theory and graph theory to under- stand the mathematical description of the Rubik’s cube and several other related puzzles. They follow a course taught at the USNA during the Fall and Spring 1996-7 semesters. ”By and large it is uniformly true that in mathematics that there is a time lapse between a mathematical discovery and the moment it becomes useful; and that this lapse can be anything from 30 to 100 years, in some cases even more; and that the whole system seems to function without any direction, without any reference to usefulness, and without any desire to do things which are useful.” John von Neumann COLLECTED WORKS, VI, p489 For more mathematical quotes, see the first page of each chapter below, [M], [S] or the www page at http://math.furman.edu/~mwoodard/mquot.html 3 ”There are some things which cannot be learned quickly, and time, which is all we have, must be paid heavily for their acquir- ing. They are the very simplest things, and because it takes a man’s life to know them the little that each man gets from life is costly and the only heritage he has to leave.” Ernest Hemingway 4 Contents 0 Introduction 11 1 Logic and sets 13 1.1 Logic :::::::::::::::::::::::::::::::: 13 1.1.1 Expressing an everyday sentence symbolically ::::: 16 1.2 Sets :::::::::::::::::::::::::::::::: 17 2 Functions, matrices, relations and counting 19 2.1 Functions ::::::::::::::::::::::::::::: 19 2.2 Functions on vectors ::::::::::::::::::::::: 24 2.2.1 History ::::::::::::::::::::::::::: 24 2.2.2 3 £ 3 matrices ::::::::::::::::::::::: 26 2.2.3 Matrix multiplication, inverses :::::::::::::: 26 2.2.4 Muliplication and inverses :::::::::::::::: 27 2.3 Relations :::::::::::::::::::::::::::::: 27 2.4 Counting :::::::::::::::::::::::::::::: 31 3 Permutations 33 3.1 Inverses :::::::::::::::::::::::::::::: 36 3.2 Cycle notation ::::::::::::::::::::::::::: 41 3.3 An algorithm to list all the permutations :::::::::::: 46 4 Permutation Puzzles 51 4.1 15 puzzle :::::::::::::::::::::::::::::: 52 4.2 Devil’s circles (or Hungarian rings) ::::::::::::::: 55 4.3 Equator puzzle :::::::::::::::::::::::::: 57 4.4 Rainbow Masterball :::::::::::::::::::::::: 60 4.5 2 £ 2 Rubik’s cube :::::::::::::::::::::::: 65 5 6 CONTENTS 4.6 3 £ 3 Rubik’s cube :::::::::::::::::::::::: 69 4.6.1 The superflip game :::::::::::::::::::: 70 4.7 4 £ 4 Rubik’s cube :::::::::::::::::::::::: 71 4.8 Skewb ::::::::::::::::::::::::::::::: 74 4.9 n £ n Rubik’s cube :::::::::::::::::::::::: 77 4.10 Pyraminx ::::::::::::::::::::::::::::: 77 4.11 Megaminx ::::::::::::::::::::::::::::: 81 4.12 Other permutation puzzles :::::::::::::::::::: 86 5 Groups, I 89 5.1 The symmetric group ::::::::::::::::::::::: 90 5.2 General definitions :::::::::::::::::::::::: 91 5.2.1 The Gordon game ::::::::::::::::::::: 96 5.3 Subgroups ::::::::::::::::::::::::::::: 98 5.4 Example: The dihedral group :::::::::::::::::: 100 5.5 Example: The two squares group :::::::::::::::: 101 5.6 Commutators ::::::::::::::::::::::::::: 104 5.7 Conjugation :::::::::::::::::::::::::::: 106 5.8 Orbits and actions :::::::::::::::::::::::: 108 5.9 Cosets ::::::::::::::::::::::::::::::: 112 5.10 Dimino’s Algorithm :::::::::::::::::::::::: 114 5.11 Permutations and campanology ::::::::::::::::: 116 6 Graphs and ”God’s algorithm” 123 6.1 Cayley graphs ::::::::::::::::::::::::::: 125 6.2 God’s algorithm :::::::::::::::::::::::::: 128 6.2.1 History ::::::::::::::::::::::::::: 129 6.3 The graph of the 15 puzzle :::::::::::::::::::: 130 6.3.1 General definitions :::::::::::::::::::: 132 6.4 Remarks on applications, NP-completeness ::::::::::: 138 7 Symmetry groups of the Platonic solids 139 7.1 Descriptions :::::::::::::::::::::::::::: 139 7.2 Background on symmetries in 3-space :::::::::::::: 141 7.3 Symmetries of the tetrahedron :::::::::::::::::: 144 7.4 Symmetries of the cube :::::::::::::::::::::: 145 7.5 Symmetries of the dodecahedron ::::::::::::::::: 148 7.6 Appendix: Symmetries of the icosahedron and S6 ::::::: 151 CONTENTS 7 8 Groups, II 153 8.1 Homomorphisms ::::::::::::::::::::::::: 153 8.2 Homomorphisms arising from group actions :::::::::: 156 8.3 Examples of isomorphisms :::::::::::::::::::: 157 8.3.1 Conjugation in Sn ::::::::::::::::::::: 159 8.3.2 Aside: Automorphisms of Sn ::::::::::::::: 160 8.4 Kernels and normal subgroups :::::::::::::::::: 161 8.5 Quotient subgroups :::::::::::::::::::::::: 163 8.6 Direct products :::::::::::::::::::::::::: 165 8.6.1 First fundamental theorem of cube theory ::::::: 166 8.6.2 The twists and flips of the Rubik’s cube :::::::: 167 8.6.3 The slice group of the Rubik’s cube ::::::::::: 168 8.7 Semi-direct products ::::::::::::::::::::::: 173 8.8 Wreath products ::::::::::::::::::::::::: 176 8.8.1 Application to order of elements in Cm wr Sn :::::: 178 9 The Rubik’s cube and the word problem 181 9.1 Background on free groups :::::::::::::::::::: 181 9.1.1 Length ::::::::::::::::::::::::::: 182 9.1.2 Trees :::::::::::::::::::::::::::: 183 9.2 The word problem :::::::::::::::::::::::: 184 9.3 Generators and relations ::::::::::::::::::::: 185 9.4 Generators, relations for groups of order < 26 ::::::::: 187 9.5 The presentation problem :::::::::::::::::::: 192 n 9.6 A presentation for Cm >¢ Sn+1 ::::::::::::::::: 193 9.6.1 A proof :::::::::::::::::::::::::: 195 10 The 2 £ 2 and 3 £ 3 cube groups 197 10.1 Mathematical description of the 3 £ 3 cube moves ::::::: 197 10.1.1 Notation :::::::::::::::::::::::::: 197 10.1.2 Corner orientations :::::::::::::::::::: 200 10.1.3 Edge orientations ::::::::::::::::::::: 201 10.1.4 The semi-direct product ::::::::::::::::: 202 10.2 Second fundamental theorem of cube theory :::::::::: 203 10.2.1 Some consequences :::::::::::::::::::: 207 10.3 Rubika esoterica :::::::::::::::::::::::::: 208 10.3.1 Coxeter groups :::::::::::::::::::::: 210 10.3.2 The moves of order 2 ::::::::::::::::::: 211 8 CONTENTS 10.4 Mathematical description of the 2 £ 2 cube moves ::::::: 212 11 Other Rubik-like puzzle groups 215 11.1 On the group structure of the skewb :::::::::::::: 215 11.2 On the group structure of the pyraminx :::::::::::: 219 11.2.1 Orientations :::::::::::::::::::::::: 221 11.2.2 Center pieces ::::::::::::::::::::::: 223 11.2.3 The group structure ::::::::::::::::::: 224 11.3 A uniform approach :::::::::::::::::::::::: 225 11.3.1 General remarks ::::::::::::::::::::: 225 11.3.2 Parity conditions ::::::::::::::::::::: 226 11.4 The homology group of the square 1 puzzle ::::::::::: 227 11.4.1 The main result :::::::::::::::::::::: 228 11.4.2 Proof of the theorem ::::::::::::::::::: 231 12 Interesting subgroups of the cube group 233 12.1 The squares subgroup ::::::::::::::::::::::: 234 12.2 P GL(2; F5) and two faces of the cube :::::::::::::: 236 12.2.1 Finite fields :::::::::::::::::::::::: 236 12.2.2 M¨obiustransformations ::::::::::::::::: 240 12.2.3 The main isomorphism :::::::::::::::::: 243 12.2.4 The labeling :::::::::::::::::::::::: 244 12.2.5 Proof of the second theorem ::::::::::::::: 245 12.3 The cross groups ::::::::::::::::::::::::: 246 12.3.1 P SL(2; F7) and crossing the cube :::::::::::: 246 12.3.2 Klein’s 4-group and crossing the pyramnix ::::::: 249 13 Crossing the Rubicon 251 13.1 Doing the Mongean shuffle :::::::::::::::::::: 252 13.2 Background on P SL2 ::::::::::::::::::::::: 252 13.3 Galois’ last dream ::::::::::::::::::::::::: 254 13.4 The M12 generation :::::::::::::::::::::::: 255 13.5 Coding the Golay way :::::::::::::::::::::: 256 13.6 M12 is crossing the rubicon :::::::::::::::::::: 258 13.7 An aside: A pair of cute facts :::::::::::::::::: 259 13.7.1 Hadamard matrices :::::::::::::::::::: 259 13.7.2 5-transitivity ::::::::::::::::::::::: 261 CONTENTS 9 14 Appendix: Some solution strategies 263 14.1 The subgroup method :::::::::::::::::::::: 263 14.1.1 Example: the corner-edge method :::::::::::: 264 14.1.2 Example: Thistlethwaite’s method ::::::::::: 265 14.2 3 £ 3 Rubik’s cube :::::::::::::::::::::::: 266 14.2.1 Strategy for solving the cube ::::::::::::::: 266 14.2.2 Catalog of 3 £ 3 Rubik’s ”supercube” moves :::::: 267 14.3 4 £ 4 Rubik’s cube :::::::::::::::::::::::: 267 14.4 Rainbow masterball :::::::::::::::::::::::: 269 14.4.1 A catalog of rainbow moves ::::::::::::::: 270 14.5 Equator puzzle :::::::::::::::::::::::::: 271 14.6 The skewb ::::::::::::::::::::::::::::: 273 14.6.1 Strategy :::::::::::::::::::::::::: 273 14.6.2 A catalog of skewb moves :::::::::::::::: 273 14.7 The pyraminx ::::::::::::::::::::::::::: 274 14.8 The megaminx :::::::::::::::::::::::::: 275 14.8.1 Catalog of moves ::::::::::::::::::::: 276 10 CONTENTS Chapter 0 Introduction ”The advantage is that mathematics is a field in which one’s blunders tend to show very clearly and can be corrected or erased with a stroke of the pencil. It is a field which has often been compared with chess, but differs from the latter in that it is only one’s best moments that count and not one’s worst.” Norbert Wiener EX-PRODIGY: MY CHILDHOOD AND YOUTH Groups measure symmetry. No where is this more evident than in the study of symmetry in 2- and 3-dimensional geometric figures. Symmetry, and hence groups, play a key role in the study of crystallography, elementary particle physics, coding theory, and the Rubik’ s cube, to name just a few. This is a book biased towards group theory not the ”the cube”. To paraphrase the German mathematician David Hilbert, the art of doing group theory is to pick a good example to learn from. The Rubik’s cube will be our