Theorem
Theorem
Theorem: The Sum of the degree of all the vertices in a graph is twice the number of edges.
Let the number of edges in graph G be “n”. Then consider the set of vertices and set of edges is given by
V {v1 , v2 , v3 ,........}
E {e1 , e2 , e3 ,........, en }
And
v1 ) + deg ( v2 ) + deg ( v3 ) +… … … … ….
To Show: deg ( = Twice the number of EDGES.
deg (v )
vi V
i
i.e. = 2n
v1
v1 }, E= ] v1 , v2 , v3 ,... }, E= ]
[Case 1: TRIVIAL Graph: V= { [Case 2: NULL GRAPH: V= {
v1 }, E=
CASE 1: TRIVIAL GRAPH: V= {
deg (v )
vi V
i
deg (v1 ) =0=2 0=2n
=
v1 , v2 , v3 ,... }, E=
CASE 2: NULL GRAPH: V= {
deg (v )
vi V
i
v1 ) + deg ( v2 ) + deg ( v3 ) +… … … … ….
= deg (
=0
=0
=2 0
=2n
v1 , v2 }, E= { e1 }
STEP 2: Let the number of edge be ONE i.e. n=1.i.e V= {
v1 e1 v2
deg (v )
vi V
i
v1 ) + deg ( v2 )
= deg (
= 1+1
=2
=2 1
=2n
STEP 3: Assume that the theorem is true for a graph having (n-1) edges.
vi V ,1i n 1
deg (vi )
=2(n-1)
3
Let ‘e’ be any edge joining vertex ‘a’ to vertex ‘b’ in the graph G= (V, E)
a a
Now, if we delete/remove one edge joining vertex ‘a’ to vertex ‘b’, then we find a GRAPH G (V , E )
where E = E {e} but vertices in G will be same as in G .
vi V ,1 i n 1,G
deg (vi )
=2(n-1) ----------------------------------------------------- (2)
Now, if we join vertex ‘a’ to vertex ‘b’ then we find the graph G= (V, E) again. Hence
Degree of ‘b’ is increased by 1. Hence to plot graph G from G , one edge is added to G , to be
G.
vi V ,1i n 1,G
deg (vi )
vi V ,1 i n 1,G
deg (vi )
Hence = + 1+ 1
= 2(n-1)+ 1+ 1
vi V ,1i n 1,G
deg (vi )
= 2n = Twice the number of EDGES
“The Sum of the degree of all the vertices in a graph is twice the number of edges”. This completes
the proof.
Theorem: In any graph, the number of vertices of odd degree is always even.
E ={ e1 , e2 , e3 ,…., en }
Ve =Set of vertices of G having even degree and Vo = Set of vertices of G having odd degree.
Where
ai Ve and all b j Vo .
Hence all
Hence by the theorem which states, “The sum of degree of all the vertices in a graph is twice the
number of edges”.
deg ( a1 ) deg (a2 ) deg ( a3 ) .... deg (b1 ) deg (b2 ) deg (b3 ) ... = Twice the number of
edges.
deg (a ) deg (b )
i j
ai Ve
+
b j Vo
= 2( n )
deg (b ) j
2k + b j Vo = 2n
ai ’s are even and hence it will be some multiple of 2.)
(Since degree of all
deg (b ) j
= 2(n k )
b j Vo
deg (b )
b j Vo
j
= an even number
5
deg (b j )
Since value of each is odd. The above result is valid only for even number of values.
“Hence, in a graph, the number of odd degree vertices is even”. This completes the proof.
n(n 1)
Theorem: The maximum possible numbers of edges in a simple graph with n-vertices are 2 .
v1 , v2 , v3 ,...vn 1 , vn }
Let the set of vertices be V= {
v1 :
STEP 1: Number of Edges incident on/with
v1 can be joined by v2 , v3 ,...vn 1 & vn to form the following edges- (v1 , v2 ) , (v1 , v3 ) , (v1 , v4 ) ,
The vertex
(v1 , v5 ) , … …., (v1 , vn 1 ) & (v1 , vn ) .
v1
v2 v3 v4 v5 …. …. …. vn 1 vn
(n-1) vertices
(n-1) -edges
v1 can be joined by remaining (n-1) vertices to form maximum possible number of edges which is
Hence
(n-1).
(n-2)-edges
6
= 1 2 3 ... (n 3) ( n 2) ( n 1)
(n 1)
[2(1) ( n 1 1)(1)]
= 2
N
th
SN [2( A) ( N 1) D ]
[Note: Here we are using the formula for summation of A.P up to N terms : 2 ]
n(n 1)
The total number of maximum possible edges = 2 edges
n(n 1)
Hence, “the maximum possible numbers of edges in a simple graph with n-vertices are 2 ”. This
proves the theorem.
NOTE:
No edge repeated A walk in which A walk in which initial A closed walk in which
initial and final and final vertices are all the vertices are
vertices are not same. distinct except initial and
same. final vertex.
Theorem: A Graph is a tree if and only if (iff) there is one and only one path between every pair of
vertices.
A Graph is a tree There is one and only one path between every pair of vertices.
To Show: one and only one path between every pair of vertices in T.
Consider the contrary, if possible, that there are two or more than two paths between the two vertices
‘a’ and ‘b’. Illustrative example is given by-
PATH 1
PATH 2
a b
PATH 3
[Tree T, if possible]
But Since T is a Tree; hence it should not have any circuit. But here we are concluding that T has a circuit.
This is a contradiction because actually T has no circuit.
8
Therefore “ one and only one path between every pair of vertices in tree T”.
Let G= (V, E) be a graph having one and only one path between every pair of vertices.
Since there is one and only one path between every pair of vertices.
There is atleast one pair of vertices say ‘a’ and ‘b’ such that two distinct paths
between vertex ‘a’ and vertex ‘b’. This is a contradiction to our assumption that
between every pair of vertices, G has one and only one path.
Hence finally, a graph is a tree There is one and only one path between every pair of vertices.
[TRIVIAL TREE]
9
Hence the theorem is true for a tree having one vertex i.e. for n=1.
Hence the theorem is true for a tree having two vertices i.e. for n=2.
STEP 3: Suppose the theorem is true for all the trees having vertices less than n.
ek vj vj
vi vi
T1 ] T2 Tree]
[Tree T having n vertices] [Individual Tree [Individual
n1 vertices] n2 vertices]
[Having [Having
ek ]
[Disconnected graph: T-
10
Since T is a tree, then there is one and only one path between every pair of vertices. If we
ek = ( vi , v j ) then the graph T- ek will be is a disconnected graph but
delete/remove one edge
T T n n
individually both 1 and 2 are the trees having 1 vertices and 2 vertices respectively.
n1 and n2 both are less than n i.e. n1 < n and n2 < n . And n1 + n2 = n . (NOTE)
Here
Hence
e
No. of edges in tree T having n -vertices = (No. of edges in disconnected graph T- k ) + 1
T T
No. of edges in tree T having n -vertices= (No. of edges in Tree 1 ) + (no. of edges in Tree 1 ) + 1
n1 -1) + ( n2 -1) + 1
Number of edges in tree T having n -vertices =(
n1 + n2 -1)
Number of edges in tree T having n -vertices =(
n1 + n2 = n ]
Number of edges in tree T having n -vertices = ( n -1) edges [Since
Hence, number of edges in a tree T having n -vertices is exactly ( n -1) edges. This proves the theorem.
11
REMEMBER ALWAYS
Graph G
Subgraphs of G
Properties of a Subgraph:
Remember Always
GRAPH ISOMORPHISM:
G G
Two graphs 1 and 2 are called isomorphic if their graph theoretic properties are same i.e. two
graphs are called isomorphic (to each other) if there is a one to one correspondence between their
vertices and between their edges such that their incidence relationship is preserved. And it is written
G1 G2 .
as,
3 C D c b
13
4 d
G1 ] G2 ] G3 ]
[Graph [Graph [Graph
f : V (G1 ) V (G2 ) as
Define a function
[(1,2)]=(A,B)=( f (1) , f (2) ), [(2,3)]=(B,D)= ( f (2) , f (3) ), (3,4) =(D,C) =( f (3) , f (4) )
Note: If two graphs are isomorphic to each other, then the following will hold:
ROOTED TREE:
A rooted tree is a tree in which a special ("labeled") node is singled out. This node is called the "root" or
(less commonly) "eve" of the tree.
“A ROOTED TREE IS A TREE WITH A DISTINGUISHED VERTEX FROM THE OTHER VERTICES. THIS
DISTINGUISHED VERTEX IS CALLED ROOT OR EVE OF THE TREE.”
BINARY TREE:
“A binary tree is a tree data structure in which each node has at most two child nodes, usually
distinguished as "left" and "right". Nodes with children are parent nodes, and child nodes may contain
references to their parents”.
“A binary tree is defined as a tree in which there is exactly one vertex of degree two and each of the
remaining vertices is of degree one or three”.
SPANNING TREE: A spanning tree T of a connected, undirected graph G is a tree composed of all the
vertices and some (or perhaps all) of the edges of G.
“Let G= (V, E) be a connected graph. A spanning tree of a graph G is a subgraph T=(V,E’) which is a tree,
where E E ”. In other words, a tree to be spanning tree of a graph we have the following
'
requirements-