[guided]The detailed balance equations require $\lambda_i p_{i,j} = \lambda_j p_{j,i}$ for every pair of states $i, j$. The candidate $\lambda_i = d_i$ is motivated by the structure of the transition matrix: since $p_{i,j} = 1/d_i$ for neighbours, the product $\lambda_i p_{i,j} = d_i \cdot (1/d_i)$ eliminates the degree entirely, leaving $1$ on both sides. This is the key observation that makes the degree measure natural for the simple random walk.
We check both cases systematically.
**Case 1: $\{i,j\} \notin E$.** By the definition of the simple random walk on a graph, $p_{i,j} = 0$ when $\{i,j\}$ is not an edge, and similarly $p_{j,i} = 0$. Therefore $\lambda_i p_{i,j} = d_i \cdot 0 = 0 = d_j \cdot 0 = \lambda_j p_{j,i}$.
**Case 2: $\{i,j\} \in E$.** In this case, $p_{i,j} = 1/d_i$ (the walk moves to each neighbour with equal probability $1/d_i$) and $p_{j,i} = 1/d_j$. Computing each side:
\begin{align*}
\lambda_i p_{i,j} = d_i \cdot \frac{1}{d_i} = 1, \qquad \lambda_j p_{j,i} = d_j \cdot \frac{1}{d_j} = 1.
\end{align*}
Both sides equal $1$, so the equation holds.
Why does this argument depend on the graph being undirected? Because we used the fact that $\{i,j\} \in E$ implies both $p_{i,j} > 0$ and $p_{j,i} > 0$ with the specific values $1/d_i$ and $1/d_j$. In a directed graph, having an edge from $i$ to $j$ does not guarantee an edge from $j$ to $i$, so $p_{i,j}$ and $p_{j,i}$ may differ in structure, and the degree-based cancellation breaks down.[/guided]