Back to Combinatorics

Chapter 14: Group Actions and Symmetry

October 11, 2026 Wasil Zafar 26 min read

Count patterns up to rotation, reflection, and relabeling

Table of Contents

  1. How many necklaces remain distinct after rotation?
  2. 14.1 Permutation and symmetry groups, orbits
  3. 14.2 Burnside's lemma
  4. 14.3 Pólya enumeration and pattern inventory
  5. 14.4 Orbit–stabilizer theorem
  6. 14.5 Cycle index polynomials
  7. 14.6 Necklace and bracelet enumeration
  8. 14.7 Primitive necklaces and Lyndon words
  9. 14.8 Symmetry-aware enumeration and canonical representatives
  10. Compute a cycle index and count symmetry classes

How many necklaces remain distinct after rotation?

Imagine designing a circular bead necklace with four equally spaced spots ($n=4$), where each bead can be colored either black or white. If the necklace has a fixed clasp marking position zero, there are $2^4 = 16$ distinct labeled binary strings. However, if we remove the clasp and allow the necklace to rotate freely in space, several different strings describe the exact same physical necklace!

What, Why, and Real-World Applications:

  • What is Group Action Enumeration? It is the branch of combinatorics that counts distinct physical objects up to structural symmetry (such as rotations, reflections, or swaps).
  • Why Naive Division Fails: Simply dividing total string count by the number of rotations ($16 / 4 = 4$) yields an incorrect answer. This naive calculation assumes that every necklace looks different under all four rotations. While asymmetric necklaces have $4$ distinct views, highly symmetric necklaces (like all-white 0000 or alternating 0101) look identical under some rotations. Group action techniques handle these varying symmetries seamlessly.
  • Applications:
    • Chemistry & Drug Design: Counting distinct chemical isomers of cyclic molecules (e.g., benzene ring derivatives).
    • Computer Architecture & IC Design: Identifying unique rotational configurations of pinouts and printed circuit board layouts.
    • Cryptography & Coding Theory: Designing cyclic error-correcting codes and shift-register sequences.
    • Tile & Textile Patterns: Finding non-redundant decorative layouts under rotational and reflective symmetry.

We will keep the colors distinguishable and allow repeated colors. At first, turning the necklace over is not an allowed identification. That choice matters: rotation gives necklaces, while rotation together with reflection gives bracelets. Neither operation automatically exchanges black and white.

4-Bead Necklace Rotational Orbit Collapse Diagram showing 4 shifted binary words collapsing into 1 physical necklace orbit under 90-degree rotations. Rotational Equivalence: 4 Labeled Strings Collapse into 1 Physical Orbit 4 Distinct Labeled Strings (Clasp Attached) 0001 1000 0100 0010 • All 4 strings represent the same 1-black bead necklace. • Rotations shift black bead position: 0 ➔ 1 ➔ 2 ➔ 3. • String count = 4, but Physical Orbit Count = 1. 1 Single Physical Orbit (No Clasp) Orbit Representative: [0001] Key Rule: 16 total labeled binary strings collapse into exactly 6 distinct physical necklace orbits! ✓
Figure 14.0: Four labeled binary strings collapsing into a single physical necklace orbit under quarter-turn rotations.

The prerequisites Permutations and Combinations and Permutation Structure supply permutation notation and disjoint cycles. The small amount of abstract algebra needed here is developed directly below; the course roadmap lists the broader abstract-algebra background.

Motivating Problem

How many necklaces remain distinct after rotation?

Inputs. Positions are $0,1,2,3$ clockwise around a square, with $0$ meaning white and $1$ meaning black. A clockwise quarter-turn moves the entry at position $i$ to position $i+1$ modulo $4$. Its action on a displayed word is therefore a right cyclic shift.

Trace three examples:

Initial wordSuccessive quarter-turn viewsNumber of distinct views
00000000 → 0000 → 0000 → 00001
01010101 → 1010 → 0101 → 10102
00010001 → 1000 → 0100 → 00104

Group all $16$ words by rotation, choosing the smallest binary word in each group. Before continuing, predict how many groups there are and explain why simply dividing by $4$ misses some of them.

Checkpoint. The representatives are 0000, 0001, 0011, 0101, 0111, and 1111. Their class sizes are $1,4,4,2,4,1$, which sum to $16$. We will recover the answer $6$ without listing every word.

14.1 Permutation and symmetry groups, orbits

A group is a set $G$ with a multiplication that is closed and associative, an identity $e$, and an inverse $g^{-1}$ for every $g\in G$. For permutations, multiplication means composition: throughout this chapter, $(gh)(i)=g(h(i))$, so the rightmost permutation acts first. A permutation group on a finite set $P$ is a collection of permutations of $P$ satisfying these conditions.

For $P=\{0,1,2,3\}$, let $\rho=(0\,1\,2\,3)$. The rotations form the cyclic group

$$ C_4=\{e,\rho,\rho^2,\rho^3\},\qquad \rho^4=e. $$

Products add exponents modulo $4$, so closure holds; the inverse of $\rho^j$ is $\rho^{4-j}$, with exponents interpreted modulo $4$. Associativity comes from composition of functions. The order of this group is $|C_4|=4$.

A group acts on a set $X$ when each $g\in G$ gives a transformation $x\mapsto g\cdot x$ satisfying

$$ e\cdot x=x,\qquad (gh)\cdot x=g\cdot(h\cdot x). $$

Here positions and configurations are different sets. The group permutes the four positions in $P$, and thereby acts on the $16$ colorings in $X=\{0,1\}^P$. For a coloring $f:P\to\{0,1\}$, define

$$ (g\cdot f)(i)=f(g^{-1}(i)). $$

This sends the color originally at $i$ to $g(i)$. The inverse ensures the action law: $(gh)^{-1}=h^{-1}g^{-1}$, so evaluating both sides gives the same original entry.

The orbit of $x$ is the set of all configurations reachable by allowed symmetries:

$$ G\cdot x=\{g\cdot x:g\in G\}. $$

Being in the same orbit is an equivalence relation. Identity gives reflexivity, inverses give symmetry, and multiplication gives transitivity. Thus the orbits partition $X$; write $X/G$ for the set of orbits.

Cyclic C4 Rotations vs Dihedral D4 Symmetries Diagram showing the 4 rotations of C4 versus the 8 elements of D4 including 4 reflection axes on a square. Symmetry Group Hierarchy: Cyclic C₄ (Rotations) vs. Dihedral D₄ (Bracelets) 1. Cyclic Group C₄ (|C₄| = 4 Rotations) 0 1 2 3 ρ (+90°) • Rotations: {e, ρ, ρ², ρ³} • Preserves cyclic ordering. • Defines 2D Necklace orbits. • Total orbits = 6 classes. 2. Dihedral Group D₄ (|D₄| = 8: Rotations + Reflections) • 4 Rotations + 4 Reflections • Allows flipping over in 3D. • Defines 3D Bracelet orbits. • Total orbits = 6 classes (D₄). Rule: Orbits depend entirely on the chosen group action! State allowed symmetries before counting. ✓
Figure 14.1: Comparison between Cyclic Group $C_4$ (rotations only) and Dihedral Group $D_4$ (rotations plus reflections).

Worked example. Under $C_4$, the orbit of 0011 is $\{0011,1001,1100,0110\}$. The orbit of 0101 is $\{0101,1010\}$. Both words have two black beads, but their orbits differ: in the first, the black beads are adjacent; in the second, they are opposite. The number of black beads is an invariant, a quantity unchanged by the action, but it does not completely identify an orbit.

We can enlarge the group. Let $\tau(i)=-i\pmod4$. This reflection fixes positions $0,2$ and exchanges $1,3$. Rotations and this reflection generate

$$ D_4=\{\rho^j,\rho^j\tau:0\le j\lt4\},\qquad \tau^2=e,\qquad \tau\rho\tau=\rho^{-1}. $$

Our convention is $|D_n|=2n$ for a regular $n$-gon, with $n\ge3$. Reflections reverse cyclic order, while rotations preserve it. If all position relabelings are allowed instead, the group is $S_4$, of order $4!=24$; it sends any two-black-bead placement to any other. Under $S_4$, black-bead count is a complete invariant and there are $5$ orbits.

Exercise. Find the $C_4$ orbit of 0111. Does adding reflections change this orbit? Hint: locate the unique white bead. Answer: $\{0111,1011,1101,1110\}$; reflection adds no new word because rotations already put that white bead at every position.

14.2 Burnside's lemma

A configuration $x$ is fixed by $g$ when $g\cdot x=x$. Write

$$ \operatorname{Fix}_X(g)=\{x\in X:g\cdot x=x\}. $$

For a finite group $G$ acting on a finite set $X$, Burnside's lemma (also known as the Cauchy–Frobenius Lemma) states:

$$ |X/G|=\frac1{|G|}\sum_{g\in G}|\operatorname{Fix}_X(g)|. $$

Thus we average fixed-configuration counts over group elements. We do not average orbit sizes. This finite-action formulation is also given in Klaus Sutner's Group Actions and Counting notes. cs.cmu.edu

Proof by double counting. Consider

$$ \mathcal F=\{(g,x)\in G\times X:g\cdot x=x\}. $$

Counting first by $g$ gives $|\mathcal F|=\sum_g|\operatorname{Fix}_X(g)|$. Counting first by $x$ gives $|\mathcal F|=\sum_x|G_x|$, where $G_x=\{g:g\cdot x=x\}$ is the stabilizer of $x$.

For a fixed $x$, the map $g\mapsto g\cdot x$ reaches every element of its orbit. Every fiber has $|G_x|$ elements: if $g_0\cdot x=y$, then exactly the elements $g_0h$, with $h\in G_x$, send $x$ to $y$. Hence $|G|=|G\cdot x|\,|G_x|$.

An orbit $O$ consequently contributes

$$ \sum_{x\in O}|G_x|=\sum_{x\in O}\frac{|G|}{|O|}=|G| $$

to the second count. Each orbit contributes the same amount, even though its size may differ. Therefore $|\mathcal F|=|G|\,|X/G|$, proving the lemma. Section 14.4 examines the fiber argument in more detail.

For colorings of positions, fixed points are easy to count from cycles. A coloring fixed by $g$ must be constant along each cycle of $g$ on $P$, because repeatedly applying $g$ moves a color around that cycle. Conversely, choosing one color independently for every cycle produces a fixed coloring. With $q$ distinguishable colors and $c(g)$ position cycles, including singleton cycles,

$$ |\operatorname{Fix}_{\{1,\ldots,q\}^P}(g)|=q^{c(g)}. $$

Here a position fixed by $g$ is only a cycle of length $1$; it is not the same thing as a whole configuration fixed by $g$.

Burnside Lemma Fixed Point Counting Breakdown Visual breakdown of Burnside Lemma average calculation summing fixed colorings across all 4 elements of C4. Burnside's Lemma Averaging Calculation: 4-Bead 2-Color Necklaces g = e (0° Shift) • Cycles: (0)(1)(2)(3) • Cycle count c(e) = 4 • Fixed: 2⁴ = 16 words |Fix(e)| = 16 g = ρ (90° Shift) • Cycles: (0 1 2 3) • Cycle count c(ρ) = 1 • Fixed: 2¹ = 2 words |Fix(ρ)| = 2 g = ρ² (180° Shift) • Cycles: (0 2)(1 3) • Cycle count c(ρ²) = 2 • Fixed: 2² = 4 words |Fix(ρ²)| = 4 g = ρ³ (270° Shift) • Cycles: (0 3 2 1) • Cycle count c(ρ³) = 1 • Fixed: 2¹ = 2 words |Fix(ρ³)| = 2 Burnside Average: |X/C₄| = (16 + 2 + 4 + 2) / 4 = 24 / 4 = 6 Distinct Necklaces ✓
Figure 14.2: Step-by-step application of Burnside's Lemma averaging fixed points across $C_4$.

Exercise. How many three-color necklaces have four beads? Hint: the four rotation cycle counts are $4,1,2,1$. Solution: $(3^4+3+3^2+3)/4=24$.

Proof Workshop

Burnside's lemma: a worked example

Return to four beads and two colors under rotation only. The group $C_4$ is finite, the set $X$ contains all $16$ binary colorings, and rotating any coloring stays in $X$; the action law was checked in Section 14.1. Every hypothesis of Burnside's lemma holds.

ElementCycles on positionsFixed wordsFixed count
$e$$(0)(1)(2)(3)$Every binary word$16$
$\rho$$(0\,1\,2\,3)$0000, 1111$2$
$\rho^2$$(0\,2)(1\,3)$0000, 0101, 1010, 1111$4$
$\rho^3$$(0\,3\,2\,1)$0000, 1111$2$

For example, the half-turn requires entries $0,2$ to agree and entries $1,3$ to agree. There are two independent binary choices, so $2^2=4$ fixed words.

Burnside now gives

$$ |X/C_4|=\frac{16+2+4+2}{4}=6, $$

matching the six classes listed in the motivating problem.

Composition check. Restrict $X$ to words with exactly two black beads. This subset is rotation-invariant. The identity fixes $\binom42=6$ such words; the quarter-turns fix none; the half-turn fixes 0101 and 1010. The restricted count is $(6+0+2+0)/4=2$, represented by adjacent and opposite black beads. The fixed counts must be recomputed for the restricted set; unrestricted counts would answer a different question.

14.3 Pólya enumeration and pattern inventory

Burnside gives a total. Pólya enumeration also records how much of each color an orbit uses. Introduce formal variables $R$ and $B$ for the two distinguishable colors. A coloring with $r$ red beads and $b$ blue beads has weight $R^rB^b$. These variables are bookkeeping devices, not numerical probabilities.

The pattern inventory is

$$ I_G(R,B)=\sum_{O\in X/G}R^{r(O)}B^{b(O)}, $$

where the exponents are well-defined because position permutations preserve color counts. Thus the coefficient of $R^rB^b$ counts orbits of that composition, with each orbit contributing once.

If a position cycle has length $j$, coloring the entire cycle red contributes $R^j$ and coloring it blue contributes $B^j$. Its fixed-coloring factor is $R^j+B^j$. If $g$ has $c_j(g)$ cycles of length $j$, independence between cycles gives

$$ F_g(R,B)=\prod_{j=1}^n(R^j+B^j)^{c_j(g)}. $$

The finite-color form of Pólya's theorem is

$$ I_G(R,B)=\frac1{|G|}\sum_{g\in G}F_g(R,B). $$

Why averaging still works. Repeat the double count of Section 14.2, assigning weight $R^{r(x)}B^{b(x)}$ to each fixed pair $(g,x)$. All elements of one orbit have the same weight. That orbit contributes $|G|$ times its weight before division by $|G|$. The same proof works with any finite list of distinguishable colors: replace $R^j+B^j$ by the sum of the $j$th powers of their variables. Sutner's Pólya–Redfield notes present the pattern inventory in this form. cs.cmu.edu

Worked example. For the four rotations,

$$ I_{C_4}(R,B)=\frac14\left((R+B)^4+2(R^4+B^4)+(R^2+B^2)^2\right). $$

Expanding gives

$$ I_{C_4}(R,B)=R^4+R^3B+2R^2B^2+RB^3+B^4. $$

For example, the coefficient of $R^2B^2$ is $(6+0+2)/4=2$. Substituting $R=B=1$ gives $6$, while substituting $R=1,B=t$ gives $1+t+2t^2+t^3+t^4$, counting necklaces by blue-bead number.

The diagram isolates the half-turn contribution. Its two cycles receive colors independently, giving four fixed words. The two mixed choices have the same weight, so the coefficient $2$ in $(R^2+B^2)^2$ counts two fixed labeled words. After averaging over all rotations, the coefficient $2$ in the final inventory counts two orbits, illustrated below as adjacent and opposite blue beads. These are different counting stages.

Half-turn cycles and the two two-blue-bead necklace classes The half-turn on positions zero through three has cycles zero two and one three. Choosing red or blue for each cycle gives RRRR, RBRB, BRBR, and BBBB, with weights R to the fourth, R squared B squared twice, and B to the fourth. At the bottom, RRBB and RBRB represent the adjacent and opposite two-blue-bead rotation classes. Half-turn: two independently colored cycles 01 23 Cycle A: (0 2) Cycle B: (1 3) A colorB color Word 0–3Weight RRRRRRR⁴ RBRBRBR²B² BRBRBRR²B² BBBBBBB⁴ Final inventory: two orbits with two blue beads R = red, B = blue; positions are read clockwise from the upper left. RRBB RRBB: adjacent blue beads Four distinct rotation views RBRB RBRB: opposite blue beads Two rotation views
Figure 14.3: Half-turn cycles and the two resulting two-blue-bead necklace orbit representatives.

Exercise. Introduce a third color variable $G$. How many four-bead rotation classes have composition $R^2BG$? Hint: only the identity can fix a coloring with exactly one blue and one green bead. Solution: the identity term contributes $4!/(2!1!1!)=12$ labeled colorings, so the coefficient after averaging is $12/4=3$.

14.4 Orbit–stabilizer theorem

For a finite group acting on a set, the orbit–stabilizer theorem states:

$$ |G\cdot x|=\frac{|G|}{|G_x|}. $$

The set $G_x$ is a subgroup: the identity fixes $x$; if $h,k$ fix $x$, then $hk$ fixes $x$; and $h^{-1}$ fixes $x$ whenever $h$ does. A left coset is a set $gG_x=\{gh:h\in G_x\}$. Each coset has $|G_x|$ elements because multiplication by $g$ is bijective.

Proof. Two elements $g,k\in G$ send $x$ to the same configuration exactly when

$$ g\cdot x=k\cdot x \quad\Longleftrightarrow\quad k^{-1}g\in G_x \quad\Longleftrightarrow\quad g\in kG_x. $$

Therefore the left cosets are precisely the fibers of $g\mapsto g\cdot x$. They partition $G$ and correspond bijectively to orbit elements. Counting elements proves the formula. No assumption that every group element produces a different configuration is needed.

Orbit-Stabilizer Theorem Tradeoff Mechanism Diagram demonstrating the inverse relationship between orbit size and stabilizer size across three distinct word configurations. Orbit–Stabilizer Theorem: |Orbit| × |Stabilizer| = |G| = 4 1. High Symmetry: x = 0000 • Stabilizer G_x: {e, ρ, ρ², ρ³} |G_x| = 4 (Maximal) • Orbit G·x: {[0000]} |G·x| = 4 / 4 = 1 (Minimal) 1 × 4 = 4 ✓ 2. Partial Symmetry: x = 0101 • Stabilizer G_x: {e, ρ²} |G_x| = 2 (Half-turn) • Orbit G·x: {0101, 1010} |G·x| = 4 / 2 = 2 views 2 × 2 = 4 ✓ 3. Asymmetric: x = 0011 • Stabilizer G_x: {e} |G_x| = 1 (Trivial) • Orbit G·x: 4 distinct words |G·x| = 4 / 1 = 4 (Full size) 4 × 1 = 4 ✓ Fundamental Theorem: Orbit Size = |G| / |Stabilizer|. High symmetry ➔ Small orbit; Low symmetry ➔ Large orbit! ✓
Figure 14.4: The inverse relationship between stabilizer size and orbit size dictated by the Orbit–Stabilizer Theorem.

Worked examples under $C_4$. The stabilizer of 0000 is all four rotations, giving orbit size $4/4=1$. The stabilizer of 0101 is $\{e,\rho^2\}$, giving size $4/2=2$. Only the identity fixes 0011, giving size $4/1=4$.

An action is free when every stabilizer is $\{e\}$. For a finite free action, all orbits have size $|G|$ and ordinary division is justified. The unrestricted necklace action is not free.

Under $D_4$, 0101 has the same two-element orbit, but now its stabilizer has four elements: $e,\rho^2,\tau,\rho^2\tau$. These preserve its white positions $\{0,2\}$ and black positions $\{1,3\}$. Enlarging a group can enlarge a stabilizer without enlarging that particular orbit.

For arbitrary position relabeling by $S_n$, a word with $r$ black and $n-r$ white entries has stabilizer size $r!(n-r)!$: permutations may rearrange black positions internally and white positions internally. The theorem gives

$$ |S_n\cdot x|=\frac{n!}{r!(n-r)!}=\binom nr, $$

recovering the number of labeled placements with that composition.

Exercise. Under $C_6$, what are the stabilizer and orbit size of 010101? Hint: an even shift preserves the word. Answer: $G_x=\{e,\rho^2,\rho^4\}$ and the orbit has size $6/3=2$. For 000111, no nonidentity rotation fixes the word, so its orbit has size $6$.

14.5 Cycle index polynomials

Optional extension. This section organizes fixed-point calculations into a reusable polynomial. It is not required to complete the chapter foundation; Section 14.6 can be read directly using Burnside's lemma.

For a finite group $G$ acting on a position set $P$ of size $n$, let $c_j(g)$ count the length-$j$ cycles of the induced position permutation. Introduce independent formal variables $a_1,\ldots,a_n$. The cycle index of this action is

$$ Z_{G,P}(a_1,\ldots,a_n) =\frac1{|G|}\sum_{g\in G}\prod_{j=1}^n a_j^{c_j(g)}. $$

Since cycles partition the positions, $\sum_j j\,c_j(g)=n$. Every monomial therefore has weighted degree $n$ when $a_j$ has weight $j$. Also $Z_{G,P}(1,\ldots,1)=1$, because its coefficients record proportions of group elements.

Cycle Index Monomial Decomposition for C4 Diagram showing how permutation cycle structures map to algebraic monomials a_1^4, a_2^2, and a_4^1 in the cycle index polynomial. Cycle Index Polynomial Z_{C₄,P}(a₁, a₂, a₃, a₄) Construction 1. Group Element Cycle Structures ➔ Monomials • g = e: 4 length-1 cycles (0)(1)(2)(3) ➔ a₁⁴ • g = ρ: 1 length-4 cycle (0 1 2 3) ➔ a₄¹ • g = ρ²: 2 length-2 cycles (0 2)(1 3) ➔ a₂² • g = ρ³: 1 length-4 cycle (0 3 2 1) ➔ a₄¹ Z_{C₄} = ¼ (a₁⁴ + a₂² + 2a₄) 2. Reusable Substitution Tool • Unrestricted q Colors: Set a_j = q Z_{C₄}(q) = ¼ (q⁴ + q² + 2q) • Pólya Pattern Inventory: Set a_j = Rʲ + Bʲ Z_{C₄}(Rʲ+Bʲ) = ¼ [(R+B)⁴ + (R²+B²)² + 2(R⁴+B⁴)] 1 Polynomial solves ALL color counts! ✓ General Formula: Z_{C_n} = (1/n) Σ_{d|n} φ(d) a_d^{n/d}, where φ(d) is Euler's totient function. ✓
Figure 14.5: Construction and versatile substitution properties of the Cycle Index polynomial.

The action matters as much as the abstract group: rotating the vertices of a square and rotating those vertices together with a fixed center give different cycle indices. Every element acquires an extra singleton cycle in the second action, so its index is multiplied by $a_1$.

Worked example. Our $C_4$ cycle table gives

$$ Z_{C_4,P}=\frac14(a_1^4+a_2^2+2a_4). $$

Setting every $a_j=q$ gives the unrestricted $q$-color orbit count, $(q^4+q^2+2q)/4$. Substituting $a_j=R^j+B^j$ gives Section 14.3's inventory. By contrast, substituting $a_j=(R+B)^j$ would allow different colors inside one cycle and would not count fixed colorings correctly.

For rotations of $n$ positions,

$$ Z_{C_n,P}=\frac1n\sum_{d\mid n}\varphi(d)a_d^{n/d}, $$

where $\varphi(d)$ is Euler's totient: the number of integers $1\le u\le d$ relatively prime to $d$, including $\varphi(1)=1$. To prove the formula, a shift by $k$ has $\gcd(n,k)$ cycles, each of length $n/\gcd(n,k)$. A specified cycle length $d\mid n$ occurs for $k=(n/d)u$ with $u$ relatively prime to $d$, giving $\varphi(d)$ shifts. Interpret $k=0$ as the identity, with $d=1$.

For comparison, the action of $S_n$ on $n$ positions has

$$ Z_{S_n,P}=\sum_{\substack{c_1,\ldots,c_n\ge0\\\sum_j j c_j=n}} \frac{\prod_{j=1}^n a_j^{c_j}}{\prod_{j=1}^n j^{c_j}c_j!}. $$

Indeed, arranging labels into cycles gives $n!$ possibilities before dividing by $j$ for the cyclic starting point of each length-$j$ cycle and by $c_j!$ for the order of those cycles. Dividing again by $|S_n|=n!$ gives the displayed coefficient. For $n=3$, this is $(a_1^3+3a_1a_2+2a_3)/6$. Two-color substitution counts $4$ orbits, determined by the number of black entries.

Exercise. Compute the rotation cycle index for a hexagon. Hint: list the divisors $1,2,3,6$ and their totients $1,1,2,2$. Answer:

$$ Z_{C_6,P}=\frac16(a_1^6+a_2^3+2a_3^2+2a_6). $$

Check that its coefficients sum to $1$ and every monomial has weighted degree $6$.

14.6 Necklace and bracelet enumeration

A $q$-color necklace is an orbit of length-$n$ words under $C_n$. A $q$-color bracelet is an orbit under $D_n$, allowing rotations and reflections. Colors remain distinguishable, repetitions are allowed, and every position is colored. Assume $q\ge1$; necklace formulas hold for $n\ge1$, while our geometric bracelet discussion assumes $n\ge3$.

Let $N_n(q)$ denote the necklace count. A shift by $k$ has $\gcd(n,k)$ cycles: starting at one position and repeatedly adding $k$ returns after $n/\gcd(n,k)$ steps. Burnside gives

$$ N_n(q)=\frac1n\sum_{k=0}^{n-1}q^{\gcd(n,k)} =\frac1n\sum_{d\mid n}\varphi(d)q^{n/d}, $$

using $\gcd(n,0)=n$. The second equality groups shifts by their cycle lengths, as explained in Section 14.5.

Worked example. For six binary beads,

$$ N_6(2)=\frac{2^6+2^3+2\cdot2^2+2\cdot2}{6}=14. $$

Necklace vs Bracelet Symmetry Merger for 6 Beads Diagram showing two distinct 6-bead necklaces 001011 and 001101 merging into 1 single bracelet orbit under 3D reflection. Necklaces (Rotations Only) vs. Bracelets (Rotations + 3D Reflections) 1. Cyclic Rotations C₆: 2 Distinct Necklaces 001011 001101 • No 2D planar rotation transforms 001011 into 001101. • N₆(2) = 14 distinct necklaces. 2. Dihedral Symmetries D₆: 1 Merged Bracelet Orbit [001011] ≡ [001101] (Flipped) • 3D flip (reflection) converts 001011 into its mirror 001101. • B₆(2) = 13 distinct bracelets (1 mirror pair merged!). Bracelet Formula B_n(q): Adds 3D reflection axis terms to collapse chiral mirror pairs into single orbits! ✓
Figure 14.6: Mirror pair merger under 3D reflection turning two distinct $C_6$ necklaces into one $D_6$ bracelet.

To count bracelets, retain this rotation contribution and add reflections. With positions indexed modulo $n$, every reflection has the form $s_j(i)=j-i$. It is an involution, so its cycles have length $1$ or $2$. A fixed position satisfies $2i=j\pmod n$.

For odd $n$, each reflection fixes one position and exchanges $(n-1)/2$ pairs, giving $(n+1)/2$ cycles. For even $n$, the $n/2$ even values of $j$ give two fixed positions and $(n-2)/2$ pairs; the $n/2$ odd values give no fixed positions and $n/2$ pairs. Geometrically these are axes through opposite vertices and axes through opposite edges.

Consequently the bracelet count is

$$ B_n(q)=\begin{cases} \displaystyle\frac{nN_n(q)+nq^{(n+1)/2}}{2n},&n\text{ odd},\\[6pt] \displaystyle\frac{nN_n(q)+\frac n2 q^{n/2+1}+\frac n2 q^{n/2}}{2n},&n\text{ even}. \end{cases} $$

For $n=6,q=2$, the rotation contribution is $84$. Three reflections have four cycles and three have three cycles, so

$$ B_6(2)=\frac{84+3\cdot16+3\cdot8}{12}=13. $$

This is not $14/2$: many necklaces are equivalent to their own mirror images. The rotational representatives 001011 and 001101 are a distinct mirror pair that becomes one bracelet; their six rotations can be listed to verify that they are not rotationally equivalent. Among the $14$ binary six-bead necklaces, the other $12$ are each equivalent to their own mirror image.

For a specified number $r$ of black beads, use a variable $t$ for black and weight $1$ for white. A cycle of length $j$ contributes $1+t^j$. Grouping rotation cycles gives the refinement

$$ N_{n,r}=\frac1n\sum_{d\mid\gcd(n,r)}\varphi(d)\binom{n/d}{r/d},\qquad 0\le r\le n. $$

A length-$d$ cycle contributes either $0$ or $d$ black beads, so only $d\mid r$ contributes. The binomial coefficient chooses the $r/d$ black cycles from $n/d$ cycles. For $r=0$, use $\gcd(n,0)=n$.

Exercise. Count five-bead binary necklaces and bracelets, then restrict to exactly two black beads. Hint: a nonidentity rotation of five positions has one cycle. Solution: $N_5(2)=(32+4\cdot2)/5=8$, and $B_5(2)=(40+5\cdot8)/10=8$. With exactly two black beads, necklaces number $\binom52/5=2$, represented by adjacent black beads and black beads separated by one white bead. Each reflection fixes two such placements, giving $(10+5\cdot2)/10=2$ bracelets as well.

14.7 Primitive necklaces and Lyndon words

Optional extension. Here we distinguish genuinely length-$n$ patterns from repetitions of shorter patterns. This section is not required for the chapter foundation.

A nonempty word is primitive if it cannot be written $u^m$ with $m\ge2$ and $u$ shorter. For cyclic words, this is equivalent to having no nonidentity rotation fix the word. To see the nontrivial direction, if a shift by $k$ fixes a length-$n$ word, entries agree along its cycles. With $d=\gcd(n,k)$, positions with the same residue modulo $d$ agree, so the word repeats its first $d$ entries $n/d$ times.

Thus 010101 is not primitive: it is (01) repeated three times. The word 000111 is primitive. An ordinary linear string period need not divide the length, so “period” here always refers to cyclic repetition by a block whose length divides $n$.

Primitive Necklaces vs Periodic Necklaces & Lyndon Words Diagram classifying 4-bead binary necklaces into periodic (0000, 0101, 1111) versus primitive Lyndon words (0001, 0011, 0111). Length 4 Binary Necklaces: Periodic (Sub-period) vs. Primitive Lyndon Words 1. Periodic Necklaces (Repeats Shorter Block u^m) • 0000 = (0)⁴ ➔ Period d = 1 • 0101 = (01)² ➔ Period d = 2 • 1111 = (1)⁴ ➔ Period d = 1 Fixed by non-identity rotations! NOT Primitive ✗ 2. Primitive Lyndon Words L₄(2) = 3 Necklaces • 0001: Strictly smaller than 1000, 0100, 0010 • 0011: Strictly smaller than 1001, 1100, 0110 • 0111: Strictly smaller than 1110, 1101, 1011 Full Orbit Size = 4! Exactly 3 Lyndon Words ✓ Möbius Inversion Formula: L_n(q) = (1/n) Σ_{d|n} μ(d) q^{n/d} counts primitive Lyndon necklaces! ✓
Figure 14.7: Separation of 4-bead binary necklaces into periodic strings vs. primitive Lyndon words.

Let $A_n(q)$ count primitive labeled words. Every length-$n$ word has a unique shortest repeated block, of some length $d\mid n$, and that block is primitive. Uniqueness follows by taking the smallest positive shift that fixes the word, allowing the full shift $n$. If this smallest shift is $d$, division with remainder shows that every fixing shift is a multiple of $d$: otherwise its remainder would be a smaller positive fixing shift. Since $n$ fixes every word, $d\mid n$, and the first $d$ entries form the unique shortest repeated block. Therefore

$$ q^n=\sum_{d\mid n}A_d(q). $$

Define the Möbius function by $\mu(1)=1$, by $\mu(d)=0$ when a prime square divides $d$, and by $\mu(d)=(-1)^s$ when $d$ is a product of $s$ distinct primes. Its divisor sums satisfy $\sum_{d\mid m}\mu(d)=0$ for $m\gt1$, and equal $1$ for $m=1$: only square-free divisors contribute, and their signs sum to $(1-1)^s$.

Substituting the preceding divisor identity gives

$$ \begin{aligned} \sum_{d\mid n}\mu(d)q^{n/d} &=\sum_{d\mid n}\mu(d)\sum_{e\mid n/d}A_e(q)\\ &=\sum_{e\mid n}A_e(q)\sum_{d\mid n/e}\mu(d) =A_n(q). \end{aligned} $$

Every primitive rotation orbit has exactly $n$ elements by orbit–stabilizer. Hence the primitive necklace count is

$$ L_n(q)=\frac{A_n(q)}n=\frac1n\sum_{d\mid n}\mu(d)q^{n/d}. $$

These formulas and their relation to primitive representatives are also developed in Sutner's Möbius Inversion notes. cs.cmu.edu

Order the alphabet, for example $0\lt1$, and compare equal-length words lexicographically: inspect the first position where they differ. A Lyndon word is a nonempty primitive word strictly smaller than each of its nontrivial rotations. Each primitive necklace has one such word, its unique smallest rotation; a repeated word cannot satisfy the strict inequality because some nontrivial rotation equals it.

Worked example. The binary Lyndon words of length $4$ are 0001, 0011, and 0111. The other three canonical necklace representatives, 0000, 0101, and 1111, are not primitive. The formula confirms

$$ L_4(2)=\frac{2^4-2^2}{4}=3. $$

For length $6$, the four divisors give $A_6(2)=64-8-4+2=54$, and therefore $L_6(2)=9$. The added $2$ restores constant words subtracted in both repetition cases.

Exercise. How many binary primitive necklaces have length $5$? Hint: the only proper repeated-block length dividing $5$ is $1$. Solution: $A_5(2)=32-2=30$ labeled words and $L_5(2)=30/5=6$ necklaces. Both constant words are excluded.

14.8 Symmetry-aware enumeration and canonical representatives

Optional extension. This section turns the orbit viewpoint into an explicit enumeration method. It is not required for the chapter foundation.

A canonical representative chooses one deterministic element from each orbit. For words over an ordered alphabet, define

$$ \operatorname{can}_{C_n}(w)=\min_{0\le k\lt n}\operatorname{rot}_k(w), $$

where $\operatorname{rot}_k$ is a cyclic shift by $k$. For bracelets, define

$$ \operatorname{can}_{D_n}(w) =\min\left(\{\operatorname{rot}_k(w):0\le k\lt n\} \cup\{\operatorname{rot}_k(w^{\mathrm{rev}}):0\le k\lt n\}\right), $$

where $w^{\mathrm{rev}}$ reverses the displayed word. Reversal followed by shifts gives exactly the reflections needed for a bracelet orbit. Left shifts or right shifts may be used consistently here; listing all shifts gives the same set.

Canonical Representative Filtering Pipeline Flowchart diagram showing raw binary strings generated, evaluated for orbit rotations, filtered to lexicographical minimums, and deduped into canonical representatives. Canonical Representative Pipeline: Deduplicating Equivalences via Lexicographical Minimum 1. Generate All Words 0000, 0001 0010, 0011 0100, 0101 ... qⁿ total inputs 2. Generate Orbit Views • Apply all g ∈ G • Rotations rot_k(w) • Reflections rot_k(wʳᵉᵛ) Orbit Set G·w 3. Find Lex Minimum • can(w) = min(G·w) • Unique deterministic representative key Deterministic Key 4. Deduplicated Set 0000 0001 0011 0101, 0111, 1111 Exactly 6 Orbits! ✓ Correctness Principle: Orbit equality if and only if Canonical Representative equality! ✓
Figure 14.8: The canonical representative pipeline for deterministic orbit deduplication.

Why this works. If $v=g\cdot w$, then $G\cdot v=G\cdot w$, because multiplication by $g$ permutes the group elements used to generate the orbit. Thus equivalent words have the same minimum. Conversely, equal minima belong to both orbits; orbits that intersect are equal. Therefore canonical equality is equivalent to orbit equality, not merely a necessary test.

A simple finite enumeration procedure is:

  1. Generate all $q^n$ labeled words, or all words satisfying an invariant composition restriction.
  2. For each word, generate its $n$ rotations, adding the $n$ shifted reversals when reflections are allowed.
  3. Keep the minimum of these views and insert it into a set.
  4. Sort the resulting set to list one representative per orbit.

This exhaustive method proves completeness for the given finite instance when all inputs and all allowed views are included. Its naive implementation uses $O(n^2)$ work per word to construct and compare the length-$n$ views, so $O(q^n n^2)$ total work. It is a useful validator for small instances; these bounds make no claim of an efficient large-instance generator.

Worked example. Rotating 110010 gives the same canonical necklace representative as rotating 001011, namely 001011. Reversing 001011 yields 110100, whose minimum rotation is 001101. Thus the two distinct necklace representatives 001011 and 001101 share the bracelet representative 001011. An inventory count by black-bead number alone cannot detect this mirror pairing.

If colors themselves are interchangeable, state a further action explicitly. A global color permutation $\sigma\in S_q$ can act together with a position symmetry $g$ by

$$ ((g,\sigma)\cdot f)(i)=\sigma\bigl(f(g^{-1}(i))\bigr). $$

The two transformations commute, so this is an action of $G\times S_q$. Canonicalization must now minimize over these additional global color permutations. For example, under rotations plus the global binary color swap, the six four-bead necklace representatives reduce to four classes: 0000 merges with 1111, 0001 with 0111, while 0011 and 0101 each remain their own color-swap class. This global swap is not permission to recolor individual beads independently. The ordinary $q^{c(g)}$ fixed-coloring formula does not cover transformations that also permute colors.

For uncolored graphs, vertex relabeling similarly changes adjacency data while preserving the abstract graph. A canonical graph label would minimize a chosen encoding over vertex permutations; the same orbit proof justifies its correctness, although enumerating all $n!$ relabelings is expensive. This connects symmetry counting with removing duplicate search states and storing equivalent objects under one key.

Exercise. Is a smallest necklace representative necessarily a Lyndon word? Hint: test 0101. Answer: no; 0101 is a smallest rotation but is periodic. The canonical representatives that are primitive are exactly the Lyndon words.

Compute a cycle index and count symmetry classes

Use a regular hexagon to bring together position permutations, fixed configurations, composition inventories, and canonical representatives. This is a finite investigation with a complete answer, not an unresolved research question.

An application is testing circular six-slot devices whose slots have two distinguishable states. If the device has no marked start, rotated configurations duplicate the same physical arrangement; if reversing orientation is also irrelevant, mirror views duplicate it as well. Counting chooses the number of test classes, while canonicalization supplies one concrete input for each class. A marked port or a direction-sensitive component changes the allowed symmetry group and therefore changes the test set.

Investigation

Compute a cycle index and count symmetry classes

Inputs and assumptions. Positions are $0,\ldots,5$ clockwise. Use all binary words, with colors fixed. Let $\rho(i)=i+1\pmod6$ and $s_j(i)=j-i\pmod6$ for $j=0,\ldots,5$. Study $C_6$ first and $D_6$ second. All compositions are allowed except where a task explicitly restricts to three black beads.

Deliverables. Supply the cycle table, both cycle indices, unrestricted and three-black-bead counts, a proof of the fixed-cycle rule, and canonical representative lists or a reproducible exhaustive trace. The following stages total $10$ marks; the extension is ungraded.

1. Warm-up: compute cycles and stabilizers — 2 marks. Decompose all rotations and reflections. Identify the rotation stabilizers of 000000, 010101, and 000111.

Hint: rotation cycle length is $6/\gcd(6,k)$; reflection fixed positions solve $2i=j\pmod6$.

Worked table:

ElementsNumberCycle typeCycle-index monomialFixed binary words per element
$e$$1$Six singletons$a_1^6$$64$
$\rho,\rho^5$$2$One $6$-cycle$a_6$$2$
$\rho^2,\rho^4$$2$Two $3$-cycles$a_3^2$$4$
$\rho^3$$1$Three $2$-cycles$a_2^3$$8$
$s_0,s_2,s_4$$3$Two singletons and two $2$-cycles$a_1^2a_2^2$$16$
$s_1,s_3,s_5$$3$Three $2$-cycles$a_2^3$$8$

The rotation stabilizer sizes are $6,3,1$, respectively, and the orbit sizes are $1,2,6$. As explicit reflection checks, $s_0$ has cycles $(0)(3)(1\,5)(2\,4)$ and $s_1$ has cycles $(0\,1)(2\,5)(3\,4)$.

2. Proof: justify fixed-cycle counting and averaging — 3 marks. Prove that a coloring is fixed by a position permutation if and only if it is constant on each cycle. Then double count fixed pairs to explain why averaging counts orbits despite their different sizes.

Solution outline: follow a position repeatedly around its cycle to prove necessity; assign a color to every cycle to prove sufficiency. In the double count, a size-$m$ orbit has stabilizers of size $|G|/m$, so contributes $m(|G|/m)=|G|$ fixed pairs. Award one mark for each direction of the cycle argument and one for the orbit contribution.

3. Count totals and compositions — 3 marks. Average the monomials from the table:

$$ Z_{C_6,P}=\frac16(a_1^6+2a_6+2a_3^2+a_2^3), $$

$$ Z_{D_6,P}=\frac1{12}(a_1^6+2a_6+2a_3^2+4a_2^3+3a_1^2a_2^2). $$

The coefficient $4$ of $a_2^3$ combines one half-turn and three edge-axis reflections. Substituting $a_j=2$ gives $14$ necklaces and $13$ bracelets.

For exactly three black beads, substitute $a_j=1+t^j$ and extract the coefficient of $t^3$. The rotation contributions are $20$ from $(1+t)^6$, $2$ from each of the two $(1+t^3)^2$ terms, and $0$ from all other rotations. Thus there are $(20+4)/6=4$ necklaces.

For each vertex-axis reflection, the fixed-composition polynomial is $(1+t)^2(1+t^2)^2$. To get three black beads, choose one black singleton in $2$ ways and one black pair in $2$ ways, giving coefficient $4$. Edge-axis reflections have only pairs, so give coefficient $0$. Hence there are $(20+4+3\cdot4)/12=3$ bracelets with three black beads.

Award one mark for the two cycle indices, one for unrestricted substitution, and one for the composition calculation with its reasoning.

4. Enumerate and validate — 2 marks. Canonicalize all $64$ binary words under each group. The necklace inventory by black-bead number must be

$$ 1+t+3t^2+4t^3+3t^4+t^5+t^6, $$

and the bracelet inventory must be

$$ 1+t+3t^2+3t^3+3t^4+t^5+t^6. $$

The three-black-bead necklace representatives are 000111, 001011, 001101, and 010101; the bracelet list omits 001101, whose mirror class is already represented by 001011. Their necklace orbit sizes are $6,6,6,2$, summing to $\binom63=20$. Their bracelet orbit sizes are $6,12,2$, also summing to $20$.

Validate that every word maps to a representative, that no two retained representatives are equivalent, and that the class-size sums recover the labeled totals. Award one mark for the correct lists or inventory trace and one for these coverage checks. A few sampled words provide evidence only; the full finite enumeration and the group-action proof establish completeness.

Optional extension. Allow $q$ distinguishable colors, retaining the same position actions. Derive

$$ N_6(q)=\frac{q^6+q^3+2q^2+2q}{6},\qquad B_6(q)=\frac{q^6+3q^4+4q^3+2q^2+2q}{12}. $$

For $q=3$, these give $130$ necklaces and $92$ bracelets. Then allow the global binary color swap from Section 14.8 and recompute the six-bead representatives, explicitly generating both each word and its complemented views. Explain why this changes the equivalence relation and why the old cycle-index substitution alone does not solve the new problem. Keep position relabeling, global color relabeling, and individual recoloring distinct in your argument.

Extension checkpoint: with the global binary swap, both the rotation-only model and the rotation-plus-reflection model have $8$ classes. Their canonical lists are 000000, 000001, 000011, 000101, 000111, 001001, 001011, and 010101. For rotations, complementing pairs the weight-$0$ and weight-$6$ classes, the weight-$1$ and weight-$5$ classes, and the three weight-$2$ classes with the three weight-$4$ classes. At weight $3$, 000111 and 010101 are each equivalent to their complements, while 001011 and 001101 are paired. This gives $1+1+3+3=8$; adding reflections produces no further mergers among these eight classes.

Next in the Series

In Chapter 15: Fundamentals of Graph Theory, we'll explore The graph structures and counting theorems combinatorics needs.