Graph Theory: Module-1
Graph Theory: Module-1
Graphs
Definition: A graph is collection of points called vertices &
collection of lines called edges each of which joins either a pair of
points or single points to itself.
In short, we can represent G=(V,E) where V=(v1, v2, v3, v4) & e6
Self Loops:
Definition: If the end vertices Vi & Vj of any edge eij are same, then edge eij called
as Self Loop .
Parallel Edges
Definition: If there are more than one edge is associated with given pair of
vertices then those edge called as Parallel or Multiple edge.
For Example, In graph G, e4 & e5 has (v1, v3) are called as Parallel edge.
Simple & Multiple Graphs
6
1.4
For Example, V1 V2
6
1.5
V4 V3
1.7
8
9
Utilities Problem:
Labeled Graph:
Definition: The graph is called as bipartite graph , if its vertex set V can
be partitioned into two distinct subset say V1 & V2. such that no two
vertices in the same partition can be adjacent. Here the pair(v1,v2) is called
the bipartite of G.
V=v1 U v2
v4 e3
e5
e4 v3
e7
e6
The degree of a vertex is sometimes also referred to as its
valency.
30
31
Isolated Vertex, Pendant Vertex
and Null Graph 32
A vertex with degree zero(no incident edge) is called as
Isolated Vertex. Vertices v4 and v7 are isolated vertices.
Theorem: The graph G with e no. of edges & n no. of vertices, since
each edge contributes two degree, the sum of the degrees of all
vertices in G is twice no. of edges in G.
For Example:
G G1 G2
46
Edge-Disjoint Subgraphs: Two (or more) subgraphs g1 and
g2 of a graph G are said to be edge disjoint if g1 and g2 47
do not have any edges in common.
WALKS, PATHS, AND CIRCUITS
48
for instance, v1 a v2 b v3 c v3 d
v4 e v2 f v5 is a walk shown with
heavy lines.
50
Walk can be open or closed.
vl a v2 b v3 d v4 h v5 is a path,
whereas v1 a v2 b v3 c v3 d v4 e v2 f v5 is not a path.
54
The number of edges in a path is called
the length of a path.
More formally:
A graph G is said to be connected if there is at least one path
between every pair of vertices in G. Otherwise, G is disconnected.
For
60
A connected component or simply component of an
undirected graph is a subgraph in which each pair of nodes is
connected with each other via a path.
It is easy to see that a disconnected graph consists
of two or more connected graphs. Each of these
connected subgraphs is called a component.
The graph below consists of two components.
61
62
Proof:
Suppose that such a partitioning exists.
Consider two arbitrary vertices a and b of G, such that a ∈ V1 and b ∈ V2.
No path can exist between vertices a and b; otherwise, there would be
at least one edge whose one end vertex would be in V1 and the other in
V2. Hence, if a partition exists, G is not connected.