Module 1
Module 1
MODULE I
Introduction to Graphs
Graph
A graph 𝐺 = (𝑉, 𝐸) consists of a set of objects
𝑉 = {𝑣1 , 𝑣2 , 𝑣3 , ⋯ ⋯ ⋯ } called vertices (points, nodes) and
𝐸 = {𝑒1 , 𝑒2 , 𝑒3 , ⋯ ⋯ ⋯ } whose elements are called edges;
such that each edge e in E is assigned an unordered pair of vertices (𝑢, 𝑣) called
the end vertices of e.
Example: -
1) 𝑣1 𝑒1 𝑣2 2) 𝑣1
𝑉 = {𝑣1 }
𝑒4 𝑒5 𝑒2 𝐸=∅
𝑣4 𝑒3 𝑣3
𝐺 = (𝑉, 𝐸)
where 𝑉 = {𝑣1 , 𝑣2 , 𝑣3 , 𝑣4 }
𝐸 = {𝑒1 , 𝑒2 , 𝑒3 , 𝑒4 , 𝑒5 }
Notes: -
1) In drawing a graph it is immaterial whether the lines are drawn straight or
curved, long or short: what is important is the incident between the edges and
vertices. Hence the different diagrams may represent the same graph.
2
Example: -
𝒗𝟏 𝒗𝟏 𝒗𝟏
𝒆𝟓 𝒆𝟏 𝒆𝟓 𝒆𝟏 𝒆𝟓 𝒆𝟏
𝒗𝟒 𝒆𝟐 𝒗𝟐 𝒗𝟒 𝒆𝟐 𝒗𝟐 𝒗𝟒 𝒗𝟐
𝒆𝟒 𝒆𝟑 𝒆𝟒 𝒆𝟑
𝒆𝟒 𝒆𝟑
𝒗𝟑 𝒗𝟑 𝒗𝟑
2) In diagram of a graph, sometimes two edges may seem to intersect at a point
that does not represent a vector.
Example: -
𝒂
𝒆 Here intersecting point of 𝑒 & 𝑓 is
𝒅 𝒃 not a vertex.
𝒇
c
3) An edge is said to be incident with its end vertices and vice versa.
Example: -
𝒗𝟏 Here 𝒆𝟏 is incident with 𝒗𝟏 & 𝒗𝟐 ,
𝒆𝟏 𝒆𝟐 is incident with 𝒗𝟐 & 𝒗𝟑
𝒗𝟐 Also 𝑣1 is incident with 𝒆𝟏 ,
𝒆𝟐 𝒗𝟑 𝑣2 is incident with 𝒆𝟏 & 𝒆𝟐 ,
𝑣3 is incident with 𝒆𝟐
Self-Loop / Loop
It is an edge whose both ends are same.
Example: -
1) 𝒗𝟏 𝒆𝟏 Here 𝒆𝟏 is the self loop.
3
Example: -
𝒗𝟏
𝒆𝟏 𝒆𝟒 𝒆𝟏 & 𝒆𝟐 are parallel edges
𝒆𝟐 𝒆𝟑 𝒆𝟑 & 𝒆𝟒 are parallel edges
𝒗𝟐 𝒗𝟑
Simple Graph
If the graph with no loops and multiple edges are called simple graph.
𝒗𝟏 𝒗𝟐
G: Here G is a simple graph.
𝒗𝟒 𝒗𝟑
Multi Graph
A graph having parallel edge is known as a multi graph.
𝒗𝟏 𝒗𝟐
G: Here G is a multi-graph.
𝒗𝟒 𝒗𝟑
4
Pseudo graph
A graph with at least one loop is a pseudo graph.
Finite Graph
A graph consisting of finite number of vertices and edges is called as a finite
graph.
Example: -
𝒗𝟏
𝒆𝟏 𝒆𝟑
𝒗𝟐 𝒆𝟐 𝒗𝟑
This graph consists of finite number of vertices and edges. Therefore, it is a
finite graph.
Infinite Graph
A graph consisting of infinite number of vertices and edges is called as an
infinite graph.
Example: -
Adjacent vertices
Two vertices 𝑢&𝑣 in a graph 𝐺 are said to be adjacent if they are connected by
an edge.
5
Example: - 𝒗𝟏
𝒆𝟏 Here, 𝑣1 &𝑣2 are adjacent vertices
𝒗𝟐 𝑰𝑰𝑰𝒍𝒚 𝑣2 &𝑣3 are adjacent vertices
𝒆𝟐 𝒗𝟑
Adjacent edges
Two non-parallel edges are said to be adjacent if they are incident on a common
vertex.
Example: - 𝒗𝟏
𝒆𝟏 Here, 𝒆𝟏 &𝒆𝟐 are adjacent edges
𝒗𝟐
𝒆𝟐 𝒗𝟑
Degree of a vertex
The number of edges incident on a vertex 𝑣, self loop counted twice is called
degree of a vertex 𝑣 and is denoted by 𝑑𝑒𝑔(𝑣) or 𝑑(𝑣).
Example: -
𝒆𝟏
𝒗𝟏 𝒆𝟑 𝒗𝟐
𝒆𝟓
𝒆𝟒 𝒆𝟐 𝒗𝟓
𝒗𝟑 𝒆𝟔 𝒗𝟒
Proof:
Let 𝐺 be any graph with ‘e’ edges and ‘n’ vertices such as 𝑣1 , 𝑣2 , 𝑣3 , ⋯ ⋯ 𝑣𝑛 .
then the sum of degrees of all vertices in 𝐺 is twice the number of edges in 𝐺.
Example: -
𝑣5 𝑣1 𝑣2
𝑒4 𝑒5 𝑒1 𝑒2
𝑣4 𝑒3 𝑣3
𝑑(𝑣1 ) = 2, 𝑑(𝑣2 ) = 1, 𝑑(𝑣3 ) = 3, 𝑑(𝑣4 ) = 3, 𝑑(𝑣5 ) = 1
Number of edges= 5
Here, sum of degrees of each vertex= 10 = 2 × 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑒𝑑𝑔𝑒𝑠
Theorem
The number of vertices of odd degree in a graph is always even.
Proof:
Let 𝐺(𝑉, 𝐸) be any graph with ′𝑛′ number of vertices and ‘𝑒’ number of edges.
By fundamental theorem,
∑𝑛𝑖=1 𝑑(𝑣𝑖 ) = 2𝑒
∑𝑘𝑖=1 𝑑(𝑣𝑖 ) + ∑𝑚 ′
𝑗=1 𝑑(𝑣𝑗 ) = 2𝑒
𝑘 = 𝑒𝑣𝑒𝑛 𝑛𝑢𝑚𝑏𝑒𝑟
Hence proved
Regular graph
A graph in which all vertices are of same degree.
Example: -
1) 𝑣1
Here 𝑑(𝑣1 ) = 𝑑(𝑣2 ) = 𝑑(𝑣3 ) = 2
So, it is a regular graph
𝑣2 𝑣3
3) 𝑣1 𝑣2
Here 𝑑(𝑣1 ) = 𝑑(𝑣4 ) = 2
𝑣3 𝑣4 𝑑(𝑣2 ) = 𝑑(𝑣3 ) = 1
So, it is not a regular graph
Note: -
If every vertex in regular graph has degree ‘𝑛’ then this graph is called
𝑛 −regular graph.
Example: -
𝐺1 : 𝐺2 :
2-regular graph 3-regular graph
Degree Sequence
If 𝑣1 , 𝑣2 , 𝑣3 , … … … , 𝑣𝑛 are the 𝑛 vertices of 𝐺, then the sequence
8
i.e. 𝑑1 ≤ 𝑑2 ≤ 𝑑3 ≤ ⋯ … … ≤ 𝑑𝑛
Example: -
𝑣1
G: 𝑣2 𝑣3
𝑣4
Degree sequence of 𝐺 ∶ ( 2 ,2, 3, 5)
Question
Is there a graph with degree sequence ( 2 ,3, 3,4,4, 5)
Solution: -
No, here sum of degrees is odd.
Isolated vertex
Questions
1) Find the degree of each vertex for the below graph. Identify the isolated
vertices, loops, parallel edges, order of the graph & size of the graph.
𝑣2 𝑒2
𝑒1 𝑒3 𝑒5 𝑣3
𝑒6 𝑣5 𝑣4
𝑣1 𝑒7 𝑒4
𝑒8 𝑣6
Solution: -
𝑑(𝑣1 ) = 3, 𝑑(𝑣2 ) = 5, 𝑑(𝑣3 ) = 1 𝑑(𝑣4 ) = 0, 𝑑(𝑣5 ) = 3, 𝑑(𝑣6 ) = 4
Isolated vertex - 𝑣4
Loop - 𝑒2
2) Find the order, size and the degree of each vertex in the following graphs.
Verify also the fundamental theorem in each case.
i) B E
A C D F
Solution: -
Order of the graph = |𝑉| = 6
Size of the graph = |𝐸| = 9
10
ii)
A B C
E D
Solution: -
Order of the graph = Number of vertices = 5
Size of the graph = Number of edges = 13
𝑑(𝐴) = 6, 𝑑(𝐵) = 6, 𝑑(𝐶) = 6, 𝑑(𝐷) = 5, 𝑑(𝐸) = 3
.𝐷𝑒𝑔𝑟𝑒𝑒 𝑠𝑢𝑚 = 6 + 6 + 6 + 5 + 3
= 26 = 2 × 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑒𝑑𝑔𝑒𝑠
Hence the theorem is verified.
3) Find the adjacent vertices and vertices incident on each edges in the following
graph.
𝑣1 𝑒1 𝑣2
𝑒2 𝑒3 𝑒6
𝑒5 𝑣4 𝑒4 𝑣3
Solution: -
adjacent vertices - {(𝑣1 , 𝑣2 ), (𝑣2 , 𝑣3 ), (𝑣3 , 𝑣4 ), (𝑣4 , 𝑣1 ), (𝑣4 , 𝑣4 )}
4) How many edges are there in a graph with 10 vertices each of degree 6?
Solution: -
Number of vertices = 10
2𝑒 = 60
60
.𝑒 = = 30
2
Example: -
𝑣1
𝑣2 𝑣3 𝑣4 𝑣5
𝑣6
Null graph of 6 vertices
12
Complete Graph
A complete graph is a simple graph in which each pair of distinct vertices is
joined by an edge.
Notes: - |𝑣|=4 → n
1) Degree of all vertices of 𝐾𝑛 = 𝑛 − 1 𝑑(𝑣) = 3 → 𝑛 − 1
Hence, the maximum degree of each vertex in a simple graph with 𝑛 vertices
is (𝒏 − 𝟏)
.𝑃𝑟𝑜𝑜𝑓: −
Given 𝐺 is a simple graph i.e.; a graph with no loops and parallel edges.
i.e. 𝑑(𝑣) ≤ 𝑛 − 1
13
𝑛(𝑛−1)
2) The number of edges in 𝐾𝑛 is 𝑛𝑐2 or .
2
.𝑃𝑟𝑜𝑜𝑓: −
By fundamental theorem,
∑𝑛𝑖=1 𝑑(𝑣𝑖 ) = 2𝑒, where 𝑒 is the number of edges with 𝑛 vertices in the graph.
.(𝑛 − 1) + (𝑛 − 1) + (𝑛 − 1) + ⋯ ⋯ ⋯ 𝑡𝑜 𝑛 𝑡𝑖𝑚𝑒𝑠 = 2𝑒
. 𝑛(𝑛 − 1) = 2𝑒
𝑛(𝑛−1)
.𝑒 =
2
𝑛(𝑛−1)
The maximum number of edges in a simple graph with 𝑛 vertices is .
2
Hence proved.
Questions
1) Suppose 𝐺(𝑉, 𝐸) has 5 vertices. Find the maximum number of edges &
maximum degree of each vertex.
Solution: -
𝑛(𝑛−1) 5×4
Maximum number of edges = = = 10
2 2
Bipartite Graph
If the vertex set 𝑉 of a simple graph 𝐺 = (𝑉, 𝐸) can be split into two disjoint
sets 𝑉1 and 𝑉2 , such that every edge of 𝐺 connects a vertex in 𝑉1 and a vertex in
set is joined to every single vertex in the second set. The complete bipartite
graph is denoted by 𝐾𝑥,𝑦 where the graph 𝐺 contains 𝑥 vertices in the first set
Note: -
Number of edges of the complete bipartite graph 𝐾𝑥,𝑦 = 𝑥𝑦
Example: -
𝑣1 𝑣2
𝑣4 𝑣3
16
Undirected Graph
A graph in which the directions are not given for the edges is called undirected
graph.
Example: -
a
b c d
Example: -
a 𝑣5
Graph 𝐺: e Graph 𝐺′: 𝑒1
5 2 1 𝑣4 𝑒3 𝑣3
6 c 3 𝑒2 𝑒4
b d 𝑒6
𝑣1 𝑒5 𝑣2
Correspondence of vertices Correspondence of edges
.𝑓(𝑎) = 𝑣1 𝑓(1) = 𝑒1
.𝑓(𝑏) = 𝑣2 𝑓(2) = 𝑒2
.𝑓(𝑐) = 𝑣3 𝑓(3) = 𝑒3
.𝑓(𝑑) = 𝑣4 𝑓(4) = 𝑒4
.𝑓(𝑒) = 𝑣5 𝑓(5) = 𝑒5
Adjacency also preserved. Therefore, 𝐺 and 𝐺′ are said to be isomorphic.
Note: -
Isomorphic graph must have
17
Questions
i) A B 𝑣1 𝑣2
D C 𝑣4 𝑣3
𝐺𝑟𝑎𝑝ℎ 𝐺 𝐺𝑟𝑎𝑝ℎ 𝐺′
Solution: -
𝐺 and 𝐺′ have 4 vertices and 5 edges
In each graph two vertices have degree 2 and two have degree 3.
Correspondence of vertices
.𝑓(𝐴) = 𝑣1 , 𝑓(𝐵) = 𝑣2 , 𝑓(𝐶) = 𝑣4 , 𝑓(𝐷) = 𝑣3
Adjacency also preserved. Therefore, 𝐺 and 𝐺′ are said to be isomorphic.
18
ii) 𝑣2 𝑣2 ′
.𝐺: 𝑣1 𝑣3 𝐺 ′: 𝑣1 ′ 𝑣3 ′
𝑣5 𝑣4 𝑣5 ′ 𝑣4 ′
Solution: -
𝐺 and 𝐺 ′ have 5 vertices.
But number of edges in 𝐺 is 6 and number of edges in 𝐺 ′ is 5.
∴ The two graphs are not isomorphic.
iii) 𝑎 𝑏 𝑜 𝑝
𝑮𝟏 : 𝑒 𝑓 𝑮𝟐 : 𝑠 𝑡
ℎ 𝑔 𝑣 𝑢
𝑑 𝑐 𝑟 𝑞
Solution: -
𝑎 𝑏 𝑐 𝑑 𝑞 𝑟 𝑠 𝑡 𝑢
𝑮𝒓𝒂𝒑𝒉 𝑮𝟏 𝑓 𝑮𝒓𝒂𝒑𝒉 𝑮𝟐
𝐺1 and 𝐺2 have 6 vertices and 5 edges.
In 𝐺1 and 𝐺2 : 2 vertices have degree 2, 3 vertices have degree 1 and 1 has
degree 3.
Now consider 𝑑𝑒𝑔(𝑏) = 2 in 𝐺1
∴ ‘𝑏’ must correspond to either 𝑟, 𝑡 ; since these are the vertices of degree 2
in 𝐺2 .
In 𝐺1 adjacent vertices of ′𝑏′ = ′𝑎′ 𝑎𝑛𝑑 ′𝑐′, 𝑑𝑒𝑔(𝑎) = 1 & 𝑑𝑒𝑔(𝑐) = 2
But in 𝐺2 each of the 2 vertices 𝑟, 𝑡 is adjacent to another vertex of
degree 3.
Which is not true for ′𝑏′ in 𝐺1 .
So, there is no possible one-to-one correspondence between 𝐺1 and 𝐺2 .
Hence the two graphs 𝐺1 and 𝐺2 are not isomorphic.
Subgraph
A graph 𝑔 is said to be a subgraph of a graph 𝐺, if all the vertices and all the
edges of 𝑔 are in 𝐺, and each edge of 𝑔 has the same end vertices in 𝑔 as in 𝐺.
𝑣1 𝑒1 𝑣2 𝑒2 𝑣3 𝑣1 𝑒1 𝑣2 𝑒2 𝑣3
.
𝑒3 𝑒4 𝑒5 𝑒4
.𝑣4 𝑒6 𝑣5 𝑒7 𝑣6 𝑣5 𝑒7 𝑣6
.𝑮𝒓𝒂𝒑𝒉 𝑮 𝑺𝒖𝒃𝒈𝒓𝒂𝒑𝒉 𝒈 𝒐𝒇 𝑮
Remark: -
𝑔 ⊂ 𝐺 is used in stating “ 𝑔 is a subgraph of 𝐺”.
Notes: -
1) Every graph is its own subgraph.
2) A single vertex in a graph 𝐺 is a subgraph of 𝐺.
3) A single edge in 𝐺, together with its end vertices, is also a subgraph of 𝐺.
c 𝑑
spanning subgraphs
𝑎 𝑏 𝑎 𝑏 𝑎 𝑏
(1) 𝑒 (2) 𝑒 (3) 𝒆
𝑐 𝑑 𝑐 𝑑 𝑐 𝑑
Edge disjoint subgraphs: - Two (or more) subgraphs 𝑔1 and 𝑔2 of a graph 𝐺
are said to be edge disjoint if 𝑔1 and 𝑔2 do not have any edge in common.
Example: -
𝑎 1 𝑏 𝑎 1 𝑏
𝐺: 2 3 4 𝒈𝟏 : 3 4 𝒈𝟐 : 𝑐 5 𝑑
𝑐 5 𝑑 𝑑
21
𝑐 𝑏 𝑐 𝑏 𝑐 𝑏
𝐺 -𝑣𝑒𝑟𝑡𝑒𝑥 𝑏 𝐺 -𝑣𝑒𝑟𝑡𝑒𝑥 𝑎 𝐺 -𝑣𝑒𝑟𝑡𝑒𝑥 𝑑 𝐺 -𝑣𝑒𝑟𝑡𝑒𝑥 𝑐
The following graph is not an induced subgraph of 𝐺
. 𝑎 𝑑
The vertices 𝑏 and 𝑑 are present but the edge
𝑏 𝑐 {𝑏, 𝑑} of 𝐺 is not present.
Walk
A walk is defined as a finite alternating sequence of vertices and edges
beginning and ending with vertices such that each edge is incident with the
vertices preceeding and following it.
22
• A walk which begins and ends at the same vertex is called a closed walk.
• A walk which begins and ends at different vertices is called an open
walk.
Example: -
𝒗𝟐 𝒗𝟒
𝒂 𝒃 𝒄 𝒅
𝒗𝟏 𝒗𝟑 𝒆 𝒗𝟓
Walk − 𝑣1 𝑎 𝑣2 𝑏 𝑣3 𝑐 𝑣4 𝑑 𝑣5 𝑒 𝑣3
23
Closed walk - 𝑣3 𝑐 𝑣4 𝑑 𝑣5 𝑒 𝑣3
Path
An open walk in which no vertex appears more than once is called path.
The number of edges in the path is called length of a path.
Notes: -
• A path doesnot intersect itself.
• Self loop can be included in a walk but not in a path.
• The terminal vertices of a path are of degree one, and the intermediate
vertices are of degree two.
Example: -
Path - 𝑉1 𝑒1 𝑉2 𝑒2 𝑉3 𝑒3 𝑉4 𝑒4 𝑉5 𝑒5 𝑉6 𝑒6 𝑉7
Length of the path = Number of edges = 6
Circuit (Cycle)
A closed walk in which no vertex (except initial and final vertex) appears more
than once is called a circuit. That is, a circuit is a closed, nonintersecting walk.
Note: -
• A circuit is also called a cycle, elementary cycle, circular path, and
polygon.
24
Example: -
Circuit or Cycle : 𝑉1 𝑒1 𝑉2 𝑒2 𝑉3 𝑒3 𝑉4 𝑒4 𝑉1
Connected graph
Connected graph
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.
Example: -
𝑣1 𝑒4 𝑣2 𝑒8 𝑣1 𝑣2
𝑒3 𝑒2 𝑒3
𝑒1 𝑒2 𝑒5 𝑒1 𝑒5 𝑣5
.𝑣3 𝑒6 𝑣4 𝑒7 𝑣5 𝑣3 𝑒6 𝑣6 𝑣4
Connected Graph G Disconnected Graph H
Components of graph
A disconnected graph consists of two or more connected graphs. Each of these
connected subgraphs is called a component.
Example: -
1) .𝑣1 𝑣2
𝑒1 𝑒2 𝑒3 𝑒5 𝑣5
𝑣3 𝑒6 𝑣6 𝑣4
Disconnected Graph H with 3 components
25
2) a
g h i){a, b, c}
d e ii){d, e, f}
j iii){g, h, i}
b c iv){j}
i f
Disconnected Graph contains 4 components
Questions
degree 3 and the rest have degree less than 3. What is the minimum number of
Solution: -
Given, 𝑒 = |𝐸| = 12
|𝑉| = 𝑛 (assume)
.∑ 𝑑𝑒𝑔(𝑣𝑖 ) ≤ 6 × 3 + (𝑛 − 6) × 2 𝑑𝑒𝑔 < 3 𝑑𝑒𝑔 ≤2
.≤ 18 + 2𝑛 − 12
.≤ 6 + 2𝑛 (1)
By fundamental theorem we know that,
∑ 𝑑𝑒𝑔(𝑣𝑖 ) = 2𝑒 = 2 × 12 = 24
Then from (1)
.24. ≤ 6 + 2𝑛
.24. −6 ≤ 2𝑛
.18 ≤ 2𝑛
18
.𝑛 ≥
2
26
.𝑛 ≥ 9
2) Does there exist a simple graph with 7 vertices having degrees 1,3,3,4,5,6,6.
Solution: -
Suppose there exist a graph with 7 vertices satisfying given properties. Since 2
vertices are having degree 6, each of these two vertices are adjacent to every other
vertex.
Solution: -
Given, 𝑒 = |𝐸| = 12
|𝑉| = 𝑛 (assume)
.∑ 𝑑𝑒𝑔(𝑣𝑖 ) ≤ 6 × 3 + (𝑛 − 6) × 2 𝑑𝑒𝑔 < 3 𝑑𝑒𝑔 ≤2
.≤ 18 + 2𝑛 − 12
.≤ 6 + 2𝑛 (1)
By fundamental theorem we know that,
∑ 𝑑𝑒𝑔(𝑣𝑖 ) = 2𝑒 = 2 × 12 = 24
Then from (1)
.24. ≤ 6 + 2𝑛
.24. −6 ≤ 2𝑛
.18 ≤ 2𝑛
18
.𝑛 ≥
2
.𝑛 ≥ 9
3) Does there exist a simple graph with 7 vertices having degrees 1,3,3,4,5,6,6.
Solution: -
27
Suppose there exist a graph with 7 vertices satisfying given properties. Since 2
vertices are having degree 6, each of these two vertices are adjacent to every other
vertex.
𝑣2 𝑣3 𝑣4
𝑣1 𝑣5
𝑣7 𝑣6
Here deg (𝑣1 ) = deg (𝑣5 ) = 6
Degree of all other vertices is 2, which mean that there is no vertex with
degree 1.
It is not possible.
Hence there does not exist a simple graph with the given properties.
Theorem 2.1
A graph G is disconnected if and only if its vertex set V can be partitioned into
two non-empty, disjoint subsets 𝑉1 & 𝑉2 such that there exists no edge in G
whose one end vertex is in subset 𝑉1 & the other in subset 𝑉2 .
Proof: -
Suppose that such a partitioning exists. Consider two arbitrary vertices a and b
in G, such that a ∈ 𝑽𝟏 and b ∈ 𝑽𝟐 . No path can be existing between vertices a
and b, otherwise there would be at least one edge whose one end vertex would
be in 𝑉1 and the other in 𝑉2. Hence if partition exists, G is not connected. i.e;
disconnected.
Conversely, let G be disconnected graph. Consider a vertex a in G. Let 𝑉1 be
the set of all vertices that are joined by the paths to a. Since G is disconnected
28
, 𝑉1 does not include all vertices of G. The remaining vertices will form a
nonempty set 𝑉2 . No vertex in 𝑉1 is joined to any in 𝑉2 by an edge. Hence the
partition.
Theorem 2.2
If a graph G (connected or disconnected) has exactly two vertices of odd degree,
there is a path joining these two vertices.
Proof: -
Let G be any graph with all even degree vertices except the two vertices 𝑢 and
𝑣 which are odd.
Case (i) Let G be connected.
A graph is said to be connected if every pair of vertices in
the graph is connected. This means that there is a path between every pair of
vertices. Thus, in this case there is a path exist between 𝑢 and 𝑣.
Case (ii) Let G be disconnected.
If G is disconnected, then at least two components exist. We know that each
components of G are connected. Let C be a connected component of G containing
the vertex 𝑢. Since, the number of vertices of odd degree in any graph is even, C
has to contain another vertex of odd degree. But, then 𝑣 is the only other vertex
in G of odd degree and hence 𝑣 lies in the component C. Thus, there is a path
from 𝑢 to 𝑣.
Theorem 2.3
The maximum number of edges in a simple disconnected graph G with n
(𝑛−𝑘)(𝑛−𝑘+1)
vertices and k components is .
2
Proof: -
Let the number of vertices in each of the k components of a graph be
𝑛1 , 𝑛2 , ………, 𝑛𝑘
Then 𝑛1 +𝑛2 + ………+ 𝑛𝑘 = 𝑛 or ∑𝑘𝑖=1 𝑛𝑖 = 𝑛 ………………. (1)
29
A graph can be used to represent almost any physical situation involving discrete
objects and can draw a relationship among them. Few examples of such
applications are :
2) Utilities Problem
The problem can be represented by means of a graph. The conduits are shown as
edges and the houses, utilities are represented as vertices.
32
The graph cannot be drawn in the plane without edges crossing over, thus the
answer to the problem is “No”.
3) Seating Problem
Nine members of a new club meet each day for lunch at a round table. They
decided to sit such that every member has different neighbours at each lunch.
How many ways can these arrangement possible.
This situation can be represented by means of a graph with 9 vertices such at each
vertex represents a member,and an edge joining two vertices represents the
relationship of siting next to each other.
Given figure shows two different arrangements. They are 1234567891 (solid
lines) and 1352749681 (dashed lines).
It can be represented by graph- theoretic considerations that there are only two
more arrangements possible. They are 1573928461 and 1795836241. Ingeneral it
𝑛−1
can be shown that for n people the number of such arrangements is when is
2
𝑛−2
odd and when n is even.
2
means of its graph. In drawing the graph of an electical network, the juctions are
represented by vertices and branches are represented by edges.