Graph Theory
Graph Theory
Module-II
Discrete Mathematics
Kailash Kumar
Asst. Prof., CEA
GLAU, Mathura
Introduction
• Graphs are data structures consisting of
vertices and edges that connect these
vertices.
Eg.
Eg.
Since there is a direction between
Vertices. Vertices pairs are called ordered
pairs.
(A,B) is an ordered pair
(B,A) does not exist in this graph
Example :
How many edges are there in a graph with 10
vertices each of degree six?
Solution: Because the sum of the degrees of the
vertices is 6*10 = 60, it follows that 2e = 60.
Therefore, e = 30.
BCSC 0010 Discrete Mathematics 19
Terminologies
• When (u, v) is an edge of the graph G with
directed edges, u is said to be adjacent to v
and v is said to be adjacent from u.
• The vertex u is called the initial vertex of (u, v),
and v is called the terminal or end vertex of (u,
v). The initial vertex and terminal vertex of a
loop are the same.
Cut Vertex: c or e
Cut Set:
•{e1, e3, e5, e8}
•{e1, e3, e6, e7}
•{e9}
•{e3, e4, e5}
•{e1, e2, e7}
•{e2, e3, e6}
BCSC 0010 Discrete Mathematics •{e1, e4, e8} 69
Walk in Graph Theory
• A walk is defined as a finite length alternating
sequence of vertices and edges.
• The total number of edges covered in a walk is
called as Length of the Walk.
• In graph theory, a walk is called as an Open
walk if:
– Length of the walk is greater than zero
– And the vertices at which the walk starts and ends
are different.
BCSC 0010 Discrete Mathematics 70
Walk in Graph Theory
• In graph theory, a walk is called as a Closed
walk if:
– Length of the walk is greater than zero
– And the vertices at which the walk starts and ends
are same.
• If length of the walk = 0, then it is called as
a Trivial Walk.
• Both vertices and edges can repeat in a walk
whether it is an open walk or a closed walk.
BCSC 0010 Discrete Mathematics 71
Example
• In this graph, few
examples of walk are-
• A,B,C,E,D
(Length = 4)
• D, B, A, C, E, D, E, C
(Length = 7)
• E,C,B,A,C,E,D
(Length = 6)
v2e1v1e7v4e6v6 4. Cycle
5. Circuit (Not a cycle because
vertex v4 is repeated)
BCSC 0010 Discrete Mathematics 79
EULER Path
• If there exists a walk in the connected graph
that visits every edge of the graph exactly
once with or without repeating the vertices,
then such a walk is called as an Euler walk.