ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 17 Jul 2018 04:28:27 -0500Finding the generators for automorphisms of a graphhttps://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/ Having a large graph, it will cause memory and kernel issues for SAGE to list all graph automorphisms. Is there a way to find the generators of the automorphisms instead of the whole automorphisms of a graph?Sun, 15 Jul 2018 20:41:18 -0500https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/Comment by slelievre for <p>Having a large graph, it will cause memory and kernel issues for SAGE to list all graph automorphisms. Is there a way to find the generators of the automorphisms instead of the whole automorphisms of a graph?</p>
https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/?comment=43029#post-id-43029Please provide an example of a graph where one encounters this problem.Mon, 16 Jul 2018 01:57:56 -0500https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/?comment=43029#post-id-43029Answer by tmonteil for <p>Having a large graph, it will cause memory and kernel issues for SAGE to list all graph automorphisms. Is there a way to find the generators of the automorphisms instead of the whole automorphisms of a graph?</p>
https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/?answer=43030#post-id-43030As in your previous question, you can use the tab-completion and discover the `gens` method:
sage: G = graphs.PetersenGraph()
sage: A = G.automorphism_group()
sage: A.gens()
[(3,7)(4,5)(8,9),
(2,6)(3,8)(4,5)(7,9),
(1,4,5)(2,3,8,6,9,7),
(0,1)(2,4,6,5)(3,9,8,7)]
and even the `gens_small` one, which provides a small set of generators:
sage: A.gens_small()
[(0,5,7,2,1)(3,6,4,8,9), (0,9,8,2)(1,4,6,3)(5,7)]Mon, 16 Jul 2018 04:12:26 -0500https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/?answer=43030#post-id-43030Comment by tmonteil for <p>As in your previous question, you can use the tab-completion and discover the <code>gens</code> method:</p>
<pre><code>sage: G = graphs.PetersenGraph()
sage: A = G.automorphism_group()
sage: A.gens()
[(3,7)(4,5)(8,9),
(2,6)(3,8)(4,5)(7,9),
(1,4,5)(2,3,8,6,9,7),
(0,1)(2,4,6,5)(3,9,8,7)]
</code></pre>
<p>and even the <code>gens_small</code> one, which provides a small set of generators:</p>
<pre><code>sage: A.gens_small()
[(0,5,7,2,1)(3,6,4,8,9), (0,9,8,2)(1,4,6,3)(5,7)]
</code></pre>
https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/?comment=43047#post-id-43047You can have a look at the documentation by doing:
sage: A.gens_small?
So, it provides a set of generators with small cardinality, however it is not necessarilly minimal.Tue, 17 Jul 2018 04:28:27 -0500https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/?comment=43047#post-id-43047Comment by ASH for <p>As in your previous question, you can use the tab-completion and discover the <code>gens</code> method:</p>
<pre><code>sage: G = graphs.PetersenGraph()
sage: A = G.automorphism_group()
sage: A.gens()
[(3,7)(4,5)(8,9),
(2,6)(3,8)(4,5)(7,9),
(1,4,5)(2,3,8,6,9,7),
(0,1)(2,4,6,5)(3,9,8,7)]
</code></pre>
<p>and even the <code>gens_small</code> one, which provides a small set of generators:</p>
<pre><code>sage: A.gens_small()
[(0,5,7,2,1)(3,6,4,8,9), (0,9,8,2)(1,4,6,3)(5,7)]
</code></pre>
https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/?comment=43044#post-id-43044Thanks, it works.
Just out of curiosity, what is the small set of generators?Mon, 16 Jul 2018 21:12:54 -0500https://ask.sagemath.org/question/43028/finding-the-generators-for-automorphisms-of-a-graph/?comment=43044#post-id-43044