SlideShare a Scribd company logo
Dijkstra’s Shortest Path Algorithm
Presented By:
Tamzida Azad
ID: …………..
Section: …………..
Presented To:
Dr. Selina Sharmin
Associate Professor
Department of Computer Science & Engineering
Table of Contents
2
Serial Topic Slide Number
1 Creator of Dijkstra Algorithm 3
2 What is Dijkstra’s Algorithm? 4
4 Dijkstra’s Algorithm 5
5 Pseudo Code 6
6 How Dijkstra’s Algorithm Works? 7
7 Example 8-13
8 Example 14-17
9 Dijkstra’s Algorithm Complexity 20
10 Application of Dijkstra’s Algorithm 21-23
11 Different Shortest Path Algorithm’s Complexity Analysis 24
12 Advantage & Disadvantage of Dijkstra’s Algorithm 25
13 Q/A session 26
Creator of Dijkstra’s Algorithm
 Designed by Dutch physicist Edsger Wybe Dijkstra in 1956
 Received Turing award in 1972 for fundamental contributions to programming
as a high, intellectual challenge
 The Edsger W. Dijkstra Paper Prize in Distributed Computing is given for outstanding papers
on the principles of distributed computing
 Famous Quote:
“Computer Science is no more about computers than astronomy is about telescopes."
3
Edsger Wybe Dijkstra
Why Dijkstra’s Algorithm?
 Used to solve the single source shortest path problem
 Finds the shortest distance between two vertices on a graph
 Creates tree of shortest paths from starting source vertex to all other points in the graph
 Works on both directed and undirected graphs
 Differs from minimum spanning tree
 Similar to BFS
 Gives optimal solution using greedy method
4
Dijkstra’s Algorithm
 Approach: Greedy
 Input: Weighted graph G={E,V} and source vertex v∈V, such that all edge weights are
nonnegative
 Output: Lengths of shortest paths (or the shortest paths themselves) from a given source
vertex v∈V to all other vertices
5
6
Dijkstra’s Algorithm Pseudo Code
7
How Dijkstra’s Algorithm Works
Example of Dijkstra’s Algorithm
8
Example Continues…
9
Example Continues…
10
Example Continues…
11
Example Continues…
12
Example Continues…
13
Example Continues…
14
Example Continues…
15
Example Continues…
16
Example Continues…
17
Dijkstra's Algorithm Complexity
 Time Complexity: O(𝑉2
)
With min priority queue time complexity is O(V + E Log V)
E = Number of edges and
V = Number of vertices
 Space Complexity: O(V)
18
19
Digital Mapping Services in Google Maps
 Used to find the minimum distance between two
locations along the path.
 Example:
Finding shortest route between Uttara to
Mohammadpur using Google Map.
20
Social Networking Applications
 Apps suggesting friends to connect
 Uses the shortest path between users measured
through handshakes or connections among them.
21
Telephone Network
 Used in network bandwidth measurement
 If a city is a graph, the vertices represent the
switching stations, and the edges represent the
transmission lines.
22
IP routing
 Finds the best path between the source and the
destination router
 Used to update forwarding table
 Provides the shortest cost path from the source
router to other routers
23
24
Comparing Complexity of Different Shortest Path Algorithm
Advantage and Disadvantage of Dijkstra’s Algorithm
Advantage
 O(𝑛2
) so efficient enough to use for relatively
large problems
 Used enormously in Google Map, IP routing,
robotic path detection, file server etc
 Low complexity, optimal and uniform
 Almost linear and works for both directed &
undirected graph.
Disadvantage
 Consume time by doing blind search
 Can not handle negative edges
 Leads to acyclic graphs
25
Any Question
27

More Related Content

PPTX
Dijkstra's algorithm
PDF
Shortest path algorithms
PPTX
Dijkstra’s algorithm
PPTX
Dijkstra's Algorithm
PPT
Radio transmitters
PDF
Dijkstra's Algorithm
PPTX
Radix sort presentation
PPTX
Dijkstra’S Algorithm
Dijkstra's algorithm
Shortest path algorithms
Dijkstra’s algorithm
Dijkstra's Algorithm
Radio transmitters
Dijkstra's Algorithm
Radix sort presentation
Dijkstra’S Algorithm

What's hot (20)

PPTX
Dijkstra's algorithm presentation
PPTX
Dijkstra algorithm a dynammic programming approach
PPTX
Dijkstra s algorithm
PDF
Shortest Path in Graph
PPTX
Shortest path algorithm
PPTX
Dijkstra
PPTX
Graph in data structure
PPTX
All pair shortest path
PPT
Graph theory presentation
PPTX
Presentation on Breadth First Search (BFS)
PPTX
Bfs and Dfs
PPT
Tsp branch and bound
PPTX
Topological Sorting
PPT
Iterative deepening search
PPTX
Shortest path problem
PPTX
Bellman ford algorithm
PPTX
Network flows
PPT
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
PPT
PPT
Branch and bound
Dijkstra's algorithm presentation
Dijkstra algorithm a dynammic programming approach
Dijkstra s algorithm
Shortest Path in Graph
Shortest path algorithm
Dijkstra
Graph in data structure
All pair shortest path
Graph theory presentation
Presentation on Breadth First Search (BFS)
Bfs and Dfs
Tsp branch and bound
Topological Sorting
Iterative deepening search
Shortest path problem
Bellman ford algorithm
Network flows
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Branch and bound
Ad

Similar to Dijkstra's Algorithm (20)

PPTX
Algo labpresentation a_group
PPTX
Dijkastra’s algorithm
PPTX
Dijkstras-Algorithm-Finding-the-Shortest-Path.pptx
PPTX
SEMINAR ON SHORTEST PATH ALGORITHMS.pptx
PDF
Flight-schedule using Dijkstra's algorithm with comparison of routes findings
PPTX
Spanning Tree in data structure and .pptx
PPT
barrera.ppt
PPT
barrera.ppt
PPTX
dms slide discrete mathematics sem 2 engineering
PDF
Implementation of dijsktra’s algorithm in parallel
PPTX
Shortest-Path Problems - Graph Theory in Computer Applications
PPTX
Dijkstra & flooding ppt(Routing algorithm)
PDF
AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...
PPT
dijkstra algo.ppt
PDF
All pairs shortest path algorithm
PPTX
Dijkstra’s Algorithm and Prim’s Algorithm in Graph Theory and Combinatorics
PPTX
Dijkstra’s Algorithm and Prim’s Algorithm in Graph Theory and Combinatorics
PDF
Comparative Analysis of Algorithms for Single Source Shortest Path Problem
PPTX
Deixtras Algorithm.pptxdjjdjdjdjddddddddddddddd
PDF
Cnetwork
Algo labpresentation a_group
Dijkastra’s algorithm
Dijkstras-Algorithm-Finding-the-Shortest-Path.pptx
SEMINAR ON SHORTEST PATH ALGORITHMS.pptx
Flight-schedule using Dijkstra's algorithm with comparison of routes findings
Spanning Tree in data structure and .pptx
barrera.ppt
barrera.ppt
dms slide discrete mathematics sem 2 engineering
Implementation of dijsktra’s algorithm in parallel
Shortest-Path Problems - Graph Theory in Computer Applications
Dijkstra & flooding ppt(Routing algorithm)
AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...
dijkstra algo.ppt
All pairs shortest path algorithm
Dijkstra’s Algorithm and Prim’s Algorithm in Graph Theory and Combinatorics
Dijkstra’s Algorithm and Prim’s Algorithm in Graph Theory and Combinatorics
Comparative Analysis of Algorithms for Single Source Shortest Path Problem
Deixtras Algorithm.pptxdjjdjdjdjddddddddddddddd
Cnetwork
Ad

Recently uploaded (20)

PDF
Mega Projects Data Mega Projects Data
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPTX
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
PDF
Business Analytics and business intelligence.pdf
PPTX
Modelling in Business Intelligence , information system
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PDF
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PDF
Lecture1 pattern recognition............
PDF
Data Engineering Interview Questions & Answers Batch Processing (Spark, Hadoo...
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
PPTX
A Complete Guide to Streamlining Business Processes
PPT
Predictive modeling basics in data cleaning process
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PDF
Introduction to the R Programming Language
Mega Projects Data Mega Projects Data
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Galatica Smart Energy Infrastructure Startup Pitch Deck
(Ali Hamza) Roll No: (F24-BSCS-1103).pptx
Business Analytics and business intelligence.pdf
Modelling in Business Intelligence , information system
Qualitative Qantitative and Mixed Methods.pptx
Acceptance and paychological effects of mandatory extra coach I classes.pptx
REAL ILLUMINATI AGENT IN KAMPALA UGANDA CALL ON+256765750853/0705037305
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Lecture1 pattern recognition............
Data Engineering Interview Questions & Answers Batch Processing (Spark, Hadoo...
Introduction-to-Cloud-ComputingFinal.pptx
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Capcut Pro Crack For PC Latest Version {Fully Unlocked 2025}
A Complete Guide to Streamlining Business Processes
Predictive modeling basics in data cleaning process
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Introduction to the R Programming Language

Dijkstra's Algorithm

  • 1. Dijkstra’s Shortest Path Algorithm Presented By: Tamzida Azad ID: ………….. Section: ………….. Presented To: Dr. Selina Sharmin Associate Professor Department of Computer Science & Engineering
  • 2. Table of Contents 2 Serial Topic Slide Number 1 Creator of Dijkstra Algorithm 3 2 What is Dijkstra’s Algorithm? 4 4 Dijkstra’s Algorithm 5 5 Pseudo Code 6 6 How Dijkstra’s Algorithm Works? 7 7 Example 8-13 8 Example 14-17 9 Dijkstra’s Algorithm Complexity 20 10 Application of Dijkstra’s Algorithm 21-23 11 Different Shortest Path Algorithm’s Complexity Analysis 24 12 Advantage & Disadvantage of Dijkstra’s Algorithm 25 13 Q/A session 26
  • 3. Creator of Dijkstra’s Algorithm  Designed by Dutch physicist Edsger Wybe Dijkstra in 1956  Received Turing award in 1972 for fundamental contributions to programming as a high, intellectual challenge  The Edsger W. Dijkstra Paper Prize in Distributed Computing is given for outstanding papers on the principles of distributed computing  Famous Quote: “Computer Science is no more about computers than astronomy is about telescopes." 3 Edsger Wybe Dijkstra
  • 4. Why Dijkstra’s Algorithm?  Used to solve the single source shortest path problem  Finds the shortest distance between two vertices on a graph  Creates tree of shortest paths from starting source vertex to all other points in the graph  Works on both directed and undirected graphs  Differs from minimum spanning tree  Similar to BFS  Gives optimal solution using greedy method 4
  • 5. Dijkstra’s Algorithm  Approach: Greedy  Input: Weighted graph G={E,V} and source vertex v∈V, such that all edge weights are nonnegative  Output: Lengths of shortest paths (or the shortest paths themselves) from a given source vertex v∈V to all other vertices 5
  • 18. Dijkstra's Algorithm Complexity  Time Complexity: O(𝑉2 ) With min priority queue time complexity is O(V + E Log V) E = Number of edges and V = Number of vertices  Space Complexity: O(V) 18
  • 19. 19
  • 20. Digital Mapping Services in Google Maps  Used to find the minimum distance between two locations along the path.  Example: Finding shortest route between Uttara to Mohammadpur using Google Map. 20
  • 21. Social Networking Applications  Apps suggesting friends to connect  Uses the shortest path between users measured through handshakes or connections among them. 21
  • 22. Telephone Network  Used in network bandwidth measurement  If a city is a graph, the vertices represent the switching stations, and the edges represent the transmission lines. 22
  • 23. IP routing  Finds the best path between the source and the destination router  Used to update forwarding table  Provides the shortest cost path from the source router to other routers 23
  • 24. 24 Comparing Complexity of Different Shortest Path Algorithm
  • 25. Advantage and Disadvantage of Dijkstra’s Algorithm Advantage  O(𝑛2 ) so efficient enough to use for relatively large problems  Used enormously in Google Map, IP routing, robotic path detection, file server etc  Low complexity, optimal and uniform  Almost linear and works for both directed & undirected graph. Disadvantage  Consume time by doing blind search  Can not handle negative edges  Leads to acyclic graphs 25
  • 27. 27