Using recursion to find number of spanning trees

257 Views Asked by At

Graph

I need to use recursion to determine the number of spanning trees. I know the Proposition for this is as follows :

Let τ(G) denote the number of spanning trees of a graph G. if e∈E(G) is not a loop, then τ(G) = τ(G-e) + τ(G*e))

I am not sure how to implement this.