![Page 1: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/1.jpg)
Implementation of Dijsktra’s Algorithm
in Parallel Meenakshi Muthuraman #5009 7719
Priyanka Kulkarni #5009 8043
![Page 2: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/2.jpg)
Single Source Shortest Path Problem
• The Problem of finding the shortest path from a source vertex S to all vertices in the graph • Weighted graph G = (V,E)
![Page 3: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/3.jpg)
Dijkstra’s Algorithm • Solution to single source shortest path algorithm in graph theory
o Both directed and undirected graphs o All edges must have non-negative weights o Graph must be connected o Dijkstra’s algorithm runs in O(E*lg|V|)
![Page 4: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/4.jpg)
Pseudo code of Dijkstra’s Algorithm
![Page 5: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/5.jpg)
0
5
10
15
20
25
30
100 1000 5000 10000 15000 20000 25000 27000
Serial Execution Time
100 1000 5000 10000 15000 20000 25000 27000 Execution time 0 0.02 0.74 3.3 7.94 13.58 21.64 25.16
Serial Execution time
![Page 6: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/6.jpg)
0
2
4
6
8
10
12
14
16
18
20
100 1000 5000 10000 15000 20000 25000
MPI ExecutionTime as the Number of Nodes increases 1node*4tasks per node 2nodes*4tasks per node 3nodes*4tasks per node
![Page 7: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/7.jpg)
0
1
2
3
4
5
6
7
8
100 1000 5000 10000 15000 20000 25000
EXEC
UTION TIM
E MPI Execution Time as The Number of Tasks per node is Increased
3nodes*4tasks per node 3nodes*8tasks per node
![Page 8: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/8.jpg)
0
2
4
6
8
10
12
14
16
18
100 1000 5000 10000 15000 20000 25000
SpeedUP MPI 2*4
![Page 9: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/9.jpg)
100 1000
5000 10000
15000 20000
25000
168 244
528
1100
1346
1642
168 333
629 642
1368
1652
Execution Time for Hadoop 2nodes*4tasks per node 3nodes*4tasks per node
![Page 10: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/10.jpg)
Conclusions and Deductions • Generating the random graphs was a challenge • MPI outperformed the serial and Hadoop • MPI is the winner !!
![Page 11: Implementation of dijsktra’s algorithm in parallel](https://reader031.vdocument.in/reader031/viewer/2022031823/55a96e3d1a28ab26508b46a1/html5/thumbnails/11.jpg)
Thank You
Any Questions?