Module5 Part1 Graphs
Module5 Part1 Graphs
MODULE 5
Chapter 1
INTRODUCTION TO GRAPH THEORY
5.1 Directed graphs
Definition of directed graph
A directed graph is a pair (V,E), where V is a non empty set and E is a set of ordered pairs of elements
taken from set V.
For a directed graph (V,E), the elements of V are called vertices and the elements of E are called
directed edges. The set V is called the vertex set and the set E is called the directed edge set.
The directed graph (V,E) is also denoted by D=(V,E) or just D. A geometric figure that depicts graph is
called a digraph.
Figure 5.1
The figure 5.1 shows the directed graph for which the vertex set is V={A,B,C,D} and the edge set is
E={AB,CA,CD} or E={(A,B),(C,A),(C,D)}.
It has to be noted that in a directed graph, the directed edges need not be straight line segment it can be
curved lines (arcs) also as shown in figure 5.2.
Figure 5.2
Vertices of directed graphs are denoted by upper or lower case letters like A,b,C,… u,v.. or v1,v2….
Figure 5.3
Dept. of CS&E, JIT, Davangere 1
Graph Theory
Parallel Directed Edges and Multiple Directed Edges
A digraph can have more than one directed edge having the same initial vertex and the same terminal
vertex.
Figure 5.4
Two different edges having the same initial vertex and the same terminal vertex are called parallel
directed edges. Two parallel directed edges are shown in figure 5.4(a).
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 5.4(b).
Figure 5.5
In the above graph, the vertex v4 is isolated vertex.
A non isolated vertex, which is not a terminal vertex for any directed edge is called Source. In the above
graph, the vertex v1 and v3 are sources.
A non isolated vertex, which is not an initial vertex for any directed edge is called Sink. In the above
graph, the vertex v2 is called sink.
The vertices v5 and v6 do not belong to any of these categories.
Out-degrees: In-degrees:
d+(v1) = 2 d-(v1) = 1
d+(v2) = 1 d-(v2) = 3
d+(v3) = 1 d-(v3) = 2
d+(v4) = 0 d-(v4) = 0
Figure 5.6 d+(v5) = 2 d-(v5) = 1
d+(v6) = 2 d-(v6) = 1
Theorems
1. In every digraph D, the sum of out-degrees of all vertices is equal to the sum of the in-degrees of all
vertices, each sum being equal to the number of edges in D.
Proof:
Suppose D has n vertices v1,v2,v3,v4…vn and m edges.
Let r1 be the number of edges going out of v1, and r2 be the number of edges going out v2 and so on.
Then ,
d+(v1) = r1, d+(v2) = r2, …., d+(vn) = rn
Since every edge terminates at some vertex and since there are m edges, we should have,
r1 + r2 + ..+rn = m
Accordingly,
d+(v1) + d+(v2) + …. + d+(vn) = r1 + r2 + ..+rn = m
Similarly, if s1 is the number of edges coming into v1, s2 is the number of edges coming into v2, and so
on, we get,
d-(v1) + d-(v2) + …..+ d-(vn) = s1+s2+…. +sn=m.
Thus,
2. Let D be a digraph with an odd number of vertices. If each vertex of D has an odd out-degree, prove D
has an odd number of vertices with odd in-degrees.
Proof: Let v1,v2,v3….vn be the n vertices of D, where n is odd.
Let m be the number of edges in D. Then, we have,
d+(v1)+d+(v2)+…….+d+(vn)=m (1)
d-(v1)+d-(v2)+……..+d-(vn)=m (2)
If each vertex has odd out-degree, then the LHS of (1) is a sum of n odd numbers. Since n is odd, this sum
must also be odd. Thus, m is odd.
Let k be the number of vertices with odd in-degree. The n-k number of vertices has even in-degrees.
Let us take v1,v2,v3.. vk to be the vertices with odd in-degrees and vk+1, vk+2,…vn to be the vertices with
even in-degrees.
Then the above expression can be rewritten as:
Now, the second sum on the LHS of this expression is even. Also, m is odd. Therefore, the first sum must
be odd.
That is,
d-(v1)+d-(v2)+……..+d-(vk)=odd
But each of d-(v1),d-(v2),……..,d-(vk) is odd. Therefore, the number of terms in LHS must be odd. That is k
is odd. This proves the required result.
Figure 5.9
d+(v1) = 2 d-(v1) = 0
d+(v2) = 0 d-(v2) = 3
d+(v3) = 1 d-(v3) = 0
d+(v4) = 0 d-(v4) = 0
d+(v5) = 1 d-(v5) = 1
d+(v6) = 1 d-(v6) = 1
2. For the following digraphs determine the out-degree and the in-degree of all the vertices.
Figure 5.10
Sol:
(i) The graph in figure 5.10 (i) has the following in-degrees and out-degrees:
d+(A) = 0 d-(A) = 3
d+(B) = 1 d-(B) = 2
+
d (C) = 4 d-(C) = 0
(i) The graph in figure 5.10 (ii) has the following in-degrees and out-degrees:
d+(v1) = 3 d-(v1) = 0
d+(v2) = 1 d-(v2) = 2
+
d (v3) = 2 d-(v3) = 3
d+(v4) = 1 d-(v4) = 2
5.2 Graphs
A graph is a pair (V,E), where V is a non empty set and E is a non empty set of unordered pairs of
elements taken from the set V.
For a graph (V,E), the elements of V are called vertices and the elements of E are called undirected
edges.
The undirected graph or graph (V,E) is denoted by G=(V,E) or just G.
Figure 5.11
The figure 5.11 shows the undirected graph for which the vertex set is V={A,B,C,D} and the edge set is
E={AB,AC,CD}or E={{A,B},{A,C},{C,D}}.
Figure 5.12
Figure 5.13
For example, in the graph shown in figure 5.13, 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.
Figure 5.14
The graph shown in figure 5.14 contains 4 vertices v1, v2, v3 and v4 and 6 edges e1,e2 ,e3,e4 ,e5 and e6.
Even though the edges e3 and e2 seem to intersect in the figure, their point of intersection is not a vertex
of graph.
An edge such as e4={v3, v3}is called a loop.
We also observe that both of the edges e5={v1, v4} and e6={v1, v4} have same end vertices v1 and v4.
These edges are called parallel edges.
If in a graph there are two or more edges with the same end vertices, then such edges are called multiple
edges.
Figure 5.15
Incidence
When a vertex v of graph G is an end vertex of an edge e of graph G, we say that the edge e is incident
on 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.
Figure 5.16
Complete graph
A simple graph of order >=2 in which an edge between every pair of vertices is called a complete graph
(or full graph).
or
A complete graph is a simple graph of order >=2 in which every pair of distinct vertices are adjacent.
The complete graph with 2,3,4,5 vertices are shown below:
Figure 5.17
A complete graph with n>=2 vertices is denoted by Kn.
Graph with 5 vertices, namely K5 is of great importance. This graph is called Kuratowski’s first graph.
Bipartite graph
A simple graph G is such that its vertex set V is the union of two of its mutually disjoint non empty
subsets V1 and V2 which are such that each edge in G joins a vertex in V1 and a vertex in V2. Then G is
called bipartite graph.
If E is the edge set of this graph, the graph is denoted by G=(V1,V2;E).
The sets V1 and V2 are called Bipartites (or Partitions) of the vertex set V.
Example: Consider the following graph
Figure 5.18
Dept. of CS&E, JIT, Davangere 7
Graph Theory
In this graph G, 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 2 of its subsets V1={A,B,C} and V2={P,Q,R,S} which are such that
i) V1 and V2 are disjoint.
ii) Every edge in G joins a vertex in V1 and a vertex in V2.
iii) G contains no edge that joins two vertices both of which are in V1 or V2. This graph is a bipartite graph
with V1={A,B,C} and V2={P,Q,R,S} as bipartites.
Figure 5.19
i) In figure 5.19(a), the bipartites are V1={A} V2={P,Q,R}
The vertex A is joined to each of the vertices P,Q,R by an edge.
Figure 5.21
We observe that there is no edge between Q and S, between Q and T, between R and S and R and T have
not played with each other.
From the graph, we note that 2 edges are incident on each of vertices Q, R, S, T and 4 edges are incident
on P. Thus, the team Q, R, S, T have played 2 games and the team P has played 4 games.
Figure 5.22
Sol:
The first graph is not complete. It is not simple on the one hand and there is no edge between A and C on
other hand.
The second graph is a complete graph. It is a simple graph and there is an edge b/w every pair of
vertices.
𝟏
4. S.T a complete graph with n vertices, namely Kn, has 𝟐 𝒏(𝒏 − 𝟏) edges.
Sol:
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
nC 2 = = n(n − 1)
n − 2 ! 2! 2
1
Thus, the number of edges in a complete graph with n vertices is 2 n(n − 1).
5. S.T 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 exists.
Sol:
1 1
For a simple m ≤ 2 n(n − 1) and for a complete graph m = 2 n(n − 1).
1 1
n n−1 = 4×3 = 6
2 2
Since m=7≥6 exceeds this number, a simple graph of order n=4 and size m=7 does not exists.
Similarly, since m=5≠6, is not equal to 6, a complete graph of order n=4 and size m=5 doesn’t exists.
Figure 5.23
The degrees of the vertices of graph shown in figure 5.23 is shown below:
d(v1)=3, d(v2)=4, d(v3)=4, d(v4)=3
The degree sequence is 3, 3, 4, 4 and the degree of the graph is 3.
Handshaking property
Consider the following graph,
Figure 5.29
In the above graph, there are 7 edges and the degree of each vertex is:
deg(v1)=3, deg(v2)=4, deg(v3)=4 and deg(v4)=3
Therefore, deg(v1)+deg(v2)+deg(v3)+deg(v4) = 3+4+4+3=14=2*7.
This observation illustrates the following property.
This property is obvious from the fact that while counting the degree of vertices each edge is counted twice.
This property is called the handshaking property.
From the handshaking property we know that, the sum of the degrees of all vertices is equal to twice the
number of edges in the graph.
Therefore, the sum of the degrees is even.
Further, the second sum on the RHS of equation 1 is the sum of the degrees of the vertices with even
degrees. Therefore this sum is also even.
Therefore, the first sum in RHS must also be even i.e.
deg(v1)+deg(v2)...+deg(vk)=even (2)
But each of deg(v1), deg(v2)… deg(vk) is odd. Therefore the number of terms in the LHS of equation 2
must be even, that is k is even.
Regular Graphs
A graph in which all the vertices are of the same degree ‘k’ is called a regular graph of degree k or k-
regular graph.
The graphs shown in figure 5.25 and 5.26 are 2-regular and 4-regular graphs.
Figure 5.27
The graph shown in figure 5.28 is 3 –regular graph or a cubic graph with 8=23. This particular graph is
called three-dimensional hypercube and is denoted by Q3.
Figure 5.28
Note:
In general, for any positive integer k, a loop-free k-regular graph with 2k vertices is called the k-
dimensional hypercube (or k-cube) and is denoted by Qk.
k-dimensional hypercube contains k2k-1 edges.
Figure 5.24
In the above graph the vertices v4 and v6 are called the isolated vertices.
Dept. of CS&E, JIT, Davangere 13
Graph Theory
The vertices v5 and v7 are called the pendant vertices.
The edges e5 and e4 are called the pendant edges.
A null graph contains no edges. Therefore in a null graph every vertex is an isolated vertex.
Problems
1. For the graph shown in figure 5.30, indicate the degree of each vertex and verify the handshaking
property.
Figure 5.30
Sol: 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
Total degree= the sum of the degrees of all vertices =16
The number of edges in the graph is 8.
The sum of the degrees of vertices is 16 which is equal to twice the number of edges in the graph
which is equal to 2×8=16.
Hence this graph satisfies the handshaking property.
2. Can there be a graph consisting of vertices A,B,C,D with deg(A)=2 deg(B)=3 deg(C)=2 and
deg(D)=2?
Sol:
The sum of the degree of vertices is 9, which is not an even number. Hence there does not exists
a graph of given degrees.
3. Can there be a graph with 12 vertices such that 2 of the vertices have degree 3 each and the
remaining 10 vertices have degree 4 each?
Sol:
10 vertices with degree 4= 10×4 =40
2 vertices with 3 degree = 2×3 = 6
The sum of the degrees of the vertices is= (2×3)+( 10×4 )=46
Therefore, the sum of the degrees is 46, which is an even number and hence the handshaking property is
satisfied and this graph exists.
n-times
3n =2×9
3n =18
n = 18/3=6
thus the order of the graph G is 6.
ii) Suppose the order of graph G is n.
Since G is regular, all vertices of the graph have same degree say k.
Then the sum of degrees can be written as,
k+k+k+……+k =2×15
n-times
kn=2×15
k=30/n
Since k has to be some positive integer, it follows that n must be a divisor of 30.
Thus the possible orders of G 1,2,3,5,6,10,15 and 30.
iii) Suppose the order of graph G is n.
2 vertices of G are of degree 4, and all the other vertices are of degree 3.
The sum of the degree can be represented as,
(2×4)+(n-2) ×3=10×2
8+3n-6=20
3n=18
n=6.
5. Let G be a graph of order 9 such that each vertex has degree 5 or 6. Prove that at least 5 vertices
have degree 6 or at least 6 vertices have degree 5.
Sol: Let p be the number of vertices of G which have degree 5.
Then the number of vertices of G which have degree 6 is 9-p=q(say)
The sum of degrees of all vertices can be written as:
5×p+6×q = 5p+6q
=5p+6(9-p)
=5p+54-6p
=54-p
Since this sum has to be an even number, p cannot be odd.
Thus p=0,2,4,6 or 8.
6. 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.
Sol:
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 by the handshaking property we should have,
3k+4(12-k)=2×28
=56
k = -8, which is not possible (because k has to be positive).
7. Prove that a k-dimensional hypercube Qk has k2k-1 edges. Determine the number of edges in Q8.
Sol:
In the hypercube Qk, the number of vertices is 2k and each vertex is of degree k. Therefore, the sum of
degrees of vertices is k× 2k.
By handshaking property, we should have k× 2k = 2|E|, where |E| is the size of Qk.
1
Thus, |E|= (k×2k) = k2k-1.
2
10. Is there a simple graph with 0,2,2,3,4 as the degrees of its vertices?
Sol:
Assume that there is such a graph. Since the degrees of vertices are 5 in number, the graph should have 5
vertices; say P, Q, R, S, T, arranged in the order of degrees as given.
Since the graph is simple, there cannot be an edge joining T to itself. Therefore, T should have an edge
to all other four vertices P, Q, R, S. Then P cannot have the degree 0. This is a contradiction.
Hence there is no simple graph for which the degrees of the vertices are as given.
11. Is there a simple graph with 2,3,3,4,5,6 as the degrees of its vertices?
Sol:
Assume that there is such a graph. Since the degrees of vertices are 6 in number, the graph should have 6
vertices; say P, Q, R, S, T, U, arranged in the order of degrees as given.
Dept. of CS&E, JIT, Davangere 17
Graph Theory
Then, since there are 6 vertices and the vertex U is of degree 6, U should have an edge to all other
vertices including an edge joining U to itself. Since the graph is simple, there cannot be an edge joining
U to itself. This is a contradiction.
Hence there is no simple graph for which the degrees of the vertices are as given.
12. Is there a simple graph with 1,1,2,3 as the degrees of its vertices?
Sol:
Assume that there is such a graph. Since the degrees of vertices are 4 in number, the graph should have 4
vertices; say P, Q, R, S, arranged in the order of degrees as given.
Then, since there are 4 vertices and the vertex S is of degree 4, S should have an edge to all other
vertices. In particular, S must have an edge to both of the vertices P and Q which are of degree 1. Then
P, Q are not joined to any other vertex and in particular to the vertex R which is of degree 2. Since the
graph is simple, there cannot be an edge joining R to itself. Therefore, R can be joined only to S. Then R
cannot have the degree 2. This is a contradiction.
Hence there is no simple graph for which the degrees of the vertices are as given.
Theorem:
Show that in a complete graph of n vertices the degree of every vertex is (n-1) and the total number of
𝟏
edges is 𝟐 𝐧(𝐧 − 𝟏).
Sol:
We know 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-1) vertices through exactly one edge.
Thus, there occur (n-1) edges at every vertex.
This means that the degree of every vertex is n-1.
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-1)=2m
1
m=2 n(n − 1).
1
Therefore, the complete graph has2 n(n − 1) edges.
Figure 5.31
We observe that the above graphs have 4 vertices and 6 edges.
Consider the following one-to-one correspondence between vertices of these two graphs.
A↔P
B↔Q
C↔R
D↔S
The edges in the two graphs correspond with each other as shown below:
{A,B}↔{P,Q}
{A,C}↔{P,R}
{A,D}↔{P,S}
{B,C}↔{Q,R}
{B,D}↔{Q,S}
Figure 5.32
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 vertices, there cannot be one-to-
one correspondence between edges.
Therefore the two graphs are not isomorphic.
NOTE:
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.
In particular two graphs of same order and same size need not be isomorphic. i.e., for example,
Figure 5.33
We note that the two graphs have the same order and size, but the two graphs are not isomorphic.
Figure 5.34
Sol:
We observe that the above graphs have 4 vertices and 4 edges.
(Rename the vertices of the first graph as u1, u2, u3 and u4).
Consider the following one-to-one correspondence between the vertices of the graphs.
u1↔v1
u2↔v4
u3↔v3
u4↔v2
The above one-to-one correspondence gives the correspondence between the edges.
{u1,u2}↔{v1,v4}
{u1,u3}↔{v1,v3}
{u2,u4}↔{v4,v2}
{u3,u4}↔{v3,v2}
This represents one-to-one correspondence between the edges of the two graphs under which the
adjacent vertices in first graph corresponds to adjacent vertices of second graph.
Therefore the two graphs are isomorphic.
Figure 5.35
Sol:
We observe that the above graphs have 8 vertices and 12 edges.
Figure 5.36
Sol:
We observe that the above graphs have 6 vertices and 9 edges.
Consider the following one-to-one correspondence between the vertices of the graphs.
u1↔v1
u2↔v5
u3↔v4
u4↔v3
u5↔v2
u6↔v6
From the above correspondence, the following are the edge correspondence.
Figure 5.37(i)
Sol:
We observe that the above graphs have 10 vertices and 15 edges.
Consider the following one-to-one correspondence between the vertices of the graphs.
v1↔ u1
v2↔ u2
v3↔ u3
v4↔ u4
v5↔ u5
v6 ↔ u6
v7↔ u7
v8↔ u8
v9↔ u9
v10↔ u10
We observe that the above one-to-one correspondence yields one-to-one correspondences between edges
in the two graphs as shown below:
{v1,v2}↔{u1,u2}
{v1,v5}↔{u1,u5}
{v1,v6}↔{u1,u6}
{v2,v3}↔{u2,u3}
{v2,v7}↔{u2,u7}
{v3,v4}↔{u3,u4}
{v3,v8}↔{u3,u8}
{v4,v5}↔{u4,u5}
{v4,v9}↔{u4,u9}
Dept. of CS&E, JIT, Davangere 23
Graph Theory
{v5,v10}↔{u5,u10}
{v6,v8}↔{u6,u8}
{v6,v9}↔{u6,u9}
{v7,v9}↔{u7,u9}
{v7,v10}↔{u7,u10}
{v8,v10}↔{u8,u10}
Therefore, the two graphs are isomorphic.
(ii)
Figure 5.37(ii)
Sol:
We observe that the above graphs have 10 vertices and 15 edges.
Consider the following one-to-one correspondence between the vertices of the graphs.
u1↔ v1
u2↔ v2
u3↔ v3
u4↔ v4
u5↔ v5
u6↔ v6
u7↔ v7
u8↔ v8
u9↔ v9
u10↔ v10
We observe that the above one-to-one correspondence yields one-to-one correspondences between edges
in the two graphs as shown below:
{u1,u2}↔{v1,v2}
{u1,u5}↔{v1,v5}
{u1,u6}↔{v1,v6}
{u2,u3}↔{v2,v3}
{u2,u7}↔{v2,v7}
{u3,u4}↔{v3,v4}
{u3,u8}↔{v3,v8}
{u4,u5}↔{v4,v5}
Figure 5.38
Sol:
We observe that the first graph has 4 vertices and 6 edges whereas the second graph has 4 vertices and 7
edges.
Therefore the one-to-one correspondence between the edges is not possible.
Hence the two graphs are not isomorphic.
Figure 5.39
Sol:
We observe that the two graphs have 6 vertices and 9 edges.
But the first graph has 2 vertices of degree 4, where as the second graph has 3 vertices of degree 4.
Figure 5.40
Sol:
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.
Therefore the two graphs are not isomorphic.
Isomorphic Digraphs
The 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.
Problems:
1. Show that the following graphs are isomorphic.
Figure 5.41
Sol:
Consider the following one-to-one correspondence between the vertices of the given digraphs:
A↔Q
B↔P
C↔S
D↔R
Under this correspondence, the directed edges of the graphs correspond with each other as shown below:
{A,B}↔{Q,P}
{B,C}↔{P,S}
{C,D}↔{S,R}
{D,A}↔{R,Q}
Figure 5.42
Sol:
The two digraphs have the same number of vertices (i.e. 5) and the same number of directed edges (i.e.
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.
5.4 Subgraphs
Given two graphs G and G1.We say that G1 is a subgraph of G if the following conditions hold.
i) All the vertices and all the edges of G1 are in G.
ii) Each edge of G1 has the same end vertices in G as in G1.
Example:
Figure 5.43
From the above graph we observe that all the vertices of G1 and all the edges of G1 are in the graph G.
And every edge in G1 has the same end vertices in G as in G1.
Therefore, G1 is a subgraph of G.
Figure 5.44
From the above graphs, graph (b) is a spanning subgraph of graph (a) but graph (c) is not a spanning
subgraph of graph (a), because it does not contain all the vertices of (a).
Figure 5.45
The graph (b) is an induced sub graph of graph (a), but the graph (c) is not an induced sub graph of
graph (a) because graph (a) has an edge from v3 to v5 which is not present in the graph(c).
Note: It has to be noted that edge disjoint sub graphs may have common vertices.
Example:
For the graph shown in figure 5.46(a), the graphs shown in figure 5.46 (b) and 5.46 (c) are edge-disjoint
but not vertex-disjoint subgraphs.
Figure 5.46
Problems:
1. Consider the graph G shown in figure 5.47(a).
(a) Verify that the graph G1 shown in the figure 5.47(b) is an induced sub graph of G. Is this a
spanning sub graph of G.
(b) Draw the subgraph G2 induced by the set V2={v3,v4,v6,v8,v9}.
Figure 5.47
Sol:
(a)
The vertex set of graph G1 namely V1={v1,v3,v4,v6,v7} is a sub set of vertex set V={v1,v2,….v9} of G.
Also, all the edges of G1 are in G. Further each edge in G1 has the same end vertices in G as in G1.
Therefore, G1 is a subgraph of G.
We further check that every edge {vi,vj} of G is an edge of G1. Therefore G1 is an induced graph.
Since V1≠ V, G1 is not a spanning sub graph of G.
Figure 5.47(c)
2. Consider the graph G in the following figure 5.48(a). Verify that the graph G1 and G2 shown in
figures 5.48(b) and (c) are induced sub graphs of G whereas the graph G3 shown in figure 5.48(d)
is not induced sub graph of G.
Figure 5.48
Sol:
We note that the vertex sets of G1, G2 and G3 are all subsets of the vertex set of G.
Further, all edges in each of G1, G2 and G3 have the same end vertices in G as in these. Therefore, all of
G1, G2 and G3 are subgraphs of G.
We further check that every edge in G whose end vertices belong to G1 is an edge in G1. Therefore, G1 is
an induced subgraph of G. In fact, G1 is induced by the set {v1,v2,v4,v5}.
Similarly, We check that every edge in G whose end vertices belong to G 2 is an edge in G2. Therefore,
G2 is an induced subgraph of G. In fact, G2 is induced by the set {v2,v3,v5,v6}.
But the graph G3 is not an induced sub graph of graph G because graph G has an edge from v1 to v5
which is not present in the graph G3.
3. For the graph shown in figure 5.49, find two edge disjoint subgraphs and two vertex disjoint
subgraphs.
Figure 5.49
Figure 5.50
Figure 5.51
Sol:
The union, intersection and ring sum are shown in figure 5.52 (a), (b) and (c).
Dept. of CS&E, JIT, Davangere 31
Graph Theory
Figure 5.52
Figure 5.53
Figure 5.54(i)
Dept. of CS&E, JIT, Davangere 32
Graph Theory
Decomposition
We say that a graph G is decomposed ( or partitioned) into 2 subgraphs G1 and G2 if G1UG2 = G and
G1∩G2=Null graph.
Deletion
If v is a vertex in a graph G, then G-v is denotes the subgraph of G, obtained by deleting v and all edges
incident on v from G. This sub graph, G-v is referred to as vertex-deleted subgraph of G.
It should be noted that deletion of a vertex always includes the deletion of all edges incident on that
vertex.
If e is an edge in a graph G, then G-e denotes the subgraph of G obtained by deleting e from G. This
subgraph G-e, is referred to as an edge-deleted sub graph of G.
An edge-deleted sub graph of a graph is a spanning sub graph of the graph.
For the graph G shown in figure 5.54(ii)(a), the subgraphs G-v and G-e are shown in figures 5.54(ii) (b)
and (c) respectively.
Figure 5.54(ii)
Problem:
1. Let G be a simple graph of order n. if the size of G is 56 and the size of G is 80, what is n?
Sol: We know that, G =Kn-G
Therefore size of G = (size of Kn) – (size of G)
80 = (size of Kn)- 56
1
We know that, the no. of edges in a complete graph Kn= 2 n(n − 1)
1
80 = 2 n(n − 1) – 56
1
80+56= n(n − 1)
2
1
136 = 2 n(n − 1)
272 = n(n-1)
n=17
Dept. of CS&E, JIT, Davangere 33
Graph Theory
5.6 Connected and Disconnected Graphs
Consider a graph G of order greater than or equal to 2.
Two vertices in G are said to be connected if there is at least one path from one vertex to the other.
A graph G is said to be
i) Connected if there is at least one path between every two distinct vertices in G.
ii) Disconnected, if G has at least one pair of distinct vertices between which there is no path.
For example, the graph shown in figure 5.55(a) is connected where as the graph shown in figure 5.55(b)
is disconnected, because, for example, there is no path from v1 to v4.
Figure 5.55
Figure 5.75
Figure 5.76
We note that in this graph
deg(A)=deg(B)=deg(Q)=3 deg(P)=5.
Which are not even.
Therefore the graph does not have an Euler circuit. This means that there does not exist a
closed walk that contains all the edges exactly once. This amounts to saying that it is not
possible to walk over each of the 7 bridges once and return to the starting point.