Entropy Rates of a Stochastic Process
- 01Tractability assumptionsaccount for grammar between symbols, collapsing parameters with stationarity and Markov chains
- 02Entropy rate viewsthe per-symbol average equals the conditional rate, plus a generalized AEP
- 03Closed form for entropy ratederiving the entropy rate formula for a Markov chain
- 04Second law of thermodynamicsrelative entropy between initial states contracts monotonically under a Markov chain
- 05Functions of a Markov chainthe output stream's entropy rate, found by sandwiching it between bounds
Motivation: the operator has grammar
The AEP established that bits suffice on average to losslessly encode 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 beingUis virtually . AfterTH, the vowelEappears far more frequently than pure chance. - Keystrokes are temporally correlated: The current letter is heavily conditioned on the historical sequence that preceded it: .
Because the physical source violates independence, our naive i.i.d. formula 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 still grow linearly with sequence length ?
- If it does grow linearly: The telegraph operator has a well-defined asymptotic “bits per keystroke” metric: 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 .
- 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 , and the asymptotic entropy rate of an entire stochastic process by (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 is an indexed sequence of random variables defined over a common alphabet .
In general, the random variables may exhibit arbitrary historical dependence. The process is fully specified by the consistent family of joint probability mass functions:
| Component | Detail |
|---|---|
| Physical Model | The operator’s ongoing tape: represents the symbol sent on the -th keystroke. |
| Statistical Complexity | An i.i.d. source over alphabet is completely fixed by just numbers (since ). In contrast, an arbitrary process has unbounded memory: specifying a block of length requires independent parameters, and describing the process across all lengths requires infinitely many parameters (). 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 is stationary (in the strict sense) if the joint probability distribution of any block of symbols is completely invariant under time shifts:
for every block length , every integer time shift , and all choices of .
IntuitionWhat Stationarity Means (Why Stationarity Independence)
A common point of confusion is thinking that when , stationarity implies independence. They are completely different concepts:
-
Independence means symbols do not affect each other: (Knowing the past tells you nothing about the future.)
-
Stationarity means the clock doesn’t change the statistical blueprint: (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.
- Extreme Dependence: If you see , you know with certainty that . The keystrokes are totally locked together, independence is completely violated.
- Strict Stationarity:
- For any single keystroke , and .
- For any adjacent pair, the block
10occurs with probability at positions , at positions , and at positions .
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:
- An operator who starts a shift alert and follows strict grammar, but becomes fatigued and begins making frequent typographical errors.
- 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 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 at a specific starting position requires parameters. Because the distribution could drift at every single point in time, describing blocks of length across all possible starting positions requires a fresh set of parameters for every shift. Stationarity collapses all these identical time-shifted blocks into a single joint distribution:
- What stationarity buys us: The distribution of an -gram depends only on its length , not on when it is typed. You only need one set of parameters for length , rather than a different set for every time index .
- The remaining problem: As the block length grows, the number of required parameters still explodes exponentially. Stationarity prevents the grammar from mutating over time, but it still permits infinite memory depth, the -th symbol can still depend in intricate ways on all past symbols.
Markov Chains: Finite Memory
Stationarity eliminates time drift, but still allows dependence to reach arbitrarily far into the past (e.g., depending on every single character back to ).
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 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:
for all and all states .
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 -character sequence collapses into a simple telescoping product:
FormulaFactorization of a Markov Chain
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 :
(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 is not set to the stationary equilibrium , causing early marginal probabilities to drift).
NoteParameter Collapse: From Exponential Explosion to a Fixed Matrix
While stationarity alone still left an exponential burden of parameters for a block of length , 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:
- Initial distribution: Choosing requires parameters (since probabilities across the states sum to 1).
- Transition matrix : The matrix has rows. Because each row is an independent probability vector summing to 1, each row contributes degrees of freedom. Across all rows, this requires parameters.
-
The Total Cost: Describing the process across all possible sequence lengths collapses to: (Furthermore, if the chain is already running in its stationary distribution, the initial state distribution is fixed by , leaving strictly parameters).
The Engineering Consequence
For a 26-letter alphabet () across a short message of keystrokes:
- A general stationary model requires numbers, vastly exceeding the capacity of any real-world storage system.
- A first-order Markov model requires at most numbers.
The Markov property therefore tames the statistical complexity problem we had, converting a parameter space that scaled exponentially with time horizon () into a fixed footprint that is independent of ().
The Probability Transition Matrix
A time-invariant Markov chain on a finite alphabet is completely characterized by two objects:
- An initial distribution vector .
- An transition probability matrix , defined entrywise as:
| Structural Property | Mathematical Meaning | Physical Interpretation |
|---|---|---|
| Matrix Dimensions | Row = current state; Column = destination state. | |
| Row Stochasticity | Every row represents a valid probability mass function over the next possible keystroke given that the current keystroke was . | |
| Asymmetry | in general | Typing U after Q is near , but typing Q after U is extremely rare. |
| Column Sums | in general | Columns do not generally sum to . 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:
- The transition rules (): The fixed rules of how you move from one keystroke to the next (e.g., “if you are at
Q, you go toUwith probability ”). - The marginal distribution at step (): The actual probability of being at each letter on the -th keystroke:
What It Means for “Marginals to Drift”
Even if the transition rules never change from minute to minute, your probability of being in state on keystroke typically changes as the chain runs.
By the law of total probability, the distribution at step is obtained by multiplying the distribution at step by the transition matrix:
-
An example:
Suppose our alphabet is just two states: .
The operator transitions between them with matrix :- If Awake: chance to stay Awake, chance to fall Asleep.
- If Asleep: chance to wake up, chance to stay Asleep.
Now, look at what happens depending on how the day begins:
- At step 1 (): Suppose the operator starts Awake: .
- At step 2 (): .
- At step 3 (): .
- At step 4 (): .
Notice that , but , and .
Because , the single-symbol probabilities drift over time. Thus, even though the transition rules are completely constant, the process is not stationary yet during this warm-up phase.
The Equilibrium / Stationary Distribution ()
If you let the system run for many steps (), the distribution eventually settles into a steady-state equilibrium where it stops changing. We call this fixed probability vector (mu):
It satisfies the balance equation:
In our Awake/Asleep example, solving yields .
Once the operator hits this exact distribution:
The probabilities of being Awake or Asleep become completely identical for every subsequent step on the tape ().
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:
- The arbitrary starting distribution ( parameters).
- The transition matrix ( parameters).
- If the process is stationary: The chain must already be running in its stationary distribution from step 1 (). But is not an independent choice, it is mathematically forced by the eigenvector equation . Because is completely determined by , you do not need to measure or store a separate initial state vector. Specifying automatically specifies the entire process, leaving strictly parameters.
NoteThe Intuitive Meaning of : Global Frequencies vs. Local Grammar
Two questions naturally arise once the state distribution settles to :
- What does physically represent for a message stream?
- Does settling to a fixed distribution mean the symbols become independent (i.i.d.)?
The Two Faces of (Snapshot vs. Lifetime Average)
In an ergodic process, the vector represents two mathematically equivalent properties:
-
The Snapshot Probability (Ensemble View):
Because , is the unconditional probability of landing on symbol at keystroke once the initial starting bias has washed out: -
The Lifetime Frequency (Trajectory View):
By the Ergodic Theorem, the empirical proportion of symbol across a single long tape of characters converges almost surely to that exact same number:
For English, gives the familiar global letter distribution (, , ). 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 Does NOT Make the Source i.i.d
Having constant marginals ( and ) does not mean the keystrokes have become independent draws:
-
Unconditioned View (Blinders on): If you inspect keystroke in isolation without looking at the preceding character, the probability of seeing
Uis simply its baseline language frequency: -
Conditional View (Reading the tape): If you uncover the prior keystroke and see , the transition rule completely overrides the baseline: >
The Takeaway: describes the static composition of the overall message stream, while 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 as they were at keystroke .
Structural Conditions: Guaranteeing Long-Term Convergence
In our earlier Awake/Asleep example, the distribution relaxed smoothly toward . 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:
- Disconnected islands (Reducibility): The state space splinters into separate traps.
- 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 , there exists some integer such that:
- Aperiodic: The greatest common divisor () of the return times to any state is 1: (If a state can only be revisited at multiples of 2, 3, or more steps, it is periodic with period ).
IntuitionCounterexamples: What Breaks When These Fail?
1. What Happens If a Chain Is Reducible? (Multiple Conflicting Equilibria)
Imagine a 3-letter typewriter with states and transition rules:
- always loops to ().
- always loops to ().
- flips a coin: to , to .
(A) ⟲ 1.0 (B) ⟲ 1.0 ▲ ▲ \ 0.5 / 0.5 \ / (C)- Why it is reducible: You can go from , but once in , you can never reach or . The graph has absorbing traps.
- Why convergence fails: If the operator starts in , they stay in forever (). If they start in , they stay in forever (). 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 that switches on every tick with certainty:
- (from , you must go to )
- (from , you must go to )
1.0 (0) ------> (1) ▲ | |___________| 1.0- Why it is irreducible: State reaches , and reaches .
- Why it is periodic: You can only return to in steps. The return times are all multiples of 2 ().
- Why convergence fails: If the machine starts at state (): The marginal distribution never settles down, it bounces between and forever! The limit does not exist.
- What aperiodicity guarantees: The transition graph has irregular path lengths (or self-loops like ), adding enough timing “jitter” to wash out synchronized oscillations so the probabilities diffuse smoothly into a fixed value.
How Convergence to Yields a Stationary Process
A key question remains: if our machine starts with an arbitrary distribution , 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 . Furthermore, for any starting vector :
Here is what this means for stationarity in practice:
- The Warm-up Phase (Transient Non-Stationarity):
If the operator turns on the machine in state (), the probabilities of early symbols drift as the system runs: Because , the process is initially non-stationary. - The Stationary Regime (After Warm-up):
Because convergence is exponential, after a short burn-in period of keystrokes, the state distribution reaches . From that moment onward: Not only are all subsequent single-symbol probabilities identical (), but all block probabilities become completely invariant to time shifts: - The Engineering Shortcut:
If the telecom system initializes the transmitter by drawing the very first symbol directly from (), the warm-up phase is eliminated entirely: the chain is strictly stationary from keystroke 1.
Analytical Tool: Solving for the Stationary Distribution
To find the equilibrium distribution , we must solve the vector equation:
subject to the normalization constraint .
In standard linear algebra, you write this out as a system of simultaneous equations:
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 .
- A transition is a one-way pipe from reservoir to reservoir that drains a fraction of reservoir ‘s contents at each tick of the clock.
- The total volume of water flowing from reservoir into reservoir in one step is called the probability flow:
If the system has reached a stable equilibrium (the water levels 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 and group . 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:
This is the cut-balance equation. Instead of solving 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 and :
stateDiagram-v2 direction LR S1: State 1 S2: State 2 S1 --> S2: α S2 --> S1: β S1 --> S1: 1 - α S2 --> S2: 1 - β
The transition matrix is:
(Assuming , both states communicate and have self-loops , guaranteeing the chain is irreducible and aperiodic).
Calculating Using Flow Balance
Instead of setting up matrix algebra, draw an imaginary boundary between State 1 and State 2:
-
State 1 holds probability mass , and each step sends fraction over to State 2:
-
State 2 holds probability mass , and each step sends fraction back to State 1:
For equilibrium to hold, the rate of people switching from must equal the rate of people switching from :
Since the probabilities must sum to 1 ():
If we initialize the machine with , the process is strictly stationary from step 1 onward.
The Marginal Uncertainty
At any isolated single step , the single-symbol uncertainty is simply the binary entropy of its marginal distribution:
Warning Is NOT the Entropy Rate!
A frequent mistake is reasoning: “Since the process is stationary, every symbol has uncertainty , so a block of symbols must carry joint entropy .”
That logic applies only to independent (i.i.d.) sources.
For a dependent source:
- measures your uncertainty before you look at the tape.
- For the second keystroke , knowing gives you predictive clues via the transition matrix .
- By the conditioning theorem (), 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 , but the conditional branch uncertainty . 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 correlated keystrokes on a telegraph line, how does the total uncertainty grow as the message lengthens?
An engineer pricing bandwidth or budgeting memory buffers faces two natural perspectives:
- The Amortized (Accounting) View: “Send a block of length , measure its total joint entropy, and divide by .”
- 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
The per-symbol entropy rate of a stochastic process is the asymptotic average joint entropy per character:
(provided the limit exists).
DefinitionConditional Entropy Rate
The conditional entropy rate of a stochastic process is the asymptotic uncertainty of the next keystroke given the entire infinite past:
(provided the limit exists).
| Perspective | ||
|---|---|---|
| What It Measures | The average uncertainty per symbol across the entire block of length . | The residual surprise of the last symbol conditioned on the full historical context. |
| Physical Intuition | An 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 Application | Batch 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 and the streaming marginal rate actually behave, we walk through three cases designed to answer three distinct architectural questions:
- The Upper Bound: What is the maximum possible entropy rate an alphabet of size can physically produce?
Example1. The Maximum-Uncertainty Baseline (Pure Uniform Noise)
Question answered: What is the maximum information density of an alphabet of size ?
An operator types on a keyboard of symbols where every keypress is drawn independently and uniformly at random ().
-
The Batch View :
There are equally likely sequences of length , each occurring with probability : -
The Streaming View :
Because keystrokes are independent, past history gives zero clues about the future ( is independent of ):
Takeaway: Both definitions match perfectly at . This is the absolute physical ceiling for any discrete source on alphabet .
- 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 (for example, typing 1 with and 0 with ), but each stroke is drawn independently with no grammar.
-
The Batch View :
Independence factors joint entropy into an unweighted sum: -
The Streaming View :
Conditioning on past keystrokes drops out because older keystrokes provide zero information:
Takeaway: . The general process rate naturally generalizes our earlier single-symbol entropy.
- 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, ): The machine flips a fair coin (). Every symbol yields of surprise.
- Epoch B (Pure Silence, ): The machine gets stuck on
1with certainty (). Every symbol yields of surprise.
Now, how do we make the running average fail to settle on a limit?
- Run in Epoch A long enough that the average entropy creeps up to .
- Switch to Epoch B (). To drag a running average from down to , 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.
- Once the running average plunges down to , switch back to Epoch A (). To pull the average back up to , 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 and 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:
- The Batch Rate : The running average oscillates perpetually between and . The limit does not exist.
- The Marginal Rate : Because the symbols are independent, . As steps across epoch boundaries, the marginal surprise jumps abruptly between and . The limit 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 , both limits exist and are strictly equal:
That is:
To prove this theorem rigorously, we establish two preliminary steps:
- The conditional surprise sequence is monotonically decreasing and bounded below (so it must converge).
- 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 is non-increasing in :
and converges to a non-negative limit .
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 from the conditioning set can only increase uncertainty:
Step 2: Apply Stationarity (Shift Invariance).
The right-hand side conditions the variable at index on the variables directly preceding it ( through ). By stationarity, the joint distribution of any block is invariant under an arbitrary time shift . Shifting all indices backward by :
Step 3: Establish Convergence.
Combining Steps 1 and 2 yields:
The sequence is non-increasing. Because discrete entropy is non-negative (), the sequence is bounded below. By the monotone convergence theorem of real analysis, the limit 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 converges to a limit (), then its sequence of arithmetic means (running averages) also converges to :
ProofStandard - Epsilon-Delta Split
Let . Because , there exists an integer such that for all .
Splitting the difference of the running average:
The first sum is a fixed finite constant that does not grow with . For the second sum, each of the terms is strictly smaller than :
Taking , the transient fraction , leaving . Since is arbitrary, .
∎
ProofBringing It Together: Proving
Step 1: Expand joint entropy using the Chain Rule.
By the chain rule for entropy, the joint uncertainty of an -character block decomposes into the sum of successive conditional increments:
(with the base convention ).
Step 2: Divide by block length .
The amortized per-symbol entropy is the exact Cesàro mean of the sequence of marginal conditional surprises .
Step 3: Pass to the limit.
By the Monotonicity Lemma, the sequence converges to . By the Cesàro Mean Lemma, the average of these terms converges to that exact same limit:
∎
For a concrete picture, take the stationary two-state chain with , (so , worked out below). The first symbol costs bits, and every later one costs bits. The running average starts at the first value and creeps down to the second like :
- H(X₁), what an i.i.d. code would pay
- running average (1/n) H(Xⁿ)
- conditional H(Xₙ | Xⁿ⁻¹) for n ≥ 2
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 is stationary and ergodic, then the empirical sample entropy converges almost surely (with probability 1) to the true entropy rate:
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:
- Equipartition Holds: Out of possible sequences of length , the overwhelming probability mass () concentrates onto a typical set of size roughly:
- Universal Uniform Probability: Every typical sequence within this set has approximately identical likelihood:
- The Compression Floor: You can losslessly compress any stationary ergodic source down to an average rate of bits per symbol, and not a single bit lower. Grammar, correlation, and predictability lower the entropy rate (), 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 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:
Each equals sign performs an exact structural role:
- Equality of the Rates: The foundational theorem established that the amortized rate equals the streaming rate for any stationary source.
- The Markov Memory Cutoff: The next state depends only on the current state. Conditioning on contributes nothing further:
- Time-Invariance and Stationarity: Because transition probabilities are constant across time and the chain operates in its stationary distribution , the conditional uncertainty is identical for every adjacent pair on the tape:
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 .
The Closed-Form Formula
TheoremEntropy Rate of a Stationary Markov Chain
Let be a stationary Markov chain with transition probability matrix and unique stationary distribution . The entropy rate is given by:
ProofExpanding the Conditional Entropy
By definition of conditional entropy between two random variables:
- In stationarity, the state occupancy probability is .
- The conditional distribution of the next symbol given is precisely row of the transition matrix: .
- The entropy of that specific outgoing row is:
Substituting these pieces into the expectation yields:
∎
IntuitionReading the Formula as an Operating Machine
Look at the two pieces of the formula:
- The inner bracket: When the operator currently sits on key , how unpredictable is their next keystroke? That is simply the Shannon entropy of row in matrix .
- The outer weight : Over an infinitely long shift, what fraction of their typing time is spent on key ?
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 (switch ) and (switch ):
From our earlier cut-balance derivation, the stationary distribution is:
Step 1: Compute the Branch Entropies (Row Entropies)
- Row 1: From State 1, the key stays in State 1 with probability and hops to State 2 with probability :
- Row 2: From State 2, the key hops to State 1 with probability and stays in State 2 with probability :
Step 2: Weight by the Stationary Occupancy
Multiplying each row entropy by the fraction of time spent in that state:
The Redundancy Gap: Marginal Uncertainty vs. Entropy Rate
Now compare the two values side-by-side:
| Metric | Formula | Physical Interpretation |
|---|---|---|
| Marginal State Entropy | The uncertainty of an observer who inspects a single isolated keystroke on the tape with zero knowledge of prior context. | |
| Entropy Rate | The actual bits generated per keystroke when the observer tracks the preceding character. |
Because conditioning never increases entropy (), we have:
with strict inequality unless (the special condition where rows are identical, making the sequence memoryless/i.i.d.).
IntuitionWhat Means Physically: The Death of Memory
Look at the transition matrix when :
- Both rows become identical:
- If you are currently in State 1, the probability of going to State 2 is .
- If you are currently in State 2, the probability of going to State 2 is also .
- The previous symbol carries zero information:
Knowing whether the operator just typed a or a gives you no predictive advantage whatsoever. The conditioning collapses: .
Why asymmetry () doesn’t create memory:
Even if and (so ), 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 to zero.
The difference:
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 , the marginal is always uniform, so bit, while the entropy rate is . The gap closes only at , which is exactly :
- marginal entropy H(Xₙ)
- entropy rate H(𝒳) = 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 (e.g., with probability )?
If the chain is irreducible and aperiodic, the distribution converges exponentially to .
- In the Cesàro average , the finite warmup error from early steps gets divided by and vanishes to .
- In the streaming limit , the marginal distribution has already reached in the asymptotic limit.
The entropy rate is an asymptotic, steady-state property of the transition law . Starting off-equilibrium alters the transient bits during the warm-up period, but leaves the long-term entropy rate 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, 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 requires solving an linear system 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 be a connected graph with vertices labelled .
- Each edge connecting node and node has an assigned weight .
- The graph is undirected, meaning traversal is symmetric: (If no edge connects and , we set ).
- The Random Walk: If the particle is currently at node (), it picks its next destination with probability proportional to the connecting edge’s weight:
To keep track of the weights across the graph, we define two sums:
- Local Node Weight (): The total weight of all edges touching node :
- Total Network Weight (): The sum of weights across all undirected edges:
Because every undirected edge connects two endpoints, summing the local weights across all nodes counts every edge twice:
The Stationary Distribution: Pure Locality
TheoremStationary Distribution of a Graph Random Walk
The unique stationary probability of resting on node is directly proportional to its local weight:
ProofGuess and Verify via Balance
We verify that :
Step 1: The local weights cancel.
The factor that makes node popular to visit is the exact same denominator that dilutes its outgoing transitions:
Step 2: Apply undirected symmetry ().
Summing the incoming weights from all neighbors into node simply recovers the local weight :
∎
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 stations.
Look at the formula :
- is purely local: the capacity of the roads physically attached to node .
- is a global normalizing constant: the total asphalt laid down across the entire world.
What this means in practice: If you manage server , 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 remains fixed, rewiring distant regions has zero effect on your long-term traffic share . 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 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:
DerivationDerivation via Logarithmic Splitting
Step 1: Expand the Markov entropy rate formula.
Step 2: Substitute and .
Step 3: Normalize inside the logarithm by dividing numerator and denominator by .
Substitute this back into the double summation:
Step 4: Identify the two probability distributions.
- Term 1: The set of normalized edge weights over all directed hops forms a valid probability distribution that sums to . Term 1 is by definition its Shannon entropy:
- Term 2: The term does not depend on the destination index . Pull it out of the inner sum:
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:
- Specify a directed edge : 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 .
- Subtract your starting point : 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 bits of uncertainty.
What remains is the net incremental surprise of picking which outgoing branch to take:
Special Case: Simple Unweighted Graphs
Now strip away custom weights: suppose every valid connection is an ordinary, identical two-way link ( if connected, otherwise).
- Node Degree (): The number of neighbors directly connected to node (how many doorways leave room ).
- Total Edges (): The total count of physical bridges in the network.
- Why the sum of degrees equals : Every physical bridge connects two rooms. If each room counts its own doorways, every bridge gets counted twice (once from room , once from room ). Therefore:
Because every existing directed bridge has weight , its normalized probability in the edge distribution is identical: . The entropy of a uniform distribution over equally likely bridges is simply .
CorollaryEntropy Rate of an Unweighted Graph
For an unweighted undirected graph with bridges and degree counts :
IntuitionDegree-Sequence Invariance: Why Global Topology Disappears
The formula in the corollary takes only two inputs:
- The total number of edges .
- The list of neighbor counts (the degree sequence ).
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 ( for all , meaning every single node has exactly 2 neighbors, giving ):
- Graph 1 (A single 6-node ring): . A walker needs 3 steps to reach the opposite side.
- Graph 2 (Two disjoint 3-node triangles): and . The state space is split into completely separate disconnected loops.
Or, to keep the network connected, consider two 6-node graphs where:
- 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:
When a walker stands at node , it chooses uniformly among its neighbors, experiencing bits of uncertainty. Furthermore, by the locality theorem, the fraction of time the walker spends at node is strictly .
Multiplying them together:
Every term in this sum depends exclusively on the local number of exits . 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 options with probability .
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 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 .
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 .
- The next position is chosen uniformly from those neighbors.
- The entropy rate is simply bits per step.
On an board, walls prevent certain moves for some pieces, making the degree depend on the piece’s position. We compare two concrete examples:
- The King: The number of legal moves decreases near the edges and corners.
- 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 bits per step.
On a bounded 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: moves.
- 24 Border squares: moves.
- 36 Interior squares: moves.
Step 1: Count the Total Number of Directed Transitions ()
Summing the available moves across all 64 squares gives the total number of directed edges in the state graph:
Step 2: Compute the Stationary Distribution
Using the graph formula , the long-run probability of finding the king on a specific square is:
The stationary distribution is non-uniform: an interior square is visited times more often than a corner square because more incoming paths lead to it.
Step 3: Compute the Entropy Rate
We apply the unweighted graph entropy rate formula:
-
Edge term:
-
Node entropy :
-
Subtract the two terms:
Comparing Bounded vs. Unbounded
- Infinite board: bits per step.
- Bounded board: bits per step.
The board walls reduce the average uncertainty by:
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 to .
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:
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 :
-
The total number of directed edges is:
-
The stationary distribution is uniform across all 64 squares:
-
The node entropy is:
-
Applying the formula:
The Structural Difference Between King and Rook
- King: Degrees vary by position (). The stationary distribution is non-uniform, and the entropy rate ( bits) is strictly lower than bits.
- Rook: Degree is uniform across all states (). The stationary distribution is uniform (), and the entropy rate is exactly 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 and in stationary equilibrium satisfies:
Reversing the direction gives the exact same probability mass:
The condition for all pairs 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: 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: . Running forward, you see . Playing the tape backward shows , 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 () is balanced by the exact reverse flow from ().
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:
Because by detailed balance, the edge weights are symmetric, and:
Thus, the closed-form entropy rate identity:
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 requires solving massive linear systems. The Metropolis-Hastings algorithm explicitly enforces detailed balance () by design, guaranteeing the chain converges to the target distribution 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 (). 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 (). In statistical physics, Boltzmann defined entropy as , where is the number of accessible microstates. When all microstates are equally likely, Boltzmann’s expression matches Shannon’s formula 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 always increase over time?
WarningThe Headline Result: Entropy Does Not Always Increase
Contrary to popular assumption, the Shannon entropy 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:
An increase in Shannon entropy () 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 . Suppose we prepare the system in one of two different initial configurations: or .
As time advances, both probability distributions evolve under the exact same transition matrix:
TheoremMonotonic Contraction of Relative Entropy
For any Markov chain with transition kernel and any two state distributions and at time :
ProofExpanding Joint Relative Entropy in Forward and Reverse Time
Step 1: Define the joint distributions over adjacent time steps.
Let and be the joint distributions on under the two experiments. Because the microscopic physics is identical:
Step 2: Expand the joint divergence using the Chain Rule for Relative Entropy.
We expand in two alternate directions:
- Forward time decomposition:
- Reverse time decomposition:
Step 3: Evaluate the forward conditional term.
Because both systems evolve under the identical transition kernel :
The relative entropy between identical distributions is identically zero:
Thus, the joint divergence equals the initial marginal divergence:
Step 4: Bound the backward conditional term.
By the Information Inequality (non-negativity of KL divergence):
Substituting this inequality into the reverse time expansion:
Dropping the non-negative backward term establishes the result:
∎
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 , yielding zero conditional divergence.
- The backward inference diverges: Running time in reverse requires Bayes’ rule: Because , the backward reconstruction kernels are distinct, producing non-zero conditional surprise ().
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 ?
CorollaryMonotonic Approach to Equilibrium
Let be any stationary distribution of the Markov chain (). If is the state distribution at step , then:
The relative entropy between the current state distribution and the equilibrium distribution decreases monotonically at every step.
Because 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: .
Perspective 3: Absolute Entropy Increases If and Only If Equilibrium Is Uniform
A common trap is assuming that because relative entropy decreases, absolute Shannon entropy must increase.
WarningCounterexample: When Shannon Entropy Strictly Decreases
Take a two-state Markov chain with states and transition matrix:
Regardless of where you start, the next step lands in State 1 with probability . The stationary distribution is .
- Initialize the chain in a uniform distribution: .
- At step 1: (maximum possible entropy).
- At step 2: , so .
The entropy dropped precipitously from to !
Meanwhile, relative entropy to equilibrium decreased:
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 , from earlier, started surely in State 2. Its marginal is , which sweeps past on its way to . So overshoots to nearly a full bit before settling back to , while the divergence to equilibrium falls at every step:
- entropy H(Xₙ)
- divergence D(μₙ ‖ μ)
When does the thermodynamic statement ” monotonically increases” hold true? Only when the equilibrium state is uniform.
The Uniform Equilibrium Condition
TheoremEquivalence of Entropy Increase and Uniform Equilibrium
Let be finite and let be the uniform distribution.
If is a stationary distribution of the chain (), then:
for all initial distributions .
ProofConnecting KL Divergence to Shannon Entropy
Compute the relative entropy between an arbitrary distribution and the uniform distribution :
Rearranging:
If is stationary, Corollary 2 guarantees that relative entropy decreases monotonically:
Canceling and reversing signs:
∎
Doubly Stochastic Matrices: The Physical Mechanism
Which transition matrices admit the uniform distribution as a stationary vector?
DefinitionDoubly Stochastic Matrix
A square transition matrix is doubly stochastic if both its rows and its columns sum to 1:
TheoremCharacterization of Uniform Equilibrium
The uniform distribution is a stationary distribution of if and only if is doubly stochastic:
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 () 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 (). 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 :
The more steps that elapse after an initial measurement , the less that measurement reveals about the future state .
ProofTwo Alternative Proofs
Proof A: Via Conditioning and Stationarity
- Conditioning reduces entropy: Adding to the conditioning set can only decrease uncertainty:
- Apply the Markov property: Given , the future variable () is conditionally independent of the past variable :
- Shift time by stationarity: Conditioning step on step depends only on their time separation . Shifting both indices backward by 1:
Combining these steps yields .
Proof B: Via the Data Processing Inequality
- The random variables form a valid Markov chain: .
- By the Data Processing Inequality, processing cannot increase mutual information:
- Expand both sides via :
- By stationarity, marginal entropies are identical: . Canceling them:
∎
IntuitionLoss of Memory Over Time
Even when an isolated system is stationary and its total entropy is static, initial records decohere.
- At : (perfect certainty).
- As : (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 be a random variable taking values in a finite set, and let be a random permutation (a shuffle) of that set. If the choice of shuffle is independent of the state , then:
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:
Step 2: Expand the conditional entropy.
By definition of expectation over the realized permutations :
Step 3: Bijective permutations preserve entropy.
For any deterministic, fixed permutation , the mapping is a bijection (one-to-one and onto). A deterministic invertible relabeling preserves entropy exactly:
Step 4: Factor the sum.
Combining Step 1 and Step 4:
∎
IntuitionWhy the Independence Condition Matters
The assumption that is independent of 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 ().
- 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 (), driving the entropy to .
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 be a stationary Markov chain over state space . We observe the sequence defined by a deterministic mapping:
where is generally a many-to-one function.
What is the entropy rate of the observed sequence?
The Fundamental Obstacle: Is Not a Markov Chain
If were also a Markov chain, calculating its entropy rate would be trivial: we would just solve for its stationary distribution and compute .
However, a function of a Markov chain is almost never Markovian:
- When the function collapses multiple underlying states into the same observed symbol (e.g., ), seeing leaves you uncertain about whether the machine is in State 1 or State 2.
- To disambiguate which state the system actually occupies at step , you must look further into the past:
- Because collapsing states introduces unbounded memory, the observation depends on symbols in the arbitrarily distant past.
Because is stationary, is also strictly stationary. Its entropy rate exists and is given by the streaming limit:
Why Naive Computation Fails: The Slow Convergence Trap
A naive engineer might calculate for and stop when the difference between consecutive steps becomes small:
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 , whose terms drop below 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 with guaranteed numerical precision, we construct two simultaneous bounds:
- An upper bound that decreases monotonically toward .
- A lower bound that increases toward .
When the upper and lower bounds close to within a user-specified tolerance , 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 approaches from above by the Monotonicity Lemma.
To build a lower bound, we hand the estimator a major advantage: the true initial underlying state .
LemmaThe Lower Bound Lemma
For any :
IntuitionWhy Handing Over Underestimates Uncertainty
Conditioning reduces entropy: the more context you provide, the lower your uncertainty.
By the Markov property, knowing the underlying state completely screens off everything that occurred before time 1. Handing the estimator the exact state gives it more predictive power than knowing the entire infinite prehistory of observations .
Because this estimator has access to superhuman context (an exact uncollapsed microstate), its remaining uncertainty about is strictly lower than the true entropy rate .
ProofFormal Proof of the Lower Bound
We trace this inequality for any finite historical depth :
(a) Add the redundant observation : Since is a deterministic function of , conditioning on it adds zero new information:
(b) Add the unobserved microscopic past : By the Markov property of the underlying chain, conditioned on the state , the future is conditionally independent of all ancient states prior to time 1:
(c) Add the ancient observed symbols : Each is already fully determined by the states in the conditioning set:
(d) Trade hidden states for observed history: Applying the principle that conditioning reduces entropy, discarding the underlying hidden states can only increase or leave unchanged the remaining uncertainty:
(e) Shift time indices by Stationarity: Shift all indices forward by time steps:
Because this chain of steps holds for every integer , it must hold in the limit as :
∎
Proving the Bracket Closes: The Vanishing Information Gap
We now have our two bounds:
Does the gap between them actually shrink to zero as grows?
LemmaThe Bracket Closes
The difference between the upper and lower bounds converges strictly to zero:
ProofThe Finite Budget Argument via Mutual Information
Step 1: Express the gap as a Conditional Mutual Information.
Using the standard identity :
Closing the bracket requires proving that this conditional mutual information vanishes as .
Step 2: Apply the Chain Rule for Mutual Information.
The total information shared between the initial state and the entire observation block decomposes into a telescoping sum:
Step 3: Bound by the finite entropy of .
Mutual information can never exceed the Shannon entropy of either participating variable:
Step 4: Conclude from convergence of infinite series.
Because each conditional mutual information term is non-negative (), the partial sums form a monotonically increasing sequence bounded above by the finite number .
Therefore, the infinite series converges:
For any convergent series , the individual terms must vanish to zero:
∎
IntuitionThe Finite Information Budget
The initial state contains a strictly finite reservoir of surprise: at most bits.
As you observe more outputs , each new observation siphons off a tiny fraction of that initial information budget. Because the total budget is finite, the amount of new information can provide about must dwindle to zero.
Eventually, the historical record of ‘s has told you everything it is ever going to tell you about , and explicitly knowing stops providing any predictive advantage.
The Master Theorem and Computational Implementation
TheoremCertified Sandwich Theorem for Functions of a Markov Chain
Let be a stationary Markov chain and let . For every block length :
Furthermore, both bounds converge monotonically to the exact entropy rate:
How an Engineer Computes in Practice
- Fix a desired numerical precision (e.g., ).
- For , evaluate:
- Compute the certified error bracket:
- Halt when . The midpoint is guaranteed to be within of the true entropy rate .
Extension: Hidden Markov Models (HMMs)
A deterministic function 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 and an observed output sequence , where each observation is emitted through a memoryless noisy channel governed by transition probabilities :
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 : The telegraph operator’s mental state, intent, and grammatical context (a clean Markov chain).
-
The Emission : The corrupted, noisy electrical pulse received across hundreds of miles of copper cable.
Because conditioning on still screens off all ancient emissions prior to step 1, the identical sandwich theorem applies:
The entropy rate of an HMM can be computed to arbitrary precision using the exact same bracketing algorithm.
Quick reference
| Object | Statement | Reads as |
|---|---|---|
| Stationary | The source’s statistics don’t drift. | |
| Markov | Dependence reaches back one step. | |
| Stationary distribution | The occupancy that reproduces itself. | |
| Entropy rate (average) | Accounting price per symbol. | |
| Entropy rate (marginal) | Price of the next symbol given the past. | |
| Equality | for stationary processes | The two prices agree. |
| Markov rate | Row entropies weighted by occupancy. | |
| Two-state chain | - | |
| Weighted walk | Edge entropy minus node entropy. | |
| Unweighted walk | - | |
| Second law | Relative entropy always drops; plain entropy need not rise. | |
| Function of a chain | 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 unique stationary distribution, reached from any start.
- Uniform stationary distribution doubly stochastic entropy genuinely increases.
- 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.