Let simple random walk travel from to its first visit to , then stop on its subsequent first hit of in a finite connected unweighted loopless graph. Every directed edge has expected traversal count
The Strong Markov property splits the count into the two killed legs. By killed-walk occupation voltage, their contributions are and . Their Laplacians cancel, so the harmonic maximum principle on a finite graph makes the sum constant, with value . Summing over all directed edges recovers the commute time identity.
Use simple random walk on the loopless undirected unweighted graph, with transition probability to each graph neighbour, and take . Set . Returns to before visiting do not end the commute. After its first visit to , stop at the subsequent first visit to , so . Count transitions with departure times , including the final step arriving at . The expected hitting times are finite: in a finite connected graph there is a uniformly positive probability to reach any fixed target within a fixed number of steps, giving a geometric tail bound.
We prove the needed killed-walk occupation voltage identity from its visit balance equation. Define
For , counting arrivals before absorption gives
Hence, for the Graph Laplacian , we have away from . Since the sum of all Laplacian coordinates is zero, . Thus is the electrical voltage of a unit flow from to , grounded at , and .
Construct for the opposite killed leg. It satisfies and . Therefore . The harmonic maximum principle on a finite graph makes constant: at a maximum its value equals the average over its graph neighbours, forcing all of them to share that value, and connectedness propagates it. At the constant equals .
For any oriented edge , each visit to before the target hit produces a transition to with conditional probability . The expected traversals during the first killed leg are therefore , and those during the second leg are by the Strong Markov property at . This proves directed edge occupation in a random-walk commute:
In particular, both directions of every unoriented edge have this same expected value, although their counts on an individual commute need not coincide. Summing over the directed edges also recovers the commute time identity .
The distinct-terminal convention is necessary for the printed “returns” interpretation. If and is the first positive return, a graph with two graph vertices and one edge gives while . Thus either take , as intended, or explicitly define the degenerate commute as . A general nonuniform random walk is not covered by the unweighted simple-walk formula.