by $Z_2$ “$b$”, followed by $Z_3$ “$a$” and so on...

-   if $\epsilon=0$, write $Z_1$ “$b$”, followed by $Z_2$ “$a$”, followed by $Z_3$ “$b$” and so on...

Truncating to keep the $n$ first letters gives a random variable defined on $\Omega$ and uniformly distributed on $\mathcal A^n$. Thus, in this setting, the number of runs is: $$N_n(\omega)= \inf\left\{ k \in {\mathbb N}, \; \sum_{i=1}^k Z_i(\omega)\geq n
\right\},$$ and the lengths of runs are: $$\label{EQruns} \forall i \in \{1, \dots, N_n-1\}, \; X_i=Z_i
\mbox{ and } X_{N_n}=n -\sum_{i=1}^{N_n-1}Z_i \leq Z_{N_n}.$$

We denote by $\log$ the natural logarithm, by $\log_2(x)=\log x/
\log 2$, by $\lceil x \rceil$ the smallest integer larger than $x$ and by $\lfloor x \rfloor$ the largest integer smaller than $x$. The two next lemmas give estimates for the length of the longest run in a random Lyndon word. These estimates are related with the extreme values theory (see the books by Bingham, Goldie and Teugels [@Bingham], Resnick [@Resnick] or the work of Hitzenko and Louchard [@Louchard], or the initial works of Erd[ö]{}s and R[é]{}nyi [@ErdosRenyi] and Erd[ö]{}s and R[é]{}v[é]{}sz [@Erdos]).

\[MnS\] For any $\varepsilon>0$, $${\tilde{\mathbb P}_n}\left( M_n \le (1-\varepsilon)\log_2{n} \right) 
 \leq   O \left( \exp \left( -\frac{n^\varepsilon}4 \right)\right).$$

**Proof.** 