Volume: 2 Issue: 3
ISSN: 2321-8169
435 440
______________________________________________________________________________________
Sunanda Dixit
Abstract Nowadays, the development of smart cities with a high level of quality of life is becoming a prior challenge to be
addressed. In this framework, promoting the model shift towards more reliable, greener and in general more sustainable
transportation modes, namely towards a smart mobility could significantly contribute to achieve this goal. The aim of this paper
is to provide users with more regular and reliable rail system by optimizing the route among stations.
Keywords-component; Cost Matrix; Dijkstra algorithm; shortest route; vertex
__________________________________________________*****_________________________________________________
I.
INTRODUCTION
II.
PROBLEM
III.
LITERATURE SURVEY
IV.
ALGORITHM
_______________________________________________________________________________________
ISSN: 2321-8169
435 440
______________________________________________________________________________________
connected graph, find shortest paths to all its other vertices.
It is important to stress that we are not interested here in a
single shortest path that starts at the source and visits all the
other vertices. This would have been a much more difficult
problem.
The single-source shortest-paths problem asks for a family
of paths, each leading from the source to a different vertex
in the graph, though some paths may, of course, have edges
in common.
A variety of practical applications of the shortest-paths
problem have made the problem a very popular object of
study. The obvious but probably most widely used
applications are transportation planning and packet routing
in communication networks, including the Internet.
Multitudes of less obvious applications include finding
shortest paths in social networks, speech recognition,
document formatting, robotics, compilers, and airline crew
scheduling. In the world of entertainment, one can mention
path finding in video games and finding best solutions to
puzzles using their state-space graphs.
There are several well-known algorithms for finding shortest
paths, including Floyds algorithm for the more general allpairs shortest-paths problem. Here, we consider the bestknown algorithm for the single-source shortest-paths
problem, called Dijkstras algorithm. This algorithm is
applicable to undirected and directed graphs with
nonnegative weights only. Since in most applications this
condition is satisfied, the limitation has not impaired the
popularity of Dijkstras algorithm. Dijkstras algorithm finds
the shortest paths to a graphs vertices in order of their
distance from a given source. First, it finds the shortest path
from the source to a vertex nearest to it, then to a second
nearest, and so on. In general, before its ith iteration
commences, the algorithm has already identified the shortest
paths to i 1 other vertices nearest to the source. These
vertices, the source, and the edges of the shortest paths
leading to them from the source form a sub tree Ti of the
given graph (Figure 1).
_______________________________________________________________________________________
ISSN: 2321-8169
435 440
______________________________________________________________________________________
Dijkstras algorithm compares path lengths and
therefore mus tad dedge weights.
Now we can give pseudo code of Dijkstras
algorithm. The set VT of vertices for which a shortest
path has already been found and the priority queue Q
of the fringe vertices. (Note that in the following
pseudo code, VT contains a given source vertex and
the
fringe
contains the vertices adjacent to it after iteration 0 is
completed.)
ALGORITHM Dijkstra(G, s)
//Dijkstras algorithm for single-source shortest paths
//Input:
A weighted connected graph G = V , E
with nonnegative weights and its vertex s
//Output:
The length dv of a shortest path from s to v
//and its penultimate vertex pv for every vertex v in
V
Initialize (Q)
//initialize priority queue to empty
for every vertex v in V
Figure 2 and 3: Dijkstras algorithm
dv ; pv null
Insert(Q,v,dv)
//initialize vertex priority in the priority queue
ds 0; Decrease(Q, s, ds )
//update
priority of s with ds
VT
for i 0 to |V | 1 do
u DeleteMin(Q)
//delete the minimum priority element
VT VT {u }
for every vertex u in V VT
that is
on
the
data
structures
used
_______________________________________________________________________________________
ISSN: 2321-8169
435 440
______________________________________________________________________________________
In routing problems, we search for short routes from station
to station. In this model n x n cost matrix consisting of n
rows and n columns is used. Every pair of (row, column) is
depicted by the name of the station which shows whether a
V.
EXPERIMENTAL RESULTS
_______________________________________________________________________________________
ISSN: 2321-8169
435 440
______________________________________________________________________________________
The basic working model will present the user with travel
details stored in it.
VI.
CONCLUSION
VII. REFERENCES
[1]
[2]
[3]
[4]
_______________________________________________________________________________________
ISSN: 2321-8169
435 440
______________________________________________________________________________________
[5]
[6]
440
IJRITCC | March 2014, Available @ http://www.ijritcc.org
_______________________________________________________________________________________