cycleindex
Cycle index is a polynomial associated with a permutation group acting on a finite set, used to encode how the group's elements decompose into cycles and to count distinct configurations under symmetry. It plays a central role in Polya’s enumeration theorem, which translates symmetry information into counting formulas for colorings and other labeled structures.
Formally, let G be a finite group acting on a set X of size n. For each
Z_G = (1/|G|) sum_{g in G} ∏_{k≥1} a_k^{c_k(g)},
where a_k are indeterminates. Z_G is a symmetric polynomial in the variables a_k and aggregates the cycle-type
Interpretation and usage: If one colors the elements of X with c colors and asks for the
Examples: For the symmetric group S_3 acting on three points, Z_{S_3} = (1/6)(a1^3 + 3 a1 a2 + 2
Applications include counting colorings and configurations up to symmetry in chemistry, combinatorics, and design of necklaces