Tutorials › Stochastic Processes › Self-Loops and Aperiodicity

Classification of States · Tutorial 146 of 994

Self-Loops and Aperiodicity

Learn how self-loops force period one, how the conclusion extends across an irreducible class, and how to verify aperiodicity when no state has a self-loop.

Intermediate 10 min read

What You'll Learn

  • Define the period of a state using the positive-probability return times.
  • Prove that a positive-probability self-loop forces period one.
  • Explain why states in the same communicating class have the same period.
  • Verify aperiodicity in a chain with no self-loops using return paths of lengths two and three.
  • Contrast aperiodic chains with no self-loops against a periodic chain with no self-loops.
  • Distinguish aperiodicity within one communicating class from a claim about every state in a reducible chain.

Why a Self-Loop Matters

Period is determined by the lengths of possible returns to a state. A self-loop is a direct return in one step, so even when longer return paths are restricted to particular lengths, that one-step return changes the greatest common divisor. This gives a useful sufficient condition for aperiodicity. It is not a necessary condition: a chain can have period one even when every diagonal transition probability is zero.

Let \((X_n)_{n\ge0}\) be a discrete-time Markov chain on a finite or countable state space \(S\), defined on a probability space \((\Omega,\mathcal{F},\mathbb{P})\), with transition matrix \(P=(p_{ij})\). The matrix is row-stochastic, so \(\sum_{j\in S}p_{ij}=1\) for each \(i\). Write \(\mathbb{P}_i\) for probability when \(X_0=i\), and \(p_{ii}^{(n)}=\mathbb{P}_i(X_n=i)\) for the \(n\)-step return probability.

Definition: For a state \(i\) that can return to itself in at least one positive number of steps, its period is \(d(i)=\gcd\{n\ge1:p_{ii}^{(n)}>0\}\). A state is aperiodic if \(d(i)=1\). A self-loop at \(i\) means \(p_{ii}>0\). A chain is called aperiodic when all its states are aperiodic.

The set in the greatest common divisor uses positive times \(n\ge1\); time zero is not counted. Also, \(p_{ii}^{(n)}>0\) means there is at least one length-\(n\) path from \(i\) back to \(i\) whose transition probabilities are all positive. The probability of that particular path is the product of its transition probabilities, so its positivity verifies that \(n\) belongs to the return-time set.

The Self-Loop Criterion

Theorem: If \(p_{ii}>0\), then state \(i\) has period one. In particular, if an irreducible chain has a positive-probability self-loop at one state, every state in the chain is aperiodic.

Proof. Since \(p_{ii}>0\), the one-step return probability \(p_{ii}^{(1)}=p_{ii}\) is positive. Thus \(1\) belongs to the set of positive return times, and the greatest common divisor of a set containing \(1\) is \(1\). This proves that \(d(i)=1\). For the final statement, use the standard period-invariance result for communicating states, proved just below: every state communicating with \(i\) has the same period as \(i\). Irreducibility means every pair of states communicates, so every state has period one. \(\square\)

The first part of the theorem is local: it establishes the period of the state with the self-loop without requiring irreducibility. The second part needs irreducibility if we want to conclude that all states have period one. More generally, the conclusion extends to the communicating class of the state with the loop, not automatically to states in other classes.

Proposition: If \(i\leftrightarrow j\), then \(d(i)=d(j)\).

Proof. Choose a positive-probability path from \(i\) to \(j\) of length \(a\ge0\) and a positive-probability path from \(j\) to \(i\) of length \(b\ge0\). If \(a+b=0\), then \(i=j\) and the conclusion is immediate. Otherwise, concatenating the paths gives a positive-probability return to \(i\) of length \(a+b\). Now take any \(n\ge1\) such that \(p_{jj}^{(n)}>0\). Concatenate the path from \(i\) to \(j\), a length-\(n\) return from \(j\) to \(j\), and the path from \(j\) to \(i\). The result is a positive-probability return to \(i\) of length \(a+n+b\). Therefore \(d(i)\) divides both \(a+b\) and \(a+n+b\), and hence divides their difference \(n\). This holds for every positive return time \(n\) at \(j\), so \(d(i)\) divides \(d(j)\). Interchanging \(i\) and \(j\) gives that \(d(j)\) divides \(d(i)\); both periods are positive integers, so they are equal. \(\square\)

A related elementary observation is often useful when there is no self-loop: if two consecutive positive return lengths \(r\) and \(r+1\) occur at a state, then its period is one. Indeed, its period divides both lengths and therefore divides their difference, \(1\). This gives a direct way to verify aperiodicity without finding every possible return time.

Worked Example: A Self-Loop Makes an Irreducible Chain Aperiodic

Consider \(S=\{1,2,3\}\) and the transition matrix

$$ P= \begin{bmatrix} \tfrac12&\tfrac12&0\\ 0&0&1\\ 1&0&0 \end{bmatrix}. $$

Before using the matrix, check its rows: \(\tfrac12+\tfrac12+0=1\), \(0+0+1=1\), and \(1+0+0=1\). There is a self-loop at state \(1\), since \(p_{11}=\tfrac12>0\), so \(d(1)=1\).

To apply the conclusion to all states, verify irreducibility. State \(1\) reaches \(2\) in one step and \(3\) by \(1\to2\to3\); state \(2\) reaches \(3\) in one step and \(1\) by \(2\to3\to1\); state \(3\) reaches \(1\) in one step and \(2\) by \(3\to1\to2\). Thus every state communicates with every other state. Period invariance then gives \(d(2)=d(3)=d(1)=1\).

The return paths also let us check the conclusion directly at states \(2\) and \(3\). From state \(2\), the path \(2\to3\to1\to2\) has length \(3\) and probability \(1\cdot1\cdot\tfrac12=\tfrac12\). The path \(2\to3\to1\to1\to2\) has length \(4\) and probability \(1\cdot1\cdot\tfrac12\cdot\tfrac12=\tfrac14\). Their lengths have greatest common divisor \(\gcd(3,4)=1\).

From state \(3\), the path \(3\to1\to2\to3\) has length \(3\) and probability \(1\cdot\tfrac12\cdot1=\tfrac12\). The path \(3\to1\to1\to2\to3\) has length \(4\) and probability \(1\cdot\tfrac12\cdot\tfrac12\cdot1=\tfrac14\). Again, \(\gcd(3,4)=1\). These positive-probability paths independently verify period one for both states.

Check: the matrix has row sums \(1\), the listed path probabilities are positive, and the return lengths \(3\) and \(4\) have gcd \(1\). The direct checks agree with the self-loop theorem and the communicating-class result.

Aperiodicity Without Self-Loops

The self-loop condition is sufficient, not necessary. If there is no one-step return, the return-time set may still contain lengths with greatest common divisor one. In particular, return paths of two consecutive lengths prove period one. The next example has no self-loops at all, yet every state is aperiodic.

Worked Example: A No-Loop Chain with Period One

Let \(S=\{1,2,3\}\), with transition matrix

$$ P= \begin{bmatrix} 0&\tfrac12&\tfrac12\\ \tfrac12&0&\tfrac12\\ \tfrac12&\tfrac12&0 \end{bmatrix}. $$

Each row sums to \(1\): for each state the sum is \(0+\tfrac12+\tfrac12=1\). Every diagonal entry is zero, so no state has a self-loop.

At state \(1\), the path \(1\to2\to1\) has length \(2\) and probability \(\tfrac12\cdot\tfrac12=\tfrac14\). The path \(1\to2\to3\to1\) has length \(3\) and probability \(\tfrac12\cdot\tfrac12\cdot\tfrac12=\tfrac18\). Therefore \(d(1)\) divides both \(2\) and \(3\), so \(d(1)=\gcd(2,3)=1\).

At state \(2\), the paths \(2\to1\to2\) and \(2\to1\to3\to2\) have lengths \(2\) and \(3\), with probabilities \(\tfrac14\) and \(\tfrac18\), respectively. Thus \(d(2)=\gcd(2,3)=1\). At state \(3\), the paths \(3\to1\to3\) and \(3\to1\to2\to3\) also have lengths \(2\) and \(3\), with probabilities \(\tfrac14\) and \(\tfrac18\). Thus \(d(3)=\gcd(2,3)=1\).

Check: the row sums are all \(1\), and each state has exhibited positive-probability returns at lengths \(2\) and \(3\). Since \(\gcd(2,3)=1\), all three states are aperiodic despite having no self-loops.

Here the extra routes between states make return paths of different lengths possible. The definition depends on the gcd of all possible positive return lengths, not on whether the shortest return happens to be one. A pair of coprime return lengths is enough; two consecutive lengths are a particularly convenient pair.

No Self-Loop Does Not Mean Aperiodic

Worked Example: A No-Loop Chain with Period Two

On \(S=\{1,2\}\), consider the deterministic alternating chain with

$$ P= \begin{bmatrix} 0&1\\ 1&0 \end{bmatrix}. $$

The row sums are \(0+1=1\) and \(1+0=1\), and both diagonal entries are zero. Starting from state \(1\), the chain is at state \(2\) after one step, back at \(1\) after two, at \(2\) after three, and back at \(1\) after four. More generally, the unique path returns to \(1\) exactly at positive even times, so its return-time set is \(\{2,4,6,\ldots\}\) and \(d(1)=\gcd(2,4,6,\ldots)=2\).

Starting from state \(2\), the same alternation gives the return-time set \(\{2,4,6,\ldots\}\), so \(d(2)=2\) as well. Thus the chain is periodic, even though it has no self-loops.

Check: the only return lengths are even, so their gcd cannot be \(1\); the length \(2\) is itself a return, so their gcd is exactly \(2\). This confirms the period calculation.

Scope and Common Pitfalls

A positive-probability self-loop settles the period of its own state, and period invariance settles the periods of states that communicate with it. It does not settle the periods of states in other communicating classes. For example, consider a chain on \(\{1,2,3\}\) with transition matrix \(\begin{bmatrix}1&0&0\\0&0&1\\0&1&0\end{bmatrix}\). Its row sums are \(1+0+0=1\), \(0+0+1=1\), and \(0+1+0=1\). State \(1\) has a self-loop and period one, while states \(2\) and \(3\) alternate and each has period two. The chain is reducible, so the self-loop at \(1\) gives no conclusion about the other class.

A common mistake is to reason, “There is no self-loop, so the state has period two.” The three-state chain in the preceding example shows why that calculation fails: at state \(1\), the returns of lengths \(2\) and \(3\) have probabilities \(\tfrac14\) and \(\tfrac18\), so the period divides both \(2\) and \(3\), and is therefore \(1\), not \(2\). Absence of a one-step return only says that \(1\) is not in the return-time set; it does not imply that every return time is even.

Another error is to conclude that one self-loop makes every state in any chain aperiodic. The reducible example above corrects this: a loop at a state forces period one there, and the conclusion transfers only to states in its communicating class. Before using the class-wide conclusion, check irreducibility or identify the relevant class.

Takeaway: Check \(p_{ii}>0\) first: it immediately gives \(d(i)=1\). If there is no self-loop, look for positive-probability return paths whose lengths have gcd one, such as consecutive lengths. To extend a state-level conclusion to other states, verify that they communicate with that state.

Check Your Understanding

For each question, distinguish the return lengths that are possible from those that have merely been exhibited.

  1. If \(p_{ii}=\tfrac17\), what return length is guaranteed to occur with positive probability, and what does this imply about \(d(i)\)?
  2. A state has positive-probability returns of lengths \(5\) and \(6\). What is its period?
  3. In the three-state chain with no self-loops, list the two return paths used to establish period one for state \(2\), and give their probabilities.
  4. Why does the two-state alternating chain have period two rather than period one?
  5. What additional condition lets a self-loop at one state imply that every state is aperiodic?