Isomorphism in GRAPHS
Isomorphism of Graphs
Definition: The simple graphs G1 = (V1, E1) and G2 =
(V2, E2) are isomorphic if there is a bijection (an
one-to-one and onto function) f from V1 to V2 with
the property that a and b are adjacent in G1 if and
only if f(a) and f(b) are adjacent in G2, for all a and
b in V1.
Such a function f is called an isomorphism.
In other words, G1 and G2 are isomorphic if their
vertices can be ordered in such a way that the
adjacency matrices MG1 and MG2 are identical.
3
Graphs: Adjacency Matrix
• Example:
A 1 2 3 4
1
a 1 0 1 1 0
2 d
4 2 0 0 1 0
b c 3 0 0 0 0
3 4 0 0 1 0
David Luebke 4 04/14/20
Isomorphism of Graphs
From a visual standpoint, G1 and G2 are isomorphic
if they can be arranged in such a way that their
displays are identical (of course without changing
adjacency).
Unfortunately, for two simple graphs, each with n
vertices, there are n! possible isomorphisms that
we have to check in order to show that these
graphs are isomorphic.
However, showing that two graphs are not
isomorphic can be easy.
5
Isomorphism of Graphs
For this purpose we can check invariants, that is,
properties that two isomorphic simple graphs must
both have.
For example, they must have
• the same number of vertices,
• the same number of edges, and
• the same degrees of vertices.
Note that two graphs that differ in any of these
invariants are not isomorphic, but two graphs that
match in all of them are not necessarily isomorphic.
6
Isomorphism of Graphs
Example I: Are the following two graphs isomorphic?
a a
b e e
b
c d c d
Solution: Yes, they are isomorphic, because they
can be arranged to look identical. You can see this
if in the right graph you move vertex b to the left
of the edge {a, c}. Then the isomorphism f from
the left to the right graph is: f(a) = e, f(b) = a,
f(c) = b, f(d) = c, f(e) = d.
7
Isomorphism of Graphs
Example II: How about these two graphs?
a a
b
e e
b
c c
d d
Solution: No, they are not isomorphic, because
they differ in the degrees of their vertices.
Vertex d in right graph is of degree one, but there
is no such vertex in the left graph.
8
Example of isomorphic graphs
a b 1 2
3
f 4
e
d c 6 5
G G
An isomorphism between G and G :
a 6 d 5
b 1 e 2
c 3 f 4
1/25/2005 Tucker, Sec. 1.2 9
Isomorphic Graphs
• The two graphs below look different.
• Are from a graph theoretic point of view
structurally the ‘same’?
2
b
1 3
a
c
d 5 4
e
Graph Morphisms
• The two graphs below look different
but are structurally the ‘same’.
f.c
2(c)
b f.a
1(a) 3(e)
a
c
f.d
d 5(d) 4(b)
e
f.b
f.e
• They are the ‘same’ up to the renaming of the
vertices. These graphs are isomorphic.
Elementary properties of
isomorphic graphs
• Edge and vertex counts
– Isomorphic graphs have the same number of edges and
vertices.
• Vertex sequence (the list of vertex degrees)
– Isomorphic graphs have the same vertex sequences.
• Warning!! These can be used to show two graphs
are not isomorphic, but can not show that two
graphs are isomorphic.
1/25/2005 Tucker, Sec. 1.2 12
Two non-isomorphic graphs
Vertices: 6
Vertices: 6
Edges: 7
Edges: 7
Vertex sequence: 4, 3, 3, 2, 2, 0.
Vertex sequence: 5, 3, 2, 2, 1, 1.
1/25/2005 Tucker, Sec. 1.2 13
Subgraph properties of
isomorphic graphs
• Isomorphic graphs have the same sets of
subgraphs:
– there is a one-to-one correspondence between the
subgraphs such that corresponding subgraphs are
isomorphic.
• Typically check induced subgraphs, or number of a
specific kind of subgraphs such as cycles or cliques.
• Warning!! These can be used to show two graphs
are not isomorphic, but can not show that two
graphs are isomorphic.
1/25/2005 Tucker, Sec. 1.2 14
Two non-isomorphic graphs
1 4
a d 5
e h 8
f 6 7
g 2 3
b c 3
Vertices: 8 Vertices: 8
Edges: 10 Edges: 10
Vertex sequence: 3, 3, 3, 3, 2, 2, 2, 2. Vertex sequence: 3, 3, 3, 3, 2, 2, 2, 2.
However, induced subgraphs on degree 3 vertices are NOT isomorphic!
1/25/2005 Tucker, Sec. 1.2 15
An approach to checking
isomorphism:
Count the vertices. The graphs must have an equal number.
Count the edges. The graphs must have an equal number.
Check vertex degree sequence. Each graph must have the same
degree sequence.
Check induced subgraphs for isomorphism. If the subgraphs are not
isomorphic, then the larger graphs are not either.
Count numbers of cycles/cliques.
If these tests don’t help, and you suspect the graphs actually are
isomorphic, then try to find a one-to-one correspondence between
vertices of one graph and vertices of the other. Remember that a vertex
of degree n in the one graph must correspond to a vertex of degree n in
the other.
1/25/2005 Tucker, Sec. 1.2 16
For the class to try:
Are these pairs of graphs isomorphic?
3
a e 1 5 Isomorphic:
a-1, b-5,
#1
c d c-4, d-3, e-2,
b f 2 6 f-6.
4
d
1 2 Not Isomorphic:
a b c 5 6
5 K3’s on left,
#2
7 4 K3’s on right.
e g 4 3
f
1/25/2005 Tucker, Sec. 1.2 17