Directed Graphs and Vertex Concepts
Directed Graphs and Vertex Concepts
MODULE-V
Graph Theory
Topic Learning Objectives:
Introduction to Graph Theory: Definitions and Examples, Sub graphs, Complements, and Graph
Isomorphism,
Directed Graphs
Look at the diagram shown below. This diagram consists of four vertices A, B, C, D and three
edges AB, CD, CA with directions attached to them, the directions being indicated by arrows.
Because of attaching directions to the edges, the edge AB has to be interpreted as an edge from
the vertex A to the vertex B and it cannot be written as BA. Similarly, the edge CD is from C to D
and cannot be written as DC, and the edge CA is from C to A and cannot be written as AC. Thus,
here, the edges AB, CD, CA are directed edges**.
The directed edge AB is determined by the vertices A and B in that order and may therefore be
represented by the ordered pair (A, B). Similarly, the directed edges CD and CA may be
represented by the ordered pairs (C, D) and (C, A) respectively. Thus, the diagram in Figure
2.14 consists of a nonempty set of vertices, namely {A, B,C, D), and a set of directed edges
represented by ordered pairs of vertices taken from this set, namely {(A, B), (C, D), (C, A)}.
Such a diagram is called a diagram of a directed graph (or a Diagraph for brevity).
The formal definition of a directed graph is given below.
V = {A, B, C, D} and the edge set is E = {AB, CD, CA} = {(A, B), (C, D), (C, A)}.
Figure 2 depicts the directed graph for which the vertex set is V = {A, B, C, D} and the
edge set is E = {AB, CD, AC} = {(A, B), (C, D), (A, C)}.
As illustrated in Figure 2.14, every directed edge of a digraph (directed graph) is determined by
two vertices of the digraph - a vertex from which it begins and a vertex at which it ends. Thus, if
AB is a directed edge of a digraph D, then it is understood that this directed edge begins at the
vertex A of D and terminates at the vertex B of D. Here, we say that A is the initial vertex and B
is the terminal vertex of AB. Equivalently, we say that AB is incident out of A and incident into
B.
It should be mentioned that for a directed edge (in a digraph) the initial vertex and
the terminal vertex need not be different. A directed edge beginning and ending at the
same vertex A is denoted by AA or (A, A) and is called a directed loop. The directed
edge shown in Figure 3 is a directed loop which begins and ends at the vertex A.
Fig. (a) self-loop (b) parallel directed graph& multiple parallel edges
A digraph can have more than one directed edge having the same initial vertex and the
same terminal vertex. Two directed edges having the same initial vertex and the same
terminal vertex are called parallel directed edges. Two parallel directed edges are shown
in Figure 2.16. Two or more directed edges having the same initial vertex and the same
terminal vertex are called multiple directed edges*. Three multiple edges are shown in
Figure 2.17.
A vertex of a digraph which is neither an initial vertex nor a terminal vertex of any
directed edge is called an isolated vertex of the digraph. A non-isolated vertex happens
to be an initial vertex or a terminal vertex for a (some) directed edge. A non-isolated
vertex which is not a terminal vertex for any directed edge is called a source and a non-
isolated vertex which is not an initial vertex for any directed edge is called a sink.
In the digraph shown in Figure 2.18, the vertex v4 is an isolated vertex, the vertices v 1 and v3
are sources and the vertex v2 is a sink. The vertices V5 and V6 do not belong to any of these
categories.
In-degree and Out-degree
If v is a vertex of a digraph D, the number of edges for which v is the initial vertex is called
the out-going degree or the out-degree of v and the number of edges for which v is the
terminal vertex is called the incoming degree or the in-degree of v. The out-degree of v is
denoted by 𝑑 + (v) or od(v) and the in-degree of v is denoted by d− (v) or id(v).
If follows that (i) 𝑑+ (v) = 0 if v is a sink, (ii) 𝑑− (v) = 0 if v is a source, and (iii) 𝑑 + (v) =
𝑑 − (v) = 0 if v is an isolated vertex.
For the digraph shown in Figure 2.19, the out-degrees and the in-degrees of the vertices
are as
given below:
𝑑 + (𝑣1 ) = 2, 𝑑 − (𝑣1 ) = 1, 𝑑 + (𝑣4 ) = 0, 𝑑 − (𝑣4 ) = 0,
𝑑 + (𝑣2 ) = 1, 𝑑 − (𝑣2 ) = 3, 𝑑 + (𝑣5 ) = 2, 𝑑 − (𝑣5 ) = 1,
𝑑 + (𝑣3 ) = 1, 𝑑 − (𝑣3 ) = 2, 𝑑 + (𝑣6 ) = 2, 𝑑 − (𝑣6 ) = 1,
We note that, in the above digraph, there is a directed loop at the vertex v3 and this loop
contributes a count 1 to each of 𝑑 + (𝑣3 ) and 𝑑 − (𝑣3 ).
We further observe that the above digraph has 6 vertices and 8 edges and that the sums of
the out-degrees and in-degrees of its vertices are
This illustrates the following property common to all digraphs. This property is referred to
as the First Theorem of the Digraph Theory.
Since every edge terminates at some vertex and since there are m edges, we should have
𝑟1 +𝑟2 + … + 𝑟𝑛 = m.
Accordingly,
𝑑 + (𝑣1 )+ 𝑑 + (𝑣2 ) + . . . +𝑑 + (𝑣𝑛 ) = 𝑟1 +𝑟2 + . . . + 𝑟𝑛 = m.
Similarly, if 𝑠1 is the number of edges coming into 𝑣1 , 𝑠1 is the number of edges coming
into 𝑣2 , and so on, we get
𝑑 − (𝑣1 )+ 𝑑 − (𝑣2 ) + . . . + 𝑑 − (𝑣𝑛 ) = 𝑠1 +𝑠2 + . . . + 𝑠𝑛 = m.
Thus,
Thus completes the proof.
Example 1: Find the in-degrees and the out-degrees of the vertices of the digraph shown in
Figure 2.18.
Vertex: 𝑣1 𝑣2 𝑣3 𝑣4 𝑣4 𝑣5 𝑣6
Out-degree: 4 2 2 1 3 0 0
In-degree: 0 1 2 2 1 2 4
This table gives the out-degrees and in-degrees of all vertices. We note that v1 is a source
and 𝑣6 and 𝑣7 are sinks.
We also check that,
sum of out-degrees = sum of in-degrees = 12 = No. of edges.
Definition of a Graph
A graph is a pair (V, E), where V is a nonempty set and E is a set of unordered pairs of
elements taken from the set V.
For a graph (V, E), the elements of V are called vertices (or points or nodes) and the
elements of E are called undirected edges or just edges. The set V is called the vertex set and
the set E is called the edge set.
A graph/digraph containing no edges is called a null graph. A null graph with only one
vertex is called a trivial graph. Figure 8 depicts a null graph with three vertices
A
•
B• •c
The number of vertices m a (finite) graph is called the order of the graph and the
number of edges in it is called its size. In other words, for a graph G = (V, E), the
cardinality of the set V, namely |V|, is called the order of G and the cardinality of the set E,
namely |E|, is called the size of G. A graph of order n and size m is called a (n, m) graph.
Thus, the graph depicted in Figure 2.18 is a (4.5) graph. A null graph with n vertices is a
(n, 0) graph.
End vertices, loop, multiple edges
Generally, the vertices of a graph are denoted by A, B, C, etc., or v1 , v2 , v3 , etc. When it is
convenient, we denote the edges of a graph by e1 , e2 , e3 , and so on. If vi and vj denote two
vertices of a graph and if ek denotes an edge joining vi and vj . then vi and vj are called the
end vertices (or end points) of ek . This is symbolically written as ek = {vi , vj } = vi vj. For
example, in the graph shown in Figure 2.18, suppose we denote the edges AB, BC, AC,
AD and DC by e1 , e2 , e3 , e4 and e5 respectively. Then e1 joins A and B; that is, e1 = {A,
B} = AB so that A and B are the end vertices of e1 . Similarly, e2 joins B and C; that is, e2
= {B, C} = BC, so that B and C are the end vertices of e2 , and so on.
Now, consider the graph shown in Figure 2.20. We note that this graph consists of four
vertices v1 , v2 , v3 , v4 , and six edges e1 , e2 , e3 , e4 , e5 , e6 . Although the edges e2 and e3 seem
to intersect (cross over) in the figure,* their point of intersection (even when it exists) is
not a vertex of the graph. We observe that the edges e1 , e2 , e3 have distinct end vertices,
but the edge 𝑒4 has the same vertex 𝑒3 as both of its end vertices; that is, 𝑒4 = {v3 , v3 }. An
edge such as 𝑒4 is called a loop. We also observe that both of the edges 𝑒5 and 𝑒6 have
the same end vertices 𝑣1 , 𝑣4 ; that is, 𝑒5 = {v1 , v4 } and 𝑒6 = {v1 , v4 }. Edges such as these are
called parallel edges. If in a graph there are two or more edges with the same end vertices,
the edges are called multiple edges.
I-Semester: Mathematical Foundation for computer Applications (22MCA11) P a g e 6 | 26
RV Institute of Technology & Management ®
Figure 2.21 represents a simple graph and Figure 9 represents a general graph. Figure 9
represents a multigraph.
Fig. Multigraph
Incidence
When a vertex v of a graph G is an end vertex of an edge e of the graph G, we say that the
edge e is incident on (or to) the vertex v. Since every edge has two end vertices, every
edge is incident on two vertices, one at each end. The two end vertices are coincident if
the edge is a loop.
When an edge e is incident on a vertex v, we also say that v is incident with e. Note that
whereas an edge is incident only on two vertices (namely its end vertices), a vertex may
be incident with any number of edges.
Two non-parallel edges are said to be adjacent edges if they are incident on a common
vertex (that is, if they have a vertex in common). Two vertices are said to be adjacent
vertices (or neighbors) if there is an edge joining them.
In the graph shown in Figure 2.22., A and B are adjacent vertices and 𝑒1 and 𝑒2 are adjacent
edges. But, A and C are not adjacent vertices, and 𝑒1 and 𝑒3 are not adjacent edges.
I-Semester: Mathematical Foundation for computer Applications (22MCA11) P a g e 7 | 26
RV Institute of Technology & Management ®
Fig. Multigraph
Complete Graph
A simple graph of order ≥ 2 in which there is an edge between every pair of vertices is
called a complete graph (or a full graph).
In other words, a complete graph is a simple graph of order 2 in which every pair of
distinct vertices are adjacent.
A complete graph with n (≥ 2) vertices is denoted by 𝐾𝑛 .
Complete graphs with two, three, four and five vertices are shown in Figures 2.23(a) to
2.23(d) respectively. Of these complete graphs, the complete graph with five vertices,
namely 𝐾5 (shown in Figure 12(d)), is of great importance. This graph is called the
Kuratowski's first graph.
Bipartite graph
Suppose a simple graph G is such that its vertex set V is the union of two of its mutually
disjoint nonempty subsets 𝑣1 and 𝑣2 which are such that each edge in G joins a vertex in 𝑣1 and a
vertex in 𝑣2 . Then G is called a bipartite graph. If E is the edge set of this graph, the graph is
denoted by G = (𝑣1 , 𝑣2 ; E), or G = G (𝑣1 , 𝑣2 ; E). The sets 𝑣1 and 𝑣2 are called bipartite (or
partitions) of the vertex set V.
For example, consider the graph G shown in Figure 13 for which the vertex set is V = {A,
B, C, P, Q, R, S} and the edge set is E = {AP, AQ, AR, BR, CQ, CS}. Note that the set V is
the union of two of its subsets 𝑣1 = {A, B, C} and 𝑣2 = {P, Q,R, S} which are such that (i) 𝑣1
and 𝑣2 are disjoint, (ii) every edge in G joins a vertex in 𝑣1 and a vertex in 𝑣2 , (iii) G
contains no edge that joins two vertices both of which are in 𝑣1 or 𝑣2 . This graph is a
In Figure 2.25(c), the bipartite are 𝑣1 = {A, B} and 𝑣2 = {P, Q, R}; each of the vertices A
and B is joined to each of the vertices P, Q, R by an edge". In Figure 2.25(d), the bipartite
are 𝑣1 = {A, B, C} and 𝑣2 = {P, Q, R}; each of the vertices A, B, C is joined to each of the
I-Semester: Mathematical Foundation for computer Applications (22MCA11) P a g e 9 | 26
RV Institute of Technology & Management ®
vertices P, Q, R.
Of these complete bipartite graphs, the graph 𝑘3,3 shown in Figure 13(d) is of great
importance. This is known as the Kuratowski's second graph.
It is to be noted that a bipartite graph G is not a complete graph even if G is a complete
bipartite graph. Because, in such a graph, there exists no edge between two vertices if they
belong to the same bipartite.
Example 1. Let P, Q, R, S, T represent five cricket teams. Suppose that the teams P, Q,
R have played one game with each other, and the teams P, S, T have played one game with
each other. Represent this situation in a graph.
Hence determine (i) the teams that have not played with each other, and (ii) the number
of games played by each team.
Let the teams be represented by vertices and an edge represent the playing. Then the
graph representing the given situation is as shown in Figure 2.26:
We observe that there is no edge between Q and S , between Q and T , between R and S ,
and between R and T . Therefore, the teams Q and S , Q and T, R and S , and R and T have
not played with each other.
From the graph, we note that two edges are incident on each of the vertices Q, R, S , T and
four edges are incident on P. Thus, the teams Q, R, S, T have played two games each and the
team P has played four games.
Fig. Graphs
The first of the graphs is not complete. It is not simple on the one hand and there is no
edge between A and C on the other hand. The second of the graphs is complete. It is a
simple graph and there is an edge between every pair of vertices.
1
Example 3. Show that a complete g raph with n vertices, namely 𝐾𝑛 , has 2n (n - 1) edges.
In a complete graph, there exists exactly one edge between every pair of vertices. As
such, the number of edges in a complete graph is equal to the number of pairs of
vertices. If the number of vertices is n, then the number of pairs of vertices is
n 𝑛! 1
C2 = (𝑛−2)!2! = 2n (n - 1)
1
Thus, the number of edges in a complete graph with n vertices is 2n (n - 1).
Example 4. Show that a simple graph of order n = 4 and size m = 7 and a complete graph of
order n = 4 and size m = 5 do not exist.
For n = 4, we have
1 1
n (n - 1) =2×4×3 = 6.
2
Since m = 7 exceeds this number, a simple graph of order n = 4 and size m = 7 does not
exist.
1
Similarly, since m = 5 is not equal to n(n - 1) = 6, a complete graph of order 4 and size
2
Fig. Graphs
The first of the graphs is a bipartite graph, with V1 = {P, S} and V2 = {Q, R} as the bipartite.
The second graph is not a bipartite graph.
Example 6.
(a) How many vertices and how many edges are there in the complete bipartite graphs
K4,7 and K1,11?
(b) If the graph Kr,12 has 72 edges, what is r?
Sol: Recall that the complete bipartite graph Kr, s has r + s vertices and rs edges.
Accordingly:
(a) The graph K4,7 has 4 + 7 = 11 vertices and 4 x 7 = 28 edges, and the graph K 7,11 has
18 vertices and 77 edges
(b) If the graph Kr,12 has 72 edges, we have 12r = 72 so that r = 6
Fig. Graph
The graph shown in Figure 21 is a 3-regular graph (cubic graph). This particular cubic
graph, which contains 10 vertices and 15 edges, is called the Petersen graph.
Handshaking Property
Let us refer back to the graph shown in Figure 2.29. As noted earlier, we have, in this
graph,
∑ deg(𝑣) = 2|𝐸|
𝑣∈𝑉
This property is obvious from the fact that while counting the degrees of vertices, each edge
is counted twice (once at each end).
The aforesaid property is popularly called the handshaking property.t Because, it essentially
states that if several people shake hands, then the total number of hands shaken must be
even, because just two hands are involved in each handshake.
The following theorem is a direct consequence of the handshaking property.
Theorem In every graph, the number of vertices of odd degrees is even.
Proof: Consider a graph with n vertices. Suppose k of these vertices are of odd degree so
that the remaining n - k vertices are of even degree. Denote the vertices with odd degree by
v1, v2 v3, . . . , Vk and the vertices with even degree by Vk+l • Vk+2• . . . , Vn. Then the sum of
the degrees of the vertices is
𝑛 𝑘
∑ deg(𝑣𝑖) = ∑ deg(𝑣𝑖)
𝑖=1 𝑖=1
In view of the hand shaking property, the sum on the left hand side of the above expression
is equal to twice the number of edges in the graph. As such, this sum is even. Further, the
second sum in the right hand side is the sum of the degrees of vertices with even degrees. As
such, this sum is also even. Therefore, the first sum in the right hand side must also be even,
that is,
deg(vi) + deg(v2) + ···+ deg(vk) = even
I-Semester: Mathematical Foundation for computer Applications (22MCA11) P a g e 14 | 26
RV Institute of Technology & Management ®
But, each of deg(v1), deg(v2), . . . , deg(vk) is odd. Therefore, the number of terms in the left
hand side of (2) must be even, that is, k is even.
This completes the proof of the theorem. •
Note: According to the above theorem, in any graph, there is an even number of vertices of
odd degrees. But, it is not true in general that a graph must have an odd number of vertices
of even degrees. Observe that the graph shown in Figure 9.33 has an even number of
vertices of even degrees.
Example 1. For the graph shown in Figure 2.34, indicate the degree of each vertex an verify
the handshaking property:
Fig. Graph
By examining the graph, we find that the degrees of its vertices are as given below:
deg(a) = 3, deg(b) = 2, deg(c) = 4,
deg(d) = 2, deg(e) = 0, deg(f) = 2,
deg(g) = 2, deg(h) = 1.
We note that e is an isolated vertex and h is a pendant vertex.
Further, we observe that the sum of the degrees of vertices is equal to 16. Also, the
graph has 8 edges. Thus, the sum of the degrees of vertices is equal to twice the number of
edges.
The verifies the handshaking property for the given graph
Example 2. Can there be a graph consisting of the vertices A, B, c, D with deg(A) = 2,
deg(B) = 3, deg(C) = 2, deg(D) = 2?
Sol: In every graph, the sum of the degrees of the vertices has to be an even number. Here,
this sum is 9 which is not even. Therefore, there does not exist a graph of the given kind.
Example 3. Can there be a graph with 12 vertices such that two of the vertices have degree
3 each and the remaining 10 vertices have degree 4 each?
Sol: Here, the sum of the degrees of vertices is (3 x 2) + (4 x 10) = 46. Therefore, if m = 23,
we have 2m = 46 and the handshaking property holds. Hence there can be a graph of the
desired type (whose size is 23).
Example 4. Prove that the k-dimensional hypercube Qk has k2k-l edges.
I-Semester: Mathematical Foundation for computer Applications (22MCA11) P a g e 15 | 26
RV Institute of Technology & Management ®
Example 6. Determine the order |V| of the graph G = (V, E) in the follow cause:
1. G is a cubic graph with 9 edges.
2. G is regular with 15 edges.
3. G has 10 edges with 2 vertices of degree 4 and all other vertices of degree 3.
(1) Suppose the order of G is n. Since G is a cubic graph, all vertices of G have degree
3, and therefore the sum of the degrees of vertices is 3n. Since G has 9 edges, we
should have 3n = 2 x 9 (by the handshaking property) so that n = 6. Thus, the order of
G is 6.
(2) Since G is regular, all vertices of G must be of the same degree, say k. If G is of
order n, then the sum of the degrees of vertices is kn. Since G has 15 edges, we
should have kn = 2 x 15 so that k = 30/ n. Since k has to be a positive integer, it
follows that n must be a divisor of 30. Thus, the possible orders of G are 1,2, 3, 5, 6,
10, 15 and 30.
(3) Suppose the order of G is n. Since two vertices of G are of degree 4 and all others are
I-Semester: Mathematical Foundation for computer Applications (22MCA11) P a g e 16 | 26
RV Institute of Technology & Management ®
Example 8. Show that there is no graph with 28 edges and 12 vertices in the following cases.
(i) The degree of a vertex is either 3 or 4.
(ii) The degree of a vertex is either 3 or 6.
Suppose there is a graph with 28 edges and 12 vertices, of which k vertices are of degree 3
(each). Then:
(i) If all of the remaining (12 — k) vertices have degree 4, then we should have (by the
= 56, or k —8 which is not possible handshaking property) 3k + 4(12 — k) 2 x 28 (because
has to be nonnegative).
(ii) If all of the remaining (12—k) vertices have degree 6, then we should have 3k+6(12—k) =
56, or k = 16/3. This is not possible (because k has to be a nonnegative Integer).
Hence, in both of the two given cases, the graph of the desired type cannot exist.
Example 9. (a) Show that in a complete graph of n vertices (namely Kn) the degree of
1
every vertex is (n — 1) and that the total number of edges is 2 𝑛(n — l).
(a) Recall that a complete graph is a simple graph in which every vertex is joined with
every other vertex through exactly one edge. Therefore, if there are n vertices, each vertex is
joined to (n— I) vertices through exactly one edge. Thus, there occur n— I edges at every
vertex. This means that the degree of every vertex is n — 1.
Consequently, the sum of the degrees of vertices is n (n — 1). By handshaking property,
this sum must be equal to 2m, where m is the number of edges. Thus, n (n— l) = 2m, or
1 1
m = 2 𝑛 — l). Thus, Kn has 2 𝑛 (n- l) edges.
1
(b) If Kn has m edges, then we have, from what has been just proved, m = 2 𝑛 - 1). This
1
gives n + m = n+2n (n -1), or 2 (n+m) = 2n+n —n2 –n =n (n+ 1).
Isomorphism
Consider two graphs G = (V, E) and G' = (V' , E' ). Suppose there exists a function f: V V'
such that (i) f is a one-to-one correspondence*, and (ii) for all vertices A, B of G, {A, B) is
an edge of G if and only if {f(A), f (B)} is an edge of G'. Then f is called an isomorphism
between G and G', and we say that G and G' are isomorphic graphs.
In other words, two graphs G and G' are said to be isomorphic (to each other) if there is a
one-to-one correspondence between their vertices and between their edges such that the
adjacency of vertices is preserved. Such graphs will have the same structure; they differ
only in the way their vertices and edges are labeled or only in the way they are represented
geometrically. For many. purposes, we regard them as essentially the same graphs.
When G and G' are isomorphic, we write G = G'.
When a vertex A of G corresponds to the vertex A' = f (A) of G' under a one-to-one
correspondence f: G →t G', we write A ↔ A'. Similarly, we write {A, B) ↔ {A', B') to mean
that the edge AB of G and the edge A' B' of G' correspond to each other, under f.
For example, look at the two graphs shown in Figure 2.34.
Fig. Graph
Consider the following one-to-one correspondence between the vertices of these two graphs:
A ↔ P, B ↔ Q, C ↔ R, D ↔ S.
Under this correspondence, the edges in the two graphs correspond with each other, as
indicated below:
{A, B) ↔ {P, Q}, {A, C} ↔ {P, R), {A, D) ↔ {P, S},
{B, C) ↔ {Q, R), { B, D) ↔ {Q,S}, {C, D} ↔ {R,S}.
We check that the above-indicated one-to-one correspondence between the vertices/edges of
the two graphs preserves the adjacency of the vertices. The existence of this correspondence
proves that the two graphs are isomorphic. (Note that both the graphs represent the complete
graph K4)
Next, consider the two graphs show in figure 2.35.
Fig. Graphs
We observe that both of these two graphs have the same number of vertices but different
number of edges. Therefore, although there can exist one-to-one correspondence between
the vertices, there cannot be a one-to-one correspondence between the edges. The two
graphs are therefore not isomorphic.
From the definition of isomorphism of graphs, it follows that if two graphs are isomorphic,
then they must have:
1. The same number of vertices
2. The same number of edges
3. An equal number of vertices with a given degree
These conditions are necessary but not sufficient. This means that two graphs for which
Fig. Graphs
We note that both of these graphs are of order 4 and size 3. But the two graphs are not
isomorphic. Observe that there are two pendant vertices in the first graph whereas there are
three pendant vertices in the second graph. As such, under any one-to-one correspondence
between the vertices and the edges of the two graphs, the adjacency of vertices is not
preserved. It is not hard to realize that every two complete graphs with the same number of
vertices, n, are isomorphic. For this reason, we speak of the complete graph of n vertices,
and all complete graphs with n vertices are denoted by Kn.
Similarly, any two complete bipartite graphs with bipartites containing r and s vertices are
isomorphic. For this reason, all complete bipartite graphs with bipartites containing r and
s vertices are denoted by Kr,s·
Given two graphs G and G', there is no set precedure for proving or disproving that they are
isomorphic. It is only by carefully examining the nature of vertices and edges of both G and
G' that one can find whether or not they are isomorphic. If G and G' are not isomorphic, it is
relatively easy to find it out. If G and G' are isomorphic, the work involved in proving it is
quite hard - it gets harder as the orders and sizes of G and G' get larger.
Isomorphism of digraphs.
The definition of isomorphism of graphs can be extended to digraphs in a natural way. Two
digraphs D1 and D2 are said to be isomorphic if there is a one-to-one correspondence
between their vertices and between their edges such that adjacency of vertices along with
directions is preserved.
Example 10. Prove that the two graphs shown below are isomorphic.
Fig. Graphs
We first observe that both graphs have four vertices and four edges. Consider the fo1lowing
one-to-one correspondence between the vertices of the graphs:
u1 ↔v1 , u2 ↔v4, u3 ↔ v3, u4 ↔v2
This correspondence gives the following correspondence between the edges:
{u1, u2} ↔ {v1, v4}, {u1, u3} ↔ {v1, v3},
{u2, u4} ↔{v 4, v2}, {u3, u4} ↔ { v3, v2}.
Example 11. Verify that the two graphs shown below are isomorphic.
Fig. Graphs
Let us consider the one-to-one correspondence between the vertices of the two graphs under
which the vertices A, B, C, D, P, Q, R, S of the first graph correspond to the vertices A’, B’,
C', D', P', Q', R', S' respectively of the second graph, and vice-versa. In this correspondence,
the edges determined by the corresponding vertices correspond so that the adjacency of
vertices is retained. As such, the two graphs are isomorphic.
We note that the first graph is the hypercube Q3; see Figure 2.38. The second graph is just
another drawing of Q3.
Example 12. Show that the following two graphs are isomorphic:
Fig. Graphs
We first note that both the graphs have six vertices each of degree three, and nine edges.
Bearing the edges in the two graphs in mind, consider the correspondence between the
edges as shown below.
{u1, u4} ↔ {v1, v2}, {u1, u5} ↔ {v1, v5}, {u1, u6} ↔ {v1, v6}
{u2, u5} ↔ {v4, v3}, {u2, u4} ↔ {v4, v2}, {u2, u6} ↔ {v4, v6}
{u3, u6} ↔ {v5, v6}, {u3, u4} ↔ {v5, v2}, {u3, u5} ↔ {v5, v3}
These yields the following correspondence between the vertices:
u1↔v1, u2↔v4, u3↔v5.
u4↔v2, u5↔v3, u6↔v6.
We observe that the above correspondences between the edges and the vertices are one-to-
one correspondences and that these preserve the adjacency of vertices. In view of the
existence of these correspondences, we infer that the two graphs are isomorphic.
We note that the first graph is the complete bipartite graph K3,3; see Figure 2.39. The second
graph is just another drawing of K3 ,3.
Example 13. Show that the following two graphs are isomorphic.
Fig. Graphs
We first note that each of the two graphs is 3-regular (cubic) and has 10 vertices. Consider
the one-to-one correspondence between the vertices as shown below:
vi ↔ ui , for i = 1, 2, 3, . . . , 10.
This correspondence has been arrived at after closely examining the structures of the two
graphs.
I-Semester: Mathematical Foundation for computer Applications (22MCA11) P a g e 22 | 26
RV Institute of Technology & Management ®
Example 14. Show that the following graphs are not isomorphic.
Fig. Graphs
We observe that the first graph has 4 vertices and 6 edges and the second graph has 4
vertices and 7 edges. As such, one-to-one correspondence between the edges is not possible.
Hence the two graphs are not isomorphic.
Example 15. Show that the following graphs are not isomorphic.
Fig. Graphs
We note that each of the two graphs has 6 vertices and 9 edges. But, the first graph has 2
vertices of degree 4 whereas the second graph has 3 vertices of degree 4. Therefore, there
can- not be any one-to-one correspondence between the vertices and between the edges of
the two graphs which preserves the adjacency of vertices. As such, the two graphs are not
isomorphic.
Example 16. Show that the following graphs are not isomorphic.
Fig. Graphs
We note that the first graph has a pair of vertices of degree 4 which are not adjacent whereas
the second graph has a pair of vertices of degree 4 which are adjacent. (The reader is
required to identify them!). Therefore the two graphs are not isomorphic.
Example 17. Show that two graphs need not be isomorphic even if they have the same number
of vertices, the same number of edges and equal number of vertices with the same degree.
Consider the two graphs shown in Figure 32:
We observe that both graphs have the same (6) number of vertices and the same (5) number
of edges. Further, in each of them there are 3 vertices of degree 1 (namely, v1, v5, v6 in
the first graph and A, P, R in the second graph), there are 2 vertices of degree 2 (namely,
vz, v 3 in the first graph and B, Q in the second graph), and there is 1 vertex of degree 3
(namely, v4 in the first graph and C in the second graph). Thus, the two graphs have equal
number of vertices with the same degree.
Fig. Graphs
But, the two graphs are not isomorphic. Because there are 2 pendant vertices adjacent to the
vertex v4 (which is of degree 3) in the first graph but there is only one pendant vertex
adjacent to the-vertex C (which is of degree 3) in the second graph. As such, the adjacency
of vertices cannot be preserved under a one-to-one correspondence between the vertices of
the graphs.
Fig. Graphs
Consider the following one-to-one correspondence between the vertices of the given di-
graphs:
A ↔ Q, B ↔ P, C ↔ S, D ↔R.
Under this correspondence, the directed edges of the two graphs correspond with each other
as shown below.
A, B) ↔ (Q, P), (B, C) ↔ (P, S), (C, D) ↔ (S, R), (D, A) ↔ (R, Q).
Evidently, under this correspondence, the adjacency of vertices including directions of the
edges is preserved.
Hence the given digraphs are isomorphic.
Example 19. Show that the following digraphs are not isomorphic.
Fig. Graphs
The two digraphs have the same number of vertices (5) and the same number of directed
edges (7). We observe that the vertex A of the first digraph has 1 as its out-degree and 2 as
its in-degree. There is no such vertex in the second digraph. Therefore, there cannot be any
one- to-one correspondence between the vertices of the two digraphs which preserves the
direction of edges. The two digraphs are therefore not isomorphic.
Video Links:
[Link]
[Link]
[Link]
[Link]