View source: R/getNumberOfSpanningTrees.R
getNumberOfSpanningTrees | R Documentation |
Makes use of Kirchhoff's matrix tree theorem to compute the number of spanning trees of a given graph in polynomial time.
getNumberOfSpanningTrees(graph)
graph |
[ |
[integer(1)
]
# generate complete graph
g = genRandomMCGP(10)
# this is equal to 10^8 (Cayley's theorem)
getNumberOfSpanningTrees(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.