You are on page 1of 9

OPTIMIZING TSP USING

A Seminar on

HADOOP A Experimental Work on Hadoop


Framework

GUIDED BY
RAJESH BABU BY
LECTURER , G . BAKTAVATCHALAM
PSG COLLEGE OF ( 08MW03 )
TECHNOLOGY PSG COLLEGE OF
TECHNOLOGY
CONTENTS
• TSP
• Problem Statement
• Hadoop
• How it Works
• Algorithm
• Conclusion

PSG College Of
TSP
• In this traveling-salesman problem, a salesman visit n cities(to make
a tour) so that he visiting each city and exactly once and finishing
at the city he starts from. Here we make the tour whose total cost
is minimum.
• Here we construct a graph and represent the cities as Nodes & costs
as Edges between the 2 nodes.

A B
A B C D
A 0 1 1 2
B 1 0 2 1
C D C 1 2 0 1
D 2 1 1 0

Network Management PSG College Of


PROBLEM STATEMENT
• If the number of cities get increased then the optimal cost of
shortest path is computed in very long duration. Because
normal shortest path takes polynomial time to complete.
• So if we run this algorithm in a single system the processing
time is very long.
• Also if we take the tour with different source node then it is
very critical to get all shortest paths.
• To optimize this issue we use Distributed Network Framework
to parallelize the TSP tours with all combinations of nodes.

Network Management PSG College Of


HADOOP
• Hadoop is latest Distributed Computing Framework to
parallelizing the given task with the help of Map/Reduce
Paradigm.
• Hadoop contains DFS, Monitor, Tracker, Resource Manager,
Task Manager, …
• So we use this framework to optimize the processing time of
our TSP problem.

Network Management PSG College Of


HOW IT WORKS
• First we need modify our algorithm into Map/Reduce
paradigm job.
• In Each Map, we compute each node as a source node and it
computes shortest paths for all other remaining nodes.
• In Hadoop all Maps are run in parallel , so we parallelize the
TSP computing for each node as source.
• In the Reduce part, we just collect the results and do some
analyses like which city is very long from a given source
node and which city is short and so on.

Network Management PSG College Of


ALGORITHM
• Here we use Dijkstra’s Shortest Path Algorithm to find an
optimal route between the source and destination with low
cost.
• DIJKSTRA(G, w, s)
 1 INITIALIZE-SINGLE-SOURCE(G, s)
 2 S←Ø
 3 Q ← V[G] & D ←C[1,q] such that q in Q
 4 while Q ≠ Ø
 5 do u ← EXTRACT-MIN(Q) in V-S
 6 S ← S U {u}
 7 for each vertex v in V-S
 8 D ← D U min{D[v],D[v]+C[u,v]}

Network Management PSG College Of


CONCLUSION
• So we use the previous algorithm to compute the shortest path
between a given source node to all other node.
• Here we process more than 2 computations simultaneously
with the help of Map/Reduce paradigm.

Network Management PSG College Of


THANK YOU

Network Management PSG College Of