Implementation of BEST theorem
BEST theorem provides a polynomial-time algorithm for enumeration of Eulerian circuits in a given directed graph. Is there is a readily available implementation of it in Sage?
BEST theorem provides a polynomial-time algorithm for enumeration of Eulerian circuits in a given directed graph. Is there is a readily available implementation of it in Sage?
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())
Asked: 2024-02-17 03:40:01 +0100
Seen: 228 times
Last updated: Feb 17 '24
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.