# brownian motion on a weighted undirected graph

The question "Brownian bridge interpreted as Brownian motion on the circle" reminds me of a question along similar lines. Say that you have a weighted undirected graph $G$, and you have constrained Brownian motion on the graph where edges have lengths equal to the reciprocal of their weights. So for example a cycle with weight 1 (and therefore length 1) would be like the Brownian bridge. By 'constrained' I mean that when edges meet at a vertex, the endpoints of each edge should have the same value.

So my question is how to compute the matrix whose $(i,j)$ entry is the variance of the difference between values at vertices $i$ and $j$, given a matrix representation of the graph, for example the graph Laplacian or weighted adjacency matrix.

For example, if the graph is a tree, then the $(i,j)$ entry should be proportional to the sum of edge lengths along the unique path between vertices $i$ and $j$. But when there are cycles in the graph, the variance should be lower because of the additional brownian-bridge-like constraints.