| 1 | initial version |
Use method atoms_and_clique_separators that returns a decomposition of the graph by clique minimal separators in polynomial time.
py
def has_separating_3cycle(G):
cliques = G.atoms_and_clique_separators()[1]
return any(len(c) == 3 for c in cliques)
| 2 | No.2 Revision |
Use method atoms_and_clique_separators that returns a decomposition of the graph by clique minimal separators in polynomial time.
time.
pydef has_separating_3cycle(G): cliques = G.atoms_and_clique_separators()[1] return any(len(c) == 3 for c in cliques)
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.