Applications of Graph Theory in Computer Sciences

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

APPLICATIONS OF GRAPH

THEORY IN COMPUTER
SCIENCES
GRAPHS AND NETWORKS-MATH F243
GROUP-1
BARKHA TAORI 2013B4A1492H
BHARADWAJ NARNE 2013B4A2674H
SASHANK KARANAM 2013B4A1524H
INTRODUCTION:

 Graph theory is the study of graphs, which are mathematical structures used to
model pairwise relations between objects .Graph theory is becoming increasingly
significant as it is applied to other areas of mathematics, science and technology.

We will be dealing with the applications of graph theory in the field of computer
sciences with the development of new algorithms and new theorems that can be
used in tremendous applications.
MAJOR APPLICATIONS:

 Graph theory in operational research

 Graph colouring

 Scheduling of jobs , air crafts and time-tables

 Structural methods for finger print classification

 Automatic channel allocation fro Local Area Networks


IMPORTANT GRAPH THEORETIC
LANGUAGES:
1. SPANTREE 6. IGTS

2. GTPL 7. GEA

3. GASP 8. AMBIT

4. HINT 9.GIRL

5.GRASPE 10.FGRAAL
ALGORITHMS:
 Shortest path algorithm

 Minimum spanning tree algorithm

 Planar graph algorithm

 Algorithm for cyclic graphs

 Adjacency matrices

 Connectedness of graphs

 Algorithms for searching an element in a data structure


DIJKSTRA’S ALGORITHM :
This algorithm finds the shortest path from a source vertex to all other vertices in a weighted directed graph without
negative edge weights.
oS – set of the shortest distances calculated
oV – set of vertices
oD – array of estimated shortest distances
oWhile S! = V do the following:
1) Find the vertex (not is S) that corresponds to the
minimal estimate of shortest distances in array D.
2) Add this vertex, vi into S.
3) Re compute all estimates based on edges emanating
from v. In particular, for each edge from v, compute
D[i]+wij. If this quantity is less than D[j], then set
D[j] = D[i]+wij.
 
This algorithm is easiest to follow in a tabular
format.
The adjacency matrix of an example graph is
included below. Let a be the source vertex.
 
a b c d e
a 0 10 inf inf 3
b inf 0 8 2 inf
c 2 3 0 4 inf
d 5 inf 4 0 inf
e inf 12 16 13 0
 
Here is the algorithm:  

Estimates b c d e
Add to Set
a 10 inf inf 3
e 10 19 16 3
b 10 18 12 3
d 10 16 12 3
Path Reconstruction in Dijkstra's Algorithm
 
 
 
Given the history of the values in the distance estimate
array, we can trace the shortest path. In the example below,
consider determining the shortest distance from a to c:
 
Estimates b c d e
Add to Set
a 10 inf inf 3
e 10 19 16 3
b 10 18 12 3
d 10 16 12 3
 
PRIM’S ALGORITHM FOR MINIMAL
SPANNING TREE :
The tree which connects all the nodes together is called a Spanning tree

Consider a tree ‘T’ for which the Spanning tree has to be found

 Step 1 : Select any node to be the first node of T.

 Step 2 : Consider the arcs which connect nodes in T to nodes outside T. Pick
the one with minimum weight. Add this arc and the extra node to T. (If there are
two or more arcs of minimum weight, choose any one of them.)

 Step 3 : Repeat Step 2 until T contains every node of the graph.


PLANAR GRAPH AND EULER’S FORMULA :
• Planar Graph :-
A planar graph is one which can be represented so that its
edges intersect only at vertices.

• Euler was the one who discovered the planar graphs and he also
observed the relation between the number of nodes ‘n’ , number of
arcs(edges) ‘a’ , number of regions ‘r’ as
n–a+r=2
CYCLE DETECTION ALGORITHM :

• For any function ƒ that maps a finite set S to itself, and any
initial value x0 in S, the sequence of iterated function values
must eventually use the same value twice: there must be
some i ≠j such that xi = xj.
• x0, x1 = f (x0), x2 = f (x1),......, xi = f(x i-1),.......
• Let S be any finite set, ƒ be any function from S to itself, and x0
be any element of S. For any i > 0, let xi = ƒ(xi−1). Let μ be the
smallest index such that the value xμ reappears infinitely often
within the sequence of values xi, and let λ (the loop length) be the
smallest positive integer such that xμ = xλ+μ. The cycle detection
problem is the task of finding λ and μ.
• For example, let a function ƒ that maps the set S =
{0,1,2,3,4,5,6,7,8} to itself. If one starts from x0 = 2 and
repeatedly applies ƒ, one sees the sequence of values 2, 0, 6, 3, 1,
6, 3, 1, 6, 3, 1, ....
CONCLUSION :

• The main aim of this report is to present the importance of graph theoretical
ideas in various areas of computer applications.
• Graph theory has its sprawling applications in various fields. It is now
viewed as one of the subject of interest that is used for many of real time
problem solving.
• As a theory of graphs , it is showing its simplicity to represent each real time
problem using a visual graph to find the solution.
THANK YOU..!!

You might also like