Discrete Mathematics and Combinatorics

Counting With Symmetry Using Burnside's Lemma

Count necklaces, square grids and painted cubes correctly when rotations make different colorings look the same.

Key takeaways

  • The number of different objects equals the average, over all symmetries, of the number of objects each symmetry leaves unchanged.
  • The symmetries must form a group, which includes doing nothing, combining moves and undoing them.
  • A coloring is unchanged by a symmetry exactly when every cycle of positions has a single color.
  • Simple division by the number of symmetries fails because some colorings are more symmetric than others.

Burnside's lemma counts objects when some of them should be considered the same because a symmetry turns one into another. The rule is: for each symmetry, count the objects it leaves unchanged, then take the average of those counts over all the symmetries. The average is the number of genuinely different objects.

It answers questions such as how many different bracelets you can make from beads of two colors, or how many ways there are to paint the faces of a cube with three paints.

Why division is not enough

Color the 4 corners of a square black or white. Counting corners as labeled, there are 2⁴ = 16 colorings. Now treat two colorings as the same if a rotation carries one to the other.

Dividing 16 by 4 rotations suggests 4 types. Listing them shows 6: all white, one black corner, two adjacent black corners, two opposite black corners, three black corners, and all black.

The trouble is that the all-white square looks the same after every rotation, so it is counted once among the 16, not 4 times. The opposite-corner pattern appears only twice. Each type is called an orbit, the set of all colorings you can reach from one of them by symmetry. Orbits differ in size.

Groups and fixed colorings

The symmetries you allow must form a group. Doing nothing counts as a symmetry, performing one symmetry after another gives a third, and each can be undone. The rotations of a square by 0°, 90°, 180° and 270° form a group of 4. A fuller introduction is group theory as the mathematics of symmetry.

A coloring is fixed by a symmetry if applying the symmetry leaves it looking exactly as before. Burnside's lemma says:

number of orbits = (1/|G|) × sum over g in G of |Fix(g)|

G       the group of symmetries
|G|     how many symmetries it has
Fix(g)  the colorings left unchanged by symmetry g

The square, solved

For each rotation, group the corners into cycles, the sets of positions that pass colors around among themselves. A fixed coloring must give each cycle one color, so with 2 colors the count is 2 raised to the number of cycles.

Rotation Cycles of corners Fixed colorings
0° 4 16
90° 1 2
180° 2 4
270° 1 2

The sum is 24, and 24 ÷ 4 = 6. That agrees with the list. With c colors the same table gives (c⁴ + c² + 2c) / 4, which for c = 3 is (81 + 9 + 6) / 4 = 24.

Using Burnside's lemma
1 List the symmetries Check that they form a group 2 Find the cycles For each symmetry, track the positions 3 Count fixed colorings Colors raised to the number of cycles 4 Take the average Add up and divide by the group size List the symmetries Check that they form a group 1 Find the cycles For each symmetry, track the positions 2 Count fixed colorings Colors raised to the number of cycles 3 Take the average Add up and divide by the group size 4

Necklaces and bracelets

Take 6 beads spaced evenly on a circle, each black or white. If only rotations count, a turn by r positions splits the beads into gcd(r, 6) cycles, where gcd means greatest common divisor, and gcd(0, 6) = 6.

r:        0    1   2   3   4   5
cycles:   6    1   2   3   2   1
fixed:   64    2   4   8   4   2     sum 84

necklaces = 84 / 6 = 14

A bracelet can also be flipped over. That adds 6 reflections. Three of the mirror lines pass through two opposite beads, leaving 4 cycles each (two single beads and two swapped pairs), so each fixes 16 colorings. The other three lines pass between beads, giving 3 swapped pairs and fixing 8.

reflections:  3 × 16 + 3 × 8 = 72
bracelets  = (84 + 72) / 12 = 13

Only one pair of the 14 necklaces are mirror images of each other, and flipping merges them.

A three by three grid

Color each of the 9 squares of a 3 by 3 tile black or white. Without symmetry there are 2⁹ = 512 tiles. If the tile may be rotated, the center always stays put and the other 8 squares move around it.

identity    9 cycles                          512
90°         center + two cycles of four        8
180°        center + four swapped pairs       32
270°        center + two cycles of four        8
distinct tiles = (512 + 8 + 32 + 8) / 4 = 140

If the tile is printed on glass and may also be turned over, add 4 reflections. Each mirror line passes through 3 squares, which stay fixed, and swaps the other 6 in 3 pairs. That makes 6 cycles and 64 fixed colorings apiece.

The result is (560 + 4 × 64) / 8 = 816 / 8 = 102. The physical object decides which answer is wanted. An opaque tile with one printed face calls for 140.

A surprise about prime numbers

Make necklaces of p beads from a colors, where p is a prime number, and count rotations only. The identity fixes all aᵖ strings. Every other rotation moves the beads in a single cycle of length p, because p has no smaller factors to share with the step size. So each fixes only the a one-color strings.

necklaces = (aᵖ + (p − 1)·a) / p

Since this is a count, it is a whole number. Therefore p divides aᵖ + (p − 1)a, which is the same as saying that p divides aᵖ − a. That is Fermat's little theorem, obtained by counting jewelry.

With p = 5 and a = 2, the formula gives (32 + 8) / 5 = 8 necklaces, and 32 − 2 = 30 is indeed a multiple of 5.

Painting a cube

How many ways can the 6 faces of a cube be colored with n paints, counting rotated cubes as the same? A cube has 24 rotations. Sort them by what they do to the faces.

Type of rotation How many Face cycles
Do nothing 1 6
Quarter turn about a face axis 6 3
Half turn about a face axis 3 4
Third turn about a corner axis 8 2
Half turn about an edge axis 6 3

Adding the contributions gives the formula:

cubes = (n⁶ + 3n⁴ + 12n³ + 8n²) / 24

n = 2:  (64 + 48 + 96 + 32) / 24       = 10
n = 3:  (729 + 243 + 324 + 72) / 24    = 57

The 12n³ combines the 6 quarter turns and the 6 edge half turns. If your application also treats mirror images as identical, you need 48 symmetries instead.

Checking the cube formula

Test small values. With n = 1 there is only one way to paint a cube, and the formula gives (1 + 3 + 12 + 8) / 24 = 1.

With n = 2 you can list the 10 cubes by the number of black faces. There is one each with 0, 1, 5 and 6 black faces. With 2 black faces, they either touch along an edge or sit opposite each other, which is 2 cubes, and 4 black faces mirrors this with another 2. With 3 black faces, either all three meet at a corner or they wrap around in a band, 2 more. The total is 4 + 2 + 2 + 2 = 10.

Why the lemma is true

Count pairs (g, x) in which the symmetry g fixes the coloring x. Counting by symmetries gives the sum of the |Fix(g)|.

Now count by colorings. For a given x, the symmetries that fix it are called its stabilizer. A basic fact, the orbit-stabilizer theorem, says that the size of the orbit of x times the size of its stabilizer equals |G|. So x contributes |G| divided by its orbit size.

Add this over all the members of one orbit: each contributes |G| / (orbit size), and there are (orbit size) members, for a total of exactly |G|. Every orbit contributes |G|, so the pair count is |G| times the number of orbits. Dividing finishes the proof.

This is a polished example of counting the same thing two ways.

History and a stronger tool

The name is a historical accident. William Burnside included the result in his influential book on groups, but it was known earlier to Augustin-Louis Cauchy and Ferdinand Georg Frobenius. Some authors call it the Cauchy-Frobenius lemma.

George Pólya extended the method in the 1930s. His enumeration theorem tracks not just how many colorings there are but how many use each color a given number of times, by replacing each cycle with a polynomial. Chemists use this kind of counting to enumerate molecules obtained by substituting atoms onto a symmetric frame.

For the square with black and white, each cycle of length L becomes (bᴸ + wᴸ). Averaging gives b⁴ + b³w + 2b²w² + bw³ + w⁴, a generating function whose coefficient 2 records the adjacent and opposite patterns.

Choosing the right notion of "same"

Mathematics cannot tell you which objects to identify. A seating plan around a table might ignore rotations but keep mirror images apart, because left and right neighbors matter. A key ring with colored tags can be flipped, so mirror images are the same. A tile fixed to a wall may admit no symmetry at all.

You can also let colors be swapped, treating a black-on-white pattern as the same as its negative. That enlarges the group: each element is now a movement of positions, possibly combined with a color exchange, and fixed colorings must be recounted for the combined moves.

State your choice before computing. Two people who get different totals have often answered different questions.

Mistakes to avoid

  • Leaving out the identity. Doing nothing fixes every coloring and is usually the largest term.
  • Mixing symmetry sets. Rotations alone and rotations with reflections give different answers, so decide which fits the physical object.
  • Using only some of the moves, such as a single quarter turn without the half turn it generates.
  • Expecting a fraction. The average must be a whole number; a remainder means a count is wrong.
  • Applying a power of the number of colors when colors are restricted. If exactly two beads must be black, count only fixed colorings that satisfy this.

A good exercise is to color the 3 corners of an equilateral triangle with 3 colors. With rotations only, the average is (27 + 3 + 3) / 3 = 11. Adding the 3 reflections, each of which fixes 9 colorings, gives (33 + 27) / 6 = 10. The one lost type is the pair of triangles that use all three colors, which are mirror images of each other.

That last point about restricted colors is worth a quick example. For 4 corners with exactly 2 black, the identity fixes C(4, 2) = 6 colorings, the quarter turns fix none, and the half turn fixes 2. The average is 8 / 4 = 2, the adjacent and opposite patterns. For counting without symmetry, see permutations and combinations.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 45 articles in Discrete Mathematics and Combinatorics →

Latest news on this topic