Absorbing state (source code)

= Absorbing state

For a finite, time-homogeneous <Discrete-time Markov chain> with row-stochastic <transition matrix> $P$, a state $a$ is absorbing exactly when $P_{aa}=1$. Nonnegativity and the row sum then force $P_{aj}=0$ for $j\ne a$: once entered, $a$ is never left. Equivalently, $\{a\}$ is a <closed communicating class>. A larger <closed communicating class> may keep moving internally; closure means confinement to a set, whereas absorption at a state means remaining at one point.

An <absorbing state> is useful for recording a terminal outcome: after a toy routine finishes, keep its outcome in the <state space> so that the same <transition matrix> still describes subsequent steps. Calling a finite <Markov chain> absorbing usually also requires that some <absorbing state> be accessible from every state. Merely containing an <absorbing state> is insufficient: another <closed communicating class> could prevent absorption. See https://math.dartmouth.edu/~prob/prob/prob.pdf#page=423[Grinstead and Snell, Introduction to Probability, section 11.2] for this convention.

Consider a constructed routine with unfinished modes $u,v$ and terminal outcomes $A,B$. All the following <transition probabilities> are chosen for illustration, not estimated from observations. In state order $(u,v,A,B)$, take
$$
P=\begin{pmatrix}
1/2&1/4&1/4&0\\
1/4&1/4&0&1/2\\
0&0&1&0\\
0&0&0&1
\end{pmatrix}.
$$
The <communicating class> $\{u,v\}$ is open, while $\{A\}$ and $\{B\}$ are <closed communicating classes> consisting of <absorbing states>. Both terminal outcomes are accessible from both unfinished modes, sometimes by an indirect path.

\Image[/markov-classes-absorption-terminal-routine.png]
{title=A constructed four-state routine: arrows give transition probabilities, and the two absorbing outcomes have different eventual probabilities and waiting times.}

Let $T=\inf\{n\geq0:X_n\in\{A,B\}\}$ be the terminal <hitting time>. Write $h_i=\mathbb P_i(X_T=A)$ for the <absorption probability> and $t_i=\mathbb E_iT$ for the <expected hitting time>, with the subscript denoting the starting state. <First-step analysis> gives
$$
h_u=\tfrac12h_u+\tfrac14h_v+\tfrac14,\qquad
h_v=\tfrac14h_u+\tfrac14h_v,
$$
$$
t_u=1+\tfrac12t_u+\tfrac14t_v,\qquad
t_v=1+\tfrac14t_u+\tfrac14t_v.
$$
Here $h_A=1$, $h_B=0$, and $t_A=t_B=0$. Solving these two pairs of <linear equations> yields
$$
(h_u,h_v)=\left(\frac35,\frac15\right),\qquad
(t_u,t_v)=\left(\frac{16}5,\frac{12}5\right).
$$
Starting at $u$ therefore ends at $A$ with <probability> $0.6$ and takes $3.2$ steps on average to reach either terminal state. The terminal <hitting time> counts the transition into the outcome, but no later self-transitions. Outcome and duration answer different questions: from $v$, outcome $A$ is less likely, yet termination is faster on average.

The <matrix power> $P^2$ gives the <probability distribution> after two steps from $u$ as
$$
(P^2)_{u,\cdot}=\left(\frac5{16},\frac3{16},\frac38,\frac18\right).
$$
Thus $\mathbb P_u(T>2)=1/2$, and the <probability> of having already reached $A$ is $3/8$, still below its eventual <absorption probability> $3/5$. From either unfinished mode, each next step has terminal <probability> at least $1/4$. Consequently $\mathbb P_i(T>n)\leq(3/4)^n$, proving termination <almost surely> and finite <expected hitting time> directly. The <Fundamental matrix of a finite absorbing Markov chain> packages both calculations and counts visits to unfinished modes.