[
Abstract
A foundational result in the theory of Lyndon words (words that are strictly earlier in lexicographic order than their cyclic permutations) is the ChenFoxLyndon theorem which states that every word has a unique nonincreasing decomposition into Lyndon words. This article extends this factorization theorem, obtaining the proportion of these decompositions that are strictly decreasing. This result is then used to count primitive pseudo orbits (sets of primitive periodic orbits) on nary graphs. As an application we obtain a diagonal approximation to the variance of the characteristic polynomial coefficients nary quantum graphs.
assertion\@definecounterconjecture\@definecounterdefinition\@definecounterhypothesis\@definecounterremark\@definecounternote\@definecounterobservation\@definecounterproblem\@definecounterquestion\@definecounteralgorithm\@definecounterexample Lyndon word decompositions]Lyndon word decompositions and pseudo orbits on nary graphs
1 Introduction
A fundamental tool used to understand the combinatorics of words is the Lyndon factorization [CFL58] (see also [Lothaire]); every word has a unique standard decomposition into a nonincreasing sequence of Lyndon words. Lyndon words being those words that occur strictly earlier in lexicographic order than any of their rotations. The Lyndon factorization finds applications in, for example, the theory of free Lie algebras [Lothaire], quasisymmetric functions [H01] and data compression techniques [MRRS13]. In this article we extend this foundational result to obtain the proportion of the standard decompositions that are strictly decreasing. For words of a fixed length on an alphabet of letters the proportion that have strictly decreasing Lyndon factorizations is shown to be , independent of the word length.
The remainder of the article applies this new combinatorial result to a problem in the field of quantum chaos. We focus on quantum graphs, which are a widely studied model of quantum chaos introduced by Kottos and Smilansky [KS97, KS99]. Quantum graphs are also used in other diverse areas of mathematical physics including Anderson localization, microelectronics, nanotechnology, photonic crystals and superconductivity, see [BerkolaikoKuchment] for an introduction. In [BHJ12] the authors showed that spectral properties of quantum graphs are precisely encoded in finite sums over collections of primitive periodic orbits; primitive pseudo orbits. Here, we introduce graph families which we call nary graphs, where there is a bijection between primitive pseudo orbits on those graphs and strictly decreasing standard decompositions.
The spectral quantities we consider are the coefficients of the characteristic polynomial of a graph. It was shown in [BHJ12] that these coefficients can be expressed as a sum over pairs of primitive pseudo orbits of the graph. It is the variance of these coefficients which we treat for families of nary graphs whose vertices are labeled by words of length on an alphabet of letters. By counting the number of strictly decreasing standard decompositions we obtain a diagonal approximation for the variance,
(1.0) 
This can be compared to the corresponding random matrix result [Hetal96],
(1.0) 
The grounds for such a comparison is the BohigasGiannoniSchmidt conjecture [BGS84] which asserts that typically the spectrum of a classically chaotic quantum system corresponds to that of an ensemble of random matrices determined by the symmetries of the quantum system. The deviation we see from random matrix theory is consistent with previous investigations of the variance [KS99, T00, T01]. From our result it is clear that the deviation does not vanish for a given family of nary graphs in the semiclassical limit, which for graphs is the limit of a sequence of graphs with increasing number of edges, corresponding to increasing word length . However, the discrepancy would disappear for a sequence of graphs where the degree of the vertices increases, which is equivalent to increasing . This suggests that random matrix results for the variance may be recovered under stronger conditions than those typically required for other spectral properties.
The article is laid out as follows. In Section 2 we introduce the terminology associated with Lyndon factorizations. In Section 3 we count the number of strictly decreasing standard decompositions (Theorem 3) which is a main result of this article. In Section 4 we introduce nary graphs which are families of directed graphs and use Theorem 3 to count the primitive pseudo orbits on these graphs. Section LABEL:characteristic_polynomial describes how coefficients of the graph’s characteristic polynomial can be expressed as finite sums over primitive pseudo orbits. In Section LABEL:diagonal we apply the primitive pseudo orbit count to obtain a diagonal approximation for the variance of coefficients of the characteristic polynomial of nary quantum graphs and compare it to predictions from random matrix theory.
2 Introduction to Lyndon words
In this article we consider factorizations of words over a totally ordered alphabet of letters. The lexicographic order of words is defined in the following natural way. Let,
(2.0)  
(2.0) 
with . Then iff there exists such that and or and .
Two words, and are said to be conjugate if and for some words and . Hence, two words are conjugate if and only if one may be obtained as a rotation (or cyclic shift) of the other and conjugacy is clearly an equivalence relation. A word is a Lyndon word if it is strictly less than all other words in its conjugacy class. So, for example, the Lyndon words on the binary alphabet with length are
(2.0) 
For a fixed alphabet we denote the set of Lyndon words of length by and . A useful classical result involving the number of Lyndon words is the following lemma (see e.g., [Lothaire]).
1
(2.0) 
The lemma follows from the fact that every word is a repartition of a word in the conjugacy class of some Lyndon word [Lothaire].
The ChenFoxLyndon factorization theorem [CFL58] (see also [Lothaire]) is the following fundamental result in the theory of Lyndon words.
2
Any nonempty word can be uniquely written as a concatenation of Lyndon words in nonincreasing lexicographic order,
(2.0) 
where each is a Lyndon word and .
We call the unique factorization (2) the standard decomposition (or Lyndon factorization) of . Furthermore, we say that a standard decomposition is strictly decreasing if for . We will denote by the number of strictly decreasing standard decompositions of words of length from an alphabet of letters. So, for example, the standard decompositions of binary words of length are shown below where the strictly decreasing standard decompositions are indicated in bold,
We see that precisely half of the binary words of length have strictly decreasing standard decompositions. In general, for an alphabet of letters, the proportion of words that have strictly decreasing standard decompositions is , which we prove in the next section.
3 Counting strictly decreasing standard decompositions
The following theorem is the main combinatorial result of the paper.
3
For words of length ,
(3.0) 
We formally define a generating function for the number of strictly decreasing standard decompositions as
(3.0) 
where we set and . If we also define a function,
(3.0) 
then proving the theorem is equivalent to showing that on some interval. To do this we use the following lemma.
4
(3.0) 

Proof. Observe that the set of words with strictly decreasing standard decomposition is in bijection with the set of subsets of all Lyndon words. The bijection is implemented by taking any collection of distinct Lyndon words, arranging them in (strictly) decreasing order, and concatenating. That this is invertible follows from the ChenFoxLyndon theorem, as every word has a unique nonincreasing standard decomposition.

Proof of Theorem 3. As we note that on if
(3.0) on . From Lemma 4,
(3.0) (3.0) where the second equality is valid for . Hence,
(3.0) (3.0) Splitting the sum over into sums over even and odd terms respectively,
(3.0) (3.0) (3.0) where, in the last step we used the fact that coefficients in the second sum vanish unless divides . Applying Lemma 1,
(3.0) (3.0) Finally comparing this to,
(3.0) completes the proof.
4 Quantum nary graphs and their pseudoorbits
A graph is a set of vertices connected by a set of edges . We consider graphs with directed edges where each edge , connects an origin vertex to a terminal vertex . We write if is a vertex in . The number of edges is the degree of . The total number of edges is .
Let and be positive integers. We define a nary graph of order in the following way. We use an alphabet, , of letters and let the set of graph vertices be labeled by the words of length . The edges of the graph are labeled by words of length where the first letters of the edge label designate the origin vertex and the last letters denote the terminal vertex. Consequently every vertex of the nary graph has incoming edges and outgoing edges. See Figure LABEL:fig:binary_graph for an example of a binary graph with vertices and Figure LABEL:fig:ternary_graph for a ternary graph with vertices.