SlideShare a Scribd company logo
12
Most read
15
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

PPTX
Dijkstra's Algorithm
PDF
Shortest path algorithms
PPTX
Dijkstra’S Algorithm
PDF
Dijkstra's Algorithm
PPTX
Dijkstra's algorithm
PDF
Shortest Path in Graph
PPTX
Dijkstra’s algorithm
PPT
SINGLE-SOURCE SHORTEST PATHS
Dijkstra's Algorithm
Shortest path algorithms
Dijkstra’S Algorithm
Dijkstra's Algorithm
Dijkstra's algorithm
Shortest Path in Graph
Dijkstra’s algorithm
SINGLE-SOURCE SHORTEST PATHS

What's hot (20)

PPTX
Dijkstra's Algorithm
PPTX
Dijkstra's algorithm presentation
PPTX
Bellman ford algorithm
PPTX
Bellman ford Algorithm
PPT
Bellman Ford's Algorithm
PPTX
Shortest path algorithm
PDF
Minimum spanning tree
PPTX
Ford Fulkerson Algorithm
PPT
Backtracking Algorithm.ppt
PPT
Graph coloring problem
PPT
Maximum flow
PPTX
Prim's algorithm
PPT
Single source stortest path bellman ford and dijkstra
PPT
Graph algorithm
PDF
Bellman ford algorithm
PPTX
Knapsack problem using greedy approach
PPTX
Dijkstra algorithm a dynammic programming approach
PPTX
Kruskal Algorithm
PDF
Ford Fulkerson Algorithm
PPTX
Minimum Spanning Tree
Dijkstra's Algorithm
Dijkstra's algorithm presentation
Bellman ford algorithm
Bellman ford Algorithm
Bellman Ford's Algorithm
Shortest path algorithm
Minimum spanning tree
Ford Fulkerson Algorithm
Backtracking Algorithm.ppt
Graph coloring problem
Maximum flow
Prim's algorithm
Single source stortest path bellman ford and dijkstra
Graph algorithm
Bellman ford algorithm
Knapsack problem using greedy approach
Dijkstra algorithm a dynammic programming approach
Kruskal Algorithm
Ford Fulkerson Algorithm
Minimum Spanning Tree
Ad

Similar to Dijkstra s algorithm (20)

PPT
dijkstra algo.ppt
PPTX
Shortest Path.pptx
PPT
chapter24.ppt
PPTX
SEMINAR ON SHORTEST PATH ALGORITHMS.pptx
PPT
Dijkstra's algorithm for computer science
PPT
Shortest path
PPTX
Single source Shortest path algorithm with example
PPT
Dijkstra_Algorithm with illustarted example
PPT
Design and Analysis of Algorithm -Shortest paths problem
PPT
10--Dijkstra-s-Shortest-Path-and-Graph-Representations-24042025-113241am.ppt
PPTX
Single sourceshortestpath by emad
PDF
Djikstra’s Algorithm. Approach to shortest path algorithm with greedy method
PPT
Unit26 shortest pathalgorithm
PPTX
Single source shortestpath
PPT
PDF
Shortest Path Problem
PPTX
Algo labpresentation a_group
PPTX
Data structures and algorithms Dijkstra’s Algorithm (1).pptx
PDF
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
PPTX
Dijkstra Searching Algorithms Shortest.pptx
dijkstra algo.ppt
Shortest Path.pptx
chapter24.ppt
SEMINAR ON SHORTEST PATH ALGORITHMS.pptx
Dijkstra's algorithm for computer science
Shortest path
Single source Shortest path algorithm with example
Dijkstra_Algorithm with illustarted example
Design and Analysis of Algorithm -Shortest paths problem
10--Dijkstra-s-Shortest-Path-and-Graph-Representations-24042025-113241am.ppt
Single sourceshortestpath by emad
Djikstra’s Algorithm. Approach to shortest path algorithm with greedy method
Unit26 shortest pathalgorithm
Single source shortestpath
Shortest Path Problem
Algo labpresentation a_group
Data structures and algorithms Dijkstra’s Algorithm (1).pptx
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
Dijkstra Searching Algorithms Shortest.pptx
Ad

More from mansab MIRZA (7)

DOC
Chapter1
PPT
software
PPT
software engineering models
PDF
Dynamic programing 2
PDF
Dynamic programing 2
PPTX
Asymptotics 140510003721-phpapp02
PDF
Fall 2015 time_table_bs by mansab mirza
Chapter1
software
software engineering models
Dynamic programing 2
Dynamic programing 2
Asymptotics 140510003721-phpapp02
Fall 2015 time_table_bs by mansab mirza

Recently uploaded (20)

PDF
Launch Your Data Science Career in Kochi – 2025
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PDF
Lecture1 pattern recognition............
PPTX
Major-Components-ofNKJNNKNKNKNKronment.pptx
PPTX
Introduction to Knowledge Engineering Part 1
PPT
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PPTX
Global journeys: estimating international migration
PPTX
1_Introduction to advance data techniques.pptx
PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PDF
Clinical guidelines as a resource for EBP(1).pdf
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
Launch Your Data Science Career in Kochi – 2025
STUDY DESIGN details- Lt Col Maksud (21).pptx
Miokarditis (Inflamasi pada Otot Jantung)
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
Lecture1 pattern recognition............
Major-Components-ofNKJNNKNKNKNKronment.pptx
Introduction to Knowledge Engineering Part 1
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
Data_Analytics_and_PowerBI_Presentation.pptx
IB Computer Science - Internal Assessment.pptx
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
Global journeys: estimating international migration
1_Introduction to advance data techniques.pptx
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Clinical guidelines as a resource for EBP(1).pdf
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...

Dijkstra s algorithm