Finding the number of spanning trees for a graph

35 Views Asked by At

G

I just wanted to know if my answer is correct. I found 8 spanning trees by contracting the edge in the middle of the triangle.

1

There are 1 best solutions below

0
On

Yes, the number of spanning trees is 8. We can verify it by considering the Laplacian Matrix of the graph $$\begin{bmatrix} 2&-1&-1&0&0\\ -1&4&-1&-1&-1\\ -1&-1&3&-1&0\\ 0&-1&-1&2&0\\0&-1&0&0&1 \end{bmatrix}.$$ Hence, by Kirchhoff's theorem, the number of spanning trees is equal to any cofactor of the Laplacian matrix. For example, by deleting the second row and the second column we obtain $$\begin{bmatrix} 2&-1&0&0\\ -1&3&-1&0\\ 0&-1&2&0\\0&0&0&1 \end{bmatrix}$$ whose determinant is $2(6-1)+1(-2)=8$.