Lecture Roadmap
Topics for Today
- The definition of a simple random walk on a graph and its transition matrix.
- The expected time to reach a vertex or a set of vertices.
- Stationary distribution, return times, and reversibility.
- Some interesting qualitative properties: periodicity, convergence, and commute behavior.
- Concrete calculations on complete graphs, cycles, and stars.
The Unifying Theme
A random walk is a process with very simple local rules:
But the quantities it creates are global. Expected hitting times remember the geometry of the graph, stationary distributions remember the degree sequence, and long-run behavior distinguishes bipartite from non-bipartite structure.
Notation to Track
Setting
Throughout, we usually work with a finite connected undirected graph \(G=(V,E)\). Connectivity ensures that every vertex is reachable from every other vertex, so the walk can explore the whole graph.
When we later mention convergence to stationarity, we will also point out the bipartite obstruction. That issue is not a technical nuisance; it is one of the most important structural features of random walks on graphs.
Simple Random Walk on a Graph
Definition
A simple random walk on \(G\) is a sequence of random vertices \(X_0, X_1, X_2, \dots\) such that if \(X_t=u\), then \(X_{t+1}\) is chosen uniformly from the neighbors of \(u\).
Markov Property
The next position depends only on the current position, not on the earlier history:
So a random walk on a graph is a finite-state Markov chain.
Transition Matrix View
If the vertices are indexed as \(v_1,\dots,v_n\), the matrix \(P\) with entries \(P(v_i,v_j)\) is the transition matrix of the walk.
The \(t\)-step probabilities are given by matrix powers:
This is why linear algebra becomes unavoidable once we start asking long-run questions.
Three Standard Examples
| Graph | Walk Rule | Comment |
|---|---|---|
| \(K_n\) | Move to any other vertex with probability \(1/(n-1)\) | Everything is perfectly symmetric. |
| \(C_n\) | Move left or right with probability \(1/2\) | Behaves like a walk on a circle. |
| Star \(K_{1,d}\) | Leaves must jump to the center | Shows strong degree imbalance. |
Connected Graphs Give Irreducible Walks
If \(G\) is connected and \(u,v \in V(G)\), then there is a path from \(u\) to \(v\). Following that path has positive probability, because every step along the path has positive probability. Hence for some \(t\),
This is exactly the irreducibility condition for the Markov chain.
Time to Reach Vertices: Hitting Times
Definitions
For a vertex \(v\), the hitting time of \(v\) is
More generally, for a set \(A \subseteq V(G)\),
The expected hitting time from \(u\) to \(v\) is denoted by
First-Step Equations
Fix a target vertex \(v\). Then
So expected hitting times are obtained by solving a linear system.
Proof
If we start at \(v\), the hitting time is already \(0\), so \(H_{vv}=0\).
Now suppose \(u \neq v\). The walk takes one step immediately. From \(u\), each neighbor \(x\) is chosen with probability \(1/\deg(u)\). After that first step, the remaining expected time to hit \(v\) is \(H_{xv}\). Conditioning on the first step gives
This is the required recurrence.
Example: Complete Graph \(K_n\)
Fix a target vertex \(v\). By symmetry, every other vertex has the same hitting time \(h\) to \(v\).
From a non-target vertex, with probability \(1/(n-1)\) we hit \(v\) in one step, and with probability \((n-2)/(n-1)\) we move to another non-target vertex and start over. Hence
Solving gives
A Useful General Principle
Whenever the graph has strong symmetry, the system for hitting times collapses to only a few unknowns. That is exactly what happened in \(K_n\), and later it will happen again for cycles and stars.
On arbitrary graphs the system is larger, but the same first-step idea still does all the conceptual work.
Stationary Distribution and Return Time
Stationary Distribution of the Simple Random Walk
For a connected undirected graph with \(m\) edges, the distribution
is stationary for the simple random walk.
Proof by Detailed Balance
If \(uv \in E(G)\), then
If \(uv \notin E(G)\), both sides are \(0\). Therefore the detailed balance equations hold for every pair \(u,v\):
Summing over \(u\) gives
so \(\pi\) is stationary.
Immediate Consequences
- If \(G\) is \(d\)-regular, then \(\pi\) is uniform.
- Higher-degree vertices are seen more often in the long run.
- Under stationarity, each oriented edge is used with probability \(1/(2m)\) at each step.
Reversibility
The detailed balance identity means that the chain looks statistically the same when time is reversed under the stationary distribution. This is called reversibility.
For random walks on undirected graphs, reversibility is the bridge from probability to electrical network ideas.
Expected Return Time
Let
Then for the simple random walk on a connected graph,
Proof Idea
In stationarity, the long-run fraction of time spent at \(v\) is \(\pi(v)\). So if we watch the walk for a very long time, the mean gap between successive visits to \(v\) must be the reciprocal frequency \(1/\pi(v)\).
For the simple random walk, \(\pi(v)=\deg(v)/(2m)\), so the average return time is \(2m/\deg(v)\). Thus highly connected vertices are revisited more quickly on average.
Some Interesting Properties of Random Walks
A Short List Worth Remembering
| Property | Statement | Meaning |
|---|---|---|
| Irreducibility | Connected graph \(\Longrightarrow\) every vertex can reach every other with positive probability | The walk can explore the whole graph. |
| Reversibility | \(\pi(u)P(u,v)=\pi(v)P(v,u)\) | Time reversal is tractable. |
| Stationarity | \(\pi(v)=\deg(v)/(2m)\) | Degree controls long-run mass. |
| Return time | \(\mathbb{E}_v[\tau_v^+]=2m/\deg(v)\) | Large-degree vertices are revisited faster. |
| Commute time | \(H_{uv}+H_{vu}\) is symmetric in \(u,v\) | Round-trip travel has a hidden symmetry. |
Periodicity and Bipartite Obstruction
If \(G\) is bipartite with parts \(A\) and \(B\), then every step flips the walk from one part to the other. So starting in \(A\), all even times lie in \(A\) and all odd times lie in \(B\).
Therefore the walk cannot converge pointwise to a stationary distribution unless the graph has some laziness built in. The parity oscillation never disappears.
Non-Bipartite Graphs Converge
If \(G\) is finite, connected, and non-bipartite, then the simple random walk is irreducible and aperiodic, and hence
This is the basic convergence theorem for finite Markov chains.
Every Vertex Is Visited Infinitely Often
Because the chain is finite and connected, the simple random walk is positive recurrent. In particular, every vertex is visited infinitely many times with probability \(1\).
So on a finite connected graph, a vertex may take a while to appear, but it is never lost forever.
Commute Time
The commute time between \(u\) and \(v\) is
It is automatically symmetric, and in fact a deep theorem says
where \(R_{\mathrm{eff}}(u,v)\) is the effective electrical resistance between \(u\) and \(v\). This is one of the most beautiful connections between graph theory, probability, and physics.
Worked Examples
Cycle \(C_n\): Hitting a Fixed Vertex
Label the cycle \(0,1,\dots,n-1\), and let the target be \(0\). Write \(h_k=H_{k0}\). Then
where the indices are read modulo \(n\). Rearranging gives
The quadratic function \(h_k=k(n-k)\) satisfies this recurrence and the boundary conditions \(h_0=h_n=0\). Therefore
The expected time is largest when the starting point is opposite the target, giving a worst case of about \(n^2/4\).
Star \(K_{1,d}\): Center to a Chosen Leaf
Let \(c\) be the center and \(t\) a fixed target leaf. Write \(h_c=H_{ct}\), and let \(h_o\) be the hitting time from any other leaf to \(t\).
From any non-target leaf, the next step must go to the center, so
From the center, with probability \(1/d\) we go directly to \(t\), and with probability \((d-1)/d\) we go to another leaf. Hence
Solving gives
Comparison Table
| Graph | Stationary Distribution | Typical Hitting Fact |
|---|---|---|
| \(K_n\) | Uniform | \(H_{uv}=n-1\) for \(u \neq v\) |
| \(C_n\) | Uniform | \(H_{k0}=k(n-k)\) |
| Star \(K_{1,d}\) | \(\pi(c)=1/2,\ \pi(\text{leaf})=1/(2d)\) | \(H_{ct}=2d-1\) |
What the Examples Teach
- Symmetry can collapse a large linear system to a one-variable equation.
- Degree imbalance distorts stationary behavior sharply, as the star graph shows.
- Even on a very regular graph like a cycle, hitting times grow quadratically with distance scale.
Takeaways
Main Results
- A simple random walk chooses a uniformly random neighbor at each step.
- Hitting times satisfy first-step linear equations.
- For an undirected graph, the stationary distribution is \(\pi(v)=\deg(v)/(2m)\).
- The expected return time to \(v\) is \(2m/\deg(v)\).
- Bipartite graphs create parity oscillation, while connected non-bipartite graphs converge to stationarity.
- Commute time reveals a deep connection with effective resistance.
Proof Patterns to Remember
- Condition on the first step to derive equations for expectations.
- Use symmetry to reduce many unknowns to a small number.
- Verify stationarity through detailed balance rather than direct summation whenever possible.
- Look at parity in bipartite graphs before making any convergence claim.