Professional Documents
Culture Documents
K. Maheswaran MCA, M.Phil., M.SC, (Maths), SET, PH.D
K. Maheswaran MCA, M.Phil., M.SC, (Maths), SET, PH.D
D
Assistant Professor in Computer Science
School of Computing Sciences
St.Joseph’s College(Autonomous)
Tiruchirappalli- 620 002
Compiled by Prof.K.Maheswaran
theory
MCA, MPhil,MSc(Maths),SET
2
Graph theory
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
3
.v 6 v
GRAPH THEORY
DEFINITIONS
Self loop
Parallel edges
Incident
Adjacent
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
Degree of the vertex
Regular graph
Simple graph
Null graph
Isolated graph
Pendent vertex
Serial edges
4
DEFINITIONS
Self loop
Adjacent
Serial edges
Parallel edges
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
Degree of the vertex
Regular graph
Simple graph
Null graph
Isolated graph
Pendent vertex
Incident
5
Basic Definitions of Graph Theory
Self Loop:
An edge having both of its end vertices are same, such
a edge is called “Self Loop”.
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
Adjacent:
Two Non-Parallel are said to be adjacent if they are
incident on a common vertex.
Two vertices are said to be adjacent if their end vertices
are same edge.
Serial Edges:
Two adjacent edges are said to be serial if there is a common
vertex of degree 2. 6
Parallel Edges:
Two edges are said to be parallel if their end vertices are
same
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
The number of edges incident on a vertex v is called the
degree of the vertex.(Here self loop is counted twice). It is
usually denoted by d(v).
Regular Graph:
A Graph in which all vertices are equal degree is known as
Regular Graph.
Simple Graph:
A graph that has been neither self loop nor parallel edges are 7
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
vertex”.
Pendant vertex:
The vertex with degree one is called “Pendant
vertex”.
Incident:
When a vertex Vi is an end vertex of some edge (ej)
then Vi and ej are said to be incident . 8
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
9
RESULT:
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
10
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
11
ISOMORPHIC
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
12
ISOMORPHIC
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
13
IS IT ISOMORPHIC?
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
14
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
15
SUB GRAPHS
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
16
OBSERVATIONS
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
17
WALK
TERMINAL VERTICES
In a walk beginning and end vertices are called “Terminal
Vertices”.
Closed walk:
A walk is an Closed walk in which Starting and end vertices
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
are same.
Open Walk
A walk is an Openwalk in which Starting and end vertices are
different.
18
Path:
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
Circuit
- A circuit is a closed walk in which no vertex appears
more than once. (except initial and end vertex)
- Circuit is also referred as ‘cycle’ .
Length of the Path:
The number of edges in a path is called Length of the
Path
19
CONNECTED GRAPH:
DISCONNECTED GRAPH:
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
A Graph G is said to be disconnected graph if there is no
path b/w at least two vertices
COMPONENT:
20
EULER GRAPHS
Euler line:
A closed walk running through every edge of G
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
Euler graph:
A graph that consist of an Euler line is called “Euler
graph”.
Note :
Euler graph do not have any isolated vertices.
21
Euler graph is always connected.
KONIGBERG BRIDGE
(BEST EXAMPLE OF GRAPH THEORY)
It’ s
a long standing problem solved by
Leonhard Euler in 1736
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
22
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
Euler represents this situation by using graph as shown in the
figure.
23
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
The vertices represents the land areas and edges represents
the bridges. Here we find that nor all it’s vertices of even
degree and hence it’s not an Euler graph. Thus, it is not
possible to walk over each bridge exactly once and return to
the starting point.
This problem is an same as the problem of drawing
figure without lifting the pen from the paper and 24
without retracing the line.
UNICURSAL LINE
An open walk covering all the edges without
retracing any edge(exactly once) is known as
“Unicursal line”.(open Euler line)
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
A graph that has a unicursal line will be called
“Unicursal graph”.
Unicursal line
25
Note :
By adding an edge b/w the initial
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
and final vertices of a unicursal line we
will get a EULER LINE.
Thus a connected graph is
unicursal iff exactly two vertices of odd
degree.
26
OPERATIONS ON A GRAPH
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
1. UNION
2. INTERSECTION
3. RING SUM
4. DECOMPOSITION
5. DELETION
6. FUSION
27
UNION OF TWO GRAPHS.
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
If G3 = (V3, E3) Where V3 = V1 U V2 and E
3 = E1 U E2
Then G3 = G1 U G2
28
INTERSECTION OF TWO GRAPHS
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
If G3 = (V3, E3) Where V3 = V1 ∩ V2 and E
3 = E 1 ∩ E2
Then G3 = G1 ∩ G2
29
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
30
RING SUM
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
31
DECOMPOSITION
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
32
DELETION
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
33
FUSION:
NOTE:
Union , Intersection and Ring sum are Commutative.
i.e G1 U G2 = G2 U G1
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
G1 G2 = G2 G1
if G1 and G2 are edge disjoint, then
I. G1 ∩ G2 is null graph.
II. G1 G 2 = G 1 U G 2
34
ARBITRARILY TRACEABLE GRAPH FROM VERTEX ‘V’
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
that has not already been traversed, then the graph is
said to be “Arbitrarily traceable graph from v ”.
35
ARBITRARILY TRACEABLE GRAPH FROM VERTEX ‘V’ (CONTD…..)
MCA, MPhil,MSc(Maths),SET
Compiled by Prof.K.Maheswaran
moving along any edge that has not already been
traversed.
36
Compiled by Prof.K.Maheswaran
MCA, MPhil,MSc(Maths),SET
Note:
• An Euler graph G arbitrarily traceable from vertex ‘v’ in G Iff
every circuit in G Contains ‘v’
37
• Hamiltonian circuit in a connected graph G is
defined as a closed walk that traverses every vertex
of G exactly once, except the starting vertex at
which the walk terminates.