Lec 23
Lec 23
Proof. Let u and v be two distinct vertices of the connected undirected graph
G = (V, E). Because G is connected, there is at least one path between u
and v. Let x0 , x1 , . . . , xn , where x0 = u and xn = v, be the vertex sequence
of a path of least length. This path of least length is simple. To see this,
suppose it is not simple. Then xi = xj for some i and j with 0 ≤ i < j. This
means that there is a path from u to v of shorter length with vertex sequence
x0 , x1 , . . . , xi−1 , xj , . . . , xn obtained by deleting the edges corresponding to
the vertex sequence xi , . . . , xj−1 .
v1 v2 u1 u4
v3 v4 u3 u2
G1 G2
e f w x
h g z y
d c v u
G1 G2
Both graphs have 8 vertices, 10 edges, 4 vertices of degree 2, 4 vertices of
degree 3. However, (a) in G1 , each degree 2 vertex is connected to a degree
3 vertex, which is not true in G2 ; (b) In G2 , we can find a path consisting
of degree 3 vertices, s, w, z, which doesn’t exist in G1 ; and (c) there exists a
length 8 simple circuit in G2 , u, t, s, w, x, y, z, v, u, while in G1 , the longest
simple circuit has length 6. Either of those observations will suffice to claim
G1 and G2 are not isomorphic.
Example 4. Paths can be used to construct the isomorphism between graphs.
u2 v1
u1 u3 v5 v2
u5 u4 v4 v3
G1 G2
Consider graphs G1 and G2 . They both have 5 vertices, 6 edges, 2 vertices
of degree 3, and 3 vertices of degree 2. They both have a simple circuit of
length 5. For G1 , it is u1, u4, u3, u2, u5. For G2 , it is v3, v2, v1, v5, v4.
Using these, we can construct a bijective function and then generate the
adjacency matrix to determine whether or not G1 and G2 are isomorphism.