This preview shows pages 1–6. Sign up to view the full content.
REPORT
DIJKSTRA’S
ALGORITHM
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document DONE BY: MERIN
PUTHUPARAMPIL
TOPICS
1. INTRODUCTION
2. DESCRIPTION OF THE ALGORITHM
3. PSEUDOCODE OF THE ALGORITHM
4. EXAMPLE
5. PROOF OF THE DIJKSTRA’S ALGORITHM
6. EFFICIENCY
7. DISADVANTAGES
8. RELATED ALGORITHMS
9. APPLICATIONS
10.REFERENCES
1. INTRODUCTION
Dijkstra's algorithm is called the singlesource shortest path. It is also known as
the single source shortest path problem. It computes length of the shortest
path from the source to each of the remaining vertices in the graph.
The single source shortest path problem can be described as follows:
Let G= {V, E} be a directed weighted graph with V having the set of vertices.
The special vertex s in V, where s is the source and let for any edge e in E,
EdgeCost(e) be the length of edge e. All the weights in the graph should be
nonnegative.
Before going in depth about Dijkstra’s algorithm let’s talk in detail about
directedweighted graph.
Directed graph can be defined as an ordered pair G: = (V,E) with V is a set,
whose elements are called vertices or nodes and E is a set of ordered pairs of
vertices, called directed edges, arcs, or arrows. Directed graphs are also known
as digraph.
Figure: Directed graph
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document Directedweighted graph is a directed graph with weight attached to each of
the edge of the graph.
Figure: Directedweighted graph
•
Dijkstra’s –A Greedy Algorithm
Greedy algorithms use problem solving methods based on actions to see
if there’s a better long term strategy. Dijkstra’s algorithm uses the
greedy approach to solve the single source shortest problem. It
repeatedly selects from the unselected vertices, vertex v nearest to
source s and declares the distance to be the actual shortest distance
from s to v. The edges of v are then checked to see if their destination
can be reached by v followed by the relevant outgoing edges.
2. DESCRIPTION OF THE ALGORITHM
Before going into details of the pseudocode of the algorithm it is important to
know how the algorithm works. Dijkstra’s algorithm works by solving the sub
problem k, which computes the shortest path from the source to vertices
among the k closest vertices to the source. For the dijkstra’s algorithm to work
it should be directed weighted graph and the edges should be nonnegative. If
the edges are negative then the actual shortest path cannot be obtained.
At the k
th
round, there will be a set called Frontier of k vertices that will consist
of the vertices closest to the source and the vertices that lie outside frontier
are computed and put into New Frontier. The shortest distance obtained is
maintained in sDist[w]. It holds the estimate of the distance from s to w.
Dijkstra’s algorithm finds the next closest vertex by maintaining the New
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 02/06/2012 for the course FACULTY OF WXGE6320 taught by Professor Noraini during the Winter '09 term at University of Malaya.
 Winter '09
 NorAini

Click to edit the document details