ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 29 Jun 2018 20:08:35 +0200Automorphism group of weighted graphhttps://ask.sagemath.org/question/42762/automorphism-group-of-weighted-graph/I know we can use sage to find the group of automorphisms of a graph $G$:
G.automorphism_group().list()
However, the above way can only be used to the unweighted graph. So for example:
G = matrix([[0,10,0],
[10,0,1],
[0,1,0]])
G1 = Graph(G, weighted = True)
G1.show(edge_labels=True )
G.automorphism_group().list()
The result is:
[(), (0,2)]
However, this result is not correct (correct for unweighted case). This is because $AD\neq DA$, where
$$D = \begin{bmatrix} 0 & 0 & 1 \\\ 0 & 1 & 0 \\\ 1 & 0 & 0\end{bmatrix},$$ which is a permutation matrix and
$$A = \begin{bmatrix} 0 & 10 & 0 \\\ 10 & 0 & 1 \\\ 0 & 1 & 0\end{bmatrix},$$ which is an adjacency matrix.
Can we use SAGE to find the group of automorphisms of a graph?Thu, 28 Jun 2018 03:22:14 +0200https://ask.sagemath.org/question/42762/automorphism-group-of-weighted-graph/Answer by rburing for <p>I know we can use sage to find the group of automorphisms of a graph $G$: </p>
<pre><code>G.automorphism_group().list()
</code></pre>
<p>However, the above way can only be used to the unweighted graph. So for example:</p>
<pre><code>G = matrix([[0,10,0],
[10,0,1],
[0,1,0]])
G1 = Graph(G, weighted = True)
G1.show(edge_labels=True )
G.automorphism_group().list()
</code></pre>
<p>The result is: </p>
<pre><code>[(), (0,2)]
</code></pre>
<p>However, this result is not correct (correct for unweighted case). This is because $AD\neq DA$, where </p>
<p>$$D = \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ 1 & 0 & 0\end{bmatrix},$$ which is a permutation matrix and </p>
<p>$$A = \begin{bmatrix} 0 & 10 & 0 \\ 10 & 0 & 1 \\ 0 & 1 & 0\end{bmatrix},$$ which is an adjacency matrix. </p>
<p>Can we use SAGE to find the group of automorphisms of a graph?</p>
https://ask.sagemath.org/question/42762/automorphism-group-of-weighted-graph/?answer=42780#post-id-42780Do you mean `G1.automorphism_group(edge_labels=True)`?Fri, 29 Jun 2018 20:08:35 +0200https://ask.sagemath.org/question/42762/automorphism-group-of-weighted-graph/?answer=42780#post-id-42780