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.Fri, 20 Dec 2013 04:26:33 -0600automorphism group of graphshttps://ask.sagemath.org/question/10850/automorphism-group-of-graphs/When I create a graph in SAGE and then look at its automorphism group, the permutation group obtained acts on points $1,\ldots, n$ (where $n$ is the number of vertices of the graph), but it is not clear to me what the correspondence is between the vertices of the graph and these points. For example the code and output
sage: X=Graph(); X.add_edges([(0,1),(0,2)]);
sage: X.automorphism_group().list()
[(), (1,2)]
suggests that the vertices 0, 1 and 2 correspond to points 3, 1 and 2, respectively.
Similarly,
sage: X=Graph(); X.add_edges([(0,1),(1,2)]);
sage: X.automorphism_group().list()
[(), (2,3)]
also suggests that vertex name 1 corresponds to point 1. The example
sage: X=Graph(); X.add_edges([('a','b'),('b','c')]);
sage: X.automorphism_group().list()
[(), (2,3)]
suggests that vertex name 'b' corresponds to the point 1, and 'a' and 'c' correspond to 2 and 3, respectively.
I was wondering in general what the correspondence is between the vertex labels and the positive integer points that the automorphism group of the graph acts on, especially when the vertex names are not integers but arbitrary (letters or permutations), as in the latter example given above. This correspondence can be determined for small graphs by inspection, but I was wondering what the correspondence is in general.
Fri, 20 Dec 2013 01:12:04 -0600https://ask.sagemath.org/question/10850/automorphism-group-of-graphs/Answer by fidbc for <p>When I create a graph in SAGE and then look at its automorphism group, the permutation group obtained acts on points $1,\ldots, n$ (where $n$ is the number of vertices of the graph), but it is not clear to me what the correspondence is between the vertices of the graph and these points. For example the code and output</p>
<pre><code>sage: X=Graph(); X.add_edges([(0,1),(0,2)]);
sage: X.automorphism_group().list()
[(), (1,2)]
</code></pre>
<p>suggests that the vertices 0, 1 and 2 correspond to points 3, 1 and 2, respectively.
Similarly,</p>
<pre><code>sage: X=Graph(); X.add_edges([(0,1),(1,2)]);
sage: X.automorphism_group().list()
[(), (2,3)]
</code></pre>
<p>also suggests that vertex name 1 corresponds to point 1. The example</p>
<pre><code>sage: X=Graph(); X.add_edges([('a','b'),('b','c')]);
sage: X.automorphism_group().list()
[(), (2,3)]
</code></pre>
<p>suggests that vertex name 'b' corresponds to the point 1, and 'a' and 'c' correspond to 2 and 3, respectively.</p>
<p>I was wondering in general what the correspondence is between the vertex labels and the positive integer points that the automorphism group of the graph acts on, especially when the vertex names are not integers but arbitrary (letters or permutations), as in the latter example given above. This correspondence can be determined for small graphs by inspection, but I was wondering what the correspondence is in general.</p>
https://ask.sagemath.org/question/10850/automorphism-group-of-graphs/?answer=15849#post-id-15849What version of sage are you using? It seems that in sage 5.13 that is no longer an issue.
sage: g=graphs.CubeGraph(2)
sage: g.automorphism_group()
Permutation Group with generators [('01','10'), ('00','01')('10','11')]
According to the current code in the `automorphism_group` method, it seems that the labelling is according to the order given by the `vertices` method (provided you do not specify a partition as argument).Fri, 20 Dec 2013 01:36:54 -0600https://ask.sagemath.org/question/10850/automorphism-group-of-graphs/?answer=15849#post-id-15849Comment by AG for <p>What version of sage are you using? It seems that in sage 5.13 that is no longer an issue.</p>
<pre><code>sage: g=graphs.CubeGraph(2)
sage: g.automorphism_group()
Permutation Group with generators [('01','10'), ('00','01')('10','11')]
</code></pre>
<p>According to the current code in the <code>automorphism_group</code> method, it seems that the labelling is according to the order given by the <code>vertices</code> method (provided you do not specify a partition as argument).</p>
https://ask.sagemath.org/question/10850/automorphism-group-of-graphs/?comment=16518#post-id-16518I'm using version 5.3Fri, 20 Dec 2013 01:57:21 -0600https://ask.sagemath.org/question/10850/automorphism-group-of-graphs/?comment=16518#post-id-16518Comment by Nathann for <p>What version of sage are you using? It seems that in sage 5.13 that is no longer an issue.</p>
<pre><code>sage: g=graphs.CubeGraph(2)
sage: g.automorphism_group()
Permutation Group with generators [('01','10'), ('00','01')('10','11')]
</code></pre>
<p>According to the current code in the <code>automorphism_group</code> method, it seems that the labelling is according to the order given by the <code>vertices</code> method (provided you do not specify a partition as argument).</p>
https://ask.sagemath.org/question/10850/automorphism-group-of-graphs/?comment=16517#post-id-16517It was solved 7 months ago. http://trac.sagemath.org/ticket/14319. Really you should upgrade your version of Sage, many nice things have been included/fixed since ! ;-)Fri, 20 Dec 2013 04:26:33 -0600https://ask.sagemath.org/question/10850/automorphism-group-of-graphs/?comment=16517#post-id-16517