Convergence of a random "mix" Let $R_1,R_2,\dots$ and $S_1,S_2,\dots$ be two sequences of independent random variables with uniform distribution in the interval $[0,1]$.  We start from $X_0 = 1$ and $Y_0 = 0$ and generate at each step a new pair $X_i$ and $Y_i$ by the following "mixing" rule:
$$
\left\{\eqalignno{X_i &= R_iX_{i-1} + (1-R_i)Y_{i-1}\cr
                  Y_i &= S_iX_{i-1} + (1-S_i)Y_{i-1}}\right.
$$
From numerical experimentation I see that both $\{X_i\}$ and $\{Y_i \}$ converge almost certainly to some unique random variable $L$.  How can it be shown? And what is the distribution of $L$?
 A: 1. The convergence part is easy. From the observation
$$ \min\{X_{i-1},Y_{i-1}\}
\leq \min\{X_{i},Y_{i}\}
\leq \max\{X_{i},Y_{i}\}
\leq \max\{X_{i-1},Y_{i-1}\}, $$
we find that both $(\min\{X_{i},Y_{i}\})_{i\in\mathbb{N}}$ and $(\max\{X_{i},Y_{i}\})_{i\in\mathbb{N}}$ converge. Also, note that
$$ |Y_i - X_i| = |R_i - S_i| |Y_{i-1} - X_{i-1}|. $$
Since $|R_i - S_i| \leq 1$ for all $i$ and $|R_i - S_i| \leq \frac{1}{2} $ for infinitely many $i$'s with probability one, we find that $|Y_i - X_i| \to 0
$ almost surely. This proves the existence of $L = \lim X_i = \lim Y_i$.
2. As for the distribution of $L$, we claim the following:

Claim. $L$ has the density function $f_{L}$ of the form
$$ f_{L}(x) = 6x(1-x). $$

The following is the comparison of $f_L$ and the proability histogram of $10^6$ samples from a simulation:

Proof. By regarding $(X_1, Y_1) = (R_1 - S_1)(1, 0) + S_1(1, 1)$ as our new starting point and apply the same procedure, we will end up with the limit having the same distribution as $L$. So we obtain an identity in distribution of the form
$$ L \stackrel{d}= (R - S)L + S, \tag{1} $$
where $R, S \sim \operatorname{Uniform}([0,1])$ and $R, S, L$ are independent. Moreover, since $(1-Y_i, 1-X_i)$ has the same distribution as $(X_i, Y_i)$ for all $i$, it follows that the distribution of $L$ is symmetric about $\frac{1}{2}$, i.e.,
$$ L \stackrel{d}= 1-L. \tag{2} $$
So we are led to solve the system of distributional equations given by $\text{(1)}$ and $\text{(2)}$.
Now, for any continuous function $\varphi$ on $[0, 1]$, the above equation gives
\begin{align*}
\mathbf{E}[\varphi(L)]
&= \mathbf{E}[\varphi(LR + (1-L)S)] \\
&= \mathbf{E}[\mathbf{E}[\mathbf{E}[\varphi(LR + (1-L)S) \mid L, R] \mid L]].
\end{align*}
By noting that $LR + (1-L)S$ is uniform over $[LR, 1-L + LR]$ given $L$ and $R$ and that $LR$ is uniform over $[0, L]$ given $L$ (or simply using a suitable change of variables), the last line reduces to
\begin{align*}
\mathbf{E}[\varphi(L)]
&= \mathbf{E}\left[ \int_{0}^{L} \int_{r}^{1-L+r} \frac{\varphi(s)}{L(1-L)} \, \mathrm{d}s\mathrm{d}r \right] \\
&= \mathbf{E}\left[ \int_{0}^{1} \int_{0}^{1} \frac{\varphi(s)}{L(1-L)} \mathbf{1}_{\{0 \leq r \leq L\}\cap\{r\leq s \leq 1-L+r\}} \, \mathrm{d}s\mathrm{d}r \right] \\
&= \int_{0}^{1} \mathbf{E} \left[ \frac{1}{L(1-L)} \int_{0}^{1}  \mathbf{1}_{\{0 \leq r \leq L\}\cap\{r\leq s \leq 1-L+r\}} \mathrm{d}r\, \right] \varphi(s) \, \mathrm{d}s \\
&= \int_{0}^{1} \mathbf{E} \left[ \frac{1}{L(1-L)} \left( \min\{L,s\} - \max\{0,s-1+L\} \right) \, \right] \varphi(s) \, \mathrm{d}s
\end{align*}
This shows that $L$ has a PDF $f_L$ that satisfies the following functional equation
$$ f_L(s)
= \int_{0}^{1} \frac{f_L(\ell)}{\ell(1-\ell)} \left( \min\{\ell,s\} - \max\{0,s-1+\ell\} \right) \, \mathrm{d}\ell. $$
To solve this, note that the right-hand side becomes
\begin{align*}
&\int_{0}^{1} \frac{f_L(\ell)}{\ell(1-\ell)} \int_{0}^{s} \left( \mathbf{1}_{[0,\ell]}(t) - \mathbf{1}_{[1-\ell,1]}(t) \right) \, \mathrm{d}t\mathrm{d}\ell \\
&= \int_{0}^{s} \left( \int_{t}^{1} \frac{f_L(\ell)}{\ell(1-\ell)} \, \mathrm{d}\ell  - \int_{1-t}^{1} \frac{f_L(\ell)}{\ell(1-\ell)} \, \mathrm{d}\ell\right) \, \mathrm{d}t.
\end{align*}
This shows that the regularity of $f_L$ bootstraps itself, proving that $f_L$ is indefinitely differentiable. So by differentiating both sides twice and using that $f_L(s) = f_L(1-s)$, we get
$$ f_L''(s) = -\frac{2f_L(s)}{s(1-s)}.$$
Solving this differential equation and using the conditions $f_L'(\frac{1}{2}) = 0$ and $\int_{0}^{1} f_L(s) \, \mathrm{d}s = 1$ proves the desired claim. $\square$
A: This is my attempt at answering my own question.  Let $m_i = \min(X_i, Y_i)$ and $M_i = \max(X_i, Y_i)$.  Then, at each step, with probability $1$ the following inequalities hold:
$$
\left\{\eqalignno{m_{i-1} < &X_i < M_{i-1}\cr m_{i-1}< &Y_i < M_{i-1}}\right.
$$
This implies that the distance $|X_i-Y_i|$ is almost surely monotonously decreasing and hence converges to some number $d$.  If I show that $d$ is $0$, then I've shown that both $\{X_i\}$ and $\{Y_i\}$ converge almost certainly to the same limit variable $L$. But I'm not sure how to proceed.
Regarding the second part, that is finding the distribution of the limit $L$, I also have no idea how to proceed.  Can you give me some hint?
