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.Thu, 01 Aug 2019 11:21:31 +0200Automorphism group of edge symmetryhttps://ask.sagemath.org/question/47334/automorphism-group-of-edge-symmetry/ I asked a similar question before,
https://ask.sagemath.org/question/42762/automorphism-group-of-weighted-graph/
I am curious that is there any similar function for finding "edge symmetry"?
Note: the link I provided is for "node symmetry" in a network (graph). sleeve chenThu, 01 Aug 2019 11:21:31 +0200https://ask.sagemath.org/question/47334/Automorphism 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?sleeve chenThu, 28 Jun 2018 03:22:14 +0200https://ask.sagemath.org/question/42762/Does Sage keep the order of vertices in a graph and it's group or scramble them? For me it sometime scrambles them.https://ask.sagemath.org/question/9315/does-sage-keep-the-order-of-vertices-in-a-graph-and-its-group-or-scramble-them-for-me-it-sometime-scrambles-them/I use the Sage automorphism_group function to find the group that leaves an adjacency matric, say C, invariant under a similarity transformation. But sometimes it seems the results are for matrices on a vertex space that is not the same as the original, but is reordered.
A simple example on a 3-vertex graph: o--o--o.
with index order 1 0 2
Adjacency matrix= C =
[0 1 1]
[1 0 0]
[1 0 0]
The group is the identity and a reflection about the center vertex:
[1 0 0] [0 1 0]
[0 1 0] and [1 0 0] = R
[0 0 1] [0 0 1]
I would have expected the reflection to be,
[1 0 0]
[0 0 1]
[0 1 0],
but R is what Sage gives.
Sure enough, RCR^-1 gives the following,
[0 1 0]
[1 0 1]
[0 1 0]
which is *not* the original C matrix. However the R transformation leaves the matrix
[0 0 1]
[0 0 1] = C'
[1 1 0]
invariant. The last matrix is the C matrix where the vertices are indexed in reverse order.
Does Sage have some canonical way it orders the vertices in graphs and groups?
A bit more info, maybe. The order of the irreducible representation table seems to give a hint. If the trivial representation is the first row (which it is for some graphs), it appears (from a few tests) that the vertices retain their original order to align with C. If the trivial representation is the last row then the matrix C' is the adjacency matrix (suggesting a reordering of the vertices). I have no idea why this should be related if it is.
Bottom line for me is I cannot apply any matrices from the group that come from the matrix() method to C or other objects in my original vertex space since they are ordered differently. I don't see how to find the vertex order sage uses. Any help or insight appreciated.
LouChaosWed, 12 Sep 2012 12:20:15 +0200https://ask.sagemath.org/question/9315/