Sarah Eugene - Exercices of Analytic Combinatorics
I - Smirnov words
Over an alphabet A = {a1 , . . . , ar } of at least 3 letters, a Smirnov word is such that no
two consecutive letters are the same.
ababcba is a Smirnov word
Exemple: on A = {a, b, c}
abaacba is not a Smirnov word
Question 1? Find a surjective application of the set of all words A? = (a1 + · · · + ar )?
on the set S of Smirnov words built on the same alphabet.
Question 2? Find a combinatorial construction generating A? = (a1 +· · ·+ar )? from the
Smirnov set S built over A. (Hint: you have to replace some elements by a combinatorial
class, and it is a reciprocal of the preceding question.)
Question 3? Express the generating function A(z) of the words of A? as an expression
involving the generating function S(z) of the Smirnov words, where
A(a1 , . . . , ar ) =
X
|w|a1
a1
ar
=
× · · · × a|w|
r
w∈A?
S(a1 , . . . , ar ) =
X
|w|a1
a1
1
1 − a1 − · · · − ar
ar
× · · · × a|w|
r
w∈S
and |w|ai is the number of letters ai in the word w. (Example: |aabbbcb|b = 4, |aabbbcb|a =
2).
Question 4? By a set of algebraic substitutions {?1 , . . . , ?r }, where ?i and ?j are equivalent up to a letter substitution (ai 7→ aj ; ?i 7→?j ), express S(a1 , . . . , ar ) as a function
of A(?1 , . . . , ?r ). What is the algebraic function ?i
Question 5? By setting ai = z, we count the number of Smirnov words by their lengths,
X |w|a
X
ar SL (z) =
a1 1 × · · · × a|w|
=
z |w| .
r
w∈S
a1 =z,...,ar =z
w∈S
Compute SL (z) and prove that the number of Smirnov words of length n is [z n ]SL (z) =
r(r − 1)n−1 .
(Remark: this last result can be computed by elementary asymptotics and is a good
check; however the constructions we used extends nicely to more difficult problems, as
follows).
1
Question 6? What is the generating function S≤m (z) counting the number of words
with at most m consecutive identical letters over an alphabet of r letters?
Remark: A run of one letter is a continuous sequence of this letter (that is not interrupted
by any other letter). The solution of Question 6 provides the generating function of texts
with maximal run equal to m.
For further lecture, you find in Flajolet-Sedgewick book “Analysis Combinatorics” (p.
308-312) the proof of the following beautiful result:
Proposition. The longest run parameter L taken over the set of binary words of length n (endowed with
the uniform distribution) satisfies the following estimate
−h−1
log n
, α(n) := 2{log2 n} ,
Pn (L < blog2 (n)c + h) = e−α(n)2
+O √
n
where {x} is the fractional part of x. The mean satisfies
3
γ
− + P (log2 n) + o
En (L) = log1 n +
log 2 2
log2 n
√
n
(P (.)periodic.
II - Enumeration in free groups
We consider the alphabet B = A ∪ A, where A = {a1 , . . . , ar } and A = {a1 , . . . , ar }.
A word over the alphabet B is said to be reduced if it arises from a word over B by the maximal
application of the reductions aj aj 7→ and aj aj 7→ (with the empty word).
Therefore a reduced word has no factor of the form aj aj or aj aj . The reduced words serve as canonical
representations of elements of the free group Fr generated by A.
Question 1? Let ui and ui respectively mark the number of occurrences of letters ai and ai , respectively.
The generating function R(u1 , . . . , ur , u1 , . . . , ur ) of the class R of reduced words may be obtained
by a substitution within the generating S(z) of Smirnov words over an alphabet of r letters. What is this
substitution?
Question 2? Check that the OGF of reduced words with z marking length is
R(z) =
1+z
,
1 − (2r − 1)z
which implies Rn = 2r(2r − 1)n−1 .
Question 3? The Abelian image λ(w) of an element of the free group Fr is obtained by letting
all letters commute and applying the reductions aj .a−1
= 1. Therefore λ(w) can be put under the
j
mr
1
form am
.
.
.
,
with
each
m
∈
Z.
Let
(x
,
.
.
.
,
x
)
be
a
vector of inderteminates and define xλ(w) :=
i
1
r
r
1
m1
mr
x1 . . . xr
X
Compute Q(z, x) =
z |w| xλ(w) .
w∈R
This last quantity is related to the growth of the free group Fr .
2
© Copyright 2026 Paperzz