Let $X_{1}, X_{2},\ldots, X_{n},\ldots$ be independent and identically distributed random variables with distribution
$P(X_{n}=0)=P(X_{n}=1)=P(X_{n}=2)=P(X_{n}=3)=\frac{1}{4}$
Assume that the sequence $\{Y_n\}$ is defined as: $Y_{0}=0$ and for all $n\in\mathbb{N}$ we have
$Y_n=\begin{cases} 3 &\text{if } X_n=3,\\\min{\{Y_{n-1},X_n\}} &\text{if } X_n<3. \end{cases} $
Compute $\displaystyle \lim_{n\to +\infty}E[Y_{n}Y_{n-1}]$?
I don't know how to start.
Behavior of $Y_i$ is described by an aperiodic irreducible Markov chain on $4$ states which has a unique limiting distribution $\pi$ (a row vector). Let $f=(0,1,2,3)^T$ (column vector - values of $Y_i$ on $4$ states). Then $$\lim E(Y_{n-1}Y_n)=\pi(f\cdot Pf)$$ where $\cdot$ presents coordinate-wise product. You are left to explicitely contruct $P$ and find $\pi$ s.t. $\pi P=\pi$.