---
title: 'Nyldon Factorization: Duals of Lyndon Words'
url: https://www.emergentmind.com/topics/nyldon-factorization
type: topic
---

# Nyldon Factorization: Duals of Lyndon Words

Searching arXiv for recent and foundational papers on Nyldon factorization and related results.
Nyldon factorization is the factorization of a finite word into a lexicographically nondecreasing sequence of Nyldon words, where Nyldon words are defined by reversing the inequality in the recursive characterization of Lyndon words. In the foundational formulation, every finite word over a fixed ordered alphabet admits a unique Nyldon factorization; subsequent work related this factorization to right Hall and right Lazard structures, extended the theory to Nyldon-like sets, established circular code and power-factorization results, and derived explicit factorizations for structured words such as Fibonacci words and Thue–Morse words, including a non-decreasing Nyldon factorization of the infinite Thue–Morse word [1804.09735, 1908.04056, 2507.23659].

## 1. Definition and basic duality

Let \(A\) be a finite alphabet endowed with a total order \(<\), and let \(<_{\mathrm{lex}}\) be the induced lexicographic order on \(A^*\). A nonempty word \(w\in A^+\) is Nyldon if either \(w\) is a single letter, or \(w\) cannot be factorized as
\[
w = w_1w_2\cdots w_k,\qquad k\ge 2,
\]
where each \(w_i\) is Nyldon and
\[
w_1 \le_{\mathrm{lex}} w_2 \le_{\mathrm{lex}}\cdots\le_{\mathrm{lex}} w_k.
\]
Any such factorization is called a Nyldon factorization. The same recursion, with “nondecreasing” replaced by “nonincreasing,” yields the classical Lyndon words [1804.09735, 1908.04056].

The crucial point is that the underlying lexicographic order is not changed. What is reversed is the monotonicity constraint in the recursive definition. For Lyndon factorization, one seeks a nonincreasing sequence of Lyndon words; for Nyldon factorization, one seeks a nondecreasing sequence of Nyldon words. This is the sense in which Nyldon words are the order-reversed twin, or dual, of Lyndon words [1804.09735].

The basic comparison is compactly summarized as follows.

| Feature | Lyndon | Nyldon |
|---|---|---|
| Recursive obstruction | No nonincreasing factorization into shorter Lyndon words | No nondecreasing factorization into shorter Nyldon words |
| Canonical factorization order | Lexicographically nonincreasing | Lexicographically nondecreasing |
| Standard-factorization inequality | Left factor \(<_\mathrm{lex}\) longest proper suffix | Left factor \(>_\mathrm{lex}\) longest proper suffix |

This duality is exact at the level of recursive construction, but later developments show that the two theories diverge substantially in their structural behavior, particularly for prefixes, conjugacy characterizations, and algorithmics [1804.09735, 1908.04056].

## 2. Existence, uniqueness, and suffix structure

The central theorem states that every finite word \(w\in A^+\) has a unique factorization
\[
w=n_1n_2\cdots n_k
\]
into Nyldon words such that
\[
n_1\le_{\mathrm{lex}} n_2\le_{\mathrm{lex}}\cdots\le_{\mathrm{lex}} n_k.
\]
Equivalently, Nyldon words form a complete factorization of the free monoid with respect to the decreasing lexicographic order [1804.09735].

A decisive structural fact is that suffixes, rather than prefixes, control the factorization. If \((n_1,\dots,n_k)\) is the Nyldon factorization of \(w\), then the last factor \(n_k\) is the longest Nyldon suffix of \(w\). Moreover, if \(w\) itself is Nyldon and \(s\) is a proper Nyldon suffix of \(w\), then
\[
s <_{\mathrm{lex}} w.
\]
This suffix inequality is the Nyldon analogue of the classical Lyndon suffix property, but with the order direction reversed [1804.09735, 1908.04056].

These facts yield the standard-factorization criterion. Write \(w=ps\), where \(s\) is the longest Nyldon proper suffix of \(w\). Then
\[
w \text{ is Nyldon} \iff p \text{ is Nyldon and } p >_{\mathrm{lex}} s.
\]
This characterization is one of the main recursive tools in the theory, and it reappears in later analyses of Fibonacci words and Thue–Morse words [1804.09735, 2507.23659].

The asymmetry between suffixes and prefixes is pronounced. The suffix structure is sufficiently rigid to determine the final factor uniquely, whereas prefixes do not behave analogously. A concrete example recorded in the foundational paper is \(w={\tt 10100}\), whose Nyldon factorization is \(({\tt 10},{\tt 100})\), even though the longest Nyldon prefix is \({\tt 101}\). The data therefore support the conclusion that Nyldon factorization is intrinsically right-oriented [1804.09735].

## 3. Hall sets, Lazard sets, and conjugacy

Nyldon words are not only a factorization basis; they also fit into the Hall–Lazard framework. With the decreasing lexicographic order, the Nyldon words form a right Lazard set, and equivalently a right Hall set. They are not a left Lazard set. This sharply contrasts with Lyndon words, which form a Viennot set, hence both a left and right Hall set [1804.09735, 1908.04056].

The right Hall property interacts closely with conjugacy. All Nyldon words are primitive, and every primitive conjugacy class contains exactly one Nyldon word. This is the Nyldon counterpart of the classical statement that every primitive conjugacy class contains exactly one Lyndon word. At the same time, the papers emphasize that Nyldon words do not admit the same simple rotation characterization as Lyndon words; determining Nyldon status from conjugates is subtler [1804.09735, 1908.04056].

The Hall/Lazard viewpoint also connects Nyldon factorization to free Lie algebra constructions. Because right Hall sets correspond to Hall bases, Nyldon words can serve in a role analogous to Lyndon words in Lie-theoretic settings, but with a different order and concatenation behavior [1804.09735, 1908.04056].

A further refinement appears in the notion of a Nyldon-like set. A pair \((G,\prec)\) is Nyldon-like if it is generated recursively by the same nondecreasing-factorization obstruction together with the order condition
\[
f \prec fg
\]
whenever \(f,g\in G\) and \(fg\in G\). For any Nyldon-like set, every word has a unique nondecreasing \(G\)-factorization, the last factor is the longest \(G\)-word suffix, and every primitive conjugacy class contains exactly one \(G\)-word [1908.04056].

## 4. Algorithms and factorization of powers

The original constructive algorithm for Nyldon factorization processes the word from right to left. It maintains the Nyldon factorization of the suffix already seen, prepends the next letter as a singleton factor, and merges the first two factors while the first is lexicographically greater than the second. In its original form, this algorithm has worst-case complexity
\[
O(n(n-1)/2),
\]
for a word of length \(n\) [1804.09735].

Later work showed that the CPS-style right-to-left greedy merging algorithm can be implemented in linear time \(O(|w|)\) using suffix arrays and RMQ for lexicographic comparisons. The same paper also analyzes Melançon’s algorithm in the setting of right Hall sets and gives an \(O(|w|\log |w|)\) implementation by maintaining blocks in a heap keyed by their current order value [1908.04056].

Melançon’s algorithm has two relevant variants. In the conjugate version, it computes the unique Nyldon conjugate of a primitive word by iteratively contracting suitable minimal blocks on a circular arrangement. In the factorization version, it outputs factors linearly: whenever the globally minimal current block is the first block, that block is emitted as the next factor; otherwise minimal blocks are contracted with their left neighbors. For Nyldon words, the output coincides with the unique Nyldon factorization [1908.04056].

The factorization of powers exhibits a distinctive pattern. If \(w\) is primitive and \(n\) is the Nyldon word in its conjugacy class, then for sufficiently large \(k\), the Nyldon factorization of \(w^k\) has the form
\[
w^k = p_1\cdots p_i\, n\,n\cdots n\, s_1\cdots s_j,
\]
with a central block of repeated copies of \(n\). For Nyldon words, the bound obtained is
\[
K \le \left\lfloor \log_2(|w|)\right\rfloor + 1,
\]
meaning that the middle contains exactly \(k-K\) copies of \(n\) [1908.04056].

The same work proves that for each fixed length \(\ell\), the set of Nyldon words of length \(\ell\) forms a circular code. This resolves one of the earlier open problems and situates fixed-length Nyldon families alongside the classical fixed-length Lyndon families [1908.04056].

## 5. Explicit factorizations for Fibonacci and finite Thue–Morse words

The 2025 study of Fibonacci words and Thue–Morse words gives a detailed account of Nyldon factorization in two central morphic families. Over the ordered alphabet \(\{a,b\}\) with \(a\prec b\), the finite Fibonacci words are defined by
\[
F_0=b,\qquad F_1=a,\qquad F_k=F_{k-1}F_{k-2}\quad (k\ge 2).
\]
For every \(k\ge 2\), the Nyldon factorization is
\[
NF(F_k)=a,\;F_k[2..f_k],
\]
where \(f_k=|F_k|\). Thus each finite Fibonacci word factors into exactly two Nyldon factors: the initial \(a\), and the suffix obtained by deleting the first letter [2507.23659].

If one writes
\[
H_k = F_k[2..f_k],
\]
then the key structural statement is that for every \(k\ge 2\), both \(H_k\) and \(H_k a\) are Nyldon, and for every \(k\ge 4\),
\[
\operatorname{lnps}(H_k)=H_{k-2},\qquad \operatorname{lnps}(H_k a)=H_{k-2}a.
\]
The proof proceeds by induction and by repeated use of the longest-Nyldon-proper-suffix criterion [2507.23659].

The same paper fully characterizes the Nyldon factorizations of the finite Thue–Morse words. These are defined by
\[
TM_0=a,\qquad TM_k = TM_{k-1}\,\overline{TM_{k-1}}\quad (k\ge 1),
\]
with the morphic representation
\[
\mu(a)=ab,\qquad \mu(b)=ba,\qquad TM=\lim_{n\to\infty}\mu^n(a).
\]
If
\[
NF(TM_{2k-1})=x_1,x_2,\dots,x_{c_k},
\]
the recursive building blocks are
\[
X_k = x_{c_k}\,\overline{TM_{2k-2}'},\qquad
Y_k = b\,TM_{2k-2},\qquad
Z_k = b\,TM_{2k-2}\,\overline{TM_{2k}},
\]
where \(w' = w[1..|w|-1]\). Then, for \(k\ge 2\),
\[
NF(TM_{2k}) = x_1,\dots,x_{c_k-1},X_k,Y_k,
\]
and
\[
NF(TM_{2k+1}) = x_1,\dots,x_{c_k-1},X_k,Z_k.
\]
This gives a recursive description of the Nyldon factorization of every finite Thue–Morse word [2507.23659].

Small cases illustrate the construction. The paper records
\[
NF(TM_3)=a,\;b,\;ba,\;baab,
\]
and then derives the next factorizations by extending the last factor of \(TM_3\) and appending a final Nyldon block aligned with the Thue–Morse decomposition [2507.23659].

## 6. Infinite Thue–Morse factorization and open directions

For the infinite Thue–Morse word
\[
TM=\lim_{k\to\infty}TM_k,
\]
the 2025 paper constructs an explicit infinite sequence \((w_n)_{n\ge 1}\) of finite Nyldon words such that
\[
TM=\lim_{n\to\infty}(w_1w_2\cdots w_n),
\qquad
w_n\preceq w_{n+1}\ \text{for all }n\ge 1.
\]
The initial terms are
\[
w_1=a,\qquad w_2=b,\qquad w_3=ba,\qquad w_4=baabbaa,
\]
and for \(n\ge 5\),
\[
w_n = b\,TM_{2n-8}\,\overline{TM_{2n-6}}\,\overline{TM_{2n-6}'}.
\]
An equivalent morphic recursion is
\[
\tilde w_{n+1}=(baa)^{-1}\mu^2(\tilde w_n)\,baa.
\]
The paper proves that these definitions coincide, that the concatenation is the infinite Thue–Morse word, that the sequence is nondecreasing, and that every \(w_n\) is Nyldon [2507.23659].

The proof uses a family of canonical Nyldon words \(\Pi_k=\{t_i(k)\mid 1\le i\le 12\}\) built from Thue–Morse blocks, together with two ordering statements: a lexicographic chain within each \(\Pi_k\) and a cross-level comparison \(t_{\ell_1}(k)\prec t_{\ell_2}(k+1)\). These comparisons are combined with repeated longest-suffix arguments to certify Nyldon-ness of the constructed factors [2507.23659].

The infinite-word result is constructive, but it is not yet part of a fully general infinite Nyldon theory. The paper explicitly notes that for Lyndon words there is a uniqueness theory for infinite factorizations, while for Nyldon words such a general framework has not yet been developed. It constructs a type-(1) factorization of the infinite Thue–Morse word as an infinite sequence of finite Nyldon words, but does not prove uniqueness [2507.23659].

Several open directions remain active in the literature. One is the search for a notion of infinite Nyldon word paralleling the infinite Lyndon setting. Another is a simpler non-recursive characterization of Nyldon words, analogous to the rotation or suffix criteria available in the Lyndon world. A further question concerns the power-factorization bound: the currently established Nyldon estimate is logarithmic in \(|w|\), and the possibility of a constant bound remains open [1804.09735, 1908.04056, 2507.23659].

Source: https://www.emergentmind.com/topics/nyldon-factorization