## Pólya Theory

Suppose you’re making a necklace of 10 beads, and you have 3 kinds of beads: red, green and blue. How many different necklaces can you make?

How many of these necklaces contain at least 3 red beads? How many are composed of 2 red beads, 3 green beads and 5 blue beads?

At first glance, these may not seem that tricky to answer. After all, consider the similar question: how many ways can you arrange 10 different beads in a necklace? This is easy: count all permutations of 10 beads, 10!, then divide by 20 because we counted each permutation 10 times due to rotation, and counted each of these twice because you can flip the necklace over. Thus the answer is 10!/20 = 181440.

Perhaps we can solve the first problem with a similar technique. Let’s try a smaller case for now and study 6-bead necklaces. The first step is easy: the number of ways to colour 6 beads, where each bead can be red, green or blue, is 36 = 729. Next we put the beads on a necklace, and account for duplicate patterns. For example, RRRRRG and RRRRGR are the same pattern, because you can rotate the necklace to go from one to the other. On the other hand, some patterns such as RRRRRR only get counted once.

One might hope there are only a few different cases so we can tweak the total a little to get the right answer. But the necklace consisting of 5 red beads and 1 green bead appears 6 times, the necklace consisting of all red beads appears once, the necklace consisting of 4 red beads and 2 green beads at opposite ends such as RRGRRG appears 3 times, and so on. We haven’t even considered blue beads yet!

Furthermore, dramatic changes occur when only one more bead is added. For instance, there are 7 colourings equivalent to RRGRRRG, and in fact, each colouring for the 7 bead case will appear either 1, 2, 7, or 14 times.

There’s no easy way out. To answer the question, we must study the symmetry group of the n-bead necklace: the dihedral group of order 2n.

Why doesn’t the symmetry group matter for the easy variant of the question, where each bead is unique? Actually, it does, but the only information we need is the size of the symmetry group. When each bead is unique, different rotation and reflection operations are guaranteed to produce different colourings, so we know we counted each one exactly 20 times.

When beads can have the same colour as other beads, rotations or reflections can leave a colouring unchanged. For example, rotating RRGRRG by 3 beads has no effect. Our counting algorithm must therefore intimately involve the symmetry group.

## References

See K. H. Wehrhahn, "Combinatorics: An Introduction".

Ben Lynn blynn@cs.stanford.edu 💡