Consider a graph with n vertices, defined by an adjacency matrix A ∈ ∈ { 0 , 1 } n × × n : A i j = 1 if there is an edge from vertex i to j , 0 otherwise. For simplicity assume it is an undirected graph, which corresponds to a symmetric A ; however, MERW can also be generalized for directed and weighted graphs (for example Boltzmann distribution among paths instead of uniform).