Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

Dijkstra algorithm

Hassan Tahamid Israt Habiba Eva Niaz Ahmed


Team Leader

ID:0242220005101607 ID:0242220005101698 ID:201-15-14147

Munshi Md Samaul Plabon


Tashdid Rahman

ID:0242220005101770 ID:0242220005101668
Conditions-
It is important to note the following points regarding
Dijkstra Algorithm-

1.Dijkstra algorithm works only for connected graphs.


2.Dijkstra algorithm works only for those graphs that do
not contain any negative weight edge.
3.The actual Dijkstra algorithm does not output the shortest
paths.
4.It only provides the value or cost of the shortest paths.
5.By making minor modifications in the actual algorithm,
the shortest paths can be easily obtained.
6.Dijkstra algorithm works for directed as well as
undirected graphs.
Problem Solution
Using Dijkstra’s Algorithm, find the shortest distance from source vertex ‘S’ to remaining vertices in the
following graph-
Problem Solution
Problem Solution
Problem Solution
Problem Solution

The order in which


all the vertices are
processed is :

S , a , d , b , c , e.

You might also like