getNumberOfSpanningTrees {mcMST} | R Documentation |
Compute number of spanning trees of a graph
Description
Makes use of Kirchhoff's matrix tree theorem to compute the number of spanning trees of a given graph in polynomial time.
Usage
getNumberOfSpanningTrees(graph)
Arguments
graph |
[ |
Value
[integer(1)
]
Examples
# generate complete graph
g = genRandomMCGP(10)
# this is equal to 10^8 (Cayley's theorem)
getNumberOfSpanningTrees(g)
[Package mcMST version 1.1.1 Index]