Lecture J jacques@ucsd.edu Notation: Let [n] [n] := [n] 2. A weighted digraph is a function W : [n] 2 R. An arborescence is, loosely speaking, a digraph which consists in orienting eery edge of a rooted tree towards its root. Let τ(w, ) be the (weighted) number of arborescences in W rooted at. Adjacency matrix A(W ) and Laplacian matrix L(W ) of a weighted digraph W, outdegree and indegree d + (i) and d (i) of a ertex i, dual G of a planar graph G, constructions G G and G G, entropy h(n). 10 Counting subgraphs A subgraph of a graph G = (V, E) is a graph H = (W, F ) with W V and F E. A spanning subgraph of G is a subgraph H with V (H) = V (G). One of the fundamental problems is to count the number of subgraphs of a graph G isomorphic to a graph from a family F of graphs. If F is finite, this depends highly on local features of the graph, for instance on the density of G. In the present lecture, we consider the case of counting spanning subgraphs. The interesting cases, especially in statistical physics, are spanning trees and perfect matchings. Spanning paths and cycles are interesting from a complexity point of iew in the context of the traelling salesman problem. 10.1 Kirchhoff s atrix-tree Theorem Let [n] [n] = [n] 2. A weighted digraph with ertex set [n] is a function W : [n] 2 R. The outdegree and indegree of a ertex i in a weighted digraph W are respectiely defined by d + (i) = (i,j) [n] 2 W (i, j) and d (i) = (j,i) [n 2 ] W (j, i). An arborescence is a weighted digraph W : [n] 2 {0, 1} which arises from a rooted tree T on [n] by defining W (i, j) = 1 if {i, j} is an edge of T and j is closer to the root than i, and W (i, j) = 0 otherwise, for (i, j) [n] 2. In other words, loosely speaking, we orient eery edge of T towards the root of T. If T is rooted at i [n], then the associated arborescence is called an i-arborescence. Let T i be the set of all i-arborescences on [n]. Let W be a weighted digraph on [n] and i [n]. Define τ(w, i) = W 0 T i 1 (i,j) [n] 2 W 0 (i,j)=1 W (i, j)
We will show that τ(w, i) can be expressed as a determinant of a certain matrix. Let U i denote the set of weighted digraphs W : [n] 2 {0, 1} in which eery ertex other than i has outdegree 1 and i has outdegree 0. Note that W i U i. Figure 1 : Typical elements of W and U. The adjacency matrix of a weighted digraph W on [n], denoted A = A(W ), is the matrix whose rows and columns are indexed by [n] and where A ij = W (i, j) for i, j [n]. Let D = D(W ) be the diagonal matrix with D ii = d + (i). The Laplacian matrix of W is L = L(W ) = D A. For i [n], let L i denote the minor matrix obtained from L by remoing row and column i from L. Theorem 1 Let W be a weighted digraph on [n]. Then for any [n], τ(w, ) = det(l ). Proof We may assume = n without loss of generality. Let = (X(i, j) : (i, j) [n] X 2 ) and consider the polynomial ring R[ X]. Let L = L( X) denote the corresponding Laplacian matrix. Then the determinant of L is a polynomial Φ( X) = n 1 sgn(π) L iπ(i) ( X). π S n 1 i=1 Each monomial in the expansion of this polynomial has a special form, due to the definition of L iπ(i). Precisely, for U U, let π = π(u) denote the permutation in S n 1 defined by π(i) = i if i is not in any cycle of U, and π(i) = j if U(i, j) = 1 and i is in a cycle of U. In other words, we map the cycles of U to cycles in the permutation π(u) and leae all other 2
ertices of [n]\{} as fixed points of π(u). Let X U denote the monomial n 1 i=1 X i,π(i) with π = π(u). Then eery monomial in Φ( X) has the form X U for some U U. Fixing U U, we determine [ X U ]Φ( X). First consider the case that U is not an arborescence. Then π(u) has m 1 cycles. Let σ be a permutation containing r of these cycles, say γ 1, γ 2,..., γ r, and fixed points elsewhere. The contribution of such a permutation to [ X U ]Φ( X) is r sgn(γ i )( 1) γi = ( 1) r where γ i is the length of the cycle γ i. We conclude that i=1 [ X U ]Φ( X) = m r=0 ( ) m ( 1) r = 0. r Finally, suppose U U is an arborescence i.e. U W. Then π(u) is the identity and n 1 ( [ X U ]Φ( X) = [ X U ] i=1 j [n] ) X(i, j) = 1. We hae shown that Φ( X) = U W XU. Finally, replacing X(i, j) with W (i, j) in this expression, we obtain the required formula τ(w, ) = det(l ). If W is symmetric, then the Laplacian matrix L(W ) is symmetric and can be diagonalized. Note that L(W ) always has a zero eigenalue. By the aboe theorem, if L(W ) has two zero eigenalues, then τ(w, ) = 0 for eery. If L(W ) is symmetric and has only one zero eigenalue, let λ 1, λ 2,..., λ n 1 be the non-zero eigenalues. Then the preceding theorem shows τ(w, ) = λ 1 λ 2... λ n 1 regardless of which we pick for the root. A consequence is that the eigenalues determine the number of spanning trees for graphs: Theorem 2 Let G be a connected graph with Laplacian matrix L haing non-zero eigenalues λ 1, λ 2,..., λ n 1, and let τ(g) be the number of spanning trees of G. Then τ(g) = 1 n λ 1λ 2... λ n 1. In particular, if K n is the complete graph on n ertices, then τ(k n ) = n n 2. 3
Proof Define W (u, ) = W (, u) = 1 if {u, } E(G) and W (u, ) = 0 otherwise. For any V (G), τ(w, ) = λ 1 λ 2... λ n 1. Now each spanning tree of G gies rise to n arborescences, based on where the root is chosen. Therefore τ(g) = 1 τ(w, ) and the n proof is complete. For the second part, obsere that the Laplacian matrix of K n has 1 off the main diagonal and n 1 on the main diagonal. Therefore n is an eigenalue of the Laplacian matrix with algebraic multiplicity n 1, and so τ(k n ) = 1 n nn 1 by the first part of the proof. 10.2 Spanning trees in grids In statistical physics, counting spanning trees and matchings is important in the case that the graph is a finite portion of a lattice. In particular, matchings of the hexagonal lattice correspond to so-called stepped surfaces in Z 3, and there is a tremendous theory behind random surfaces. We consider the special case of the m n box B m,n, which is the graph on ertex set [m] [n] where (x, y) is adjacent to the points (x + 1, y), (x, y + 1), (x 1, y), (x, y 1) [m] [n]. Eigenfunctions for the Laplacian matrix of the integer grid Z 2 are found as functions f : Z 2 R such that 4f(x, y) = f(x, y + 1) + f(x + 1, y) + f(x, y 1) + f(x 1, y) + λf(x, y). If z and w are two complex numbers with unit modulus and f(x, y) = z x w y and λ = 4 z w 1 z 1 w, then f is an eigenfunction for Z2 with eigenalue λ. By restricting f to B m,n in the right way, we get that the eigenalues of B m,n are all gien by 4 πi m n where 0 i m 1 and 0 j n 1. The zero eigenalue occurs when i = j = 0 and the remaining ones are positie. By the matrix-tree theorem, τ(b m,n ) = 1 [4 πi m n mn ]. (i,j) (0,0) For portions of arious other lattices, such as the triangular portions of the hexagonal or triangular lattices, the number of spanning trees can be found, but the formulas for eigenalues of the Laplacian quickly become more complicated for other lattice. Instead we turn to a well-known bijection due to Temperley for relating spanning trees to perfect matchings in certain graphs. 10.3 The Temperley Bijection Temperley showed that the number of perfect matchings of a (2m 1) (2n 1) grid with the top right corner remoed equals the number of spanning trees of the m n grid graph. 4
The bijection inoles a simple use of planar duality, and the argument works for planar graphs in general. Start with a connected graph G embedded in the plane, where the edges are identified with simple cures. Recall the combinatorial dual is a graph G embedded in the plane in which we place in the interior of each face f of G a ertex f and where f is joined by a cure γ e to g for each edge e in common to the boundary of f and g and such that the cure γ e passes through an interior point of e. The union of the graphs G and G is a new graph drawn in the plane, but it has crossings, namely at the points e γ e. Let G G be obtained from G G by placing a ertex at each crossing. This graph is shown below on the left. The original graph G is shown in blue, the dual G is in orange, and the ertices at crossings are drawn in green. The ertex corresponds to the outer face and all the orange half-edges hae as their other endpoint. * Figure 2 : The graphs G G and G G. For an edge e E(G), there is a unique ertex (e) in the interior of e which was placed at a crossing of some other edge with e, and we call (e) the crossing ertex of e these are green in the figure aboe. Fix a ertex V (G) and a ertex V (G ). Let G G be obtained from G G by deleting and. Note that the graph G G is bipartite, and one of the parts is V (G)\{} V (G )\{ } whereas the other part consists of all E(G) crossing ertices. This graph and its bipartition is shown to the right in Figure 2. The parts both hae the same number of ertices, since V (G) + V (G 2 = (2 + E(G) F (G) ) + F (G) 2 = E(G) by Euler s Formula and since G is connected. We now gie a bijection from the spanning trees of G rooted at to the perfect matchings of G G. Let T be a spanning tree of G 5
rooted at. Let T 1 G G be the tree whose ertex set consists of V (T ) together with all crossing ertices in edges of T, and let the edge set of T 1 be the set of all edges {x, (e)} and {y, (e)} with e = {x, y} E(T ). If we remoe the ertices of T 1 from G G, then what remains of G G is a tree T 2 which contains all the ertices of G and we root T 2 at. Since T 1 {} and T 2 { } are acyclic, they each hae a unique perfect matching. Let be the union of the unique perfect matching of T 1 {} and the unique perfect matching of T 2 { }. Then there is a one-to-one correspondence between and the pair of trees (T 1, T 2 ), and therefore between and the tree T. Continuing on from Figure 2, we draw in the trees T 1 and T 2 and the matching, with T 1 in blue and T 2 in orange: * Figure 3 : The trees T 1 and T 2 and the matching. In fact, this setup can be generalized to the case where G is actually a weighted digraph embedded in the plane without crossings. We do not do this here, although it proes ery useful for counting matchings in general planar graphs. of the m n grid graph. Instead, we focus on the case In that case, the aboe argument shows that the number of spanning trees of the m by n grid graph is equal to the number of perfect matchings of the (2m 1) (2n 1) grid graph minus the top right corner. To see this, let be the top right ertex of the m n grid graph embedded in the usual way, and let be ertex representing the infinite face in the dual. Then G G is exactly the (2m 1) (2n 1) grid graph with the top right ertex remoed. In particular, the number of perfect matchings in this graph is τ(b m,n ) = 1 mn (i,j) (0,0) [4 πi m n ]. A trick can be applied to determine the number of perfect matchings in the m n grid when at least one of m and n is een. For instance, in the case that m = 2k 2 is een 6
and n = 2l 1 is odd, add to B k,l a new ertex joined to all the rightmost ertices in B k,l this ertex has degree m. Let this graph be G. Then one checks that G G is the m n grid when when is the ertex of G corresponding to the outer face of G. Then the eigenalues of this altered Laplacian are 4 π(2i+1) 2m+1 n and their product oer (i, j) (0, 0) with 0 i m 1 and 0 j n 1 gies the number of spanning trees and hence perfect matchings in the m n grid. We leae it to the reader to decide how to obtain the number of perfect matchings in the m n grid when m and n are both een. 10.4 Asymptotics Define the entropy h(n) = 1 log τ(b n n,n) where τ(b n,n ) is the number of spanning trees of the n n grid. It is natural to consider the logarithm in iew of the product representation of τ(b n,n ) determined aboe. For the infinite grid, one has the eigenalues 4 θ ϕ where 0 θ, ϕ 2π. The entropy conerges to a double integral since it is a Riemann sum, and it conerges as n to 1 2π 4π 2 0 2π 0 [4 θ ϕ]dθdϕ = 4 π ( 1) k = 1.166.... k 2 k=1 Thus the number of spanning trees in the n n grid is roughly 1.166 n. 7