Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Apparently, BEST formula can be implemented as

def BEST_count(G):
    return G.spanning_trees_count() * prod(factorial(G.in_degree(v)-1) for v in G.vertices())