ArticleslgStudy

science

Necklace (combinatorics)

Necklace (combinatorics) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Necklace (combinatorics) rather than just read about it. In short: In combinatorics, a k-ary necklace of length n is an equivalence class of n-character strings over an alphabet of size k, taking all rotations as equivalent. It represents a structure with n circularly connected beads which have k available colors.

Necklace (combinatorics) — main illustration
Necklace (combinatorics) — illustration

Key takeaways

  • Necklace (combinatorics) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Necklace (combinatorics) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Necklace (combinatorics) from memory before moving on to harder problems.

Reference excerpt

In combinatorics, a k-ary necklace of length n is an equivalence class of n-character strings over an alphabet of size k, taking all rotations as equivalent. It represents a structure with n circularly connected beads which have k available colors. A k-ary bracelet, also referred to as a turnover (or free) necklace, is a necklace such that strings may also be equivalent under reflection. That is, given two strings, if each is the reverse of the other, they belong to the same equivalence class. For this reason, a necklace might also be called a fixed necklace to distinguish it from a turnover necklace. Formally, one may represent a necklace as an orbit of the cyclic group acting on n-character strings over an alphabet of size k, and a bracelet as an orbit of the dihedral group. One can count these orbits, and thus necklaces and bracelets, using Pólya's enumeration theorem.

Equivalence classes

Number of necklaces

There are

Nn(k)=1n∑d∣nφ(d)kn/d=1n∑i=1nkgcd(i,n) different k-ary necklaces of length n, where φ is Euler's totient function. When the beads are restricted to particular color multiset ℬ={1n1,…,knk}, where ni is the number of beads of color i∈{1,…,k}, there are

N(ℬ)=1|ℬ|∑d|gcd(n1,…,nk)(|ℬ|/dn1/d,…,nk/d)ϕ(d) different necklaces made of all the beads of ℬ. Here |ℬ|:=∑i=1kni and (mm1,…,mk):=m!m1!⋯mk! is the multinomial coefficient. These two formulas follow directly from Pólya's enumeration theorem applied to the action of the cyclic group Cn acting on the set of all functions f:{1,…,n}→{1,…,k}. If all k colors must be used, the count is

Ln(k)=k!n∑d∣nφ(d)S(nd,k), where S(n,k) are the Stirling number of the second kind. Nn(k) (sequence A054631 in the OEIS) and Ln(k) (sequence A087854 in the OEIS) are related via the Binomial coefficients:

Nn(k)=∑j=1k(kj)Ln(j) and

Ln(k)=∑j=1k(−1)k−j(kj)Nn(j)

Number of bracelets The number of different k-ary bracelets of length n (sequence A081720 in the OEIS) is

Bn(k)={12Nn(k)+14(k+1)kn/2if n is even,12Nn(k)+12k(n+1)/2if n is odd, where Nn(k) is the number of k-ary necklaces of length n. This follows from Pólya's method applied to the action of the dihedral group Dn.

Canonicalization There are many ways to specify a standard rotation of a given k-ary necklace. One of the simplest methods is interpret each letter of the alphabet as a digit in base k and a given rotation as a number in base k. The necklace then be standardized by selecting the rotation that yields the greatest number. The smallest number cannot be chosen because otherwise two necklaces of varying lengths may compare equal due differing numbers of leading zeros not being enough to distinguish between two numbers.

Case of distinct beads

For a given set of n beads, all distinct, the number of distinct necklaces made from these beads, counting rotated necklaces as the same, is ⁠n!/n⁠ = (n − 1)!. This is because the beads can be linearly ordered in n! ways, and the n circular shifts of such an ordering all give the same necklace. Similarly, the number of distinct bracelets, counting rotated and reflected bracelets as the same, is ⁠n!/2n⁠, for n ≥ 3. If the beads are not all distinct, having repeated colors, then there are fewer necklaces (and bracelets). The above necklace-counting polynomials give the number necklaces made from all possible multisets of beads. Polya's pattern inventory polynomial refines the counting polynomial, using variable for each bead color, so that the coefficient of each monomial counts the number of necklaces on a given multiset of beads.

Aperiodic necklaces An aperiodic necklace of length n is a rotation equivalence class having size n, i.e., no two distinct rotations of a necklace from such class are equal. According to Moreau's necklace-counting function, there are

Mn(k)=1n∑d∣nμ(d)kn/d different k-ary aperiodic necklaces of length n, where μ is the Möbius function. The two necklace-counting functions are related by: Nn(k)=∑d|nMn(k), where the sum is over all divisors of n, which is equivalent by Möbius inversion to Mn(k)=∑d|nNd(k)μ(nd). Each aperiodic necklace contains a single Lyndon word so that Lyndon words form representatives of aperiodic necklaces.

See also Lyndon word Inversion (discrete mathematics) Necklace problem Necklace splitting problem Permutation Proofs of Fermat's little theorem#Proof by counting necklaces Forte number, a representation of binary bracelets of length 12 used in atonal music.

References

External links Polya, Georg; Read, R.C.; Aeppli, Dorothee (1987). Combinatorial enumeration of groups, graphs, and chemical compounds. Springer-Verlag. ISBN 9780387964133. Ruskey, Frank; Savage, Carla; Wang, Terry Min Yih (1992). "Generating necklaces". Journal of Algorithms. 13 (3): 414–430. doi:10.1016/0196-6774(92)90047-G. "Necklaces and counting". gloumouth1.free.fr. Retrieved December 26, 2025.

Illustrations

Necklace (combinatorics) illustration
Necklace (combinatorics) illustration
Necklace (combinatorics) illustration
Necklace (combinatorics): The 3 bracelets with 3 red and 3 green beads. The one in the middle is chiral, so there are 4 necklaces.Compare box(6,9) in the triangle.
The 3 bracelets with 3 red and 3 green beads. The one in the middle is chiral, so there are 4 necklaces.Compare box(6,9) in the triangle.
Necklace (combinatorics): The 11 bracelets with 2 red, 2 yellow and 2 green beads. The leftmost one and the four rightmost ones are chiral, so there are 16 necklaces.Compare box(6,7) in the triangle.
The 11 bracelets with 2 red, 2 yellow and 2 green beads. The leftmost one and the four rightmost ones are chiral, so there are 16 necklaces.Compare box(6,7) in the triangle.

Worked examples

Example 1 — a first encounter with Necklace (combinatorics)

Start with the simplest possible case. Write down what Necklace (combinatorics) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Necklace (combinatorics) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Necklace (combinatorics) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Necklace (combinatorics)

In research
Necklace (combinatorics) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Necklace (combinatorics) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Necklace (combinatorics) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Combinatorics on words, Enumerative combinatorics, so understanding it makes those chapters shorter.
In everyday life
Look for Necklace (combinatorics) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Necklace (combinatorics)” →

How to study Necklace (combinatorics) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Necklace (combinatorics) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Necklace (combinatorics) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Necklace (combinatorics) in simple terms?

In combinatorics, a k-ary necklace of length n is an equivalence class of n-character strings over an alphabet of size k, taking all rotations as equivalent. It represents a structure with n circularly connected beads which have k available colors.

Why does Necklace (combinatorics) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Necklace (combinatorics)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Necklace (combinatorics).

Tags

  • Combinatorics on words
  • Enumerative combinatorics

Keep exploring