Subgroups of automorphism groups of graphs

66 views
Skip to first unread message

Peter Mueller

unread,
Jan 28, 2025, 5:27:57 AM1/28/25
to sage-devel
The following code shows that subgroups of automorphism groups of graphs are handled wrongly:

sage: g = Graph([[1, 2, 4], []])
sage: a = g.automorphism_group()
sage: print(a)
Permutation Group with generators [(2,4), (1,2)]
sage: print(a.commutator())
Permutation Group with generators [(1,2,3)]

Note that  a.commutator() moves 3 though 3 is not a vertex of the graph. Somewhat strangely, if one defines directly a = PermutationGroup([[(2, 4)], [(1, 2)]]), then a.commutator() returns the correct subgroup.

By the way, it doesn't help if the n vertices of the graph consist of the list [1..n]. I have a complicated example where the automorphism group is computed correctly, but the action of the commutator subgroup is with respect to a different labeling of the vertices.

-- Peter Mueller

Gareth Ma

unread,
Jan 28, 2025, 5:43:56 AM1/28/25
to 'Peter Mueller' via sage-devel
It seems that this is intended? The correct equivalent code is:

sage: gens = [[(2, 4)], [(1, 2)]]
sage: pg = PermutationGroup(gens=gens); pg
Permutation Group with generators [(2,4), (1,2)]
sage: pg._libgap_()
Group([ (2,4), (1,2) ])
sage: pg = PermutationGroup(gens=gens, domain={1, 2, 4}); pg
Permutation Group with generators [(2,4), (1,2)]
sage: pg._libgap_()
Group([ (2,3), (1,2) ])

Which is what's done at
https://github.com/sagemath/sage/blob/develop/src/sage/graphs/generic_graph.py#L24161-L24170.
But I'm not an expert in this part of the code.

Also, I didn't know we have a 25k lines file.
> --
> You received this message because you are subscribed to the Google Groups "sage-
> devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to sage-devel+...@googlegroups.com <mailto:sage-
> devel+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/
> fec1df7a-9db7-43b2-9af2-8dcdf6658585n%40googlegroups.com <https://
> groups.google.com/d/msgid/sage-devel/
> fec1df7a-9db7-43b2-9af2-8dcdf6658585n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

dmo...@deductivepress.ca

unread,
Jan 31, 2025, 3:08:42 AM1/31/25
to sage-devel
These examples reveal a bug in the commutator method --- it ignores the domain of the permutation group.  I have opened .github issue #39416 for this.
Reply all
Reply to author
Forward
0 new messages