# Pólya enumeration theorem

(Redirected from Polya theorem)

The Pólya enumeration theorem, also known as the Redfield–Pólya Theorem, is a theorem in combinatorics that both follows and ultimately generalizes Burnside's lemma on the number of orbits of a group action on a set. The theorem was first published by John Howard Redfield in 1927. In 1937 it was independently rediscovered by George Pólya, who then greatly popularized the result by applying it to many counting problems, in particular to the enumeration of chemical compounds.

The Pólya enumeration theorem can also be incorporated into symbolic combinatorics and the theory of combinatorial species.

## A simplified, unweighted version

Let X be a finite set and let G be a group of permutations of X (or a finite symmetry group that acts on X). The set X may represent a finite set of beads, and G may be a chosen group of permutations of the beads. For example, if X is a necklace of n beads in a circle, then rotational symmetry is relevant so G is the cyclic group Cn, while if X is a bracelet of n beads in a circle, rotations and reflections are relevant so G is the dihedral group Dn of order 2n. Suppose further that Y is a finite set of colors — the colors of the beads — so that YX is the set of colored arrangements of beads, and suppose that there are $\left| Y \right| = t$ colors. (More formally, a given "coloring" is a function $X \to Y$.) Then the Pólya enumeration theorem counts the number of orbits under G of colored arrangements of beads by the following formula:

$|Y^X/G| = \frac{1}{|G|}\sum_{g \in G} t^{c(g)}$

where $\left| Y \right| = t$ and c(g) is the number of cycles of the group element g as a permutation of X.

## The full, weighted version

In the more general and more important version of the theorem, the colors are also weighted in one or more ways, and there could be an infinite number of colors provided that the set of colors has a generating function with finite coefficients. In the univariate case, suppose that

$f(x) = f_0 + f_1 x + f_2 x^2 + \cdots$

is the generating function of the set of colors, so that there are fn colors of weight n for each n ≥ 0. In the multivariate case, the weight of each color is a vector of integers and there is a generating function f(a,b,...) that tabulates the number of colors with each given vector of weights.

The enumeration theorem employs another multivariate generating function called the cycle index:

$Z_G(t_1,t_2,\ldots,t_n) = \frac{1}{|G|}\sum_{g \in G} t_1^{j_1(g)} t_2^{j_2(g)} \cdots t_n^{j_n(g)}.$

Here the kth weight jk(g) is the number of k-cycles of g as a permutation of X. The theorem then says that the generating function F of colored arrangements is the cycle index, composed with the generating function f of the colors, composed with powers of the variables of f:

$F(x) = Z_G(f(x),f(x^2),f(x^3),\ldots,f(x^n))$

or in the multivariate case:

$F(a,b,\ldots) = Z_G(f(a,b,\ldots),f(a^2,b^2,\ldots),f(a^3,b^3,\ldots),\ldots,f(a^n,b^n,\ldots)).$

To reduce to the simplified version, if there are t colors of weight 0, then

$|Y^X/G| = Z_G(t,t,\ldots,t).$

In the celebrated application of counting trees (see below) and acyclic molecules, an arrangement of "colored beads" is actually an arrangement of arrangements, such as branches of a rooted tree. Thus the generating function f for the colors is derived from the generating function F for arrangements, and the Pólya enumeration theorem becomes a recursive formula.

## Examples

### Graphs on three and four vertices

A graph on m vertices can be interpreted as an arrangement of colored beads. The arrangement X is the set of $\binom{m}2$ possible edges, while the set of colors Y = {black,white} corresponds to edges that are present (black) or absent (white). The Pólya enumeration theorem can be used to calculate the number of graphs up to isomorphism with a fixed number of vertices, or the generating function of these graphs according to the number of edges they have. For the latter purpose, we can say that a black or present edge has weight 1, while an absent or white edge has weight 0. Thus $f(t) = 1+t$ is the generating function for the set of colors. The relevant symmetry group is $G = S_m$, the symmetric group on m letters; an isomorphism class of graphs is equivalent to an orbit of graphs under this group. It acts as a subgroup of $S_{\binom{m}2}$, the group of permutations of all of the edges.

All graphs on three vertices.
Nonisomorphic graphs on three vertices.

The 8 graphs on three vertices without quotienting by symmetry are shown at the right. There are four isomorphism class of graphs, also shown at the right.

The cycle index of the permutation group of the edges is

$Z_G(t_1,t_2,t_3) = \frac{t_1^3 + 3 t_1 t_2 + 2 t_3}{6}.$

Thus, according to the enumeration theorem, the generating function of graphs on 3 vertices up to isomorphism is

$F(t) = Z_G(t+1,t^2+1,t^3+1) = \frac{(t+1)^3 + 3 (t+1) (t^2+1) + 2 (t^3+1)}{6},$

which simplifies to

$F(t) = t^3+t^2+t+1.$

Thus there is one graph each with 0 to 3 edges.

Isomorphism classes of graphs on four vertices.

The cycle index of the edge permutation group for graphs on four vertices is:

$Z_G(t_1,t_2,t_3,t_4) = \frac{t_1^6 + 9 t_1^2 t_2^2 + 8 t_3^2 + 6 t_2 t_4}{24}.$

Hence

$F(t) = Z_G(1+t,1+t^2,1+t^3,1+t^4) = \frac{(t+1)^6 + 9 (t+1)^2 (t^2+1)^2 + 8 (t^3+1)^2 + 6 (t^2+1) (t^4+1)}{24}\,$

which simplifies to

$F(t) = t^6 + t^5 + 2 t^4 + 3 t^3 + 2 t^2 + t + 1.$

These graphs are shown at the right.

### Rooted ternary trees

The set T3 of rooted ternary trees consists of rooted trees where every node has exactly three children (leaves or subtrees). Small ternary trees are shown at right. Note that ternary trees with n vertices are equivalent to trees with n vertices of degree at most 3. In general, rooted trees are isomorphic when one can be obtained from the other by permuting the children of its nodes. In other words, the group that acts on the children of a node is the symmetric group S3. We define the weight of such a ternary tree to be the number of nodes (or non-leaf vertices).

Ternary trees on 0, 1, 2, 3 and 4 vertices. (Leaves not shown except for the tree on zero vertices (green)).

We can view a rooted, ternary tree as a recursive object which is either a leaf or three branches which are themselves rooted ternary trees. These branches are equivalent to beads; the cycle index of the symmetric group S3 that acts on them is then

$Z_{S_3}(t_1,t_2,t_3) = \frac{t_1^3 + 3 t_1 t_2 + 2 t_3}{6}.$

The Polya enumeration theorem then yields a functional equation for the generating function T(x) of the rooted ternary trees:

$T(x) = 1 + x\frac{T(x)^3 + 3 T(x)T(x^2) + 2 T(x^3)}{6}.$

This is equivalent to the following recurrence formula for the number tn of rooted ternary trees with n nodes:

$t_0 = 1$

and

$t_{n+1} = \frac{1}{6} \left(\sum_{a + b + c = n} t_a t_b t_c + 3 \sum_{a + 2b = n} t_a t_b + 2 \sum_{3a = n} t_a \right)$

where a, b and c are nonnegative integers.

The first few values of $t_n$ are

1, 1, 1, 2, 4, 8, 17, 39, 89, 211, 507, 1238, 3057, 7639, 19241 (sequence A000598 in OEIS)

### Colored cubes

How many ways are there to color the sides of a 3-dimensional cube with t colors, up to rotation of the cube? The rotation group C of the cube acts on the six sides of the cube, which are equivalent to beads. Its cycle index is

$Z_C(t_1,t_2,t_3,t_4) = \frac{t_1^6 + 6 t_1^2 t_4 + 3 t_1^2 t_2^2 + 8 t_3^2 + 6 t_2^3}{24}.$

Thus there are

$Z_C(t,t,t,t) = \frac{t^6+ 3t^4 + 12 t^3 + 8 t^2}{24}$

colorings.

## Proof of theorem

The simplified form of the Pólya enumeration theorem follows from Burnside's lemma, which says that the number of orbits of colorings is the average of the number of elements of $Y^X$ fixed by the permutation g of G over all permutations g. The weighted version of the theorem has essentially the same proof, but with a refined form of Burnside's lemma for weighted enumeration. It is equivalent to apply Burnside's lemma separately to orbits of different weight.

For clearer notation, let $x_1,x_2,\ldots$ be the variables of the generating function f of $Y$. Given a vector of weights $\omega$, let $x^\omega$ denote the corresponding monomial term of f. Applying Burnside's lemma to orbits of weight $\omega$, the number of orbits of this weight is

$\frac{1}{|G|} \sum_{g\in G} |(Y^X)_{\omega,g}|$

where $(Y^X)_{\omega,g}$ is the set of colorings of weight $\omega$ that are also fixed by g. If we then sum over all all possible weights, we obtain

$F(x_1,x_2,\ldots)= \frac{1}{|G|} \sum_{g \in G, \omega} x^\omega |(Y^X)_{\omega,g}|.$

Meanwhile g has a cycle structure $j_1,j_2,\ldots,j_n$ which contributes

$t_1^{j_1(g)} t_2^{j_2(g)} \cdots t_n^{j_n(g)}$

to the cycle index of G. The element g fixes an element of $Y^X$ if and only if it is constant on every cycle q of g. The generating function by weight of a cycle q of |q| identical elements from the set of objects enumerated by f is

$f(x_1^{|q|}, x_2^{|q|}, x_3^{|q|}, \ldots).$

It follows that the generating function by weight of the points fixed by g is the product of the above term over all cycles of g, i.e.

$\sum_{\omega} x^\omega |(Y^X)_{\omega,g}| = \prod_{q\in g} f(x_1^{|q|}, x_2^{|q|}, x_3^{|q|}, \ldots),$

which equals

$f(x_1, x_2, \ldots)^{j_1(g)} f(x_1^2, x_2^2, \ldots)^{j_2(g)} \cdots f(x_1^n, x_2^n, \ldots)^{j_n(g)}.$

Substituting this for $\sum_{\omega} x^\omega |(Y^X)_{\omega,g}|\,$ in the sum over all g yields the substituted cycle index as claimed.