| 1 | initial version |
Something like this should do the job:
def MyFactor(G):
A = G.automorphism_group()
Orb = A.orbits()
return Graph([list(Orb), [(o1,o2) for o1,o2 in Combinations(Orb,2) if any(G.has_edge(e1,e2) for e1 in o1 for e2 in o2)]])
MyFactor( graphs.FlowerSnark() ).show()
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.