# Counting Lyndon Factors

• Amy Glen
• Jamie Simpson
• W. F. Smyth
Keywords: Lyndon word, Sturmian word, Fibonacci word, Christoffel word

### Abstract

In this paper, we determine the maximum number of distinct Lyndon factors that a word of length $n$ can contain. We also derive formulas for the expected total number of Lyndon factors in a word of length $n$ on an alphabet of size $\sigma$, as well as the expected number of distinct Lyndon factors in such a word. The minimum number of distinct Lyndon factors in a word of length $n$ is $1$ and the minimum total number is $n$, with both bounds being achieved by $x^n$ where $x$ is a letter. A more interesting question to ask is what is the minimum number of distinct Lyndon factors in a Lyndon word of length $n$? In this direction, it is known (Saari, 2014) that a lower bound for the number of distinct Lyndon factors in a Lyndon word of length $n$ is $\lceil\log_{\phi}(n) + 1\rceil$, where $\phi$ denotes the golden ratio $(1 + \sqrt{5})/2$. Moreover, this lower bound is sharp when $n$ is a Fibonacci number and is attained by the so-called finite Fibonacci Lyndon words, which are precisely the Lyndon factors of the well-known infinite Fibonacci word $\boldsymbol{f}$ (a special example of an infinite Sturmian word). Saari (2014) conjectured that if $w$ is Lyndon word of length $n$, $n\ne 6$, containing the least number of distinct Lyndon factors over all Lyndon words of the same length, then $w$ is a Christoffel word (i.e., a Lyndon factor of an infinite Sturmian word). We give a counterexample to this conjecture. Furthermore, we generalise Saari's result on the number of distinct Lyndon factors of a Fibonacci Lyndon word by determining the number of distinct Lyndon factors of a given Christoffel word. We end with two open problems.

### Author Biographies

Amy Glen, Murdoch University

Lecturer in Mathematics

Jamie Simpson, Curtin University
Associate Professor in Mathematics
W. F. Smyth, McMaster University
Professor
Published
2017-08-11
Article Number
P3.28