Ask Your Question

Revision history [back]

all_simple_paths is defined for directed graphs (instances of DiGraph in Sage) but not for general graphs. This should work:

G = digraphs.Complete(5)  # not graphs.CompeteGraph(5)
G.all_paths(1,3)
G.all_simple_paths()