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

DM U3

This document is a confidential educational resource for the RMK Group of Educational Institutions, detailing the course structure for 'Discrete Mathematics' (22MA301) for the CSE/CSD/IT/ADS departments. It includes course objectives, prerequisites, a comprehensive syllabus, course outcomes, and a lecture plan focusing on topics such as logic, combinatorics, graph theory, algebraic structures, and Boolean algebra. Additionally, it features activity-based learning resources and various assessments to enhance student engagement and understanding.

Uploaded by

chan22006.cd
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 views73 pages

DM U3

This document is a confidential educational resource for the RMK Group of Educational Institutions, detailing the course structure for 'Discrete Mathematics' (22MA301) for the CSE/CSD/IT/ADS departments. It includes course objectives, prerequisites, a comprehensive syllabus, course outcomes, and a lecture plan focusing on topics such as logic, combinatorics, graph theory, algebraic structures, and Boolean algebra. Additionally, it features activity-based learning resources and various assessments to enhance student engagement and understanding.

Uploaded by

chan22006.cd
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/ 73

1

2
Please read this disclaimer before proceeding:
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document
through email in error, please notify the system manager. This document
contains proprietary information and is intended only to the respective group /
learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender
immediately by e-mail if you have received this document by mistake and delete
this document from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.

3
22MA301 DISCRETE MATHEMATICS

DEPARTMENT CSE/CSD/IT/ADS

BATCH/YEAR 2022-2026/II

CREATED BY Department of Mathematics

DATE 05.08.2023

4
Table of Contents

S.No Topic Page No.


1. Course Objectives 6
2. Pre-Requisites 7
3. Syllabus 8
4. Course Outcomes 9
5. CO – PO/PSO Mapping 10
6. Lecture Notes: Unit III 11
Lecture Plan 12
Activity Based Learning 13
3.1. Introduction 14
3.2. Basic concepts of Graph 14
3.3. Special types of Graphs 20
3.4. Matrix Representations of Graphs 24
3.5. Graph Isomorphism 25
3.6. Paths, Circuits and Connectedness 40
3.7. Euler and Hamilton paths 48
3.8. Practice Quiz 56
3.9. Assignment 58
3.10. Part A Questions and Answers 59
3.11. Part B Questions 65
7. Supportive online Certification courses 67
8. Real time Applications 68
9. Content beyond the Syllabus 69
10. Prescribed Text Books & Reference Books 70
11. Mini Projects 71

5
Course Objectives:

The course is designed to:

S.NO TOPIC

1. Describe the arguments using connectives and rules of inference.

Introduce the basic concept of counting and generating


2. functions.

3. Define the graphs and it’s models.

Understand the concept of group theory, lattices and Boolean


4.
algebra.

6
PREREQUISITES

S.NO TOPIC Course Name with


Code

1 Truth table technique

2 Knowledge in Set theory


Studied all topics in
Higher secondary level
3 Basics of Counting technique

4 Induction Method technique

5 Basics concepts of Group

6 Relations and Functions

7
22MA301 DISCRETE MATHEMATICS
LTPC
3204

UNIT I LOGIC AND PROOFS 15

Propositional logic – Propositional equivalences – Predicates and quantifiers –


Nested quantifiers – Rules of inference – Introduction to proofs – Proof methods
and strategy.

UNIT II COMBINATORICS 15

Mathematical induction- Strong induction and well ordering – The basics of


counting – The pigeonhole principle – Permutations and combinations – Recurrence
relations – Solving linear recurrence relations – Generating functions – Inclusion
and exclusion principle and its applications

UNIT III GRAPHS THEORY 15

Graphs and graph models – Graph terminology and special types of graphs – Matrix
representation of graphs and graph isomorphism – Connectivity – Euler and
Hamilton paths.

UNIT IV ALGEBRAIC STRUCTURES 15

Algebraic systems – Semi groups and monoids – Groups – Subgroups –


Homomorphism‘s – Normal subgroup and cosets – Lagrange‘s theorem –
Definitions and examples of Rings and Fields.

UNIT V LATTICES AND BOOLEAN ALGEBRA 15

Partial ordering – Posets – Lattices as posets – Properties of lattices – Lattices as


algebraic systems – Sub lattices – Direct product and homomorphism – Some special
lattices – Boolean algebra.

8
COURSE OUTCOMES

Upon completion of the course, the students will be able to:

S.NO TOPIC

Validate the arguments using connectives and rule of


CO 1
inference.

CO 2 Solve linear recurrence relations.

CO 3 Determine Euler’s path and Hamilton paths.

Identify algebraic structures of groups, rings, and


CO 4
fields.

CO 5 Interpret lattices as algebraic structures

9
22MA301 DISCRETE MATHEMATICS
Course Outcome mapping with POs / PSOs

POs
PO PO PO PO PO PO PO PO PO PO PO PO PSO PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
COs

CO1 2 3 1 - - - - - - - - 1 2 - -

CO2 3 2 - - - - - - - - - - - -

CO3 2 2 - 2 - - - - - - - 1 2 - -

CO4 2 1 - 1 - - - - - - - - - - -

CO5 2 2 1 - - - - - - - - - 2 - -

1: Slight (Low) 2: Moderate (Medium) 3: Substantial (High)

10
UNIT – III GRAPH THEORY

11
Lecture plan

Actual
S. Topics to be No of Proposed Taxonomy Mode of
Lecture CO
No. covered periods date level Delivery*
Date
Introduction of Board &
1 2 CO3 K1
Graph 15.09.2023 Chalk

Basic concepts Board &


2 2 CO3 K1 Chalk
of Graph 20.09.2023

Special types Board &


3 2 CO3 K1 Chalk
of Graph 22.09.2023

Matrix Board &


Chalk
4 representation 2 CO3 K1
25.09.2023
of Graph
Graph Board &
5 2 27.09.2023 CO3 K1
Isomorphism Chalk
6 Paths, Circuits Board &
and 2 CO3 K2 Chalk
30.09.2023
Connectedness
7 Euler and Board &
Hamilton 2 03.10.2023 CO3 K2 Chalk
paths
8 Board &
Problems 1 04.10.2023 CO3 K2 Chalk

12
ACTIVITY BASED LEARNING

Activity based learning helps students express and embrace their curiosity.
Once the students become curious, they tend to explore and learn by themselves.
To evoke curiosity in students, Practice quiz is designed for al the five units.

S.No Topic Activity Link

https://quizizz.com/join/quiz/5f349febe9d
Basic e13001befaf49/start?from=soloLinkShare
Quiz &Flash
1. concepts of &referrer=5dea01388362a6001b41136a
Card
Graph theory

https://quizizz.com/admin/quiz/flashcards
Simple Quiz &Flash /5f349febe9de13001befaf49?q=%2Fadmi
2.
theorems Card n&source=preGameScreen

Isomorphism, https://quizizz.com/join/quiz/5f349d94f94
Hamiltonian Quiz &Flash b0b001d5bf2db/start?from=soloLinkShar
3. e&referrer=5dea01388362a6001b41136a
paths, Euler Card
path.

Basic
Cross word https://drive.google.com/file/d/1jR
4. Definitions of
Puzzle _MdKcmAuQVQPXswLFMImEk9T8A
Graph theory
cum0/view?usp=sharing
Basic https://docs.google.com/document/d/1Tu
Assignment uFyeTk1S4xC-
5. concepts of
1 jJO5uvA77VhV6vqgLsdWBp2hiWI4Q/edit?
Graph theory usp=sharing
Euler and https://docs.google.com/document/d/1D
Assignment 34JzRJMRDGMbgG7OATCBUOC7_meopa
6. Hamilton
2 ORxo6KPmhSm4/edit?usp=sharing
paths.

13
UNIT-III
GRAPHS
3.1 INTRODUCTION
Graphs are discrete structures consisting of vertices and edges that connect
these vertices. Depending on the type and number of edges that can connect a pair
of vertices, there are many kinds of different graphs. The graph models can be used
to represent almost every problem involving discrete arrangement of objects, where
we are not concerned with their internal properties but with their inter-relationship.
In this section, we shall define a graph as an abstract mathematical system and
also represent graphs diagrammatically. Then we shall discuss some of the basic
concepts and theorems of graph theory.

3.2 BASIC DEFINITIONS


View the video lecture on YouTube: https://youtu.be/ZHqQDA3be-k
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 of elements of V.
If in graph G = (V, E), each edge e ∈ E is associated with an ordered pair of
vertices, then G is called a directed graph or digraph. If each edge is associated
with an unordered pair of vertices, then G is called an undirected graph.
NOTE
When a graph is represented diagrammatically, the vertex set is represented as
a set of points in plane and an edge is represented by a line segment or an arc (not
necessarily straight) joining the two vertices incident with it. In the diagram of a
digraph, each edge e = (u. v) is represented by means of an arrow or directed curve
drawn from the initial point u to the terminal point v.
Example: e7
e6
v5
v4 e4

e8 e5 v3
Figure 1.
e2 e3

v1
v2
e1

SELF 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 nodes are one and the same.
Example: In Figure 1, the edge e7 is called Self loop or simply loop.

14
PARALLEL EDGES:
If, in a directed or undirected graph, certain pairs of vertices are joined by
more than one edge, such edges are called parallel edges. In the case of directed
edges, the two possible edges between a pair of vertices which are opposite in
direction are considered distinct.
Example: In Figure 1, the edges e1 and e2 are called parallel edges.
ADJACENT EDGES AND VERTICES
If an edge e ∈ E is associated with an ordered pair or an unordered pair (u,
v), where u, v ∈ V, then e is said to connect or join the nodes u and v. The edge e
that connects the nodes u and v is said to be incident on each of the nodes. Two
edges are said to be adjacent if they are incident on a common vertex.
Example: In Figure 1, the edge e6 and e8 are adjacent and the vertices v1 and v5 are
adjacent vertices.
ISOLATED VERTEX & PENDANT VERTEX
A node of a graph which is not adjacent to any other node (viz., which is not
connected by an edge to any other node) is called an isolated vertex (or)
isolated node. Example: In Figure 1 the vertex v6 is isolated vertex.
A vertex of a graph is called a pendant vertex if only one edge is incident
with it.
PSEUDOGRAPH
A graph in which loops and parallel edges are allowed is called a Pseudo
graph.
Example: Figure 1 [Here e7 is a Self-loop, edges e1 and e2 are parallel edges]
DEGREE OF A VERTEX (Undirected Graph)
The degree of a vertex in an undirected graph is the number of edges
incident with it, with the exception that a loop at a vertex contributes twice to the
degree of that vertex. The degree of a vertex v is denoted by deg (v). Clearly the
degree of an isolated vertex is zero. If the degree of a vertex is one, it is called a
pendant vertex.
For example, let us consider the graph Figure 1
deg (v1) = 2, deg (v2) =4, deg (v3) =2
deg (v4) = 5, deg (v5) = 4, deg (v6) = 0 . We note that v6 is an isolated vertex
SIMPLE GRAPH
A graph, in which there is only one edge between a pair of vertices (neither
self-loop nor parallel edges), is called a simple graph.
v4 e3 v3
Example

e2 e4

v1 e1 v2

15
MULTIGRAPH
A graph which contains some parallel edges is called a multigraph.
v1

Example: e1 e2

e3

v2 v3
e4

NULL GRAPH
A graph containing only isolated nodes (viz. no edges) is called a null graph.
Example:
v1 v4

v2 v3

WEIGHTED GRAPH
Graphs in which a number (weight) is assigned to each edge are called
weighted graphs.
INDEGREE &OUT DEGREE (Directed Graph)
In a directed graph, the number of edges with v as their terminal vertex (i.e.,
the number of edges that converge at v) is called the in-degree of v and denoted as
deg  (v) .
The number of edges with v as their initial vertex, (i.e., the number of edges
that emanate from v) is called the out-degree of v and is denoted as deg  (v) .
A vertex with zero in degree is called a source and a vertex with zero degree out
is called a sink.
Let us consider the following directed graph.

a b

d c

16
In degree of v Out degree of v Total degree of v

deg (a) =3 deg (a) =1 deg(a)=4

deg  (b) =1 deg  (b) =2 deg(b)=3

deg  (c) =2 deg  (c) =1 deg(c)=3

deg  (d ) =1 deg  (d ) =3 deg(d)=4

Also we note that

 deg  (v) =  deg  (v) =Number of edges=7.

This is obvious, because each edge of the graph converges at one vertex and
emanates from one vertex and hence contributes 1 each to the sum of the in-
degrees and to the out-degrees.

Theorem 1 (The Handshaking theorem)

Statement: If G = (V, E) is an undirected graph with e edges, then


 deg(vi )  2e .
i

(i.e.) the sum of the degrees of all the vertices of an undirected graph is twice the
number of edges of the graph and hence even.

Proof: Since every edge is incident with exactly two vertices, every edge contributes
2 to the sum of the degree of the vertices.
∴ All the e edges contribute (2e) to the sum of the degrees of the vertices (i.e.)
i deg(vi )  2e .
Theorem 2: The number of vertices of odd degree in an undirected graph is
even.
Proof: Let G = (V, E) be the undirected graph.
Let V1 and V2 and be the sets of vertices of G of even and odd degrees
respectively.
Then, by the previous theorem, (The Handshaking theorem)


v V
deg(vi )   deg(v j ) = 2e
v V
-------(1)
i 1 j 2

17
Since each deg(Vi) is even,  deg(vi )
viV1
is even =2k

As the L.H.S. of (l) is even, we get 


v V
deg(v j ) =2e -2k =2(e-k)
j 2

Since each deg(Vj) is odd, the number of terms contained in 


v j V
deg(v j )
2

or in V2 is even. Hence the number of vertices of odd degree is even.

Theorem 3: The maximum number of edges in a simple graph with ‘n’ vertices is
n(n  1)
.
2
Proof: We prove this theorem by the principle of Mathematical Induction.
For n=1, a graph with one vertex has no edges.
Therefore, the result is true for n=1.
For n=2, a graph with 2 vertices may have at most one edge.
2 (2  1)
Therefore, =1 .The result is true for n=2.
2
Assume that the result is true for n=k. i.e., a graph with k vertices has at most
k (k  1)
edges.
2
When n=k+1, let G be a graph having ‘n’ vertices and G’ be the graph obtained from
G by deleting one vertex say v ϵ V (G).
k (k  1)
Since G’ has k vertices, then by the hypothesis G’ has at most edges. Now
2
add the vertex ‘v’ to G’, such that ‘v’ may be adjacent to all k vertices of G’.
Therefore, the total number of edges in G are
k (k  1) k 2  k  2k k 2  k k (k  1)
k   
2 2 2 2
(k  1)(k  1  1)

2
Therefore, the result is true for n=k+1. Hence the maximum number of edges in a
n(n  1)
simple graph with ‘n’ vertices is .
2
Problems:
1. How many edges are there in a graph with ten vertices each of degree six.
Solution: Let e be the number of edges of the graph.
2e = sum of all degrees = 10x6 = 60
2e = 60
i.e, e = 30 ∴ There are 30 edges.

18
2. Can a simple graph exist with 15 vertices each of degree 5.
Solution: We know that
2e = sum of all degrees of vertices =15x5 = 75
∴ e = 75, which is not an integer
∴ Such a graph does not exist.
(or)
By theorem 2, in a graph the number of odd degree vertices is even. Therefore, it
is not possible to have 15 vertices, which is of odd degree.

∴ Such a graph does not exist.

3. For the following degree sequences, 4, 4, 4, 3, 2 find if there exists a graph or


not.
Solution: We know that
Sum of the degree of all vertices = 4+4+4+3+2 = 17 which is an odd number.
∴ Such a graph does not exist.
4. Let  (G ) and (G ) denote minimum and maximum degrees of all the vertices of
G respectively. Then show that for a non-directed graphG is
2|E |
 (G )   (G ).
|V |
Solution: Given  (G ) = Min-degree of all vertices of G .
(G ) = Max-degree of all vertices of G .
|V|= Number of vertices of graphG .
|E|= Number of edges of graphG .
By Handshaking theorem,  deg(v i )  2 | E | . (1)
 |V | 
Min  deg(v i )    (G )   (G )  ...   (G ) (V times) |V |  (G ) (2)
 i 1 
 |V | 
Max  deg(v i )   (G )  (G )  ...  (G ) (V times) |V | (G ) (3)
 i 1 
2|E |
From (1) and (2) |V |  (G )  2 | E |   (G )  (4)
|V |
2|E |
From (1) and (3) 2 | E | |V | (G )   (G ) (5)
|V |
2|E |
From (4) and (5)  (G )   (G ).
|V |
Hence it is proved.
5. If all the vertices of an undirected graph are each of degree k, show that the
number of edges of the graph is a multiple of k.
Solution: Let 2n be the number of vertices of the given graph.

19
Let |E|= the number of edges of the given graph.
By Handshaking theorem, (Proof should be included here)
 deg(v i )  2 | E |  2nk  2 | E |  | E | nk
 Number of edges = Multiple of k .
Therefore, the number of edges of the given graph is a multiple of k.

3.3 SPECIAL TYPES OF GRAPHS


Complete Graph:
If a vertex is connected to all other vertices in a graph, then it is called a complete
graph and it is denoted by Kn (where n is a number of vertices in a graph).
Example:

K2

K3

K4

Regular Graph:
If every vertex of a simple graph has the same degree then the graph is called regular
graph (or) number of vertices and number of edges is same.
Example:

2-Regular
Graphs

3-Reguar
Graphs

20
Sub graph:
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.
v2
Example: v
2
v1 v3
v1 v3

v4
v4 v5
G1 G
G1 is a subgraph of G since all the vertices and all the edges of the graph G 1 are in
the graph of G and that every edge in G1 has the same end vertices in G as in G1.
Results on Subgraph:
 Every graph is a subgraph of itself.
 If G1 is a subgraph of G2 and G2 is a subgraph of G, then G1 is subgraph of G.
 A single vertex in a graph G is a subgraph of G.
 Every simple graph of n vertices is a subgraph of complete graph Kn.
Complementary Graph:
The complement G of a simple graph G, has the same vertices as G.
Two vertices are adjacent in G iff they are not adjacent in G.
Example: (i) If G=Kn then G is a graph with n vertices and no edges.
(ii)

G Gc
Note: (i) If G is a self complementary graph then
Number of edges of G = Number of edges in Gc.
(ii) A graph G is said to self complementary if G  G c .
Theorem:
Show that if G is a self complementary graph then n  0 or 1 (mod 4).
(or)
Any self complementary graph has 4n or (4n+1) vertices, where n is positive integer.
Proof: Given G is a self complementary graph.
 Number of edges in G = Number of edges in Gc.
 |E(G)| = |E(Gc)| (1)
21
Also, we know that
Total number of edges possible with n vertices
=Number of edges in G + Number of edges in Gc.
n (n  1)
  m  m  2m .
2
 n (n-1)= 4m.
That is, n (n-1) is multiple of 4.
 Either n (or) (n-1) is divisible by 4.
Therefore G is a self complementary graph with n vertices then n  0 or 1 (mod 4).

Bipartite Graph:
A bipartite graph is one whose vertices, V, can be divided into two
independent sets, V1 and V2, and every edge of the graph connects one vertex in V1
to one vertex in V2.

Example:
v1 v2

v3 v4 v5

V = {V1, V2}
V1 = {v1, v2}
V2 = {v3, v4, v5}

Complete Bipartite Graph:


A complete bipartite graph is a bipartite graph in which every vertex of V i is
connected to every vertex of Vj. A complete bipartite graph with ‘m’ and ‘n’ vertices
in bipartition is denoted by Km,n

Example:
v1 v2 v1 v2 v3

v3 v4 v5 v4 v5
v6
K2,3 K3,3

22
Problems:

1. Are the following graphs G and H are Bipartite?

a b
a b
(i) (ii)

g c f
c

f d
e
e d

(G) (H)

Solution: (i) Given graph is bipartite because its disjoint sets V1={a, b, d} and

V2={c, e, f, g} and each edge connects a vertex in one of these subsets to a vertex
in the other subset.

(ii) Given graph is not bipartite because its vertex set cannot be partitioned into two
subsets. So that edges do not connect two vertices from the same subset.

2. Is K3 a bipartite?

Solution: No, the complete graph K3 is not bipartite. If we divide the vertex set K3
into two disjoint sets, one of the two sets must contain two vertices. If graph is
bipartite, these two vertices should not be connected by an edge, but in K3 each
vertex is connected to every other vertex by an edge.

23
v2
3. For any bipartite graph G with e edges and v vertices, prove that e  .
4
Solution: Let G be a bipartite graph with bipartition (V1, V2).
Let |V1|=m and |V2|=n  V=m + n.
We know that, the number of edges of a bipartite graph is maximum, when it is
complete bipartite graph (Km,n). So the maximum number of edges is mn.
 The number of edges of
G  mn  e  mn .
m n
We know that,  mn  e [ A.M.  G.M.]
2
2
m n 
   mn  e
 2 
v2
  e.
4

3.4 MATRIX REPRESENTATION OF GRAPHS:


View the video lecture on
YouTube:www.youtube.com/watch?v=ls8R0g9rWXs&t=142s
https://www.youtube.com/watch?v=ls8R0g9rWXs&t=142s
Graph representation: There are many useful ways to represent graphs. We can
represent a graph in the form of adjacency lists, which are very useful in computer
programming.
Adjacency matrix of a simple graph: Let G = V, E be a simple graph with n-
vertices V1 , V2 , V3 … . . Vn . Its adjacency matrix is denoted by A = aij and defined
1, if there exists an edge between Vi and Vj
byA = aij =
0, otherwise.
Properties of adjacency matrix:

1. The adjacency matrix completely defines a simple graph and it is symmetric i.e.,
aij = aji .
2. Any element of the adjacency matrix for a simple graph is either 0 or 1.
Therefore, it is also called bit matrix or Boolean matrix.
3. Any row total or column total is the degree of the corresponding matrix.
Note: A Pseudograph can also be represented by an adjacency matrix. In this case
the loop at the vertex Vi is represented by 1 at i, i th position. The i, j th entry equal
to the number of edges that are incident on Vi andVj .

Incidence matrix: Let G = V, E be an undirected graph with n-vertices


V1 , V2 , V3 … . . Vn and m-edges e1 , e2 , e3 … . . en , then the n × m matrix B= bij
1, when edge ej incidence on Vi
where bij = , is called the incidence matrix of G.
0, otherwise

24
Path matrix: Let G = V, E be a simple digraph in which V = n and the
nodes of G are assumed to be ordered. An n × n matrix P whose elements
are given by
1, if there exists a path from Vi to Vj
pij =
0, otherwise.

3.5 GRAPH ISOMORPHISM: The simple graphs G1 = V1 , E1 and


G2 = V2 , E2 are isomorphic if there is a one to one and onto
correspondence between V1 and V2 with the 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’ and
‘b’ in V1 .
Note: If G1 and G2 are isomorphic then G1 and G2 have
1. The same number of vertices
2. The same number of edges
3. An equal number of vertices with a given degree.
Problems:
1. Find the adjacency matrix of the graph given below.
(a). (b).

(c).K 4 (d).K 2,3 (e). C4

Solution:
(a). v1 v2 v3 v4 (b). v1 v2 v3 v4
v1 0 1 1 1 v1 0 1 0 0
v2 1 0 1 0 v2 0 0 1 0
v3 1 1 0 0 v3 1 1 0 0
v4 1 0 0 0 v4 0 1 1 0

(c) . K 4
v1 v2 v3 v4
v1 0 1 1 1
v2 1 0 1 1
v3 1 1 0 1
v4 1 1 1 0

25
(d). K 2,3
v1 v2 v3 v4 v5
v1 0 0 1 1 1
v2 0 0 1 1 1
v3 1 1 0 0 0
v4 1 1 0 0 0
v5 1 1 0 0 0

(e).C4 v1 v2 v3 v4
v1 0 1 0 1
v2 1 0 1 0
v3 0 1 0 1
v4 1 0 1 0

2. Use an adjacency matrix to represent the pseudo graph shown below.

Solution: The adjacency matrix is

𝑎 𝑏 𝑐 𝑑
𝑎 0 3 0 2
A = 𝑎𝑖𝑗 = 𝑏 3 0 1 1
𝑐 0 1 1 2
𝑑 2 1 2 0

26
3. Draw undirected graph of the following adjacency matrix.

(i). 0 1 0 (ii). 0 1 1 0
1 0 1 1 0 0 1
1 0 0 1
0 1 0
0 1 1 0

Solution: (i). Let

a b c
a 0 1 0
b 1 0 1
c 0 1 0
The undirected graph is

(i). Let, The undirected graph is

a b c d
a 0 1 1 0
b 1 0 0 1
c 1 0 0 1
d 0 1 1 0

4. Find incidence matrices for the following graphs.

(i). (ii).

27
(iii)

Solution:

(i). The incidence matrix ii). The incidence matrix

e1 e2 e3 e4 e5 e1 e2 e3 e4 e5 e6
B = Bij = v1 1 0 0 1 1 B = Bij = v1 1 1 0 0 0 0
v2 1 1 0 0 0 v2 0 0 1 1 0 1
v3 0 1 1 0 1 v3 0 0 0 0 1 1
v4 0 0 1 1 0 v4 1 0 1 0 0 0
v5 0 1 0 1 1 0

(iii). The incidence matrix

e1 e2 e3 e4 e5 e6 e7 e8
v1 1 1 1 0 0 0 0 0
v2 0 1 1 1 0 1 1 0
B = Bij =
v3 0 0 0 1 1 0 0 0
v4 0 0 0 0 0 0 1 1
v5 0 0 0 0 1 1 0 0

5. Find the path matrix of

Solution: The path matrix is


28
v1 v2 v3 v4 v5
v1 1 1 1 1 0
v2 1 1 1 1 0
Pij =
v3 1 1 1 1 0
v4 0 0 0 0 0
v5 1 1 1 1 0

{Since first row v1 → v2 → v3 → v1 ∴ 1


v1 → v2 ∴1
v1 → v2 → v3 ∴1
v1 → v2 → v4 ∴1
v1 → v5 No path ∴ 0 }

6. Find the adjacency matrix of the following graph G. Hence find degree of each vertex.
Also find A2 and A3 . What is your observation regarding entries in A2 and A3 .
Solution:

The adjacency matrix is

v1 v2 v3 v4
v1 0 1 0 1
A = aij = v2 1 0 1 1
v3 0 1 0 1
v4 1 1 1 0

deg v1 = sum of entries in 1st row = 2


deg v2 = sum of entries in 2nd row = 3
deg v3 = sum of entries in 3rd row = 2
deg v4 = sum of entries in 4th row = 3

0 1 0 1 0 1 0 1 2 1 2 1
Now, A2 = A × A = 1 0 1 1 × 1 0 1 1 = 1 3 1 2
0 1 0 1 0 1 0 1 2 1 2 1
1 1 1 0 1 1 1 0 1 2 1 3

29
2 1 2 1 0 1 0 1 2 5 2 5
A =A ×A= 1 3
3 2 1 2 × 1 0 1 1 = 5 4 5 5
2 1 2 1 0 1 0 1 2 5 2 5
1 2 1 3 1 1 1 0 5 5 5 4
Observation:
(i). A2 and A3 are symmetric matrices.
(ii). i, i th entry of A2 = deg vi .
Example: v2 , v2 entry in 3 = deg v2
(iii). i, j th entry i ≠ j entry of A2
= Number of different paths of lengths 2 between ith and jth vertices.
Example: 1,3 th entry of
A2 = 2 = Number of different paths of lengths 2 between the vertices v1 and v3 .

7. Find the adjacency matrix of the following graph G. Find A2 , A3 and


𝑌 = A + A2 + A3 + A4 . What is your observation of entries in A2 and A3 .

Solution: The adjacency matrix is

v1 v2 v3 v4
v1 0 1 0 0
A=
v2 1 0 0 0
v3 0 0 0 1
v4 0 0 1 0

0 1 0 0 0 1 0 0 1 0 0 0
Now A2 = A × A = 1 0 0 0 × 1 0 0 0 = 0 1 0 0
0 0 0 1 0 0 0 1 0 0 1 0
0 0 1 0 0 0 1 0 0 0 0 1

1 0 0 0 0 1 0 0 0 1 0 0
A3 = A2 × A = 0 1 0 0 × 1 0 0 0 = 1 0 0 0
0 0 1 0 0 0 0 1 0 0 0 1
0 0 0 1 0 0 1 0 0 0 1 0

30
0 1 0 0 00 1 0 1 0 0 0
A4 = A3 × A = 1 0 0 0 × 1 0
0 0 = 0 1 0 0
0 0 0 1 00 0 1 0 0 1 0
0 0 1 0 1 0 0 0 0 0 0 1
2 2 0 0
∴ Y = A + A2 + A3 + A4 = 2 2 0 0
0 0 2 2
0 0 2 2
Observation:
(i). A2 and A3 are symmetric matrix.
(ii). i, i th entry of A2 = deg vi
(iii). i, j th entry of A2
= Number of different paths of lengths 2 between ith and jth vertices.
8. Find all the simple paths from A to E and all cycles with respect to vertex A of the
given graph.

Solution: Simple paths from to are


(i). A → B → C → E
(ii). A → B → D → E
(iii). A → D → E
(iv). A → D → B → C → E
The cycles are
(i). A → B → C → E → D → A
(ii). A → D → E → C → B → A
9. Show that the graph G = V, E and H= W, F displayed below are isomorphic.

(G) (H)

31
Solution: Given graphs 𝐺 and 𝐻 are having same number of vertices and same number of
edges.
Let 𝑢 = {𝑢1 , 𝑢2 , 𝑢3 , 𝑢4 } and 𝑣 = {𝑣1 , 𝑣2 , 𝑣3 , 𝑣4 } are vertex sets of 𝐺 and 𝐻 respectively.
i.e., 𝑢 = 𝑣 = 4 and 𝐸1 = 𝐸2 = 4.
Degree of the vertices of 𝐺:
𝑑 𝑢1 = 𝑑 𝑢2 = 𝑑 𝑢3 = 𝑑 𝑢4 = 2.
Degree of the vertices of 𝐻:
𝑑 𝑣1 = 𝑑 𝑣2 = 𝑑 𝑣3 = 𝑑 𝑣4 = 2.
Define 𝑓: 𝐺 → 𝐻
Choose a vertex 𝑢1 in 𝐺. It has degree 2 and the two adjacent vertices of ‘𝑢1 ’ having the
degree sequence 2, 2.
Correspondingly choose a vertex 𝑣1 in 𝐻 with same degree and same degree sequence of
adjacent vertices.
∴ 𝑓 𝑢1 = 𝑣1
Similarly, all other vertices are having same degree and same degree sequence of the
adjacent vertices from 𝐺 and 𝐻.
i.e.,𝑓 𝑢2 = 𝑣4 , 𝑓 𝑢3 = 𝑣3 , 𝑓 𝑢4 = 𝑣2 .
∴ 𝐺 and 𝐻 are isomorphic.

10. Show that the graphs given below are not isomorphic.

(G) (H)

Solution: Both 𝐺 and 𝐻 have five vertices and six edges.


i.e., equal number of vertices and edges.
But there is no one to one correspondence between edges in 𝐺 and 𝐻.
The graph 𝐺 have the degree sequence 2,2,3,2,3. But the degree sequence of 𝐻 is 4,2,3,2,1.
However 𝐻 has a vertex of degree one namely ‘𝑒’ whereas 𝐺 has no vertices of degree one.
∴ 𝐺 and 𝐻 are not isomorphic.

32
11. Determine whether the graphs G and H given below are isomorphic.

a b p
q

e f

u
d c t s
(G) (H)

Solution: Given graphs 𝐺 and 𝐻 are having same number of vertices and same
number of edges.
Let 𝑉1 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓} and 𝑉2 = {𝑝, 𝑞, 𝑟, 𝑠, 𝑡, 𝑢} are vertex sets of 𝐺 and 𝐻 respectively.
i.e., 𝑉1 = 𝑉2 = 6and 𝐸1 = 𝐸2 = 7.
Degree of the vertices of 𝐺:
𝑑 𝑎 = 𝑑 𝑐 = 𝑑 𝑒 = 𝑑 𝑓 = 2, 𝑑 𝑏 = 𝑑 𝑑 = 3.
Degree of the vertices of 𝐻:
𝑑 𝑝 = 𝑑 𝑞 = 𝑑 𝑠 = 𝑑 𝑢 = 2, 𝑑 𝑟 = 𝑑 𝑡 = 3.
Define 𝑓: 𝐺 → 𝐻
Choose a vertex '𝑎’ in 𝐺. It has degree 2 and the two adjacent vertices of ‘𝑎’ having
the degree sequence 3,3.
Correspondingly choose a vertex ‘𝑠’ in 𝐻 with same degree and same degree
sequence of adjacent vertices.
∴𝑓 𝑎 =𝑠
Similarly, all other vertices are having same degree and same degree sequence of
the adjacent vertices from 𝐺 and 𝐻.
i.e.,𝑓 𝑏 = 𝑟, 𝑓 𝑐 = 𝑢, 𝑓 𝑑 = 𝑡, 𝑓 𝑒 = 𝑝, 𝑓 𝑓 = 𝑞.
∴ 𝐺 and 𝐻 are isomorphic.

12. Examine whether the following pair of graphs given below are isomorphic or not?
A

B C

33
Solution: Given graphs 𝐺1 and 𝐺2 are having same number of vertices and
same number of edges.
Let 𝑉1 = {𝐴, 𝐵, 𝐶, 𝐷} and 𝑉2 = {𝑣1 , 𝑣2 , 𝑣3 , 𝑣4 } are vertex sets of 𝐺1 and 𝐺2 respectively.
i.e., 𝑉1 = 𝑉2 = 4 and 𝐸1 = 𝐸2 = 6.
Degree of the vertices of 𝐺1 :
𝑑 𝐴 = 𝑑 𝐵 = 𝑑 𝐶 = 𝑑 𝐷 = 3.
Degree of the vertices of 𝐺2 :
𝑑 𝑣1 = 𝑑 𝑣2 = 𝑑 𝑣3 = 𝑑 𝑣4 = 3.
Define 𝑓: 𝐺1 → 𝐺2
Choose a vertex '𝐴’ in 𝐺1 . It has degree 3 and the three adjacent vertices of ‘𝐴’ having the
degree sequence 3,3,3.
Correspondingly choose a vertex ‘𝑣1 ’ in 𝐺2 with same degree and same degree sequence
of adjacent vertices.
∴ 𝑓 𝐴 = 𝑣1
Similarly, all other vertices are having same degree and same degree sequence of the
adjacent vertices from 𝐺1 and 𝐺2 .
i.e.,𝑓 𝐵 = 𝑣2 , 𝑓 𝐶 = 𝑣3 , 𝑓 𝐷 = 𝑣4 .
∴ 𝐺1 and 𝐺2 are isomorphic.

13. Establish the isomorphism of the following pair of graphs.


E d

A B C D

F a b c e f

(G) (G’)

Solution: Given graphs 𝐺and 𝐺 ′ are having same number of vertices and same number of
edges.
Let 𝑉1 = {𝐴, 𝐵, 𝐶, 𝐷, 𝐸, 𝐹} and 𝑉2 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓} are vertex sets of 𝐺and 𝐺 ′ respectively.
i.e., 𝑉1 = 𝑉2 = 6 and 𝐸1 = 𝐸2 = 5.
Degree of the vertices of 𝐺:
𝑑 𝐴 = 𝑑 𝐸 = 𝑑 𝐹 = 1, 𝑑 𝐵 = 𝑑 𝐶 = 2, 𝑑 𝐷 = 3.
Degree of the vertices of 𝐺 ′ :
𝑑 𝑎 = 𝑑 𝑑 = 𝑑 𝑓 = 1, 𝑑 𝑏 = 𝑑 𝑒 = 2, 𝑑 𝑐 = 3.
Define 𝑓: 𝐺 → 𝐺 ′

34
Choose a vertex '𝐷’ in 𝐺. It has degree 3 and the three adjacent vertices of ‘𝐷’ having the
degree sequence (1,1,2).
But in 𝐺 ′ , a vertex ‘𝐶’ has degree and the three adjacent vertices of ‘𝐶’ having the
degree sequence (1,2,2).
The vertex '𝐷’ in 𝐺 is not mapped to any of the vertex in 𝐻.
Hence 𝐺 and 𝐺 ′ are not isomorphic.
14. Establish the isomorphism of the following pair of graphs.

(G) (H)
Solution: Given graphs 𝐺 and 𝐻 are having same number of vertices and
same number of edges.
Let 𝑉1 = {𝑣1 , 𝑣2 , 𝑣3 , 𝑣4 , 𝑣5 , 𝑣6 } and 𝑉2 = {𝑢1 , 𝑢2 , 𝑢3 , 𝑢4 , 𝑢5 , 𝑢6 } are vertex sets of 𝐺 and
𝐻 respectively.
i.e., 𝑉1 = 𝑉2 = 6 and 𝐸1 = 𝐸2 = 5.
Degree of the vertices of 𝐺:
𝑑 𝑣1 = 𝑑 𝑣5 = 𝑑 𝑣6 = 1, 𝑑 𝑣2 = 𝑑 𝑣4 = 2, 𝑑 𝑣3 = 3.
Degree of the vertices of 𝐻:
𝑑 𝑢1 = 𝑑 𝑢5 = 𝑑 𝑢6 = 1, 𝑑 𝑢2 = 𝑑 𝑢3 = 2, 𝑑 𝑢4 = 3.
Define 𝑓: 𝐺 → 𝐻
Choose a vertex '𝑣3 ’ in 𝐺. It has degree 3 and the three adjacent vertices of '𝑣3 ’ having
the degree sequence 1,2,2.
But in ‘𝐻′ a vertex ‘𝑢4 ’ has degree and the three adjacent vertices of ‘𝑢4 ’ having the
degree sequence 1,1,2.
The vertex '𝑣3 ’ in 𝐺 is not mapped to any of the vertex in 𝐻.
Hence 𝐺 and 𝐻 are not isomorphic.
15. Examine whether the following pair of graphs isomorphic or not?
(i)

(G) (H)

35
(ii)
(G) (H)
Solution: i) 𝑉1 = 𝑉2 = 5, 𝐸1 = 𝐸2 = 8
𝑑 𝑢1 = 𝑑 𝑢5 = 3, 𝑑 𝑢2 = 𝑑 𝑢4 = 4, 𝑑 𝑢3 = 2
𝑑 𝑣1 = 𝑑 𝑣4 = 3, 𝑑 𝑣2 = 2, 𝑑 𝑣3 = 𝑑 𝑣5 = 4
𝑓 𝑢1 = 𝑣1 , 𝑓 𝑢2 = 𝑣3 , 𝑓 𝑢3 = 𝑣2 , 𝑓 𝑢4 = 𝑣5 , 𝑓 𝑢5 = 𝑣4
∴ 𝐺 and 𝐻 are isomorphic.
ii) 𝑉1 = 𝑉2 = 5, 𝐸1 = 𝐸2 = 6
𝑑 𝑢1 = 𝑑 𝑢3 = 3, 𝑑 𝑢2 = 𝑑 𝑢4 = 𝑑 𝑢5 = 2
𝑑 𝑣1 = 𝑑 𝑣3 = 3, 𝑑 𝑣2 = 𝑑 𝑣4 = 𝑑 𝑣5 = 2
𝑓 𝑢1 = 𝑣1 , 𝑓 𝑢2 = 𝑣4 , 𝑓 𝑢3 = 𝑣3 , 𝑓 𝑢4 = 𝑣2 , 𝑓 𝑢5 = 𝑣5
∴ 𝐺 and 𝐻 are isomorphic.

16. Determine whether the graphs given below isomorphic or not?

(G) (H)

Solution: The graphs 𝐺and 𝐻 both have eight vertices and 10 edges.
They also both have four vertices of degree two and four of degree three.
However, 𝐺and 𝐻 are not isomorphic because deg 𝑎 = 2 in 𝐺, ‘𝑎’ must correspond to either
𝑉2 , 𝑉3 , 𝑉6 , or 𝑉7 in 𝐻 because these are the vertices of degree two in 𝐻.
However, each of these four vertices 𝑉2 , 𝑉3 , 𝑉6 , 𝑉7 in 𝐻 is adjacent to another vertex of degree
two in 𝐻, which is not true for ‘𝑎’ in 𝐺.

36
17. Show that the graphs with the following adjacency matrices are isomorphic.

0 1 0 1 0 1 0 0
A1 = 1 0 1 1 , A2= 0 0 1 1
1 0 0 0 1 1 0 1
0 0 1 0 1 0 0 0
Solution: Let us apply a series of interchange of pairs of rows and the
corresponding pairs of columns.
Consider,
0 1 0 1
A1 = 1 0 1 1
1 0 0 0
0 0 1 0

1 0 0 0
= 1 0 1 1 𝑅1 ⟺ 𝑅3
0 1 0 1
0 0 1 0

0 0 1 0
= 1 0 1 1 𝐶1 ⟺ 𝐶3
0 1 0 0
1 0 0 0

0 0 1 0
= 0 1 0 1 𝑅2 ⟺ 𝑅3
1 0 1 1
1 0 0 0

0 1 0 0
= 0 0 1 1 𝐶2 ⟺ 𝐶3
1 1 0 1
1 0 0 0
= A2.
The graph represented by the adjacency matrix A1 and A2 are isomorphic.
18. Are the simple graphs with following adjacency matrix are isomorphic?
0 1 0 1 0 1 1 1
1 0 0 1 , 1 0 0 1
0 0 0 1 1 0 0 1
1 1 1 0 1 1 1 0
Solution: Let us apply a series of interchange of pairs of rows and the
corresponding pairs of columns.
0 1 0 1
Let A1 = 1 0 0 1
0 0 0 1
1 1 1 0
37
1 1 1 0
= 1 0 0 1 𝑅1 ⟺ 𝑅4
0 0 0 1
0 1 0 1

0 1 1 1
= 1 0 0 1 𝐶1 ⟺ 𝐶4
1 0 0 0
1 1 0 0
0
1 1 1
≠ A2, where A2 = 1 0 0 1
1 0 0 0
1 1 1 0
Since first row, second row and first column of this matrix are same as in A 2. It cannot be
brought to A2 by interchanging rows and columns.
∴ A1 and A2 cannot be similar.
Hence the corresponding graphs are not isomorphic.
19. Are the simple graphs with the following adjacency matrices isomorphic?
0 1 0 0 0 1 0 1 0 0 0 1
1 0 1 0 1 0 , 1 0 1 0 0 1
0 1 0 1 0 1 0 1 0 1 1 0
0 0 1 0 1 0 0 0 1 0 1 0
0 1 0 1 0 1 0 0 1 1 0 1
1 0 1 0 1 0 1 1 0 0 1 0

Solution: The graphs of the given adjacency matrices are given below.

The graphs 𝐺 and 𝐻 are having same number of vertices and same number of
edges.
Let 𝑉1 = {𝑢1 , 𝑢2 , 𝑢3 , 𝑢4 , 𝑢5 , 𝑢6 } and 𝑉2 = {𝑣1 , 𝑣2 , 𝑣3 , 𝑣4 , 𝑣5 , 𝑣6 } are vertex sets of 𝐺 and
𝐻 respectively. i.e., 𝑉1 = 𝑉2 = 6 and 𝐸1 = 𝐸2 = 8.
Degree of the vertices of 𝐺:
𝑑 𝑢1 = 𝑑 𝑢4 = 2, 𝑑 𝑢2 = 𝑑 𝑢3 = 𝑑 𝑢5 = 𝑑 𝑢6 = 3.
Degree of the vertices of 𝐻:
𝑑 𝑣1 = 𝑑 𝑣4 = 2, 𝑑 𝑣2 = 𝑑 𝑣3 = 𝑑 𝑣5 = 𝑑 𝑣6 = 3.

38
Both the graphs 𝐺 and 𝐻 are having two vertices of degree 2 and four vertices
of degree 3.
Define 𝑓: 𝐺 → 𝐻
Choose a vertex '𝑢1 ’ in 𝐺. It has degree 2 and the two adjacent vertices of '𝑢1 ’
having the degree sequence 3,3.
Correspondingly choose a vertex '𝑣1 ’ with the same degree and same degree
sequence of adjacent vertices.
∴ 𝑓 𝑢1 = 𝑣1
Similarly all other vertices are having same degree and same degree
sequence of the adjacent vertices from 𝐺 to 𝐻.
∴ 𝑓 𝑢2 = 𝑣2 , 𝑓 𝑢3 = 𝑣3 , 𝑓 𝑢4 = 𝑣4 , 𝑓 𝑢5 = 𝑣5 , 𝑓 𝑢6 = 𝑣6 .
Hence 𝐺 and 𝐻 are isomorphic.

20. Examine whether the two graphs 𝐺 and 𝐻 associated with the
following adjacency matrices are isomorphic.
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
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

𝑢1 𝑢2 𝑢3 𝑢4 𝑢5 𝑢6
𝑢1 0 1 0 1 0 0
Solution: Let G = 𝑢2 1 0 1 0 0 1
𝑢3 0 1 0 1 0 0
𝑢4 1 0 1 0 1 0
𝑢5 0 0 0 1 0 1
𝑢6 0 1 0 0 1 0
𝑣1 𝑣2 𝑣3 𝑣4 𝑣5 𝑣6
𝑣1 0 1 0 0 1 0
and H = 𝑣2 1 0 1 0 0 0
𝑣3 0 1 0 1 0 1
𝑣4 0 0 1 0 1 0
𝑣5 1 0 0 1 0 1
𝑣6 0 0 1 0 1 0
Here 𝑣1 = 𝑣2 = 6, 𝐸1 = 𝐸2 = 7
Degree of the vertices of 𝐺:
𝑑 𝑢1 = 𝑑 𝑢3 = 𝑑 𝑢5 = 𝑑 𝑢6 = 2, 𝑑 𝑢2 = 𝑑 𝑢4 = 3.
Degree of the vertices of 𝐻:
𝑑 𝑣1 = 𝑑 𝑣2 = 𝑑 𝑣4 = 𝑑 𝑣6 = 2, 𝑑 𝑣3 = 𝑑 𝑣5 = 3.
Define 𝑓: 𝐺 → 𝐻
∴ 𝑓 𝑢1 = 𝑣4 , 𝑓 𝑢2 = 𝑣3, 𝑓 𝑢3 = 𝑣6, 𝑓 𝑢4 = 𝑣5 , 𝑓 𝑢5 = 𝑣2 , 𝑓 𝑢6 = 𝑣1 .
Hence 𝐺 and 𝐻 are isomorphic.

39
3.6 PATHS, CIRCUITS AND CONNECTEDNESS
Many problems can be modelled with paths formed by travelling along
edges of graphs. Paths with their subclasses of cycles and circuits are important in
graph theory because they help us to answer many questions about models of real-
word situations. For instance, the problem of sending a message between two
computers using intermediate links can be studied with a graph model involving
paths.
Informally, a path is a sequence of edges starting with vertex nd travels
from vertex to vertex along the edges of the graph.
Definition: Path
A Path of length n from the vertex v0 to vertex vn is a sequence of the
form v0, e1, v1, e2, v2, ….,vn-1,en,vn where ei = vi-1vi , i = 1,2,3 …., n.
The vertices v0 and vn are called the end points of the paths, v0 is the intial
point and vn is the terminal point of the path.
Note: (1) the number of edges appearing in the path is its length.
(2) If the graph is simple, the path is unique and is denoted by just
listing the verticesv0, v1...., vn along the path.
(3) A path from v0 to vn which does not contain repeated vertices is
called a simple path.
(4) A path of length 0 i.e., It contains only one vertex is called a
trivial path.
Definition: Circuit
A non-trivial path is called a circuit or cycle if it starts and ends with the same vertex
V1

e4 V5

e1
e5

e7
V4
V2
e6 V7
e3
e8
e2
V6

V3

A path from v1 to v5 is P1: v1 e1 v2 e2 v3 e3 v4 e5 v5


A path from v2 to v7 is P2: v2 e2 v3 e3 v4 e5 v5 v6 e8 v7
A cycle is v1 e1 v2 e2 v3 e3 v4 e4 v1
Note: (1) A loop is not a path. A loop is considered as a cycle of unit length.

40
If the length of a cycle is k it is called a k-cycle.
(2) A non-loop edge together with its end vertices is a path.
(3) A triangle is a 3-cycle.
Connected graph
When a graph is used to represent a computer network, where vertices
represent the computers and edges represent the communication links, under what
condition there is always a path? This leads to the concept of connectivity.
Definition: A graph is connected if there is a path between every pair of distinct
vertices of the graph. Otherwise it is disconnected.
Any two computers in a network can communicate if and only if the graph
of the network is connected.
Note: (1) Any graph with isolated vertices is a disconnected graph.
(2) Null graph is totally disconnected.
Example: Consider the graph G,

Clearly v2,v3,v5,v8 are cut vertices of G, because their removal disconnects the graph.
Note: 1. The vertex adjacent to a pendent vertex is cut vertex.
2. An isolated vertex is never a cut vertex.The edges e1,e5,e10 are cut edges
of the graph G, because their removal disconnects the graph G.

Problems:
1. Prove that if a simple graph G is disconnected then its complement 𝐺 is connected.
Proof: Let G be a disconnected graph. So, it has at least two connected
components G1 and G2.
Let G be the complement of G. The vertex set of G is the same as the vertex set
of G and any vertices of G are adjacent if and only if there are not adjacent in G.
We have to prove G is connected.
Let u, v be any two vertices of G (in fact u, v are vertices of G).
Suppose u ∈ V(G1) and v ∈ V (G2)

41
Since G1 and G2 are connected components of G, u and v are not adjacent in G.
So u, v are adjacent in G .
Therefore, there is a path connecting u and v in G
Now suppose u, v belong to the same component of G say u, v∈V(G1). Take any
vertex w in G2
So they are not adjacent in G
Therefore u and w are adjacent in G
Similarly v and w are adjacent in G .
Thus we get a path uwv connecting u and v in G .
Hence there is a path connecting every pair of vertices in G . So G is connected

2. 2. Prove that If a graph, connected or disconnected has exactly two vertices of odd
degrees, then there must be a path joining these two vertices.
Proof: Let G be a graph with exactly two vertices u, v of odd degree and all
othervertices are of even degrees.
If the graph G is connected, there is a path joining u, v by definition of connected
graph.
If the graph G is disconnected, then there are connected components of G.
Each component itself is a graph.
We know that in a graph the number of odd vertices is even.
So the two odd vertices u and v must belong to the same connected component.
Hence there is a path joining u and v.

3. 3. Prove that a simple graph with n vertices and k components can have atmost
𝑛 −𝑘 n−k+1
edges.
2
Proof: Let n1, n2…. nk be the number of vertices in each of k components of the
graph G then n1 + n2 + ⋯ + nk = n = |V(G)|
i.e. ki=1 ni = n………….(1)
k
Now i=1
(ni − 1) = n1 − 1 + n2 − 1 + ⋯ + nk − 1
= k
i=1 ni −k
k k
i=1
(ni − 1) = n − k[Since i=1 ni = n]
Squaring both sides
k 2
(n − 1) = (n-k)2
i=1 i
(n1-1)2+(n2-1)2+……. +(nk-1)2≤ n2 +k2-2nk
n12−2n1 + 1 + n22 − 2n2 + 1 + ⋯ + n2k − 2nk + 1 ≤ n2 + k 2 − 2nk

42
k

n2i + k − 2n ≤ n2 + k2 − 2nk
i=1

n2i ≤ n2 + k2 − 2nk + 2n − k
i=1
k

n2i ≤ n2 + k2 − k − 2nk + 2n
i=1
k

n2i = n2 + k k − 1 − 2n(k − 1)
i=1
= n2 + (k − 1)(k − 2n)
k
n2
i=1 i
≤ n2 + (k − 1)(k − 2n)……….(2)
n i n i −1
Since G is simple, the maximum number of edges of G in its component is
2
k k
n i n i −1 n2
i −n i
Therefore, Maximum number of edges ofG = =
i=1 2 i=1 2
1 k 1
=2 n2
i=1 i
−2 k
i=1 ni
1 n
≤ 2 n + k − 1 k − 2n − 2 using equation (1) and (2)
2

1 2
= n + k2 − 2nk − k + 2n − n
2
1
=2 [ n − k 2 + (n − k)]
1
= n − k [n − k + 1]
2
n−k n−k+1
∴ Maximum number of edges of G ≤
2
4.Prove that a simple graph with n vertices must be connected if it has more than
(𝑛−1) 𝑛−2
edges.
2
(n−1) n−2
Proof: Let G be a simple graph with n vertices and more than edges.
2
Suppose if G is not connected, then G must have atleast two components. Let it
be G1 and G2
Let v1 be the vertex set of G1 with v1 = m. If v2 is the vertex set of G2,
then v2 = n − m
Here i) 1 ≤ m ≤ n − 1
ii) There is no edge joining a vertex of v 1 and a vertex of v2
iii) v2 = n − m ≥ 1
Now, E G = E G1 UG2 = E G1 + E G2
m (m−1) (n−m ) n−m−1
≤ + [By known result].
2 2
1
= m2 − m + n n − m − 1 − m(n − m − 1)
2

43
1
= n n − 1 − nm − m n − m − 1 + m2 − m
2
Adding and subtracting (2n-2)
1
= n − 1 n − 2 + 2n − 2 − 2nm + m2 + m + m2 − m
2
1
= n − 1 n − 2 + 2n − 2 − 2nm + 2m2
2
1
= 2 n − 1 n − 2 + 2n 1 − m + 2(m2 − 1)
1
= 2 n − 1 n − 2 − 2n m − 1 + 2(m − 1)(m + 1)
1
= 2 n − 1 n − 2 − 2 m − 1 (n − m − 1)
n−1 n−2
E G ≤ , ( Since [(m-1) (n-m-1)] ≥ 0 for 1 ≤ m ≤ n − 1)
2
n−1 n−2
which is a contradiction to G that has more than edges.
2
∴ Hence G is a connected graph.
𝑛
5. Let G be a simple graph with n vertices show that if 𝛿 𝐺 ≥ , then G
2
is connected, where 𝛿(G) is minimum degree of graph G
Proof: Let u & v be any two distinct vertices in G. We claim that there is a u-v
path in G.
If uv is an edge in G,then it is a uv path. Suppose uv is not an edge of G, then
X be the set of all vertices which are adjacent to Y.
Then u,v ∉ X ∪ Y ( ∵ G is a simple graph) and hence X ∪ Y ≤ n − 2
n n
We have X = deg u ≥ δ G ≥ [2 ] and Y = deg v ≥ δ G ≥ [2 ]
n n
X∪Y = X + Y ≥ + ≥ n-1
2 2
We Know that X ∪ Y = X + Y - X ∩ Y
From above, X ∩ Y ≥ 1 X ∩ Y ≠ 0
Now take a vertex w ∈ X ∩ Y. Then uvw is a path in G. Thus, for every pair of
distinct vertices of G there is a path between them. Therefore, G is connected.

6. Show that a simple graph G is bipartite if it has no circuit (or cycle) of odd length.
Solution:Let G = (V, E) be a bipartite graph.
We have to prove it contains no odd cycle (i.e. no cycle with odd number of
edges).Since G is bipartite the vertex set V can be partitioned into two subsets
V1 and V2such that every edge of G has one end in V1 and other end in V2.
Now consider any cycle v0, v1, v2…,vn = v0of length n.

44
Suppose v0∈ V1, then v1∈ V2, v2∈ V1, v3∈ V2….,
In general, vk∈ V1 if k is even,vk∈ V2 if k is odd
Thus v2, v4, v6..., ∈V1 and v1, v3, v5….∈V2 and vn= v0∈V1 and so n is even.
So the cycle has even number of edges.
Hence the graph has no odd cycle.
Conversely, let the graph G has no odd cycle We have to prove it is a bipartite.
Without loss of generality we may assume that G is connected.
(Otherwise we consider the connected components of G separately).
Let v1 be any vertex of G i.e. v1∈ V.
Define V1 = v ∈ V| ⅆ v, v1 , is even}
V2 = v ∈ V| ⅆ v, v1 , is odd}
Clearly V1, V2 are non-empty disjoint subsets of V.
i.e. V1 ∪ V2= V and V1∩ V2= ∅
We have to prove every edge of G has one end in V 1 and other end in V2.
i.e. to prove that no two vertices of V 1 are adjacent.
Suppose two vertices u1 v ∈ V1are adjacent then e=uv is an edge

Let P be the shortest v1 -u path of length.


Let Q be the shortest v1 -v path of length n
Since u, v ∈ V1, m, n are even.
Now, but u1 be the last common point of paths P and Q.
Then the v1- u1 path along P and the v1- u1 and the path v1- u1 along Q at both
shortest paths and hence have the same length, say r
Now the path u1-u along P the line uv and the path v-u along Q form a cycle of
length (m-r) + 1+(n-r) which is odd
45
Hence a contradiction.
u and v in V1 are not adjacent.
Thus, no two vertices in V1 are adjacent.
Similarly we can prove that no to vertices of V2are adjacent
Hence (V1, V2) is a bipartition of G and so G is bipartite.
The number of paths between two vertices in a graph can be determined using its
adjacency matrix.
Theorem : Let G = (V, E) be a graph with adjacency matrix A with respect to the
ordering of vertices v1, v2,…..vn.The number of different paths of length r from vi to
vj equals the (i,j)th entry of Ar.
Proof: Given the graph G = (V,E) with vertex set V={ v 1, v2,…., vn}. In this order
the adjacency matrix A =(aij) is an nxm square matrix given by
1 if vi and vj are adjacent
aij =
0 if vi and vj are not adjacent
We prove the theorem by induction on r.
Basis Step:
If r=1, then the number of paths from vi to vj of length one is the (i, j)th entry of A,
because this entry represents the number of paths from vi to vj . So the result is true
for r =1
Inductive Step :
We now assume that the result is true for any k(k>1)
That is in Akthe (i, j)thentry aij(k) is the number of paths from vi to vj of length k in G.
To prove it is true for r= k+1
i.e. To prove (i, j)thentry aij(k+1)in Ak+1 is the number of paths from vi to vj of length
k+1
Now Ak+1 = Ak.A = aij(k)aij
n
Hence the (i, j)th entry of Ak+1 = a ⅈsk asj
s=1
th k
But aⅈsk is the (i, s ) entry of A . By induction hypothesis a ⅈsk is a path from vi to
vs of length k in G, where vs is an intermediate vertex.
A path of length k+1 from vi to vj is made up of a path of length k from vi to vs and
an edge from vs to vj.
By product rule for counting the number of such paths is the product of the number
of paths of length k from vi to vsnamely a ⅈsk and the number of edges from vs to vj
namely asj where these products are added for all possible intermediate vertices vs,
we get the total number of paths fromvi to vjof length k+1, which is the (i, j)thentry
of Ak+1
Hence by the principal of induction the result is true for all integers r.

Note: The result is true if G is directed or undirected, with multiple edges and
loops.
46
7. For the graph G given by the figure. Find (i) the number of paths of length 4
from a to d. (ii) the number of paths of length 3 from a to c and a to d.

Solution: The adjacency matrix of G is


0 1 1 0
1 0 0 1
A=
1 0 0 1
0 1 1 0
(i) Since a is the first vertex and d is the 4th vertex, the number of paths of length 4
from a to d is (1, 4)th element A4 (by theorem)
0 1 1 0 0 1 1 0 2 0 0 2
1 0 0 1 1 0 0 1 0 2 2 0
Now A2= A.A = =
1 0 0 1 1 0 0 1 0 2 2 0
0 1 1 0 0 1 1 0 2 0 0 2
2 0 0 2 0 1 1 0 0 4 4 0
3 2 0 2 2 0 1 0 0 1 4 0 0 4
A = A .A = =
0 2 2 0 1 0 0 1 4 0 0 4
2 0 0 2 0 1 1 0 0 4 4 0
0 4 4 0 0 1 1 0 8 0 0 8
4 0 0 4 1 0 0 1 0 8 8 0
A4= A3.A = =
4 0 0 4 1 0 0 1 0 8 8 0
0 4 4 0 0 1 1 0 8 0 0 8
∴The number of paths of length 4 from a to d is 8
(ii)The number of paths of length 3 from a to c is the (1, 3)th elements in A3
∴The number of paths length 3 from a to c is 4.
The number of paths of length 3 from a to d is the (1, 4)th element in A3.
∴The number of length 3 from a to d is 0
i.e. there is no path of length 3 from a to d

8. Find the number of paths of length n between two different vertices in K4


if n is (i) 2 (ii) 3 (iii) 4
Solution: K4 is the complete graph on 4 vertices.
The diagram of K4 is given here

47
0 1 1 1
1 0 1 1
The adjacency matrix A=
1 1 0 1
1 1 1 0
0 1 1 1 0 1 1 1 3 2 2 2
2 1 0 1 1 1 0 1 1 2 3 2 2
Now A = A.A = =
1 1 0 1 1 1 0 1 2 2 3 2
1 1 1 0 1 1 1 0 2 2 2 3
3 2 2 2 0 1 1 1 6 7 7 7
2 3 2 2 1 0 1 1 7 6 7 7
A3 = A2.A = =
2 2 3 2 1 1 0 1 7 7 6 7
2 2 2 3 1 1 1 0 7 7 7 6
6 7 7 7 0 1 1 1 21 20 20 20
7 6 7 7 1 0 1 1 20 21 20 20
A4 = A3.A = =
7 7 6 7 1 1 0 1 20 20 21 20
7 7 7 6 1 1 1 0 20 20 20 21
The number of paths of length 2 between any two different vertices = 2
The number of paths of length 2 from any vertex to itself is = 3
The number of paths of length 3 between two different vertices = 7
The number of paths of length 4 between two different vertices = 20
3.7 EULER AND HAMILTON PATHS
In the beginning of this chapter we considered the Konigsberg bridge problem
where two interesting questions arise. Can one walk through the city crossing each
bridge exactly once? Can one walk through the city, stating from the one place, using
each bridge exactly once and return to the starting place? These two questions are
the broad categories of problems for which graph theory is used.

Euler path and circuits


Definition: An Euler circuit (or cycle) in a graph G is a simple circuit containing every
edge of G.
An Euler path in a graph G is a simple path containing every edge of G.
A connected graph with an Euler circuit is called an Euler graph (or) Eulerian graph.
Examples:

48
The graph G1 is Eulerian, because it contains an Euler circuit a, b, c, e, f, g, c, d. a; it
contains each edge only once.
The graph G2 is Eulerian, because it contains an Euler circuit a, c, e, d, c, b, a.It
contains each edge only once.

The graph G3 is not Eulerian, because it does not contain Euler circuit, but it contain
an Euler path a, b, c, d, e, b containing every edge only once.
G4 has no Euler path or Euler circuit.
Note:
Euler path is also known as Eulerian path and Euler circuit is also known as
Eulerian circuit.
In Eulerian graph, a vertex may be revisited but no edge is repeated.
An Euler graph contains an Euler circuit containing all edges exactly once. So,
the graph is connected except for some isolated vertices. Since the isolated vertices
do not affect the nature of the connected path of a graph, we may discard te
isolated vertices if any. Hence we can consider an Eulerian graph to be a connected
graph.
Theorem: A connected graph G is Eulerian if and only if every vertex of G is of
even degree.
Proof: Let G be an Eulerian graph. We have to prove all vertices are of even
degree.
Since G is Eulerian, G contains an euler circuit, say,
v0 , e1 , v1 , e2 , … vn−1 , en , v0.
Both the edges e1 and en contribute one to the degree of vo and so deg vo is atleast
two.
In tracing this circuit we find an edge enters a vertex and another edge leaves the
vertex contributing 2 to the degree of the vertex.
This is true for all vertices and so each vertex is of degree 2, an even integer.
Conversely, let the graph G be such that all its vertices are of even degrees.
49
We have to prove G is an Euler graph.
We shall construct an Euler circuit and prove. Let v be an arbitrary vertex in G.
Beginning with v form a circuit C: v, v1 , v2 , … vn −1 , v
This is possible because every vertex are of even degree. We can leave a vertex
(≠ v) along an edge not used to enter it. This tracing clearly stops only at the vertex v
because v is also of even degree and we started from v. Thus, we get circuit or cycle C.
If C includes all the edges of G, then C is an Euler circuit and so G is Eulerian.
If C does not contain all the edges of G, consider the sub graph H of G obtained by
deleting all the edges of C from G and vertices not incident with remaining edges. Note
that all vertices of H have even degree. Since G is connected, h and C must have a
common vertex u. Beginning with u construct a circuit C1 for H.
Now combine C and C1 to form a larger circuit C2 .If it is Eulerian ie. If it contains all the
edges of G, the G is Eulerian.
Otherwise, continue this process until we get an Eulerian circuit.
Since G is finite this procedure must come to an end with a Eulerian circuit. Hence G is
Eulerian.

Theorem: A connected graph has an Euler path but not an Euler circuit if and only if it
has exactly two vertices of odd degree.
Proof: Given G is a connected graph.
Suppose it has an Euler path from v0 to vn , say, vo , e1 , v1 , e2 , … vn−1 , en , vn. .
The edges e1 and en contribute 1 to the degrees of v0 and vn respectively.
Every time the path passes through a vertex, it contributes 2 to its degree.
It is true for v0 and vn also.
So, the degrees of v0 and vn are always odd and the degrees of each internal vertices
remain even. Thus the graph contains exactly two vertices of odd degree.
Conversely, let the connected graph G contains two vertices of odd degree, say
v0 and vn . Adding a new edge e = v0 vn to G we get a graph G1 with all even degree
vertices. Therefore by previous theorem G1 is Eulerian.
Removing e = v0 vn from G1 , we get G containing an Euler path from v0 tovn .

Theorem: Prove that a graph G is disconnected iff its vertex set V is partitioned in to
two non empty disjoint subsets V1 and V2 such that there exist no edge in G whose one
end vertex is in subset V1 and other in V2 .
Proof: Suppose that such a partition exists. The partition V1 and V2 are like two
components. Consider two vertices a and b of G such that a ∈ V1 , b ∈ V2 then no path
exist between the vertices. Hence if the partition exist then G is not connected.
Conversely suppose G is disconnected. Consider a vertex ain G. Let V1 be the set of all
vertices that arre joined by a path to a. Since G is disconnected V1 does not include all

50
the vertices of G. Remaining vertices are inV2 . Therefore no vertex in V1 is joined to
any other vertex in V2 by an edge.

Hamilton path and circuits


Definition: A simple path is a connected graph G is called a Hamilton path if it
contains every vertex of G exactly once.
Definition: A simple circuit of connected graph G is called a Hamilton circuit or
Hamilton cycle if it contains every vertex of G exactly once.
A connected graph that contains a Hamilton circuit is called Hamilton graph or
Hamiltonian graph.

Ore’s theorem: If G is a simple connected graph with n vertices (n ≥ 3) such that


deg u + deg⁡ (v) ≥ n for any two vertices u, v in G, then G is Hamiltonian.
Proof: G is Hamiltonian implies G has Hamilton circuit which means circuit passes
through all the vertices exactly once.
Assume G is a simple connected graph with n vertices (n ≥ 3) such that
deg u + deg⁡ (v) ≥ n for any two vertices u, v in G,
Claim: G is Hamiltonian. Suppose G is not Hamiltonian (we get a contradiction)
Assume G is maximal non Hamilton graph. If G′ is another graph bigger (having
more edges) than G, then G′ must be Hamiltonian.
We know the complete graph K n is always Hamiltonian. Since G is not
Hamiltonian it is not complete, so there are two vertices u, v in G that is not
adjacent.(i.e there is no u − v edge in G) Now consider a new graph G′ = G + uv
has one more edge than G.So by choice of maximality G′ must be Hamiltonian.
Fact 1: Since G is not Hamiltonian, but G′ = G + uv is Hamilton, the addition of
edge uv only makes it Hamiltonian. So every Hamiltonian circuit in G′ must contain
the edge uv .Let u = V1, − V2 − V3 − ⋯ Vi − Vi+1 − Vi+2 … Vn − u be the Hamilton
circuit in G′
Define X = Vi in G such that u − Vi+1 is an edge in G
X = Vi inG such that Vi − v is an edge in G
Since there are no loops and no u − v edge in G u, v ∉ X, u, v ∉ Y implies u, v ∉ X ∪
Y implies X ∪ Y has vertices from G
X ∪ Y ≤ n − 2 here X =deg(u), Y =deg(v)
By inclusion − exclusion principle, X ∪ Y = X + Y - X ∩ Y
X ∩ Y = X + Y − X ∪ Y = deg(u)+ deg(v) − X ∪ Y ≥ n − (n − 2) (by given
hypothesis) which means there is a vertex Vi ∈ X ∩ Y
Vi ∈ X ⇒ u − Vi+1 is an edge in G
Vi ∈ Y ⇒ Vi − v is an edge in G

51
So, we get a Hamilton circuit
u = V1 − V2 − V3 … Vi − Vn = v − Vn−1 − Vi+2 − Vi+1 − u
which covers all the vertices in the graph without considering the edge uv
which is a contradiction to the fact 1. So G must be Hamiltonian. Hence the proof.
Theorem: Prove that any two simple connected graphs with n vertices all of degree
2 are isomorphic.
Proof:We know by Hand-shaking theorem sum of the degrees of the vertices= 2e
(v)
(i.e) n
i=1 dG = 2e. Further each vertices are of degree 2. Therefore 2n = 2e
⟹ n = e ⟹ number of edges = number of vertices. Also graphs are cycle graphs.
Hence they are isomorphic.
Theorem: Show that K n has a Hamilton circuit when n ≥ 3.
Proof: Let u be any vertex of K n . since K n is a complete graph with n vertices, any
two vertices are joined. So we start with u and visit vertices in any order exactly
once and come back to u. Hence there is a Hamilton cycle in K n and thus K n is
Hamiltonian.

Problems:
9. Give example for the graphs which are
(i) Not Eulerian and Hamiltonian
(ii) Eulerian and not Hamiltonian
(iii) Neither Eulerian nor Hamiltonian
(iv) Eulerian and Hamiltonian
Solution:
(i) The graph contains Hamiltonian circuit v1 , v2, v3, v4, v5, v6, v1
Hence G is a Hamilton graph. Since the degree of each vertex is not even, it is not
Eulerian.

52
(ii)

Since every vertex is of even degree, G has an Euler circuit. But it is not Hamiltonian,
because it can be seen that every circuit containing every vertex contains a vertex
twice. For example v1 , v2, v3, v5, v1, v6, v3, v4, v1, .So G is Eulerian but not Hamiltonian.

(iii)

The Peterson graph given above is not Eulerian and not Hamiltonian since every
vertex is of odd degree. The Peterson graph is not Hamiltonian because it can be
seen that every circuit containing every vertex contains a vertex twice.

(iv)

The circuit V1, V2, V3, V4, V1 in the graph consists of all edges and all vertices
each exactly only once. Therefore, The above graph iscontains a circuit i.e., both
Eulerian as well as Hamiltonian.

53
10. Determine whether Euler path exist in the following graph.

Solution: G1 contains exactly two vertices a and b of odd degree. So, there is a
Euler path a, b, c, d, e, b starting with one odd vertex and ending with other odd
vertex.
G2 contains exactly two vertices e,g of odd degree. So it contains a Euler path
starting with g and ending with e namely g, a, b, c, d, e, f, b, g, f, c, e.
G3 contains two vertices of odd degree a and c. So it contains a Euler path
starting with a and ending with c namely a, b, c, d, a, c.

11. Find an Euler path or an Euler circuit, if it exists in each of the graphs
given below. If it does not exist, explain why?

Solution: In G1 , there are two vertices namely A, B of odd degree 3 and other
vertices are of even degrees 2 and 4. So G1 has Euler path and has no Euler circuit.
The Euler path between A and B is given by A, B, C, D, A, C, D, B.

In G2 all the 6 vertices are of odd degree 3 ad so it contains neither an Euler


path (A graph G is said to have a Euler path if it has exactly two vertices of odd
degree) nor an Euler circuit (A necessary and sufficient condition for a graph G to
have Euler circuit iff all the vertices are of even degree).

In G3 all the 5 vertices are of even degree 4. So, by the theorem A necessary
and sufficient condition for a graph G to have Euler circuit iff all the vertices are of
even degree) G3 has Euler circuit A,B,C,D,E, A, C, E,B, D,A.

12. Identify Hamilton path, Hamilton circuit in the following graphs:

54
Solution:
(i) In G1 ,v1 , v2 , v3 , v4 , v5 , v8 , v7 , v6 , v1 is a Hamilton cycle and so it is a Hamilton
graph.
v1 , v2 , v3 , v4 , v5 , v6 , v7 , v8 is a Hamilton path.
(ii) In G2 , a, b, c, d, e, h, g, f, ais a Hamilton cycle. So G2 is a Hamilton graph. It
contains a Hamilton path also. a, b, c, d, e, f, g, h is a Hamilton path.
(iii) In G3 , v1 , v2, v3, v4 is a Hamilton path. But there is no Hamilton cycle, since v1 , v2
occurs twice in every circuit. So v2 is repeated.
(iv)In G4 , any cycle will have v2 , v5 atleast twice. So it is not a Hamilton graph. It
has no Hamilton path also.

55
3.8 PRACTICE QUIZ
1. A graph is a collection of.... ?

a) Row and columns


b) Vertices and edges
c) Equations
d) None of the above

2. In a simple graph, the number of edges is equal to twice the sum of the degrees of
the vertices.
a) True b) False
3. If a simple graph G, contains n vertices and m edges, the number of edges in the
Graph G'(Complement of G) is ___________
a) (n*n-n-2*m)/2
b) (n*n+n+2*m)/2
c) (n*n-n-2*m)/2
d) (n*n-n+2*m)/2
4. Which of the following properties does a simple graph not hold?
a) Must be connected
b) Must be unweighted
c) Must have no loops or multiple edges
d) Must have no multiple edges
5. Which of the following is true?
a) A graph may contain no edges and many vertices
b) A graph may contain many edges and no vertices
c) A graph may contain no edges and no vertices
d) A graph may contain no vertices and many edges
6. For a given graph G having v vertices and e edges which is connected and has no
cycles, which of the following statements is true?
a) v=e
b) v = e+1
c) v + 1 = e
d) v = e-1
7. A graph with all vertices having equal degree is known as a __________
a) Multi Graph
b) Regular Graph
c) Simple Graph
d) Complete Graph

56
8. The degree of any vertex of graph is....?
a)The number of edges incident with vertex
b) Number of vertex in a graph
c) Number of vertices adjacent to that vertex
d) Number of edges in a graph
9. What is the number of edges present in a complete graph having n vertices?
a) (n*(n+1))/2
b) (n*(n-1))/2
c) n
d) Information given is insufficient
10. The given Graph is regular.

a) True
b) False
11. What is the maximum number of edges in a bipartite graph having 10 vertices?
a) 24 b) 21 c) 25 d) 16
12. Which of the following ways can be used to represent a graph?
a) Adjacency List and Adjacency Matrix
b) Incidence Matrix
c) Adjacency List, Adjacency Matrix as well as Incidence Matrix
d) No way to represent
13. A simple graph G has 24 edges and degree of each vertex is 4. Find the number of
vertices
a) 20 b) 21 c) 12 d) 16.
14. A graph contains 21 edges, 3 vertices of degree 4 and all other vertices of degree
2. Find total number of vertices.

a) 18 b) 15 c) 12 d) 16

57
3.9 Assignment 1
1) There are 25 telephones in Geeks land. Is it possible to connect them with
wires so that each telephone is connected with exactly 7 others?
2) There are 9 line segments drawn in a plane. Is it possible that each line
segment intersects exactly 3 others?
3) Prove that, a graph G with n vertices has n-1 edges and no circuits are
connected.
4) Draw the graph with 3 vertices A, B, C, D & E such that the deg(A)=3,B is
an odd vertex, deg(C)=2 and D and E are adjacent.
5) Does there exist a simple graph with 5 vertices of the following degree? If
so draw such graph (a) 4,4,4,3,2 (b)3,3,3,3,3,3
6) How many paths of length 4 are there from a tod in the simple graph G
given.

Assignment 2
7) Draw the complete graph K 5 with vertices A,B,C,D,E. Draw all complete
sub graph of K 5 with 4 vertices
8) Draw the graph whose adjacency matrix given below:
0 3 0 2  0 1 1 0 
3 0 1 1  1 0 0 1 
a)   b)  
0 1 1 2  1 0 0 1 
   
2 1 2 0 0 1 1 0 
9) Define an Euler graph? Find an example of Eulerian graph which is not
Hamiltonian?
10) Give an example of a graph
(a) Eulerian circuit but not a Hamiltonian circuit.
(b) Hamiltonian circuit but not an Eulerian circuit.
(c) Euler circuit and a Hamiltonian
(d) Neither Euler circuit nor Hamilton circuit.

58
3.10 PART A QUESTION & ANSWER

S.No Question & Answer K CO


Level
Define Graph.
1. Ans: A graph G = (V,E) consists of a finite non empty set
V, the element of which are the vertices of G, and a finite K2 CO3
set E of unordered pairs of distinct elements of V called
the edges of G.
Define complete graph.
2. Ans: A graph of n vertices having each pair of distinct
K1 CO3
vertices joined by an edge is called a Complete graph and is
denoted by Kn.
Define regular graph.
3. Ans: A graph in which each vertex has the same degree is
K1 CO3
called a regular graph. A regular graph has k – regular if
each vertex has degree k.
Define Bipartite Graph with example.
4. Ans: A bipartite graph is one whose vertices, V, can be
divided into two independent sets, V1 and V2, and every
edge of the graph connects one vertex in V1 to one vertex in
V2.
Example: K1 CO3
v1 v2
V = {V1, V2}
V1 = {v1, v2}
V2 = {v3, v4, v5}
v3 v4 v5

State Handshaking theorem.


5. Ans: If G = (V, E) is an undirected graph with e edges, then
K1 CO3

Draw a complete bipartite graph of K 2,3 and K3,3 .


6. Ans: K3,3 . K 2,3

K1 CO3

59
𝐕(𝐆 )
If G is a simple graph with (𝐆 ) ≥ 𝟐
. Then show that
7.
G is connected.
Solution: Let u and v be any two distinct vertices in G
𝐕(𝐆 )
Given 𝛅(𝐆 ) ≥ ----(1)
𝟐
To prove: G is connected we have to show there exist u – v
path in G. If uv is an edge the u-v is a path in G Suppose uv
is not an edge.
Let X = { set of vertices which are adjacent to u}
Y = { set of vertices which are adjacent to v}
Then u, v ∉ X ∪ Y
Therefore, |X ∪Y|≤n – 2 ⟹ – |X ∪Y|≥ – (n – 2) -----(2) K1 CO3
By Inclusion exclusion principle |X ∪Y| = |X| + |Y| – |X ∩Y|
⟹|X ∩Y| = |X| + |Y| – |X ∪Y|
⟹|X ∩Y| ≥ |X| + |Y| – |X ∪Y|
𝐧 𝐧
⟹|X ∩Y| ≥ 𝟐 + 𝟐 − 𝐧 − 𝟐 [If n is even |X ∩Y|≥ 2,
If n is odd |X ∩Y|≥ 1]
⟹ ∃ a w∈ X ∩Y ⟹ w ∈ X and w ∈ Y
⟹ w is adjacent to u, w is adjacent to Y
⟹ uvw is a path in G
Therefore, G is connected.

8. Give an example of a graph which is Hamiltonian but


not Eulerian.
Solution: The Graph is not Eulerian. Since it doesn’t covers
all the edges exactly once. The Graph is Hamiltonian. If
covers all the vertices exactly once whose initial and final
vertices are same A, B, D, C, E, A.

K1 CO3

60
9.
Define Hamiltonian
Solution: A connected graph that contains a Hamilton
circuit is called Hamilton graph or Hamiltonian graph

K1 CO3

10. Draw a graph that is an Euler graph but not


Hamiltonian
Solution: The graph is Eulerian. Since it covers all the
edges in the graph exactly once a-b-c-d-e-c-a.

K1 CO3

11. Define a connected graph and disconnected graph


with examples
Solution: A graph G is connected if there is a path between
every pair of distinct vertices of the graph otherwise it is
disconnected.

K1 CO3

61
12.
Is the directed graph given below is strongly
connected? Why or Why not?

K1 CO3

Solution: It is strongly connected because for any two


vertices u and v there is a path from u to v and from v to u.

13. Obtain the adjacency matrix of the graph given


below.

K2 CO3

Solution: The adjacency matrix


v1 v2 v3 v4 v5
v1 0 1 1 0 1
v2 1 0 1 0 0
v3 1 1 0 1 0
A G = v4 0 0 1 0 1
v5 1 0 0 1 0

62
Draw the graph represented by the given adjacency
14. matrix
𝟎 𝟏 𝟎 𝟏
𝟏 𝟎 𝟏 𝟎
𝟎 𝟏 𝟎 𝟏
v1 v2 v3 v4
𝟏 𝟎 𝟏 𝟎
v1 0 1 0 1
Solution: Let v2 1 0 1 0
v3 0 1 0 1
v4 1 0 1 0
K2 CO3
The graph of the given adjacency matrix is

15. Define isomorphism between graphs / directed


graphs.
Answer: The simple graphs G1 = V1 , E1 and G2 = V2 , E2
are isomorphic if there is a one to one and onto
K1 CO3
correspondence between V1 and V2 with the 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’ and ‘b’ in V1 .

16. Draw the graph with the following adjacency matrix


𝟎 𝟏 𝟏
𝟏 𝟎 𝟏
𝟎 𝟏 𝟎 a b c
Solution: Let a 0 1 1
b 1 0 1 K2 CO3
c 0 1 0

The graph of the given adjacency matrix is

63
17. Can you draw a graph of 5 vertices with degree
sequence 1,2,3,4,5?
Solution: A degree sequence is 1,2,3,4,5
deg v = 1 + 2 + 3 + 4 + 5 = 15 (odd)
We know that in any graph the number of odd degree K2 CO3
vertices is always even.
Here the number of odd degree vertices is 3 (not an even)
Therefore such a graph does not exist.

18. Define incidence matrix of a simple graph.


Solution: Let 𝐺 = 𝑉, 𝐸 be an undirected graph with n-
vertices 𝑉1 , 𝑉2 , 𝑉3 … . . 𝑉𝑛 and m-edges 𝑒1 , 𝑒2 , 𝑒3 … . . 𝑒𝑛 , then
the 𝑛 × 𝑚 matrix B= 𝑏𝑖𝑗 where
1, when edge ej incidence on Vi K2 CO3
𝑏𝑖𝑗 =
0, otherewise
is called the incidence matrix of G.

64
S.No Part B (Question) K CO
Level
1. Prove that the maximum number of edges in a simple graph with ‘n’
n(n  1)
vertices is . K2 CO3
2

2. If G = (V, E) is an undirected graph with e edges, then prove that


i deg(vi )  2e . K2 CO3

3. Prove that the number of odd degree vertices in any graph is


K2 CO3
even
4. Show that the for any bipartite graph G with e edges and v vertices,
v2
prove that e  . K2 CO3
4

5. If all the vertices of an undirected graph are each of degree k, show that the
number of edges of the graph is a multiple of k. K2 CO3

6. Prove that the connected graph is G is Eulerian if and only if all the
K2 CO3
vertices are of even degree.
7. Show that the complete graph with n vertices Kn has Hamiltonian
K2 CO3
circuit whenever n≥ 3.
8. Prove that if G is simple graph with at least three vertices and
𝐕(𝐆 ) K2 CO3
𝛿(𝐆 ) ≥ 𝟐 then G is Hamilton.
9. Let G be a simple undirected graph with n vertices. Let u and v be
two non adjacent vertices in G such that deg (u) +deg (v) ≥ n in G.
K2 CO3
Show that G is Hamiltonian if and only if G + uv is Hamiltonian.

10. If G is a connected simple graph with n vertices with n ≥ 3, such


𝑛
that the degree of every vertex in G is atleast , then prove that G K2 CO3
2
has Hamilton cycle.
11. Find an Euler path or an Euler circuit, if it exists in each of
the graphs given below. If it does not exist, explain why?

K1 CO3

65
12. If A is adjacency matrix of a graph G with
V(G) ={ v1, v2,…..vn }, prove that for any n ≥ 1, the (i,j)th
entry of An is the number of vi - vj walks of length n in G . K2 CO3

13. Examine whether the following pair of graphs isomorphic are


not?

K2 CO3

(G) (H)
14. Draw the graph whose adjacency matrix given below.

0 3 0 2 0 1 0 0
3 0 1 1 , 0 0 1 0 K2 CO3
0 1 1 2 1 1 0 0
2 1 2 0 0 1 1 0

15. Draw the graph whose adjacency matrix given below:

0 1 0
1
0 1 0  1 1  K2 CO3
a) 1 0 1 
0 0
b) 
1 0 1
0
0 1 0   
0 1 0
1
16. If G is a self-complementary graph, then prove that G
has n≡ 0 (𝑜𝑟)1(mod 4) vertices.
K2 CO3

66
Supportive online Certification Courses

https://www.udemy.com/course/discrete/?referralCode=0C16DD8E64
F9C8A66D22 (udemyCourse) by Amour Learning
Discrete Mathematics by Dr. Sugata Gangopadhyay & Dr. Aditi
Gangopadhyay,Department of Mathematics,IIT Roorkee.For more
details on NPTEL visit http://nptel.ac.in

67
Real life applications of Graph theory
in day today life and to industry

Practical applications of permutations and combinations


View the video lecture on YouTube
https://youtu.be/_AFqdsqIs-A
https://youtu.be/iHzzSao6ypE
Graphs are used in everyday life, from the local newspaper to the
magazine stand. It is one of those skills that you simply cannot do
without.
Every day we are surrounded by countless connections and networks:
roads and rail tracks, phone lines and the internet, electronic circuits
and even molecular bonds. There are also social networks between
friends and families. All these systems consist of certain points, called
vertices, connected by lines, called edges. In mathematics, all these
networks are called graphs.
For those in a computer field, as in networking, the use of graphs
can be very useful to measure trafficking to a site.
Google maps (shortest route)
Split wise (minimum cash flow)
Landline wire connection (wire cost reduction)
Driverless car. (to find optimum way)
Facebook (to find new friends) are real life applications of Graph
theory.

68
CONTENT BEYOND THE SYLLABUS

View the lecture on You tube


https://youtu.be/AmXGNdoL_Jc
https://youtu.be/eIb1cz06UwI

69
Assessment Schedule (Proposed Date &
Actual Date)
Assessment Schedule

Test Name From To

FIAT 09.09.2023 15.09.2023

SIAT 26.10.2023 01.11.2023

Model Exam 15.11.2023 25.11.2023

70
PRESCRIBED TEXT BOOKS & REFERENCE BOOKS

TEXTBOOKS: 22MA301 Notes Discrete Mathematics


1. K. H. Rosen, "Discrete Mathematics and its Applications", 8th Edition, Tata
McGraw Hill Pub. Co. Ltd., New Delhi, Special Indian Edition, 2021.
2. J. P. Tremblay, and R. Manohar. " Discrete Mathematical Structures with
Applications to Computer Science", Tata McGraw Hill Pub. Co. Ltd, New Delhi,
30th Reprint, 2017

REFERENCES: 22MA301 Notes Discrete Mathematics


1. R.P. Grimaldi, "Discrete and Combinatorial Mathematics: An Applied
Introduction", 5th Edition, Pearson Education Asia, Delhi, 2014.
2. S. Lipschutz, and Mark Lipson., "Discrete Mathematics", Schaum's Outlines,
Tata McGraw Hill Pub. Co. Ltd., New Delhi, 3rd Edition, 2010.
3. T. Koshy, "Discrete Mathematics with Applications", Elsevier Publications, 2006

71
Mini Project on Graphs

 Using Graph-tea software, Draw a graph with 4 vertices and 3


edges, get reports about it, run algorithms on it, visualize it.
 Using Matlab software, construct the adjacency matrix of a graph
with the nodes are numbered 1 to N.
 Program to find the chromatic polynomial of a given graph.
 Applications of Graph in Data Structures.
 Traffic management using graph algorithm.
 Graphs in Networking .
 Konigsberg Bridge Problem.
 Determining the minimum number of warehouse needed to store
volatile chemicals.

72
Thank you

Disclaimer:

This document is confidential and intended solely for the educational purpose of RMK Group of
Educational Institutions. If you have received this document through email in error, please notify the
system manager. This document contains proprietary information and is intended only to the
respective group / learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender immediately by e-mail if you
have received this document by mistake and delete this document from your system. If you are not
the intended recipient you are notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.

73

You might also like