Spectral Graph Theory and You: and Centrality Metrics Jonathan Gootenberg March 11, 2013 1 / 19
Outline of Topics 1 Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial 2 Preliminary concepts Proof of 3 2 / 19
Why use spectral graph theory? Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial The eigenvalues of a graph s adjacency matrix (and others) can reveal important information about the community structure. The number of matrix trees The most central nodes 3 / 19
Easily calculate all spanning trees Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial 4 / 19
Find most central nodes in a network Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial 5 / 19
Some definitions: Baby s first matrix Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial Definition (Adjacency Matrix A) Given an undirected graph G = (V, E), the adjacency matrix of G is the n n matrix A = A(G) with entries a ij such that { 1, {v i, v j } E a ij = 0, otherwise 6 / 19
Some definitions: Baby s first matrix Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial 0 1 0 1 G = A(G) = 1 0 1 1 0 1 0 1 1 1 1 0 7 / 19
Putting the spec in Spectral Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial Definition (Spectrum of a graph) The spectrum of graph G is the set of eigenvalues of A(G), along with their multiplicities. If the eigenvalues of A(G) are λ 0 > λ 0 >... > λ s 1 with multiplicites m(λ 0 ),..., m(λ s 1 ) then ( ) λ0 λ Spec G = 1 λ s 1 m(λ 0 ) m(λ 1 ) m(λ s 1 ) 8 / 19
Putting the spec in Spectral Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial 0 1 0 1 A(G) = 1 0 1 1 0 1 0 1 1 1 1 0 ( 1 ( ) ( ) ) Spec G = 2 1 + 17 1 2 1 17 1 0 1 1 1 1 9 / 19
Putting the spec in Spectral Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial 0 1 0 1 A(G) = 1 0 1 1 0 1 0 1 1 1 1 0 ( 1 ( ) ( ) ) Spec G = 2 1 + 17 1 2 1 17 1 0 1 1 1 1 9 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Definition (Characteristic Polynomial) The characteristic polynomial of G, χ(g, λ) is χ(g, λ) = det(λi A) =λ n + c 1 λ n 1 + c 2 λ n 2 +... + c n c 1 = i λ i = Tr(A) = 0 10 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Definition (Characteristic Polynomial) The characteristic polynomial of G, χ(g, λ) is χ(g, λ) = det(λi A) =λ n + c 1 λ n 1 + c 2 λ n 2 +... + c n c 1 = i λ i = Tr(A) = 0 10 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Definition (Characteristic Polynomial) The characteristic polynomial of G, χ(g, λ) is χ(g, λ) = det(λi A) =λ n + c 1 λ n 1 + c 2 λ n 2 +... + c n c 1 = i λ i = Tr(A) = 0 10 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Definition (Characteristic Polynomial) The characteristic polynomial of G, χ(g, λ) is χ(g, λ) = det(λi A) =λ n + c 1 λ n 1 + c 2 λ n 2 +... + c n c 1 = i λ i = Tr(A) = 0 10 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Characteristic Polynomial χ(g, λ) = λ n + c 1 λ n 1 + c 2 λ n 2 +... + c n You can express c i in terms of the principal minors of A Principal Minor The principal minor det(a) J,J, J {1,..., n} is the determiniant of the subset of A the same subset J of columns and rows 11 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Characteristic Polynomial χ(g, λ) = λ n + c 1 λ n 1 + c 2 λ n 2 +... + c n You can express c i in terms of the principal minors of A c i ( 1) i is the sum of the principal minors of size i i c i ( 1) i = J =i det(a) J,J 11 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Consider c 2 All non-zero principal minors are of the form 0 1 1 0 Therefore, c 2 = E 11 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Consider c 3 The non-trivial principal matrices of size 3 are 0 1 0 1 0 0 0 0 0, 0 1 1 1 0 0 1 0 0, 0 1 1 1 0 1 1 1 0 11 / 19
Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial What does the spectrum of a graph tell us? Consider c 3 0 1 0 1 0 0 0 0 0 = 0, 0 1 1 1 0 0 1 0 0 = 0, 0 1 1 1 0 1 1 1 0 = 2 Therefore, c 3 is twice the number of triangles in G 11 / 19
The incidence matrix Preliminary concepts Proof of Definition (Incidence Matrix S) Given an undirected graph G = (V, E) with V = {1,..., n}, E = {e 1,..., e m } the incidence matrix of G is the n m matrix S = S(G) with entries S ij such that 1, e j ends at i S ij = 1, e j starts at i 0, otherwise 12 / 19
The incidence matrix Preliminary concepts Proof of 1 0 0 1 0 G = S(G) = 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 13 / 19
Preliminary concepts Proof of The incidence matrix implies connectivity of the graph Theorem rank(s) = n - number of connected components of G 14 / 19
Preliminary concepts Proof of The incidence matrix implies connectivity of the graph Theorem rank(s) = n - number of connected components of G Reorder the graph such that S 1 0 S = S 2..... 0 S c where c is the number of connected components of GWe wish to show the rank of each component is n i 1 14 / 19
Preliminary concepts Proof of The incidence matrix implies connectivity of the graph Theorem rank(s) = n - number of connected components of G For a given connected component S i, suppose we have a summation over the rows s j n i α j s j = 0 j=1 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 15 / 19
Preliminary concepts Proof of The incidence matrix implies connectivity of the graph Theorem rank(s) = n - number of connected components of G Consider a row s k, α k 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 1 1 1 15 / 19
Preliminary concepts Proof of The incidence matrix implies connectivity of the graph Theorem rank(s) = n - number of connected components of G Each non-zero column in s k has a corresponding row s l = α k = α l 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 1 1-1 15 / 19
Preliminary concepts Proof of The incidence matrix implies connectivity of the graph Theorem rank(s) = n - number of connected components of G Since the graph is connected, all α j = 1, and n i s j = 0 j=1 Therefore, the rank of S i is n i 1 Remark- S Since S i has rank n i 1, we can remove an arbitrary row to create S i without loss of information 15 / 19
Preliminary concepts Proof of The incidence matrix implies connectivity of the graph Theorem rank(s) = n - number of connected components of G Remark- S Since S i has rank n i 1, we can remove an arbitrary row to create S i without loss of information 15 / 19
Preliminary concepts Proof of In the following proof, we will try all selections of n 1 edges and use the determinant to see if the resulting subgraph is connected. We use create the matrix that is the combination of the columns of the incidence matrix S: Q = S S T 1 1 0 1 0 0 1 0 0 1 1 2 1 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 0 0 = 1 3 1 0 1 2 0 1 0 16 / 19
Preliminary concepts Proof of In the following proof, we will try all selections of n 1 edges and use the determinant to see if the resulting subgraph is connected. We use create the matrix that is the combination of the columns of the incidence matrix S: Q = S S T 1 1 0 1 0 0 1 0 0 1 1 2 1 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 0 0 = 1 3 1 0 1 2 0 1 0 16 / 19
Preliminary concepts Proof of In the following proof, we will try all selections of n 1 edges and use the determinant to see if the resulting subgraph is connected. We use create the matrix that is the combination of the columns of the incidence matrix S: Q = S S T 1 1 0 1 0 0 1 0 0 1 1 2 1 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 0 0 = 1 3 1 0 1 2 0 1 0 16 / 19
Preliminary concepts Proof of Theorem The number of spanning trees of a graph G is equal to T det(q), where Q = S S Graph Laplacian Q Q is referred to as the graph laplacian, and can also be expressed as Q = D A where D is the degree matrix 17 / 19
Preliminary concepts Proof of Theorem The number of spanning trees of a graph G is equal to det(q), where Q = S S T Lemma If T = (V, E) is an directed tree rooted at n, we can order E such that e i ends at i. 17 / 19
Preliminary concepts Proof of Theorem The number of spanning trees of a graph G is equal to det(q), where Q = S S T Lemma If T = (V, E) is an directed tree rooted at n, we can order E such that e i ends at i. Proof. Label edges such that e i := (p(i), i), where p(i) is the parent of i 17 / 19
Preliminary concepts Proof of Theorem The number of spanning trees of a graph G is equal to det(q), where Q = S S T Lemma If G = (V, E), E = n 1 is a directed graph that is not a tree, det( S) = 0 17 / 19
Preliminary concepts Proof of Theorem The number of spanning trees of a graph G is equal to det(q), where Q = S S T Lemma If G = (V, E), E = n 1 is a directed graph that is not a tree, det( S) = 0 Proof. If E = n 1 and G is not a tree, then it is not connected, and rank( S) = rank(s) n 2 17 / 19
Preliminary concepts Proof of Theorem The number of spanning trees of a graph G is equal to det(q), where Q = S S T Lemma If T = (V, E), E = n 1 is a tree with e i E ending at i V, det( S) = 1 17 / 19
Preliminary concepts Proof of Lemma If T = (V, E), E = n 1 is a tree with e i E ending at i V, det( S) = 1 Proof. By the results of the previous lemmas, we can order the vertices such that p(i) > i. Then 1. S = 0 1.......... 0 0 1 which is upper diagonal. 17 / 19
Preliminary concepts Proof of Proof. We will use the linearity of the determinant to break down det(q) into a sum of determinants of subgraphs: det(q) = det( S j ) where all S j are subgraphs with n 1 edges (Tr(S j ) = n 1). 17 / 19
Formulation of PageRank PageRank (PR) is a centrality metric which approximates a web surfer. Jumps with probability q: q n. Like typing a URL Surfs with probability 1 q: f (j) j:j i k out(j). Like clicking a link PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) 18 / 19
Formulation of PageRank PageRank (PR) is a centrality metric which approximates a web surfer. Jumps with probability q: q n. Like typing a URL Surfs with probability 1 q: f (j) j:j i k out(j). Like clicking a link PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) 18 / 19
Formulation of PageRank PageRank (PR) is a centrality metric which approximates a web surfer. Jumps with probability q: q n. Like typing a URL Surfs with probability 1 q: f (j) j:j i k out(j). Like clicking a link PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) 18 / 19
Formulation of PageRank PageRank (PR) is a centrality metric which approximates a web surfer. Jumps with probability q: q n. Like typing a URL Surfs with probability 1 q: f (j) j:j i k out(j). Like clicking a link PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) 18 / 19
Solving the PageRank reccurance PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) Definition (Transition Matrix P) Given an undirected graph G = (V, E), the transition matrix of G is the n n matrix P = P(G) with entries p ij such that p ij = { 1 k a ik, {v i, v j } E 0, otherwise 19 / 19
Solving the PageRank reccurance PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) j:j i f (j) k out (j) = fp 19 / 19
Solving the PageRank reccurance PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) j:j i f (j) k out (j) = fp We can use the property i f (i) = 1 = f 1T 19 / 19
Solving the PageRank reccurance PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) j:j i f (j) k out (j) = fp We can use the property i f (i) = 1 = f 1T f = q ( q ) n f 1T 1 + (1 q)fp = f n J + (1 q)p 19 / 19
Solving the PageRank reccurance PageRank reccurance f (i) = q + (1 q) n j:j i f (j) k out (j) j:j i f (j) k out (j) = fp We can use the property i f (i) = 1 = f 1T f = q ( q ) n f 1T 1 + (1 q)fp = f n J + (1 q)p We can compute PageRank with the eigenvector! 19 / 19