Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 0 years ago

licheng gravatar image

The following is an alternative solution (using networkx).

import networkx as nx
G=graphs.PetersenGraph()
NG = G.networkx_graph()
sorted(nx.simple_cycles(NG))