An undirected graph $G=(V, E)$ is defined by its node set $V=\left\{v_1, \ldots, v_n\right\}$ and edge set $E=\left\{\left(v_i, > v_j\right) \mid v_i, v_j \in V\right\}$. One common way to represent a graph is using an adjacency matrix, which requires a node ordering $\pi$ that maps nodes to rows/columns of the adjacency matrix. More precisely, $\pi$ is a permutation function over $V$ (i.e., $\left(\pi\left(v_1\right), \ldots, \pi\left(v_n\right)\right.$ ) is a permutation of $\left.\left(v_1, \ldots, v_n\right)\right)$. We define $\Pi$ as the set of all $n$ ! possible node permutations. Under a node ordering $\pi$, a graph $G$ can then be represented by the adjacency matrix $A^\pi \in \mathbb{R}^{n \times n}$, where $A_{i, > j}^\pi=\mathbb{1}\left[\left(\pi\left(v_i\right), > \pi\left(v_j\right)\right) \in E\right]$.
Note that elements in the set of adjacency matrices $A^{\Pi}=$ $\left\{A^\pi \mid \pi \in \Pi\right\}$ all correspond to the same underlying graph.
I was reading a research paper where I came across this definition of an adjacency matrix based on a node ordering function. I am a beginner in graph theory hence was not able to understand the concept of node permutation. Any help is appreciated.
I will give an example, and to make the typing as economical as possible, i will use sage:
Above, the rows and the columns of the matrix are labeled $0,1,2,3,4,5,6,7,8,9$ and considered with this order of them. For instance, $6$ and $9$ are joined by an edge, because of this we have the $\boxed 1$ entry in row $6$ column $9$ (and vice versa):
$$ \left[\begin{array}{rrrrrrrrrr} 0 & 1 & 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 \\ 1 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & \boxed 1 \\ 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & \boxed 1 & 1 & 0 & 0 \end{array}\right] \ . $$ The first row is
0 1 0 0 1 1 0 0 0 0corresponding to the columns $0,1,2,3,4,5,6,7,8,9$, and the ones are corresponding to $1,4,5$, which are the neighbours of $0$ in the graph.Now it is possible that an alien prefers an other order, for instance $9,6,7,2,1,3,5,4,0,8$. Then he/she/it should write an other matrix. The corresponding boxed entries are now $$ \left[\begin{array}{rrrrrrrrrr} 0 & \boxed 1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ \boxed 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 1 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 1 & 1 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 \end{array}\right] $$ The first row is
0 1 1 0 0 0 0 1 0 0corresponding to the columns $9,6,7,2,1,3,5,4,0,8$, and the ones are corresponding to $6,7,4$, which are the neighbours of $9$ in the graph.The following code was used to get he new matrix for the new order.
Note: The cited text is very pedant, puts the accent on some bureaucratic point, the order, then introduces a lot of notation for this, a permutation $\pi$, the space of permutations, makes it part of the structure. This is maybe misleading at least in the same measure i am in similar situations.