distance between the two smallest blocks (which roughly corresponds to the two largest runs of “$a$”) asymptotically follows the uniform law on $[0,1]$.

**Proof.** We have: $$\begin{aligned}
d_n o W(x,w)=d_n(\pi_x.w) & = & \frac1n \left( |Y_0(w)|+\sum_{
j<\pi_x^{-1}(j_0(w))} |Y_{\pi_x(j)}(w)|
\right)\\
& = & \left( \frac1n |Y_0(w)| + \frac1n \sum_{j=1}^{K_n(w)-1}
|Y_j(w)| \mathbf{1}_{ \{U_{j}(x)<U_{j_0(w)}(x)\}} \right).\end{aligned}$$ By conditioning on $w$ and $U_{j_0(w)}$, and using the fact that $\sum_i |Y_i|=n$, we obtain: $$\begin{aligned}
&& {\mathbb E}_{{\mathbb Q}\otimes {\bar{\mathbb P}_n}} \left( \left. d_n(\pi_x.w) \right|
  w,U_{j_0(w)}\right)\\
& = & \left( \frac1n |Y_0(w)| + \frac1n 
\sum_{ \scriptsize
\begin{array}{cc}
1 \le j \le {K_n(w)-1}\\
j \neq j_0(w)
\end{array}}
|Y_j(w)| U_{j_0(w)} \right)\\
& = & \left( U_{j_0(w)} +(1-U_{j_0(w)})\frac{|Y_0(w)|}n -U_{j_0(w)}\frac{|Y_{j_0(w)}(w)|}n\right).\end{aligned}$$ On $\mathcal G_n$, $|Y_0|$ and $|Y_{j_0}|$ are bounded by $7 \log_2
n$, so $$\begin{aligned}
&&\left\| {\mathbb E}_{{\mathbb Q}\otimes {\bar{\mathbb P}_n}} \left( \left.
      d_n(\pi_x.w) \right|
    w,U_{j_0(w)}\right) -U_{j_0(w)} \right\|_{{\mathbb Q}\otimes {\bar{\mathbb P}_n}}^2\\
&= &{\mathbb E}_{{\mathbb Q}\otimes {\bar{\mathbb P}_n}} \left[ {\mathbb E}_{{\mathbb Q}\otimes {\bar{\mathbb P}_n}} \left( \left.
      d_n(\pi_x.w) \right|
    w,U_{j_0(w)}\right) -U_{j_0(w)} \right]^2\\
&=& {\mathbb E}_{{\mathbb Q}\otimes {\bar{\mathbb P}_n}} \left[ \left( 1-U_{j_0(w)}
\right)\frac{|Y_0(w)|}n -U_{j_0(w)}\frac{|Y_{j_0(w)}(w)|}n\right]^2 \\
& \leq & \left[ \frac{14 \log_2n}{n} \right]^2 ,\end{aligned}$$ which tends to $0$ when $n$ goes to infinity. Now, $$\begin{aligned}
&&\left\| d_n(\pi_x.w)  -{\mathbb E}_{{\mathbb Q}\otimes {\bar{\mathbb P}_n}} \left( \left.
      d_n(\pi_x.w) \right|
    