Entropy Rates of a Stochastic Process

What this note builds
  1. 01Tractability assumptionsaccount for grammar between symbols, collapsing parameters with stationarity and Markov chains
  2. 02Entropy rate viewsthe per-symbol average equals the conditional rate, plus a generalized AEP
  3. 03Closed form for entropy ratederiving the entropy rate formula for a Markov chain
  4. 04Second law of thermodynamicsrelative entropy between initial states contracts monotonically under a Markov chain
  5. 05Functions of a Markov chainthe output stream's entropy rate, found by sandwiching it between bounds
· 81 min read · 16,039 words

Motivation: the operator has grammar

The AEP established that nH(X)n H(X) bits suffice on average to losslessly encode nn random variables drawn from an independent and identically distributed (i.i.d.) source.

In real-world communication systems, the i.i.d. assumption is completely broken:

  • Natural language has structure: A telegraph operator typing English never draws letters from an independent lottery. After typing Q, the probability of the next letter being U is virtually 1.01.0. After TH, the vowel E appears far more frequently than pure chance.
  • Keystrokes are temporally correlated: The current letter XiX_i is heavily conditioned on the historical sequence that preceded it: (Xi−1,Xi−2,…,X1)(X_{i-1}, X_{i-2}, \dots, X_1).

Because the physical source violates independence, our naive i.i.d. formula H(Xn)=nH(X)H(X^n) = n H(X) fails to capture the true information content of the wire.

IntuitionThe Engineering Question: Does a Per-Symbol Rate Still Exist?

When keystrokes depend on one another, does the total joint entropy H(X1,X2,…,Xn)H(X_1, X_2, \ldots, X_n) still grow linearly with sequence length nn?

  • If it does grow linearly: The telegraph operator has a well-defined asymptotic “bits per keystroke” metric: lim⁡n→∞1nH(X1,…,Xn)=H(X)\lim_{n \to \infty} \frac{1}{n} H(X_1, \dots, X_n) = H(\mathcal{X}) Telecom companies can continue to price bandwidth per character, and compressors can exploit the predictability of grammar to compress the stream below the single-character entropy H(X1)H(X_1).
  • If it does not grow linearly: There is no stable cost-per-symbol, and the concept of an intrinsic information density collapses.

For stationary sources, the growth is guaranteed to be asymptotically linear. Grammar does not break compression; it unlocks greater compression, because predictability reduces entropy.

ConventionNotation: Variable vs. Process

We denote the entropy of a single random variable by H(X)H(X), and the asymptotic entropy rate of an entire stochastic process by H(X)H(\mathcal{X}) (using a calligraphic argument).


Stochastic Processes and Stationarity

To model temporal correlation rigorously, we move from isolated random variables to sequences of random variables indexed over time.

DefinitionStochastic Process

A discrete-time stochastic process {Xi}i=1∞\{X_i\}_{i=1}^\infty is an indexed sequence of random variables defined over a common alphabet X\mathcal{X}.

In general, the random variables may exhibit arbitrary historical dependence. The process is fully specified by the consistent family of joint probability mass functions:

p(x1,x2,…,xn)=Pr⁡(X1=x1,X2=x2,…,Xn=xn)for all n≥1,  xi∈Xp(x_1, x_2, \ldots, x_n) = \Pr(X_1 = x_1, X_2 = x_2, \ldots, X_n = x_n) \quad \text{for all } n \ge 1, \; x_i \in \mathcal{X}

ComponentDetail
Physical ModelThe operator’s ongoing tape: XiX_i represents the symbol sent on the ii-th keystroke.
Statistical ComplexityAn i.i.d. source over alphabet X\mathcal{X} is completely fixed by just ∥X∥−1\|\mathcal{X}\| - 1 numbers (since ∑xp(x)=1\sum_{x} p(x) = 1). In contrast, an arbitrary process has unbounded memory: specifying a block of length nn requires ∥X∥n−1\|\mathcal{X}\|^n - 1 independent parameters, and describing the process across all lengths n≥1n \ge 1 requires infinitely many parameters (∑n=1∞∥X∥n−1(∥X∥−1)=∞\sum_{n=1}^\infty \|\mathcal{X}\|^{n-1}(\|\mathcal{X}\| - 1) = \infty). This makes estimation and analysis intractable without simplifying structural assumptions like stationarity or Markov memory limits.

The first essential assumption we impose is that the statistical rules governing the source do not drift over time.

DefinitionStrict Stationarity

A stochastic process {Xi}\{X_i\} is stationary (in the strict sense) if the joint probability distribution of any block of symbols is completely invariant under time shifts:

Pr⁡(X1=x1,…,Xn=xn)=Pr⁡(X1+l=x1,…,Xn+l=xn)\Pr(X_1 = x_1, \ldots, X_n = x_n) = \Pr(X_{1+l} = x_1, \ldots, X_{n+l} = x_n)

for every block length n≥1n \ge 1, every integer time shift ll, and all choices of x1,…,xn∈Xx_1, \ldots, x_n \in \mathcal{X}.

IntuitionWhat Stationarity Means (Why Stationarity ≠\neq Independence)

A common point of confusion is thinking that when n=1n = 1, stationarity implies independence. They are completely different concepts:

  • Independence means symbols do not affect each other: Pr⁡(X1=a,  X2=b)=Pr⁡(X1=a)×Pr⁡(X2=b)\Pr(X_1 = a, \; X_2 = b) = \Pr(X_1 = a) \times \Pr(X_2 = b) (Knowing the past tells you nothing about the future.)

  • Stationarity means the clock doesn’t change the statistical blueprint: Pr⁡(X1=a)=Pr⁡(X2=a)andPr⁡(X1=a,X2=b)=Pr⁡(X1+l=a,X2+l=b)\Pr(X_1 = a) = \Pr(X_2 = a) \quad \text{and} \quad \Pr(X_1 = a, X_2 = b) = \Pr(X_{1+l} = a, X_{2+l} = b) (The rules of the game are time-invariant, sliding your observation window along the tape changes nothing.)

An Example: Complete Dependence with Strict Stationarity

Imagine a machine that flips a fair coin once at the start of time:

  • If Heads, it outputs 1, 0, 1, 0, 1, 0, ... forever.

  • If Tails, it outputs 0, 1, 0, 1, 0, 1, ... forever.

  1. Extreme Dependence: If you see X1=1X_1 = 1, you know with 100%100\% certainty that X2=0X_2 = 0. The keystrokes are totally locked together, independence is completely violated.
  2. Strict Stationarity:
    • For any single keystroke kk, Pr⁡(Xk=1)=0.5\Pr(X_k = 1) = 0.5 and Pr⁡(Xk=0)=0.5\Pr(X_k = 0) = 0.5.
    • For any adjacent pair, the block 10 occurs with probability 0.50.5 at positions (1,2)(1, 2), at positions (2,3)(2, 3), and at positions (100,101)(100, 101).

The joint probability of any block is identical no matter where you slide your inspection window on the tape. Stationarity preserves temporal grammar, it simply guarantees that the grammar does not mutate over time.

WarningWhen Stationarity Fails

A process is non-stationary if the underlying source dynamics evolve. Examples include:

  1. An operator who starts a shift alert and follows strict grammar, but becomes fatigued and begins making frequent typographical errors.
  2. A copper telegraph cable that heats up under continuous load, altering its channel noise characteristics over time.

For non-stationary sources, time-shift arguments fail, and the limit lim⁡n→∞1nH(X1,…,Xn)\lim_{n \to \infty} \frac{1}{n} H(X_1, \dots, X_n) may fail to converge.

NoteParameter Reduction: Why Stationarity Alone Is Not Enough

How much does stationarity actually simplify the source?

In an arbitrary (non-stationary) process, specifying the distribution of a block of length nn at a specific starting position requires ∣X∣n−1|\mathcal{X}|^n - 1 parameters. Because the distribution could drift at every single point in time, describing blocks of length nn across all possible starting positions t=1,2,3,…t = 1, 2, 3, \dots requires a fresh set of parameters for every shift. Stationarity collapses all these identical time-shifted blocks into a single joint distribution:

p(x1,…,xn)=p(x1+l,…,xn+l)p(x_1, \dots, x_n) = p(x_{1+l}, \dots, x_{n+l})

  • What stationarity buys us: The distribution of an nn-gram depends only on its length nn, not on when it is typed. You only need one set of ∣X∣n−1|\mathcal{X}|^n - 1 parameters for length nn, rather than a different set for every time index tt.
  • The remaining problem: As the block length nn grows, the number of required parameters ∣X∣n−1|\mathcal{X}|^n - 1 still explodes exponentially. Stationarity prevents the grammar from mutating over time, but it still permits infinite memory depth, the nn-th symbol can still depend in intricate ways on all n−1n-1 past symbols.

Markov Chains: Finite Memory

Stationarity eliminates time drift, but still allows dependence to reach arbitrarily far into the past (e.g., XnX_n depending on every single character back to X1X_1).

The simplest tractable model of memory is that the next symbol depends only on the immediately preceding symbol.

DefinitionDiscrete-Time Markov Chain

A stochastic process {Xi}\{X_i\} is a Markov chain if the conditional distribution of the next state depends exclusively on the current state, rendering it conditionally independent of all older history:

Pr⁡(Xn+1=xn+1∣Xn=xn,Xn−1=xn−1,…,X1=x1)=Pr⁡(Xn+1=xn+1∣Xn=xn)\Pr(X_{n+1} = x_{n+1} \mid X_n = x_n, X_{n-1} = x_{n-1}, \ldots, X_1 = x_1) = \Pr(X_{n+1} = x_{n+1} \mid X_n = x_n)

for all n≥1n \ge 1 and all states x1,…,xn+1∈Xx_1, \ldots, x_{n+1} \in \mathcal{X}.

This property embodies the classical principle: the future is independent of the past, given the present.


Factorization and Time Invariance

By applying the general multiplication rule of probability along with the Markov property, the joint distribution of any nn-character sequence collapses into a simple telescoping product:

FormulaFactorization of a Markov Chain

p(x1,x2,…,xn)=p(x1)∏i=1n−1p(xi+1∣xi)=p(x1) p(x2∣x1) p(x3∣x2)⋯p(xn∣xn−1)p(x_1, x_2, \ldots, x_n) = p(x_1) \prod_{i=1}^{n-1} p(x_{i+1} \mid x_i) = p(x_1) \, p(x_2 \mid x_1) \, p(x_3 \mid x_2) \cdots p(x_n \mid x_{n-1})

DefinitionTime Invariance (Homogeneity)

A Markov chain is time-invariant (or time-homogeneous) if the transition probabilities between states do not depend on the step index nn:

Pr⁡(Xn+1=j∣Xn=i)=Pr⁡(X2=j∣X1=i)for all n≥1 and all i,j∈X\Pr(X_{n+1} = j \mid X_n = i) = \Pr(X_2 = j \mid X_1 = i) \quad \text{for all } n \ge 1 \text{ and all } i, j \in \mathcal{X}

(Relationship to stationarity: This is implied by the process stationarity defined earlier, but is strictly weaker, a chain can have fixed transition rules across all time yet fail to be stationary if its initial state distribution p(1)\mathbf{p}^{(1)} is not set to the stationary equilibrium μ\boldsymbol{\mu}, causing early marginal probabilities to drift).

NoteParameter Collapse: From Exponential Explosion to a Fixed Matrix

While stationarity alone still left an exponential burden of ∣X∣n−1|\mathcal{X}|^n - 1 parameters for a block of length nn, the Markov assumption causes a dramatic collapse:

  • From the Factorization: Every block of arbitrary length is constructed entirely from the starting distribution and pairwise single-step transitions.

  • Counting the Degrees of Freedom:

    1. Initial distribution: Choosing p(X1)p(X_1) requires ∣X∣−1|\mathcal{X}| - 1 parameters (since probabilities across the ∣X∣|\mathcal{X}| states sum to 1).
    2. Transition matrix PP: The matrix has ∣X∣|\mathcal{X}| rows. Because each row is an independent probability vector summing to 1, each row contributes ∣X∣−1|\mathcal{X}| - 1 degrees of freedom. Across all ∣X∣|\mathcal{X}| rows, this requires ∣X∣(∣X∣−1)|\mathcal{X}|(|\mathcal{X}| - 1) parameters.
  • The Total Cost: Describing the process across all possible sequence lengths n=1,2,3,…n = 1, 2, 3, \ldots collapses to: (∣X∣−1)+∣X∣(∣X∣−1)=∣X∣2−1 parameters(|\mathcal{X}| - 1) + |\mathcal{X}|(|\mathcal{X}| - 1) = |\mathcal{X}|^2 - 1 \text{ parameters} (Furthermore, if the chain is already running in its stationary distribution, the initial state distribution is fixed by PP, leaving strictly ∣X∣(∣X∣−1)|\mathcal{X}|(|\mathcal{X}| - 1) parameters).

The Engineering Consequence

For a 26-letter alphabet (∣X∣=26|\mathcal{X}| = 26) across a short message of n=20n = 20 keystrokes:

  • A general stationary model requires 2620−1≈2×102826^{20} - 1 \approx 2 \times 10^{28} numbers, vastly exceeding the capacity of any real-world storage system.
  • A first-order Markov model requires at most 26×25=65026 \times 25 = 650 numbers.

The Markov property therefore tames the statistical complexity problem we had, converting a parameter space that scaled exponentially with time horizon nn (O(∣X∣n)O(|\mathcal{X}|^n)) into a fixed footprint that is independent of nn (O(∣X∣2)O(|\mathcal{X}|^2)).


The Probability Transition Matrix

A time-invariant Markov chain on a finite alphabet X={1,2,…,m}\mathcal{X} = \{1, 2, \ldots, m\} is completely characterized by two objects:

  1. An initial distribution vector p(1)=[Pr⁡(X1=1),…,Pr⁡(X1=m)]\mathbf{p}^{(1)} = \big[\Pr(X_1 = 1), \dots, \Pr(X_1 = m)\big].
  2. An m×mm \times m transition probability matrix P=[Pij]P = [P_{ij}], defined entrywise as:

Pij=Pr⁡(Xn+1=j∣Xn=i)P_{ij} = \Pr(X_{n+1} = j \mid X_n = i)

Structural PropertyMathematical MeaningPhysical Interpretation
Matrix DimensionsP∈Rm×mP \in \mathbb{R}^{m \times m}Row ii = current state; Column jj = destination state.
Row Stochasticity∑j=1mPij=1,Pij≥0\sum_{j=1}^m P_{ij} = 1, \quad P_{ij} \ge 0Every row represents a valid probability mass function over the next possible keystroke given that the current keystroke was ii.
AsymmetryPij≠PjiP_{ij} \neq P_{ji} in generalTyping U after Q is near 1.01.0, but typing Q after U is extremely rare.
Column Sums∑i=1mPij≠1\sum_{i=1}^m P_{ij} \neq 1 in generalColumns do not generally sum to 11. When they do, the matrix is called doubly stochastic, which forces the stationary distribution to be uniform.

A Primer on Markov Distributions: The Marginal vs. The Transitions

To understand how a Markov chain behaves over time, we must separate two distinct objects:

  1. The transition rules (PP): The fixed rules of how you move from one keystroke to the next (e.g., “if you are at Q, you go to U with probability 0.990.99”).
  2. The marginal distribution at step nn (p(n)\mathbf{p}^{(n)}): The actual probability of being at each letter on the nn-th keystroke: p(n)=[Pr⁡(Xn=1), Pr⁡(Xn=2), …, Pr⁡(Xn=m)]\mathbf{p}^{(n)} = \big[\Pr(X_n = 1), \, \Pr(X_n = 2), \, \dots, \, \Pr(X_n = m)\big]

What It Means for “Marginals to Drift”

Even if the transition rules PP never change from minute to minute, your probability of being in state ii on keystroke nn typically changes as the chain runs.

By the law of total probability, the distribution at step n+1n+1 is obtained by multiplying the distribution at step nn by the transition matrix: p(n+1)=p(n)P\mathbf{p}^{(n+1)} = \mathbf{p}^{(n)} P

  • An example:
    Suppose our alphabet is just two states: {Awake,Asleep}\{ \text{Awake}, \text{Asleep} \}.
    The operator transitions between them with matrix PP:

    • If Awake: 80%80\% chance to stay Awake, 20%20\% chance to fall Asleep.
    • If Asleep: 50%50\% chance to wake up, 50%50\% chance to stay Asleep.

    Now, look at what happens depending on how the day begins:

    • At step 1 (n=1n=1): Suppose the operator starts 100%100\% Awake: p(1)=[1.0,  0.0]\mathbf{p}^{(1)} = [1.0, \; 0.0].
    • At step 2 (n=2n=2): p(2)=[1.0,  0.0]P=[0.80,  0.20]\mathbf{p}^{(2)} = [1.0, \; 0.0] P = [0.80, \; 0.20].
    • At step 3 (n=3n=3): p(3)=[0.80,  0.20]P=[0.74,  0.26]\mathbf{p}^{(3)} = [0.80, \; 0.20] P = [0.74, \; 0.26].
    • At step 4 (n=4n=4): p(4)=[0.74,  0.26]P=[0.722,  0.278]\mathbf{p}^{(4)} = [0.74, \; 0.26] P = [0.722, \; 0.278].

Notice that Pr⁡(X1=Asleep)=0\Pr(X_1 = \text{Asleep}) = 0, but Pr⁡(X2=Asleep)=0.20\Pr(X_2 = \text{Asleep}) = 0.20, and Pr⁡(X3=Asleep)=0.26\Pr(X_3 = \text{Asleep}) = 0.26.
Because Pr⁡(X1)≠Pr⁡(X2)≠Pr⁡(X3)\Pr(X_1) \ne \Pr(X_2) \ne \Pr(X_3), the single-symbol probabilities drift over time. Thus, even though the transition rules PP are completely constant, the process is not stationary yet during this warm-up phase.

The Equilibrium / Stationary Distribution (μ\boldsymbol{\mu})

If you let the system run for many steps (n→∞n \to \infty), the distribution eventually settles into a steady-state equilibrium where it stops changing. We call this fixed probability vector μ\boldsymbol{\mu} (mu):

μ=[μ1,μ2,…,μm]\boldsymbol{\mu} = [\mu_1, \mu_2, \dots, \mu_m]

It satisfies the balance equation: μP=μ\boldsymbol{\mu} P = \boldsymbol{\mu}

In our Awake/Asleep example, solving μP=μ\boldsymbol{\mu} P = \boldsymbol{\mu} yields μ≈[0.714,  0.286]\boldsymbol{\mu} \approx [0.714, \; 0.286].
Once the operator hits this exact distribution: p(n)=[0.714,  0.286]  ⟹  p(n+1)=[0.714,  0.286]P=[0.714,  0.286]\mathbf{p}^{(n)} = [0.714, \; 0.286] \implies \mathbf{p}^{(n+1)} = [0.714, \; 0.286] P = [0.714, \; 0.286]

The probabilities of being Awake or Asleep become completely identical for every subsequent step on the tape (n,n+1,n+2,…n, n+1, n+2, \dots).

Why This Eliminates the Initial State Parameters

Now the parameter count makes intuitive sense:

  • If the chain starts from an arbitrary initial state: An engineer must record two independent things to specify the system:
    1. The arbitrary starting distribution p(1)\mathbf{p}^{(1)} (∣X∣−1\vert{}\mathcal{X}\vert{} - 1 parameters).
    2. The transition matrix PP (∣X∣(∣X∣−1)\vert{}\mathcal{X}\vert{}(\vert{}\mathcal{X}\vert{} - 1) parameters).
  • If the process is stationary: The chain must already be running in its stationary distribution from step 1 (p(1)=μ\mathbf{p}^{(1)} = \boldsymbol{\mu}). But μ\boldsymbol{\mu} is not an independent choice, it is mathematically forced by the eigenvector equation μP=μ\boldsymbol{\mu} P = \boldsymbol{\mu}. Because μ\boldsymbol{\mu} is completely determined by PP, you do not need to measure or store a separate initial state vector. Specifying PP automatically specifies the entire process, leaving strictly ∣X∣(∣X∣−1)\vert{}\mathcal{X}\vert{}(\vert{}\mathcal{X}\vert{} - 1) parameters.

NoteThe Intuitive Meaning of μ\boldsymbol{\mu}: Global Frequencies vs. Local Grammar

Two questions naturally arise once the state distribution settles to μ\boldsymbol{\mu}:

  1. What does μ\boldsymbol{\mu} physically represent for a message stream?
  2. Does settling to a fixed distribution mean the symbols become independent (i.i.d.)?

The Two Faces of μ\boldsymbol{\mu} (Snapshot vs. Lifetime Average)

In an ergodic process, the vector μ\boldsymbol{\mu} represents two mathematically equivalent properties:

  • The Snapshot Probability (Ensemble View):
    Because p(n)=p(1)Pn−1→μ\mathbf{p}^{(n)} = \mathbf{p}^{(1)} P^{n-1} \to \boldsymbol{\mu}, μi\mu_i is the unconditional probability of landing on symbol ii at keystroke nn once the initial starting bias has washed out: Pr⁡(Xn=i)≈μi(for large n)\Pr(X_n = i) \approx \mu_i \quad (\text{for large } n)

  • The Lifetime Frequency (Trajectory View):
    By the Ergodic Theorem, the empirical proportion of symbol ii across a single long tape of NN characters converges almost surely to that exact same number: lim⁡N→∞1N∑k=1N1{Xk=i}=μi\lim_{N \to \infty} \frac{1}{N} \sum_{k=1}^N \mathbf{1}_{\{X_k = i\}} = \mu_i

For English, μ\boldsymbol{\mu} gives the familiar global letter distribution (μE≈12.7%\mu_E \approx 12.7\%, μT≈9.1%\mu_T \approx 9.1\%, μZ≈0.07%\mu_Z \approx 0.07\%). This equivalence is not an artifact of a 1st-order Markov model, it holds for any stationary ergodic process regardless of memory depth.


2. Settling to μ\boldsymbol{\mu} Does NOT Make the Source i.i.d

Having constant marginals (Pr⁡(X500=E)=μE\Pr(X_{500} = E) = \mu_E and Pr⁡(X501=E)=μE\Pr(X_{501} = E) = \mu_E) does not mean the keystrokes have become independent draws:

  • Unconditioned View (Blinders on): If you inspect keystroke 501501 in isolation without looking at the preceding character, the probability of seeing U is simply its baseline language frequency: Pr⁡(X501=‘U’)=μU≈2.8%\Pr(X_{501} = \text{`U'}) = \mu_U \approx 2.8\%

  • Conditional View (Reading the tape): If you uncover the prior keystroke and see X500=‘Q’X_{500} = \text{`Q'}, the transition rule completely overrides the baseline: > Pr⁡(X501=‘U’∣X500=‘Q’)=PQ,U≈99%≠μU\Pr(X_{501} = \text{`U'} \mid X_{500} = \text{`Q'}) = P_{Q, U} \approx 99\% \neq \mu_U

The Takeaway: μ\boldsymbol{\mu} describes the static composition of the overall message stream, while PP governs the local grammatical coupling between consecutive characters. Reaching equilibrium simply means the source has achieved steady-state traffic, the conditional dependencies remain as binding at keystroke 10,00010,000 as they were at keystroke 22.


Structural Conditions: Guaranteeing Long-Term Convergence

In our earlier Awake/Asleep example, the distribution relaxed smoothly toward μ≈[0.714,  0.286]\boldsymbol{\mu} \approx [0.714, \; 0.286]. But does every Markov chain settle into a single, predictable equilibrium?

Not necessarily. Two structural pathologies can prevent a system from forgetting where it started:

  1. Disconnected islands (Reducibility): The state space splinters into separate traps.
  2. Clockwork loops (Periodicity): The system oscillates deterministically forever.

To guarantee that a Markov chain converges to a single stationary equilibrium regardless of where it starts, we require two structural conditions:

DefinitionIrreducibility and Aperiodicity

  • Irreducible: Every state can reach every other state in a finite number of steps with positive probability. Formally, for all states i,j∈Xi, j \in \mathcal{X}, there exists some integer k≥1k \ge 1 such that: (Pk)ij>0(P^k)_{ij} > 0
  • Aperiodic: The greatest common divisor (gcd⁡\gcd) of the return times to any state is 1: d(i)=gcd⁡{k≥1:(Pk)ii>0}=1d(i) = \gcd \{ k \ge 1 : (P^k)_{ii} > 0 \} = 1 (If a state can only be revisited at multiples of 2, 3, or more steps, it is periodic with period d>1d > 1).

IntuitionCounterexamples: What Breaks When These Fail?

1. What Happens If a Chain Is Reducible? (Multiple Conflicting Equilibria)

Imagine a 3-letter typewriter with states {A,B,C}\{A, B, C\} and transition rules:

  • AA always loops to AA (PAA=1P_{AA} = 1).
  • BB always loops to BB (PBB=1P_{BB} = 1).
  • CC flips a coin: 50%50\% to AA, 50%50\% to BB.
(A) ⟲ 1.0 (B) ⟲ 1.0
▲ ▲
\ 0.5 / 0.5
\ /
(C)
  • Why it is reducible: You can go from C→AC \to A, but once in AA, you can never reach BB or CC. The graph has absorbing traps.
  • Why convergence fails: If the operator starts in AA, they stay in AA forever (p(∞)=[1,0,0]\mathbf{p}^{(\infty)} = [1, 0, 0]). If they start in BB, they stay in BB forever (p(∞)=[0,1,0]\mathbf{p}^{(\infty)} = [0, 1, 0]). There is no single unique stationary distribution, the long-term behavior depends permanently on which key was pressed on step 1.
  • What irreducibility guarantees: Every letter can eventually reach every other letter, ensuring there are no isolated dead ends.

What Happens If a Chain Is Periodic? (Permanent Oscillation)

Imagine an alternating 2-state telegraph with states {0,1}\{0, 1\} that switches on every tick with 100%100\% certainty:

  • P01=1.0P_{01} = 1.0 (from 00, you must go to 11)
  • P10=1.0P_{10} = 1.0 (from 11, you must go to 00)
1.0
(0) ------> (1)
▲ |
|___________|
1.0
  • Why it is irreducible: State 00 reaches 11, and 11 reaches 00.
  • Why it is periodic: You can only return to 00 in 2,4,6,8,…2, 4, 6, 8, \dots steps. The return times are all multiples of 2 (gcd⁡(2,4,6,… )=2\gcd(2, 4, 6, \dots) = 2).
  • Why convergence fails: If the machine starts at state 00 (p(1)=[1,0]\mathbf{p}^{(1)} = [1, 0]): p(1)=[1,0],p(2)=[0,1],p(3)=[1,0],p(4)=[0,1],…\mathbf{p}^{(1)} = [1, 0], \quad \mathbf{p}^{(2)} = [0, 1], \quad \mathbf{p}^{(3)} = [1, 0], \quad \mathbf{p}^{(4)} = [0, 1], \quad \dots The marginal distribution never settles down, it bounces between [1,0][1, 0] and [0,1][0, 1] forever! The limit lim⁡n→∞p(1)Pn\lim_{n \to \infty} \mathbf{p}^{(1)} P^n does not exist.
  • What aperiodicity guarantees: The transition graph has irregular path lengths (or self-loops like Pii>0P_{ii} > 0), adding enough timing “jitter” to wash out synchronized oscillations so the probabilities diffuse smoothly into a fixed value.

How Convergence to μ\boldsymbol{\mu} Yields a Stationary Process

A key question remains: if our machine starts with an arbitrary distribution p(1)≠μ\mathbf{p}^{(1)} \neq \boldsymbol{\mu}, how does it become stationary?

TheoremThe Fundamental Convergence Theorem (Ergodicity)

If a finite Markov chain is irreducible and aperiodic, it possesses a unique stationary distribution μ=μP\boldsymbol{\mu} = \boldsymbol{\mu} P. Furthermore, for any starting vector p(1)\mathbf{p}^{(1)}:

lim⁡n→∞p(1)Pn=μ\lim_{n \to \infty} \mathbf{p}^{(1)} P^n = \boldsymbol{\mu}

Here is what this means for stationarity in practice:

  1. The Warm-up Phase (Transient Non-Stationarity):
    If the operator turns on the machine in state 00 (p(1)=[1,0]\mathbf{p}^{(1)} = [1, 0]), the probabilities of early symbols drift as the system runs: p(1)→p(2)→p(3)→⋯→μ\mathbf{p}^{(1)} \to \mathbf{p}^{(2)} \to \mathbf{p}^{(3)} \to \dots \to \boldsymbol{\mu} Because Pr⁡(X1)≠Pr⁡(X2)≠Pr⁡(X3)\Pr(X_1) \neq \Pr(X_2) \neq \Pr(X_3), the process is initially non-stationary.
  2. The Stationary Regime (After Warm-up):
    Because convergence is exponential, after a short burn-in period of KK keystrokes, the state distribution reaches p(K)≈μ\mathbf{p}^{(K)} \approx \boldsymbol{\mu}. From that moment onward: Pr⁡(XK+1)=μP=μ,Pr⁡(XK+2)=μP=μ,…\Pr(X_{K+1}) = \boldsymbol{\mu} P = \boldsymbol{\mu}, \quad \Pr(X_{K+2}) = \boldsymbol{\mu} P = \boldsymbol{\mu}, \quad \dots Not only are all subsequent single-symbol probabilities identical (Pr⁡(Xt)=μ\Pr(X_t) = \boldsymbol{\mu}), but all block probabilities become completely invariant to time shifts: Pr⁡(Xt=a,Xt+1=b)=μaPab=Pr⁡(Xt+l=a,Xt+l+1=b)\Pr(X_t = a, X_{t+1} = b) = \mu_a P_{ab} = \Pr(X_{t+l} = a, X_{t+l+1} = b)
  3. The Engineering Shortcut:
    If the telecom system initializes the transmitter by drawing the very first symbol X1X_1 directly from μ\boldsymbol{\mu} (p(1)=μ\mathbf{p}^{(1)} = \boldsymbol{\mu}), the warm-up phase is eliminated entirely: the chain is strictly stationary from keystroke 1.

Analytical Tool: Solving for the Stationary Distribution μ\boldsymbol{\mu}

To find the equilibrium distribution μ=[μ1,μ2,…,μm]\boldsymbol{\mu} = [\mu_1, \mu_2, \dots, \mu_m], we must solve the vector equation:

μP=μ  ⟺  μ(P−I)=0\boldsymbol{\mu} P = \boldsymbol{\mu} \quad \iff \quad \boldsymbol{\mu}(P - I) = \mathbf{0}

subject to the normalization constraint ∑i=1mμi=1\sum_{i=1}^m \mu_i = 1.

In standard linear algebra, you write this out as a system of mm simultaneous equations:

{μ1P11+μ2P21+⋯+μmPm1=μ1,μ1P12+μ2P22+⋯+μmPm2=μ2,⋮μ1+μ2+⋯+μm=1\begin{cases}\mu_1 P_{11} + \mu_2 P_{21} + \dots + \mu_m P_{m1} = \mu_1,\\ \mu_1 P_{12} + \mu_2 P_{22} + \dots + \mu_m P_{m2} = \mu_2,\\ \quad \vdots\\ \mu_1 + \mu_2 + \dots + \mu_m = 1\end{cases}

For large alphabets, performing Gaussian elimination on this full system is tedious. Fortunately, we can bypass matrix row-reduction entirely using a physical principle called conservation of probability flow.


The Intuition: Probability as Fluid Flow

Think of probability as physical water circulating through a network of pipes:

  • Each state is a reservoir containing a fraction of water μi\mu_i.
  • A transition PijP_{ij} is a one-way pipe from reservoir ii to reservoir jj that drains a fraction PijP_{ij} of reservoir ii‘s contents at each tick of the clock.
  • The total volume of water flowing from reservoir ii into reservoir jj in one step is called the probability flow: Flow(i→j)=μiPij\text{Flow}(i \to j) = \mu_i P_{ij}

If the system has reached a stable equilibrium (the water levels μi\mu_i never change), water cannot magically pool up or vanish.

Now imagine drawing an imaginary dividing line, called a cut, that splits all the reservoirs into two separate camps: group SS and group ScS^c. For the water levels on both sides to stay constant, the total water crossing the line from left to right must exactly equal the total water crossing from right to left:

∑i∈S∑j∈ScμiPij⏟Total Flow Leaving Group S=∑j∈Sc∑i∈SμjPji⏟Total Flow Entering Group S\underbrace{\sum_{i \in S} \sum_{j \in S^c} \mu_i P_{ij}}_{\text{Total Flow Leaving Group } S} = \underbrace{\sum_{j \in S^c} \sum_{i \in S} \mu_j P_{ji}}_{\text{Total Flow Entering Group } S}

This is the cut-balance equation. Instead of solving mm simultaneous equations at once, we can often draw a simple boundary line around a single state and balance the flow in versus flow out in one line of algebra.


Example: The Two-State Markov Chain

Consider a binary telegraph operator whose key alternates between State 1 and State 2 with transition probabilities α\alpha and β\beta:

stateDiagram-v2
  direction LR
  S1: State 1
  S2: State 2
  S1 --> S2: α
  S2 --> S1: β
  S1 --> S1: 1 - α
  S2 --> S2: 1 - β

The transition matrix is:

P=[1−ααβ1−β]P = \begin{bmatrix} 1 - \alpha & \alpha \\ \beta & 1 - \beta \end{bmatrix}

(Assuming 0<α,β<10 < \alpha, \beta < 1, both states communicate and have self-loops Pii>0P_{ii} > 0, guaranteeing the chain is irreducible and aperiodic).

Calculating μ\boldsymbol{\mu} Using Flow Balance

Instead of setting up matrix algebra, draw an imaginary boundary between State 1 and State 2:

  • State 1 holds probability mass μ1\mu_1, and each step sends fraction α\alpha over to State 2:

    Flow(1→2)=μ1α\text{Flow}(1 \to 2) = \mu_1 \alpha

  • State 2 holds probability mass μ2\mu_2, and each step sends fraction β\beta back to State 1:

    Flow(2→1)=μ2β\text{Flow}(2 \to 1) = \mu_2 \beta

For equilibrium to hold, the rate of people switching from 1→21 \to 2 must equal the rate of people switching from 2→12 \to 1:

μ1α=μ2β\mu_1 \alpha = \mu_2 \beta

Since the probabilities must sum to 1 (μ1+μ2=1  ⟹  μ2=1−μ1\mu_1 + \mu_2 = 1 \implies \mu_2 = 1 - \mu_1):

μ1α=(1−μ1)β  ⟹  μ1(α+β)=β\mu_1 \alpha = (1 - \mu_1) \beta \implies \mu_1(\alpha + \beta) = \beta

μ1=βα+β,μ2=αα+β\mu_1 = \frac{\beta}{\alpha + \beta}, \qquad \mu_2 = \frac{\alpha}{\alpha + \beta}

If we initialize the machine with Pr⁡(X1=1)=μ1\Pr(X_1 = 1) = \mu_1, the process is strictly stationary from step 1 onward.

The Marginal Uncertainty H(Xn)H(X_n)

At any isolated single step nn, the single-symbol uncertainty is simply the binary entropy of its marginal distribution:

H(Xn)=Hb(αα+β)=−βα+βlog⁡2(βα+β)−αα+βlog⁡2(αα+β)H(X_n) = H_b\left(\frac{\alpha}{\alpha + \beta}\right) = -\frac{\beta}{\alpha + \beta}\log_2\left(\frac{\beta}{\alpha + \beta}\right) - \frac{\alpha}{\alpha + \beta}\log_2\left(\frac{\alpha}{\alpha + \beta}\right)

WarningH(Xn)H(X_n) Is NOT the Entropy Rate!

A frequent mistake is reasoning: “Since the process is stationary, every symbol has uncertainty H(Xn)H(X_n), so a block of nn symbols must carry joint entropy nH(Xn)n H(X_n).”

That logic applies only to independent (i.i.d.) sources.

For a dependent source:

  • H(X1)H(X_1) measures your uncertainty before you look at the tape.
  • For the second keystroke X2X_2, knowing X1X_1 gives you predictive clues via the transition matrix PP.
  • By the conditioning theorem (H(X2∣X1)≤H(X2)H(X_2 \mid X_1) \le H(X_2)), every subsequent symbol delivers strictly less surprise than an isolated symbol.

The actual per-symbol information content of the wire is not the single-letter entropy H(Xn)H(X_n), but the conditional branch uncertainty H(Xn∣Xn−1)H(X_n \mid X_{n-1}). Computing that true asymptotic rate is the subject of the next section.


Entropy Rate: Quantifying the Growth of Uncertainty

The Engineering Problem:
When an operator punches out nn correlated keystrokes on a telegraph line, how does the total uncertainty H(X1,X2,…,Xn)H(X_1, X_2, \dots, X_n) grow as the message lengthens?

An engineer pricing bandwidth or budgeting memory buffers faces two natural perspectives:

  1. The Amortized (Accounting) View: “Send a block of length nn, measure its total joint entropy, and divide by nn.”
  2. The Marginal (Streaming) View: “Condition on the entire accumulated history of the tape, and measure the uncertainty of just the next incoming symbol.”

These two perspectives lead to two distinct mathematical formulations:

DefinitionPer-Symbol Entropy Rate H(X)H(\mathcal{X})

The per-symbol entropy rate of a stochastic process {Xi}\{X_i\} is the asymptotic average joint entropy per character:

H(X)=lim⁡n→∞1nH(X1,X2,…,Xn)H(\mathcal{X}) = \lim_{n \to \infty} \frac{1}{n} H(X_1, X_2, \ldots, X_n)

(provided the limit exists).

DefinitionConditional Entropy Rate H′(X)H'(\mathcal{X})

The conditional entropy rate of a stochastic process {Xi}\{X_i\} is the asymptotic uncertainty of the next keystroke given the entire infinite past:

H′(X)=lim⁡n→∞H(Xn∣Xn−1,Xn−2,…,X1)H'(\mathcal{X}) = \lim_{n \to \infty} H(X_n \mid X_{n-1}, X_{n-2}, \ldots, X_1)

(provided the limit exists).

PerspectiveH(X)H(\mathcal{X})H′(X)H'(\mathcal{X})
What It MeasuresThe average uncertainty per symbol across the entire block of length nn.The residual surprise of the last symbol conditioned on the full historical context.
Physical IntuitionAn amortized rate: “What did this completed batch cost per character?”A marginal rate: “How many bits of storage buffer must I allocate for the next incoming keystroke?”
System ApplicationBatch block compression algorithms and telecom billing schemas.Real-time adaptive predictive encoders (e.g., streaming arithmetic coders).

These definitions describe fundamentally different operations: an arithmetic running average vs. an instantaneous incremental derivative. A central pillar of information theory is that for stationary processes, these two rates are mathematically identical.


Worked Examples of Entropy Rates

To see how the two entropy rates, the amortized batch rate H(X)H(\mathcal{X}) and the streaming marginal rate H′(X)H'(\mathcal{X}) actually behave, we walk through three cases designed to answer three distinct architectural questions:

  1. The Upper Bound: What is the maximum possible entropy rate an alphabet of size mm can physically produce?

Example1. The Maximum-Uncertainty Baseline (Pure Uniform Noise)

Question answered: What is the maximum information density of an alphabet of size mm?

An operator types on a keyboard of mm symbols where every keypress is drawn independently and uniformly at random (p=1/mp = 1/m).

  • The Batch View H(X)H(\mathcal{X}):
    There are mnm^n equally likely sequences of length nn, each occurring with probability m−nm^{-n}: H(X1,…,Xn)=∑xn1mnlog⁡2(mn)=nlog⁡2mH(X_1, \ldots, X_n) = \sum_{x^n} \frac{1}{m^n} \log_2(m^n) = n \log_2 m H(X)=lim⁡n→∞nlog⁡2mn=log⁡2mbits/symbolH(\mathcal{X}) = \lim_{n \to \infty} \frac{n \log_2 m}{n} = \log_2 m \quad \text{bits/symbol}

  • The Streaming View H′(X)H'(\mathcal{X}):
    Because keystrokes are independent, past history gives zero clues about the future (XnX_n is independent of X1,…,Xn−1X_1, \dots, X_{n-1}): H(Xn∣Xn−1,…,X1)=H(Xn)=log⁡2mH(X_n \mid X_{n-1}, \ldots, X_1) = H(X_n) = \log_2 m H′(X)=lim⁡n→∞log⁡2m=log⁡2mbits/symbolH'(\mathcal{X}) = \lim_{n \to \infty} \log_2 m = \log_2 m \quad \text{bits/symbol}

Takeaway: Both definitions match perfectly at log⁡2m\log_2 m. This is the absolute physical ceiling for any discrete source on alphabet X\mathcal{X}.

  1. The Backward-Compatibility Check: Does this new process framework match our previous i.i.d. formulas when there is no memory?

Example2. The Memoryless Biased Source (Sanity Check with i.i.d.)

Question answered: Does the process-level machinery give back our AEP results when symbols are independent but non-uniform?

Suppose our operator types characters from a fixed, biased distribution p(x)p(x) (for example, typing 1 with p=0.9p = 0.9 and 0 with p=0.1p = 0.1), but each stroke is drawn independently with no grammar.

  • The Batch View H(X)H(\mathcal{X}):
    Independence factors joint entropy into an unweighted sum: H(X1,…,Xn)=∑i=1nH(Xi)=nH(X1)H(X_1, \ldots, X_n) = \sum_{i=1}^n H(X_i) = n H(X_1) H(X)=lim⁡n→∞nH(X1)n=H(X1)H(\mathcal{X}) = \lim_{n \to \infty} \frac{n H(X_1)}{n} = H(X_1)

  • The Streaming View H′(X)H'(\mathcal{X}):
    Conditioning on past keystrokes drops out because older keystrokes provide zero information: H(Xn∣Xn−1,…,X1)=H(Xn)=H(X1)H(X_n \mid X_{n-1}, \dots, X_1) = H(X_n) = H(X_1) H′(X)=lim⁡n→∞H(X1)=H(X1)H'(\mathcal{X}) = \lim_{n \to \infty} H(X_1) = H(X_1)

Takeaway: H(X)=H′(X)=H(X1)H(\mathcal{X}) = H'(\mathcal{X}) = H(X_1). The general process rate naturally generalizes our earlier single-symbol entropy.

  1. The Counterexample: Can an independent system break down and fail to have an entropy rate if it lacks stationarity?
Example3. The Tug-of-War Source: When Independence Is Not Enough

Question answered: Is independence sufficient to guarantee an entropy rate exists?

Many assume that if keystrokes are independent, an entropy rate must automatically exist. This is false. If the operator’s typing behavior mutates over time (non-stationarity), the entropy rate can completely fail to exist.

Intuition for the Construction: The Expanding Epochs

Imagine a telegraph machine whose internal coin toss drifts over time. Keystrokes are completely independent, but their uncertainty switches between two extremes:

  • Epoch A (Pure Chaos, H=1H = 1): The machine flips a fair coin (pi=0.5p_i = 0.5). Every symbol yields 1.0 bit1.0\text{ bit} of surprise.
  • Epoch B (Pure Silence, H=0H = 0): The machine gets stuck on 1 with 100%100\% certainty (pi=1.0p_i = 1.0). Every symbol yields 0.0 bits0.0\text{ bits} of surprise.

Now, how do we make the running average 1n∑i=1nH(Xi)\frac{1}{n} \sum_{i=1}^n H(X_i) fail to settle on a limit?

  1. Run in Epoch A long enough that the average entropy creeps up to ≈0.99\approx \mathbf{0.99}.
  2. Switch to Epoch B (H=0H = 0). To drag a running average from 0.990.99 down to 0.01\mathbf{0.01}, you cannot just run 10 zeros, you must emit a streak of zeros that is 100 times longer than the entire past history of the tape combined.
  3. Once the running average plunges down to 0.010.01, switch back to Epoch A (H=1H = 1). To pull the average back up to 0.990.99, you must emit a streak of fair flips that is 100 times longer than the total tape generated in steps 1 and 2 combined.

Repeating this process creates a tug-of-war where the running average swings like a pendulum between 0.010.01 and 0.990.99 forever without ever settling:

Tape index n: 1 ------------> 100 --------------> 10,000 -----------> 1,000,000 -------> ...
Entropy H(X): [ 1 1 1 1 1 1 ] [ 0 0 0 0 0 0 0 0 ] [ 1 1 1 1 1 1 1 1 ] [ 0 0 0 0 0 0 0 0 ]
Running Avg: Rises to ~1.0 Plunges to ~0.0 Rises to ~1.0 Plunges to ~0.0 (Oscillates forever)

Mathematical Formulation

The mathematical tool to produce epochs that grow faster than the entire accumulated past is the doubly-exponential index function:

pi={0.5  ⟹  H(Xi)=1if 2k<log⁡2log⁡2i≤2k+11.0  ⟹  H(Xi)=0if 2k+1<log⁡2log⁡2i≤2k+2(k=0,1,2,… )p_i = \begin{cases} 0.5 \implies H(X_i) = 1 & \text{if } 2k < \log_2 \log_2 i \le 2k+1 \\ 1.0 \implies H(X_i) = 0 & \text{if } 2k+1 < \log_2 \log_2 i \le 2k+2 \end{cases} \quad (k = 0, 1, 2, \dots)
  • The Batch Rate H(X)H(\mathcal{X}): The running average 1n∑i=1nH(Xi)\frac{1}{n}\sum_{i=1}^n H(X_i) oscillates perpetually between 00 and 11. The limit lim⁡n→∞1nH(Xn)\lim_{n \to \infty} \frac{1}{n} H(X^n) does not exist.
  • The Marginal Rate H′(X)H'(\mathcal{X}): Because the symbols are independent, H(Xn∣Xn−1)=H(Xn)H(X_n \mid X^{n-1}) = H(X_n). As nn steps across epoch boundaries, the marginal surprise jumps abruptly between 11 and 00. The limit lim⁡n→∞H(Xn)\lim_{n \to \infty} H(X_n) does not exist.

The Takeaway: Independence buys you zero guarantees if the source changes over time. Stationarity is the non-negotiable requirement that ensures the entropy rate exists.


The Fundamental Theorem: Equality of the Rates for Stationary Sources

TheoremEquality of the Entropy Rates

For any stationary stochastic process {Xi}\{X_i\}, both limits exist and are strictly equal:

H(X)=H′(X)H(\mathcal{X}) = H'(\mathcal{X})

That is:

lim⁡n→∞1nH(X1,…,Xn)=lim⁡n→∞H(Xn∣Xn−1,…,X1)\lim_{n \to \infty} \frac{1}{n} H(X_1, \ldots, X_n) = \lim_{n \to \infty} H(X_n \mid X_{n-1}, \ldots, X_1)

To prove this theorem rigorously, we establish two preliminary steps:

  1. The conditional surprise sequence is monotonically decreasing and bounded below (so it must converge).
  2. The running average of any convergent sequence converges to the same limit (the Cesàro mean theorem).

LemmaMonotonicity: Additional History Never Increases Surprise

For any stationary stochastic process, the sequence of conditional entropies H(Xn∣Xn−1,…,X1)H(X_n \mid X_{n-1}, \ldots, X_1) is non-increasing in nn:

H(Xn+1∣Xn,…,X1)≤H(Xn∣Xn−1,…,X1)H(X_{n+1} \mid X_n, \ldots, X_1) \le H(X_n \mid X_{n-1}, \ldots, X_1)

and converges to a non-negative limit H′(X)H'(\mathcal{X}).

ProofStep-by-Step Proof of Monotonicity

Step 1: Apply “Conditioning Reduces Entropy”.
We know from Jensen’s inequality that conditioning on extra information can only reduce (or preserve) entropy. Therefore, dropping the oldest historical observation X1X_1 from the conditioning set can only increase uncertainty:

H(Xn+1∣X1,X2,…,Xn)≤H(Xn+1∣X2,X3,…,Xn)H(X_{n+1} \mid X_1, X_2, \ldots, X_n) \le H(X_{n+1} \mid X_2, X_3, \ldots, X_n)

Step 2: Apply Stationarity (Shift Invariance).
The right-hand side conditions the variable at index n+1n+1 on the n−1n-1 variables directly preceding it (X2X_2 through XnX_n). By stationarity, the joint distribution of any block is invariant under an arbitrary time shift ll. Shifting all indices backward by l=−1l = -1:

H(Xn+1∣X2,…,Xn)=H(Xn∣X1,…,Xn−1)H(X_{n+1} \mid X_2, \ldots, X_n) = H(X_n \mid X_1, \ldots, X_{n-1})

Step 3: Establish Convergence.
Combining Steps 1 and 2 yields:

H(Xn+1∣Xn,…,X1)≤H(Xn∣Xn−1,…,X1)H(X_{n+1} \mid X_n, \ldots, X_1) \le H(X_n \mid X_{n-1}, \ldots, X_1)

The sequence an=H(Xn∣Xn−1,…,X1)a_n = H(X_n \mid X_{n-1}, \dots, X_1) is non-increasing. Because discrete entropy is non-negative (an≥0a_n \ge 0), the sequence is bounded below. By the monotone convergence theorem of real analysis, the limit H′(X)=lim⁡n→∞anH'(\mathcal{X}) = \lim_{n \to \infty} a_n exists.

∎

IntuitionThe Value of Past History

The physical intuition is immediate: context cannot hurt prediction. The more preceding keystrokes the decoder inspects on the tape, the better it can anticipate the next symbol. At worst, older history is irrelevant; at best, it sharpens prediction.


LemmaCesàro Mean Convergence

If a sequence of real numbers {ai}\{a_i\} converges to a limit aa (lim⁡i→∞ai=a\lim_{i \to \infty} a_i = a), then its sequence of arithmetic means (running averages) bn=1n∑i=1naib_n = \frac{1}{n} \sum_{i=1}^n a_i also converges to aa:

lim⁡n→∞1n∑i=1nai=a\lim_{n \to \infty} \frac{1}{n} \sum_{i=1}^n a_i = a

ProofStandard ϵ\epsilon-NN Epsilon-Delta Split

Let ϵ>0\epsilon > 0. Because ai→aa_i \to a, there exists an integer NN such that ∣ai−a∣<ϵ|a_i - a| < \epsilon for all i>Ni > N.

Splitting the difference of the running average:

∣bn−a∣=∣1n∑i=1n(ai−a)∣≤1n∑i=1N∣ai−a∣+1n∑i=N+1n∣ai−a∣|b_n - a| = \left| \frac{1}{n} \sum_{i=1}^n (a_i - a) \right| \le \frac{1}{n} \sum_{i=1}^N |a_i - a| + \frac{1}{n} \sum_{i=N+1}^n |a_i - a|

The first sum ∑i=1N∣ai−a∣=C\sum_{i=1}^N |a_i - a| = C is a fixed finite constant that does not grow with nn. For the second sum, each of the n−Nn - N terms is strictly smaller than ϵ\epsilon:

∣bn−a∣≤Cn+n−Nnϵ≤Cn+ϵ|b_n - a| \le \frac{C}{n} + \frac{n - N}{n} \epsilon \le \frac{C}{n} + \epsilon

Taking n→∞n \to \infty, the transient fraction Cn→0\frac{C}{n} \to 0, leaving ∣bn−a∣≤ϵ|b_n - a| \le \epsilon. Since ϵ\epsilon is arbitrary, bn→ab_n \to a.

∎


ProofBringing It Together: Proving H(X)=H′(X)H(\mathcal{X}) = H'(\mathcal{X})

Step 1: Expand joint entropy using the Chain Rule.
By the chain rule for entropy, the joint uncertainty of an nn-character block decomposes into the sum of successive conditional increments:

H(X1,X2,…,Xn)=∑i=1nH(Xi∣Xi−1,…,X1)H(X_1, X_2, \ldots, X_n) = \sum_{i=1}^n H(X_i \mid X_{i-1}, \ldots, X_1)

(with the base convention H(X1∣X0)=H(X1)H(X_1 \mid X_0) = H(X_1)).

Step 2: Divide by block length nn.

1nH(X1,X2,…,Xn)=1n∑i=1nH(Xi∣Xi−1,…,X1)\frac{1}{n} H(X_1, X_2, \ldots, X_n) = \frac{1}{n} \sum_{i=1}^n H(X_i \mid X_{i-1}, \ldots, X_1)

The amortized per-symbol entropy 1nH(Xn)\frac{1}{n}H(X^n) is the exact Cesàro mean of the sequence of marginal conditional surprises ai=H(Xi∣Xi−1,…,X1)a_i = H(X_i \mid X_{i-1}, \dots, X_1).

Step 3: Pass to the limit.
By the Monotonicity Lemma, the sequence aia_i converges to H′(X)H'(\mathcal{X}). By the Cesàro Mean Lemma, the average of these terms converges to that exact same limit:

H(X)=lim⁡n→∞1nH(X1,…,Xn)=lim⁡n→∞H(Xn∣Xn−1,…,X1)=H′(X)H(\mathcal{X}) = \lim_{n \to \infty} \frac{1}{n} H(X_1, \ldots, X_n) = \lim_{n \to \infty} H(X_n \mid X_{n-1}, \ldots, X_1) = H'(\mathcal{X})

∎

For a concrete picture, take the stationary two-state chain with α=0.1\alpha = 0.1, β=0.3\beta = 0.3 (so μ=[0.75,  0.25]\boldsymbol{\mu} = [0.75, \; 0.25], worked out below). The first symbol costs H(X1)=Hb(0.25)≈0.811H(X_1) = H_b(0.25) \approx 0.811 bits, and every later one costs H(Xn∣Xn−1)≈0.572H(X_n \mid X_{n-1}) \approx 0.572 bits. The running average starts at the first value and creeps down to the second like 0.239/n0.239/n:

Two rates for the stationary chain α = 0.1, β = 0.3: H(X₁), what an i.i.d. code would pay = 0.8113 + 0 * n; running average (1/n) H(Xⁿ) = 0.5721 + 0.2392 / n; conditional H(Xₙ | Xⁿ⁻¹) for n ≥ 2 = 0.5721 + 0 * n102030400.50.60.70.8block length nbits per symbol
  • H(X₁), what an i.i.d. code would pay
  • running average (1/n) H(Xⁿ)
  • conditional H(Xₙ | Xⁿ⁻¹) for n ≥ 2
Two rates for the stationary chain α = 0.1, β = 0.3

The Shannon-McMillan-Breiman Theorem (AEP for Dependent Sources)

In our previous discussion of the Asymptotic Equipartition Property, we required the source to be i.i.d. to invoke the Weak Law of Large Numbers. The Shannon-McMillan-Breiman theorem extends this result to processes with infinite temporal memory:

TheoremGeneralized Asymptotic Equipartition Property

If a discrete-time stochastic process {Xi}\{X_i\} is stationary and ergodic, then the empirical sample entropy converges almost surely (with probability 1) to the true entropy rate:

−1nlog⁡2p(X1,X2,…,Xn)→a.s.H(X)-\frac{1}{n} \log_2 p(X_1, X_2, \ldots, X_n) \xrightarrow{\text{a.s.}} H(\mathcal{X})

IntuitionWhat This Means for Practical Compression

This theorem establishes that all core machinery developed for i.i.d. sources applies to dependent, grammar-driven languages:

  1. Equipartition Holds: Out of ∣X∣n|\mathcal{X}|^n possible sequences of length nn, the overwhelming probability mass (>1−ϵ> 1 - \epsilon) concentrates onto a typical set of size roughly: ∣Aϵ(n)∣≐2nH(X)\big|A_\epsilon^{(n)}\big| \doteq 2^{n H(\mathcal{X})}
  2. Universal Uniform Probability: Every typical sequence within this set has approximately identical likelihood: p(x1,…,xn)≈2−nH(X)p(x_1, \dots, x_n) \approx 2^{-n H(\mathcal{X})}
  3. The Compression Floor: You can losslessly compress any stationary ergodic source down to an average rate of H(X)H(\mathcal{X}) bits per symbol, and not a single bit lower. Grammar, correlation, and predictability lower the entropy rate (H(X)≤H(X1)H(\mathcal{X}) \le H(X_1)), unlocking higher compression ratios without risking data loss.

Entropy Rate of a Markov Chain: The Limit Collapses

For an arbitrary stationary process, computing the entropy rate H′(X)=lim⁡n→∞H(Xn∣Xn−1,…,X1)H'(\mathcal{X}) = \lim_{n \to \infty} H(X_n \mid X_{n-1}, \ldots, X_1) is intractable because the conditioning reaches back through an ever-expanding history.

For a Markov chain, that infinite history collapses completely.

Why the Limit Vanishes into a Single Step

For a stationary, time-invariant Markov chain, the sequence of equalities unfolds cleanly:

H(X)  =(1)  lim⁡n→∞H(Xn∣Xn−1,Xn−2,…,X1)  =(2)  lim⁡n→∞H(Xn∣Xn−1)  =(3)  H(X2∣X1)H(\mathcal{X}) \;\overset{(1)}{=}\; \lim_{n \to \infty} H(X_n \mid X_{n-1}, X_{n-2}, \ldots, X_1) \;\overset{(2)}{=}\; \lim_{n \to \infty} H(X_n \mid X_{n-1}) \;\overset{(3)}{=}\; H(X_2 \mid X_1)

Each equals sign performs an exact structural role:

  1. Equality of the Rates: The foundational theorem established that the amortized rate H(X)H(\mathcal{X}) equals the streaming rate H′(X)H'(\mathcal{X}) for any stationary source.
  2. The Markov Memory Cutoff: The next state depends only on the current state. Conditioning on Xn−2,…,X1X_{n-2}, \dots, X_1 contributes nothing further: H(Xn∣Xn−1,…,X1)=H(Xn∣Xn−1)H(X_n \mid X_{n-1}, \dots, X_1) = H(X_n \mid X_{n-1})
  3. Time-Invariance and Stationarity: Because transition probabilities PijP_{ij} are constant across time and the chain operates in its stationary distribution μ\boldsymbol{\mu}, the conditional uncertainty H(Xn∣Xn−1)H(X_n \mid X_{n-1}) is identical for every adjacent pair on the tape: H(Xn∣Xn−1)=H(X2∣X1)for all n≥2H(X_n \mid X_{n-1}) = H(X_2 \mid X_1) \quad \text{for all } n \ge 2

The limit of a constant sequence is simply that constant. We do not need to calculate an infinite limit: the entropy rate of a stationary Markov chain is an elementary, single-step conditional entropy H(X2∣X1)H(X_2 \mid X_1).


The Closed-Form Formula

TheoremEntropy Rate of a Stationary Markov Chain

Let {Xi}\{X_i\} be a stationary Markov chain with transition probability matrix P=[Pij]P = [P_{ij}] and unique stationary distribution μ=[μ1,…,μm]\boldsymbol{\mu} = [\mu_1, \dots, \mu_m]. The entropy rate is given by:

H(X)=−∑i=1m∑j=1mμiPijlog⁡2Pij=∑i=1mμiH(Row i of P)H(\mathcal{X}) = -\sum_{i=1}^m \sum_{j=1}^m \mu_i P_{ij} \log_2 P_{ij} = \sum_{i=1}^m \mu_i H(\text{Row } i \text{ of } P)

ProofExpanding the Conditional Entropy

By definition of conditional entropy between two random variables:

H(X2∣X1)=∑i∈XPr⁡(X1=i)H(X2∣X1=i)H(X_2 \mid X_1) = \sum_{i \in \mathcal{X}} \Pr(X_1 = i) H(X_2 \mid X_1 = i)

  1. In stationarity, the state occupancy probability is Pr⁡(X1=i)=μi\Pr(X_1 = i) = \mu_i.
  2. The conditional distribution of the next symbol given X1=iX_1 = i is precisely row ii of the transition matrix: Pr⁡(X2=j∣X1=i)=Pij\Pr(X_2 = j \mid X_1 = i) = P_{ij}.
  3. The entropy of that specific outgoing row is: H(X2∣X1=i)=−∑j=1mPijlog⁡2Pij=H(Pi⋅)H(X_2 \mid X_1 = i) = -\sum_{j=1}^m P_{ij} \log_2 P_{ij} = H(P_{i\cdot})

Substituting these pieces into the expectation yields:

H(X)=∑i=1mμi(−∑j=1mPijlog⁡2Pij)=−∑i=1m∑j=1mμiPijlog⁡2PijH(\mathcal{X}) = \sum_{i=1}^m \mu_i \left( -\sum_{j=1}^m P_{ij} \log_2 P_{ij} \right) = -\sum_{i=1}^m \sum_{j=1}^m \mu_i P_{ij} \log_2 P_{ij}

∎

IntuitionReading the Formula as an Operating Machine

Look at the two pieces of the formula:

H(X)=∑i=1mμi⏟Time spent in state i×[−∑j=1mPijlog⁡2Pij]⏟Local branch uncertainty leaving state iH(\mathcal{X}) = \sum_{i=1}^m \underbrace{\mu_i}_{\text{Time spent in state } i} \times \underbrace{\left[ -\sum_{j=1}^m P_{ij} \log_2 P_{ij} \right]}_{\text{Local branch uncertainty leaving state } i}

  • The inner bracket: When the operator currently sits on key ii, how unpredictable is their next keystroke? That is simply the Shannon entropy of row ii in matrix PP.
  • The outer weight μi\mu_i: Over an infinitely long shift, what fraction of their typing time is spent on key ii?

The entropy rate is nothing more than a time-weighted average of the local branch entropies across the keyboard.

Concrete Evaluation: The Two-State Markov Chain

Recall our binary telegraph operator with parameters α\alpha (switch 1→21 \to 2) and β\beta (switch 2→12 \to 1):

P=[1−ααβ1−β]P = \begin{bmatrix} 1 - \alpha & \alpha \\ \beta & 1 - \beta \end{bmatrix}

From our earlier cut-balance derivation, the stationary distribution is:

μ1=βα+β,μ2=αα+β\mu_1 = \frac{\beta}{\alpha + \beta}, \qquad \mu_2 = \frac{\alpha}{\alpha + \beta}

Step 1: Compute the Branch Entropies (Row Entropies)

  • Row 1: From State 1, the key stays in State 1 with probability 1−α1 - \alpha and hops to State 2 with probability α\alpha: H(Row 1)=Hb(α)=−αlog⁡2α−(1−α)log⁡2(1−α)H(\text{Row 1}) = H_b(\alpha) = -\alpha \log_2 \alpha - (1 - \alpha) \log_2 (1 - \alpha)
  • Row 2: From State 2, the key hops to State 1 with probability β\beta and stays in State 2 with probability 1−β1 - \beta: H(Row 2)=Hb(β)=−βlog⁡2β−(1−β)log⁡2(1−β)H(\text{Row 2}) = H_b(\beta) = -\beta \log_2 \beta - (1 - \beta) \log_2 (1 - \beta)

Step 2: Weight by the Stationary Occupancy

Multiplying each row entropy by the fraction of time spent in that state:

H(X)=μ1Hb(α)+μ2Hb(β)=βα+βHb(α)+αα+βHb(β)H(\mathcal{X}) = \mu_1 H_b(\alpha) + \mu_2 H_b(\beta) = \frac{\beta}{\alpha + \beta} H_b(\alpha) + \frac{\alpha}{\alpha + \beta} H_b(\beta)

The Redundancy Gap: Marginal Uncertainty vs. Entropy Rate

Now compare the two values side-by-side:

MetricFormulaPhysical Interpretation
Marginal State Entropy H(Xn)H(X_n)Hb(αα+β)H_b\left( \frac{\alpha}{\alpha + \beta} \right)The uncertainty of an observer who inspects a single isolated keystroke on the tape with zero knowledge of prior context.
Entropy Rate H(X)H(\mathcal{X})βα+βHb(α)+αα+βHb(β)\frac{\beta}{\alpha + \beta} H_b(\alpha) + \frac{\alpha}{\alpha + \beta} H_b(\beta)The actual bits generated per keystroke when the observer tracks the preceding character.

Because conditioning never increases entropy (H(X2∣X1)≤H(X2)H(X_2 \mid X_1) \le H(X_2)), we have:

H(X)≤H(Xn)H(\mathcal{X}) \le H(X_n)

with strict inequality unless α+β=1\alpha + \beta = 1 (the special condition where rows are identical, making the sequence memoryless/i.i.d.).

IntuitionWhat α+β=1\alpha + \beta = 1 Means Physically: The Death of Memory

Look at the transition matrix when β=1−α\beta = 1 - \alpha:

P=[1−αα1−αα]P = \begin{bmatrix} 1 - \alpha & \alpha \\ 1 - \alpha & \alpha \end{bmatrix}

  • Both rows become identical:
    • If you are currently in State 1, the probability of going to State 2 is α\alpha.
    • If you are currently in State 2, the probability of going to State 2 is also α\alpha.
  • The previous symbol carries zero information:
    Pr⁡(X2=2∣X1=1)=Pr⁡(X2=2∣X1=2)=α\Pr(X_2 = 2 \mid X_1 = 1) = \Pr(X_2 = 2 \mid X_1 = 2) = \alpha Knowing whether the operator just typed a 11 or a 22 gives you no predictive advantage whatsoever. The conditioning collapses: H(X2∣X1)=H(X2)H(X_2 \mid X_1) = H(X_2).

Why asymmetry (α≠β\alpha \ne \beta) doesn’t create memory:
Even if α=0.9\alpha = 0.9 and β=0.1\beta = 0.1 (so α+β=1\alpha + \beta = 1), the machine is heavily biased toward State 2, but that bias is independent of where it came from. The operator is simply flipping the same biased coin on every keystroke.

The system has no grammar, it has reverted to a purely memoryless i.i.d. source, collapsing the redundancy gap Δ=H(Xn)−H(X)\Delta = H(X_n) - H(\mathcal{X}) to zero.

The difference:

Δ=H(Xn)−H(X)\Delta = H(X_n) - H(\mathcal{X})

is the predictive leverage of grammar. It is the exact number of bits per symbol an engineer saves by designing a compressor that remembers the previous keystroke instead of encoding each letter in isolation.

For the symmetric chain α=β=p\alpha = \beta = p, the marginal is always uniform, so H(Xn)=1H(X_n) = 1 bit, while the entropy rate is Hb(p)H_b(p). The gap closes only at p=0.5p = 0.5, which is exactly α+β=1\alpha + \beta = 1:

Symmetric two-state chain (α = β = p): the redundancy gap Δ = 1 − H_b(p): marginal entropy H(Xₙ) = 1 + 0 * p; entropy rate H(𝒳) = H_b(p) = -p * log2(p) - (1 - p) * log2(1 - p)00.20.40.60.8100.51switching probability pbits per symbol
  • marginal entropy H(Xₙ)
  • entropy rate H(𝒳) = H_b(p)
Symmetric two-state chain (α = β = p): the redundancy gap Δ = 1 − H_b(p)

NoteTransient Starts Do Not Alter the Entropy Rate

What if the machine is initialized in a fixed state that does not match μ\boldsymbol{\mu} (e.g., X1=1X_1 = 1 with probability 1.01.0)?

If the chain is irreducible and aperiodic, the distribution p(n)\mathbf{p}^{(n)} converges exponentially to μ\boldsymbol{\mu}.

  • In the Cesàro average 1nH(X1,…,Xn)\frac{1}{n} H(X_1, \dots, X_n), the finite warmup error from early steps gets divided by nn and vanishes to 00.
  • In the streaming limit lim⁡n→∞H(Xn∣Xn−1)\lim_{n \to \infty} H(X_n \mid X^{n-1}), the marginal distribution has already reached μ\boldsymbol{\mu} in the asymptotic limit.

The entropy rate is an asymptotic, steady-state property of the transition law PP. Starting off-equilibrium alters the transient bits during the warm-up period, but leaves the long-term entropy rate H(X)H(\mathcal{X}) completely invariant.


Example: Entropy Rate of a Random Walk on a Weighted Graph

The Practical Problem:
Why care about the entropy rate of a graph walk? In real-world networks, H(X)H(\mathcal{X}) directly dictates fundamental operational limits:

  • Logging & Telemetry: If a routing token or diagnostic probe wanders a network, what is the absolute minimum bit rate needed to record its trajectory losslessly back to a central server?
  • Decentralized Search & Diffusion: How rapidly does a random web searcher disperse across the topology to explore new websites versus getting trapped in local clusters?
  • Network Traversal Privacy: How unpredictable is an anonymous packet’s path against an eavesdropper monitoring link traffic?

Normally, computing H(X)H(\mathcal{X}) requires solving an m×mm \times m linear system μP=μ\boldsymbol{\mu} P = \boldsymbol{\mu} followed by a weighted sum of all row entropies, a major bottleneck on networks with millions of nodes.

However, when transitions follow the edges of an undirected weighted graph, the underlying physical symmetry lets us bypass numerical matrix solvers entirely. We can read off the exact entropy rate in closed form using basic edge and degree counts.


The Graph Model and Setup

Let G=(V,E)G = (V, E) be a connected graph with mm vertices labelled {1,2,…,m}\{1, 2, \ldots, m\}.

  • Each edge connecting node ii and node jj has an assigned weight Wij≥0W_{ij} \ge 0.
  • The graph is undirected, meaning traversal is symmetric: Wij=WjiW_{ij} = W_{ji} (If no edge connects ii and jj, we set Wij=0W_{ij} = 0).
  • The Random Walk: If the particle is currently at node ii (Xn=iX_n = i), it picks its next destination jj with probability proportional to the connecting edge’s weight: Pij=Wij∑kWikP_{ij} = \frac{W_{ij}}{\sum_k W_{ik}}

To keep track of the weights across the graph, we define two sums:

  1. Local Node Weight (WiW_i): The total weight of all edges touching node ii: Wi=∑j=1mWijW_i = \sum_{j=1}^m W_{ij}
  2. Total Network Weight (WW): The sum of weights across all undirected edges: W=∑i<jWijW = \sum_{i < j} W_{ij}

Because every undirected edge connects two endpoints, summing the local weights WiW_i across all nodes counts every edge twice: ∑i=1mWi=2W\sum_{i=1}^m W_i = 2W


The Stationary Distribution: Pure Locality

TheoremStationary Distribution of a Graph Random Walk

The unique stationary probability of resting on node ii is directly proportional to its local weight:

μi=Wi2W\mu_i = \frac{W_i}{2W}

ProofGuess and Verify via Balance

We verify that μj=∑i=1mμiPij\mu_j = \sum_{i=1}^m \mu_i P_{ij}:

∑i=1mμiPij=∑i=1m(Wi2W)(WijWi)\sum_{i=1}^m \mu_i P_{ij} = \sum_{i=1}^m \left(\frac{W_i}{2W}\right) \left(\frac{W_{ij}}{W_i}\right)

Step 1: The local weights WiW_i cancel.
The factor WiW_i that makes node ii popular to visit is the exact same denominator that dilutes its outgoing transitions:

=∑i=1mWij2W=12W∑i=1mWij= \sum_{i=1}^m \frac{W_{ij}}{2W} = \frac{1}{2W} \sum_{i=1}^m W_{ij}

Step 2: Apply undirected symmetry (Wij=WjiW_{ij} = W_{ji}).
Summing the incoming weights from all neighbors ii into node jj simply recovers the local weight WjW_j:

=Wj2W=μj✓= \frac{W_j}{2W} = \mu_j \quad \checkmark

∎

IntuitionThe Locality Principle: Traffic Depends Only on Your Front Porch

In a general network, figuring out how often a node gets visited usually requires mapping the entire global topology—every loop, bottleneck, and highway across all mm stations.

Look at the formula μi=Wi2W\mu_i = \frac{W_i}{2W}:

  • WiW_i is purely local: the capacity of the roads physically attached to node ii.
  • 2W2W is a global normalizing constant: the total asphalt laid down across the entire world.

What this means in practice: If you manage server ii, you do not care whether distant servers are wired as a ring, a grid, a star, or a chaotic web. As long as the total network capacity WW remains fixed, rewiring distant regions has zero effect on your long-term traffic share μi\mu_i. Your traffic share depends strictly on the size of your own front porch.


The Entropy Rate: Edge Entropy Minus Node Entropy

We now compute the entropy rate H(X)=H(X2∣X1)H(\mathcal{X}) = H(X_2 \mid X_1) without solving linear systems or writing out transition matrices.

TheoremClosed-Form Entropy Rate for a Weighted Graph

The entropy rate of a random walk on an undirected weighted graph is the difference between the entropy of its directed edge distribution and the entropy of its node distribution:

H(X)=H({Wij2W})−H({Wi2W})H(\mathcal{X}) = H\left(\left\{ \frac{W_{ij}}{2W} \right\}\right) - H\left(\left\{ \frac{W_i}{2W} \right\}\right)

DerivationDerivation via Logarithmic Splitting

Step 1: Expand the Markov entropy rate formula.

H(X)=−∑i=1mμi∑j=1mPijlog⁡2PijH(\mathcal{X}) = -\sum_{i=1}^m \mu_i \sum_{j=1}^m P_{ij} \log_2 P_{ij}

Step 2: Substitute μi=Wi2W\mu_i = \frac{W_i}{2W} and Pij=WijWiP_{ij} = \frac{W_{ij}}{W_i}.

H(X)=−∑i=1mWi2W∑j=1mWijWilog⁡2(WijWi)=−∑i=1m∑j=1mWij2Wlog⁡2(WijWi)H(\mathcal{X}) = -\sum_{i=1}^m \frac{W_i}{2W} \sum_{j=1}^m \frac{W_{ij}}{W_i} \log_2 \left(\frac{W_{ij}}{W_i}\right) = -\sum_{i=1}^m \sum_{j=1}^m \frac{W_{ij}}{2W} \log_2 \left(\frac{W_{ij}}{W_i}\right)

Step 3: Normalize inside the logarithm by dividing numerator and denominator by 2W2W.

log⁡2(WijWi)=log⁡2(Wij/2WWi/2W)=log⁡2(Wij2W)−log⁡2(Wi2W)\log_2 \left(\frac{W_{ij}}{W_i}\right) = \log_2 \left( \frac{W_{ij} / 2W}{W_i / 2W} \right) = \log_2 \left(\frac{W_{ij}}{2W}\right) - \log_2 \left(\frac{W_i}{2W}\right)

Substitute this back into the double summation:

H(X)=−∑i=1m∑j=1mWij2Wlog⁡2(Wij2W)⏟Term 1  +  ∑i=1m∑j=1mWij2Wlog⁡2(Wi2W)⏟Term 2H(\mathcal{X}) = \underbrace{-\sum_{i=1}^m \sum_{j=1}^m \frac{W_{ij}}{2W} \log_2 \left(\frac{W_{ij}}{2W}\right)}_{\text{Term 1}} \;+\; \underbrace{\sum_{i=1}^m \sum_{j=1}^m \frac{W_{ij}}{2W} \log_2 \left(\frac{W_i}{2W}\right)}_{\text{Term 2}}

Step 4: Identify the two probability distributions.

  • Term 1: The set of normalized edge weights {Wij2W}\left\{ \frac{W_{ij}}{2W} \right\} over all directed hops (i,j)(i, j) forms a valid probability distribution that sums to 11. Term 1 is by definition its Shannon entropy: Term 1=H({Wij2W})\text{Term 1} = H\left(\left\{ \frac{W_{ij}}{2W} \right\}\right)
  • Term 2: The term log⁡2(Wi2W)\log_2 \left(\frac{W_i}{2W}\right) does not depend on the destination index jj. Pull it out of the inner sum: ∑i=1mlog⁡2(Wi2W)(∑j=1mWij2W)=∑i=1mWi2Wlog⁡2(Wi2W)=−H({Wi2W})\sum_{i=1}^m \log_2 \left(\frac{W_i}{2W}\right) \left( \sum_{j=1}^m \frac{W_{ij}}{2W} \right) = \sum_{i=1}^m \frac{W_i}{2W} \log_2 \left(\frac{W_i}{2W}\right) = -H\left(\left\{ \frac{W_i}{2W} \right\}\right)

Combining Term 1 and Term 2 gives the result.

IntuitionWhat “Edge Entropy Minus Node Entropy” Actually Means

Why does an entropy rate decompose into the difference between two static distributions?

Think of a transition as picking a specific one-way road:

  1. Specify a directed edge (i→j)(i \to j): This requires choosing both where you start and where you go. The total uncertainty of choosing an arbitrary directed hop across the whole network is H(edges)H(\text{edges}).
  2. Subtract your starting point ii: The entropy rate measures the surprise of your next step given where you currently stand. You already know which node you are on! Knowing your current node eliminates H(nodes)H(\text{nodes}) bits of uncertainty.

What remains is the net incremental surprise of picking which outgoing branch to take:

H(Next Step∣Current Node)=H(Directed Hop)−H(Current Node)H(\text{Next Step} \mid \text{Current Node}) = H(\text{Directed Hop}) - H(\text{Current Node})


Special Case: Simple Unweighted Graphs

Now strip away custom weights: suppose every valid connection is an ordinary, identical two-way link (Wij=1W_{ij} = 1 if connected, 00 otherwise).

  • Node Degree (did_i): The number of neighbors directly connected to node ii (how many doorways leave room ii).
  • Total Edges (∣E∣|E|): The total count of physical bridges in the network.
  • Why the sum of degrees equals 2∣E∣2|E|: Every physical bridge connects two rooms. If each room counts its own doorways, every bridge gets counted twice (once from room AA, once from room BB). Therefore: ∑i=1mdi=2∣E∣\sum_{i=1}^m d_i = 2|E|

Because every existing directed bridge (i→j)(i \to j) has weight 11, its normalized probability in the edge distribution is identical: 12∣E∣\frac{1}{2|E|}. The entropy of a uniform distribution over 2∣E∣2|E| equally likely bridges is simply log⁡2(2∣E∣)\log_2(2|E|).

CorollaryEntropy Rate of an Unweighted Graph

For an unweighted undirected graph with ∣E∣|E| bridges and degree counts (d1,d2,…,dm)(d_1, d_2, \dots, d_m):

H(X)=log⁡2(2∣E∣)−H(d12∣E∣,d22∣E∣,…,dm2∣E∣)H(\mathcal{X}) = \log_2(2|E|) - H\left( \frac{d_1}{2|E|}, \frac{d_2}{2|E|}, \ldots, \frac{d_m}{2|E|} \right)

IntuitionDegree-Sequence Invariance: Why Global Topology Disappears

The formula in the corollary takes only two inputs:

  1. The total number of edges ∣E∣|E|.
  2. The list of neighbor counts (the degree sequence (d1,d2,…,dm)(d_1, d_2, \dots, d_m)).

Notice what is missing: any term describing how those edges connect to one another across the network.

Can two graphs share the exact same degrees and still be different graphs?

Yes. Specifying how many neighbors each node possesses does not uniquely fix the layout of the graph.

Consider two connected graphs that both contain 6 nodes, each with degree 2 (di=2d_i = 2 for all ii, meaning every single node has exactly 2 neighbors, giving ∣E∣=6|E| = 6):

  • Graph 1 (A single 6-node ring): 1−2−3−4−5−6−11 - 2 - 3 - 4 - 5 - 6 - 1. A walker needs 3 steps to reach the opposite side.
  • Graph 2 (Two disjoint 3-node triangles): 1−2−3−11 - 2 - 3 - 1 and 4−5−6−44 - 5 - 6 - 4. The state space is split into completely separate disconnected loops.

Or, to keep the network connected, consider two 6-node graphs where:

(d1,d2,d3,d4,d5,d6)=(3,3,2,2,1,1)(d_1, d_2, d_3, d_4, d_5, d_6) = (3, 3, 2, 2, 1, 1)

  • Topology A (Triangle with Tails): The two hubs connect to each other and share a degree-2 node to form a 3-node cycle (a triangle). The remaining degree-2 node acts as an extended linear tail off one hub, while the other hub holds a leaf directly.
  • Topology B (4-Node Ring with Two Separate Leaves): The two hubs sit on opposite sides of a 4-node ring formed with the two degree-2 nodes. Each hub then branches outward into its own independent degree-1 leaf.
flowchart TD
  subgraph Topology A ["Topology A: 3-Node Cycle with an Extended Tail"]
    direction TB
    A_H1["Hub 1 (d=3)"] --- A_H2["Hub 2 (d=3)"]
    A_H1 --- A_M1["Node 1 (d=2)"]
    A_H2 --- A_M1
    A_H1 --- A_L1["Leaf 1 (d=1)"]
    A_H2 --- A_M2["Node 2 (d=2)"]
    A_M2 --- A_L2["Leaf 2 (d=1)"]
  end

  subgraph Topology B ["Topology B: 4-Node Ring with Symmetrical Leaves"]
    direction TB
    B_H1["Hub 1 (d=3)"] --- B_M1["Node 1 (d=2)"]
    B_M1 --- B_H2["Hub 2 (d=3)"]
    B_H2 --- B_M2["Node 2 (d=2)"]
    B_M2 --- B_H1
    B_H1 --- B_L1["Leaf 1 (d=1)"]
    B_H2 --- B_L2["Leaf 2 (d=1)"]
  end

Although these networks have different diameters, different cycle structures, and entirely different bottleneck locations, their degree lists are identical.

Why the entropy rate is identical on both

Recall that the entropy rate is a weighted average of local step uncertainties:

H(X)=∑i=1mμiH(step from node i)H(\mathcal{X}) = \sum_{i=1}^m \mu_i H(\text{step from node } i)

When a walker stands at node ii, it chooses uniformly among its did_i neighbors, experiencing log⁡2(di)\log_2(d_i) bits of uncertainty. Furthermore, by the locality theorem, the fraction of time the walker spends at node ii is strictly μi=di2∣E∣\mu_i = \frac{d_i}{2|E|}.

Multiplying them together:

H(X)=∑i=1m(di2∣E∣)log⁡2(di)H(\mathcal{X}) = \sum_{i=1}^m \left(\frac{d_i}{2|E|}\right) \log_2(d_i)

Every term in this sum depends exclusively on the local number of exits did_i. Whether an exit leads into a tight triangle, an open tree branch, or a distant cluster does not alter the fact that the walker chooses among did_i options with probability 1/di1/d_i.

Global geometry, such as how far apart nodes sit or whether the paths loop back on themselves, governs how quickly a walker diffuses across the network, but it has zero impact on the average per-step choice uncertainty.

Application: Chessboard Random Walks

Why analyze chess pieces as random walks?
Consider an encoder that must record the sequence of positions of a piece wandering randomly on an 8×88 \times 8 board (64 states). By the Shannon-McMillan-Breiman theorem, the minimum number of bits needed per step to store or transmit this path losslessly is the entropy rate H(X)H(\mathcal{X}).

Analyzing different pieces answers a concrete mathematical question: how do board boundaries change the entropy rate compared to an infinite grid?

On an infinite grid:

  • Every square has the exact same number of outgoing moves kk.
  • The next position is chosen uniformly from those kk neighbors.
  • The entropy rate is simply log⁡2k\log_2 k bits per step.

On an 8×88 \times 8 board, walls prevent certain moves for some pieces, making the degree did_i depend on the piece’s position. We compare two concrete examples:

  1. The King: The number of legal moves decreases near the edges and corners.
  2. The Rook: The number of legal moves is constant everywhere, regardless of the board’s boundaries.

1. The King’s Random Walk

A king moves one square horizontally, vertically, or diagonally. On an infinite board, a king always has 8 possible moves, yielding an entropy rate of log⁡28=3.0\log_2 8 = 3.0 bits per step.

On a bounded 8×88 \times 8 board, the 64 squares split into three distinct groups based on how many legal moves remain:

[3] [5] [5] [5] [5] [5] [5] [3] <- Corners: 3 moves
[5] [8] [8] [8] [8] [8] [8] [5] <- Edges: 5 moves
[5] [8] [8] [8] [8] [8] [8] [5] <- Center: 8 moves
...
  • 4 Corner squares: dcorner=3d_{\text{corner}} = 3 moves.
  • 24 Border squares: dborder=5d_{\text{border}} = 5 moves.
  • 36 Interior squares: dinterior=8d_{\text{interior}} = 8 moves.
Step 1: Count the Total Number of Directed Transitions (2∣E∣2|E|)

Summing the available moves did_i across all 64 squares gives the total number of directed edges in the state graph:

2∣E∣=∑i=164di=(4×3)+(24×5)+(36×8)=12+120+288=4202|E| = \sum_{i=1}^{64} d_i = (4 \times 3) + (24 \times 5) + (36 \times 8) = 12 + 120 + 288 = 420

Step 2: Compute the Stationary Distribution μ\boldsymbol{\mu}

Using the graph formula μi=di2∣E∣\mu_i = \frac{d_i}{2|E|}, the long-run probability of finding the king on a specific square is:

μcorner=3420,μborder=5420,μinterior=8420\mu_{\text{corner}} = \frac{3}{420}, \qquad \mu_{\text{border}} = \frac{5}{420}, \qquad \mu_{\text{interior}} = \frac{8}{420}

The stationary distribution is non-uniform: an interior square is visited 83≈2.67\frac{8}{3} \approx 2.67 times more often than a corner square because more incoming paths lead to it.

Step 3: Compute the Entropy Rate H(X)H(\mathcal{X})

We apply the unweighted graph entropy rate formula:

H(X)=log⁡2(2∣E∣)−H(μ)H(\mathcal{X}) = \log_2(2|E|) - H(\boldsymbol{\mu})

  1. Edge term: log⁡2(420)≈8.7142 bits\log_2(420) \approx 8.7142 \text{ bits}

  2. Node entropy H(μ)H(\boldsymbol{\mu}): H(μ)=−∑i=164μilog⁡2μiH(\boldsymbol{\mu}) = -\sum_{i=1}^{64} \mu_i \log_2 \mu_i H(μ)=−[4(3420log⁡23420)+24(5420log⁡25420)+36(8420log⁡28420)]≈5.9540 bitsH(\boldsymbol{\mu}) = -\left[ 4 \left(\frac{3}{420} \log_2 \frac{3}{420}\right) + 24 \left(\frac{5}{420} \log_2 \frac{5}{420}\right) + 36 \left(\frac{8}{420} \log_2 \frac{8}{420}\right) \right] \approx 5.9540 \text{ bits}

  3. Subtract the two terms: H(X)=8.7142−5.9540≈2.76 bits per stepH(\mathcal{X}) = 8.7142 - 5.9540 \approx 2.76 \text{ bits per step}

Comparing Bounded vs. Unbounded
  • Infinite board: H(X)=log⁡28=3.0H(\mathcal{X}) = \log_2 8 = 3.0 bits per step.
  • Bounded 8×88 \times 8 board: H(X)≈2.76H(\mathcal{X}) \approx 2.76 bits per step.

The board walls reduce the average uncertainty by:

3.0−2.76=0.24 bits per step3.0 - 2.76 = 0.24 \text{ bits per step}

Because corners and edges restrict the king to fewer options (3 or 5 instead of 8), the average number of bits required to encode the next step drops from 3.03.0 to 2.762.76.

2. The Rook’s Random Walk

A rook moves to any square along its current row or column.

  • Along its row, there are 7 other squares.
  • Along its column, there are 7 other squares.
  • The total number of legal moves from any square is:

di=7+7=14for all i∈{1,…,64}d_i = 7 + 7 = 14 \quad \text{for all } i \in \{1, \dots, 64\}

Unlike the king, a rook in a corner has the exact same number of legal moves (14) as a rook in the center.

Computing the Rook’s Entropy Rate

Because every square has the identical degree di=14d_i = 14:

  1. The total number of directed edges is: 2∣E∣=64×14=8962|E| = 64 \times 14 = 896

  2. The stationary distribution is uniform across all 64 squares: μi=di2∣E∣=14896=164\mu_i = \frac{d_i}{2|E|} = \frac{14}{896} = \frac{1}{64}

  3. The node entropy is: H(μ)=log⁡264=6.0 bitsH(\boldsymbol{\mu}) = \log_2 64 = 6.0 \text{ bits}

  4. Applying the formula: H(X)=log⁡2(896)−log⁡2(64)=log⁡2(89664)=log⁡214≈3.807 bits per stepH(\mathcal{X}) = \log_2(896) - \log_2(64) = \log_2\left(\frac{896}{64}\right) = \log_2 14 \approx 3.807 \text{ bits per step}

The Structural Difference Between King and Rook
  • King: Degrees vary by position (di∈{3,5,8}d_i \in \{3, 5, 8\}). The stationary distribution is non-uniform, and the entropy rate (2.762.76 bits) is strictly lower than log⁡2(max⁡idi)=3.0\log_2(\max_i d_i) = 3.0 bits.
  • Rook: Degree is uniform across all states (di=14d_i = 14). The stationary distribution is uniform (μi=1/64\mu_i = 1/64), and the entropy rate is exactly log⁡214\log_2 14 bits per step. The boundaries of the board limit the maximum distance a rook can travel, but they do not alter the number of choices available at each step.

RemarkTime-Reversibility: Definition, Physical Meaning, and Applications

In both the king and rook examples, the transition between any two adjacent squares ii and jj in stationary equilibrium satisfies:

μiPij=(di2∣E∣)(1di)=12∣E∣\mu_i P_{ij} = \left(\frac{d_i}{2|E|}\right) \left(\frac{1}{d_i}\right) = \frac{1}{2|E|}

Reversing the direction gives the exact same probability mass:

μjPji=(dj2∣E∣)(1dj)=12∣E∣=μiPij\mu_j P_{ji} = \left(\frac{d_j}{2|E|}\right) \left(\frac{1}{d_j}\right) = \frac{1}{2|E|} = \mu_i P_{ij}

The condition μiPij=μjPji\mu_i P_{ij} = \mu_j P_{ji} for all pairs i,ji, j is called detailed balance. A stationary Markov chain that satisfies detailed balance is time-reversible.

1. What Time-Reversibility Means Physically

Imagine recording a video of the system running at equilibrium and playing the tape in reverse:

  • In a reversible chain: An observer watching the footage cannot determine whether the video is running forward or backward. The probability of seeing any sequence of states is completely symmetric in time: Pr⁡(X1=x1,X2=x2,…,Xn=xn)=Pr⁡(X1=xn,X2=xn−1,…,Xn=x1)\Pr(X_1 = x_1, X_2 = x_2, \dots, X_n = x_n) = \Pr(X_1 = x_n, X_2 = x_{n-1}, \dots, X_n = x_1) There are no net probability currents, macroscopic whirlpools, or preferred circular flows around any loops.
  • In an irreversible chain: Consider a 3-state system that steps deterministically in a ring: 1→2→3→11 \to 2 \to 3 \to 1. Running forward, you see 1→2→31 \to 2 \to 3. Playing the tape backward shows 3→2→13 \to 2 \to 1, which has transition probability 0. That one-way loop acts as a thermodynamic “arrow of time.”

Detailed balance guarantees that along every single link, the flow rate from i→ji \to j (μiPij\mu_i P_{ij}) is balanced by the exact reverse flow from j→ij \to i (μjPji\mu_j P_{ji}).

2. The Graph Isomorphism

Every discrete time-reversible Markov chain can be mapped onto a random walk on an undirected weighted graph by defining edge weights as:

Wij=μiPij=μjPjiW_{ij} = \mu_i P_{ij} = \mu_j P_{ji}

Because Wij=WjiW_{ij} = W_{ji} by detailed balance, the edge weights are symmetric, and:

Wi=∑jWij=∑jμiPij=μi∑jPij=μiW_i = \sum_j W_{ij} = \sum_j \mu_i P_{ij} = \mu_i \sum_j P_{ij} = \mu_i

Thus, the closed-form entropy rate identity:

H(X)=H({Wij2W})−H({Wi2W})H(\mathcal{X}) = H\left(\left\{ \frac{W_{ij}}{2W} \right\}\right) - H\left(\left\{ \frac{W_i}{2W} \right\}\right)

is not an ad-hoc formula for chessboard games, it is the exact, universal entropy rate formula for every time-reversible Markov chain.

3. Practical Applications

Because time-reversibility eliminates directional loops and makes equilibrium distributions easy to compute in closed form, it is intentionally engineered into systems across engineering and computer science:

  • Markov Chain Monte Carlo (MCMC) & Metropolis-Hastings:
    When sampling high-dimensional distributions in machine learning and Bayesian inference, designing arbitrary Markov chains is difficult because computing μ\boldsymbol{\mu} requires solving massive linear systems. The Metropolis-Hastings algorithm explicitly enforces detailed balance (μiPij=μjPji\mu_i P_{ij} = \mu_j P_{ji}) by design, guaranteeing the chain converges to the target distribution μ\boldsymbol{\mu} without ever needing to invert a matrix.
  • Queueing Networks (Jackson Networks):
    In packet switching and server farms, packets arrive, get serviced, and hop between queues. When queue transitions satisfy detailed balance, the joint distribution of queue lengths across the entire network factors into a simple independent product (product-form stationary distribution), allowing network engineers to analyze each server buffer in isolation.
  • Statistical Mechanics & Microscopic Reversibility:
    In isolated physical systems at thermal equilibrium (e.g., gas molecules in a chamber), fundamental microscopic physics is symmetric under time reversal (t→−tt \to -t). Detailed balance directly models this microscopic reversibility, ensuring the system reaches a stable Boltzmann distribution with zero net energy or particle flux.

The Second Law of Thermodynamics

The Physics Problem:
The Second Law of Thermodynamics famously asserts that the entropy of an isolated physical system never decreases (dS≥0dS \ge 0). In statistical physics, Boltzmann defined entropy as S=kBln⁡ΩS = k_B \ln \Omega, where Ω\Omega is the number of accessible microstates. When all microstates are equally likely, Boltzmann’s expression matches Shannon’s formula H(X)=log⁡2∣X∣H(X) = \log_2 |\mathcal{X}| up to a constant unit conversion.

If we model an isolated system as a Markov chain, where transitions represent the fundamental microscopic equations of motion, does Shannon entropy H(Xn)H(X_n) always increase over time?

WarningThe Headline Result: Entropy Does Not Always Increase

Contrary to popular assumption, the Shannon entropy H(Xn)H(X_n) of a Markov chain does not necessarily increase with time.

What is universally guaranteed to decrease is the relative entropy (Kullback-Leibler divergence) between probability distributions:

D(μn∥μn′)≥D(μn+1∥μn+1′)D(\mu_n \parallel \mu'_n) \ge D(\mu_{n+1} \parallel \mu'_{n+1})

An increase in Shannon entropy (H(Xn+1)≥H(Xn)H(X_{n+1}) \ge H(X_n)) occurs only under specific symmetry conditions on the transition physics, specifically, when the equilibrium distribution is uniform.

Information theory reframes the Second Law into four distinct, mathematically exact perspectives.


Perspective 1: Relative Entropy Between Any Two Distributions Decreases

Consider an isolated physical system governed by fixed microscopic laws represented by a transition probability kernel r(xn+1∣xn)r(x_{n+1} \mid x_n). Suppose we prepare the system in one of two different initial configurations: μ1\mu_1 or μ1′\mu'_1.

As time advances, both probability distributions evolve under the exact same transition matrix: μn+1=μnP,μn+1′=μn′P\mu_{n+1} = \mu_n P, \qquad \mu'_{n+1} = \mu'_n P

TheoremMonotonic Contraction of Relative Entropy

For any Markov chain with transition kernel r(xn+1∣xn)r(x_{n+1} \mid x_n) and any two state distributions μn\mu_n and μn′\mu'_n at time nn:

D(μn∥μn′)≥D(μn+1∥μn+1′)D(\mu_n \parallel \mu'_n) \ge D(\mu_{n+1} \parallel \mu'_{n+1})

ProofExpanding Joint Relative Entropy in Forward and Reverse Time

Step 1: Define the joint distributions over adjacent time steps.
Let p(xn,xn+1)p(x_n, x_{n+1}) and q(xn,xn+1)q(x_n, x_{n+1}) be the joint distributions on (Xn,Xn+1)(X_n, X_{n+1}) under the two experiments. Because the microscopic physics is identical:

p(xn,xn+1)=p(xn) r(xn+1∣xn),q(xn,xn+1)=q(xn) r(xn+1∣xn)p(x_n, x_{n+1}) = p(x_n)\, r(x_{n+1} \mid x_n), \qquad q(x_n, x_{n+1}) = q(x_n)\, r(x_{n+1} \mid x_n)

Step 2: Expand the joint divergence using the Chain Rule for Relative Entropy.
We expand D(p(xn,xn+1)∥q(xn,xn+1))D\big(p(x_n, x_{n+1}) \parallel q(x_n, x_{n+1})\big) in two alternate directions:

  1. Forward time decomposition: D(p∥q)=D(p(xn)∥q(xn))+D(p(xn+1∣xn)∥q(xn+1∣xn))D(p \parallel q) = D\big(p(x_n) \parallel q(x_n)\big) + D\big(p(x_{n+1} \mid x_n) \parallel q(x_{n+1} \mid x_n)\big)
  2. Reverse time decomposition: D(p∥q)=D(p(xn+1)∥q(xn+1))+D(p(xn∣xn+1)∥q(xn∣xn+1))D(p \parallel q) = D\big(p(x_{n+1}) \parallel q(x_{n+1})\big) + D\big(p(x_n \mid x_{n+1}) \parallel q(x_n \mid x_{n+1})\big)

Step 3: Evaluate the forward conditional term.
Because both systems evolve under the identical transition kernel r(xn+1∣xn)r(x_{n+1} \mid x_n):

p(xn+1∣xn)=q(xn+1∣xn)=r(xn+1∣xn)p(x_{n+1} \mid x_n) = q(x_{n+1} \mid x_n) = r(x_{n+1} \mid x_n)

The relative entropy between identical distributions is identically zero:

D(p(xn+1∣xn)∥q(xn+1∣xn))=0D\big(p(x_{n+1} \mid x_n) \parallel q(x_{n+1} \mid x_n)\big) = 0

Thus, the joint divergence equals the initial marginal divergence:

D(p∥q)=D(p(xn)∥q(xn))D(p \parallel q) = D\big(p(x_n) \parallel q(x_n)\big)

Step 4: Bound the backward conditional term.
By the Information Inequality (non-negativity of KL divergence):

D(p(xn∣xn+1)∥q(xn∣xn+1))≥0D\big(p(x_n \mid x_{n+1}) \parallel q(x_n \mid x_{n+1})\big) \ge 0

Substituting this inequality into the reverse time expansion:

D(p(xn)∥q(xn))=D(p(xn+1)∥q(xn+1))+D(p(xn∣xn+1)∥q(xn∣xn+1))⏟≥0D\big(p(x_n) \parallel q(x_n)\big) = D\big(p(x_{n+1}) \parallel q(x_{n+1})\big) + \underbrace{D\big(p(x_n \mid x_{n+1}) \parallel q(x_n \mid x_{n+1})\big)}_{\ge 0}

Dropping the non-negative backward term establishes the result:

D(p(xn)∥q(xn))≥D(p(xn+1)∥q(xn+1))  ⟺  D(μn∥μn′)≥D(μn+1∥μn+1′)D\big(p(x_n) \parallel q(x_n)\big) \ge D\big(p(x_{n+1}) \parallel q(x_{n+1})\big) \iff D(\mu_n \parallel \mu'_n) \ge D(\mu_{n+1} \parallel \mu'_{n+1})

∎

IntuitionThe Dynamical Mechanism: Forward Sharing vs. Backward Divergence

The proof hinges on a fundamental temporal asymmetry:

  • The forward physics is identical: Both systems share the same transition kernel r(xn+1∣xn)r(x_{n+1} \mid x_n), yielding zero conditional divergence.
  • The backward inference diverges: Running time in reverse requires Bayes’ rule: p(xn∣xn+1)=p(xn)r(xn+1∣xn)p(xn+1)p(x_n \mid x_{n+1}) = \frac{p(x_n) r(x_{n+1} \mid x_n)}{p(x_{n+1})} Because p(xn)≠q(xn)p(x_n) \neq q(x_n), the backward reconstruction kernels are distinct, producing non-zero conditional surprise (D>0D > 0).

Physical dynamics act as an information bottleneck: stochastic transitions smooth out differences between configurations, making distinct initial ensembles progressively harder to distinguish over time.


Perspective 2: Distance to the Equilibrium State Decreases

What happens if one of the two distributions is chosen to be the stationary equilibrium distribution μ\boldsymbol{\mu}?

CorollaryMonotonic Approach to Equilibrium

Let μ\boldsymbol{\mu} be any stationary distribution of the Markov chain (μP=μ\boldsymbol{\mu} P = \boldsymbol{\mu}). If μn\mu_n is the state distribution at step nn, then:

D(μn∥μ)≥D(μn+1∥μ)D(\mu_n \parallel \boldsymbol{\mu}) \ge D(\mu_{n+1} \parallel \boldsymbol{\mu})

The relative entropy between the current state distribution and the equilibrium distribution decreases monotonically at every step.

Because D(μn∥μ)≥0D(\mu_n \parallel \boldsymbol{\mu}) \ge 0 and the sequence is non-increasing, it is guaranteed to converge to a finite limit. When the Markov chain is irreducible and aperiodic, that limit is strictly zero: lim⁡n→∞D(μn∥μ)=0\lim_{n \to \infty} D(\mu_n \parallel \boldsymbol{\mu}) = 0.


Perspective 3: Absolute Entropy Increases If and Only If Equilibrium Is Uniform

A common trap is assuming that because relative entropy D(μn∥μ)D(\mu_n \parallel \boldsymbol{\mu}) decreases, absolute Shannon entropy H(Xn)H(X_n) must increase.

WarningCounterexample: When Shannon Entropy Strictly Decreases

Take a two-state Markov chain with states {1,2}\{1, 2\} and transition matrix:

P=[0.990.010.990.01]P = \begin{bmatrix} 0.99 & 0.01 \\ 0.99 & 0.01 \end{bmatrix}

Regardless of where you start, the next step lands in State 1 with probability 0.990.99. The stationary distribution is μ=[0.99,  0.01]\boldsymbol{\mu} = [0.99, \; 0.01].

  • Initialize the chain in a uniform distribution: μ1=[0.5,  0.5]\mu_1 = [0.5, \; 0.5].
  • At step 1: H(X1)=Hb(0.5)=1.0 bitH(X_1) = H_b(0.5) = 1.0\text{ bit} (maximum possible entropy).
  • At step 2: μ2=μ1P=[0.99,  0.01]\mu_2 = \mu_1 P = [0.99, \; 0.01], so H(X2)=Hb(0.01)≈0.081 bitsH(X_2) = H_b(0.01) \approx 0.081\text{ bits}.

The entropy dropped precipitously from 1.0 bit1.0\text{ bit} to 0.08 bits0.08\text{ bits}!
Meanwhile, relative entropy to equilibrium decreased: D(μ1∥μ)≈0.77 bits⟶D(μ2∥μ)=0 bitsD(\mu_1 \parallel \boldsymbol{\mu}) \approx 0.77\text{ bits} \quad \longrightarrow \quad D(\mu_2 \parallel \boldsymbol{\mu}) = 0\text{ bits} The system moved closer to its natural equilibrium, but because that equilibrium is highly ordered, absolute entropy collapsed.

The same thing happens more gently in the chain α=0.1\alpha = 0.1, β=0.3\beta = 0.3 from earlier, started surely in State 2. Its marginal is Pr⁡(Xn=1)=0.75 (1−0.6 n−1)\Pr(X_n = 1) = 0.75\,(1 - 0.6^{\,n-1}), which sweeps past 0.50.5 on its way to 0.750.75. So H(Xn)H(X_n) overshoots to nearly a full bit before settling back to Hb(0.25)≈0.811H_b(0.25) \approx 0.811, while the divergence to equilibrium falls at every step:

Chain α = 0.1, β = 0.3 started in State 2: entropy H(Xₙ) = -(0.75 * (1 - 0.6^(n - 1))) * log2(0.75 * (1 - 0.6^(n - 1))) - (1 - 0.75 * (1 - 0.6^(n - 1))) * log2(1 - 0.75 * (1 - 0.6^(n - 1))); divergence D(μₙ ‖ μ) = 0.75 * (1 - 0.6^(n - 1)) * log2(1 - 0.6^(n - 1)) + (1 - 0.75 * (1 - 0.6^(n - 1))) * log2((1 - 0.75 * (1 - 0.6^(n - 1))) / 0.25)2468101200.511.52step nbits
  • entropy H(Xₙ)
  • divergence D(μₙ ‖ μ)
Chain α = 0.1, β = 0.3 started in State 2

When does the thermodynamic statement ”H(Xn)H(X_n) monotonically increases” hold true? Only when the equilibrium state is uniform.

The Uniform Equilibrium Condition

TheoremEquivalence of Entropy Increase and Uniform Equilibrium

Let ∣X∣|\mathcal{X}| be finite and let u=[1∣X∣,…,1∣X∣]\mathbf{u} = \left[\frac{1}{|\mathcal{X}|}, \dots, \frac{1}{|\mathcal{X}|}\right] be the uniform distribution.

If u\mathbf{u} is a stationary distribution of the chain (uP=u\mathbf{u} P = \mathbf{u}), then:

H(Xn+1)≥H(Xn)H(X_{n+1}) \ge H(X_n)

for all initial distributions μ1\mu_1.

ProofConnecting KL Divergence to Shannon Entropy

Compute the relative entropy between an arbitrary distribution μn\mu_n and the uniform distribution u\mathbf{u}:

D(μn∥u)=∑x∈Xμn(x)log⁡2(μn(x)1/∣X∣)D(\mu_n \parallel \mathbf{u}) = \sum_{x \in \mathcal{X}} \mu_n(x) \log_2 \left( \frac{\mu_n(x)}{1/|\mathcal{X}|} \right) =∑x∈Xμn(x)log⁡2μn(x)+∑x∈Xμn(x)log⁡2∣X∣= \sum_{x \in \mathcal{X}} \mu_n(x) \log_2 \mu_n(x) + \sum_{x \in \mathcal{X}} \mu_n(x) \log_2 |\mathcal{X}| =−H(Xn)+log⁡2∣X∣= -H(X_n) + \log_2 |\mathcal{X}|

Rearranging:

D(μn∥u)=log⁡2∣X∣−H(Xn)D(\mu_n \parallel \mathbf{u}) = \log_2 |\mathcal{X}| - H(X_n)

If u\mathbf{u} is stationary, Corollary 2 guarantees that relative entropy decreases monotonically:

D(μn∥u)≥D(μn+1∥u)D(\mu_n \parallel \mathbf{u}) \ge D(\mu_{n+1} \parallel \mathbf{u}) log⁡2∣X∣−H(Xn)≥log⁡2∣X∣−H(Xn+1)\log_2 |\mathcal{X}| - H(X_n) \ge \log_2 |\mathcal{X}| - H(X_{n+1})

Canceling log⁡2∣X∣\log_2 |\mathcal{X}| and reversing signs:

H(Xn+1)≥H(Xn)H(X_{n+1}) \ge H(X_n)

∎

Doubly Stochastic Matrices: The Physical Mechanism

Which transition matrices admit the uniform distribution as a stationary vector?

DefinitionDoubly Stochastic Matrix

A square transition matrix PP is doubly stochastic if both its rows and its columns sum to 1:

∑j=1mPij=1for all iand∑i=1mPij=1for all j\sum_{j=1}^m P_{ij} = 1 \quad \text{for all } i \qquad \text{and} \qquad \sum_{i=1}^m P_{ij} = 1 \quad \text{for all } j

TheoremCharacterization of Uniform Equilibrium

The uniform distribution u=[1m,…,1m]\mathbf{u} = \left[\frac{1}{m}, \ldots, \frac{1}{m}\right] is a stationary distribution of PP if and only if PP is doubly stochastic:

uP=u  ⟺  ∑i=1mPij=1for all j\mathbf{u} P = \mathbf{u} \iff \sum_{i=1}^m P_{ij} = 1 \quad \text{for all } j

IntuitionConnection to Physics

In Hamiltonian mechanics, Liouville’s theorem states that microscopic phase-space volume is conserved under time evolution. In discrete models, microscopic reversibility and energy-conserving transitions force transition probabilities to be symmetric or doubly stochastic.

The thermodynamic Second Law (dS≥0dS \ge 0) does not apply to systems with arbitrary, asymmetric dissipation. It holds because microscopic physical transitions preserve volume in state space, guaranteeing a uniform equilibrium over accessible microstates on an energy shell.


Perspective 4: Conditional Uncertainty About the Future Always Increases

In a general stationary Markov chain operating at equilibrium, the marginal entropy is constant (H(Xn)=H(X1)H(X_n) = H(X_1)). Does any form of entropy increase when the system is already stationary?

Yes: your uncertainty about the future given an observation of the past increases with the time separation.

TheoremMonotonic Growth of Conditional Uncertainty

For any stationary Markov chain {Xn}\{X_n\}:

H(Xn∣X1)≥H(Xn−1∣X1)for all n≥2H(X_n \mid X_1) \ge H(X_{n-1} \mid X_1) \quad \text{for all } n \ge 2

The more steps that elapse after an initial measurement X1X_1, the less that measurement reveals about the future state XnX_n.

ProofTwo Alternative Proofs

Proof A: Via Conditioning and Stationarity

  1. Conditioning reduces entropy: Adding X2X_2 to the conditioning set can only decrease uncertainty: H(Xn∣X1)≥H(Xn∣X1,X2)H(X_n \mid X_1) \ge H(X_n \mid X_1, X_2)
  2. Apply the Markov property: Given X2X_2, the future variable XnX_n (n≥2n \ge 2) is conditionally independent of the past variable X1X_1: H(Xn∣X1,X2)=H(Xn∣X2)H(X_n \mid X_1, X_2) = H(X_n \mid X_2)
  3. Shift time by stationarity: Conditioning step nn on step 22 depends only on their time separation n−2n - 2. Shifting both indices backward by 1: H(Xn∣X2)=H(Xn−1∣X1)H(X_n \mid X_2) = H(X_{n-1} \mid X_1)

Combining these steps yields H(Xn∣X1)≥H(Xn−1∣X1)H(X_n \mid X_1) \ge H(X_{n-1} \mid X_1).


Proof B: Via the Data Processing Inequality

  1. The random variables form a valid Markov chain: X1→Xn−1→XnX_1 \to X_{n-1} \to X_n.
  2. By the Data Processing Inequality, processing cannot increase mutual information: I(X1;Xn−1)≥I(X1;Xn)I(X_1 ; X_{n-1}) \ge I(X_1 ; X_n)
  3. Expand both sides via I(X;Y)=H(Y)−H(Y∣X)I(X ; Y) = H(Y) - H(Y \mid X): H(Xn−1)−H(Xn−1∣X1)≥H(Xn)−H(Xn∣X1)H(X_{n-1}) - H(X_{n-1} \mid X_1) \ge H(X_n) - H(X_n \mid X_1)
  4. By stationarity, marginal entropies are identical: H(Xn−1)=H(Xn)H(X_{n-1}) = H(X_n). Canceling them: −H(Xn−1∣X1)≥−H(Xn∣X1)  ⟺  H(Xn∣X1)≥H(Xn−1∣X1)-H(X_{n-1} \mid X_1) \ge -H(X_n \mid X_1) \iff H(X_n \mid X_1) \ge H(X_{n-1} \mid X_1)

∎

IntuitionLoss of Memory Over Time

Even when an isolated system is stationary and its total entropy is static, initial records decohere.

  • At n=1n = 1: H(X1∣X1)=0H(X_1 \mid X_1) = 0 (perfect certainty).
  • As n→∞n \to \infty: H(Xn∣X1)→H(Xn)H(X_n \mid X_1) \to H(X_n) (the initial measurement carries zero remaining information about the state).

The system progressively forgets its history, dissipating predictive power into microscopic degrees of freedom.


Perspective 5: Independent Shuffling Never Decreases Entropy

Consider a deck of cards or an arrangement of gas molecules subjected to a random permutation.

TheoremIndependent Permutations Increase Entropy

Let XX be a random variable taking values in a finite set, and let TT be a random permutation (a shuffle) of that set. If the choice of shuffle TT is independent of the state XX, then:

H(TX)≥H(X)H(TX) \ge H(X)

Applying an independent shuffle never reduces the entropy of the system.

ProofConditioning on the Realized Shuffle

Step 1: Relate marginal entropy to conditional entropy.
Conditioning reduces entropy:

H(TX)≥H(TX∣T)H(TX) \ge H(TX \mid T)

Step 2: Expand the conditional entropy.
By definition of expectation over the realized permutations tt:

H(TX∣T)=∑tPr⁡(T=t)H(TX∣T=t)=∑tPr⁡(T=t)H(t(X))H(TX \mid T) = \sum_{t} \Pr(T = t) H(TX \mid T = t) = \sum_{t} \Pr(T = t) H(t(X))

Step 3: Bijective permutations preserve entropy.
For any deterministic, fixed permutation tt, the mapping x↦t(x)x \mapsto t(x) is a bijection (one-to-one and onto). A deterministic invertible relabeling preserves entropy exactly:

H(t(X))=H(X)H(t(X)) = H(X)

Step 4: Factor the sum.

H(TX∣T)=∑tPr⁡(T=t)H(X)=H(X)∑tPr⁡(T=t)=H(X)H(TX \mid T) = \sum_{t} \Pr(T = t) H(X) = H(X) \sum_{t} \Pr(T = t) = H(X)

Combining Step 1 and Step 4:

H(TX)≥H(X)H(TX) \ge H(X)

∎

IntuitionWhy the Independence Condition Matters

The assumption that TT is independent of XX is essential:

  • If the shuffler is blind (independent): They cannot inspect the deck. Each deterministic permutation preserves entropy, but uncertainty over which permutation was chosen averages distributions together, which can only dilute concentration and increase uncertainty (H(TX)≥H(X)H(TX) \ge H(X)).
  • If the shuffler looks at the deck (dependent): A player who sees that the deck is disordered can deliberately sort the cards back into numerical order (T=X−1T = X^{-1}), driving the entropy to H(TX)=0H(TX) = 0.

This is Maxwell’s Demon in information-theoretic terms: lowering the entropy of a system requires feedback conditioned on measurement. Blind, uncoordinated physical perturbations act as doubly stochastic mixtures that monotonically increase entropy.


Functions of a Markov Chain: The Incomplete Observation Problem

The Physical Scenario:
In real-world engineering, you rarely observe the physical Markov chain directly. An observer or wiretap typically sees only a filtered or degraded projection:

  • A sensor records voltage as simply “HIGH” or “LOW”, concealing which of 16 distinct internal circuits produced the signal.
  • An intercept on a telegraph wire groups symbols into broad categories (e.g., Vowel vs. Consonant), masking the exact letter typed.

Mathematically, let {Xi}i=1∞\{X_i\}_{i=1}^\infty be a stationary Markov chain over state space X\mathcal{X}. We observe the sequence {Yi}i=1∞\{Y_i\}_{i=1}^\infty defined by a deterministic mapping:

Yi=ϕ(Xi)Y_i = \phi(X_i)

where ϕ:X→Y\phi: \mathcal{X} \to \mathcal{Y} is generally a many-to-one function.

What is the entropy rate H(Y)H(\mathcal{Y}) of the observed sequence?


The Fundamental Obstacle: YY Is Not a Markov Chain

If {Yi}\{Y_i\} were also a Markov chain, calculating its entropy rate would be trivial: we would just solve for its stationary distribution and compute H(Y2∣Y1)H(Y_2 \mid Y_1).

However, a function of a Markov chain is almost never Markovian:

  • When the function ϕ\phi collapses multiple underlying states into the same observed symbol (e.g., ϕ(State 1)=ϕ(State 2)=A\phi(\text{State } 1) = \phi(\text{State } 2) = A), seeing Yn=AY_n = A leaves you uncertain about whether the machine is in State 1 or State 2.
  • To disambiguate which state the system actually occupies at step nn, you must look further into the past: Yn−1,Yn−2,Yn−3,…Y_{n-1}, Y_{n-2}, Y_{n-3}, \dots
  • Because collapsing states introduces unbounded memory, the observation YnY_n depends on symbols in the arbitrarily distant past.

Because {Xi}\{X_i\} is stationary, {Yi=ϕ(Xi)}\{Y_i = \phi(X_i)\} is also strictly stationary. Its entropy rate exists and is given by the streaming limit:

H(Y)=lim⁡n→∞H(Yn∣Yn−1,…,Y1)H(\mathcal{Y}) = \lim_{n \to \infty} H(Y_n \mid Y_{n-1}, \ldots, Y_1)


Why Naive Computation Fails: The Slow Convergence Trap

A naive engineer might calculate H(Yn∣Yn−1,…,Y1)H(Y_n \mid Y_{n-1}, \dots, Y_1) for n=1,2,3,…n = 1, 2, 3, \dots and stop when the difference between consecutive steps becomes small:

∣H(Yn+1∣Yn)−H(Yn∣Yn−1)∣<ϵ|H(Y_{n+1} \mid Y^n) - H(Y_n \mid Y^{n-1})| < \epsilon

This stopping criterion is mathematically invalid.
The sequence can converge arbitrarily slowly. The gap between successive terms can shrink to nearly zero while the sequence itself remains miles away from the true limit, analogous to the harmonic series ∑1n\sum \frac{1}{n}, whose terms drop below 0.00010.0001 even though the running sum diverges to infinity.

A single sequence converging from above gives you no certified error bounds.


The Solution: Squeezing the Rate Between Upper and Lower Brackets

To compute H(Y)H(\mathcal{Y}) with guaranteed numerical precision, we construct two simultaneous bounds:

  1. An upper bound that decreases monotonically toward H(Y)H(\mathcal{Y}).
  2. A lower bound that increases toward H(Y)H(\mathcal{Y}).

When the upper and lower bounds close to within a user-specified tolerance ϵ\epsilon, the algorithm halts with a mathematically certified answer.

Upper Bound: H(Yn | Y_{n-1}, ..., Y_1)
---> Squeezes to H(𝒴)
Lower Bound: H(Yn | Y_{n-1}, ..., Y_1, X_1) /

Deriving the Lower Bound: The Hidden State Shortcut

We already know that the standard conditional entropy H(Yn∣Yn−1,…,Y1)H(Y_n \mid Y_{n-1}, \dots, Y_1) approaches H(Y)H(\mathcal{Y}) from above by the Monotonicity Lemma.

To build a lower bound, we hand the estimator a major advantage: the true initial underlying state X1X_1.

LemmaThe Lower Bound Lemma

For any n≥1n \ge 1:

H(Yn∣Yn−1,…,Y1,X1)≤H(Y)H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1) \le H(\mathcal{Y})

IntuitionWhy Handing Over X1X_1 Underestimates Uncertainty

Conditioning reduces entropy: the more context you provide, the lower your uncertainty.

By the Markov property, knowing the underlying state X1X_1 completely screens off everything that occurred before time 1. Handing the estimator the exact state X1X_1 gives it more predictive power than knowing the entire infinite prehistory of observations (Y0,Y−1,Y−2,… )(Y_0, Y_{-1}, Y_{-2}, \dots).

Because this estimator has access to superhuman context (an exact uncollapsed microstate), its remaining uncertainty about YnY_n is strictly lower than the true entropy rate H(Y)H(\mathcal{Y}).

ProofFormal Proof of the Lower Bound

We trace this inequality for any finite historical depth k≥1k \ge 1:

H(Yn∣Yn−1,…,Y1,X1)H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1)

(a) Add the redundant observation Y1Y_1: Since Y1=ϕ(X1)Y_1 = \phi(X_1) is a deterministic function of X1X_1, conditioning on it adds zero new information: =H(Yn∣Yn−1,…,Y1,X1)= H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1)

(b) Add the unobserved microscopic past (X0,X−1,…,X−k)(X_0, X_{-1}, \dots, X_{-k}): By the Markov property of the underlying chain, conditioned on the state X1X_1, the future YnY_n is conditionally independent of all ancient states prior to time 1: =H(Yn∣Yn−1,…,Y1,X1,X0,X−1,…,X−k)= H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1, X_0, X_{-1}, \ldots, X_{-k})

(c) Add the ancient observed symbols (Y0,Y−1,…,Y−k)(Y_0, Y_{-1}, \dots, Y_{-k}): Each Y−j=ϕ(X−j)Y_{-j} = \phi(X_{-j}) is already fully determined by the states in the conditioning set: =H(Yn∣Yn−1,…,Y1,X1,X0,…,X−k,Y0,…,Y−k)= H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1, X_0, \ldots, X_{-k}, Y_0, \ldots, Y_{-k})

(d) Trade hidden states for observed history: Applying the principle that conditioning reduces entropy, discarding the underlying hidden states (X1,X0,…,X−k)(X_1, X_0, \dots, X_{-k}) can only increase or leave unchanged the remaining uncertainty: ≤H(Yn∣Yn−1,…,Y1,Y0,…,Y−k)\le H(Y_n \mid Y_{n-1}, \ldots, Y_1, Y_0, \ldots, Y_{-k})

(e) Shift time indices by Stationarity: Shift all indices forward by k+1k + 1 time steps: =H(Yn+k+1∣Yn+k,…,Y1)= H(Y_{n+k+1} \mid Y_{n+k}, \ldots, Y_1)

Because this chain of steps holds for every integer k≥1k \ge 1, it must hold in the limit as k→∞k \to \infty:

H(Yn∣Yn−1,…,Y1,X1)≤lim⁡k→∞H(Yn+k+1∣Yn+k,…,Y1)=H(Y)H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1) \le \lim_{k \to \infty} H(Y_{n+k+1} \mid Y_{n+k}, \ldots, Y_1) = H(\mathcal{Y})

∎


Proving the Bracket Closes: The Vanishing Information Gap

We now have our two bounds: H(Yn∣Yn−1,…,Y1,X1)  ≤  H(Y)  ≤  H(Yn∣Yn−1,…,Y1)H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1) \;\le\; H(\mathcal{Y}) \;\le\; H(Y_n \mid Y_{n-1}, \ldots, Y_1)

Does the gap between them actually shrink to zero as nn grows?

LemmaThe Bracket Closes

The difference between the upper and lower bounds converges strictly to zero:

lim⁡n→∞[H(Yn∣Yn−1,…,Y1)−H(Yn∣Yn−1,…,Y1,X1)]=0\lim_{n \to \infty} \left[ H(Y_n \mid Y_{n-1}, \ldots, Y_1) - H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1) \right] = 0

ProofThe Finite Budget Argument via Mutual Information

Step 1: Express the gap as a Conditional Mutual Information.
Using the standard identity H(A∣B)−H(A∣B,C)=I(C;A∣B)H(A \mid B) - H(A \mid B, C) = I(C ; A \mid B):

H(Yn∣Yn−1)−H(Yn∣Yn−1,X1)=I(X1;Yn∣Yn−1,…,Y1)H(Y_n \mid Y^{n-1}) - H(Y_n \mid Y^{n-1}, X_1) = I(X_1 ; Y_n \mid Y_{n-1}, \ldots, Y_1)

Closing the bracket requires proving that this conditional mutual information vanishes as n→∞n \to \infty.

Step 2: Apply the Chain Rule for Mutual Information.
The total information shared between the initial state X1X_1 and the entire observation block Yn=(Y1,…,Yn)Y^n = (Y_1, \ldots, Y_n) decomposes into a telescoping sum:

I(X1;Y1,…,Yn)=∑i=1nI(X1;Yi∣Yi−1,…,Y1)I(X_1 ; Y_1, \ldots, Y_n) = \sum_{i=1}^n I(X_1 ; Y_i \mid Y_{i-1}, \ldots, Y_1)

Step 3: Bound by the finite entropy of X1X_1.
Mutual information can never exceed the Shannon entropy of either participating variable:

∑i=1nI(X1;Yi∣Yi−1,…,Y1)=I(X1;Y1,…,Yn)≤H(X1)\sum_{i=1}^n I(X_1 ; Y_i \mid Y_{i-1}, \ldots, Y_1) = I(X_1 ; Y_1, \ldots, Y_n) \le H(X_1)

Step 4: Conclude from convergence of infinite series.
Because each conditional mutual information term is non-negative (I≥0I \ge 0), the partial sums form a monotonically increasing sequence bounded above by the finite number H(X1)<∞H(X_1) < \infty.

Therefore, the infinite series converges:

∑i=1∞I(X1;Yi∣Yi−1,…,Y1)≤H(X1)<∞\sum_{i=1}^\infty I(X_1 ; Y_i \mid Y_{i-1}, \ldots, Y_1) \le H(X_1) < \infty

For any convergent series ∑ai<∞\sum a_i < \infty, the individual terms must vanish to zero:

lim⁡n→∞I(X1;Yn∣Yn−1,…,Y1)=0\lim_{n \to \infty} I(X_1 ; Y_n \mid Y_{n-1}, \ldots, Y_1) = 0

∎

IntuitionThe Finite Information Budget

The initial state X1X_1 contains a strictly finite reservoir of surprise: at most H(X1)H(X_1) bits.

As you observe more outputs Y1,Y2,…,YnY_1, Y_2, \dots, Y_n, each new observation siphons off a tiny fraction of that initial information budget. Because the total budget is finite, the amount of new information X1X_1 can provide about YnY_n must dwindle to zero.

Eventually, the historical record of YY‘s has told you everything it is ever going to tell you about X1X_1, and explicitly knowing X1X_1 stops providing any predictive advantage.


The Master Theorem and Computational Implementation

TheoremCertified Sandwich Theorem for Functions of a Markov Chain

Let {Xi}\{X_i\} be a stationary Markov chain and let Yi=ϕ(Xi)Y_i = \phi(X_i). For every block length n≥1n \ge 1:

H(Yn∣Yn−1,…,Y1,X1)  ≤  H(Y)  ≤  H(Yn∣Yn−1,…,Y1)H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1) \;\le\; H(\mathcal{Y}) \;\le\; H(Y_n \mid Y_{n-1}, \ldots, Y_1)

Furthermore, both bounds converge monotonically to the exact entropy rate:

lim⁡n→∞H(Yn∣Yn−1,…,Y1,X1)=H(Y)=lim⁡n→∞H(Yn∣Yn−1,…,Y1)\lim_{n \to \infty} H(Y_n \mid Y_{n-1}, \ldots, Y_1, X_1) = H(\mathcal{Y}) = \lim_{n \to \infty} H(Y_n \mid Y_{n-1}, \ldots, Y_1)

How an Engineer Computes H(Y)H(\mathcal{Y}) in Practice

  1. Fix a desired numerical precision ϵ>0\epsilon > 0 (e.g., 0.001 bits0.001\text{ bits}).
  2. For n=1,2,3,…n = 1, 2, 3, \dots, evaluate: Un=H(Yn∣Yn−1),Ln=H(Yn∣Yn−1,X1)U_n = H(Y_n \mid Y^{n-1}), \qquad L_n = H(Y_n \mid Y^{n-1}, X_1)
  3. Compute the certified error bracket: Δn=Un−Ln\Delta_n = U_n - L_n
  4. Halt when Δn<ϵ\Delta_n < \epsilon. The midpoint Un+Ln2\frac{U_n + L_n}{2} is guaranteed to be within ϵ2\frac{\epsilon}{2} of the true entropy rate H(Y)H(\mathcal{Y}).

Extension: Hidden Markov Models (HMMs)

A deterministic function Yi=ϕ(Xi)Y_i = \phi(X_i) represents a clean, noiseless projection. In many physical systems, the observation is corrupted by channel noise:

DefinitionHidden Markov Model (HMM)

A Hidden Markov Model consists of an underlying stationary Markov chain {Xi}\{X_i\} and an observed output sequence {Yi}\{Y_i\}, where each observation YiY_i is emitted through a memoryless noisy channel governed by transition probabilities p(yi∣xi)p(y_i \mid x_i):

p(xn,yn)=p(x1)∏i=1n−1p(xi+1∣xi)∏i=1np(yi∣xi)p(x^n, y^n) = p(x_1) \prod_{i=1}^{n-1} p(x_{i+1} \mid x_i) \prod_{i=1}^n p(y_i \mid x_i)

flowchart LR
  X1["X₁"] --> X2["X₂"] --> X3["X₃"] --> X4["..."]
  X1 --> Y1["Y₁"]
  X2 --> Y2["Y₂"]
  X3 --> Y3["Y₃"]
  X4 --> Y4["..."]

Application to the Telegraph Model

  • The Underlying State XiX_i: The telegraph operator’s mental state, intent, and grammatical context (a clean Markov chain).

  • The Emission YiY_i: The corrupted, noisy electrical pulse received across hundreds of miles of copper cable.

Because conditioning on X1X_1 still screens off all ancient emissions prior to step 1, the identical sandwich theorem applies:

H(Yn∣Yn−1,…,Y1,X1)≤H(Y)≤H(Yn∣Yn−1,…,Y1)H(Y_n \mid Y_{n-1}, \dots, Y_1, X_1) \le H(\mathcal{Y}) \le H(Y_n \mid Y_{n-1}, \dots, Y_1)

The entropy rate of an HMM can be computed to arbitrary precision using the exact same bracketing algorithm.


Quick reference

ObjectStatementReads as
StationaryPr⁡{X1=x1,…}=Pr⁡{X1+l=x1,…}\Pr\{X_1 = x_1, \ldots\} = \Pr\{X_{1+l} = x_1, \ldots\}The source’s statistics don’t drift.
Markovp(xn+1∣xn,…,x1)=p(xn+1∣xn)p(x_{n+1} \mid x_n, \ldots, x_1) = p(x_{n+1} \mid x_n)Dependence reaches back one step.
Stationary distributionμj=∑iμiPij\mu_j = \sum_i \mu_i P_{ij}The occupancy that reproduces itself.
Entropy rate (average)H(X)=lim⁡1nH(X1,…,Xn)H(\mathcal{X}) = \lim \frac{1}{n} H(X_1, \ldots, X_n)Accounting price per symbol.
Entropy rate (marginal)H′(X)=lim⁡H(Xn∣Xn−1,…,X1)H'(\mathcal{X}) = \lim H(X_n \mid X_{n-1}, \ldots, X_1)Price of the next symbol given the past.
EqualityH(X)=H′(X)H(\mathcal{X}) = H'(\mathcal{X}) for stationary processesThe two prices agree.
Markov rateH(X)=H(X2∣X1)=−∑ijμiPijlog⁡PijH(\mathcal{X}) = H(X_2 \mid X_1) = -\sum_{ij} \mu_i P_{ij} \log P_{ij}Row entropies weighted by occupancy.
Two-state chainβα+βH(α)+αα+βH(β)\frac{\beta}{\alpha+\beta}H(\alpha) + \frac{\alpha}{\alpha+\beta}H(\beta)-
Weighted walkH({Wij/2W})−H({Wi/2W})H(\{W_{ij}/2W\}) - H(\{W_i/2W\})Edge entropy minus node entropy.
Unweighted walklog⁡(2E)−H(E1/2E,…,Em/2E)\log(2E) - H(E_1/2E, \ldots, E_m/2E)-
Second lawD(μn∥μn′)≥D(μn+1∥μn+1′)D(\mu_n \Vert \mu'_n) \ge D(\mu_{n+1} \Vert \mu'_{n+1})Relative entropy always drops; plain entropy need not rise.
Function of a chainH(Yn∣Yn−1,X1)≤H(Y)≤H(Yn∣Yn−1)H(Y_n \mid Y^{n-1}, X_1) \le H(\mathcal{Y}) \le H(Y_n \mid Y^{n-1})Two-sided computable bracket.

Identities and conditions to keep to hand:

  • Stationarity gives index shifting; Markovity gives conditioning-set truncation; conditioning reduces entropy gives every inequality in this note. Almost every proof here is some combination of those three.
  • Irreducible ++ aperiodic ⇒\Rightarrow unique stationary distribution, reached from any start.
  • Uniform stationary distribution   ⟺  \iff doubly stochastic PP   ⟺  \iff entropy genuinely increases.
  • ∑iWi=2W\sum_i W_i = 2W for an undirected graph (each edge counted at both endpoints).
  • Entropy rate is well defined for all stationary processes; the typical-set/AEP extension additionally needs ergodicity.

References

← All notes