Road Map Estimation by Using The Single Source Shortest Path Algorithm (DIJKSTRA'S Algorithm)
Road Map Estimation by Using The Single Source Shortest Path Algorithm (DIJKSTRA'S Algorithm)
(DIJKSTRA'S Algorithm)
3
SP algorithm for extended problems. They then S = the set such that the shortest path
introduced several approaches to solving the from the source of each vertex in S lies
problems. This algorithm is applied point-to-point wholly in S
shortest path calculation on Road networks [3], v0 = a source vertex
geographical information system(GIS), v = each vertex in V, the minimum
telecommunication networks and Reconfigurable over all paths from v0 to v
Hardware[2], Public Transport Information D[v] = the length of the shortest path
system[1] and so on. from v0 to v that lies wholly within S except
Ulrich presented an efficient algorithm for fast for v itself
and exact calculation of shortest paths in graphs This algorithm computes the distance of the
with geometrical information in nodes (co- shortest path from the given source to each vertex
ordinates), e.g. road networks. The method was and the desire source and destination.
based on preprocessing and therefore best suited for The line 1 proves the size of the S that each v in
static graphs, i.e., graphs with fixed topology and S, D[v] is equal to the length of a shortest path from
edge costs. In the preprocessing phase, the network v0 to v. The shortest path from v0 to itself has length
was divided into regions and edge flags are 0 and path from v0 to v, wholly within S except for
calculated that indicate whether an edge belongs to a v, consists of the single edge (v0, v). Thus line 2 and
shortest path into a given region. In the path 3 correctly initialize the D array. Suppose vertex w
calculation step, only those edges need to be is chosen on line 5. If D[w] is not the length of a
investigated that appropriate flag. They compared shortest path from v0 to w, then there must exit a
this method to a classical Dijkstra’s implementation shorter path P. The path P must contain some vertex
using USA road networks with travel times and other than w which is not in S. In line 6, the w add
report on speedup, preprocessing time, and memory to the S. Let v be the first such vertex on P. But then
needed to store edge flags [5]. the distance from v0 to v is shorter than D[w] and
moreover path to v lies wholly within S, except for v
3. Characteristics of the algorithm itself. In line 7 and 8, each vertex v in S is compared
in the minimum function with D[v] and D[w]
This algorithm is computed the shortest path of +1(w,v).
the road map. But this algorithm is applied to find
the shortest path of the airline or the networking 3.2. Sample of the Minimum Cost Estimation
paths. The problem with Dijkstra’s algorithm is that
vertices are selected in increasing distance from the Dijkstra's algorithm is a shortest path algorithm,
source, a task that is at least as hard as sorting n meaning that it finds the length of the shortest path
numbers. from a to a first vertex, the length of a shortest path
Purpose is single source shortest path problem: the from a to a second vertex, and so on until the length
shortest path between two points or all pairs shortest of the shortest path from a to z is found. In this
path problem: the shortest paths between one point example, Dijkstra's Algorithm will be used to find
and all vertices and computation. the path having the lowest cost from a to z. This
algorithm relies on a series of iterations in which a
3.1. Dijkstra’s algorithm analysis "distinguished set of vertices is constructed by
adding one vertex at each iteration. A labeling
The system is used the Dijkstra's algorithm. The procedure is carried out at each iteration. In this
algorithm is the following: labeling procedure, a vertex w is labeled with the
lowest cost of the path from a to w that contains only
begin vertices already in the distinguished set. The vertex
1. S {v0 } added to the distinguished set is one with a minimal
2. D[v0 ] 0; label among those vertices not already in the set"[1].
This can be seen more clearly in the following:
3. for each v in V {v0 } do D[v] l (v0 , v)
4. while S V do
begin
5. choose a vertex w in V S such that D[w] is a min imum;
6. add w to S ;
7. for each v in V S do
8. D[v] MIN D[v], D[w] l (w, v) 4
end
end
of 11. Since the minimum is 4 along the path of (a,
b, c) vertex c is circled and labeled with 4(a, b).
For the third iteration, a path starting at a,
containing any of the following vertices, S2 = (a, b,
c), and then extending to a new vertex will be
chosen. There is the path (a, b, d) with a cost of 7, or
the path (a, b, c, z) with a cost of 10. The path with
a cost of 7 is chosen, so vertex d is circled and then
labeled with 7(a, b).
For the fourth iteration there is only one more
vertex to add, which is z. After examining the costs
of all the different paths containing the vertices
within the set S3 = (a, b, c, d) that extends to z, one
can see that the path with the minimum cost is (a, b,
c, z) with a cost of 10. Thus, in the final step, vertex
z is circled and labeled with 10(a, b, c).
Hence it has been shown that the path from a to z
with the minimum cost in this weighted graph is (a,
b, c, z) of a cost of 10.
5
password is true, the administrator is inserted the If the user clicked the “View on Map” button, the
new node (vertex) or edit the node and distance or possible paths will display. Then the shortest path
delete the unwanted node or edit cost. will display with yellow path from the source city to
the destination city.
5. Implementation
6. Conclusion
5.1. Finding the shortest path
The feasibility of using Dijkstra’s algorithms to
User can search by clicking the “Search Path” accommodate users’ preferences for a public
button. Then the user can choose the “Shortest transportation network is discussed in this paper.
Path” option or “Shortest Time” option or The developed Dijkstra’s algorithm is ideally
“Minimum cost” option. If the user selected the expected to find a set of ranked shortest paths which
“Shortest Path” option, the system will display the can accommodate users’ preferences easily and
shortest path with total cost and estimated time. If without many infeasible routes. This paper intends
the user selected the “Shortest Time” option, the to deal with the difficulties faced when the user
system will display the minimum time with total wants to visit the desired cities in the given road
cost and total distances. If the user selected the map. The Dijkstra’s algorithm can be used to extract
“Minimum Cost” option, the system will display the the desired route from a given road map. The
minimum cost with total distance and estimated undirected graph is used with the shortest path
time. algorithm to calculate the solution path. By using
this path, the user can get a chance to choose the
desired path. For the unfamiliar public users, the
system can help choosing the path from many
existing routes as they wish. Furthermore, this paper
supports the traveling process by giving the shortest
distance, minimum cost and minimum time between
desired source and destination city.
7. References
[1] A.J. Kelner and M. Brand, “Qtochastic Shortest Paths
via Puasi-Bonvex Maximization Evdojia Nikolova”,
Cambridee MA, 2001.
Figure 3. Display the minimum cost with total [2] G. Seeman, M.D. Bourg, “AI for Game Developers”,
distance and estimated time O'Reilly, Chapter 7, June 2004.
5.2. Displaying the Road Map [3] J. Skytt and M. Tommiska,“Dijkstra's Shortest Path
Routing Algorithm in Reconfigurable Hardware”, 1995.