constructs the cycle index monomial of the permutation perm in the variables xi.


constructs the cycle index polynomial of group in the variables xi.


  • CycleIndexPolynomial[perm,vars] assumes perm is a permutation acting on the domain {1,,max}, where max is the largest integer moved, as given by PermutationMax[perm].
  • CycleIndexPolynomial[perm,vars,n] denotes that perm acts on a domain of n points, which must be equal to or larger than the largest moved point.
  • CycleIndexPolynomial[perm,{x1,,xk}] returns a monic monomial x1a1x2a2 xkak for a permutation perm whose cyclic structure contains a1 1-cycles, a2 2-cycles, etc.
  • CycleIndexPolynomial[group,{x1,,xk}] returns a polynomial in which the coefficient of the monomial x1a1x2a2 xkak gives the number of group elements whose cyclic structure contains a1 1-cycles, a2 2-cycles, etc., divided by the order of the group. It is the average of the cycle index monomials of its elements.
  • Variables corresponding to cycle lengths not present in the elements of the group are ignored.
  • If the elements of the group contain cycle lengths beyond the number of variables provided, then the result effectively uses a value 1 for those missing variables.
  • The length of the cycles of a permutation or a permutation group is always bounded above by the length of their support, as given by PermutationLength. Hence, this is a safe estimate for the number of variables to include as the second argument of CycleIndexPolynomial.


open allclose all

Basic Examples  (2)

Cycle index monomial of a permutation:

Cycle index polynomial for the alternating group on five points:

Scope  (4)

Cycle index monomial of permutations:

Specify the size of the domain of action:

Cycle index polynomial of permutation groups:

Specify the size of the domain of action:

Applications  (1)

Cycle index polynomials are essential in Pólya's theory of counting. The classical example is counting how many necklaces can be formed with beads of different colors:

Suppose there is a necklace with 10 beads, invariant under cyclic rotations:

Suppose that there are beads of three colors, denoted by r, g, b:

For instance, there are 252 necklaces with three r beads, five g beads and two b beads:

This can be checked by actual construction of the necklaces:

If the necklace is considered to also be invariant under reflections along a diameter, then the symmetry group is dihedral:

Now the counts are different:

Properties & Relations  (4)

The identity permutation has degree zero and hence does not move any point:

If it acts on a set with four points, then the cycle index polynomial reflects the existence of four singletons:

Each point not moved contributes a multiplication by the first variable:

Missing variables are effectively replaced by 1:

The cycle index polynomial of a direct product of groups is the product of the cycle index polynomial of the groups:

Introduced in 2012