Lecture 3: graph theory

Similar documents
Follow links Class Use and other Permissions. For more information, send to:

Course : Algebraic Combinatorics

Kernels of Directed Graph Laplacians. J. S. Caughman and J.J.P. Veerman

Detailed Proof of The PerronFrobenius Theorem

NCS Lecture 8 A Primer on Graph Theory. Cooperative Control Applications

The Strong Largeur d Arborescence

Alternative Characterization of Ergodicity for Doubly Stochastic Chains

Lecture 4: Introduction to Graph Theory and Consensus. Cooperative Control Applications

Complex Laplacians and Applications in Multi-Agent Systems

Reaching a Consensus in a Dynamically Changing Environment A Graphical Approach

Markov Chains, Random Walks on Graphs, and the Laplacian

Markov Chains and Stochastic Sampling

Graph coloring, perfect graphs

Reachability of recurrent positions in the chip-firing game

arxiv: v2 [math.co] 29 Jul 2017

Multi-coloring and Mycielski s construction

On the convergence of weighted-average consensus

Key words. Strongly eventually nonnegative matrix, eventually nonnegative matrix, eventually r-cyclic matrix, Perron-Frobenius.

Observation 4.1 G has a proper separation of order 0 if and only if G is disconnected.

NOTES ON THE PERRON-FROBENIUS THEORY OF NONNEGATIVE MATRICES

Invertibility and stability. Irreducibly diagonally dominant. Invertibility and stability, stronger result. Reducible matrices

Laplacian Integral Graphs with Maximum Degree 3

An Introduction to Spectral Graph Theory

Observation 4.1 G has a proper separation of order 0 if and only if G is disconnected.

Semidefinite and Second Order Cone Programming Seminar Fall 2001 Lecture 5

Nonnegative Matrices I

Zero controllability in discrete-time structured systems

Another algorithm for nonnegative matrices

ON THE NUMBER OF COMPONENTS OF A GRAPH

RESEARCH ARTICLE. An extension of the polytope of doubly stochastic matrices

Graph fundamentals. Matrices associated with a graph

Fiedler s Theorems on Nodal Domains

Bichain graphs: geometric model and universal graphs

5 Flows and cuts in digraphs

Reaching a Consensus in a Dynamically Changing Environment - Convergence Rates, Measurement Delays and Asynchronous Events

Topics in Graph Theory

arxiv:math/ v1 [math.oa] 9 May 2005

Eigenvectors Via Graph Theory

Fiedler s Theorems on Nodal Domains

A Generalized Eigenmode Algorithm for Reducible Regular Matrices over the Max-Plus Algebra

Automorphism groups of wreath product digraphs

Preliminaries and Complexity Theory

32 Divisibility Theory in Integral Domains

Estimates for probabilities of independent events and infinite series

Notes on the Matrix-Tree theorem and Cayley s tree enumerator

UC Berkeley Department of Electrical Engineering and Computer Science Department of Statistics. EECS 281A / STAT 241A Statistical Learning Theory

On Symmetry and Controllability of Multi-Agent Systems

Markov Chains Handout for Stat 110

Lecture 5: Random Walks and Markov Chain

Laplacian eigenvalues and optimality: II. The Laplacian of a graph. R. A. Bailey and Peter Cameron

A Graph-Theoretic Characterization of Controllability for Multi-agent Systems

On the number of cycles in a graph with restricted cycle lengths

Acyclic Digraphs arising from Complete Intersections

On Hadamard Diagonalizable Graphs

ORIE 6334 Spectral Graph Theory September 8, Lecture 6. In order to do the first proof, we need to use the following fact.

Graphs with few total dominating sets

THE MAXIMAL SUBGROUPS AND THE COMPLEXITY OF THE FLOW SEMIGROUP OF FINITE (DI)GRAPHS

TORIC WEAK FANO VARIETIES ASSOCIATED TO BUILDING SETS

Consensus of Information Under Dynamically Changing Interaction Topologies

Markov Chains, Stochastic Processes, and Matrix Decompositions

Lecture 1 and 2: Introduction and Graph theory basics. Spring EE 194, Networked estimation and control (Prof. Khan) January 23, 2012

A Questionable Distance-Regular Graph

Standard Diraphs the (unique) digraph with no vertices or edges. (modulo n) for every 1 i n A digraph whose underlying graph is a complete graph.

Markov Decision Processes

arxiv: v1 [cs.dm] 26 Apr 2010

Rao s degree sequence conjecture

Math 443/543 Graph Theory Notes 5: Graphs as matrices, spectral graph theory, and PageRank

The non-bipartite graphs with all but two eigenvalues in

arxiv: v3 [math.ds] 21 Jan 2018

A lower bound for the Laplacian eigenvalues of a graph proof of a conjecture by Guo

K 4 -free graphs with no odd holes

Applications to network analysis: Eigenvector centrality indices Lecture notes

Eigenvalue comparisons in graph theory

The effect on the algebraic connectivity of a tree by grafting or collapsing of edges

Hamilton Cycles in Digraphs of Unitary Matrices

Cographs; chordal graphs and tree decompositions

The matrix approach for abstract argumentation frameworks

Intrinsic products and factorizations of matrices

Strongly chordal and chordal bipartite graphs are sandwich monotone

Algebraic Methods in Combinatorics

Z-Pencils. November 20, Abstract

The Minimum Rank, Inverse Inertia, and Inverse Eigenvalue Problems for Graphs. Mark C. Kempton

Powerful tool for sampling from complicated distributions. Many use Markov chains to model events that arise in nature.

THE PERTURBATION BOUND FOR THE SPECTRAL RADIUS OF A NON-NEGATIVE TENSOR

Consensus Seeking in Multi-agent Systems Under Dynamically Changing Interaction Topologies

Maximizing the numerical radii of matrices by permuting their entries

Generalized Pigeonhole Properties of Graphs and Oriented Graphs

Nonnegative and spectral matrix theory Lecture notes

MULTI-AGENT TRACKING OF A HIGH-DIMENSIONAL ACTIVE LEADER WITH SWITCHING TOPOLOGY

AN ELEMENTARY PROOF OF THE SPECTRAL RADIUS FORMULA FOR MATRICES

Disjoint Hamiltonian Cycles in Bipartite Graphs

Index coding with side information

Consensus, Flocking and Opinion Dynamics

Section 1.7: Properties of the Leslie Matrix

MAT 445/ INTRODUCTION TO REPRESENTATION THEORY

On shredders and vertex connectivity augmentation

On improving matchings in trees, via bounded-length augmentations 1

New feasibility conditions for directed strongly regular graphs

Notes on averaging over acyclic digraphs and discrete coverage control

Matrix Completion Problems for Pairs of Related Classes of Matrices

Transcription:

CONTENTS 1 BASIC NOTIONS Lecture 3: graph theory Sonia Martínez October 15, 2014 Abstract The notion of graph is at the core of cooperative control. Essentially, it allows us to model the interaction topology among agents. In this lecture, we introduce basic notions. We restrict our attention to static graphs, i.e., graphs with a fixed, not changing set of neighboring relationships. We will eventually consider more general graphs. The treatment corresponds to selected parts from Chapter 1 in [1]. Contents 1 Basic notions 1 1.1 Connectivity............................................. 2 1.2 Weighted digraphs.......................................... 6 1.3 Distances............................................... 7 2 Algebraic graph theory 8 2.1 Properties related to adjacency matrices.............................. 8 2.2 Properties related to Laplacian matrices.............................. 13 1 Basic notions A directed graph in short, digraph of order n is a pair G = (V,E), where V is a set with n elements called vertices (or nodes) and E is a set of ordered pair of vertices called edges. In other words, E V V. We call V and E the vertex set and edge set, respectively. When convenient, we let V(G) and E(G) denote the vertices and edges of G, respectively. For u,v V, the ordered pair (u,v) denotes an edge from u to v. Example 1.1 (From a nonnegative matrix to its associated digraph) Given a nonnegative n n matrix A, its associated digraph is the digraph with nodes {1,...,n} and edge set defined by the following relationship: (i,j) E if and only if a ij > 0. An undirected graph in short, graph consists of a vertex set V and of a set E of unordered pairs of vertices. For u,v V and u v, the set {u,v} denotes an unordered edge. A digraph is undirected if (v,u) E anytime (u, v) E. It is possible and convenient to identify an undirected digraph with the corresponding graph; vice versa, the directed version of a graph (V,E) is the digraph (V,E ) with the property that (u,v) E if and only if {u,v} E. In what follows, our convention is to allow self-loops in both graphs and digraphs. 1

1.1 Connectivity 1 BASIC NOTIONS A digraph (V,E ) is a subgraph of a digraph (V,E) if V V and E E; additionally, a digraph (V,E ) is a spanning subgraph if it is a subgraph and V = V. The subgraph of (V,E) induced by V V is the digraph (V,E ), where E contains all edges in E between two vertices in V. For two digraphs G = (V,E) and G = (V,E ), the intersection and union of G and G are defined by Analogous definitions may be given for graphs. G G = (V V,E E ), G G = (V V,E E ). In a digraph G with an edge (u,v) E, u is called an in-neighbor of v, and v is called an out-neighbor of u. We let NG in (v) (resp., Nout G (v)) denote the set of in-neighbors, (resp. the set of out-neighbors) of v in the digraph G. We will drop the subscript when the graph G is clear from the context. The in-degree and out-degree of v are the cardinality of N in (v) and N out (v), respectively. A digraph is topologically balanced if each vertex has the same in- and out-degrees (even if distinct vertices have distinct degrees). Likewise, in an undirected graph G, the vertices u and v are neighbors if {u,v} is an undirected edge. We let N G (v) denote the set of neighbors of v in the undirected graph G. As in the directed case, we will drop the subscript when the graph G is clear from the context. The degree of v is the cardinality of N(v). For a digraph G = (V,E), the reverse digraph rev(g) has vertex set V and edge set rev(e) composed of all edges in E with reversed direction. A digraph G = (V,E) is complete if E = V V. A clique (V,E ) of a digraph (V,E) is a subgraph of (V,E) which is complete, that is, such that E = V V. Note that a clique is fully determined by its set of vertices, and hence there is no loss of precision in denoting it by V. A maximal clique V of an edge of a digraph is a clique of the digraph with the following two properties: it contains the edge, and any other subgraph of the digraph that strictly contains (V,V V ) is not a clique. 1.1 Connectivity Let us now review some basic connectivity notions for digraphs and graphs. We begin with the setting of undirected graphs because of its simplicity. A path in a graph is an ordered sequence of vertices such that any pair of consecutive vertices in the sequence is an edge of the graph. A graph is connected if there exists a path between any two vertices. If a graph is not connected, then it is composed of multiple connected components, that is, multiple connected subgraphs. A path is simple if no vertex appears more than once in it, except possibly for initial and final vertex. A cycle is a simple path that starts and ends at the same vertex. A graph is acyclic if it contains no cycles. A connected acyclic graph is a tree. A forest is a graph that can be written as the disjoint union of trees. Trees have interesting properties: for example, G = (V,E) is a tree if and only if G is connected and E = V 1. Alternatively, G = (V,E) is a tree if and only if G is acyclic and E = V 1. Figure 1 illustrates these notions. Figure 1: An illustration of connectivity notions on a graph. The graph has two connected components. The leftmost connected component is a tree, while the rightmost connected component is a cycle. Next, we generalize these notions to the case of digraphs. A directed path in a digraph is an ordered sequence of vertices such that any ordered pair of vertices appearing consecutively in the sequence is an edge of the 2

1.1 Connectivity 1 BASIC NOTIONS digraph. A cycle in a digraph is a directed path that starts and ends at the same vertex and that contains no repeated vertex except for the initial and the final vertex. A digraph is acyclic if it contains no cycles. In an acyclic graph, every vertex of in-degree 0 is named a source, and every vertex of out-degree 0 is named a sink. Every acyclic digraph has at least one source and at least one sink. Figure 2 illustrates these notions. (a) (b) Figure 2: Illustrations of connectivity notions on a digraph: (a) shows an acyclic digraph with one sink and two sources; (b) shows a directed path which is also a cycle. The set of cycles of a directed graph is finite. A directed graph is aperiodic if there exists no k > 1 that divides the length of every cycle of the graph. In other words, a digraph is aperiodic if the greatest common divisor of the lengths of its cycles is one. A digraph is periodic if it is not aperiodic. Figure 3 shows examples of a periodic and an aperiodic digraph. (a) (b) Figure 3: (a) A periodic digraph. (b) An aperiodic digraph with cycles of length 2 and 3. A vertex of a digraph is globally reachable if it can be reached from any other vertex by traversing a directed path. A digraph is strongly connected if every vertex is globally reachable. A directed tree (sometimes called a rooted tree) is an acyclic digraph with the following property: there exists a vertex, called the root, such that any other vertex of the digraph can be reached by one and only one directed path starting at the root. In a directed tree, every in-neighbor of a vertex is called a parent and every out-neighbor is called a child. Two vertices with the same parent are called siblings. A successor of a vertex u is any other node that can be reached with a directed path starting at u. A predecessor of a vertex v is any other node such that a directed path exists starting at it and reaching v. A directed spanning tree, or simply a spanning tree, of a digraph is a spanning subgraph that is a directed tree. Clearly, a digraph contains a spanning tree if and only if the reverse digraph contains a globally reachable vertex. A (directed) chain is a directed tree with exactly one source and one sink. A (directed) ring digraph is the cycle obtained by adding to the edge set of a chain a new edge from its sink to its source. Figure 4 illustrates some of these notions. 3

1.1 Connectivity 1 BASIC NOTIONS Figure 4: From left to right, tree, directed tree, chain, and ring digraphs. Lemma 1.2 (Connectivity in topologically balanced digraphs) Let G be a digraph. The following statements hold: (i) if G is strongly connected, then it contains a globally reachable vertex and a spanning tree; and (ii) if G is topologically balanced and contains either a globally reachable vertex or a spanning tree, then G is strongly connected and is Eulerian. 1 Proof: The first statement is obvious. Regarding the second statement, we prove that a topologically balanced digraph with a globally reachable node is strongly connected, and leave the proof of the other case to the reader. We reason by contradiction. Assume that G is not strongly connected. Let S V be the set of all nodes of G that are globally reachable. By hypothesis, S. Since G is not strongly connected, we have S V. Note that any outgoing edge with origin in a globally reachable node automatically makes the destination a globally reachable node too. This implies that there cannot be any outgoing edges from a node in S to a node in V \S. Let v V \S such that v has an out-neighbor in S (such a node must exist, since otherwise the nodes in S cannot be globally reachable). Since by hypothesis G is balanced, there must exist an edge of the form (w,v) E. Clearly, w S, since otherwise v would be globally reachable too, which is a contradiction. Therefore, w V \ S. Again, using the fact that G is topologically balanced, there must exist an edge of the form (z,w) E. As before, z V \S (note that z = v is a possibility). Since V \S is finite and so is the number of possible edges between its nodes, applying this argument repeatedly, we find that there exists a vertex whose out-degree is strictly larger than its in-degree, which is a contradiction with the fact that G is topologically balanced. We refer to [2] for the proof that G is Eulerian. Given a digraph G = (V,E), an in-neighbor of a nonempty set of nodes U is a node v V \ U for which there exists an edge (v,u) E for some u U. Lemma 1.3 (Disjoint subsets and spanning trees) Given a digraph G with at least two nodes, the following two properties are equivalent: (i) G has a spanning tree; and (ii) for any pair of nonempty disjoint subsets U 1, U 2 V, either U 1 has an in-neighbor or U 2 has an in-neighbor. Proof: (i) = (ii) Assume that i V is the root of the spanning tree and take an arbitrary pair of nonempty, disjoint subsets U 1,U 2 V. If i U 1, then there must exist a path from i U 1 to a node in U 2. 1 A graph is Eulerian if it has a cycle that visits all the graph edges exactly once. 4

1.1 Connectivity 1 BASIC NOTIONS Therefore, U 2 must have an in-neighbor. Analogously, if i U 2, then U 1 must have an in-neighbor. Finally, it is possible that i / U 1 U 2. In this case, there exist paths from i to both U 1 and U 2, that is, both sets have in-neighbors. (ii) = (i) This is proved by finding a node from which there exists a path to all others. We do this in an algorithmic manner using induction. At each induction step k, except the last one, four sets of nodes are considered, U 1 (k) W 1 (k) V, U 2 (k) W 2 (k) V, with the following properties: (a) the sets W 1 (k) and W 2 (k) are disjoint; and (b) from each node of U s (k) there exists a path to each other node in W s (k)\u s (k), s {1,2}. Induction Step k=1: Set U 1 = W 1 = {i 1 } and U 2 = W 2 = {i 2 }, where i 1, i 2 are two arbitrary different nodes of the graph that satisfy the properties (a) and (b). Induction Step k > 1: Suppose that for k 1 we found sets U 1 (k 1) W 1 (k 1) and U 2 (k 1) W(k 1) as in (a) and (b). Since U 1 (k 1) and U 2 (k 1) are disjoint, then there exists either an edge (i k,j 1 ) with j 1 U 1 (k 1), i k V \U 1 (k 1), or an edge (i k,j 2 ) with j 2 U 2 (k 1) and i k V \U 2 (k 1). Suppose that an edge (i k,j 2 ) exists (the case of a edge (i k,j 1 ) can be treated in a similar way). Only four cases are possible. (A) If i k W 1 (k 1) and W 1 (k 1) W 2 (k 1) = V, then we can terminate the algorithm and conclude that from any node h U 1 (k 1) there exists a path to all other nodes in the graph and thus there is a spanning tree. (B) If i k W 1 (k 1) and W 1 (k 1) W 2 (k 1) V, then set: U 1 (k) = U 1 (k 1), W 1 (k) = W 1 (k 1) W 2 (k 2), U 2 (k) = W 2 (k) = {h k }, where h k is an arbitrary node not belonging to W 1 (k 1) W 2 (k 1). (C) If i k / W 1 (k 1) W 2 (k 1), then set (D) If i k W 2 (k 1)\U 2 (k 1) then U 1 (k) = U 1 (k 1), W 1 (k) = W 1 (k 1), U 2 (k) = {i k }, W 2 (k) = W 2 (k 1) {i k }. U 1 (k) = U 1 (k 1), W 1 (k) = W 1 (k 1), U 2 (k) = U 2 (k 1) {i k }, W 2 (k) = W 2 (k 1). The algorithm terminates in a finite number of induction steps because at each step, except when finally case (A) holds true, either the number of nodes in W 1 W 2 increases, or the number of nodes in W 1 W 2 remains constant and the number of nodes in U 1 U 2 increases. The result is illustrated in Figure 5. We can also state the result in terms of global reachability: G has a globally reachable node if and only if, for any pair of nonempty disjoint subsets U 1, U 2 V, either U 1 has an out-neighbor or U 2 has an out-neighbor. We let the reader give a proper definition of an out-neighbor node of a set. 5

1.2 Weighted digraphs 1 BASIC NOTIONS U 2 U 2 U 1 U 1 (a) (b) Figure 5: An illustration of Lemma 1.3. The root of the spanning tree is plotted in gray. In (a), the root is outside the sets U 1 and U 2. Because these sets are non-empty, there exists a directed path from the root to a vertex in each one of these sets. Therefore, both U 1 and U 2 have in-neighbors. In (b), the root is contained in U 1. Because U 2 is non-empty, there exists a directed path from the root to a vertex in U 2, and, therefore, U 2 has in-neighbors. The case when the root belongs to U 2 is treated analogously. 1.2 Weighted digraphs A weighted digraph is a triplet G = (V,E,A), where the pair (V,E) is a digraph with nodes V = {v 1,...,v n }, and where the nonnegative matrix A R n n 0 is a weighted adjacency matrix with the following property: for i,j {1,...,n}, the entry a ij > 0 if (v i,v j ) is an edge of G, and a ij = 0 otherwise. In other words, the scalars a ij, for all (v i,v j ) E, are a set of weights for the edges of G. Note that the edge set is uniquely determined by the weighted adjacency matrix and it can therefore be omitted. When convenient, we denote the adjacency matrix of a weighted digraph G by A(G). Figure 6 shows an example of a weighted digraph. 4 2 6 1 1 2 1 2 3 4 6 7 Figure 6: A weighted digraph with natural weights. A digraph G = (V,E) can be naturally thought of as a weighted digraph by defining the weighted adjacency matrix A {0,1} n n as { 1, if (v i,v j ) E, a ij = (1) 0, otherwise, where V = {v 1,...,v n }. The adjacency matrix of a graph is the adjacency matrix of the directed version of the graph. Reciprocally, given a weighted digraph G = (V,E,A), we refer to the digraph (V,E) as the unweighted version of G and to its associated adjacency matrix as the unweighted adjacency matrix. A weighted digraph is undirected if a ij = a ji for all i,j {1,...,n}. Clearly, G is undirected if and only if A(G) is symmetric. 6

1.3 Distances 1 BASIC NOTIONS Example 1.4 (From a nonnegative matrix to its associated weighted digraph) Given a nonnegative n n matrix A, its associated weighted digraph is the weighted digraph with nodes {1,...,n}, and weighted adjacency matrix A. The unweighted version of this weighted digraph corresponds to the associated digraph defined in Example 1.1. Numerous concepts introduced for digraphs remain equally valid for the case of weighted digraphs, including the connectivity notions and the definitions of in- and out-neighbors. Finally, we generalize the notions of in- and out-degree to weighted digraphs. In a weighted digraph G = (V,E,A) with V = {v 1,...,v n }, the weighted out-degree and the weighted in-degree of vertex v i are defined by, respectively, d out (v i ) = n a ij, and d in (v i ) = j=1 n a ji. The weighted digraph G is weight-balanced if d out (v i ) = d in (v i ) for all v i V. The weighted out-degree matrix D out (G) and the weighted in-degree matrix D in (G) are the diagonal matrices defined by j=1 D out (G) = diag(a1 n ), and D in (G) = diag(a T 1 n ). That is, (D out (G)) ii = d out (v i ) and (D in (G)) ii = d in (v i ), respectively. Example 1.5 (Flocking) Consider the flocking example discussed in Lecture 2 over a graph G. Recall that in compact form we were able to write it as θ(t+1) = Fθ(t), with F the matrix with elements F ii = 1, 1+d { i 1 F ij = 1+d i j is a neighbor of i, 0 j is not a neighbor of i. We can now rewrite F using the matrices introduced above. Consider the graph G thought of as a weighted graph (i.e., with adjacency matrix given by (1)). Then, F = (I n +D) 1 (I n +A). We analyze the properties of matrices of this type in Section 2.1. 1.3 Distances We first present a few definitions for unweighted digraphs. Given a digraph G, the (topological) length of a directed path is the number of the edges composing it. Given two vertices u and v in the digraph G, the distance from u to v, denoted dist G (u,v), is the smallest length of any directed path from u to v, or + if there is no directed path from u to v. That is, dist G (u,v) = min ( {length(p) p is a directed path from u to v} {+ } ). Given a vertex v of a digraph G, the radius of v in G is the maximum of all the distances from v to any other vertex in G. That is, radius(v,g) = max{dist G (v,u) u V(G)}. If T is a directed tree and v is its root, then the depth of T is radius(v,t). Finally, the diameter of the digraph G is diam(g) = max{dist G (u,v) u,v V(G)}. These definitions lead to the following simple results: 7

2 ALGEBRAIC GRAPH THEORY (i) radius(v,g) diam(g) for all vertices v of G; (ii) G contains a spanning tree rooted at v if and only if radius(v,g) < + ; and (iii) G is strongly connected if and only if diam(g) < +. The definitions of path length, distance between vertices, radius of a vertex, and diameter of a digraph can be easily applied to undirected graphs. Next, we consider weighted digraphs. Given two vertices u and v in the weighted digraph G, the weighted distance from u to v, denoted wdist G (u,v), is the smallest weight of any directed path from u to v, or + if there is no directed path from u to v. That is, wdist G (u,v) = min ( {weight(p) p is a directed path from u to v} {+ } ). Here, the weight of a subgraph of a weighted digraph is the sum of the weights of all the edges of the subgraph. Note that when a digraph is thought of as a weighted digraph (with the unweighted adjacency matrix (1)), the notions of weight and weighted distance correspond to the usual notions of length and distance, respectively. We leave it to the reader to provide the definitions of weighted radius, weighted depth, and weighted diameter. 2 Algebraic graph theory Algebraicgraphtheory[3,4]isthestudyofmatricesdefinedbydigraphs: inthissection, weexposetwotopics. First, we study the equivalence between properties of graphs and of their associated adjacency matrices. We also specify how to associate a digraph to a nonnegative matrix. Second, we introduce and characterize the Laplacian matrix of a weighted digraph. 2.1 Properties related to adjacency matrices We begin by studying adjacency matrices. Note that the adjacency matrix of a weighted digraph is nonnegative and, in general, not stochastic. The following lemma expands on this point. Lemma 2.1 (Weight-balanced digraphs and doubly stochastic adjacency matrices): Let G be a weighted digraph of order n with weighted adjacency matrix A and weighted out-degree matrix D out. Define the matrix { D 1 F = outa, if each out-degree is strictly positive, (I n +D out ) 1 (I n +A), otherwise. Then (i) F is row-stochastic; and (ii) F is doubly stochastic if G is weight-balanced and the weighted degree is constant for all vertices. Proof: Consider first the case when each vertex has an outgoing edge so that D out is invertible. We first note that diag(v) 1 v = 1 n, for each v (R\{0}) n. Therefore ( D 1 outa ) 1 n = diag(a1 n ) 1( A1 n ) = 1n, 8

2.1 Properties related to adjacency matrices 2 ALGEBRAIC GRAPH THEORY which proves (i). Furthermore, if D out = D in = di n for some d R >0, then ( D 1 outa ) T 1n = 1 ( A T ) ( 1 n = D 1 in A T ) 1 n = diag(a T 1 n ) 1( A T ) 1 n = 1n, d which proves (ii). Finally, if (V,E,A) does not have outgoing edges at each vertex, then apply the statement to the weighted digraph (V,E {(i,i) i {1,...,n}},A+I n ). The next result characterizes the relationship between the adjacency matrix and directed paths in the digraph. Lemma 2.2 (Directed paths and powers of the adjacency matrix) Let G be a weighted digraph of order n with weighted adjacency matrix A, with unweighted adjacency matrix A 0,1 {0,1} n n, and possibly with self-loops. For all i,j,k {1,...,n} (i) the (i,j) entry of A k 0,1 equals the number of directed paths of length k (including paths with self-loops) from node i to node j; and (ii) the (i,j) entry of A k is positive if and only if there exists a directed path of length k (including paths with self-loops) from node i to node j. Proof: The second statement is a direct consequence of the first. The first statement is proved by induction. The statement is clearly true for k = 1. Next, we assume the statement is true for k 1 and we prove it for k+1. By assumption, the entry (A k ) ij equals the number of directed paths from i to j of length k. Note that each path from i to j of length k+1 identifies (1) a unique node l such that (i,l) is an edge of G and (2) a unique path from l to j of length k. We write A k+1 = AA k in components as (A k+1 ) ij = n A il (A k ) lj. l=1 Therefore, it is true that the entry (A k+1 ) ij equals the number of directed paths from i to j of length k+1. This concludes the induction argument. The following result characterizes in detail the relationship between various connectivity properties of the digraph and algebraic properties of the adjacency matrix. Proposition 2.3 (Connectivity properties of the digraph and positive powers of the adjacency matrix): Let G be a weighted digraph of order n with weighted adjacency matrix A. The following statements are equivalent: (i) G is strongly connected; (ii) A is irreducible; and (iii) n 1 k=0 Ak is positive. For any j {1,...,n}, the following two statements are equivalent: (iv) the jth node of G is globally reachable; and (v) the jth column of n 1 k=0 Ak has positive entries. Proof: (ii) = (i) We aim to show that there exist directed paths from any node to any other node. Fix i {1,...,n} and let R i {1,...,n} be the set of nodes that belong to directed paths originating from node i. Denote the unreachable nodes by U i = {1,...,n}\R i. We argue that U i cannot contain any element, 9

2.1 Properties related to adjacency matrices 2 ALGEBRAIC GRAPH THEORY because if it does, then R i U i is a nontrivial partition of the index set {1,...,n} and irreducibility implies the existence of a non-zero entry a jk with j R i and k U i. Therefore, U i =, and all nodes are reachable from i. The converse statement (i) = (ii) is proved similarly. (i) = (iii) If G is strongly connected, then there exists a directed path of length k n 1 connecting any node i to any other node j. Hence, by Lemma 2.2(ii), the entry (A k ) ij is strictly positive. This immediately implies the statement (iii). The converse statement (iii) = (i) is proved similarly. Example 2.4 Consider the digraph depicted in Figure 7. The adjacency matrix of the unweighted directed 1 3 2 Figure 7: An illustration of Proposition 2.3. graph is 0 1 1 A = 0 0 1 0 1 0 Even though vertices 2 and 3 are globally reachable, the digraph is not strongly connected because vertex 1 has no in-neighbor. Therefore, A is reducible. Stronger statements can be given for digraphs with self-loops. Proposition 2.5 (Connectivity properties of the digraph and positive powers of the adjacency matrix: cont d): Let G be a weighted digraph of order n with weighted adjacency matrix A and with self-loops at each node. The following statements are equivalent: (iv) G is strongly connected; and (v) A n 1 is positive. For any j {1,...,n}, the following two statements are equivalent: (iv) the jth node of G is globally reachable; and (v) the jth column of A n 1 has positive entries. Example 2.6 Consider the digraph depicted in Figure 8. The adjacency matrix A of the unweighted directed 10

2.1 Properties related to adjacency matrices 2 ALGEBRAIC GRAPH THEORY 1 3 2 Figure 8: An illustration of Proposition 2.5. graph and its square are 1 1 1 1 3 3 A = 0 1 1, A 2 = 0 2 2 0 1 1 0 2 2 Therefore, by Proposition 2.5, the vertex 1 is not globally reachable. Example 2.7 (Flocking revisited) Consider again Example 1.5. Note that the addition of the identity matrix I n to the adjancency matrix A effectively corresponds to the addition of a self-loop at each vertex of the graph. According to Proposition 2.5, if the graph G is connected, this implies that F n 1 > 0, i.e., the matrix F is primitive. Therefore, using the fact that F is row-stochastic and Perron-Frobenius [Lecture 2, Theorem 4.10 and Corollary 4.11], we deduce that the heading of the agents under the flocking algorithm with interaction topology described by a connected graph G asymptotically converges to lim θ(t) = t wt θ(0)1 n, where w is the left Perron eigenvector of F and 1 T nw = n. Next, we characterize the relationship between irreducible aperiodic digraphs and primitive matrices. Proposition 2.8 (Strongly connected and aperiodic digraph and primitive adjacency matrix): Let G be a weighted digraph of order n with weighted adjacency matrix A. The following two statements are equivalent: (i) G is strongly connected and aperiodic; and (ii) A is primitive, that is, there exists k N such that A k is positive. To prove this result, we first need to present a useful number theory result that states that relatively co-prime numbers generate all sufficiently large natural numbers. Lemma 2.9 (Natural number combination) Let a 1,...,a N N have greatest common divisor 1. There exists k N such that every number m > k can be written as m = α 1 a 1 + +α N a N, for appropriate numbers α 1,...,α N N. 11

2.1 Properties related to adjacency matrices 2 ALGEBRAIC GRAPH THEORY Proof: Assume that a 1 a N without loss of generality. From the generalized Bezout identity we know that, for any numbers a 1,...,a N with greatest common divisor 1, there exist integers γ 1,...,γ N Z such that 1 = γ 1 a 1 + +γ N a N. (2) Pick k = γ 1 a 2 1 + + γ N a 2 N N. Every number m > k can be written as m = k +m qtnt a 1 +m rmndr, for appropriate numbers m qtnt 0 and 1 m rmndr < a 1. Using the definition of k and equation (2), we write m = ( γ 1 a 2 1 + + γ N a 2 N) +mqtnt a 1 +m rmndr (γ 1 a 1 + +γ N a N ) = m qtnt a 1 +( γ 1 a 1 +m rmndr γ 1 )a 1 + +( γ N a N +m rmndr γ N )a N. The proof is now completed by noting that each integer number ( γ 1 a 1 +m rmndr γ 1 ),...,( γ N a N +m rmndr γ N ) is strictly positive, because m rmndr < a 1 a N. We are now ready to prove Proposition 2.8. Proof: [Proof of Proposition 2.8] (i) = (ii) Pick any i. We claim that there exists a number k(i) with the property that, for all m > k(i), we have that (A m ) ii is positive, that is, there exists a directed path from i to i of length m for all m larger than a number k(i). To show this claim, let {c 1,...,c N } be the set of the cycles of G and let {l 1,...,l N } be their lengths. Because G is aperiodic, Lemma 2.9 implies the existence of a number h(l 1,...,l N ) such that any number larger than h(l 1,...,l N ) is a linear combination of l 1,...,l N with natural numbers as coefficients. Because G is strongly connected, there exists a path γ of arbitrary length Γ(i) that starts at i, contains a vertex of each of the cycles c 1,...,c N, and terminates at i. Now, we claim that k(i) = Γ(i)+h(l 1,...,l N ) has the desired property. Indeed, pick any number m > k(i) and write it as k = Γ(i)+β 1 l 1 + +β N l N for appropriate numbers β 1,...,β N N. A directed path from i to i of length m is constructed by attaching to the path γ the following cycles: β 1 times the cycle c 1, β 2 times the cycle c 2,..., β N times the cycle c N. Finally, having proved the existence of k(i) with the desired property, let K be the maximum k(i) over all nodes i, and recall that diam(g) is the maximum pairwise distance between nodes. Clearly, A M is positive for all M > K +diam(g). (ii) = (i) From Lemma 2.2 we know that A k > 0 means that there are paths from every node to every other node of length k. Hence, the digraph G is strongly connected. Next, we prove aperiodicity. Because G is strongly connected, each node of G has at least one outgoing edge, that is, for all i, there exists at least one index j such that a ij > 0. This fact implies that the matrix A k+1 = AA k is positive via the following simple calculation: (A k+1 ) il = n h=1 a ih(a k ) hl a ij (A k ) jl > 0. In summary, we have shown that, if A k is positive for some k, then A m is positive for all subsequent m k. Therefore, there are cycles in G of any length greater than or equal to k, which means that G is aperiodic. Next, we emphasize how all results obtained so far have analogs that hold when the original object is a nonnegative matrix, instead of a weighted digraph. Example 2.10 (From a nonnegative matrix to its associated digraphs) Given a nonnegative n n matrix A, recall the associated digraphs introduced in Examples 1.1 and 1.4. The following statements are analogs of the previous results: (i) if A is stochastic, then its associated digraph has weighted out-degree matrix equal to I n. This is by the very definition of weighted out-degree matrix in Section 1.2; (ii) if A is doubly stochastic, then its associated weighted digraph is weight-balanced and, additionally, both in-degree and out-degree matrices are equal to I n. Again, by definition, cf. Section 1.2; 12

2.2 Properties related to Laplacian matrices 2 ALGEBRAIC GRAPH THEORY (iii) A is irreducible if and only if its associated weighted digraph is strongly connected. This is by Proposition 2.3; (iv) A is primitive if and only if its associated weighted digraph is strongly connected and aperiodic. This is by Proposition 2.8. In particular, note that the above discussion shows that if a nonnegative matrix is primitive, then it is irreducible. 2.2 Properties related to Laplacian matrices We conclude this section by studying a second relevant matrix associated to a digraph, called the Laplacian matrix. The Laplacian matrix of the weighted digraph G is L(G) = D out (G) A(G). Some immediate consequences of this definition are the following: (i) L(G)1 n = 0 n, that is, 0 is an eigenvalue of L(G) with eigenvector 1 n ; (ii) L(rev(G)) = D in (G) A(G) T, and (iii) G is undirected if and only if L(G) is symmetric; and (iv) L(G) equals the Laplacian matrix of the digraph obtained by adding to or removing from G any self-loop with arbitrary weight. Example 2.11 (Laplacian flow for agreement) Consider a group of n agents with states x 1,...,x n R whose objective is to achieve agreement. Let G be an undirected weighted graph modeling their interaction topology. One reasonable way for each agent to try to agree is by changing its state according to the disagreement with its neighbors. In other words, an agent can compute how much in disagreement it is with respect to its neighbors, and change its state accordingly. Mathematically, this corresponds to ẋ i = a ij (x j x i ), i {1,...,n}. (3) j N(i) (Note here that we are writing the flow in continuous time). This algorithm is clearly distributed. Does it achieve its agreement objective? Written in compact form, (3) reads ẋ = L(G)x (4) Note that agreement configurations are equilibria of this flow. But are they the only ones? We already know that 0 is an eigenvalue of L(G), so the matrix is not Hurwitz. Is the set of agreement configurations stable nevertheless? Finally, if agents achieve agreement, what is the value on which they agree? The following result states additional important properties of the Laplacian. These properties will help us answer the questions raised in Example 2.11. Theorem 2.12 (Properties of the Laplacian matrix) Let G be a weighted digraph of order n. The following statements hold: (i) all eigenvalues of L(G) have nonnegative real part (thus, if G is undirected, then L(G) is symmetric positive semidefinite); 13

2.2 Properties related to Laplacian matrices 2 ALGEBRAIC GRAPH THEORY (ii) if G is strongly connected, then rank(l(g)) = n 1, that is, 0 is a simple eigenvalue of L(G); (iii) G contains a globally reachable vertex if and only if rank(l(g)) = n 1; (iv) the following three statements are equivalent: (a) G is weight-balanced; (b) 1 T nl(g) = 0 T n; and (c) L(G)+L(G) T is positive semidefinite. Proof: We begin with statement (i). Let l ij, for i,j {1,...,n}, be the entries of L(G). Note that l ii = n j=1,j i a ij 0 and l ij = a ij 0 for i j. By the Geršgorin disks [Lecture 2, Theorem 2.1], we know that each eigenvalue of L(G) belongs to at least one of the disks { z C z lii C n j=1,j i } l ij = { } z C z l ii C l ii. These disks contain the origin 0 n and complex numbers with a positive real part. This concludes the proof of statement (i). Regarding statement (ii), note that D out (G) is invertible because G is strongly connected. Define the two matrices à = D out(g) 1 A(G) and L = D out (G) 1 L(G), and note that they satisfy L = I n Ã. Since D out (G) is diagonal, the matrices A(G) and à have the same pattern of zeros and positive entries. This observation and the assumption that G is strongly connected imply that à is nonnegative and irreducible. By Perron-Frobenius [Lecture 2, Theorem 4.7], the spectral radius ρ(ã) is a simple eigenvalue. Furthermore, one can verify that à is row-stochastic (see Lemma 2.1), and therefore, its spectral radius is 1. In summary, we conclude that 1 is a simple eigenvalue of Ã, that 0 is a simple eigenvalue of L, that L has rank n 1, and that L(G) has rank n 1. Regarding statement (iii), we first prove that rank(l(g)) = n 1 implies the existence of a globally reachable vertex. By contradiction, let G contain no globally reachable vertex. Then, by Lemma 1.3, there exist two nonempty disjoint subsets U 1, U 2 V(G) without any out-neighbor. After a permutation of the vertices, the adjacency matrix can be partitioned into the blocks A 11 0 0 A(G) = 0 A 22 0. A 31 A 32 A 33 Here, A 12 and A 13 vanish because U 1 does not have any out-neighbor, and A 21 and A 23 vanish because U 2 does not have any out-neighbor. Note that D 11 A 11 and D 22 A 22 are the Laplacian matrices of the graphs defined by restricting G to the vertices in U 1 and in U 2, respectively. Therefore, the eigenvalue 0 has geometric multiplicity at least 2 for the matrix D out (G) A(G). This contradicts the assumption that rank(l(g)) = n 1. Next, still regarding statement (iii), we prove that the existence of a globally reachable vertex implies rank(l(g)) = n 1. Without loss of generality, we assume that G contains self-loops at each node (so that D out is invertible). Let R be the set of globally reachable vertices; let r {1,...,n} be its cardinality. If r = n, then the graph is strongly connected and statement (ii) implies that rank(l(g)) = n 1. Therefore, assume that r < n. Renumber the vertices so that R is the set of the first r vertices. After this permutation, the adjacency matrix and the Laplacian matrix can be partitioned into the blocks [ ] [ ] A11 0 L11 0 A(G) =, and L(G) =. A 21 A 22 L 21 L 22 14

2.2 Properties related to Laplacian matrices 2 ALGEBRAIC GRAPH THEORY Here, A 12 R r (n r) vanishes, because there can be no out-neighbor of R; otherwise that out-neighbor would be a globally reachable vertex in V \ R. Note that the rank of L 11 R r r is exactly r 1, since the digraph associated to A 11 is strongly connected. To complete the proof it suffices to show that the rank of L 22 R (n r) (n r) is full. Note that the same block partition applies to the matrices à = D 1 outa and L = DoutL 1 considered in the proof of statement (ii) above. With this block decomposition, we compute [ à n 1 à n 1 = à 21 (n 1) 11 0 for some matrix Ã21(n 1) that depends upon Ã11, à 21 and Ã22. Because a globally reachable node in G is globally reachable also in the digraph associated to Ã, Proposition 2.3(v) implies that Ãn 1 21 is positive. This fact, combined with the fact that à and hence Ãn 1 are row-stochastic, implies that Ãn 1 22 has maximal row sum (that is, -induced norm) strictly less than 1. Hence, the spectral radii of Ãn 1 22 and of Ã22 are strictly less than 1. Since Ã22 has spectral radius strictly less than 1, the matrix L 22 = I n r Ã22, and in turn the matrix L 22, have full rank. Regarding statement (iv), the equivalence between (iv)a and (iv)b is proved as follows. Because n j=1 l ij = d out (v i ) d in (v i ) for all i {1,...,n}, it follows that 1 T nl(g) = 0 T n if and only if D out (G) = D in (G). Next, we prove that (iv)b implies (iv)c. Suppose that L(G) T 1 n = 0 T n and consider the system γ(t) = L(G)γ(t), γ(0) = x 0, together with the positive definite function V : R n R defined by V(x) = x T x. We compute the Lie derivative of the function V along the vector field x L(G)x as V(x) = 2x T L(G)x. Note that V(x) 0, for all x R n, is equivalent to L(G)+L(G) T 0. Because 1 T nl(g) = 0 T n and L(G)1 n = 0 n, it can immediately be established that exp( L(G)t), t R, is a doubly stochastic matrix. From [Lecture 2, Theorem 3.1], we know that if we let {P α } be the set of n n permutation matrices, then there exist timedependent convex combination coefficients α λ α(t) = 1, λ α (t) 0, such that exp( L(G)t) = α λ α(t)p α. By the convexity of V and its invariance under coordinate permutations, for any x R n, we have à n 1 22 ], V(exp( L(G)t)x) = V( α λ α (t)p α x) α λ α (t)v(p α x) = α λ α (t)v(x) = V(x). In other words, V(exp( L(G)t)x) V(x) for all x R n, which implies V(x) 0, for all x R n. Finally, we prove that (iv)c implies (iv)b. By assumption, x T (L(G)+L(G) T )x = 2x T L(G)x 0 for all x R n. In particular, for any small ε > 0 and x = 1 n εl(g) T 1 n, (1 T n ε1 T nl(g))l(g)(1 n εl(g) T 1 n ) = ε L(G) T 1 n 2 2 +O(ε 2 ) 0, which is possible only if L(G) T 1 n = 0 T n. Example 2.13 (Laplacian flow for agreement revisited) Consider the Laplacian flow introduced in Example 2.11 over a connected graph G. Theorem 2.12(ii) implies that 0 is a simple eigenvalue of L(G), so the only equilibria in this case of (4) are the set of agreement configurations. By Theorem 2.12(i), all the other eigenvalues of L(G) are positive, which can be used to show that the set of agreement configurations is in fact stable. Finally, note that 1 T nẋ = (1 T nl)x = 0, and hence 1 T nx is conserved throughout the evolution. In particular, this implies that the final agreement value is 1 T nx(0)/n, i.e., x(t) 1T nx(0) 1 n, t. n 15

REFERENCES REFERENCES References [1] F. Bullo, J. Cortés, and S. Martínez, Distributed Control of Robotic Networks, ser. Applied Mathematics Series. Princeton University Press, 2009, electronically available at http://coordinationbook.info. [2] J. Cortés, Distributed algorithms for reaching consensus on general functions, Automatica, vol. 44, no. 3, pp. 726 737, 2008. [3] N. Biggs, Algebraic Graph Theory, 2nd ed. Cambridge University Press, 1994. [4] C. D. Godsil and G. F. Royle, Algebraic Graph Theory, ser. Graduate Texts in Mathematics. Springer, 2001, vol. 207. 16