Checking if two digraphs are isomorphic from their adjacency matrices

adjacency matrixdirected graphsgraph theorygraph-isomorphismspectral-graph-theory

Wikipedia says that, given digraphs $ G_1 $ and $ G_2 $ whose adjacency matrices are $ A_1 $ and $ A_2 $ respectively, $ G_1 $ and $ G_2 $ are isomorphic if and only if there exists a permutation matrix $ P $ such that $ P^{- 1} A_2 P = A_1 $.

However, if I am not mistaken, $ \left[ \begin{array}{cc} 1 & 1 \\ 1 & 0 \end{array} \right] $ and $ \left[ \begin{array}{cc} 0 & 1 \\ 1 & 1 \end{array} \right] $ constitute a counterexample.

Maybe they meant simple digraphs (i.e., digraphs without loops). If so, how can we know if two (not necessarily simple) digraphs $ G_1 $ and $ G_2 $ are isomorphic from their adjacency matrices?

Best Answer

This is not a counterexample. We have $$\begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix}^{-1} \begin{bmatrix}1 & 1 \\ 1 & 0\end{bmatrix}\begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix} = \begin{bmatrix}0 & 1 \\ 1 & 1\end{bmatrix}.$$

The expression $P^{-1}A_2 P = A_1$ is just a formal way of saying "we can get one matrix from the other by permuting the rows however we like, then applying the same permutation to the columns", which is certainly true of any kind of graph isomorphism.

Related Question