Lyndon pairs and the lexicographically greatest perfect necklace
Verónica Becher, Tomás Tropea
TL;DR
The paper addresses constructing the lexicographically greatest $(n,k)$-perfect necklace over an alphabet of size $s$, for all $n,k$ with $n|k$ or $k|n$. It generalizes Fredricksen and Maiorana’s de Bruijn construction by introducing Lyndon pairs and an operator $ heta$ to systematically enumerate maximal rotations and assemble a necklace $X$ of length $s^n k$. The main contributions are (1) the formalization of Lyndon pairs and the $ heta$-based traversal, (2) a complete construction of the lexicographically greatest $(n,k)$-perfect necklace for the two divisibility regimes, including detailed case analyses and proofs of length, perfection, and maximality, and (3) a framework that extends de Bruijn sequence generation to broader perfect necklaces with potential applications in normal number constructions and combinatorial sequence design. The approach yields a linear-time, low-space method for generating these necklaces via concatenation of Lyndon words, mirroring the classical FM78 construction while broadening its scope.
Abstract
Fix a finite alphabet. A necklace is a circular word. For positive integers $n$ and~$k$, a necklace is $(n,k)$-perfect if all words of length $n$ occur $k$ times but at positions with different congruence modulo $k$, for any convention of the starting position. We define the notion of a Lyndon pair and we use it to construct the lexicographically greatest $(n,k)$-perfect necklace, for any $n$ and $k$ such that $n$ divides~$k$ or $k$ divides~$n$. Our construction generalizes Fredricksen and Maiorana's construction of the lexicographically greatest de Bruijn sequence of order $n$, based on the concatenation of the Lyndon words whose length divide $n$.
