Total number of Spanning Trees in a Graph

This is a python script just written for my “Graph Theory and Applications” course that calculates the total number of spanning trees of a graph using Kirchhoff’s Theorem.

to running this, you need to have “NumPy” python package, that can be installed by :

pip install numpy

After that, just simply execute the and program asks you for nodes count and adjacency matrix of your graph to calculate the result.


View Github