Solution (source code)

= Solution

Communication is reflexive because $(P^0)_{ii}=1$, and symmetric by its definition. If $i\leftrightarrow j$ and $j\leftrightarrow k$, choose positive-probability paths $i\to j$ in $m$ steps and $j\to k$ in $n$ steps. The <Chapman-Kolmogorov equation> gives
$$
(P^{m+n})_{ik}\ge(P^m)_{ij}(P^n)_{jk}>0.
$$
Combining the reverse paths gives a positive-probability path $k\to i$ as well. Thus communication is transitive and is an <equivalence relation>.

To transfer recurrence, first establish the <recurrence criterion by return probabilities>. Put $r_i=\mathbb P_i(T_i^+<\infty)$ and let $N_i=\sum_{n\ge0}\mathbf1_{\{X_n=i\}}$ under $\mathbb P_i$. After each return the <Strong Markov property> restarts the chain at $i$, so $\mathbb P_i(N_i\ge k+1)=r_i^k$. Therefore
$$
\sum_{n\ge0}(P^n)_{ii}=\mathbb E_iN_i=\sum_{k\ge0}r_i^k.
$$
For $r_i<1$ this equals $(1-r_i)^{-1}$; for $r_i=1$ it is infinite. The <expectation> identity follows by summing the nonnegative indicators, so remains valid when the <expectation> is infinite. Consequently $i$ is a <recurrent state> exactly when its return-probability series diverges.

If $i\leftrightarrow j$, choose $a,b$ with $(P^a)_{ji}>0$ and $(P^b)_{ij}>0$. For every $n\ge0$,
$$
(P^{a+n+b})_{jj}\ge(P^a)_{ji}(P^n)_{ii}(P^b)_{ij}.
$$
Summing over $n$, recurrence of $i$ forces the return-probability series for $j$ to diverge. The proved criterion shows \b[$j$ is recurrent, so recurrence is a property of the <communicating class>].