Solution (source code)

= Solution

Starting from a state $i$, let $\tau_i=\inf\{n\ge1:X_n=i\}$ be the <first return time>, with value infinity if no return occurs. The state is recurrent if $\Pr_i(\tau_i<\infty)=1$ and transient if this <probability> is less than 1. A <recurrent state> is <positive recurrent> if $\mathbb E_i\tau_i<\infty$, and <null recurrent> if that <expectation> is infinite.

If $i$ and $j$ communicate, choose $r,s$ with $p_{ij}^{(r)}>0$ and $p_{ji}^{(s)}>0$. The <Chapman-Kolmogorov equations> give, for every $n$,
$$
p_{ii}^{(r+n+s)}\ge p_{ij}^{(r)}p_{jj}^{(n)}p_{ji}^{(s)}.
$$
If $j$ is recurrent, the supplied criterion makes $\sum_n p_{jj}^{(n)}$ infinite. Summing this inequality shows that $\sum_n p_{ii}^{(n)}$ is also infinite, so $i$ is recurrent. The same argument with the states exchanged gives the converse. Hence \b[recurrence and transience are class properties]: states in one <communicating class> cannot have different answers to that dichotomy.