Ask Your Question

Revision history [back]

Let's say that you are considering the automorphism group of a graph. Then, you do:

sage: edges = [(0,1), (1,2), (2,3), (3,4), (4,5), (5,3)]
sage: G = Graph(edges, format='list_of_edges')
sage: group = G.automorphism_group()
sage: group
Permutation Group with generators [(4,5)]
sage: group.orbits()
[[0], [1], [2], [3], [4, 5]]

You may also get both the automorphism group and the orbits from the graph:

sage: group, orbits = G.automorphism_group(orbits=True)
sage: group
Permutation Group with generators [(4,5)]
sage: orbits
[[0], [1], [2], [3], [4, 5]]