Exercises
ch17-ex01
EasyA DTMC on has transition matrix . Compute and find .
Matrix multiply by itself.
is the entry of .
Compute $\ntn{tmat}^2$
$
Read off the answer
.
ch17-ex02
EasyFind the stationary distribution of the chain in Exercise 1.
Solve with .
Set up equations
and . The first equation gives , so .
Solve
.
ch17-ex03
EasyA DTMC on has , , , , and all other transitions are zero. Draw the transition diagram and determine whether the chain is irreducible.
Check if every state can reach every other state.
Draw the diagram
(prob 1), (prob 0.5) or (prob 0.5), (prob 1).
Check accessibility
(1 step), (via , 2 steps). (1 step), (1 step), so and (via ). All states communicate: the chain is irreducible.
ch17-ex04
EasyFor the chain in Exercise 3, determine the period of each state.
Find the return times to state : which values of give ?
Return times to $A$
: 2 steps. : 3 steps. So and .
Conclude
, so the chain is aperiodic. Since it is irreducible, all states have period 1.
ch17-ex05
EasyVerify that is the stationary distribution of the doubly stochastic matrix .
Check that .
Verify that is doubly stochastic (column sums = 1).
Verify doubly stochastic
Column sums: ; ; ; . Yes, doubly stochastic.
Verify stationarity
. So .
ch17-ex06
MediumA DTMC on has transition matrix Find the stationary distribution and verify your answer.
Write for each .
Use .
Write equations
, , , and .
Solve
From the first and third: . Substituting into normalization: , so , giving , .
Verify
. Verified.
ch17-ex07
MediumProve that the product of two stochastic matrices is stochastic.
Show that the row sums of the product are 1.
Use the fact that each factor has row sums equal to 1.
Setup
Let and be stochastic matrices. Their product has entries .
Non-negativity
Since and , we have .
Row sums
$
ch17-ex08
MediumA particle moves on the integers as follows: from state , it moves to with probability and to with probability . From state 0, it moves to 1 with probability 1 (reflecting barrier). For which values of is this chain positive recurrent?
This is a birth-death chain with a reflecting barrier.
Consider the drift: if , the chain drifts to .
Detailed balance
For a birth-death chain: . Here , for , and for . So for .
Normalization
requires , i.e., , i.e., .
Conclusion
The chain is positive recurrent if and only if . For it is null recurrent, and for it is transient.
ch17-ex09
MediumShow that if a DTMC is irreducible and has a finite state space, then it is positive recurrent.
A finite irreducible chain must be recurrent (why?).
Can a finite recurrent chain be null recurrent?
Finite + irreducible implies recurrent
If all states were transient, each would be visited only finitely many times. But the chain must be somewhere at every time step, and there are finitely many states. By the pigeonhole principle, some state must be visited infinitely often, contradicting transience. So all states are recurrent.
Finite + recurrent implies positive recurrent
For a recurrent irreducible chain, a stationary measure exists with for all . If the state space is finite, then , so we can normalize to get a stationary distribution. This implies , i.e., positive recurrence.
ch17-ex10
MediumConsider the Ehrenfest model with particles. Write the full transition matrix and find the stationary distribution. Verify by detailed balance.
State : and .
Transition matrix
$
Stationary distribution
. So .
Verify detailed balance
Check : and . Holds. Similarly for all other pairs.
ch17-ex11
MediumA Gilbert-Elliott channel has , , , . Find: (a) the steady-state BER, (b) the expected length of a burst of errors.
Stationary distribution: .
Expected burst length = expected sojourn time in state B.
Stationary distribution
, .
BER
.
Burst length
The sojourn time in state B is with mean slots.
ch17-ex12
MediumProve that if a Markov chain satisfies detailed balance with respect to a distribution , then the chain is reversible: the time-reversed chain has the same transition matrix.
The time-reversed chain has transitions .
Use detailed balance to simplify.
Time-reversed transitions
For a chain in steady state, the transition probabilities of the reversed chain are .
Apply detailed balance
By detailed balance, , so .
Conclude
: the forward and reversed chains have the same transition matrix. The chain is reversible.
ch17-ex13
Hard(Gambler's ruin with unfair coin) In the gambler's ruin with , show that the ruin probability starting from fortune with target is
Set up the recurrence with , .
Try a solution of the form and find from the characteristic equation.
Recurrence
for , with , . Rearranging: .
Solve the recurrence
Let . Then . Now . Since , we get .
Find $r_i$
.
ch17-ex14
HardLet be an irreducible, positive recurrent DTMC with stationary distribution . Prove the ergodic theorem (time-average form): for any bounded function ,
Use the strong law of large numbers applied to the renewal cycles of the chain.
Define a cycle as the time between successive visits to a fixed state .
Define renewal cycles
Fix a recurrent state . Let be the successive return times to . Set (inter-visit times). By the strong Markov property, are i.i.d. with .
Sums over cycles
Let . The are also i.i.d. By the strong law: and .
Combine
The time average . One can show by expanding, giving the desired limit .
ch17-ex15
Hard(Metropolis-Hastings) Design a Metropolis-Hastings chain on to sample from using a uniform proposal ( for all ). Write the full transition matrix.
The acceptance probability is for symmetric proposals.
The transition probability is for .
Compute acceptance probabilities
, , . , , . , , . , , .
Off-diagonal entries
for .
Diagonal entries
.
Row 1: , , , . Row 2: , , , . Row 3: , , , . Row 4: , , , .
ch17-ex16
HardA web surfer follows links on a 4-page internet modeled by the link matrix The Google PageRank model adds a "teleportation" probability : , where is the all-ones matrix. Find the PageRank (stationary distribution) of this chain.
Compute explicitly.
Solve numerically or iterate .
Compute $\ntn{tmat}$
. Row 1: . Row 2: . Row 3: . Row 4: .
Solve for $\ntn{sdist}$
By power iteration (or solving the linear system), the stationary distribution is approximately .
Interpret
Page 3 has the highest PageRank (0.461) because it receives links from all other pages. The teleportation factor ensures the chain is irreducible and aperiodic.
ch17-ex17
HardProve that periodicity is a class property: if in an irreducible chain, then .
If in steps and in steps, then is a return time for .
Show and .
Setup
Let with and . Then , so .
Show $d(i) \mid d(j)$
For any with : , so . Since , we get . This holds for all in the return set of , so .
Conclude
By symmetry, . Since both are positive integers, .
ch17-ex18
Challenge(Coupling and total variation convergence) For an ergodic chain on a finite state space with , define the mixing time
Show that where (assuming ).
Use a maximal coupling of and where .
Bound the probability that the coupling has not yet occurred.
Construct a coupling
Let start at state and (stationary). At each step, couple them: with probability they meet; given meeting, they agree on the next state.
Bound meeting probability
Since for all , the probability of meeting in one step is at least . (More carefully: since each term is at least and there are terms, but the sum is at most 1.)
Hence .
Conclude
By the coupling inequality: .
ch17-ex19
Challenge(Random walk on a graph) Let be a connected undirected graph with vertices. The simple random walk on moves from vertex to a uniformly random neighbor. Let denote the degree of vertex .
(a) Show that is the stationary distribution.
(b) Show that this chain is reversible.
(c) For the cycle graph (each vertex has degree 2), what is the period?
The transition probability is if .
Check detailed balance: ?
(a) Verify stationarity
.
(b) Detailed balance
For : . Similarly . Equal. For : both sides are 0.
(c) Period on the cycle
On : if is even, the walk alternates between two sets (bipartite), so . If is odd, the walk can return in steps (full cycle) or steps (there and back, impossible on a cycle without self-loops or multi-edges). Actually, from any vertex, return times include and (if is odd, ... wait: you cannot return in 2 steps on a cycle). Return times are so if is odd? No: you can also return in steps? No, on a cycle the minimum return time is since there is only one path in each direction.
Correct analysis: only when is a multiple of... On , the walk can return to in steps (going around the cycle). Also in steps, etc. But also: go steps right and steps left for total steps. So iff there exists a path of length 2 from to . On with , there is no self-loop and the only length-2 path from returns via a neighbor: with probability . Wait: on , from vertex 1, go to 2 (prob 1/2) then back to 1 (prob 1/2). Yes! So .
For with : (go to either neighbor and come back). And (go around). So . If is odd: (aperiodic). If is even: (periodic).
ch17-ex20
Challenge(Convergence rate and spectral gap) For an ergodic chain on with transition matrix , let be the eigenvalues ordered by magnitude. Define the spectral gap .
(a) Show that for some constant depending on the initial state.
(b) For the lazy random walk on the complete graph (stay with probability 1/2, move to a uniform random vertex with probability 1/2), compute and the mixing time up to constants.
Expand in the eigenbasis of .
The lazy walk on has .
(a) Eigendecomposition
Write where are left/right eigenvectors. Then .
Bound the error
where depends on the eigenvector components. Since , we get .
(b) Lazy walk on $K_M$
. Eigenvalues of : one eigenvalue (eigenvector ) and eigenvalues . So eigenvalues of : and for . Spectral gap: .
Mixing time: .