Kirchhoff's theorem

Revision as of 17:42, 18 February 2025 by imported>Eric Rowland (remove broken external link)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description Template:Confused In the mathematical field of graph theory, Kirchhoff's theorem or Kirchhoff's matrix tree theorem named after Gustav Kirchhoff is a theorem about the number of spanning trees in a graph, showing that this number can be computed in polynomial time from the determinant of a submatrix of the graph's Laplacian matrix; specifically, the number is equal to any cofactor of the Laplacian matrix. Kirchhoff's theorem is a generalization of Cayley's formula which provides the number of spanning trees in a complete graph.

Kirchhoff's theorem relies on the notion of the Laplacian matrix of a graph, which is equal to the difference between the graph's degree matrix (the diagonal matrix of vertex degrees) and its adjacency matrix (a (0,1)-matrix with 1's at places corresponding to entries where the vertices are adjacent and 0's otherwise).

For a given connected graph G with n labeled vertices, let λ1λ2, ..., λn−1 be the non-zero eigenvalues of its Laplacian matrix. Then the number of spanning trees of G is

<math>t(G) = \frac{1}{n} \lambda_1\lambda_2\cdots\lambda_{n-1}\,.</math>

An English translation of Kirchhoff's original 1847 paper was made by J. B. O'Toole and published in 1958.<ref>Template:Cite journal</ref>

An example using the matrix-tree theoremEdit

File:Graph with all its spanning trees.svg
The Matrix-Tree Theorem can be used to compute the number of labeled spanning trees of this graph.

First, construct the Laplacian matrix Q for the example diamond graph G (see image on the right):

<math>Q = \left[\begin{array}{rrrr}

2 & -1 & -1 & 0 \\ -1 & 3 & -1 & -1 \\ -1 & -1 & 3 & -1 \\ 0 & -1 & -1 & 2 \end{array}\right].</math>

Next, construct a matrix Q* by deleting any row and any column from Q. For example, deleting row 1 and column 1 yields

<math>Q^\ast = \left[\begin{array}{rrr}

3 & -1 & -1 \\ -1 & 3 & -1 \\ -1 & -1 & 2 \end{array}\right].</math>

Finally, take the determinant of Q* to obtain t(G), which is 8 for the diamond graph. (Notice t(G) is the (1,1)-cofactor of Q in this example.)

Proof outlineEdit

(The proof below is based on the Cauchy–Binet formula. An elementary induction argument for Kirchhoff's theorem can be found on page 654 of Moore (2011).<ref name="Moore 2011 p. 654 ">Template:Cite book</ref>)

First notice that the Laplacian matrix has the property that the sum of its entries across any row and any column is 0. Thus we can transform any minor into any other minor by adding rows and columns, switching them, and multiplying a row or a column by −1. Thus the cofactors are the same up to sign, and it can be verified that, in fact, they have the same sign.

We proceed to show that the determinant of the minor M11 is the number of spanning trees. Let n be the number of vertices of the graph, and m the number of its edges. The incidence matrix E is an n-by-m matrix, which may be defined as follows: suppose that (i, j) is the kth edge of the graph, and that i < j. Then Eik = 1, Ejk = −1, and all other entries in column k are 0 (see oriented incidence matrix for understanding this modified incidence matrix E). For the preceding example (with n = 4 and m = 5):

<math>E = \begin{bmatrix}
  1 &  1 &  0 &  0 &  0 \\
 -1 &  0 &  1 &  1 &  0 \\
  0 & -1 & -1 &  0 &  1 \\
  0 &  0 &  0 & -1 & -1 \\

\end{bmatrix}.</math>

Recall that the Laplacian L can be factored into the product of the incidence matrix and its transpose, i.e., L = EET. Furthermore, let F be the matrix E with its first row deleted, so that FFT = M11.

Now the Cauchy–Binet formula allows us to write

<math>\det\left(M_{11}\right) = \sum_S \det\left(F_S\right)\det\left(F_S^{\mathrm{T}}\right) = \sum_S \det\left(F_S\right)^2</math>

where S ranges across subsets of [m] of size n − 1, and FS denotes the (n − 1)-by-(n − 1) matrix whose columns are those of F with index in S. Then every S specifies n − 1 edges of the original graph, and it can be shown that those edges induce a spanning tree if and only if the determinant of FS is +1 or −1, and that they do not induce a spanning tree if and only if the determinant is 0. This completes the proof.

Particular cases and generalizationsEdit

Cayley's formulaEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} Cayley's formula follows from Kirchhoff's theorem as a special case, since every vector with 1 in one place, −1 in another place, and 0 elsewhere is an eigenvector of the Laplacian matrix of the complete graph, with the corresponding eigenvalue being n. These vectors together span a space of dimension n − 1, so there are no other non-zero eigenvalues.

Alternatively, note that as Cayley's formula gives the number of distinct labeled trees of a complete graph Kn we need to compute any cofactor of the Laplacian matrix of Kn. The Laplacian matrix in this case is

<math>\begin{bmatrix}
 n-1 & -1      & \cdots & -1      \\
 -1  & n-1     & \cdots & -1      \\
 \vdots & \vdots& \ddots & \vdots \\
 -1 & -1      & \cdots & n-1      \\

\end{bmatrix}.</math>

Any cofactor of the above matrix is nn−2, which is Cayley's formula.

Kirchhoff's theorem for multigraphsEdit

Kirchhoff's theorem holds for multigraphs as well; the matrix Q is modified as follows:

  • The entry qi,j equals −m, where m is the number of edges between i and j;
  • when counting the degree of a vertex, all loops are excluded.

Cayley's formula for a complete multigraph is Template:Nowrap by same methods produced above, since a simple graph is a multigraph with m = 1.

Explicit enumeration of spanning treesEdit

Kirchhoff's theorem can be strengthened by altering the definition of the Laplacian matrix. Rather than merely counting edges emanating from each vertex or connecting a pair of vertices, label each edge with an indeterminate and let the (i, j)-th entry of the modified Laplacian matrix be the sum over the indeterminates corresponding to edges between the i-th and j-th vertices when i does not equal j, and the negative sum over all indeterminates corresponding to edges emanating from the i-th vertex when i equals j.

The determinant of the modified Laplacian matrix by deleting any row and column (similar to finding the number of spanning trees from the original Laplacian matrix), above is then a homogeneous polynomial (the Kirchhoff polynomial) in the indeterminates corresponding to the edges of the graph. After collecting terms and performing all possible cancellations, each monomial in the resulting expression represents a spanning tree consisting of the edges corresponding to the indeterminates appearing in that monomial. In this way, one can obtain explicit enumeration of all the spanning trees of the graph simply by computing the determinant.

For a proof of this version of the theorem see Bollobás (1998).<ref>Template:Cite book</ref>

MatroidsEdit

The spanning trees of a graph form the bases of a graphic matroid, so Kirchhoff's theorem provides a formula for the number of bases in a graphic matroid. The same method may also be used to determine the number of bases in regular matroids, a generalization of the graphic matroids Template:Harv.

Kirchhoff's theorem for directed multigraphsEdit

Kirchhoff's theorem can be modified to give the number of oriented spanning trees in directed multigraphs. The matrix Q is constructed as follows:

  • The entry qi,j for distinct i and j equals −m, where m is the number of edges from i to j;
  • The entry qi,i equals the indegree of i minus the number of loops at i.

The number of oriented spanning trees rooted at a vertex i is the determinant of the matrix gotten by removing the ith row and column of Q

Counting spanning k-component forestsEdit

Kirchhoff's theorem can be generalized to count Template:Mvar-component spanning forests in an unweighted graph.<ref>Template:Cite book</ref> A Template:Mvar-component spanning forest is a subgraph with Template:Mvar connected components that contains all vertices and is cycle-free, i.e., there is at most one path between each pair of vertices. Given such a forest F with connected components <math display="inline">F_1, \dots, F_k</math>, define its weight <math display="inline">w(F) = |V(F_1)| \cdot \dots \cdot |V(F_k)|</math> to be the product of the number of vertices in each component. Then

<math>\sum_F w(F) = q_k,</math>

where the sum is over all Template:Mvar-component spanning forests and <math display="inline">q_k</math> is the coefficient of <math display="inline">x^k</math> of the polynomial

<math>(x+\lambda_1) \dots (x+\lambda_{n-1}) x.</math>

The last factor in the polynomial is due to the zero eigenvalue <math display="inline">\lambda_n=0</math>. More explicitly, the number <math display="inline">q_k</math> can be computed as

<math>q_k = \sum_{\{i_1, \dots, i_{n-k}\}\subset\{1\dots n-1\}} \lambda_{i_1} \dots \lambda_{i_{n-k}}.</math>

where the sum is over all nk-element subsets of <math display="inline">\{1, \dots, n\}</math>. For example

<math>\begin{align} q_{n-1} &= \lambda_1 + \dots + \lambda_{n-1} = \mathrm{tr} Q = 2|E| \\ q_{n-2} &= \lambda_1\lambda_2 + \lambda_1 \lambda_3 + \dots + \lambda_{n-2} \lambda_{n-1} \\ q_{2} &= \lambda_1 \dots \lambda_{n-2} + \lambda_1 \dots \lambda_{n-3} \lambda_{n-1} + \dots + \lambda_2 \dots \lambda_{n-1}\\ q_{1} &= \lambda_1 \dots \lambda_{n-1} \\ \end{align}</math>

Since a spanning forest with n−1 components corresponds to a single edge, the k = n−1 case states that the sum of the eigenvalues of Q is twice the number of edges. The k = 1 case corresponds to the original Kirchhoff theorem since the weight of every spanning tree is n.

The proof can be done analogously to the proof of Kirchhoff's theorem. An invertible <math>(n-k) \times (n-k)</math> submatrix of the incidence matrix corresponds bijectively to a k-component spanning forest with a choice of vertex for each component.

The coefficients <math display="inline">q_k</math> are up to sign the coefficients of the characteristic polynomial of Q.

See alsoEdit

ReferencesEdit

Template:Reflist Template:Refbegin

Template:Refend