[Math] Minimum spanning trees given adjacency matrix of a graph

graph theorytrees

Consider the graph $G$ given by following adjacency matrix $A=\begin{pmatrix} 0 & 1 & 0 & 0 & 1 \\ 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 &1 &0 \\ 0 &1 &1 &0 & 1\\ 1&1 &0&1&0 \end{pmatrix}$

Find the number of minimum spanning trees of the graph $G$

How do I find the number of minimum spanning trees? I can use Prim algorithm and find a minimum spanning tree but how do I know how many they are?

I draw the graph $G$ given its adjacency matrix:

enter image description here

Thanks in advance.

Best Answer

You can use Kirchhoff's theorem. Let $D$ be the diagonal matrix whose entries are the degrees of the vertices of G. If you delete any row of $A-D$ (the Laplacian matrix) and its corresponding column, then the determinant of the resulting minor is the number of spanning trees for the graph.

Related Question