GraphTheory[IsIsomorphic] - determine if two graphs are isomorphic
|
Calling Sequence
|
|
IsIsomorphic(G1,G2)
IsIsomorphic(G1,G2,phi)
|
|
Parameters
|
|
G1
|
-
|
unweighted undirected graph 1
|
G2
|
-
|
unweighted undirected graph 2
|
phi
|
-
|
(optional) name to assign mapping of graph 1 to graph 2
|
|
|
|
|
Description
|
|
•
|
The IsIsomorphic command accepts two unweighted undirected graphs as input, and returns true if the graphs are isomorphic to each other, and false otherwise.
|
•
|
If a third argument phi is provided, it is assigned to a list of equations of the form v1=v2, where the v1 and v2 correspond to the vertices of graph 1 and graph 2 respectively, that provide a mapping of vertices that shows the graphs are isomorphic.
|
•
|
The method used is a backtracking algorithm that provides reasonable efficiency even for large graphs. (In general the the graph isomorphism problem is exponential in the number of vertices.)
|
|
|
Examples
|
|
>
|
|
Create isomorphic permutation of Petersen graph, and check
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
Apply permutation to permuted graph to obtain original Petersen graph and compare adjacency matrices
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
|
|
Download Help Document
Was this information helpful?