Given
g = Graph[{1 -> 2, 2 -> 3, 3 -> 1, 4 -> 1, 1 -> 5, 5 -> 4}, VertexLabels -> "Name"]
GraphAutomorphismGroup[g]
outputs
PermutationGroup[{Cycles[{{2, 5}, {3, 4}}]}]
which I understand as changing 2 -> 5
, and 3 -> 4
will give an automorphic graph. This is true when tested:
g2 = Graph[{1 -> 5, 5 -> 4, 4 -> 1, 3 -> 1, 1 -> 2, 2 -> 3}, VertexLabels -> "Name"]
IsomorphicGraphQ[g, g2]
True
With any given graph, I want to explicitly generate all the automorphic graphs (cause I want to compare adjacency matrices), can I use PermutationGroup
and Cycles
to do this or it's easier if I just dump these parts of the expression and use Replace
?