HOME

TheInfoList



OR:

In the
mathematical Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
field of
graph theory In mathematics and computer science, graph theory is the study of ''graph (discrete mathematics), graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of ''Vertex (graph ...
, Kirchhoff's theorem or Kirchhoff's matrix tree theorem named after
Gustav Kirchhoff Gustav Robert Kirchhoff (; 12 March 1824 – 17 October 1887) was a German chemist, mathematician, physicist, and spectroscopist who contributed to the fundamental understanding of electrical circuits, spectroscopy and the emission of black-body ...
is a theorem about the number of
spanning tree In the mathematical field of graph theory, a spanning tree ''T'' of an undirected graph ''G'' is a subgraph that is a tree which includes all of the vertices of ''G''. In general, a graph may have several spanning trees, but a graph that is no ...
s in a
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discret ...
, showing that this number can be computed in
polynomial time In theoretical computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations p ...
from the
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
of a
submatrix In mathematics, a matrix (: matrices) is a rectangular array or table of numbers, symbols, or expressions, with elements or entries arranged in rows and columns, which is used to represent a mathematical object or property of such an object. ...
of the graph's
Laplacian matrix In the mathematical field of graph theory, the Laplacian matrix, also called the graph Laplacian, admittance matrix, Kirchhoff matrix, or discrete Laplacian, is a matrix representation of a graph. Named after Pierre-Simon Laplace, the graph Lap ...
; specifically, the number is equal to ''any'' cofactor of the Laplacian matrix. Kirchhoff's theorem is a generalization of
Cayley's formula In mathematics, Cayley's formula is a result in graph theory named after Arthur Cayley. It states that for every positive integer n, the number of trees on n labeled vertices is n^. The formula equivalently counts the spanning trees of a ...
which provides the number of spanning trees in a
complete graph In the mathematical field of graph theory, a complete graph is a simple undirected graph in which every pair of distinct vertices is connected by a unique edge. A complete digraph is a directed graph in which every pair of distinct vertices i ...
. 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 In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero; the term usually refers to square matrices. Elements of the main diagonal can either be zero or nonzero. An example of a 2×2 diagon ...
of vertex degrees) and its
adjacency matrix In graph theory and computer science, an adjacency matrix is a square matrix used to represent a finite graph (discrete mathematics), graph. The elements of the matrix (mathematics), matrix indicate whether pairs of Vertex (graph theory), vertices ...
(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
eigenvalue In linear algebra, an eigenvector ( ) or characteristic vector is a vector that has its direction unchanged (or reversed) by a given linear transformation. More precisely, an eigenvector \mathbf v of a linear transformation T is scaled by a ...
s of its Laplacian matrix. Then the number of spanning trees of ''G'' is :t(G) = \frac \lambda_1\lambda_2\cdots\lambda_\,. An English translation of Kirchhoff's original 1847 paper was made by J. B. O'Toole and published in 1958.


An example using the matrix-tree theorem

First, construct the Laplacian matrix ''Q'' for the example
diamond graph In the mathematical field of graph theory, the diamond graph is a planar, undirected graph with 4 vertices and 5 edges. It consists of a complete graph minus one edge. The diamond graph has radius 1, diameter 2, girth 3, chroma ...
''G'' (see image on the right): : Q = \left begin 2 & -1 & -1 & 0 \\ -1 & 3 & -1 & -1 \\ -1 & -1 & 3 & -1 \\ 0 & -1 & -1 & 2 \end\right Next, construct a matrix ''Q''* by deleting any row and any column from ''Q''. For example, deleting row 1 and column 1 yields : Q^\ast = \left begin 3 & -1 & -1 \\ -1 & 3 & -1 \\ -1 & -1 & 2 \end\right 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 outline

(The proof below is based on the
Cauchy–Binet formula In mathematics, specifically linear algebra, the Cauchy–Binet formula, named after Augustin-Louis Cauchy and Jacques Philippe Marie Binet, is an identity for the determinant of the product of two rectangular matrices of transpose shapes (so th ...
. An elementary induction argument for Kirchhoff's theorem can be found on page 654 of Moore (2011).) 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 ''M''11 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 ''k''th 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 In mathematics, an incidence matrix is a logical matrix that shows the relationship between two classes of objects, usually called an incidence relation. If the first class is ''X'' and the second is ''Y'', the matrix has one row for each element o ...
for understanding this modified incidence matrix ''E''). For the preceding example (with ''n'' = 4 and ''m'' = 5): :E = \begin 1 & 1 & 0 & 0 & 0 \\ -1 & 0 & 1 & 1 & 0 \\ 0 & -1 & -1 & 0 & 1 \\ 0 & 0 & 0 & -1 & -1 \\ \end. Recall that the Laplacian ''L'' can be factored into the product of the
incidence matrix In mathematics, an incidence matrix is a logical matrix that shows the relationship between two classes of objects, usually called an incidence relation. If the first class is ''X'' and the second is ''Y'', the matrix has one row for each element o ...
and its
transpose In linear algebra, the transpose of a Matrix (mathematics), matrix is an operator which flips a matrix over its diagonal; that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other ...
, i.e., ''L'' = ''EE''T. Furthermore, let ''F'' be the matrix ''E'' with its first row deleted, so that ''FF''T = ''M''11. Now the
Cauchy–Binet formula In mathematics, specifically linear algebra, the Cauchy–Binet formula, named after Augustin-Louis Cauchy and Jacques Philippe Marie Binet, is an identity for the determinant of the product of two rectangular matrices of transpose shapes (so th ...
allows us to write :\det\left(M_\right) = \sum_S \det\left(F_S\right)\det\left(F_S^\right) = \sum_S \det\left(F_S\right)^2 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 generalizations


Cayley's formula

Cayley's formula In mathematics, Cayley's formula is a result in graph theory named after Arthur Cayley. It states that for every positive integer n, the number of trees on n labeled vertices is n^. The formula equivalently counts the spanning trees of a ...
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 In physics and mathematics, the dimension of a mathematical space (or object) is informally defined as the minimum number of coordinates needed to specify any point within it. Thus, a line has a dimension of one (1D) because only one coo ...
''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 :\begin n-1 & -1 & \cdots & -1 \\ -1 & n-1 & \cdots & -1 \\ \vdots & \vdots& \ddots & \vdots \\ -1 & -1 & \cdots & n-1 \\ \end. Any cofactor of the above matrix is ''nn''−2, which is Cayley's formula.


Kirchhoff's theorem for multigraphs

Kirchhoff's theorem holds for
multigraph In mathematics, and more specifically in graph theory, a multigraph is a graph which is permitted to have multiple edges (also called ''parallel edges''), that is, edges that have the same end nodes. Thus two vertices may be connected by mor ...
s 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 by same methods produced above, since a simple graph is a multigraph with ''m'' = 1.


Explicit enumeration of spanning trees

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 In mathematics, a homogeneous polynomial, sometimes called quantic in older texts, is a polynomial whose nonzero terms all have the same degree. For example, x^5 + 2 x^3 y^2 + 9 x y^4 is a homogeneous polynomial of degree 5, in two variables ...
(the Kirchhoff polynomial) in the indeterminates corresponding to the edges of the graph. After collecting terms and performing all possible cancellations, each
monomial In mathematics, a monomial is, roughly speaking, a polynomial which has only one term. Two definitions of a monomial may be encountered: # A monomial, also called a power product or primitive monomial, is a product of powers of variables with n ...
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).


Matroids

The spanning trees of a graph form the bases of a
graphic matroid In the mathematical theory of Matroid theory, matroids, a graphic matroid (also called a cycle matroid or polygon matroid) is a matroid whose independent sets are the tree (graph theory), forests in a given finite undirected graph. The dual matr ...
, 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 .


Kirchhoff's theorem for directed multigraphs

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 ''i''th row and column of ''Q''


Counting spanning ''k''-component forests

Kirchhoff's theorem can be generalized to count -component spanning
forest A forest is an ecosystem characterized by a dense ecological community, community of trees. Hundreds of definitions of forest are used throughout the world, incorporating factors such as tree density, tree height, land use, legal standing, ...
s in an unweighted graph. A -component spanning forest is a subgraph with 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 F_1, \dots, F_k, define its weight w(F) = , V(F_1), \cdot \dots \cdot , V(F_k), to be the product of the number of vertices in each component. Then :\sum_F w(F) = q_k, where the sum is over all -component spanning forests and q_k is the coefficient of x^k of the polynomial :(x+\lambda_1) \dots (x+\lambda_) x. The last factor in the polynomial is due to the zero eigenvalue \lambda_n=0. More explicitly, the number q_k can be computed as :q_k = \sum_ \lambda_ \dots \lambda_. where the sum is over all ''n''−''k''-element subsets of \. For example \begin q_ &= \lambda_1 + \dots + \lambda_ = \mathrm Q = 2, E, \\ q_ &= \lambda_1\lambda_2 + \lambda_1 \lambda_3 + \dots + \lambda_ \lambda_ \\ q_ &= \lambda_1 \dots \lambda_ + \lambda_1 \dots \lambda_ \lambda_ + \dots + \lambda_2 \dots \lambda_\\ q_ &= \lambda_1 \dots \lambda_ \\ \end 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 (n-k) \times (n-k) submatrix of the incidence matrix corresponds bijectively to a ''k''-component spanning forest with a choice of vertex for each component. The coefficients q_k are up to sign the coefficients of the
characteristic polynomial In linear algebra, the characteristic polynomial of a square matrix is a polynomial which is invariant under matrix similarity and has the eigenvalues as roots. It has the determinant and the trace of the matrix among its coefficients. The ...
of ''Q''.


See also

* List of topics related to trees * BEST theorem * Markov chain tree theorem *
Minimum spanning tree A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight. ...
* Prüfer sequence


References

*. *. *. * {{refend Algebraic graph theory Spanning tree Theorems in graph theory Gustav Kirchhoff