Permutations
Rearrangements as functions: the symmetric group, cycle notation and the order of a permutation, transpositions and the sign, the alternating group, and Cayley's theorem that every finite group hides inside a symmetric group. Parity settles the fifteen puzzle and explains why only one in twelve reassembled Rubik's Cubes can be solved, and riffle shuffles lead to the question of how many shuffles mix a deck.
A deck of cards is shuffled, the tiles of a sliding puzzle are pushed around, the faces of a puzzle cube are turned: in each case a finite set of objects is rearranged, and the rearrangements can be carried out one after the other. Unit 5 found the first groups in the symmetries of a square. This unit studies the group of all rearrangements of \(n\) objects, which is the largest group of permutations of \(n\) objects and, by a theorem of Cayley at the end of the unit, contains a copy of every group of order \(n\). On the way, one idea, the parity of a permutation, settles two famous questions: why a position of the fifteen puzzle that looks one swap away from the solution can never be reached, and why only one in twelve reassembled Rubik’s Cubes can be solved.
1 The symmetric group
1.1 Permutations and their composition
A permutation of a set \(X\) is a bijective function from \(X\) to itself (Unit 1). The set will almost always be \(\{1, 2, \ldots, n\}\), and a permutation is then a way of rearranging the numbers \(1\) to \(n\). A permutation \(\sigma\) is written in two-row notation by listing the numbers \(1\) to \(n\) in the top row and their images below them. For example, \begin{equation*} \sigma = \begin{pmatrix} 1 & 2 & 3 & 4 & 5 \\ 3 & 4 & 5 & 2 & 1 \end{pmatrix} \end{equation*} is the permutation of \(\{1, 2, 3, 4, 5\}\) with \(\sigma(1) = 3\), \(\sigma(2) = 4\), \(\sigma(3) = 5\), \(\sigma(4) = 2\), and \(\sigma(5) = 1\). The bottom row contains each of the five numbers exactly once, which is what makes \(\sigma\) a bijection; a bottom row such as \(3, 4, 5, 2, 2\) would not describe a permutation. Unit 1 counted the bijections of an \(n\)-element set: there are \(n!\) of them.
Two permutations of the same set are composed as functions. The composition \(\sigma \circ \tau\) of Unit 1 is again a bijection, hence again a permutation, and in this program the circle is dropped, so \(\sigma\tau\) means \(\sigma \circ \tau\). The convention of this program is the one of functions:
\(\sigma\tau\) means “first \(\tau\), then \(\sigma\)”, so that \((\sigma\tau)(x) = \sigma(\tau(x))\).
Some books, and every guide to solving a Rubik’s Cube, read products the other way round, from left to right, and the two conventions give different answers for the same product, as the next example shows; a reader who opens another text should check its convention first.