Counting up to symmetry
Paint each corner of a square green or white. There are \(2^4 = 16\) ways. But if the square can be picked up, turned and flipped before anyone looks at it, many of these are the same colouring seen from a different angle. How many are really different?
The symmetry group \(D_4\) acts on the 16 colourings: a symmetry \(g\) carries the paint with it, so the corner \(g(i)\) gets the colour that corner \(i\) had. (This is an action: moving by \(h\) and then by \(g\) carries the paint of corner \(i\) to corner \(g(h(i))\), exactly as \(gh\) does.) Two colourings are "really the same" exactly when they are in the same orbit. So the question is: how many orbits are there?
There are 6. The tempting shortcut, \(16 / 8 = 2\), is badly wrong, because the orbits have different sizes: 1, 4, 4, 2, 4, 1. By the orbit–stabiliser theorem an orbit has \(8 / |\text{stabiliser}|\) elements, so the more symmetric a colouring is, the smaller its orbit. The all-white square is fixed by all 8 symmetries and sits alone.
Listing every orbit worked here, but it won't work for necklaces of 20 beads, or for colouring a cube in five colours. We need a formula.
Burnside's lemma
For an element \(g\) of a group acting on \(X\), write \(\operatorname{Fix}(g) = \{x \in X : g \cdot x = x\}\) for the set of points that \(g\) leaves where they are.
Burnside's lemma
If a finite group \(G\) acts on a finite set \(X\), the number of orbits is the average number of fixed points:
\[ \text{number of orbits} = \frac{1}{|G|} \sum_{g \in G} |\operatorname{Fix}(g)|. \]Proof
Count the pairs \((g, x)\) with \(g \cdot x = x\), the dots in the grid above, in two ways. Column by column, there are \(\sum_{g} |\operatorname{Fix}(g)|\) of them. Row by row, there are \(\sum_{x} |G_x|\).
Now take one orbit \(O\). For each \(x \in O\), the orbit–stabiliser theorem gives \(|G_x| = |G| / |O|\), so the rows of \(O\) hold \(|O| \cdot |G|/|O| = |G|\) dots between them. Every orbit contributes exactly \(|G|\), so
\[ \sum_{g \in G} |\operatorname{Fix}(g)| = \sum_{x \in X} |G_x| = |G| \times (\text{number of orbits}). \]Divide by \(|G|\). ∎
The lemma swaps a hard count (orbits) for an easy one (fixed points), because fixed colourings are easy to describe. Write each symmetry as a permutation of the corners, in cycle notation. A colouring is fixed by \(g\) exactly when every corner has the same colour as the corner \(g\) sends it to, that is, when each cycle of \(g\) is painted one colour. With \(k\) colours and \(c(g)\) cycles, counting each corner that \(g\) fixes as a cycle of length 1,
\[ |\operatorname{Fix}(g)| = k^{c(g)}. \]| Symmetry of the square | How many | Cycles on the corners | Fixed colourings |
|---|---|---|---|
| \(e\) | 1 | 4 (each corner alone) | \(k^4\) |
| quarter turns \(r, r^3\) | 2 | 1 (a 4-cycle) | \(k\) |
| half turn \(r^2\) | 1 | 2 (opposite corners swap) | \(k^2\) |
| flips across a diagonal \(s, r^2s\) | 2 | 3 (two corners stay, two swap) | \(k^3\) |
| flips across a line through edge midpoints \(rs, r^3s\) | 2 | 2 (two pairs swap) | \(k^2\) |
So the number of ways to colour the corners of a square with \(k\) colours, up to symmetry, is
\[ \frac{k^4 + 2k^3 + 3k^2 + 2k}{8}. \]For \(k = 2\) this is \(48/8 = 6\), as we found by hand. For \(k = 3\) it is \(168/8 = 21\), a number nobody would want to find by listing. (A good sanity check: the formula must give a whole number for every \(k\).)
Necklaces and bracelets
A necklace is a ring of \(n\) beads, each in one of \(k\) colours, where two rings count as the same if one can be rotated into the other. The rotation group \(\langle r \rangle\), cyclic of order \(n\), acts on the \(k^n\) colourings, and necklaces are its orbits. A bracelet may also be turned over, so bracelets are orbits of the whole dihedral group \(D_n\).
To use Burnside's lemma we need the cycles of each rotation. Here they are for six beads:
Swipe or scroll sideways to step through.
\(e\)
No turn: 6 cycles. A colouring is fixed exactly when each cycle is one colour, so \(2^6 = 64\) colourings are fixed.
\(r\)
A sixth of a turn: 1 cycle. A colouring is fixed exactly when each cycle is one colour, so \(2^1 = 2\) colourings are fixed.
\(r^2\)
A third of a turn: 2 cycles. A colouring is fixed exactly when each cycle is one colour, so \(2^2 = 4\) colourings are fixed.
\(r^3\)
A half turn: 3 cycles. A colouring is fixed exactly when each cycle is one colour, so \(2^3 = 8\) colourings are fixed.
\(r^4\)
Two thirds of a turn: 2 cycles. A colouring is fixed exactly when each cycle is one colour, so \(2^2 = 4\) colourings are fixed.
\(r^5\)
Five sixths of a turn: 1 cycle. A colouring is fixed exactly when each cycle is one colour, so \(2^1 = 2\) colourings are fixed.
The pattern holds in general. Number the beads by \(\mathbb Z/n\), so that \(r\) sends bead \(i\) to bead \(i + 1\). The bead \(i\) is carried by powers of \(r^j\) to \(i + j, i + 2j, \ldots\), and Unit 3 showed that the multiples of \(j\) are the same as the multiples of \(d = \gcd(j, n)\), with \(n/d\) of them. So each cycle of \(r^j\) has \(n/d\) beads, and there are \(d\) cycles. (For \(j = 0\), \(d = \gcd(0, n) = n\): every bead is a cycle by itself.) For six beads in two colours,
\[ \text{necklaces} = \frac{2^6 + 2^1 + 2^2 + 2^3 + 2^2 + 2^1}{6} = \frac{84}{6} = 14. \]Grouping the rotations by \(d = \gcd(j, n)\) gives a closed formula. The \(j\) with \(\gcd(j, n) = d\) are \(j = dj'\) with \(0 \le j' \lt n/d\) and \(\gcd(j', n/d) = 1\) (since \(\gcd(dj', n) = d \gcd(j', n/d)\)), and by Unit 3 there are \(\varphi(n/d)\) of those (with \(\varphi(1) = 1\), for \(j = 0\)).
The necklace formula
The number of necklaces of \(n\) beads in \(k\) colours is
\[ \frac{1}{n} \sum_{d \mid n} \varphi\!\left(\tfrac nd\right) k^{d}. \]Turning a necklace over can join two necklaces into one bracelet. For six beads, \(D_6\) has six flips as well as the six rotations. Three flips pass through two opposite beads: they fix those two and swap the other four in pairs, 4 cycles, so they fix \(2^4 = 16\) colourings. The other three pass through the midpoints of opposite gaps and swap the beads in three pairs, fixing \(2^3 = 8\). So
\[ \text{bracelets} = \frac{84 + 3 \cdot 16 + 3 \cdot 8}{12} = \frac{156}{12} = 13. \]Chemists count the same way. A benzene molecule is a ring of six carbon atoms, and replacing two of its hydrogen atoms by chlorine gives dichlorobenzene. How many different molecules is that? The ring can be rotated and turned over, so the question is how many bracelets of six beads have exactly two green. Burnside's lemma applies to this smaller set too, since symmetries don't change the number of green beads. \(e\) fixes all \(\binom 62 = 15\) such colourings; \(r^3\) fixes 3 (one opposite pair green); each of the six flips fixes 3; the other rotations fix none. That gives \((15 + 3 + 18)/12 = 3\): the three isomers chemists call ortho, meta and para.
Fermat's little theorem again
Unit 5 proved Fermat's little theorem with Lagrange's theorem. Here is a second proof, by counting necklaces, published by Solomon Golomb in 1956.
Fermat's little theorem
If \(p\) is prime and \(a\) is a positive integer, then \(p\) divides \(a^p - a\).
Proof
Let the rotation group \(\langle r \rangle\), of order \(p\), act on the \(a^p\) strings of \(p\) beads in \(a\) colours. By the orbit–stabiliser theorem, every orbit has size dividing \(p\): either 1 or \(p\). An orbit has size 1 when the string is fixed by \(r\), that is, when every bead has the same colour as the next, so the string uses one colour. There are \(a\) such strings. The other \(a^p - a\) strings fall into orbits of exactly \(p\) each, so \(p\) divides \(a^p - a\). ∎
Burnside's lemma says the same thing as a formula: the identity fixes all \(a^p\) strings, and each of the other \(p - 1\) rotations is a single \(p\)-cycle (since \(\gcd(j, p) = 1\)), fixing only the \(a\) one-colour strings. So there are \(\dfrac{a^p + (p-1)a}{p}\) necklaces. This is a whole number, and \(a^p + (p-1)a = (a^p - a) + pa\), so again \(p\) divides \(a^p - a\). Every integer is congruent to a positive one mod \(p\), so \(a^p \equiv a \pmod p\) for every integer \(a\).
Colouring a cube
Paint each face of a cube one of \(k\) colours. Up to rotation, how many cubes are there? The 24 rotations of Unit 8 act on the 6 faces. They come in five kinds. There are 3 axes through the centres of opposite faces, each with two quarter turns (one each way) and a half turn; 4 long diagonals, each with two thirds of a turn (one each way); and 6 axes through the midpoints of opposite edges, each with a half turn. With the identity that makes \(1 + 6 + 3 + 8 + 6 = 24\), so nothing is missed. For each kind, count the cycles on the faces:
| Rotation of the cube | How many | Cycles on the faces | Fixed colourings |
|---|---|---|---|
| do nothing | 1 | 6 | \(k^6\) |
| quarter turn about an axis through opposite face centres | 6 | 3 (two faces stay, four go round) | \(k^3\) |
| half turn about such an axis | 3 | 4 (two stay, two pairs swap) | \(k^4\) |
| third of a turn about a long diagonal | 8 | 2 (the three faces at each end go round) | \(k^2\) |
| half turn about an axis through opposite edge midpoints | 6 | 3 (three pairs swap) | \(k^3\) |
Two colours give \(240/24 = 10\) cubes:
Three colours give \(1368/24 = 57\). And if the six faces get six different colours, only the identity fixes any colouring, so there are \(6!/24 = 720/24 = 30\) different cubes. In particular there are 30 different ways to number a die with 1 to 6.
Going deeper: counting by colour
Burnside's lemma also counts colourings with a given number of faces of each colour. Use a letter \(x\) for green and \(y\) for white. In the fixed-point count, replace each cycle of length \(\ell\) by \(x^\ell + y^\ell\) ("all green or all white"), and multiply over the cycles. For the corners of the square this gives
\[ \tfrac18\left[(x+y)^4 + 2(x^4+y^4) + 3(x^2+y^2)^2 + 2(x+y)^2(x^2+y^2)\right] = x^4 + x^3y + 2x^2y^2 + xy^3 + y^4. \]The coefficient of \(x^2y^2\) is 2: there are two squares with two green corners, side by side or opposite, as in the first figure. For the cube, the same recipe gives \(x^6 + x^5y + 2x^4y^2 + 2x^3y^3 + 2x^2y^4 + xy^5 + y^6\), matching the ten nets above. This is the idea behind the Pólya enumeration theorem, which chemists use to count isomers and combinatorialists use to count graphs, trees and much else. The reason it works: Burnside's lemma applies separately to the colourings with each fixed number of greens, because symmetries don't change that number, and expanding the product picks out, cycle by cycle, which cycles are green.
History
The orbit-counting formula appears in work of Cauchy (1845) and was published in its present form by Frobenius (1887). Burnside's 1897 textbook on finite groups stated and proved it with a reference to Frobenius; the second edition (1911) dropped the reference, and the name "Burnside's lemma" stuck. Peter Neumann's 1979 paper on its origins is titled "A lemma that is not Burnside's". The necklace formula is older still, due to Moreau (1872) and popularised by MacMahon (1892). Redfield found the colour-by-colour method in 1927, but his paper went unnoticed; Pólya rediscovered it in 1937 and applied it to chemical compounds. Fermat stated his little theorem in a letter of 1640, and Euler's first published proof dates from 1736.
Practice set
Mixed questions covering the whole unit. Try each one before opening the answer.
1. Paint each corner of an equilateral triangle one of 3 colours. How many colourings are there up to rotations and flips?
Show answer
\(D_3\) has 6 elements. \(e\) fixes all \(3^3 = 27\). The two rotations are 3-cycles, fixing 3 each. The three flips fix one corner and swap two: 2 cycles, fixing 9 each. So \((27 + 6 + 27)/6 = 10\).
2. Each of 5 beads is one of 3 colours. How many necklaces are there? How many bracelets?
Show answer
Necklaces: \(e\) fixes \(3^5 = 243\), and each of the 4 other rotations is a 5-cycle fixing 3. So \((243 + 12)/5 = 51\). Bracelets: each of the 5 flips fixes one bead and swaps two pairs, 3 cycles, fixing 27. So \((255 + 135)/10 = 39\).
3. Use the necklace formula to count necklaces of 7 beads in 2 colours, and check that the answer matches the proof of Fermat's theorem.
Show answer
\(\frac17\left(\varphi(7)\cdot 2 + \varphi(1)\cdot 2^7\right) = \frac{12 + 128}{7} = 20\). These are the 2 one-colour necklaces plus \((2^7 - 2)/7 = 126/7 = 18\) orbits of size 7.
4. How many ways are there to colour the faces of a cube with 3 colours, up to rotation?
Show answer
\((3^6 + 3\cdot 3^4 + 12\cdot 3^3 + 8\cdot 3^2)/24 = (729 + 243 + 324 + 72)/24 = 1368/24 = 57\).
5. On a standard die, opposite faces add up to 7. How many different standard dice are there, up to rotation?
Show answer
Two. Turn the die so that 1 is on top; then 6 is underneath. Turn it about the vertical axis so that 2 is at the front; then 5 is at the back. Every rotation has now been used up, and 3 can go on the left or on the right, with 4 opposite. The two dice are mirror images of each other, and both are sold. (Check with orbit–stabiliser: there are \(6 \cdot 4 \cdot 2 = 48\) ways to label a fixed cube so that opposite faces add to 7, no rotation other than \(e\) fixes any of them, so there are \(48/24 = 2\) orbits.)
6. Let \(G\) act on itself by conjugation. Choose two elements of \(G\) independently and uniformly at random (they may be equal). Use Burnside's lemma to show that the probability that they commute is \(k(G)/|G|\), where \(k(G)\) is the number of conjugacy classes. Find it for \(S_3\) and \(D_4\).
Show answer
Here \(\operatorname{Fix}(g)\) is the set of \(x\) with \(gxg^{-1} = x\), the centraliser \(C(g)\), and the orbits are the conjugacy classes. Burnside: \(k(G) = \frac{1}{|G|}\sum_g |C(g)|\). The sum counts the commuting pairs \((g, x)\), out of \(|G|^2\) pairs, so the probability is \(k(G)|G|/|G|^2 = k(G)/|G|\). \(S_3\) has 3 classes: probability \(3/6 = 1/2\). \(D_4\) has 5 classes: \(5/8\). (In fact \(5/8\) is the largest possible value for any non-abelian finite group, a theorem of Gustafson from 1973.)
Summary and glossary
- Counting objects up to symmetry means counting the orbits of a group action. Dividing by \(|G|\) is wrong, because orbits have different sizes.
- Burnside's lemma: number of orbits \(= \frac{1}{|G|}\sum_g |\operatorname{Fix}(g)|\). The proof counts the pairs \((g, x)\) with \(g \cdot x = x\) in two ways.
- For colourings, \(|\operatorname{Fix}(g)| = k^{c(g)}\), where \(c(g)\) is the number of cycles of \(g\), fixed points included.
- Necklaces: \(\frac1n\sum_{d \mid n}\varphi(n/d)\,k^d\). Bracelets also allow flips, and mirror-image pairs merge.
- The same counting proves Fermat's little theorem, counts isomers, and shows a cube has 10 green-and-white colourings and 30 different numberings as a die.
- \(\operatorname{Fix}(g)\)
- The points left unchanged by \(g\).
- Burnside's lemma
- The number of orbits is the average size of \(\operatorname{Fix}(g)\).
- Necklace
- A colouring of a ring of beads, up to rotation.
- Bracelet
- A colouring of a ring of beads, up to rotation and turning over.
- Pólya enumeration
- A refinement of Burnside's lemma that counts colourings by how many times each colour is used.