SlideShare a Scribd company logo
4
Most read
5
Most read
20
Most read
Dijkstra's algorithm
1
Single-Source Shortest Path Problem
Single-Source Shortest Path Problem - The problem of finding shortest
paths from a source vertex v to all other vertices in the graph.
2
Dijkstra's algorithm
Dijkstra's algorithm - is a solution to the single-source
shortest path problem in graph theory.
Works on both directed and undirected graphs. However,
all edges must have nonnegative weights.
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
3
Dijkstra's algorithm - Pseudocode
4
Dijkstra Animated Example-1
5
Dijkstra Animated Example-1
6
Dijkstra Animated Example-1
7
Dijkstra Animated Example-1
8
Dijkstra Animated Example-1
9
Dijkstra Animated Example-1
10
Dijkstra Animated Example-1
11
Dijkstra Animated Example-2
12
Dijkstra Animated Example-2
13
Dijkstra Animated Example-2
14
Dijkstra Animated Example-2
15
Dijkstra Animated Example-2
16
Dijkstra Animated Example-2
17
Dijkstra Animated Example-2
18
Dijkstra Animated Example-2
19
Dijkstra Animated Example-2
Shortest Path from A to H,
A to C, C to D, D to E, E to G, G to F, F to H
20
End
21

More Related Content

What's hot (20)

PPTX
Hamiltonian path
Arindam Ghosh
 
PPTX
PRIM'S ALGORITHM
garishma bhatia
 
PDF
Mining Frequent Patterns And Association Rules
Rashmi Bhat
 
PPTX
Dijkstra's Algorithm
Rashik Ishrak Nahian
 
PPTX
Take-Grant Protection Model
Raj Kumar Ranabhat
 
PPTX
Distributed file system
Anamika Singh
 
PPTX
Dijkstra's Algorithm
Tamzida_Azad
 
PPTX
Dijkstra Searching Algorithms Shortest.pptx
sandeep54552
 
PPTX
Greedy algorithms
sandeep54552
 
PPTX
Cryptography - Block cipher & stream cipher
Niloy Biswas
 
PPTX
Minimum spanning Tree
Narendra Singh Patel
 
PDF
String matching, naive,
Amit Kumar Rathi
 
PPTX
Kruskal Algorithm
Bhavik Vashi
 
PPTX
Dijkstra s algorithm
mansab MIRZA
 
PPTX
Dijkstra's algorithm presentation
Subid Biswas
 
PPT
Minimum spanning tree
Hinal Lunagariya
 
PPTX
RSA algorithm
Arpana shree
 
PDF
Computer Security Lecture 2: Classical Encryption Techniques 1
Mohamed Loey
 
PDF
Bellman ford algorithm
A. S. M. Shafi
 
PPTX
Public Key Cryptosystem
Devakumar Kp
 
Hamiltonian path
Arindam Ghosh
 
PRIM'S ALGORITHM
garishma bhatia
 
Mining Frequent Patterns And Association Rules
Rashmi Bhat
 
Dijkstra's Algorithm
Rashik Ishrak Nahian
 
Take-Grant Protection Model
Raj Kumar Ranabhat
 
Distributed file system
Anamika Singh
 
Dijkstra's Algorithm
Tamzida_Azad
 
Dijkstra Searching Algorithms Shortest.pptx
sandeep54552
 
Greedy algorithms
sandeep54552
 
Cryptography - Block cipher & stream cipher
Niloy Biswas
 
Minimum spanning Tree
Narendra Singh Patel
 
String matching, naive,
Amit Kumar Rathi
 
Kruskal Algorithm
Bhavik Vashi
 
Dijkstra s algorithm
mansab MIRZA
 
Dijkstra's algorithm presentation
Subid Biswas
 
Minimum spanning tree
Hinal Lunagariya
 
RSA algorithm
Arpana shree
 
Computer Security Lecture 2: Classical Encryption Techniques 1
Mohamed Loey
 
Bellman ford algorithm
A. S. M. Shafi
 
Public Key Cryptosystem
Devakumar Kp
 

Similar to Dijkstra's algorithm (20)

PPT
dijkstra algo.ppt
Santhosh Krishna
 
PPT
Dijkstra's algorithm for computer science
ajmalnajath4
 
PPTX
DAA_Presentation - Copy.pptx
AndrewJohnson866415
 
PPTX
SEMINAR ON SHORTEST PATH ALGORITHMS.pptx
bharatherltech
 
PPT
Single source stortest path bellman ford and dijkstra
Roshan Tailor
 
PPTX
Single source Shortest path algorithm with example
VINITACHAUHAN21
 
PDF
04 greedyalgorithmsii
LENIN Quintero
 
PPT
chapter24.ppt
Tareq Hasan
 
PPT
GraphAlgorithms.pptsfjaaaaaaaaaaaaaaaaaaa
robozenbd
 
PDF
Chap10 slides
HJ DS
 
PDF
04 greedyalgorithmsii 2x2
MuradAmn
 
PPT
Shortest path
Ruchika Sinha
 
PDF
All pairs shortest path algorithm
Srikrishnan Suresh
 
PPT
Dijkstra c
shrikant00786
 
PPT
Dijkstra algorithm ds 57612334t4t44.ppt
ssuser7b9bda1
 
PPT
Dijkstra Shortest Path Algorithm in Network.ppt
RAJASEKARAN G
 
PDF
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
DKTaxation
 
PPT
barrera.ppt
MahinoorMahi1
 
PPT
barrera.ppt
gopikahari7
 
PPTX
Data structure and algorithm
sakthibalabalamuruga
 
dijkstra algo.ppt
Santhosh Krishna
 
Dijkstra's algorithm for computer science
ajmalnajath4
 
DAA_Presentation - Copy.pptx
AndrewJohnson866415
 
SEMINAR ON SHORTEST PATH ALGORITHMS.pptx
bharatherltech
 
Single source stortest path bellman ford and dijkstra
Roshan Tailor
 
Single source Shortest path algorithm with example
VINITACHAUHAN21
 
04 greedyalgorithmsii
LENIN Quintero
 
chapter24.ppt
Tareq Hasan
 
GraphAlgorithms.pptsfjaaaaaaaaaaaaaaaaaaa
robozenbd
 
Chap10 slides
HJ DS
 
04 greedyalgorithmsii 2x2
MuradAmn
 
Shortest path
Ruchika Sinha
 
All pairs shortest path algorithm
Srikrishnan Suresh
 
Dijkstra c
shrikant00786
 
Dijkstra algorithm ds 57612334t4t44.ppt
ssuser7b9bda1
 
Dijkstra Shortest Path Algorithm in Network.ppt
RAJASEKARAN G
 
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
DKTaxation
 
barrera.ppt
MahinoorMahi1
 
barrera.ppt
gopikahari7
 
Data structure and algorithm
sakthibalabalamuruga
 
Ad

More from Anaya Zafar (20)

PPTX
data structures and its importance
Anaya Zafar
 
PPTX
heap sort
Anaya Zafar
 
PPTX
Lec 2 algorithms efficiency complexity
Anaya Zafar
 
PPT
Link list part 2
Anaya Zafar
 
PPT
Link list part 1
Anaya Zafar
 
PDF
The miracle-morning
Anaya Zafar
 
DOCX
How to write a meeting agenda?
Anaya Zafar
 
PPTX
How we achieve our goals
Anaya Zafar
 
DOCX
Fiber optics
Anaya Zafar
 
PPTX
3 d technology
Anaya Zafar
 
PDF
Ch 22 question solution of fundamental of physics 8th edition by HRW
Anaya Zafar
 
PDF
Ch 21 question solution of fundamental of physics 8th edition by HRW
Anaya Zafar
 
PDF
Definition of capacitance
Anaya Zafar
 
PDF
Chapter 24-capacitance
Anaya Zafar
 
PDF
Capacitance and dielectrics
Anaya Zafar
 
PDF
20 electric current resistance ohms law
Anaya Zafar
 
PDF
Voltage, current, resistance, and ohm's law
Anaya Zafar
 
DOC
Role of women in development
Anaya Zafar
 
PDF
Application of Gauss's law
Anaya Zafar
 
PDF
Why we need Gaussian surface in Gauss's law
Anaya Zafar
 
data structures and its importance
Anaya Zafar
 
heap sort
Anaya Zafar
 
Lec 2 algorithms efficiency complexity
Anaya Zafar
 
Link list part 2
Anaya Zafar
 
Link list part 1
Anaya Zafar
 
The miracle-morning
Anaya Zafar
 
How to write a meeting agenda?
Anaya Zafar
 
How we achieve our goals
Anaya Zafar
 
Fiber optics
Anaya Zafar
 
3 d technology
Anaya Zafar
 
Ch 22 question solution of fundamental of physics 8th edition by HRW
Anaya Zafar
 
Ch 21 question solution of fundamental of physics 8th edition by HRW
Anaya Zafar
 
Definition of capacitance
Anaya Zafar
 
Chapter 24-capacitance
Anaya Zafar
 
Capacitance and dielectrics
Anaya Zafar
 
20 electric current resistance ohms law
Anaya Zafar
 
Voltage, current, resistance, and ohm's law
Anaya Zafar
 
Role of women in development
Anaya Zafar
 
Application of Gauss's law
Anaya Zafar
 
Why we need Gaussian surface in Gauss's law
Anaya Zafar
 
Ad

Recently uploaded (20)

PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Dimensions of Societal Planning in Commonism
StefanMz
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 

Dijkstra's algorithm