Problem: Given a graph G (as an adjacency matrix or a grape graph object), and a permutation $\pi \in S_n$. Find an isomorphic graph $G'$ as another adjacency matrix, under $\pi$.
The concept is fairly straightforward, but repeated need for such a result requires an algorithm to do a quick analysis. I was hoping somebody might already have a GAP function for this.
For example, a series of transpositions, $\psi_n, \psi_{n-1}, \cdots , \psi_1$ such that $\pi = \psi_n \psi_{n-1} \cdots \psi_1$, applied to the adjacency matrix could accomplish the result. In the actual GAP implementation (that I have tried) requires a transposition of the adj matrix (rows<-> column) as well, for each $\psi_i$ applied to the adj matrix. Thank you.
Note: Actually Grape is not really needed to modify the adjacency matrix, A. Grape would be a good tool to test the isomorphism, and to test that the transformation to A was indeed correct.
I'm not sure how you would do this with Grape, but you can do it with the Digraphs package. If your Grape graph is stored in the variable G, then you can convert it to a digraph by doing:
And if p a permutation whose moved points are a subset of the vertices of G, then you can act on G using the function OnDigraphs.