Tutorials › Stochastic Processes › Edge Flows and Currents in Finite Chains

Reversibility and Detailed Balance · Tutorial 262 of 994

Edge Flows and Currents in Finite Chains

Learn to turn stationary transition probabilities into edge flows, read reversibility from their symmetry, and calculate net currents without confusing flow with transition probability.

Advanced 9 min read

What You'll Learn

  • Define stationary directed edge flows from a stationary distribution and transition matrix.
  • Prove that stationary flows have equal total inflow and outflow at each state.
  • Calculate antisymmetric net currents and interpret their conservation.
  • Connect symmetric stationary flows with detailed balance and reversibility.
  • Construct a transition matrix from a balanced flow with positive row sums.
  • Verify flows and currents in reversible and nonreversible finite-chain examples.

From Transition Probabilities to Edge Flows

A transition probability describes the next move conditional on the chain’s current state. In a stationary chain, it is also useful to ask how much probability mass travels along each directed transition per time step. This quantity is an edge flow: it combines the probability of being at the starting state with the probability of making the move. Comparing the flow in opposite directions separates a chain’s overall movement from its net directional current.

Let \((X_n)_{n\ge0}\) be a discrete-time Markov chain on a finite 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\). Suppose the initial distribution is the row vector \(\pi\), and \(\pi P=\pi\); then the chain is stationary. Its filtration may be taken as \(\mathcal{F}_n=\sigma(X_0,\ldots,X_n)\). In this tutorial, \(\pi\) is a stationary distribution, not necessarily a unique one.

Definition: The stationary directed edge flow from \(i\) to \(j\) is \(q(i,j)=\pi_i p_{ij}\). The net current from \(i\) to \(j\) is \(J(i,j)=q(i,j)-q(j,i)\). Thus \(J(j,i)=-J(i,j)\), and \(J(i,i)=0\). A chain is reversible with respect to \(\pi\) when it satisfies detailed balance, \(q(i,j)=q(j,i)\) for every pair \(i,j\).

The flow \(q(i,j)\) is the probability that the chain is at \(i\) at time \(n\) and at \(j\) at time \(n+1\), when \(X_n\) has distribution \(\pi\). Indeed, that joint probability is \(\mathbb{P}(X_n=i,X_{n+1}=j)=\pi_i p_{ij}\). The flow includes self-transitions: \(q(i,i)=\pi_i p_{ii}\). For any pair of distinct states, \(J(i,j)>0\) means more stationary probability mass moves from \(i\) to \(j\) than from \(j\) to \(i\). It does not mean that the transition probability \(p_{ij}\) alone exceeds \(p_{ji}\).

Conservation of Stationary Flow

Stationarity makes the total flow leaving a state match the total flow entering it. This is a local conservation statement: the mass at a state does not build up or drain away from one step to the next.

Theorem (Flow conservation): For a finite Markov chain with stationary distribution \(\pi\), the stationary flows satisfy \(\sum_j q(i,j)=\pi_i\) and \(\sum_j q(j,i)=\pi_i\) for every \(i\). Consequently, \(\sum_j J(i,j)=0\) for every \(i\).

Proof. By the definition of \(q\) and the row sums of \(P\), the total outgoing flow from \(i\) is \(\sum_j q(i,j)=\sum_j\pi_i p_{ij}=\pi_i\sum_jp_{ij}=\pi_i\). The total incoming flow is \(\sum_j q(j,i)=\sum_j\pi_jp_{ji}=(\pi P)_i=\pi_i\), using stationarity. Subtracting the incoming total from the outgoing total gives \(\sum_jJ(i,j)=\sum_jq(i,j)-\sum_jq(j,i)=\pi_i-\pi_i=0\). The term \(J(i,i)\) is zero, so including self-transitions does not change this conclusion. \(\square\)

There is also a useful converse for constructing chains from flows. The positivity condition below ensures that every row of the transition matrix can be recovered by dividing by its state’s stationary mass.

Theorem (Recovering a chain from a balanced flow): Let \(S\) be finite, and suppose \(q(i,j)\ge0\) has equal row and column sums \(\pi_i>0\) at every state \(i\), with \(\sum_i\pi_i=1\). Then \(p_{ij}=q(i,j)/\pi_i\) defines a row-stochastic transition matrix \(P\), and \(\pi P=\pi\).

Proof. Since \(\pi_i>0\), each ratio \(p_{ij}=q(i,j)/\pi_i\) is defined and nonnegative. For each \(i\), \(\sum_jp_{ij}=(\sum_jq(i,j))/\pi_i=\pi_i/\pi_i=1\), so \(P\) is row-stochastic. For each \(j\), \((\pi P)_j=\sum_i\pi_i p_{ij}=\sum_iq(i,j)=\pi_j\), where the last equality uses the column sum assumption. Hence \(\pi P=\pi\). \(\square\)

If a row sum is zero, this construction cannot define the transition probabilities out of that state by division. The theorem therefore assumes strictly positive \(\pi_i\) on all of \(S\). A balanced flow is not by itself a transition matrix; its row sums must first be used to normalize each row.

Detailed Balance and Symmetric Flows

The edge-flow formulation makes the connection to reversibility exact. Detailed balance requires that each directed transition be matched by an equal flow in the reverse direction. Equivalently, no pair of states has a net current.

Theorem: For a Markov chain with stationary distribution \(\pi\), detailed balance with respect to \(\pi\) holds if and only if \(J(i,j)=0\) for every \(i,j\).

Proof. By definition, detailed balance means \(\pi_i p_{ij}=\pi_jp_{ji}\) for all \(i,j\). Since \(q(i,j)=\pi_i p_{ij}\), this is exactly the equality \(q(i,j)=q(j,i)\). By the definition \(J(i,j)=q(i,j)-q(j,i)\), that equality holds exactly when \(J(i,j)=0\). This proves both implications, including \(i=j\), for which the current is always zero. \(\square\)

This equivalence concerns flows under a specified stationary distribution. A transition matrix can have unequal probabilities in opposite directions and still satisfy detailed balance if the stationary masses at the two states differ appropriately. Conversely, stationarity alone only guarantees the conservation of total flow at each state; it does not force each pair of opposing flows to match.

Worked Example: A Reversible Chain with Unequal Transition Probabilities

Consider the chain on \(S=\{1,2,3\}\) with \(P=\begin{bmatrix}\tfrac12&\tfrac12&0\\[2pt]\tfrac14&\tfrac12&\tfrac14\\[2pt]0&\tfrac12&\tfrac12\end{bmatrix}\). The row sums are \(\tfrac12+\tfrac12+0=1\), \(\tfrac14+\tfrac12+\tfrac14=1\), and \(0+\tfrac12+\tfrac12=1\). Take \(\pi=(\tfrac14,\tfrac12,\tfrac14)\). Direct multiplication gives \(\pi P=(\tfrac18+\tfrac18,\ \tfrac18+\tfrac14+\tfrac18,\ \tfrac18+\tfrac18)=(\tfrac14,\tfrac12,\tfrac14)=\pi\).

Compute the flows entry by entry using \(q(i,j)=\pi_i p_{ij}\): \(q(1,1)=\tfrac18\), \(q(1,2)=\tfrac18\), \(q(1,3)=0\); \(q(2,1)=\tfrac18\), \(q(2,2)=\tfrac14\), \(q(2,3)=\tfrac18\); and \(q(3,1)=0\), \(q(3,2)=\tfrac18\), \(q(3,3)=\tfrac18\). Thus the flow matrix is \(\begin{bmatrix}\tfrac18&\tfrac18&0\\[2pt]\tfrac18&\tfrac14&\tfrac18\\[2pt]0&\tfrac18&\tfrac18\end{bmatrix}\), which is symmetric.

The pairwise currents are \(J(1,2)=\tfrac18-\tfrac18=0\), \(J(1,3)=0-0=0\), and \(J(2,3)=\tfrac18-\tfrac18=0\); reverse currents are their negatives and are also zero. The diagonal currents vanish. Hence detailed balance holds. Notice that \(p_{12}=\tfrac12\) but \(p_{21}=\tfrac14\): the transition probabilities differ, while the flows agree because \(\pi_1=\tfrac14\) and \(\pi_2=\tfrac12\). As a further conservation check, the outgoing flows from state 2 sum to \(\tfrac18+\tfrac14+\tfrac18=\tfrac12=\pi_2\), and the incoming flows sum to \(\tfrac18+\tfrac14+\tfrac18=\tfrac12\).

Worked Example: A Stationary Chain with Nonzero Current

On \(S=\{1,2,3\}\), let \(P=\begin{bmatrix}0&\tfrac34&\tfrac14\\[2pt]\tfrac14&0&\tfrac34\\[2pt]\tfrac34&\tfrac14&0\end{bmatrix}\). Every row sums to \(1\): the sums are \(0+\tfrac34+\tfrac14=1\), \(\tfrac14+0+\tfrac34=1\), and \(\tfrac34+\tfrac14+0=1\). With \(\pi=(\tfrac13,\tfrac13,\tfrac13)\), the three entries of \(\pi P\) are \(\tfrac13(0+\tfrac14+\tfrac34)=\tfrac13\), \(\tfrac13(\tfrac34+0+\tfrac14)=\tfrac13\), and \(\tfrac13(\tfrac14+\tfrac34+0)=\tfrac13\). Thus \(\pi P=\pi\).

Each flow is the corresponding transition probability multiplied by \(\tfrac13\). In row order, the flow matrix is \(\begin{bmatrix}0&\tfrac14&\tfrac1{12}\\[2pt]\tfrac1{12}&0&\tfrac14\\[2pt]\tfrac14&\tfrac1{12}&0\end{bmatrix}\). For the pairs \((1,2),(2,3),(3,1)\), the currents are respectively \(J(1,2)=\tfrac14-\tfrac1{12}=\tfrac16\), \(J(2,3)=\tfrac14-\tfrac1{12}=\tfrac16\), and \(J(3,1)=\tfrac14-\tfrac1{12}=\tfrac16\). For instance, at state 1, \(J(1,2)=\tfrac16\), \(J(1,3)=-\tfrac16\), and \(J(1,1)=0\), so \(\sum_jJ(1,j)=\tfrac16-\tfrac16+0=0\). The same cancellation holds at states 2 and 3. The chain is stationary, its currents are conserved, and its nonzero currents show that it is not reversible with respect to \(\pi\).

Check: the outgoing flow from state 1 is \(0+\tfrac14+\tfrac1{12}=\tfrac13\), and the incoming flow is \(0+\tfrac1{12}+\tfrac14=\tfrac13\). Both equal \(\pi_1\), as flow conservation requires.

Building a Chain from Its Flows

The converse theorem gives a direct way to work from stationary flows to transition probabilities. It is especially useful when the desired stationary behavior is easier to specify as a balanced collection of flows. The next example performs the normalization explicitly and checks the resulting chain in both directions.

Worked Example: Constructing a Nonreversible Chain from a Balanced Flow

On \(S=\{1,2,3\}\), consider the proposed flow matrix \(q=\begin{bmatrix}\tfrac18&\tfrac16&\tfrac1{12}\\[2pt]\tfrac1{12}&\tfrac1{12}&\tfrac16\\[2pt]\tfrac16&\tfrac1{12}&\tfrac1{24}\end{bmatrix}\). Its row sums are \(\tfrac18+\tfrac16+\tfrac1{12}=\tfrac38\), \(\tfrac1{12}+\tfrac1{12}+\tfrac16=\tfrac13\), and \(\tfrac16+\tfrac1{12}+\tfrac1{24}=\tfrac7{24}\). Its column sums are \(\tfrac18+\tfrac1{12}+\tfrac16=\tfrac38\), \(\tfrac16+\tfrac1{12}+\tfrac1{12}=\tfrac13\), and \(\tfrac1{12}+\tfrac16+\tfrac1{24}=\tfrac7{24}\). These row sums total \(\tfrac38+\tfrac13+\tfrac7{24}=\tfrac9{24}+\tfrac8{24}+\tfrac7{24}=1\).

Set \(\pi=(\tfrac38,\tfrac13,\tfrac7{24})\), and divide each row of \(q\) by its row sum to obtain \(P\). The first row is \((\tfrac18,\tfrac16,\tfrac1{12})/(\tfrac38)=(\tfrac13,\tfrac49,\tfrac29)\); the second is \((\tfrac1{12},\tfrac1{12},\tfrac16)/(\tfrac13)=(\tfrac14,\tfrac14,\tfrac12)\); the third is \((\tfrac16,\tfrac1{12},\tfrac1{24})/(\tfrac7{24})=(\tfrac47,\tfrac27,\tfrac17)\). Each row sums to \(1\): \(\tfrac13+\tfrac49+\tfrac29=1\), \(\tfrac14+\tfrac14+\tfrac12=1\), and \(\tfrac47+\tfrac27+\tfrac17=1\).

By construction, multiplying the first, second, and third rows of \(P\) by \(\pi_1=\tfrac38\), \(\pi_2=\tfrac13\), and \(\pi_3=\tfrac7{24}\) recovers the three rows of \(q\). Since the column sums of \(q\) are \((\tfrac38,\tfrac13,\tfrac7{24})\), the entries of \(\pi P\) are those column sums, so \(\pi P=\pi\). The currents include \(J(1,2)=\tfrac16-\tfrac1{12}=\tfrac1{12}\), \(J(2,3)=\tfrac16-\tfrac1{12}=\tfrac1{12}\), and \(J(3,1)=\tfrac16-\tfrac1{12}=\tfrac1{12}\). For state 1, the outgoing-minus-incoming currents are \(J(1,2)=\tfrac1{12}\) and \(J(1,3)=-\tfrac1{12}\), which sum to zero. Thus the constructed chain is stationary and has nonzero currents.

Common Pitfall: Comparing Probabilities Instead of Flows

A common error is to call \(p_{ij}-p_{ji}\) the net current. That difference ignores how often the chain is at each state. In the reversible example above, this incorrect calculation gives \(p_{12}-p_{21}=\tfrac12-\tfrac14=\tfrac14\), which might suggest a current from 1 to 2. But the stationary flows are \(q(1,2)=\tfrac14\cdot\tfrac12=\tfrac18\) and \(q(2,1)=\tfrac12\cdot\tfrac14=\tfrac18\). The correct net current is therefore \(J(1,2)=\tfrac18-\tfrac18=0\). Use transition-probability differences only when comparing the probabilities themselves; to measure stationary movement, multiply by the relevant stationary mass first.

Flows and currents serve different purposes. The nonnegative \(q(i,j)\) records stationary probability mass moving along a directed transition. The signed \(J(i,j)\) records the imbalance between opposite directions. Stationarity forces the total current out of each state to equal the total current in, but it does not require every pairwise current to vanish. Pairwise vanishing is precisely the additional symmetry required by detailed balance.

Check Your Understanding

Use the definitions and conservation equations to justify each answer.

  1. For a stationary distribution \(\pi\), write the formulas for the outgoing flow and incoming flow at state \(i\). Which assumption makes them equal?
  2. If \(q(1,2)=\tfrac3{20}\) and \(q(2,1)=\tfrac1{20}\), compute \(J(1,2)\) and \(J(2,1)\).
  3. In the reversible example, compute \(q(2,3)\) directly from \(\pi_2\) and \(p_{23}\), then compare it with \(q(3,2)\).
  4. Why can \(p_{ij}\ne p_{ji}\) hold even when the net current \(J(i,j)\) is zero?
  5. For the flow-reconstruction theorem, explain why a zero row sum prevents the stated division from defining a transition row.