Professional Documents
Culture Documents
Graph Theory
In the above graph, V is a vertex for which it has an edge (V, V) forming a loop.
Adjacent Vertices :
In a graph, two edges are said to be adjacent, if there is a common vertex
between the two edges. Here, the adjacency of edges is maintained by the
single vertex that is connecting two edges.
Where , ‘a’ and ‘b’ are the adjacent vertices, as there is a common edge ‘ab’
between them. Vise versa ..
Compiled by...Prof.Shaziya Shaikh,TIMSCDR
Parallel Edges :
In a graph, if a pair of vertices is connected by more than one edge, then those
edges are called parallel edges.
where ,‘a’ and ‘b’ are the two vertices which are connected by two edges ‘ab’ and
‘ab’ between them. So it is called as a parallel edge.
Adjacency Matrix :
A graph is represented using square matrix and Adjacency matrix of an
undirected graph is always a symmetric matrix, i.e. an edge (i, j) implies the edge
(j, i).
3
4
5 6
2)
b c d e
f
a
i g
h by...Prof.Shaziya Shaikh,TIMSCDR
Compiled
• Connected And Disconnected Graph
Path :It is a sequence of vertices such that from each of its vertices
there is an edge to the next vertex in the sequence.
Simple Path : A path is simple if each Vertex is distinct.
Circuit : A path is Circuit in which the terminal vertex coincides with
initial vertex.
For Example consider the following graph
b) If a graph is connected and has just two vertices of odd degrees then
is has at least one Euler Path and any such path must start at one of the
odd vertices and end at other odd vertex.
2) D
B
C
Euler Path = C,B,A,C,D
a) If a graph has any vertex of ODD Degree then it cannot have Euler
Circuit.
C
D S
2) D
B
C
Euler Circuit = C,B,A,C,E,D,C
A E
C E
A G
D H
2)
A B
C
G D
E
F
Compiled by...Prof.Shaziya Shaikh,TIMSCDR
• Hamilton (Hamiltonian) Path And Circuit
Hamilton Path :
A Hamilton Path is a path that visits every vertex exactly once but it
does not have to use every edge of G.
For e.g.
b
a
h e
d f g
c c
h e
d f g
c i
i d
b h j
g f
a
e
2)