0% found this document useful (0 votes)
25 views117 pages

Graph Theory Unit-V

Uploaded by

2910kirtana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views117 pages

Graph Theory Unit-V

Uploaded by

2910kirtana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 117

GRAPH THEORY

UNIT-V

Dr. E. Suresh
Asst Professor
Dept of Mathematics
SRMIST

Dr. E.Suresh, Asst Prof / Maths Graph Theory 1/117


Graph
A graph G = (V,E) consists of a non-empty set V, called the set of
vertices(nodes, points) and a set E of ordered or unordered pairs of
elements of V, called the set of edges, such that there is a mapping
from the set E to the set of ordered or unordered pairs (vi , vj ) of
elements of V

Example:

Let V = {a, b, c, d } a b
E = {(a, b ), (a, c ),
(a,d), (b,d), (c,d) }

d c

Dr. E.Suresh, Asst Prof / Maths Graph Theory 2/117


Isolated Vertex
A vertex which is not connected by an edge to any other vertex is
called isolated vertex

a b e

d c

Here vertex ’e’ is said to be isolated vertex

Dr. E.Suresh, Asst Prof / Maths Graph Theory 3/117


Loop
An edge of a graph that joins a vertex to itself is called a loop. The
direction of a loop is not significant, as the initial and terminal
vertices are the same.

b e
a

d c

Dr. E.Suresh, Asst Prof / Maths Graph Theory 4/117


Simple graph
A graph, in which there is only one edge between a pair of vertices,
is called a simple graph

a b

d c

Dr. E.Suresh, Asst Prof / Maths Graph Theory 5/117


Pseudograph
A graph in which loops and parallel edges are allowed is called a
pseudograph.

b
a

d c

Dr. E.Suresh, Asst Prof / Maths Graph Theory 6/117


Weighted Graph
A graph in which a number is assigned to each edge is called a
weighted graph

a 3 b

5 4

d 6 c

Dr. E.Suresh, Asst Prof / Maths Graph Theory 7/117


Adjacent Vertices
Two vertices are adjacent in G if v1 and v2 are end points of an edge

v1 v2

v4 v3

Here the vertex v1 is adjacent to v2 , since there is an edge between


them.
Similarly v1 ,v3 and v1 ,v4 are adjacent vertices
Also v2 ,v4 are adjacent vertices

Dr. E.Suresh, Asst Prof / Maths Graph Theory 8/117


Incident Edge
If the edge ’e’ is associated with the vertices v1 and v2 then the
edge ’e’ is incident with the vertex v1 and v2 .

a e1 b

e3 e2

e4 c
d

In the above example, the edge e1 is incident with a and b, the


edge e2 is incident with a and c,the edge e3 is incident with a and
d and the edge e4 is incident with c and d,

Dr. E.Suresh, Asst Prof / Maths Graph Theory 9/117


Degree of a Vertex
It is number of edges incident with the vertex. A loop contributes
two degrees to the vertex. It is denoted by deg(v)

Degree of each vertices are


b
a
deg (a) = 5

deg (b ) = 2

deg (c ) = 2 and
d c
deg (d ) = 3
A vertex of degree 1 is called "Pendant vertex"
A vertex of degree 0 is called "Isolated vertex"

Dr. E.Suresh, Asst Prof / Maths Graph Theory 10/117


COMPLETE GRAPH
A complete graph on n vertex denoted by Kn is a simple graph that
contains exactly one edge between each pair of distinct vertices

Note :
1. Degree of each vertices in Kn is n − 1
n (n −1)
2. Total no. of edges in Kn is 2

a a b

K1 K2

Dr. E.Suresh, Asst Prof / Maths Graph Theory 11/117


a a b

d c
c b
K4
K3
a

a
f b

e b e c

d c
d
K5 K6

Dr. E.Suresh, Asst Prof / Maths Graph Theory 12/117


CYCLIC GRAPH
For a given set of vertices v = {v1 , v2 , ....., vn } of G.
Cyclic graph will contain only the following edges
(v1 , v2 ), (v2 , v3 ), (v3 , v4 ), .....(vn−1 , vn ), (vn , v1 )
Cyclic graph of n vertices is denoted by Cn

Examples:

a a b

d c
c b
C3 C4

Dr. E.Suresh, Asst Prof / Maths Graph Theory 13/117


a a

e b f b

d c e c

d
C5 C6

Dr. E.Suresh, Asst Prof / Maths Graph Theory 14/117


WHEEL GRAPH
Wheel graph are got by adding an additional vertex to the cyclic
graph Cn which connect every other vertex by new vertex
Wheel graph, formed from Cn , is denoted by Wn

Example :

a a b
e
d
c b d c
W3 W4

Dr. E.Suresh, Asst Prof / Maths Graph Theory 15/117


a a

e b f b
f g
d c e c

d
W5 W6

Dr. E.Suresh, Asst Prof / Maths Graph Theory 16/117


Regular Graph
If every vertex of the graph has same degree, then the graph is
called regular graph

K-regular Graph
If every vertex of the graph has degree k then the graph is called
k-regular graph

Note
1. All complete graph are regular graph
2. All cyclic graph are regular graph

Dr. E.Suresh, Asst Prof / Maths Graph Theory 17/117


Examples for Regular Graphs

a a b

d c
c b
K4 or 3-regular graph
C3 /K3 or 2-regular graph a

a f b

e b e c

d c d
C5 or 2-regular graph K6 or 5-regular graph

Dr. E.Suresh, Asst Prof / Maths Graph Theory 18/117


Bi-partite Graph
A simple graph G is called a bi-partite graph, if its vertex set V can
be partitioned into two disjoints sets V1 and V2 , such that every
edge in G connect a vertex in V1 and a vertex in V2

a b c

f e d

Dr. E.Suresh, Asst Prof / Maths Graph Theory 19/117


Example of Bi-Partite Graph

a Clearly C6 is an bi-partite graph,


since vertex set can be
f b
partitioned in to two disjoints
e c sets V1 and V2 , such that each
edge connects a vertex in V1
d and in V2
V1 = {a, c, e } and
C6 V2 = {b, d, f }

Dr. E.Suresh, Asst Prof / Maths Graph Theory 20/117


Complete Bi-partite Graph
If each vertex of V1 is connected with every other vertex of V2 by
an edge then the bipartite graph G is called complete Bipartite
graph

Note
If the vertex set V1 contains m vertices and vertex set V2 contains
n vertices, then the complete bipartite graph is denoted by Km,n

Dr. E.Suresh, Asst Prof / Maths Graph Theory 21/117


Examples :

a b a b

c d e c d e f
K2,3 K2,4

a b c a b c

d e d e f
K3,2 K3,3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 22/117


Degree Sequence of a graph
It is a sequence of D1 , D2 , D3 , .....Dn where Dn = deg (vn ) i.e.,
degrees of vertices in ascending order

Complementary Graph
The complementary graph G of a simple graph G has the same
vertices as that of G
Two vertices are adjacent in G if and only if they are NOT adjacent
in G
G ∪ G = Kn (Complete graph)

Dr. E.Suresh, Asst Prof / Maths Graph Theory 23/117


Example for Complementary Graph :

b b
a a

d c d c

Graph G Complementary graph G

Dr. E.Suresh, Asst Prof / Maths Graph Theory 24/117


Problem 1: Find the Solution: Complementary graph
complementary graph of G is
v1 v2 v1 v2

v4 v3 v4 v3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 25/117


Problem 2: Find the Solution: Complementary graph
complementary graph of G is
v1 v1

v5 v2 v5 v2

v4 v3 v4 v3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 26/117


Matrix Representation of Graphs

Adjacency Matrix
If G = (V , E ) is a simple graph with n vertices v1 , v2 , ...., vn , then
n × n matrix A of G, defined
 by
 1 if (v , v ) ∈ E (G )
i j
AG = [aij ], where aij = , is called the
 0 otherwise
Adjacency matrix of G

Dr. E.Suresh, Asst Prof / Maths Graph Theory 27/117


Basic Properties of Adjacency matrix
1. Since a simple graph has no loops, each diagonal entry of A, viz,
aii = 0 for i = 1, 2, 3, ..., n
2. The adjacency matrix of a simple graph is symmetric
3. The degree of the vertex vi i.e., deg (vi ) is sum of values in i 0 th
row or i 0 th column

Dr. E.Suresh, Asst Prof / Maths Graph Theory 28/117


Incident Matrix
If G = (V , E ) is an undirected graph with n vertices v1 , v2 , ...., vn
and medges e1 , e2 , ...., em then n × m matrix B = [bij ] where
 1 if e is incident with v
j i
bij = , is called the incident matrix
 0 otherwise
of G

Dr. E.Suresh, Asst Prof / Maths Graph Theory 29/117


Basic Properties of Incident Matrix
1. Each column of B contains exactly two unit entries
2. A row with all 0 entries corresponds to an isolated vertex.
3. A row with a single unit entry corresponds to a pendant vertex
4. The degree of the vertex vi i.e., deg (vi ) is sum of values in i 0 th
row

Dr. E.Suresh, Asst Prof / Maths Graph Theory 30/117


Problems:

1. Find the adjacency matrix for Solution :


the graph G Adjacency matrix is
a b
 
0 1 1 1
 
1 0 1 0
AG = 
 
d c 1 1 0 1

 
1 0 1 0

Dr. E.Suresh, Asst Prof / Maths Graph Theory 31/117


2. Find the adjacency matrix for Solution : Adjacency matrix is
the graph G
a b  
0 1 1 1
 
1 0 1 1
AG = 
 

1 1 0 1
 
d c
1 1 1 0

Dr. E.Suresh, Asst Prof / Maths Graph Theory 32/117


3. Find the adjacency matrix for Solution : Adjacency matrix is
the graph G
 
0 0 1 1 1
a b 
0

 0 1 1 1
 
AG = 
1 1 0 0 0
 
1 1 0 0 0
 
c d e 1 1 0 0 0

Dr. E.Suresh, Asst Prof / Maths Graph Theory 33/117


4. Find the incident matrix for Solution : There are 4 vertices
the graph G and 5 edges. So 4 rows and 5
columns

a b Incident matrix is
e1

e4 e5 e2  
1 0 0 1 1
 
e3 1 1 0 0 0
d c IG = 
 

0 1 1 0 1
 
0 0 1 1 0

Dr. E.Suresh, Asst Prof / Maths Graph Theory 34/117


5. Find the incident matrix for Solution : There are 5 vertices
the graph H and 5 edges. So 5 rows and 5
columns
Incident matrix is
a b
 
e1 e2 e3 e5 e4 1 1 1 0 0
 
0 0 0 1 1
 
c d e 
IH = 

1 0 0 0 0
 
0 1 0 0 1
 
0 0 1 1 0

Dr. E.Suresh, Asst Prof / Maths Graph Theory 35/117


Isomorphic Graphs
Two simple graphs G1 = (V1 , E1 ) and G2 = (V2 , E2 ) are
said to be isomorphic, if there is a one-to-one and onto function f
from V1 to V2 with a 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, b ∈ V1
Also, such a function f is called isomorphism.

Dr. E.Suresh, Asst Prof / Maths Graph Theory 36/117


Isomorphic Graphs will have

1 Same number of vertices


2 Same number of edges
3 Same degree sequence(ascending order)
4 Corresponding vertices with same degree
5 Corresponding adjacency matrices are same

Dr. E.Suresh, Asst Prof / Maths Graph Theory 37/117


Steps to check whether two graphs are isomorphic

1 List the number of vertices, number of edges and degree


sequences
2 If the numbers are same, then the graphs may be isomorphic
Otherwise we can conclude that, the graphs are NOT
isomorphic
3 Unfold the first/second graph in such a way that, it looks
similar to the another graph
4 If the first/second graph cannot be unfolded, then they are not
isomorphic

Dr. E.Suresh, Asst Prof / Maths Graph Theory 38/117


5 Identify one-to-one and onto mapping between the vertex sets
of two graphs, using the graphs, one in original form and
another in the unfolded form
6 Form the adjacency matrix for each graph, as per the mapping
7 If the adjacency matrices are same, then conclude that the two
graphs are isomorphic

Dr. E.Suresh, Asst Prof / Maths Graph Theory 39/117


PROBLEMS

1 Check whether the following two graphs are isomorphic

u1 v1 v2

u6 u2 v5

u5 u3 v6

u4 v4 v3
G H

Dr. E.Suresh, Asst Prof / Maths Graph Theory 40/117


Solution:

Graphs G H
No. of Vertices 6 6
No. of Edges 9 9
Degree Sequences 3,3,3,3,3,3 3,3,3,3,3,3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 41/117


Unfolding of H Mapping
V1 V2

v5
u1 v5
v1 v2 u2 v2
u3 v3
v4 v3 u4 v6
u5 v4
v6
u6 v1

Dr. E.Suresh, Asst Prof / Maths Graph Theory 42/117


Adjacency matrices are

   
0 1 0 1 0 1 0 1 0 1 0 1
   
1 0 1 0 0 1 1 0 1 0 0 1
   
   
0 1 0 1 1 0 0 1 0 1 1 0
AG =  AH = 
   
 
1 0 1 0 1 0 1 0 1 0 1 0
   
   
0 0 1 1 0 1 0 0 1 1 0 1
   
1 1 0 0 1 0 1 1 0 0 1 0
In AG , vertex order is In AH , vertex order is
u1 − u2 − u3 − u4 − u5 − u6 v5 − v2 − v3 − v6 − v4 − v1

∴ AG = AH
Hence G and H are isomorphic graphs

Dr. E.Suresh, Asst Prof / Maths Graph Theory 43/117


2 Check whether the following two graphs are isomorphic

u2 v1

u1 u3 v5 v2

u5 u4
v4 v3
G H
Solution:

Graphs G H
No. of Vertices 5 5
No. of Edges 6 6
Degree Sequences 2,2,2,3,3 2,2,2,3,3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 44/117


Unfolding of G Mapping
V1 V2

u3
u1 v3
u2 u4
u2 v5
u3 v1
u5 u1 u4 v2
u5 v4

Dr. E.Suresh, Asst Prof / Maths Graph Theory 45/117


Adjacency matrices are

   
0 0 1 1 1 0 0 1 1 1
   
0 0 1 0 1 0 0 1 0 1
   
   
AG =  1 1 0 1 0  AH =  1 1 0 1 0 
   
1 0 1 0 0 1 0 1 0 0
   
1 1 0 0 0 1 1 0 0 0
In AG , vertex order is In AH , vertex order is
u1 − u2 − u3 − u4 − u5 v3 − v5 − v1 − v2 − v4

∴ AG = AH
Hence G and H are isomorphic graphs

Dr. E.Suresh, Asst Prof / Maths Graph Theory 46/117


3 Check whether the following two graphs are isomorphic

A v1 v2

C B
v4 v3
G H
Solution:

Graphs G H
No. of Vertices 4 4
No. of Edges 6 6
Degree Sequences 3,3,3,3 3,3,3,3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 47/117


Unfolding of H Mapping
V1 V2

v1
A v1

v4 B v2

C v3
v3 v2
D v4

Dr. E.Suresh, Asst Prof / Maths Graph Theory 48/117


Adjacency matrices are

   
0 1 1 1 0 1 1 1
   
1 0 1 1 1 0 1 1
AG =  AH = 
   
 
1 1 0 1 1 1 0 1
   
1 1 1 0 1 1 1 0
In AG , vertex order is In AH , vertex order is
A−B −C −D v1 − v2 − v3 − v4

∴ AG = AH
Hence G and H are isomorphic graphs

Dr. E.Suresh, Asst Prof / Maths Graph Theory 49/117


4 Check whether the following two graphs are isomorphic

u1 u2 u3 u4 u5 v5 v4

v3

v1 v2
G H

Dr. E.Suresh, Asst Prof / Maths Graph Theory 50/117


Solution:

Graphs G H
No. of Vertices 5 5
No. of Edges 7 7
Degree Sequences 2,2,3,3,4 2,2,3,3,4

Dr. E.Suresh, Asst Prof / Maths Graph Theory 51/117


Unfolding of H Mapping
V1 V2

u1 v2
v2 v1 v3 v5 v4 u2 v1
u3 v3
u4 v5
u5 v4

Dr. E.Suresh, Asst Prof / Maths Graph Theory 52/117


Adjacency matrices are

   
0 1 1 0 0 0 1 1 0 0
   
1 0 1 0 0 1 0 1 0 0
   
   
AG =  1 1 0 1 1  AH =  1 1 0 1 1 
   
0 0 1 0 1 0 0 1 0 1
   
1 0 1 1 0 1 0 1 1 0
In AG , vertex order is In AH , vertex order is
u1 − u2 − u3 − u4 − u5 v2 − v1 − v3 − v5 − v4

∴ AG = AH
Hence G and H are isomorphic graphs

Dr. E.Suresh, Asst Prof / Maths Graph Theory 53/117


5 Check whether the following two graphs are isomorphic

a b o p

e f s t

h g v u

d c r q
G H

Dr. E.Suresh, Asst Prof / Maths Graph Theory 54/117


Solution:

Graphs G H
No. of Vertices 8 8
No. of Edges 10 10
Degree Sequences 2,2,2,2,3,3,3,3 2,2,2,2,3,3,3,3
Here deg (h ) = 3
Adjacent vertices of h have the degree 3,2,2
and deg (v ) = 3
Adjacent vertices of v have the degree 3,3,2
The degree sequence of adjacent vertices are different
Simply, two degree vertices are not adjacent in G whereas they
are adjacent in H
∴ G and H are not isomorphic
Dr. E.Suresh, Asst Prof / Maths Graph Theory 55/117
6 Check whether the following two graphs are isomorphic or not

u1 u2 v1

u5 v2
u5

u4 u3 v4 v3
G H

Dr. E.Suresh, Asst Prof / Maths Graph Theory 56/117


Solution:

Graphs G H
No. of Vertices 5 5
No. of Edges 7 7
Degree Sequences 2,3,3,3,3 2,2,3,3,4

Here degree sequence of G and H are not same


∴ G and H are not isomorphic

Dr. E.Suresh, Asst Prof / Maths Graph Theory 57/117


7 Check whether the following two graphs are isomorphic

u1 u2 v1 v2

v6 v3
u6 u3
v5 v4
u5 u4
G1 G2

Dr. E.Suresh, Asst Prof / Maths Graph Theory 58/117


Solution:

Graphs G1 G2
No. of Vertices 6 6
No. of Edges 8 8
Degree Sequences 2,2,3,3,3,3 2,2,2,3,3,4

Here degree sequence of G1 and G2 are not same


∴ G1 and G2 are not isomorphic

Dr. E.Suresh, Asst Prof / Maths Graph Theory 59/117


8 Check whether the following two graphs are isomorphic

u6 v6
u1 u2 u3
u4
v1 v2 v3 v4 v5

u5
G1 G2

Dr. E.Suresh, Asst Prof / Maths Graph Theory 60/117


Solution:

Graphs G1 G2
No. of Vertices 6 6
No. of Edges 5 5
Degree Sequences 1,1,1,2,2,3 1,1,1,2,2,3

Here deg (u4 ) = 3


Adjacent vertices of u4 have the degree 1,1,2
and deg (v3 ) = 3
Adjacent vertices of v3 have the degree 1,2,2
The degree sequence of adjacent vertices are different
∴ G1 and G2 are not isomorphic

Dr. E.Suresh, Asst Prof / Maths Graph Theory 61/117


9 Examine whether the graphs G and H associated with the
adjacency matrices are isomorphic or not.

   
0 1 1 1 0 1 1 1
   
1 0 0 1 1 0 1 0
AG =  AH = 
   
 
1 0 0 1 1 1 0 1
   
1 1 1 0 1 0 1 0

Dr. E.Suresh, Asst Prof / Maths Graph Theory 62/117


Solution: The corresponding graphs are given below :

u1 u2 v1 v2

u4 u3 v4 v3
G H

Graphs G H
No. of Vertices 4 4
No. of Edges 5 5
Degree Sequences 2,2,3,3 2,2,3,3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 63/117


Unfolding of H Mapping
V1 V2

v1 v2 u1 v1
u2 v2
v3 v4 u3 v4
u4 v3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 64/117


Adjacency matrices, based on the mapping, are

   
0 1 1 1 0 1 1 1
   
1 0 0 1 1 0 0 1
AG =  AH = 
   
 
1 0 0 1 1 0 0 1
   
1 1 1 0 1 1 1 0
In AG , vertex order is In AH , vertex order is
u1 − u2 − u3 − u4 v1 − v2 − v4 − v3

∴ AG = AH
Hence G and H are isomorphic graphs

Dr. E.Suresh, Asst Prof / Maths Graph Theory 65/117


10 Examine whether the graphs G and H associated with the
adjacency matrices are isomorphic or not.

   
0 1 0 1 0 0 0 1 0 0 1 0
   
1 0 1 0 0 1 1 0 1 0 0 0
   
   
0 1 0 1 0 0 0 1 0 1 0 1
AG =  AH = 
   
 
1 0 1 0 1 0 0 0 1 0 1 0
   
   
0 0 0 1 0 1 1 0 0 1 0 1
   
0 1 0 0 1 0 0 0 1 0 1 0

Dr. E.Suresh, Asst Prof / Maths Graph Theory 66/117


Solution: The corresponding graphs are given below :

u1 u2 v1 v2
u6 u3 v6 v3
u5 u4 v5 v4
G H

Graphs G H
No. of Vertices 6 6
No. of Edges 7 7
Degree Sequences 2,2,2,2,3,3 2,2,2,2,3,3

Dr. E.Suresh, Asst Prof / Maths Graph Theory 67/117


Unfolding of G & H Mapping

u6 u2 V1 V2

u1 u3
u5 u4 u1 v6
u2 v3
G
u3 v4
v2 v3 u4 v5
u5 v1
v6 v4
u6 v2
v1 v5

Dr. E.Suresh, Asst Prof / Maths Graph Theory 68/117


Adjacency matrices, based on the mapping, are

   
0 1 0 1 0 0 0 1 0 1 0 0
   
1 0 1 0 0 1 1 0 1 0 0 1
   
   
0 1 0 1 0 0 0 1 0 1 0 0
AG =  AH = 
   
 
1 0 1 0 1 0 1 0 1 0 1 0
   
   
0 0 0 1 0 1 0 0 0 1 0 1
   
0 1 0 0 1 0 0 1 0 0 1 0
In AG , vertex order is In AH , vertex order is
u1 − u2 − u3 − u4 − u5 − u6 v6 − v3 − v4 − v5 − v1 − v2

∴ AG = AH
Hence G and H are isomorphic graphs

Dr. E.Suresh, Asst Prof / Maths Graph Theory 69/117


Problems for Practice
Check whether the following two graphs are isomorphic

a b v1 v2 v3

f v6

d c v5 v4

G H

Dr. E.Suresh, Asst Prof / Maths Graph Theory 70/117


Self Complementary Graph
A graph G is said to be a self complementary graph if G is
isomorphic to its complementary graph G
i.e., if G u G then G is called self-complementary graph

Example :
v1 v1

v5 v2 v5 v2

v4 v3 v4 v3
G G

G is self complementary graph

Dr. E.Suresh, Asst Prof / Maths Graph Theory 71/117


Important Theorems

1 State and prove Handshaking theorem. Also prove that


maximum number of edges in a simple graph G with n vertices
n (n −1)
is n C2 [or] 2
Proof: Statement : Let G = (V , E ) be a graph.
Then ∑ deg(u ) = 2 |E | where |E | is number of edges in G
u ∈V
proof:Consider an edge e = (u, v ) of G
The edge e is incident with both end vertices u and v . The
contribution of e to each of the degrees of u and v is one.
Hence the total contribution of the edge e to sum of the
degrees of vertices of G is two.

Dr. E.Suresh, Asst Prof / Maths Graph Theory 72/117


This is true for each and every edge of G. Also a loop
contributes two to the sum of the degrees of the vertices.
Hence the sum of the degrees of the vertices of G is twice the
number of edges in G
Then ∑ deg(u ) = 2 |E | where |E | is number of edges in G
u ∈V

Dr. E.Suresh, Asst Prof / Maths Graph Theory 73/117


To prove : Maximum number of edges in a simple graph with
n (n −1)
n vertices is 2
By Handshaking theorem, ∑ deg(u ) = 2 |E |
u ∈V
deg (u1 ) + deg (u2 ) + ... + deg (un ) = 2 |E |
WKT, maximum degree of a vertex in a simple graph of n
vertices is (n − 1)
=⇒ (n − 1) + (n − 1) + .... + (n − 1) = 2 |E |
=⇒ n(n − 1) = 2 |E |
n (n −1)
=⇒ |E | = 2

Dr. E.Suresh, Asst Prof / Maths Graph Theory 74/117


2 Prove that the number of vertices of odd degree in any graph
is even [OR]
Prove that undirected graph G has an even number of odd
degree vertices
Proof : Let G = (V , E ) be an undirected graph
Let us split the vertex set V in to two disjoint subsets as
follows
V1 = Set of all odd degree vertices
V2 = Set of all even degree vertices
∴ V = V1 ∪ V2 and V1 ∩ V2 = φ

Dr. E.Suresh, Asst Prof / Maths Graph Theory 75/117


By Handshaking Theorem, we have
∑ deg(u ) = 2 |E |
u ∈V

=⇒ ∑ deg(u ) + ∑ deg(u ) = 2 |E |
u ∈V1 u ∈V2

=⇒ ∑ deg(u ) + ∑ deg(u ) = even number − −− > (1)


u ∈V1 u ∈ V2

Since each element of V2 is an even degree vertex, each term


in the second summation of LHS of eqn (1) is an even number
=⇒ ∑ deg(u ) + even number = even number
u ∈ V1

Dr. E.Suresh, Asst Prof / Maths Graph Theory 76/117


=⇒ ∑ deg(u ) = even number
u ∈V1

This is possible, only when V1 has even number of elements.


Since V1 consist of odd degree vertices of G, it is clear that the
number of vertices of odd degree in a graph G is always even.
Hence the theorem

Dr. E.Suresh, Asst Prof / Maths Graph Theory 77/117


Congruence Modulo n

If a − b is divisible by n then we can say that


" a is congruent to b ( modulo n ) " and
can be written mathematically as
a ≡ b ( mod n )

Dr. E.Suresh, Asst Prof / Maths Graph Theory 78/117


3 If G is a self complementary graph, then prove that
G has n ≡ 0 or 1 (mod 4) [OR]
Show that the self complementary graph have 4n or 4n+1
vertices
Proof : Given G is a self complementary graph with n vertices
WKT G ∪ G = Kn
n (n −1)
=⇒ |E (G )| + E (G ) = 2 − − −− > (1)
Since G is self complementary, G u G
∴ |E (G )| = E (G )

Dr. E.Suresh, Asst Prof / Maths Graph Theory 79/117


n (n −1)
Eqn (1) becomes 2 |E (G )| = 2
n (n −1)
=⇒ |E (G )| = 4 − − −− > (2)
Since E (G ) is a positive integer
n (n −1)
=⇒ I = 4
=⇒ 4I = n(n − 1)
=⇒ n(n − 1) = 4I
=⇒ Either n is divisible by 4 or n - 1 is divisible by 4
=⇒ Either n = 4k or n - 1 = 4k
=⇒ n ≡ 0 (mod 4) or n - 1 ≡ 0 (mod 4)
=⇒ n ≡ 0 (mod 4) or n ≡ 1 (mod 4)

Dr. E.Suresh, Asst Prof / Maths Graph Theory 80/117


Path
A path from v1 to vn in a graph G, is a finite alternating sequence
of vertices and edges, beginning and ending with vertices

Simple Path
A path with neither repeated vertex nor a repeated edge is called
simple path

Dr. E.Suresh, Asst Prof / Maths Graph Theory 81/117


Cycle or circuit
If the initial and final vertex of the path are same, then the path is
called circuit or cycle.

Simple circuit
A Cycle of a simple path is called simple circuit. In other words, the
simple circuit does not contain the same edge more than once

Dr. E.Suresh, Asst Prof / Maths Graph Theory 82/117


Examples of Path and Circuit/Cycle
a e1 b

e5
e2 e4

c e3 e6 e
d

Path :
a − e1 − b − e4 − d − e5 − a − e2 − c − e3 − d − e6 − e
[OR] a−b−d −a−c −d −e
Simple Path : a − e1 − b − e4 − d − e6 − e [OR]
a−b−d −e
Simple Cycle : a − e1 − b − e4 − d − e5 − a
Simple Cycle : a − e1 − b − e4 − d − e3 − c − e2 − a

Dr. E.Suresh, Asst Prof / Maths Graph Theory 83/117


Connected graph
An undirected graph is said to be connected if there is a path
between every pair of vertices

a b e

d c f

Note : If there is no path between a pair of vertices, then the


graph G is disconnected graph

Dr. E.Suresh, Asst Prof / Maths Graph Theory 84/117


Connected components of the graph G
If a graph G is disconnected then the various connected path is
called connected components of a graph

a b f h i

d c g k j

Dr. E.Suresh, Asst Prof / Maths Graph Theory 85/117


CONNECTEDNESS IN A DIRECTED GRAPH

Strongly connected graph


A directed graph G is said to be strongly connected if there is a
path from vi to vj and from vj to vi where vi , vj are any pair of
vertices of the graph

a b

d c

Dr. E.Suresh, Asst Prof / Maths Graph Theory 86/117


Unilaterally connected graph
A simple directed graph is said to be unilaterally connected if for
any pair of vertices of the graph, atleast one of the vertices of the
pair is reachable from the other vertex

a b

d c

Dr. E.Suresh, Asst Prof / Maths Graph Theory 87/117


Weakly connected graph
A directed graph G is said to be weakly connected, if there is a
path between every two vertices in the underlying undirected graph

i.e., if there exist a path between every pair of vertices, after


removing the direction in each edges, then the graph is weakly
connected graph

Note:
1. Any strongly connected graph is unilaterally connected
2. Any unilaterally connected graph is weakly connected

Dr. E.Suresh, Asst Prof / Maths Graph Theory 88/117


Euler path
A path that contains every edge exactly once is called the Euler
path

b c

e d

Euler Path : b − a − d − c − d − e − b − c

Dr. E.Suresh, Asst Prof / Maths Graph Theory 89/117


Euler circuit
If Euler path begins and ends at the same vertex, then the circuit is
called Euler circuit

a c a b
b
e
e d f
d c

Note-1 : If the graph G contains Euler circuit, then the graph


G is called "Eulerian"
Note-2 : All vertices have even degree

Dr. E.Suresh, Asst Prof / Maths Graph Theory 90/117


Hamiltonian path
A path that passes through every vertex exactly once is called
Hamiltonian path

Hamiltonian circuit
A Hamiltonian path that starts and ends at the same vertex is
called Hamiltonian circuit

Dr. E.Suresh, Asst Prof / Maths Graph Theory 91/117


Example for Hamilton Circuit and Euler Circuit

b
b c
c
a
a g d

f
Hamilton e Euler d
and
f e
Hamilton and Euler
Note :
If a graph has Hamiltonian circuit then it is automatically has
Hamiltonian path but reverse is not necessarily true

Dr. E.Suresh, Asst Prof / Maths Graph Theory 92/117


Problems
Give an example of a graph which is

1 Eulerian but not Hamiltonian

2 Hamiltonian but not Eulerian

3 Hamiltonian and Eulerian

4 Neither Hamiltonian nor Eulerian

Dr. E.Suresh, Asst Prof / Maths Graph Theory 93/117


Solution (1) : Euler graph but Solution (2) : Hamiltonian
not Hamiltonian circuit but not Eulerian

a c a b

e b d d c
Eulerian not Hamiltonian Hamiltonian not Eulerian

Dr. E.Suresh, Asst Prof / Maths Graph Theory 94/117


Solution (3) : Both Solution (4) : Neither
Hamiltonian and Eulerian Hamiltonian nor Eulerian

a
a b e b

d c d c
Neither Hamiltonian nor
Hamiltonian and Eulerian Eulerian

Dr. E.Suresh, Asst Prof / Maths Graph Theory 95/117


Theorems(Cont...)
4 Prove that maximum number of edges in a simple disconnected
(n−k )(n−k +1)
graph G of n vertices and k components is 2
Proof : Given : G is disconnected graph with n vertices and k
components
Let ni be the number of vertices in i th component,
i = 1, 2, 3, ..., k
Then n1 + n2 + ... + nk = n − − − > (1)
k
=⇒ ∑ ni = n
i =1
(n−k )(n−k +1)
To prove : Maximum number of edges is 2

Dr. E.Suresh, Asst Prof / Maths Graph Theory 96/117


We know that, maximum number of edges in i th component of
ni (ni −1)
G is 2
Therefore the maximum number of edges in G is
k
n (n − 1)
=∑ i i
i =1 2
1 k
2 i∑
= [ni 2 − ni ]
=1
" #
1 k 2 k

2 i∑
= ni − ∑ ni
=1 i =1
" #
k
1
2 i∑
= ni 2 − n − −− > (2) [By eqn (1) ]
=1

Dr. E.Suresh, Asst Prof / Maths Graph Theory 97/117


k
To find ∑ ni 2 :
i =1

Equation (1) implies


n1 + n2 + ... + nk = n
Subtracting k on both sides, we get
=⇒ (n1 − 1) + (n2 − 1) + ... + (nk − 1) = n − k
k
=⇒ ∑ (ni − 1) = n − k
i =1

Squaring on both sides, we get


 2
k
=⇒ ∑ (ni − 1) = (n − k )2
i =1

Dr. E.Suresh, Asst Prof / Maths Graph Theory 98/117


k
=⇒ ∑ (ni − 1)2 + 2 ∑ (ni − 1)(nj − 1) = n2 + k 2 − 2nk
i =1 i 6 =j

k
=⇒ ∑ (ni − 1)2 ≤ n2 + k 2 − 2nk
i =1

k
=⇒ ∑ (ni 2 + 1 − 2ni ) ≤ n2 + k 2 − 2nk
i =1

k k
=⇒ ∑ ni 2 + k − 2 ∑ ni ≤ n2 + k 2 − 2nk
i =1 i =1

k
=⇒ ∑ ni 2 + k − 2n ≤ n2 + k 2 − 2nk
i =1

k
=⇒ ∑ ni 2 ≤ n2 + k 2 − 2nk − k + 2n − − − > (3)
i =1

Dr. E.Suresh, Asst Prof / Maths Graph Theory 99/117


Substituting eqn(3) in eqn (2) we get,
∴ Maximum number of edges in G is
" #
1 k 2
2 i∑
= ni − n
=1
1
≤ (n2 + k 2 − 2nk − k + 2n) − n

2
1
= (n − k )2 − k + n

2
1
= (n − k )2 + (n − k )

2
1
= [(n − k )(n − k + 1)]
2
(n − k )(n − k + 1)
=
2

Dr. E.Suresh, Asst Prof / Maths Graph Theory 100/117


5 Prove that the complement of disconnected graph is connected
Proof: Let G be a disconnected graph
To prove : Complement of G is connected
i.e., to prove that G is connected
Since G is disconnected, G has more than one connected
component. Let u and v be any two arbitrary vertices in G

u u
v v

G G
Case (i) : Let u and v be in two different components of G. So
u and v are not adjacent in G. But adjacent in G . Hence there
is a path between u and v in G . Therefore G is connected

Dr. E.Suresh, Asst Prof / Maths Graph Theory 101/117


u u
w w
v v
G G

Case (ii) : Let u and v be in same component of G. Let w be


some vertex in another component of G. This means the edges
uw and vw were not in G. And this implies that, they both
present in G . This gives the path u − w − v . Therefore there
is a path between u and v in G . Hence G is connected

Dr. E.Suresh, Asst Prof / Maths Graph Theory 102/117


6 Show that the graph G is disconnected if and only if its vertex
set V can be partitioned into two non empty subsets V1 and
V2 such that there exists no edge in G whose one end vertex in
V1 and other in V2
Proof: Let G be disconnected graph.
Let us prove that, vertex set V can be partitioned into two
non-empty subsets V1 and V2 such that there exists no edge in
G between the vertices of V1 and V2
Consider a vertex ’a’ in G and let V1 be set of all vertices that
are joined by paths to a.

Dr. E.Suresh, Asst Prof / Maths Graph Theory 103/117


Since G is disconnected, V1 does not include all the vertices of
G and the remaining vertices will form a set V2 . No vertex in
V1 is joined to any other vertex in V2 by an edge. Hence the
partition exist in the vertex set V.
Conversely, let us assume that partition exists in the vertex set.
Let G be a graph with vertex set V.
To prove : G is disconnected graph
Let V1 and V2 be two subsets of V, such that V1 ∪ V2 = V .

Dr. E.Suresh, Asst Prof / Maths Graph Theory 104/117


Consider two arbitrary vertices ’a’ and ’b’ of G such that ’a’ in
V1 and ’b’ in V2 .
No path can exist between the vertices a and b. Otherwise
there would be at least one edge whose one end vertex is in V1
and other in V2 .
Hence if the partition exist, G is not connected and therefore G
is disconnected graph.
Hence the theorem

Dr. E.Suresh, Asst Prof / Maths Graph Theory 105/117


7 If all the vertices of an undirected graph are of degree k then
show that the number of edges of the graph is a multiple of k.
Proof : Let G = (V , E ) be a simple graph with n vertices and
e edges
∴ |V | = n and |E | = e
Consider each of the vertices of G having degree k.
By Handshaking theorem, we have
n
∑ deg(ui ) = 2e =⇒ ∑ deg(ui ) = 2e
ui ∈ V i =1
=⇒ deg (u1 ) + deg (u2 ) + deg (u3 ) + .... + deg (un ) = 2e
=⇒ k + k + k + .... + k (n times) = 2 e
=⇒ nk=2e
nk
=⇒ e = 2

Dr. E.Suresh, Asst Prof / Maths Graph Theory 106/117


Case(i) : If k is even, then nk is even
nk
Hence e = 2 is an integer and multiple of k
Hence the theorem
Case (ii) If k is odd, then n is even
=⇒ nk is even
WKT, any simple graph contains even number of odd degree
vertices
nk
=⇒ e = 2 is an integer and multiple of K
Hence the theorem

Dr. E.Suresh, Asst Prof / Maths Graph Theory 107/117


8 Prove that maximum number of edges in bi-partite graph with
n2
n-vertices is 4 [OR]
Prove that the number of edges in a bi-partite graph with
n2
n-vertices is atmost 4
Proof:Let the vertex set can be partitioned into two subsets V1
and V2 . Let V1 contains x vertices, then V2 contains n − x
vertices. The maximum number of edges in the graph can be
obtained when each of x vertices in V1 is connected to each of
n − x vertices in V2

Dr. E.Suresh, Asst Prof / Maths Graph Theory 108/117


Therefore the maximum number of edges is given by
f (x ) = x (n − x ) which is a function of x
Now we have to find the value of x for which f (x ) is maximum
By calculus f 0 (x ) = n − 2x and f 00 (x ) = −2
f 0 (x ) = 0 =⇒ x = n/2
f 00 (n/2) = −2 < 0
n
Hence f(x) is maximum at x = 2
n2
∴ Maximum number = f ( n2 ) = n2 n

n− 2 = 4
Hence the proof

Dr. E.Suresh, Asst Prof / Maths Graph Theory 109/117


9 A non empty connected graph is Euler if and only if its vertices
are of even degree
Proof : Let us assume that the connected graph G is Eulerian
To prove : Vertices of G are all of even degree
since G is Eulerian, G contains Euler circuit which begins and
ends at one vertex, say u. If we travel along the circuit, then
each time we visit a vertex, we use two edges one in and one
out. This is also true for the start vertex because we also ends
there. Since eulerian circuit uses every edge once, each
occurrence of an edge represents a contribution of 2 to its
degree. Thus degree of u is even.

Dr. E.Suresh, Asst Prof / Maths Graph Theory 110/117


Conversely let us assume that the connected graph G has an
even degree vertices.
To prove : G contains Euler circuit or G is Eulerian graph
Choose an arbitrary vertex ’a’ in G.
Let a = x0 . Choose an edge (x0 , x1 ) incident with x0 .
This is possible because the G is connected.
We continue building a simple path x0 , x1 , x2 , ..., xn by adding
edges until we reach a vertex, for which we have included all
the edges incident with vertex in that graph.
Since the degree of each vertex is even, if we enter a vertex
other than ’a’, there is an another edge at vertex to leave.
Therefore the path constructed should end only at a. Thus we
get a circuit.

Dr. E.Suresh, Asst Prof / Maths Graph Theory 111/117


Now there are two possibilities
1.The Circuit we have constructed contains all edges of G
2.The Circuit we have constructed has not used all the edges
In case (1), the circuit constructed is an Eulerian circuit.
In case (2), now we construct a subgraph H of G, by deleting
all the edges used and the vertices that are not incident with
the remaining edges

x1 x3 w1 w2 w1 w2
x2
a w
w

w4 w3 w4 w3
G H

Dr. E.Suresh, Asst Prof / Maths Graph Theory 112/117


Since G is connected, H has at least one vertex in common
with the circuit that has been deleted. Let w be such vertex.
Since G contains even degree vertices, each vertex in H has
even degree. Since all vertices are of even degree, beginning at
w, construct s simple path in H, by choosing the vertex as long
as possible. This path must terminate at w. Next form a
circuit in G, by incorporating circuit in H with the original
circuit in G, via w. Continue this process until all the edges
have been used.
This produces the Euler circuit
Hence the theorem

Dr. E.Suresh, Asst Prof / Maths Graph Theory 113/117


10 A connected graph G has an Euler path, but not Euler circuit,
iff it has exactly two odd degree vertices
Proof:Let us assume that the connected graph G has an Euler
path.
To prove : G is having two odd degree vertices
In the Euler path, every vertex in the middle is associated with
two edges and since there is only one edge associated with
each end vertices of the path. These end vertices must be of
odd degree and other vertices must be of even degree

Dr. E.Suresh, Asst Prof / Maths Graph Theory 114/117


Conversely, let us assume that the connected graph G has
exactly two odd degree vertices
To prove : G has Euler path
Let vi , vj be the only odd degree vertices in the connected
graph. Suppose that vi and vj are not adjacent. If we adjoint
a new edge eij to the edge set of G, then all vertices in the
enlarged graph are of even degree. Hence it contains Euler
circuit. By deleting the edge eij from the Euler circuit, we can
get Euler path between vi and vj

Dr. E.Suresh, Asst Prof / Maths Graph Theory 115/117


11 Let G be a graph with exactly two vertices of odd degree then
there is a path between those two vertices.
Proof: Let G be a graph and u and v be two odd degree
vertices. Let us consider two cases.
Case (i) : Let G be a connected graph. Since G is connected,
there exists a path between every pair of vertices. Hence there
is a path between u and v

Dr. E.Suresh, Asst Prof / Maths Graph Theory 116/117


Case (ii) : Let G be a disconnected graph. Let G1 be a
connected component of G such that u ∈ V (G1 ).Since G1 is a
connected graph, it must contain even number of odd degree
vertices. Since u and v are the only two odd degree vertices in
G , v ∈ V (G1 ). Hence there is a path between u and v

Dr. E.Suresh, Asst Prof / Maths Graph Theory 117/117

You might also like