Can someone help me solve this misunderstanding please.

116 Views Asked by At

Is it a good way to determine isomorphic of two graphs by comparing their adjacent vertices? If their is a different then they are not isomorphic? If they have the same then they are isomorphic? Since they have same number of vertices and each vertex have the same degree. If not, then give an appropriate way of finding their isomorphic please.

1

There are 1 best solutions below

5
On

It is not enough that the graphs have the same number of vertices of the same degree. For example, two disjoint triangles and the hexagon, each have six vertices of degree 2. You are describing the graph isomorphism problem, which is known to be quite hard in general.

To elaborate a little, two graphs are isomorphic if you can pair off the vertices of one with the vertices of the other, and the resulting adjacency matrices are identical. In the example above, $$\left(\begin{matrix} 1 & 1 & 0 & 0 & 0 & 0\\ 0 & 1 & 1 & 0 & 0 & 0\\ 1 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 1 & 0 & 1\\ 0 & 0 & 0 & 0 & 1 & 1\end{matrix}\right)$$ and $$\left(\begin{matrix} 1 & 1 & 0 & 0 & 0 & 0\\ 0 & 1 & 1 & 0 & 0 & 0\\ 0 & 0 & 1 & 1 & 0 & 0\\ 0 & 0 & 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 0 & 1 & 1\\ 1 & 0 & 0 & 0 & 0 & 1\end{matrix}\right)$$ there is no way to rearrange the vertices of either graph (which will rearrange rows/columns of the matrix), to make the matrices agree.