Chapter 17
Graphs and Graph Laplacians
17.1 Directed Graphs, Undirected Graphs, Incidence Matrices, Adjacency Matrices, Weighted Graphs
Definition 17.1. A directed graph is a pair G =(V,E), where V = v1,...,vm is a set of nodes or vertices,and E V V {is a set of ordered} pairs of distinct nodes (that is,✓ pairs⇥ (u, v) V V with u = v), called edges.Given any edge e =(2u, v),⇥ we let s(e6)=u be the source of e and t(e)=v be the target of e.
Remark: Since an edge is a pair (u, v)withu = v, self-loops are not allowed. 6
Also, there is at most one edge from a node u to a node v.Suchgraphsaresometimescalledsimple graphs.
733 1
734 CHAPTER 17. GRAPHS AND GRAPH LAPLACIANS
e1 v1 v2 e5
e3 e2 e4 v5
e6
v3 v4 e7
Figure 17.1: Graph G1. For every node v V ,thedegree d(v)ofv is the number of edges leaving or2 entering v: d(v)= u V (v, u) E or (u, v) E . |{ 2 | 2 2 }| We abbreviate d(vi)asdi.Thedegree matrix D(G), is the diagonal matrix
D(G)=diag(d1,...,dm).
For example, for graph G1,wehave
20000 04000 0 1 D(G1)= 00300 . B00030C B C B00002C B C @ A Unless confusion arises, we write D instead of D(G). 17.1. DIRECTED GRAPHS, UNDIRECTED GRAPHS, WEIGHTED GRAPHS 735 Definition 17.2. Given a directed graph G =(V,E), for any two nodes u, v V ,apath from u to v is a 2 sequence of nodes (v0,v1,...,vk)suchthatv0 = u, vk = v,and(vi,vi+1)isanedgeinE for all i with 0 i k 1. The integer k is the length of the path. A path is closed if u = v.ThegraphG is strongly connected if for any two distinct node u, v V ,thereisapathfrom u to v and there is a path from2v to u.
Remark: The terminology walk is often used instead of path,thewordpathbeingreservedtothecasewherethe nodes vi are all distinct, except that v0 = vk when the path is closed.
The binary relation on V V defined so that u and v are related i↵there is a path⇥ from u to v and there is a path from v to u is an equivalence relation whose equivalence classes are called the strongly connected components of G. 736 CHAPTER 17. GRAPHS AND GRAPH LAPLACIANS Definition 17.3. Given a directed graph G =(V,E), with V = v1,...,vm ,ifE = e1,...,en ,thenthe incidence matrix{ B(G})ofG is the{ m n matrix} whose ⇥ entries bij are given by
+1 if s(ej)=vi
bij = 1ift(e )=v 8 j i <>0otherwise.
:> Here is the incidence matrix of the graph G1: 1100000 10 1 11 0 0 0 1 B = 0 11 0 0 0 1 . B 00010 1 1C B C B 0000 11 0C B C @ A Again, unless confusion arises, we write B instead of B(G).
Remark: Some authors adopt the opposite convention of sign in defining the incidence matrix, which means that their incidence matrix is B. 1
17.1. DIRECTED GRAPHS, UNDIRECTED GRAPHS, WEIGHTED GRAPHS 737
a v1 v2 e
b c d v5 f
v3 v4 g
Figure 17.2: The undirected graph G2. Undirected graphs are obtained from directed graphs by forgetting the orientation of the edges.
Definition 17.4. A graph (or undirected graph)isa pair G =(V,E), where V = v1,...,vm is a set of nodes or vertices,andE is a set{ of two-element} subsets of V (that is, subsets u, v ,withu, v V and u = v), called edges. { } 2 6
Remark: Since an edge is a set u, v ,wehaveu = v, so self-loops are not allowed. Also,{ for every} set of nodes6 u, v ,thereisatmostoneedgebetweenu and v. { } As in the case of directed graphs, such graphs are some- times called simple graphs. 738 CHAPTER 17. GRAPHS AND GRAPH LAPLACIANS For every node v V ,thedegree d(v)ofv is the number of edges incident2 to v: d(v)= u V u, v E . |{ 2 |{ }2 }| The degree matrix D is defined as before.
Definition 17.5. Given a (undirected) graph G =(V,E), for any two nodes u, v V ,apath from u to v is a se- 2 quence of nodes (v0,v1,...,vk)suchthatv0 = u, vk = v, and vi,vi+1 is an edge in E for all i with 0 i k 1. The{ integer k} is the length of the path. A path isclosed if u = v.ThegraphG is connected if for any two distinct node u, v V ,thereisapathfromu to v. 2 Remark: The terminology walk or chain is often used instead of path,thewordpathbeingreservedtothecase where the nodes vi are all distinct, except that v0 = vk when the path is closed.
The binary relation on V V defined so that u and v are related i↵there is a path from⇥ u to v is an equivalence re- lation whose equivalence classes are called the connected components of G. 17.1. DIRECTED GRAPHS, UNDIRECTED GRAPHS, WEIGHTED GRAPHS 739 The notion of incidence matrix for an undirected graph is not as useful as in the case of directed graphs
Definition 17.6. Given a graph G =(V,E), with V = v ,...,v ,ifE = e ,...,e ,thentheincidence { 1 m} { 1 n} matrix B(G)ofG is the m n matrix whose entries bij are given by ⇥
+1 if ej = vi,vk for some k bij = { } (0otherwise. Unlike the case of directed graphs, the entries in the incidence matrix of a graph (undirected) are nonnegative. We usually write B instead of B(G).
The notion of adjacency matrix is basically the same for directed or undirected graphs. 740 CHAPTER 17. GRAPHS AND GRAPH LAPLACIANS Definition 17.7. Given a directed or undirected graph G =(V,E), with V = v ,...,v ,theadjacency ma- { 1 m} trix A(G)ofG is the symmetric m m matrix (aij) such that ⇥ (1) If G is directed, then 1ifthereissomeedge(v ,v ) E i j 2 aij = or some edge (v ,v) E 8 j i 2 <>0otherwise.
(2) Else if G is:> undirected, then
1ifthereissomeedgevi,vj E aij = { }2 (0otherwise. As usual, unless confusion arises, we write A instead of A(G).
Here is the adjacency matrix of both graphs G1 and G2:
01100 10111 0 1 A = 11010 . B01101C B C B01010C B C @ A 17.1. DIRECTED GRAPHS, UNDIRECTED GRAPHS, WEIGHTED GRAPHS 741 If G =(V,E)isadirectedoranundirectedgraph,given anodeu V ,anynodev V such that there is an edge (u, v)inthedirectedcaseor2 2 u, v in the undirected case is called adjacent to v,andweoftenusethenotation{ } u v. ⇠ Observe that the binary relation is symmetric when G is an undirected graph, but in general⇠ it is not symmetric when G is a directed graph.
If G =(V,E)isanundirectedgraph,theadjacencyma- trix A of G can be viewed as a linear map from RV to RV ,suchthatforallx Rm,wehave 2
(Ax)i = xj; j i X⇠ that is, the value of Ax at vi is the sum of the values of x at the nodes vj adjacent to vi. 742 CHAPTER 17. GRAPHS AND GRAPH LAPLACIANS The adjacency matrix can be viewed as a di↵usion op- erator.
This observation yields a geometric interpretation of what it means for a vector x Rm to be an eigenvector of A associated with some eigenvalue2 ;wemusthave