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())
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2024-02-17 03:40:01 +0100
Seen: 245 times
Last updated: Feb 17 '24
Out of memory while enumerating vectors
hasse diagram of a subset of a poset
Using a lambda expression in digraphs fails for len(G.sinks())?
Is there a functional way to manipulate cycles extracted from a digraph?
Finding number of strongly connected components
How to get an arbitrary orientation of a graph.
How to get all digraphs with loops
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.