Checking for Graph Isomorphism

As we learned earlier, two graphs are isomorphic if they have exactly the same structure, even if they are drawn differently or their vertices have different labels.

Two graphs are considered identical from a graph-theoretic point of view if we can rename the vertices of one graph so that all adjacency relationships are preserved.

Formally:

Definition. [Isomorphism] Let $G_1 = (V_1,E_1)$ and $G_2 = (V_2,E_2)$ be two graphs. An isomorphism from \(G_1\) to \(G_2\) is a bijective function $f : V_1 \to V_2$ such that, for every pair of vertices \(u,v \in V_1\), we have $(u,v)\in E_1$ if and only if $(f(u),f(v))\in E_2.$

If such a function exists, we write $G_1 \cong G_2$

$G_1 \cong G_2$
, pronounced "$G_1$ is isomorphic to $G_2$".