# Permutation Groups

Groups admit many different representations. In particular, all finite groups can be represented as permutation groups, that is, they are always isomorphic to a subgroup of the symmetric group

of automorphisms of a set of

elements (Cayley's theorem). Highly efficient techniques for manipulation of permutation groups have been developed during the last 40 years, which allow the manipulation of very large groups in a computer.

*Mathematica* provides a collection of commands and algorithms that can handle permutation groups of moderate degree, in the range of a few thousand, hence working with groups of permutations with more than

elements.

This tutorial introduces some basic algorithms for computing with finite permutation groups, specified by a list of generating permutations given in disjoint cyclic form. A separate tutorial

"Permutations" explains how to work with permutations in cyclic form.

## Generating Sets

A simple and compact way of specifying a group is by giving a set of elements whose repeated product produces the whole group. These are then called

*generators* of the group and the set of elements is referred to as a

*generating set*. This is a powerful and general method to specify a finite group, though for large groups it might be difficult to extract information from them about the group.

Group representations.

Take two permutations and construct the group generated by them.

This is the list of all permutations in the group.

Out[4]= | |

Out[5]= | |

Both generators fix point 2, thus so do all permutations in the group. This generated group is isomorphic to the symmetric group on the set

, with

permutations.

Out[6]= | |

Out[7]= | |

For small groups, it is possible to construct better representations of a group. They are the Cayley multiplication table and Cayley graph, the latter representing mixed information about both the whole group and the generating set being used.

For small groups, all products can be represented using a Cayley multiplication table.

Out[8]//TableForm= |

| |

Each row and each column is itself a permutation of the numbers 1-24. The array is symmetric if and only if the group is Abelian. The group

is not Abelian.

Out[9]= | |

Out[10]= | |

You can also use a Cayley graph. Multiplication by permutation

is represented in red and by

in blue.

Out[11]= | |

It is clear in the graph that the first generator (in red) has order 3 and the second one (in blue) has order 2.

Out[12]= | |

Any closed loop in the graph represents a relation giving the identity. For example, the loop

corresponds to the following.

Out[13]= | |

In other words, a permutation of order 4 has been found.

Out[14]= | |

## Orbits and Stabilizers

Given any generating set of a permutation group acting on a set of points, it is possible to find which other points can be related with a given point. This is called the

*orbit* of that point.

Orbit computation.

Take two new permutations and form a generating set with them.

This is the orbit of point 3. Orbits are given with points sorted lexicographically.

Out[18]= | |

Each of the points in the orbit uniquely identifies the same orbit.

Out[19]= | |

Points cannot belong to two different orbits and hence orbits partition the set of points on which the group acts.

In this example the maximum point of the support is 30.

Out[20]= | |

Hence, the orbits partition the range of the first 30 points.

Out[21]= | |

Orbits can be selected by supplying more points.

Out[22]= | |

If a larger range is partitioned, all other points are stable.

Out[23]= | |

Orbits can be computed efficiently, and hence it is possible to work with permutations of large support.

Take a group generated by two random permutations of equal large degree.

In most cases the group acts transitively, with a single orbit.

Out[25]= | |

Now take two generators of very different support length.

Then usually there is still one large orbit, but not of maximal length.

Out[27]= | |

Using more general actions it is possible to form other types of orbits, like conjugacy classes.

This is the conjugacy class of a permutation in the symmetric group.

Out[28]= | |

Complementary to the information given by orbits, describing how points move, it is also possible to compute

*stabilizers*, namely the subgroups of elements fixing one or several points.

Computation of stabilizers.

Out[29]= | |

This is the subgroup of permutations fixing point 3. The cyclic notation shows that none of its generators moves point 3.

Out[30]= | |

Recall the orbit of point 3 under this group has length 18.

Out[31]= | |

Out[32]= | |

By the orbit stabilizer theorem, that must be also the quotient between the group orders.

Out[33]= | |

## Strong Generating Set Representation

For larger permutation groups it becomes increasingly infeasible to list or draw all their elements. In such cases it is necessary to resort to alternative methods that can infer information about a group from a generating set of the group without actually computing all its permutations. The key ideas were developed in the late 1960s, and are based on the construction of a new equivalent generating set for the same group, but from which it is easy to form a hierarchy of subgroups that allow fast manipulation of the full group. This special type of generating set is called a

*strong generating set*.

Basic functionality with strong generating set representations.

Take this group generated by two permutations with support

.

Orbit computations can be done directly from standard generators. However, in order to compute the group order,

*Mathematica* internally computes strong generators for the group.

Out[37]= | |

That representation is stored, to avoid recomputing it for the same original set of generators.

Out[38]= | |

Now it is possible to do things like testing for membership.

Out[39]= | |

Out[40]= | |

Any product of generators must belong to the group.

Out[41]= | |

Out[42]= | |

Now return to the properties of a strong generating set. Strong generators are defined with respect to a

*base*: this is an ordered subset of points of the domain of action of the group, such that the identity is the only element that fixes them all. That implies that knowing the images of the points in a base under a permutation uniquely identifies that permutation. Groups for which a short base is known can be manipulated highly efficiently. The base defines a very useful hierarchy of stabilizer subgroups, known as the

*stabilizer chain*, which plays a central role in the manipulation of permutation groups, very much like the Gauss-elimination hierarchy of vector spaces in linear algebra. Finally, the condition that characterizes a set of generators as being

*strong* with respect to a base is that it contains generating subsets for all subgroups in the corresponding stabilizer chain.

Stabilizer chain, base, and strong generators.

This is a stabilizer chain of the previous group, with respect to a base

automatically chosen by

*Mathematica*.

Out[43]= | |

These are the orders of the subgroups in the stabilizer chain.

Out[44]= | |

The base and strong generators of the chain can be extracted as follows.

Out[45]= | |

Out[46]= | |

Those are still generators for the original group.

Out[47]= | |

The second group in the chain is the stabilizer of 1, a subgroup of order 253.

Out[48]= | |

Out[49]= | |

The stabilizer subgroup has two permutations less, precisely those moving point 1.

Out[50]= | |

The other permutations in the strong generating set do not move point 1.

Out[51]= | |

You can repeat the stabilization for the first two points in the base.

Out[52]= | |

Out[53]= | |

Finally, the third stabilizer is the trivial group, because it is the stabilizer of the full base.

Out[54]= | |

Check Lagrange's theorem by showing that the size of a subgroup always divides that of the group.

Out[55]= | |

Out[56]= | |

The product of those numbers is the size of the full original group.

Out[57]= | |

Out[58]= | |

The option

GroupActionBase allows specifying an alternative base. If it is not a true base,

*Mathematica* will complete it with additional points.

Out[59]= | |

## Example: The Rubik Group

One of the most famous permutation groups is that associated with the rotations of a Rubik cube. In the following diagram moving facelets are numbered from 1 to 48. The central facelets do not move, and define six respective basic rotations.

These are the six basic rotations.

This is the number of elements in that group.

Out[67]= | |

Internally the following chain of stabilizers has been constructed. The number of permutations that fix the corresponding list of points is indicated. The last line gives a base of the group, because only one permutation (the identity) fixes the given 18 points.

Out[69]= | |

A set of strong generators is given by the group in the first line of the chain.

Out[70]= | |

Now you can test membership of some moves. For example, swapping two neighbor edge facelets is not allowed.

Out[71]= | |

But the simultaneous switching of two of those is allowed.

Out[72]= | |

This is the superflip move, which switches all those pairs simultaneously.

Out[73]= | |

Out[74]= | |

## Other Examples

These are two examples of groups of larger support, but with very short bases.

The largest symplectic group given in the

*ATLAS of Finite Groups* is

, represented as permutations on 496 points.

Out[78]= | |

Out[79]= | |

These are the orders of the subgroups in its stabilizer chain.

Out[80]= | |

This is the exceptional twisted group

, represented with permutations on 819 points.

Out[84]= | |

It also admits a very short base.

Out[85]= | |