You are on page 1of 4

Random Walks on Graphs

Sarah Constantin April 4, 2012

What is a graph?

Vertices and edges; draw examples; Why do we care? Web (whats linked to what? Basis for PageRank) Electronic networks more generally; Social networks (whos friends with whom?) epidemiology (whos been in contact with whom?) For every graph, theres an adjacency matrix that captures all the information of the graph. You can get a graph from its adjacency matrix and vice versa.

Random walks

An ant moves at random from one node to another neighbor; choice of neighbor is random. Markov chain: new location depends only on present location. No memory of the past. Matrix formulation: probability distribution over each row. Rows sum to 1, all entries between 0 and 1. Transition probability matrix.

Random walks and the heat equation

Suppose we have a line graph one dimension. Suppose we have the uniform random walk equal probabilities of moving left and right. If we have a distribution u, a function on the graph, letting the random walk step forward gives (P u)(x) = 1/2u(x + 1) + 1/2u(x 1)

where x is a point on the graph, and x + 1 is the point directly to the right and x 1 is the point directly to the left. If this were a continuous line instead of a line graph, this equation would be (P u)(x) = 1/2u(x + h) + 1/2u(x h) After k timesteps, (P k u)(x) = 1/2P k u(x + h) = 1/2P k u(x h) 1/h(P k+1 u(x) P k u(x)) = 1/2h(P k u(x + h) P k u(x)) + 1/2h(P k u(x h) P k u(x)) As h 0 we get the one-dimensional heat equation ut = 1/2uxx The discrete analog is du = 1/2(u(x + 1) 2u(x) + u(x 1)) If we did this in two dimensions, the situation would be the same, except the heat equation would be ut = 1/4u the Laplacian, 2u 2u + 2 x2 y and the discrete analog will be -1 on x, 1/d on its neighbors. Now generalize to *any* graph: -1 on x, 1/d on the neighbors. Note: if the graph approximates the plane, the graph Laplacian approximates the plane Laplacian. In fact this is also true of graphs that approximate other surfaces, but you need a more general Laplacian for surfaces. Takeaway: the Laplacian (and the heat equation) emerges from uniform random walks. In the continuous case, this gives heat diusion on surfaces. Keep it discrete and it describes random walks on graphs. Averaging operator: in the steady-state case where the derivative of u is zero, each point is the average of its neighbors. A function with zero Laplacian is called harmonic. Example: 1/r (unit point charge at the origin). Basically, applying the Laplacian to a function is f M f where M is the averaging operator. Convolving with the Laplacian unsmooths the function (in fact, using a discrete Laplacian lter is how they do edge enhancement in image processing. Its a high pass lter (a sharpener.) Denition of graph Laplacian: 1 on the diagonal, d 1d for (u, v) if u and v are adjacent, u v 0 otherwise. Its actually the negative of the second dierence operator.

Eigenvalues and Eigenvectors


Av = v

Given a matrix A, if then v is an eigenvector and is an eigenvalue. Every non-singular matrix can has n eigenvectors and n eigenvalues (perhaps with repetition.) The set of all the eigenvalues is called the spectrum. (Stated without proof): every symmetric matrix has real eigenvalues. Every positive denite matrix has all positive eigenvalues. Change into eigenbasis: y t y = nonnegative i all i are nonnegative. (Stated without proof): symmetric matrices can be written as U U where is a diagonal matrix with eigenvalues. We can tell a lot about the structure of a graph from the eigenvalues of the graph Laplacian.
2 i yi

Properties of graph Laplacians

Here, i are the eigenvalues of the Graph Laplacian. First note: two disjoint graphs have block-wise union of the Laplacians (direct sum.) So the spectrum of the union of disjoint graphs is the union of the spectra of the subgraphs. One edge: just (1, -1; -1, 1) around that edge. So only one eigenvalue, namely 2. Everything else is 0. Laplacian is a quadratic form sum of squared dierences of neighbors. So this is positive semidenite: xT Lx 0. xT Lx = (xi xj )2
ij

Fact 0: the null space of the Laplacian is just where (xi xj )2 = 0 or all values of the function in each connected component are equal. The dimension of the null space is the number of connected components. If the graph is connected, the null space has dimension one, so theres n-1 nonzero eigenvalues, so 2 > 0. 3

Fact 1: the complete graph has all equal eigenvalues of the Laplacian. (n 1)vi
ji

vj = nvi

vj = nvi

Every vector orthogonal to the ones vector has sum of entries equal to 0 (thats what orthogonal means.) so has eigenvalue n/(n 1). Fact 2. For graphs with no self-loops (A(v, v) = 0) i = n Proof: L has ones on the diagonal; trace is the sum on the diagonal which is n; this is also the sum of the eigenvectors. (Trace is multiplicative.)
n Fact 3: for n 2, 1 n1 with equality i the graph is complete. 0 = 0, so the inequality follows from fact 1. A complete graph has uniform spectrum

Fact 4. If G is not complete, then 1 1. Suppose a and b are not neighbors. Its enough to construct a function f such that f (x)dx = 0 (orthogonal to (d1 , d2 , . . . dn ), the eigenvector associated with 0 ) and the Rayleigh quotient f Lf =1 R(f ) = f Df Second largest eigenvector. Candidate: f (x) = da if x = b, db if x = a. Clearly orthogonal, d2 da + d2 db a b R(f ) = 2 =1 db da + d2 db a Since 1 R(f ), the claim follows. Fact 6: all the eigenvalues are less than or equal to 2. R(f ) = =
xy 2 xy (f (x) f (y)) f 2 (x)dx

2(f 2 (x) + f 2 (y)) f 2 (x)dx


2 x f (x)dx 2 x f (x)dx

=2

All the eigenvalues are less than or equal to the Rayleigh quotient. Fact 7: The graph G is bipartite i n1 = 2. If equality exists in the above equation, then f (y) = f (x) for x y, so G is two-colorable, and so bipartite. 4

You might also like