Classification of States

Why Classify States?

Not all states in a Markov chain behave the same way. Some states are visited infinitely often; others are visited only finitely many times and then abandoned forever. Some states can reach every other state; others are trapped in subsets. Understanding this structural decomposition is essential before asking questions about long-run behavior: convergence theorems apply only to chains with the right structural properties.

Definition:

Accessible and Communicating States

State jj is accessible from state ii (written iβ†’ji \to j) if there exists nβ‰₯0n \geq 0 such that pij(n)>0p_{ij}^{(n)} > 0.

States ii and jj communicate (written i↔ji \leftrightarrow j) if iβ†’ji \to j and jβ†’ij \to i.

Communication is an equivalence relation on S\mathcal{S}: it is reflexive (i↔ii \leftrightarrow i since pii(0)=1p_{ii}^{(0)} = 1), symmetric (by definition), and transitive (by Chapman-Kolmogorov).

The equivalence classes under ↔\leftrightarrow are called communicating classes. If there is only one communicating class (every state communicates with every other), the chain is irreducible.

,

Definition:

Irreducible Markov Chain

A DTMC is irreducible if for every pair of states i,j∈Si, j \in \mathcal{S}, we have i↔ji \leftrightarrow j. Equivalently, the state space consists of a single communicating class.

If the chain is not irreducible, the state space decomposes into communicating classes C1,C2,…C_1, C_2, \ldots, and the long-run behavior can be analyzed class by class.

Irreducible

A Markov chain is irreducible if every state can be reached from every other state with positive probability in some finite number of steps.

Related: Irreducible Markov Chain, Accessible and Communicating States

Definition:

Recurrent and Transient States

Define the return probability of state ii:

fii=P(βˆƒβ€‰nβ‰₯1:Xn=i∣X0=i).f_{ii} = \mathbb{P}(\exists\, n \geq 1 : X_n = i \mid X_0 = i).

State ii is:

  • Recurrent if fii=1f_{ii} = 1 (the chain returns to ii with certainty).
  • Transient if fii<1f_{ii} < 1 (there is positive probability of never returning).

Equivalently, ii is recurrent if and only if βˆ‘n=0∞pii(n)=∞\sum_{n=0}^{\infty} p_{ii}^{(n)} = \infty, and transient if and only if βˆ‘n=0∞pii(n)<∞\sum_{n=0}^{\infty} p_{ii}^{(n)} < \infty.

A recurrent state is visited infinitely often (with probability 1). A transient state is visited only finitely many times. The expected number of visits to a transient state ii, starting from ii, is 1/(1βˆ’fii)<∞1/(1 - f_{ii}) < \infty.

,

Recurrent state

A state ii is recurrent if a chain starting at ii returns to ii with probability 1. Equivalently, βˆ‘n=0∞pii(n)=∞\sum_{n=0}^{\infty} p_{ii}^{(n)} = \infty.

Related: Recurrent and Transient States

Theorem: Recurrence and Transience Criterion

Let {Xn}\{X_n\} be an irreducible DTMC. Then either all states are recurrent or all states are transient. That is, recurrence and transience are class properties of an irreducible chain.

If ii is recurrent and i↔ji \leftrightarrow j, then the chain must visit jj on its way between visits to ii, so jj is also visited infinitely often.

,

Definition:

Period of a State

The period of state ii is

d(i)=gcd⁑{nβ‰₯1:pii(n)>0}.d(i) = \gcd\{n \geq 1 : p_{ii}^{(n)} > 0\}.

If d(i)=1d(i) = 1, the state is aperiodic. If d(i)>1d(i) > 1, it is periodic with period d(i)d(i).

An irreducible chain has a common period for all states (periodicity is a class property). If an irreducible chain is aperiodic, we call the entire chain aperiodic.

A sufficient condition for aperiodicity: if pii>0p_{ii} > 0 for some state ii in an irreducible chain, then the entire chain is aperiodic (since 1∈{n:pii(n)>0}1 \in \{n : p_{ii}^{(n)} > 0\} forces gcd⁑=1\gcd = 1).

,

Aperiodic

A state ii (or an irreducible chain) is aperiodic if gcd⁑{nβ‰₯1:pii(n)>0}=1\gcd\{n \geq 1 : p_{ii}^{(n)} > 0\} = 1. Aperiodicity ensures the chain does not cycle deterministically among subsets of states.

Related: Period of a State

Example: Gambler's Ruin

A gambler starts with $i\$i and bets $1\$1 on each round of a fair game (p=q=1/2p = q = 1/2). The gambler stops when reaching $0\$0 (ruin) or $N\$N (goal). Model this as a DTMC on S={0,1,…,N}\mathcal{S} = \{0, 1, \ldots, N\} and classify the states.

,

Example: Simple Random Walk on Z\mathbb{Z}

Consider the simple symmetric random walk on Z\mathbb{Z}: at each step, move right with probability 1/21/2 and left with probability 1/21/2. Is this chain irreducible? Is it recurrent or transient?

,

Gambler's Ruin: Sample Path Simulation

Simulate sample paths of the gambler's ruin problem. Observe how the gambler's fortune evolves and how the ruin probability depends on the initial fortune ii, the target NN, and the win probability pp.

Parameters
10
20
0.5
5

Communicating Classes and Periodicity

Explore how the structure of the transition matrix determines communicating classes and periodicity. Select from several example chains to see their class decomposition, or enter a custom matrix.

Parameters

Select a pre-built example or choose custom

Common Mistake: Finite Irreducible Chains Are Always Recurrent

Mistake:

Trying to check recurrence for a finite irreducible chain by summing βˆ‘npii(n)\sum_n p_{ii}^{(n)}. This is unnecessary work.

Correction:

Every finite irreducible Markov chain is automatically recurrent. Transience is only possible for chains on infinite state spaces (like the random walk on Z3\mathbb{Z}^3). For finite chains, focus on periodicity and the stationary distribution.

Common Mistake: Reading Period from the Transition Diagram

Mistake:

Concluding that a chain has period 2 because "it looks like it alternates" in the transition diagram, without computing gcd⁑{n:pii(n)>0}\gcd\{n : p_{ii}^{(n)} > 0\}.

Correction:

Always compute the period formally. A single self-loop (pii>0p_{ii} > 0) anywhere in an irreducible chain makes the entire chain aperiodic, regardless of how the rest of the diagram looks.

Recurrent vs Transient States

PropertyRecurrentTransient
Return probability fiif_{ii}fii=1f_{ii} = 1fii<1f_{ii} < 1
βˆ‘npii(n)\sum_n p_{ii}^{(n)}=∞= \infty<∞< \infty
Number of visitsInfinite (a.s.)Finite (a.s.)
Finite irreducible chain?Always recurrentImpossible
Random walk on Zd\mathbb{Z}^dd=1,2d = 1, 2: recurrentdβ‰₯3d \geq 3: transient

Quick Check

Consider a DTMC on {1,2,3}\{1, 2, 3\} with transition matrix P=(010001100)\mathbf{P} = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 0 & 0 \end{pmatrix}. What is the period of this chain?

1 (aperiodic)

2

3

6

Key Takeaway

States decompose into communicating classes. Within an irreducible chain, all states share the same recurrence/transience and the same period. For finite irreducible chains, all states are recurrent β€” transience requires an infinite state space. Aperiodicity (d=1d = 1) and irreducibility together guarantee convergence to a unique stationary distribution (Section 3).