Solution (source code)

= Solution

Let $C$ be an <open communicating class>, and fix $i\in C$. There is a path of positive probability from $i$ to a state outside $C$. Choose a shortest such path, so it does not revisit $i$ before exiting. No state reached outside $C$ can have a path back to $C$: combined with the exit path and communication within $C$, such a path would put it in the same <communicating class>. Thus with positive probability the chain never returns to $i$. Its return probability is less than one, making $i$ a <transient state>. This proves transience throughout $C$.

Conversely, suppose a finite <communicating class> were both closed and transient. Starting inside it, a path stays there forever. Since it has finitely many states, at least one state must be visited infinitely often. But a <transient state> is visited only finitely often almost surely, and the union of finitely many exceptional null events still has probability zero. This is a contradiction. \b[Every finite transient <communicating class> is therefore open.]

For the infinite counterexample, take the <biased random walk> on $\mathbb Z$ with independent increments $+1$ of probability $3/4$ and $-1$ of probability $1/4$. All states communicate, so $\mathbb Z$ is one infinite <closed communicating class>. The <strong law of large numbers> gives $X_n/n\to1/2$ almost surely. Consequently every fixed state is visited only finitely often, and the class is transient. Finiteness is exactly what fails in the preceding argument.