Finding The Shortest Path in Dynamic Network Using
Finding The Shortest Path in Dynamic Network Using
www.ijbssnet.com
However, the weights are not deterministic at any time or over any time interval. These networks typify what is
seen in the real world. Fu [4] and Dreyfus [2] show that previous algorithms, such as Dijkstras [7], can be
extended to provide polynomial time algorithms for this more general network type. However, they assume that
the weight functions are known ahead of time, are monotonic and do not change. Such assumptions are not
necessarily suited for many real life situations. Fu showed that finding the shortest path in these networks is an
intractable problem. The intractability is a result of the violation of Bellmans principle. Bellmans principle of
optimality states that any sub path of a shortest path must be a shortest path [4]. He has shown that when travel
times do not change monotonically Bellmans principle may be violated. Fu developed several types of heuristic
search algorithms. The general properties and algorithms have been discussed in both discrete time and
continuous time settings by Ahuja et al. [9], Cai et al. [1], Chabini [10] Orda and Rom [6, 11], Pallottino and
Scutella [12], and Philpott and Mees[13,14] among others. The problem considered in this paper is that of a
dynamic network, where the weights (costs) Cij(t) change as a function of time.
3. Definitions and preliminaries
Given a dynamic network G = (V, E, T) with discrete-time consists of a set of nodes V, (|V| = n), node set V = {1,
2, . . . , n} ,a set of arcs E,(|E| = m), arc set E V V and a fixed time horizon T R+. we assume that every pair
of nodes is connected by at most one arc. Each arc (i, j) E has an associated transit time i,j , if a vehicle leaves
node i at time t along the arc (i, j) then it arrives at node j at time t + i,j. we define a node-time pair to be a
member of V {0,1,,T-1}. A discrete-time dynamic path from node-time pair (i, ) to node-time pair (j, ) is a
sequence of distinct node-time pairs as
,+1 +
, +1
()
= +1
where ci,j (t) is the traversal cost along arc (i, j) at time t, and () is the parking cost at node i at time t. A path P
is said to be a dynamic shortest path from to node-time pair (i,) to node-time pair ( j, ), if Cost[P] Cost[P'] for
all dynamic paths P from (i,) to ( j, ). We suppose that the dynamic network G contains a dynamic path from
node-time pair (1,0) to every other node-time pair (i, t). by introducing artificial arcs (1,i) joining node 1 to node i
for each node i V \{1}. Each artificial arc (1, i) has a zero transit time and a large traversal cost. It is clear that no
such arc would appear in a dynamic shortest path from (1, 0) to any node-time pair (i,t) unless network G contains
no dynamic path from (1,0) to (i,t) without artificial arcs. We now use the Modified Label Correcting Algorithm
for solving the discrete dynamic shortest path problem. The basic idea is to fan out from node-time pair (1, 0) and
label other node-time pairs according to their distances from (1,0). Before preceding our discussion, by using [9]
give necessary and sufficient conditions for a set of labels to represent the length of shortest dynamic paths.
Shortest Path Optimality Conditions: For any node-time pair (i,t), let di(t) denote the length of some dynamic path
from node-time pair (1,0) to node-time pair (i,t). Then the labels di(t) represent the length of shortest dynamic
paths if and only if they satisfy the following shortest path optimality conditions:
1) + () is monotonic decreasing on{0,1,,T-1}for every i V;
2) ci, j (t) + di(t) dj (t + i,j) 0, for every (i, j) E and t {0,1,,T-1}.
Proof -It is obvious that if the labels di(t) are the length of shortest augmenting paths, they satisfy the optimality
conditions (1) and (2). So we assume that for any node-time pair (i,t), labels di(t) is the length of some dynamic
path from node-time pair (1,0) to node-time pair (i,t) satisfying conditions (1) and (2). Thus di(t) is an upper
bound on the length of the shortest dynamic path from node-time pair (1,0) to node-time pair (i,t). We show that
di(t) is also a lower bound on the length of the shortest dynamic path from node-time pair (1,0) to node-time pair
(i,t), which implies the conclusion of the Optimality Conditions. Consider an arbitrary dynamic path P : (1, 0) =
(i1, t1), (i2, t2), . . . , (iq , tq ) = (i, t) from (1,0) to (i,t).
240
To simplify notation, we assume without loss of generality that ik = ik+1 for only one k, say (1 q 1) and (ik
, ik+1) E for all other k = 1, . . . , q. This means that the parking only occurs at node from time to +1 .
Hence we have tk+1 = tk + ik ,ik+1 for k = 1, . . . , 1, +1, . . . , q. Conditions (1) and (2) imply that
= 1 1 + 1 , 1
2 2 + 2 , 1 2 + 1 , 1
1
+1 +1 + =+1 ,+1 ( )
+
+1
() +
1
=+1 ,+1 ( )
1 1 + 1 ,2 1 +
=2
,+1 +
+1
1
=+1 , +1
( )
=Cost [P]
Therefore, di(t) is a lower bound on the cost of any dynamic path from (1,0) to (i, t).
Time-expanded Network: Ford and Fulkerson introduce the notion of time-expanded networks. A time-expanded
network contains one copy of the node set of the underlying static network for each discrete time step (building
a time layer). For a dynamic network G= (V,A,T) the time expanded network GT= (VT,AT) is defined as follows: A
time-expanded network of G, denoted by G(),where = {0 , 1 , , } contains p+1 copies of V, denoted by V0,
V1,, Vp ,in which Vq-1 corresponds to the time step tq-1 for q = 1, . . . , p 1, and Vp to the time horizon T.
Subsequently, index q varies from 1 to p. The copy of node i V in Vq-1 is denoted by iq-1. For each arc (i,j) E
and each time 1 with 0 1 + , , Traversing through arc(iq-1, jq' ) where, tq' = tq-1+, corresponds
to leaving node i at time tq-1 and arriving at node j at time tq'. Hence, arc(iq-1, jq ) has an associated cost ci, j (tq1).
For each node i , there is a holdover arc from iq1 to iq . Traveling through arc (iq1, iq ) corresponds to the parking
at node i from time tq1 to tq . So holdover arc (iq1, iq ) has an associated cost fi (tq1). An illustration of a timeexpanded network is given in Fig. 1.
Fig. 1 on the left hand side a network G with transit times on the arcs is given. Let T = 4 be the time horizon
and = {0, 1, 2, 3, 4} be a valid partition. On the right hand side the corresponding time-expanded network G()
with respect to the partition is depicted.[16]
Lemma 1 If network G contains no dynamic cycle, then there are exists a set of labels di which satisfies the
shortest path optimality conditions (1) and (2).
The proof of this lemma relies on the concept of time-expanded networks which we introduce before.
Proof-We suppose that = {t0, t1,. . . ,tp} is a valid partition for the discrete dynamic shortest path problem.
Consider the time-expanded network G(). Let di(tq) denote the cost of the shortest path from node-time pair (1,0)
to node-time pair (i, tq). in G(), for each i V and each tq .We note, from Sect. 5.2 in [17], that the labels di(tq)
are well defined and satisfy the following conditions:
241
www.ijbssnet.com
1 +
, , ,
()
+ , +
, , , ,
()
Now with respect to partition and conditions (I) and (II) hold for each time step , we can easily check that
the labels satisfy the shortest path optimality conditions(1) and (2). This completes the proof of the lemma.
We wish to determine a shortest dynamic path from node-time pair (1, 0) to every other node-time pair (i, t).
4. Label Correcting Algorithm
A label correcting algorithm is iterative and assigns tentative distance labels to nodes at each step.The time
complexity of the algorithm is O (|V||E|) [9]. Note that, for the network GT, |VT| = nT and |AT| = mT. According to
the definition of time expanded network for a dynamic network, G = (V, A, T), the time complexity of the
algorithm is O (|nT || mT |). The distance labels are estimates of (i.e. lower bounds on) the shortest path distances
and are considered as temporary until the final step where d(i,t)is the shortest path length from the source nodetime pair (1,0) to node-time pair (i,t).The algorithm maintains a LIST of nodes with the property that if there is an
arc-time pair ((i,t),(j,t)) for which d(j,t) < d(i,t)+ Cij(t) then LIST must contain node-time pair (i, tq) The
algorithm runs as follows:
Step 1. Set the distance labels for the nodes as follows:
d(1,0)=0
d(1,1)==d(1,T)=
d(i,t)= ,
0 = t0 tq-1 tq=T , i=2,3,,n , 0
Initialise the list of nodes LIST= [(1,0)].
Step 2. If LIST is empty, go to Step 5. Select the first node (i,t) from LIST .Delete (i,t) from LIST.
Step 3. If (i,t) has no uncorrected successors (successors for which the distance label has not been corrected), go
to Step 2. Otherwise, select an arbitrary uncorrected successor of (i,t) . where the successor is (i,t+1) or (j,t) .
Step 4. If uncorrected successor of (i,t) be (j,t) then d(j,t) = min{ d(j,t),Cij(t)+ d(i,t)}and if the distance label
(j,t) has changed and (j,t) LIST add node (j,t) to the end of LIST and go to Step 3.
If uncorrected successor of (i,t) be (i,t+1) then d(i,t+1) = min{ d(i,t+1), ( )+ d(i, t)}. If the distance label
d(i,t+1) has changed and (i,t+1) LIST add node (i,t+1) to the end of LIST and go to Step 3.
Step 5. Stop.
The algorithm assumes the presence of a single starting node to start the calculations in Step 1.
We can store all nodes whose distance labels change during a pass, and consider (or examine) only those nodes in
the next pass. One plausible way to implement this approach is to store the nodes in a list whose distance labels
change in a pass and examine this list in the first-in, first-out (FIFO) order in the next pass. If we follow this
strategy in every pass, the resulting implementation is provided that we maintain LIST as a queue (i.e., select
nodes from the front of LIST and add nodes to the rear of LIST).
5. Conclusion
In this paper we considered the dynamic shortest path problem, motivated by its applications in dynamic
minimum cost flows. We showed that this problem is equivalent to a classical shortest path problem in a so-called
time-expanded network. Although our approach allows us to apply any standard technique on the time-expanded
network, the size of this network is typically very large for realistic problems and it may be beneficial to avoid
such explicit expansion. We used the Label Correcting Algorithm for solving this problem that the time
complexity of the algorithm is O (|nT || mT |).
242
References
[1] X. Cai, T. Kloks, C.K. Wong, Time-varying shortest path problems with constraints, Networks 29 (3) (1997)
141149.
[2] E.S. Dreyfus, An appraisal of some shortest path algorithms, Operations Research 17 (1969) 395412.
[3] H. Frank, Shortest paths in probabilistic graphs, Operations Research 17 (1968) 583599.
[4] L. Fu, Real-time vehicle routing and scheduling in dynamic and stochastic networks, Ph.D. Thesis at the
University of Alberta, 1996.
[5] A. Orda, R. Rom, Distributed shortest-path protocols for time-dependent networks, Distributed Computing 10
(1)(1996) 4962.
[6] A. Orda, R. Rom, Shortest-path and minimum-delay algorithms in networks with time-dependent edgelength, Journal of ACM 37 (3) (1990) 607625.
[7] E.W. Dijkstra, A note on two papers in connection with graphs, Numeriske Mathematics 1 (1959) 269271.
[8] R.W. Floyd, Algorithm 97: Shortest paths, Communications of the ACM 5 (1962) 345.
[9] Ahuja, R.K., Orlin, J.B., Pallottino, S., Scutella, M.G.: Dynamic Shortest Paths Minimizing Travel
Times and Costs. Networks 41, 197205 (2003) .
[10] Chabini, L.: Discrete dynamic shortest path problems in transportation applications: Complexity and
algorithms with optimal run time. Transp. Res. Rec. 1645, 170175 (1998).
[11] Orda, A., Rom, R.:Minimum weight paths in time-dependent networks. Networks 21, 295320 (1991).
[12] Pallottino, S., Scutella, M.G.: Shortest path algorithms in transportation models: Classical and innovative
aspects. In: Marcotte, P., Nguyen, S. (eds.) Equilibrium and advanced transportation modelling, pp. 245281.
Kluwer, Norwell (1998).
[13] Philpott, A.B., Mees, A.I.: Continuous-time shortest path problems with stopping and starting costs. Appl.
Math. Lett. 5, 6366 (1992).
[14] Philpot, A.B., Mees, A.I.: A finite-time algorithm for shortest path problems with time-varying costs. Appl.
Math. Lett. 6, 9194 (1993).
[15] S. Mehdi Hashemi , Shaghayegh Mokarami , Ebrahim Nasrabadi .:Dynamic shortest path problems with
time-varying costs. Optim Lett 4,147156(2010).
[16] Ahuja, R.K., Magnanti, T.L., Orlin, J.B.: Network Flows: Theory, Algorithms, and Applications.
Prentice-Hall, Inc., New Jersey (1993).
243