Graph Theory Lecture-1 by Amit
Graph Theory Lecture-1 by Amit
Graph Theory Lecture-1 by Amit
Academic Unit - 4
Computational Mathematics
20SMT – 125
Introduction to Graph Theory
2
Graph
3
Types of Edges
1. Parallel Edge: 2. Self Loop
4
Types of Graphs
1. Null Graph
2. Simple Graph
3. Multi Graph
4. Pseudo Graph
5. Directed Graph
6. Undirected Graph
7. Connected and Disconnected Graph
8. Complementary Graph
9. Labeled Graphs
10. Weighted Graph
5
Null Graph:
A null graph is defined as a graph which consists
only the isolated vertices.
6
Simple Graph:
A graph with no loops and no parallel edges is
called a simple graph.
Example:
7
Multi Graph:
Multi-graph is a graph which is permitted to
have multiple edges (also called parallel edges) but no self
Loop , that is, edges that have the same end nodes
Example:
The graph is a multi-graph
because of the double edge
between B and C
and
the triple edge between E and F
8
Pseudo Graph:
Pseudo graph is a graph which is permitted to
have multiple edges (also called parallel edges) and
self Loop
9
Directed Graph
10
Undirected Graph
Example:
11
Connected and Disconnected Graph:
Connected Graph:
A graph is called connected
if there is a path from
any vertex u to v or vice-versa.
Disconnected Graph:
A graph is called disconnected
if there is no path between
any two of its vertices.
12
Complementary Graph:
The complement of a graph G is defined to be a
graph which has the same number of vertices as in graph
G and has two vertices connected if and only they are not
related in the graph.
Example: Consider the graph G shown in fig. Find the
complement of this graph.
.
13
Labeled Graphs:
A graph G=(V, E) is called a labeled graph if its edges are
labeled with some name or data. So, we can write these labels in
place of an ordered pair in its edges set.
14
Weighted Graph
A weighted graph is a graph whose edges have
been labeled with some weights or numbers.
15
Degree of a Vertex
16
Example
Consider the graph G shown in fig. Determine the
degree of each vertex.
17
Example
Consider the graph G shown in fig. Determine the
degree of each vertex.
Solution:
The degree of each vertex is as follows:
d(a)=3; d(b)=5; d(c) = 2; d(d)=2.
18
Types of Vertex
1. Odd Vertex
2. Even Vertex
3. Isolated Vertex
4. Pendant Vertex
5. Adjacency Vertex
19
Odd Vertex:
A vertex having degree odd is called an odd vertex.
Even Vertex:
A vertex having a degree even is called an even vertex.
Example: Find degree of each vertex of following
graph.
20
Odd Vertex:
A vertex having degree odd is called an odd vertex.
Even Vertex:
A vertex having a degree even is called an even vertex.
Example: Find degree of each vertex of following
graph.
The degree of each vertex are
d(a)=3; d(b)=5;
d(c) = 2; d(d)=2.
21
Pendant Vertex:
A vertex with degree one
is called a Pendant Vertex.
Isolated Vertex:
A vertex with degree Zero
is called a Isolated Vertex.
Pendant Edge:
An edge of a graph is said to be pendant
if one of its vertices is a pendant vertex.
In Fig. edge AB is said to be Pendant edge.
22
Adjacent Vertices
In a graph, two vertices are said to be adjacent, if
there is an edge between the two vertices. Here, the
adjacency of vertices is maintained by the single edge
that is connecting those two vertices.
In a graph, two edges are said to be adjacent, if
there is a common vertex between the two edges.
Here, the adjacency of edges is maintained by the
single vertex that is connecting two edges.
23
Example:
25
Handshaking Theorem-
Handshaking Theorem is also known as Handshaking
Lemma or Sum of Degree Theorem.
26
Example:
A simple graph G has 24 edges and degree of each
vertex is 4. Find the number of vertices.
Solution:
27
Example:
A simple graph G has 24 edges and degree of each
vertex is 4. Find the number of vertices.
Solution: Given Number of edges = 24
Degree of each vertex = 4
Let number of vertices in the graph = n.
Using Handshaking Theorem
Sum of degree of all vertices = 2 x Number of edges
Substituting the values, we get
n x 4 = 2 x 24 ⇒ n=2x6 ⇒ ∴ n = 12
Thus, Number of vertices in the graph = 12
28
Example:
A graph contains 21 edges, 3 vertices of degree 4 and all other vertices
of degree 2. Find total number of vertices.
29
Example:
A graph contains 21 edges, 3 vertices of degree 4 and all other vertices
of degree 2. Find total number of vertices.
Solution : Given Number of edges = 21
Number of degree 4 vertices = 3
All other vertices are of degree 2
Let number of vertices in the graph = n.
Using Handshaking Theorem
Sum of degree of all vertices = 2 x Number of edges
Substituting the values, we get
3 x 4 + (n-3) x 2 = 2 x 21 ⇒ 12 + 2n – 6 = 42
2n = 42 – 6 ⇒ 2n = 36 ⇒ ∴ n = 18
Thus, Total number of vertices in the graph = 18. 30
Example:
A simple graph contains 35 edges, four vertices of degree 5, five
vertices of degree 4 and four vertices of degree 3. Find the number of
vertices with degree 2.
31
Example:
A simple graph contains 35 edges, four vertices of degree 5, five
vertices of degree 4 and four vertices of degree 3. Find the number of
vertices with degree 2.
Solution: Given Number of edges = 35
Number of degree 5 vertices = 4 , Number of degree 4 vertices = 5
Number of degree 3 vertices = 4
Let number of degree 2 vertices in the graph = n.
Using Handshaking Theorem
Sum of degree of all vertices = 2 x Number of edges
Substituting the values, we get
4 x 5 + 5 x 4 + 4 x 3 + n x 2 = 2 x 35 ⇒ n=9
Thus, Number of degree 2 vertices in the graph = 9. 32
The maximum number of edges possible in a simple graph
with ‘n’ vertices is nC2 where nC2 = n(n – 1)/2.
33
Example: In the following graph, there are 3 vertices with 3 edges
which is maximum excluding the parallel edges and loops.
Solution: This can be proved by using the above formulae.
The maximum number of edges with n=3 vertices −
nC = n(n–1)/2
2 ⇒ 3(3–1)/2 ⇒ 6/2
⇒ = 3 edges
The maximum number of simple graphs with n=3 vertices −
2nC2 = 2n(n-1)/2
⇒ 23(3-1)/2 ⇒ 8
These 8 graphs are as
shown in graph
34
FAQ
35
THANK YOU
36