17
Shortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞ be a simple digraph, in which all edge weights are nonnegative real numbers. Let G 0 be obtained from G by an application of a set of edge weight updates to G. Let s 2 V and let T s and T 0 s be Shortest Path Trees (SPTs) rooted at s in G and G 0 , respectively. The Dynamic Shortest Path (DSP) problem is to compute T 0 s from T s . Existing work on this problem focuses on either a single edge weight change or multiple edge weight changes in which some of them are incorrect or are not optimized. We correct and extend a few state-of-the-art dynamic SPT algorithms to handle multiple edge weight updates. We prove that these algorithms are correct. Dynamic algorithms may not outperform static algorithms all the time. To evaluate the proposed dynamic algorithms, we compare them with the well-known static Dijkstra algorithm. Extensive experiments are conducted with both real-life and artificial data sets. The experimental results suggest the most appropriate algorithms to be used under different circumstances. Index Terms—Dynamic shortest path, shortest path trees, dynamic graphs, dynamic algorithms, graph algorithms, routing protocol. Ç 1 INTRODUCTION W E call the problem of recomputing Shortest Path Trees (SPTs) with a set of edge weight updates in a dynamic environment the Dynamic Shortest Path (DSP) problem. Let G ¼ðV;E;wÞ be a simple digraph, in which all edge weights are nonnegative real numbers. Let G 0 ¼ðV;E;w 0 Þ be obtained from G by an application of a set of edge weight updates (increases and/or decreases) to G. Let s 2 V ; let T s and T 0 s be SPTs rooted at s in G and G 0 , respectively. The DSP problem is to compute T 0 s from T s . For the DSP problem, the input edge weight changes could come in three forms: increases only, decreases only, and a mixture of both. We denote an algorithm as semidynamic if the input is either a set of edge weight increases or a set of edge weight decreases but not both. An algorithm is said to be fully dynamic if the input is a set of mixed edge weight changes. We shall investigate the performance of both semidynamic and fully dynamic algorithms in this work. The DSP problem finds many important applications, including network optimization, Internet routing, and databases. To solve the DSP problem, one could apply Dijkstra’s algorithm [8] repeatedly to compute the SPTs. However, this well-studied static algorithm may become ineffective when only a small number of edges in a graph experience weight changes. Therefore, researchers have been studying dynamic algorithms to minimize shortest path recomputation time. Much work has been done on the DSP problem. See, for instance, [6], [7], [10], [12], [16], [17], [18], [19], [20], and [21]. However, existing work focuses on a single edge weight change. See, for example, [6], [7], [10], [12], [19], and [20]. If a set of updates is given, then it is handled by these algorithms as a sequence of updates. From the practical viewpoint, solving the DSP as a sequence of changes is not an effective solution, especially when the updated SPT needs to be computed in real time. The noted exceptions are the two approaches proposed in [16], [18], in which the whole set of edge weight changes are processed together. We denote the intelligent semidynamic DSP algorithms in [16] as BallString since they are based on a ball-and-string model. Unfortu- nately, the algorithm BallString for edge weight increases is incorrect. We amend BallString by proposing MBallStringInc, which updates SPTs correctly in the case of multiple edge weight increases. A fully dynamic algorithm called Dyna- micSWSF-FP is proposed in [18]. However, a problem with DynamicSWSF-FP is that some of its computation is ineffi- cient. Moreover, DynamicSWSF-FP only computes the short- est distances. We modify DynamicSWSF-FP by applying some optimizations and by adding SPT tree structure maintenance. We call the resulting more efficient algorithm MFP. Existing DSP algorithms are relatively complex. We propose a dynamic version of Dijkstra, which we call DynDijkstra. DynDijkstra are two semidynamic algorithms that can handle multiple edge weight increases and decreases. For each of the following algorithms: DynDijkstra, MBall- StringInc, and MFP, we prove its correctness. 1 A drawback in existing work on the DSP problem is the lack of experimental evaluation of different dynamic algorithms. Most existing experimental work is on a single edge weight update. See, for instance, [6], [7], and [10]. The experimental evaluation of the aforementioned DSP algorithms is the other contribution of this work. We conduct extensive experiments, with a relatively sparse Connecticut road network and with a relatively dense artificially generated graph, on the above- mentioned algorithms and compare them with the static algorithm Dijkstra. As a result, we identify the preferred IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009 541 . E.P.F. Chan is with the David Cheriton School of Computer Science, University of Waterloo, Waterloo, ON N2L 3G1, Canada. E-mail: [email protected] . Y. Yang is with the Department of Alliance & Channel, Oracle China. E-mail: [email protected]. Manuscript received 9 June 2006; revised 23 Nov. 2007; accepted 10 Sept. 2008; published online 23 Oct. 2008. Recommended for acceptance by F. Dehne. For information on obtaining reprints of this article, please send e-mail to: [email protected], and reference IEEECS Log Number TC-0229-0606. Digital Object Identifier no. 10.1109/TC.2008.198. 1. From now on, MBallString refers to MBallStringInc and the original BallStringDec. BallStringDec is the BallString algorithm in [16] when the input is a set of edge weight decreases. 0018-9340/09/$25.00 ß 2009 IEEE Published by the IEEE Computer Society

Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

Embed Size (px)

Citation preview

Page 1: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

Shortest Path Tree Computationin Dynamic Graphs

Edward P.F. Chan and Yaya Yang

Abstract—Let G ¼ ðV ;E; wÞ be a simple digraph, in which all edge weights are nonnegative real numbers. Let G0 be obtained from G

by an application of a set of edge weight updates to G. Let s 2 V and let Ts and T 0s be Shortest Path Trees (SPTs) rooted at s in G

and G0, respectively. The Dynamic Shortest Path (DSP) problem is to compute T 0s from Ts. Existing work on this problem focuses on

either a single edge weight change or multiple edge weight changes in which some of them are incorrect or are not optimized. We

correct and extend a few state-of-the-art dynamic SPT algorithms to handle multiple edge weight updates. We prove that these

algorithms are correct. Dynamic algorithms may not outperform static algorithms all the time. To evaluate the proposed dynamic

algorithms, we compare them with the well-known static Dijkstra algorithm. Extensive experiments are conducted with both real-life

and artificial data sets. The experimental results suggest the most appropriate algorithms to be used under different circumstances.

Index Terms—Dynamic shortest path, shortest path trees, dynamic graphs, dynamic algorithms, graph algorithms, routing protocol.

Ç

1 INTRODUCTION

WE call the problem of recomputing Shortest Path Trees(SPTs) with a set of edge weight updates in a dynamic

environment the Dynamic Shortest Path (DSP) problem. LetG ¼ ðV ;E;wÞ be a simple digraph, in which all edge weightsare nonnegative real numbers. LetG0 ¼ ðV ;E;w0Þbe obtainedfrom G by an application of a set of edge weight updates(increases and/or decreases) to G. Let s 2 V ; let Ts and T 0s beSPTs rooted at s inG andG0, respectively. The DSP problem isto compute T 0s from Ts. For the DSP problem, the input edgeweight changes could come in three forms: increases only,decreases only, and a mixture of both. We denote analgorithm as semidynamic if the input is either a set of edgeweight increases or a set of edge weight decreases but notboth. An algorithm is said to be fully dynamic if the input is aset of mixed edge weight changes. We shall investigate theperformance of both semidynamic and fully dynamicalgorithms in this work. The DSP problem finds manyimportant applications, including network optimization,Internet routing, and databases.

To solve the DSP problem, one could apply Dijkstra’salgorithm [8] repeatedly to compute the SPTs. However, thiswell-studied static algorithm may become ineffective whenonly a small number of edges in a graph experience weightchanges. Therefore, researchers have been studying dynamicalgorithms to minimize shortest path recomputation time.Much work has been done on the DSP problem. See, forinstance, [6], [7], [10], [12], [16], [17], [18], [19], [20], and [21].However, existing work focuses on a single edge weight

change. See, for example, [6], [7], [10], [12], [19], and [20]. If aset of updates is given, then it is handled by these algorithmsas a sequence of updates. From the practical viewpoint,solving the DSP as a sequence of changes is not an effectivesolution, especially when the updated SPT needs to becomputed in real time. The noted exceptions are the twoapproaches proposed in [16], [18], in which the whole set ofedge weight changes are processed together. We denote theintelligent semidynamic DSP algorithms in [16] as BallStringsince they are based on a ball-and-string model. Unfortu-nately, the algorithm BallString for edge weight increases isincorrect. We amend BallString by proposing MBallStringInc,which updates SPTs correctly in the case of multiple edgeweight increases. A fully dynamic algorithm called Dyna-micSWSF-FP is proposed in [18]. However, a problem withDynamicSWSF-FP is that some of its computation is ineffi-cient. Moreover, DynamicSWSF-FP only computes the short-est distances. We modify DynamicSWSF-FP by applying someoptimizations and by adding SPT tree structure maintenance.We call the resulting more efficient algorithm MFP. ExistingDSP algorithms are relatively complex. We propose adynamic version of Dijkstra, which we call DynDijkstra.DynDijkstra are two semidynamic algorithms that can handlemultiple edge weight increases and decreases.

For each of the following algorithms: DynDijkstra, MBall-StringInc, and MFP, we prove its correctness.1 A drawback inexisting work on the DSP problem is the lack of experimentalevaluation of different dynamic algorithms. Most existingexperimental work is on a single edge weight update. See, forinstance, [6], [7], and [10]. The experimental evaluation of theaforementioned DSP algorithms is the other contribution ofthis work. We conduct extensive experiments, with arelatively sparse Connecticut road network and with arelatively dense artificially generated graph, on the above-mentioned algorithms and compare them with the staticalgorithm Dijkstra. As a result, we identify the preferred

IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009 541

. E.P.F. Chan is with the David Cheriton School of Computer Science,University of Waterloo, Waterloo, ON N2L 3G1, Canada.E-mail: [email protected]

. Y. Yang is with the Department of Alliance & Channel, Oracle China.E-mail: [email protected].

Manuscript received 9 June 2006; revised 23 Nov. 2007; accepted 10 Sept.2008; published online 23 Oct. 2008.Recommended for acceptance by F. Dehne.For information on obtaining reprints of this article, please send e-mail to:[email protected], and reference IEEECS Log Number TC-0229-0606.Digital Object Identifier no. 10.1109/TC.2008.198.

1. From now on, MBallString refers to MBallStringInc and the originalBallStringDec. BallStringDec is the BallString algorithm in [16] when theinput is a set of edge weight decreases.

0018-9340/09/$25.00 � 2009 IEEE Published by the IEEE Computer Society

Page 2: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

algorithm to compute an SPT in a dynamic environmentunder different input mixes.

In Section 2, we define some basic notation. In Section 3,we survey related work and highlight our contributions. InSections 4 and 5, we describe the proposed semidynamicand fully dynamic algorithms. We give the correctnessproofs of some of these algorithms in the Appendix, whichcan be found on the Computer Society Digital Library athttp://doi.ieeecomputersociety.org/10.1109/TC.2008.198.In Section 6, we present the experimental results andanalysis. Finally, we give our conclusion in Section 7.

2 PRELIMINARY

2.1 Definition and Notation

In this section, we examine the definitions of frequently usedterms. Terms not defined here are common concepts ingraph theory (such as vertices, edges, paths, path length, andtrees), which can be found in any graph theory resource [5].

LetG ¼ ðV ;E;wÞ be a simple digraph, where V and E arethe sets of vertices and edges, respectively, and w is afunction from E to the set of nonnegative real numbers.Sometimes, we use V ðGÞ and EðGÞ to denote the set ofvertices and edges inG, respectively. Let e ¼ ðu; vÞ 2 E; then,u is the tail of e denoted as tðeÞ, and v is the head of e denotedas hðeÞ. Let u 2 V ; the set of outgoing edges of u is defined asOutu ¼ feje 2 E and tðeÞ ¼ ug, and the set of incoming edgesof u is defined as Inu ¼ feje 2 E and hðeÞ ¼ ug. The parentsof u are defined as pðuÞ ¼ fvjv ¼ tðeÞ and e 2 Inug. ForU � V , OutU ¼ feje 2 E and tðeÞ 2 U and hðeÞ =2 Ug, a n dInU ¼ feje 2 E and hðeÞ 2 U and tðeÞ =2 Ug.

Let Puv be a path from u to v in G; then, v is reachablefrom u. All vertices reachable from u inG including itself areu’s descendants, denoted as desðG; uÞ or desðuÞ if G isunderstood from the context. A path Puv is said to be ashortest path, denoted as SPuv, if it is not longer than anyother possible path P �uv in G. The shortest distance from u tov in G is denoted as duv when G is understood from thecontext. Given a digraph G ¼ ðV ; E;wÞ, an SPT rooted at avertex or source s, denoted as Ts, is a tree with root s, and8v 2 desðsÞ, v 6¼ s, Ts contains an SPsv. Due to the structureof trees, 8v 2 desðsÞ, v 6¼ s, Ts contains only one shortest pathSPsv. We assume in this work that all nodes in V arereachable from a source s. Let e 2 E; e is a tree edge withrespect to Ts if e 2 EðTsÞ; otherwise, it is a nontree edge. Givenv 2 V ðTsÞ, the subtree rooted at v in Ts is denoted as SubTsv.Given G and s 2 V , let Ts be an SPT. Let v 2 V ðTsÞ and v 6¼ s.If s is understood in the context, then SPsv, dsv, and SubTsvare simply denoted as SPv, dv, and SubTv, respectively.

Given the simple digraphs G ¼ ðV ;E;wÞ andG0 ¼ ðV ;E;w0Þ such that w0 6¼ w, G0 is said to be anupdated digraph. In this paper, G! G0 is achieved by anapplication of a set " of edge weight updates:" ¼ fhei; �iijei 2 E and � wðeiÞ � �i <1g, 8hei; �ii 2 ", andw0ðeiÞ ¼ wðeiÞ þ �i. Although only edge weight changesare considered, all proposed algorithms can handle edgeinsertion/deletion. Edge insertions can be handled asweight decreases by setting the weights from 1 to theinserted edge weights. Likewise, edge deletions can beprocessed as weight increases by changing the edgeweights from the deleted edge weights to 1.

In the DSP problem, let T 0s be an SPT rooted at s in G0.Our SPT algorithms compute T 0s from Ts, and thus, all theseare dynamic algorithms. More specifically, they take Ts as aninput, update the properties of some affected vertices in Ts,

and then, at the end, return the updated Ts, which is T 0s. Inthe description of all the dynamic algorithms discussed inthis work and for those objects whose states may be alteredduring the execution of an algorithm, we use a hatð^Þ overan object to indicate the current state of that object. Forexample, bT denotes any intermediate tree, in which somevertices’ properties are being updated during the executionof an algorithm; bdv denotes the shortest distance of v fromthe source in bT . In addition, we use a primeð0Þwith an objectto indicate its final status in the modified graph G0. Forexample, d0v is the new shortest distance from the source s tov in G0, and wðeÞ0 is the new weight of e in G0. A vertex v issaid to be consolidated if the distance assigned by thealgorithm equals the final optimal value d0v and the pathconstructed by the algorithm is an SP 0v.

Let Ts be an SPT rooted at s in G. Any vertex v 2 V ðTsÞhas the following properties: dv and statusðvÞ. The firstproperty indicates v’s shortest distance from s. The statusðvÞusually has two states: open or closed. Some algorithms usestatusðvÞ to indicate whether v needs to be processed (open)and whether v is consolidated (closed).

2.2 Data Structures

Each vertex v is identified by a key (the ID of v), and so iseach edge e. An edge e in a graph is assigned with a weightwðeÞ. An SPT Ts is a special kind of graphs, augmented withthe vertices’ auxiliary information set. The auxiliary in-formation ðauxÞ for a vertex v contains dv and statusðvÞ. LetQ be a priority queue. An entry in Q is of the formathver; data; keyi, in which ver is a vertex and is uniqueamong all entries in Q, data contains some useful informa-tion of ver but is optional, and key is the value on whichentries are ranked. In these algorithms, key could be a pair ofvalues, hvalue1; value2i. Entries are ranked on value1 firstand then on value2. If more than one entry has the same key,then the sequence among them is arbitrary.Q supports three operations. The instruction

ENQUEUEðQ; hver; data; keyiÞ adds an entry of vertexver to Q. If ver is already in Q, then the entry will replace theold ones only if the new key is smaller. In other words, at anyinstant, only one entry is maintained for each ver in Q. Theinstruction EXTRACTMINðQÞ selects and removes anentry hver; data; keyiwith the minimum key. The vertex veris said to be extracted in this operation. The last instructionREMOVEðQ; verÞ removes the entry of ver from Q.

3 RELATED WORK

There are many research efforts reported in the literature ofmaintaining shortest paths on dynamic graphs. We areinterested in exact algorithms for graphs of nonnegative edgeweights. Among them, some require special properties on thegraph, which are less general than what is assumed in ourwork. For example, some maintain shortest paths in planargraphs [9], [14], some require unweighted graphs such thatall edges have a weight of 1 [4], [11], and some allow onlyinteger edge weights that are less than a certain constant C[3], [13]. Over the past few decades, plenty of algorithms,which require no specific properties on graphs, have beenproposed for this problem. See, for instance, [6], [7], [10], [12],[16], [17], [18], [19], [20], and [21]. In the rest of this section, wereview some proposals that related to our work and highlightour contribution at the end.

542 IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

Page 3: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

3.1 FMN

Frigioni et al. propose a fully dynamic algorithm, FMN, formaintaining an SPT in a dynamic graph when an edgeweight is changed [12]. FMN uses the notion of the level of anedge and the notion of the ownership of a vertex. Ownershipinformation is used to bound the number of edges scannedeach time a vertex changes its distance from s. Every edgeðx; yÞ has an owner that must be either x or y. FMN followsthe similar flow of Dijkstra, except that it tries to visit asmaller number of edges. The authors claim that FMN hasthe best theoretical complexity, but FMN maintains complexdata structures, e.g., levels of edges, which makes it ratherinefficient. It has been shown experimentally in [10] thatFMN is outperformed, in most cases, by a fully dynamicalgorithm called DynamicSWSF-FP [18].

3.2 BallString

Narvaez et al. [15] propose a general framework for severalwell-known SPT algorithms when the update is a single edgeweight update. The idea is to recompute only the affectedpart of an SPT. An intelligent approach to recomputeshortest paths in the case of multiple edge weight updatesis proposed by the same authors in [16]. We denote theiralgorithm as BallString since it is based on a ball-and-stringmodel. This model illustrates how affected balls rearrangethemselves in a natural way into their optimal positionswhen the length of a string is increased or decreased. Bysimulating the dynamics of the balls in this model, BallStringprocesses affected vertices in the most economical way: italways consolidates the vertex of least distance increase (inthe case of edge weight increases) or most distance decrease(in the case of edge weight decreases). In addition, it alwaystends to consolidate as many vertices as possible in aniteration.2

This approach greatly reduces the number of iterationsrequired for the same set of affected vertices and totallyeliminates unnecessary structural changes. Unfortunately,BallString is wrong for some cases of multiple edge weightincreases. We will show this with an example in Section 4.1.2.Moreover, this algorithm induces “duplicate distance up-dates” in the case of edge weight decreases, which we willillustrate in Section 4.2.2.

3.3 DynamicSWSF-FP

Ramalingam and Reps in [18] propose a fully dynamicalgorithm, DynamicSWSF-FP, that can handle a set of mixededge weight updates. The main idea is given as follows: Atany instant, a “right-hand side” (rhs) value, denoted asrhsðvÞ, is maintained for every vertex v in G. The valuerecords the shortest distance v could get, based on all parentsp of v at that time. Given the shortest distance information dvfor each vertex v in G, we have dv ¼ rhsðvÞ before any inputedge weight updates. After the input edge weight updatesare applied to G, DynamicSWSF-FP gradually updates theaffected vertices’ shortest distances, and at the end, allvertices’ shortest distances are equal to their rhsðvÞ again.

A disadvantage of DynamicSWSF-FP is that it computesthe rhs value too often, which leads to a high number ofedge visits. In the same paper [18], the authors suggest someimprovement on computing rhs values incrementally. Theauthors maintain a heap for each affected vertex. Theimproved algorithm is proven to be correct, but too manyheaps may not be practical.

3.4 Contributions

Our contribution in this work is that we propose a fewdynamic SPT algorithms by extending and correctingseveral state-of-the-art dynamic SPT algorithms. We amendBallString by proposing MBallStringInc, which updates SPTscorrectly in the case of multiple edge weight increases. ForDynamicSWSF-FP, we suggest MFP by applying someoptimizations on recomputing rhs values without main-taining a large number of heaps and to compute an SPT.3 Ingeneral, existing DSP algorithms are rather complex. In thiswork, we also propose a simple dynamic version of Dijkstra,which we call DynDijkstra. DynDijkstra can be considered asa generalization of the dynamic version of Dijkstraproposed in [15] by allowing multiple edge weight updates.DynDijkstra are two semidynamic algorithms that canhandle multiple edge weight increases and decreases.

For each of the following proposed algorithms:DynDijkstra, MBallStringInc, and MFP,4 we prove itscorrectness. Furthermore, we conduct extensive experi-ments on all proposed algorithms and compare them withthe static Dijkstra algorithm. We test our algorithms on theConnecticut road system and on artificially generated densegraphs. We evaluate a few factors that might affect theperformances of proposed algorithms. More specifically, wevary the graph size, the percentage of changed edges, andthe percentage of weight changed. We first show that theweight changes have a minor effect on the performance ofmost dynamic algorithms investigated. We then show thatfor the increase case, MBallStringInc and DynDijkDec havethe best performance, among all dynamic algorithms, for theroad system and random graphs, respectively. For thedecrease case, DynDijkDec outperforms all other dynamicalgorithms. However, beyond certain thresholds of changededges, the static Dijkstra outperforms all dynamic algo-rithms. We then combine MBallStringInc and DynDijkDectogether to form a semidynamic algorithm MBSDD. Weshow that for an input of a set of mixed edge weightchanges, MBSDD and DynDijkstra outperform all otherdynamic algorithms in the road system and random graphcases, respectively. However, beyond certain thresholds ofchanged edges, static Dijkstra should be used instead.

4 SEMIDYNAMIC ALGORITHMS

In this section, we introduce a few semidynamic SPTalgorithms for the DSP problem. In Sections 4.1 and 4.2,algorithms DynDijkstra and MBallString are presented.5 Thecorrectness proofs of these algorithms are given in theAppendix, which can be found on the Computer SocietyDigital Library at http://doi.ieeecomputersociety.org/10.1109/TC.2008.198.

A vertex v in an SPT Ts is said to be not locally affected if SPvin Ts remains the same as in T 0s; otherwise, it is locally affected.As we will soon see, all algorithms in this section only processlocally affected vertices. Note that not locally affected verticesin Ts all keep their optimal shortest paths and distances as inTs. For any modified edge e, we denotehðeÞ as affected head if itis locally affected and as affected miniroot if it is locally affectedand it has no locally affected ancestors (except for itself) in Ts.

CHAN AND YANG: SHORTEST PATH TREE COMPUTATION IN DYNAMIC GRAPHS 543

2. In [16], the authors denote the set of vertices consolidated in aniteration as a branch.

3. In DynamicSWSF-FP, only the shortest distances are computed withoutmaintaining the SPT.

4. Due to space limitation and since MFP is a relatively straightforwardmodification of DynamicSWSF-FP, its description is not included here. Thecorrectness proof follows from the modification and from [18].

5. The original BallStringDec algorithm will not be repeated in this paper.

Page 4: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

At any instant of an algorithm’s execution, a locallyaffected but nonconsolidated vertex is denoted as a boundaryvertex if it has either at least one not locally affected parent orone locally affected but consolidated parent; otherwise, it isan inner vertex. A boundary edge is an incoming edge of aboundary vertex that has either a not locally affected tail or alocally affected but consolidated tail. The candidate parent ofa boundary vertex v is the tail u� of a v’s boundary edge suchthat du� þ wðu�; vÞ is the minimum among all tails of v’sboundary edges.6 The candidate distance of a boundary vertexv is provided by du� þ wðu�; vÞ, given that u� is the candidateparent of v. The candidate path SPv� for boundary vertex v isthe shortest path SPu� concatenated by edge ðu�; vÞ.

Both DynDijkstra and MBallString contain two individualalgorithms corresponding to weight increases and de-creases, respectively: DynDijkInc and DynDijkDec; MBall-StringInc and BallStringDec. All these algorithms consist ofan initialization, followed by n iterations of a number ofsteps, where n � 0. We say an algorithm executes or runsn iterations. Similarly, the ith iteration of an algorithm refersto the ith iteration of these steps.

4.1 Algorithms DynDijkstra and MBallString: EdgeWeight Increases

Given a graph G, a source vertex s, an SPT Ts, and a set ofedges "þ such that 8e 2 "þ, wðeÞ is going to be increased, weare going to compute a new SPT T 0s on G0. We propose twoalgorithms that compute a new valid T 0s by only processinglocally affected vertices in Ts. With Ts and "þ, we are able tolocate all locally affected vertices first and then computenew shortest paths and distances for them. As proven inLemma B.1, the set of locally affected vertices is the set ofdescendants of affected miniroots. We assume that afunction named findLocallyAffectedVertices will return cor-rectly the set of locally affected vertices.

4.1.1 DynDijkInc

The description of algorithm DynDijkInc is given below. InStep 1, DynDijkInc updates edges’ weights, removes mod-ified tree edges from bTs, and locates all locally affectedvertices by calling findLocallyAffectedVertices. Notice thatwhen findLocallyAffectedVertices is called, some of the treeedges in the input SPT may be deleted, and the current treeis denoted by bTs. Let N be the set of nodes in bTs that arereachable from the root s. The set of vertices �N returned byfindLocallyAffectedVertices is the complement of N . Orequivalently, �N is the union of descendant sets of affectedminiroots. In Step 2, all locally affected vertices a areexamined: if a is a boundary vertex, then da is updated toits candidate distance, and a is enqueued intoQ in the formatof ha; candidate parent; candidate distancei; if a is an innervertex, then da is set to 1. From this point on, whenever ashorter candidate distance is located for any vertex y, bdy andthe candidate parent are updated. In Step 3, DynDijkInc goesinto iterations. Each iteration consolidates one locallyaffected vertex yof the minimum candidate distance, updatesy’s incoming tree edge, and also relaxes y. In the relaxationpart, after y is consolidated, for each child q of y, DynDijkIncupdates q’s distance and candidate parent information if ashorter distance is computed. The iterations end when Qbecomes empty, which indicates no boundary vertices left.Now, we look at an increase example.

DynDijkIncðG; s; Ts; "þÞInput: G is a simple directed graph, s is the source vertex,

Ts is an SPT rooted at s in G, and "þ is a set of edges

whose weights are increased such that 8ei 2 "þ, wðeiÞ is

increased by �i > 0.

Output: The SPT bTs is a new SPT rooted at s in the updated

graph G0.

Notation: For any vertex v, dv is stored in aux in bTs.

Step 1: Apply the set of edge weight changes to bG,remove modified tree edges from bTs and locate all

locally affected vertices.

1: " ;2: for each ei 2 "þ do

3: update ei’s edge weight in bG

4: if ei is an edge in bTs then

5: remove it from bTs and add it to "

6: end if

7: end for

/* Find the set of locally affected vertices based on bTs.*/

8: �N findLocallyAffectedV erticesð bTs; "ÞStep 2: Enqueue boundary vertices with candidate

distances. A vertex a is a boundary vertex iff, after

step 10, bda 6¼ 1.

9: for each vertex a 2 �N do

10: bda minðfdb þ wðb; aÞ0jðb; aÞ2Ina and b =2 �Ng [ f1gÞ11: if bda 6¼ 1 then

12: ENQUEUEðQ; ha; b; bdaiÞ, where b is the candidate

parent of a found in line 10

13: end if

14: end for

Step 3: Consolidate and relax locally affected vertices

one by one.

15: while Q 6¼ ; do

16: hy; x; di EXTRACTMINðQÞ17: reassign the shortest path parent of y in bTs to x

/* Relax outgoing edges of the consolidated vertex y.*/

18: for each e 2 Outy do

19: q hðeÞ20: if bdy þ wðeÞ0 < bdq then

21: bdq bdy þ wðeÞ022: ENQUEUEðQ; hq; y; bdqiÞ23: end if

24: end for

25: end while

26: return bTs

Example 4.1. As shown in Fig. 1a, the weights of edges ðc; gÞand ðg; jÞ are increased. In Step 1, DynDijkInc removesmodified tree edges and locates all locally affectedvertices, i.e., fg; k; o; p; j; i; ng. In Step 2, DynDijkInccomputes candidate distances for boundary vertices, i.e.,fg; i; j; k; pg, enqueues one entry for each, and updates theshortest distances of all inner vertices, i.e., fo; ng, to 1.After that, DynDijkInc consolidates locally affectedvertices by distance, and it also updates the incomingtree edge to each consolidated vertex. Since it is just likeDijkstra, we leave out the detail of intermediate steps. Asshown in Fig. 1b, all affected vertices are processed.

544 IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

6. If more than one tail provides the same minimum distance to v, thenany one of them can be taken as the candidate parent of v.

Page 5: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

In Figs. 1a and 1b, we see that vertices fo; pg are extracteddespite that they have the same shortest distance and shortestparent in T 0s and Ts. Also, vertex i is linked to vertex f , eventhough i could have stayed with its old shortest parent j forthe identical new shortest distance 24. In the followingsection, we will see how MBallStringInc gets around the aboveundesirable results.

4.1.2 MBallStringInc

Narvaez et al. propose an intelligent semidynamic algorithmBallString in [16]. Unfortunately, as will be shown later, theiralgorithm BallStringInc for multiple edge weight increases isnot correct. Here, we propose an algorithm MBallStringInc,which is a slight modification of theirs, that correctly andefficiently computes a new SPT for multiple edge weightincreases, by adapting the same branch closing idea.

MBallStringIncðG; s; Ts; "þÞInput: G is a simple directed graph, s is the source vertex,

Ts is an SPT rooted at s in G, and "þ is a set of edges

whose weights are increased. All vertices in Ts are

initially closed.

Output: The SPT bTs is a new SPT rooted at s in the updated

graph G0.

Notation: For any vertex v, dv and statusðvÞ are stored in

aux in bTs.

Step 1: Apply the set of edge weight changes to bG; if amodified edge is a tree edge, remove the edge from bTs;

and locate all locally affected vertices.

1: " ;2: for each ei 2 "þ do

3: update ei’s edge weight in bG

4: if ei is an edge in bTs then

5: remove it from bTs and add it to "

6: end if

7: end for

/* Find the set of locally affected vertices based on bTs.*/

8: �N findLocallyAffectedV erticesð bTs; "ÞStep 2: Find candidate distances/parents for boundary

vertices.

9: for each vertex a 2 �N do

10: statusðaÞ open

11: newdist minðfdb þ wðb; aÞ0jðb; aÞ 2 Ina and

b =2 �Ng[f1gÞ12: if newdist 6¼ 1 then

13: � newdist� da14: ENQUEUEðQ; ha; b; h�; newdistiiÞ, where b is the

candidate parent of a located in line 11

15: end if

16: end for

Step 3: Consolidate and relax locally affected verticesset by set.

17: while Q 6¼ ; do

18: hy; x; h�; dii EXTRACTMINðQÞ19: re-assign the shortest path parent of y in bTs to x

/* Consolidate all descendants of y.*/

20: N desð bTs; yÞ21: for each v 2 N do

22: bdv dv þ �23: dstatusðvÞ closed

24: if v 2 Q then

25: REMOVEðv;QÞ26: end if

27: end for

/* Relax outgoing edges of just consolidated vertices.*/

28: for each e 2 OutN do

29: if dstatusðhðeÞÞ ¼ open then

30: newdist ddtðeÞ þ wðeÞ031: � newdist�ddhðeÞ32: ENQUEUEðQ; hhðeÞ; tðeÞ; h�; newdistiiÞ33: end if

34: end for

35: end while

36: return bTs

Unlike DynDijkInc, MBallStringInc conducts branch

consolidation by �: it consolidates locally affected vertices

according to the nondecreasing sequence of distance

changes �s. For each locally affected vertex v, the distance

CHAN AND YANG: SHORTEST PATH TREE COMPUTATION IN DYNAMIC GRAPHS 545

Fig. 1. DynDijkInc on an example. (a) An SPT Ts rooted at s in a graph G. A vertex is denoted by a single circle and a letter, an edge is denoted by anarrow from the tail to the head, and the weight is numbered beside. In an SPT, a tree edge is highlighted by a thick arrow; the vertex’s shortestdistance is inside the vertex. In this example, wðc; gÞ is increased by 2, and wðg; jÞ is increased by 3; bTs, which is obtained from Ts by removing edgesðc; gÞ and ðg; jÞ, is a forest of three trees: one rooted at s, one rooted at g, and another rooted at j. The latter two subtrees are circled by a dashed line.(b) G0 and T 0s. Legend: a dashed arrow represents a removed tree edge in G, locally affected vertices are lightly shaded, and extracted vertices aredoubly circled.

Page 6: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

change of v, denoted as �v, is defined as d0v � dv. At the sametime, MBallStringInc is more aggressive in that it consoli-dates a whole branch (a subtree) instead of one vertex. Inaddition, MBallStringInc does not set any tentative distancesto locally affected vertices (as DynDijkInc does) until they areconsolidated, because the old distances of locally affectedvertices are required for the computation of � values. This isalso why MBallStringInc needs the status of open to tracethe remaining locally affected vertices. The elements thatare enqueued into Q have the following format:hboundary vertex; candidate parent, h�; candidate distanceii.

Steps 1 and 2 of MBallStringInc are almost the same asthose of DynDijkInc, except that in Step 2, MBallStringIncdoes not update the shortest distance of any locally affectedvertex. Instead, it sets all locally affected vertices to open, andfor each boundary vertex, it enqueues hboundary vertex;candidate parent; h�; candidate distanceii. In Step 3, MBall-StringInc extracts the boundary vertex y of the least shortestdistance increase � at line 18 and updates y’s new shortestpath parent; it also selects all vertices in desð bTs; yÞ into N toconsolidate in the next step.

Then, MBallStringInc consolidates vertices v 2 N : itupdates the shortest distance of vertex v by adding � atline 22 and changes v to closed at line 23. In lines 24-26, if v isstill in Q, then v is removed from Q, because v’s optimaldistance has been found; therefore, there is no need to processit again. This eliminates unnecessary structural changes.Finally, MBallStringInc relaxes consolidated vertices. Allremaining open vertices adjacent to any vertex in N nowbecome boundary vertices, and the information (candidateparent, candidate distance, and �) of each boundary vertex isenqueued into Q. MBallStringInc repeats consolidation andrelaxation until no locally affected vertices are left.

Branch consolidation by � enables that locally affectedvertices of less distance increase are processed earlier.Basically, the algorithm computes T 0s by rearranging theposition of each branch and applying the � of a miniroot to allvertices in that branch. MBallStringInc yields the SPT that isleast different from Ts in terms of tree structure. It is anefficient algorithm because it avoids unnecessary computa-tion inside a branch.

Example 4.2. As shown in Fig. 2a, after modified treeedges ðc; gÞ and ðg; jÞ are removed from Ts, verticesfg; k; p; o; j; i; ng are located as locally affected in Step 1.Then, entries of all boundary vertices fg; i; j; k; pgare enqueued in Step 2: hg; c; h2; 11ii, hi; f; h3; 24ii,

hj; f; h3; 20ii, hk; h; h0; 13ii, and hp;m; h5; 31ii. In Step 3, inthe first iteration, k, whose entry has the minimum �, isextracted, vertices in desð bTs; kÞ, i.e., fk; o; pg are selectedinto N at line 20, and the whole branch is cut from g andlinked to h. Vertices in N are consolidated, and the entryof p is removed from Q. Since the open vertices g and j,the only heads identified in the relaxation of vertices inN , do not get a smaller � from the just consolidatedvertex k, there is no change in Q. In the followingiteration, the entry of g is extracted, and only fgg isreturned by desð bTs; gÞ because modified tree edge ðg; jÞ isremoved in Step 1, and tree edge ðg; kÞ is removed after kis extracted. At this time, two entries exist in Q:hi; f; h3; 24ii and hj; f; h3; 20ii. Hence, in the next itera-tion, the entry of j is extracted, and all currentdescendants of j are consolidated, including i (thus,the entry of i is removed from Q). The resulting T 0s isgiven in Fig. 2b.

Compared with DynDijkInc, MBallStringInc has threeadvantages. First, MBallStringInc runs fewer iterations thanDynDijkInc does on the same set of locally affected vertices.The reason is that MBallStringInc (the same as in BallStringInc)removes an entry of v directly from Q if vertex v is alreadyconsolidated. By contrasting Figs. 1b and 2b, we see DijktraInchas seven iterations corresponding to all seven affectedvertices, whereas MBallStringInc only has three. Second,MBallStringInc consumes a much smaller number of tree edgeupdates. In this example, DynDijkInc updates seven treeedges, while MBallStringInc updates only three. Third,MBallStringInc changes a locally affected vertex’s shortestpath parent only when compulsory, as exemplified byvertices p, o, and i, in Figs. 1 and 2.

We are now ready to show the incorrectness of theoriginal BallStringInc. Although the terminology used in theoriginal BallStringInc [16] is different from ours, both have asimilar logic. A main difference is that BallStringInc does notremove modified tree edges, as we do in line 5. Conse-quently, the descendants returned in line 20 are different inthe two algorithms. To show its incorrectness, let us retracethe above example again. Steps 1 and 2 are the same as inMBallStringInc. In Step 3, the first iteration is exactly thesame as before in which node k is extracted and processed.All k’s descendants are consolidated since the descendants ofk in bTs are identical in both algorithms. The next vertexextracted is g. However, in BallStringInc, the set of

546 IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

Fig. 2. MBallStringInc on an example. (a) Graph G and the forest bTs after modified tree edges ðc; gÞ and ðg; jÞ are removed, and a dashed circledenotes a set of locally affected vertices. (b) The final SPT T 0.

Page 7: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

descendants of g in bTs at that point of time is fg; j; i; ng; thesevertices are consolidated in this iteration. The consolidateddistances of these vertices are their initial distance valuesincremented by 2, the distance change of g. Since vertices iand j have been consolidated, they are removed from Q.After this iteration, Q becomes empty, and the algorithmterminates. Clearly, the consolidated distances of vertices j,i, and n are incorrect; the edge weight increase of wðg; jÞ hasnot been taken in consideration in determining their finaloptimal distance values.

4.2 Algorithms DynDijkstra and MBallString: EdgeWeight Decreases

Given a graph G, a source vertex s, an SPT Ts, and a set ofedges "� such that 8e 2 "�, wðeÞ is going to be decreased, weare going to compute a new SPT T 0s. Unlike in the increasecase, we cannot predict the set of locally affected verticeswithout computing the new distances for them, because foreach modified edge e, all vertices reachable from hðeÞ in Gcould be locally affected. To compute T 0s in this case, we startfrom all affected heads, and then, we traverse all reachablevertices until no shorter distances are located.

4.2.1 DynDijkDec

In Step 1, DynDijkDec checks each modified edge e; if

h ¼ hðeÞ is an affected head, then a shorter distance,ddtðeÞ þ wðeÞ0, is given to h, and h is enqueued. In Step 2,

DynDijkDec greedily examines all descendants v of h in bG

for locally affected vertices. If v is locally affected, then all its

children will be examined as well. Otherwise, v will not

induce its children to be examined. By iterating this process,

DynDijkDec eventually locates all locally affected vertices.

DynDijkDec updates the distance of each locally affected

vertex v whenever a shorter distance is located, and it

updates v’s incoming tree edge when v is extracted.

DynDijkDecðG; s; Ts; "�ÞInput: G is a simple directed graph, s is the source vertex,

Ts is an SPT rooted at s in G, and "� is a set of edgeswhose weights are decreased such that 8ei 2 "�, wðeiÞ is

decreased by �wðeiÞ � �i < 0.

Output: The SPT bTs is a new SPT rooted at s in the updated

graph G0.

Notation: For any vertex v, dv is stored in aux in bTs.

Step 1: Apply the set of edge weight changes to bG and

enqueue affected heads.1: for each ei 2 "� do

2: wðeiÞ0 wðeiÞ þ �i3: t tðeiÞ; h hðeiÞ

/* If the head of a modified edge is affected, update

its distance and enqueue in Q.*/

4: if bdt þ wðeiÞ0 < bdh then

5: bdh bdt þ wðeiÞ06: ENQUEUEðQ; hh; t; bdhiÞ7: end if

8: end for

Step 2: Consolidate and relax locally affected vertices.

9: while Q 6¼ ; do

10: hy; x; di EXTRACTMINðQÞ11: re-assign the shortest path parent of y in bTs to x

/* Relax outgoing edges of consolidated vertex y.*/

12: for each e 2 Outy do

13: q hðeÞ14: if bdy þ wðeÞ0 < bdq then

15: bdq bdy þ wðeÞ016: ENQUEUEðQ; hq; y; bdqiÞ17: end if

18: end for

19: end while

20: return bTs

Example 4.3. In Fig. 3a, the weights of edges ðc; gÞ and ðg; jÞare decreased. In Step 1 of DynDijkDec, the weight of eachmodified edge is decreased, and entries of g and j areenqueued, because both g and j get shorter distances. InStep 2, the entry of g is extracted first, and then, g is relaxedso that the entries of k and j are enqueued. In the rest of theexecution, the entries of k, j, n, i, o, and p are extractedsequentially. The new shortest path parent for eachextracted vertex is set to the candidate parent. For instance,j becomes o’s new shortest path parent. As shown inFig. 3b, vertices g, k, j, n, i, o, and p turn out to be locallyaffected, and all of them are processed by DynDijkDec.

4.2.2 BallStringDec

BallStringDec is presented in [16]; therefore, we do not repeatit here. For each boundary vertex, the potential distance and

CHAN AND YANG: SHORTEST PATH TREE COMPUTATION IN DYNAMIC GRAPHS 547

Fig. 3. DynDijkDec on an example. (a) G and Ts, in which ðc; gÞ’s weight will be decreased by 3 and ðg; jÞ’s weight will be decreased by 1.(b) G0 and T 0s.

Page 8: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

corresponding � are computed; in each iteration, theboundary vertex v with the minimum � is extracted, andthe distances of vertices in dSubTv are decreased by �. Here,we run BallStringDec with our decrement example. Afterthat, we provide some further discussion of this algorithm.

Example 4.4. Initially, two entries are enqueued:hg; c; h�3; 6ii and hj; g; h�1; 16ii. Then, the entry of g isextracted and consolidated first, since it has the mostdistance decrease. Vertex g keeps its old shortest pathparent; all its descendants in bTs, i.e.,N ¼ fg; k; j; n; i; o; pg,are processed—their distances are decreased by 3. WhenBallStringDec relaxes vertices inN , it enqueues a new entryfor j, i.e., hj; g; h�1; 13ii. In the next iteration, the entry of jis extracted. Vertex j’s shortest path parent remains to be g;all descendants of j in bTs, i.e., fj; i; ng, are processed—theirdistances are decreased by 1. The relaxation on j enqueuesan entry for o, i.e., ho; j; h�1; 20ii. In the last iteration, theentry of o is processed. Vertex o’s shortest path parentswitches to j, and o’s shortest distance is now 20. The newSPT T 0s is in Fig. 4b. Contrasted with Fig. 3b, DynDijkDecextracts all seven affected vertices, whereas here Ball-StringDec only extracts three vertices, i.e., g, j, and o.

The above example again illustrates the advantage ofbranch consolidation by �: a lesser number of iterations andalso a lesser number of tree edge updates. However, it alsoexemplifies duplicate distance updates, i.e., the distance of avertex z is updated more than once, and vertex z is said to beduplicate-updated. A vertex that is duplicated-updated im-plies that the vertex could be processed many times duringan execution. In the above example, vertices j, n, i, and o areduplicate-updated.

5 A FULLY DYNAMIC ALGORITHM MFP

In this section, we discuss a fully dynamic algorithm calledDynamicSWSF-FP that can handle “multiple heterogeneousmodifications” [18]. We then briefly explain how it can bemodified to obtain MFP.

At any instant of the execution of DynamicSWSF-FP,we denote the rhs value of a node v ðrhsðvÞÞ asminx2pðvÞf bdx þ wðx; vÞ0g. We say that parent x of v satisfiesv if rhsðvÞ ¼ bdx þ wðx; vÞ0. For any vertex x 2 pðvÞ, x is asatisfying parent of v if x satisfies v, and in that case, v is asatisfying child of x. Any affected vertex is processed

differently according to whether rhsðvÞ is greater than(underconsistent), equal to (consistent), or less than (over-consistent) bdv.

Before any weight changes are applied to the graph, allvertices in V have optimal shortest distances from thesource s and thus are consistent. After some edges’weights are modified, some vertices become inconsistent.At any instant, for any inconsistent vertex v, we definekeyðvÞ ¼ minf bdv; rhsðvÞg. DynamicSWSF-FP processes in-consistent vertices in a nondecreasing order of key values.Let q be an inconsistent vertex of the minimum key valueamong all inconsistent vertices. If q is underconsistent,then the algorithm sets bdq to 1, which temporarily causesq to be overconsistent. If q is overconsistent, then bdq is setto keyðqÞ, and bdq is q’s new shortest distance in G0, and q isconsolidated. Note that for any vertex v, both rhsðvÞ andkeyðvÞ are computed on the fly, based on v and v’s parents’current shortest distances.

Let us state some important properties about thisalgorithm. When all the input updates are edge weightincreases, no vertices can have shorter distances. Hence, anyaffected vertex v is initially underconsistent, and accordingto the algorithm, bdv will first be assigned the value of1 andthen back to its correct value. Therefore, the affected verticesare enqueued and extracted twice. Similarly, when all theinput updates are edge weight decreases, no vertices canhave longer distances. Because of this, any enqueuedvertex u can only be overconsistent, and bdu is directly setto its rhsðuÞ and will not be processed again. Consequently,the affected vertices are processed only once. From thisanalysis, we conclude that the case of the edge weightincreases is always the worst scenario of DynamicSWSF-FP.

DynamicSWSF-FP conducts frequent edge visits andcomputations to maintain rhs values. Here, we apply somesimpler optimizations, and their correctness can be verifiedeasily from the transformation. Our optimizations are basedon avoiding the unnecessary rhs value recomputation andalso simplifying the computation when it is possible. Thefirst optimization is that when an overconsistent vertex v isextracted ( bdv is decreased to rhsðvÞ), for each child q,DynamicSWSF-FP reevaluates rhsðqÞ according to thedefinition

drhsðqÞ ¼ minz2pðqÞfbdz þ wðz; qÞ0g;

548 IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

Fig. 4. BallStringDec on an example. (a) G and Ts, in which ðc; gÞ’s weight will be decreased by 3 and ðg; jÞ’s weight will be decreased by 1.

(b) G0 and T 0s.

Page 9: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

whereas MFP incrementally recomputes drhsðqÞ asminf drhsðqÞ; bdv þ wðv; qÞ0g. The second optimization is thatwhen an underconsistent vertex u is extracted ( bdu is set to1),DynamicSWSF-FP reevaluates the rhs values of all u’schildren, whereas MFP reevaluates the rhs values of all u’ssatisfying children only. The reason is given as follows:According to the definition, drhsðqÞ ¼ minu2pðqÞf bdu þ wðu; qÞ0g.We need to reevaluate rhsðqÞ if and only if q is a satisfyingchild of u (before bdu is set to1).

Furthermore, the original DynamicSWSF-FP computes theshortest distance values only without maintaining an SPT. Toproperly evaluate this with other dynamic algorithms, MFPis designed to accept an outdated SPT with a set of edgeweight changes and to return a new SPT. Due to spacelimitation and a straightforward modification of the originalalgorithm DynamicSWSF-FP, the detailed description of thealgorithm is not given here.

Example 5.1. In Fig. 5, we apply the following edge weightupdates:wðc; gÞ is decreased by 1,wðg; jÞ is increased by 3,and wðf; iÞ is decreased by 8.

In this example, two edges’ weights will be decreased,and one edge’s weight will be increased. MFP firstexamines all modified heads: g, j, and i. Their associatedvariables in the format of hv; bdv; drhsðvÞi are hg; 9; 8i,hj; 17; 20i, and hi; 21; 16i. Vertices g and i are over-consistent, and j is underconsistent. Therefore, MFP

enqueues entries fhg; 8i; hj; 17i; hi; 16ig. Then, MFP runsiteratively. It first extracts hg; 8i. Since g is overconsistent,d0g is set to 8, and g is consolidated. By checking all thechildren of g, k is found to be inconsistent, and thus,the entry hk; 12i is enqueued. In addition, drhsðjÞ ischanged to 19, although dkeyðjÞ is still 17. Vertex k isextracted next and is overconsistent. Processing of k findsp and o to be inconsistent, and hp; 25i; ho; 23i areenqueued. k is consolidated and obtains its new shortestdistance 12. MFP conducts similar processes to the nextvertex i and causes hn; 18i to be enqueued. i isconsolidated and obtains its final shortest distance 16.When the underconsistent vertex j is extracted next,bdj ¼ 17 and drhsðjÞ ¼ 19, MFP sets bdj to1, which changesj to overconsistent and is enqueued again. Since j had nosatisfying children, no vertices require their rhs values to

be reevaluated.7 At this point of time, all enqueuedvertices j, n, o, and p are overconsistent, and they areprocessed one by one in the increasing order of their keys.Each of them is then consolidated, and the algorithmterminates. Fig. 5 depicts G0 and T 0s in which only vertex jis processed by MFP twice.

As illustrated in Fig. 5b, we observe that the affectedvertices, whose new distances are increased, could beprocessed twice.

6 EXPERIMENTS

In Section 6.1, we introduce our experimental framework,present the problem instance generators, and describe theperformance indicators. In Section 6.2, we present theexperimental results.

6.1 Experimental Setup

6.1.1 System Environment and Data Sets

Our experiments are performed on a PC with a Pentium IV2.56-GHz processor and 1 Gbyte of main memory, runningMicrosoft Windows XP Professional Version 2002. We useJava 1.4.2 to implement all programs. To make a homo-geneous execution environment for every test case, we set thevirtual memory of the Java Virtual Machine (JVM) to 1 Gbyte.

We use two types of graph data: a real-life data set and anartificial data set. The former one is from the Connecticutroad system extracted from the US Census Bureau Tiger/Line files [1], denoted as road system graphs in short. Roadsystem graphs have five different sizes: 1K, 2K, 4K, 8K, and15K. The size is determined by the number of vertices insidethe graph. For each size, two graphs are extracted from theConnecticut road system. The weight of an edge ðu; vÞ is thelength of the edge in the graph. Due to the nature of the roadsystem, the directed graphs Gs are relatively sparse. Thenumber of edges in a graph is about 2:5� n, where n is thenumber of nodes in a graph.

The other type of graphs are artificially generated. Withthe random graph generator from [2], we generatedirected graphs, given the number of vertices, the numberof edges, and a certain range of edge weights. The

CHAN AND YANG: SHORTEST PATH TREE COMPUTATION IN DYNAMIC GRAPHS 549

Fig. 5. MFP on our mixed example. (a) G and Ts, in which wðc; gÞ will be decreased by 1, wðf; iÞ will be decreased by 8, and wðg; jÞ will be increasedby 3. (b) The final G0 and T 0s, in which all the vertices are consistent and of the correct shortest distances. Legend: the vertices that are processedtwice are circled by a heavy dark line.

7. Vertex f is i’s satisfying parent, i is n’s satisfying parent, and k iso’s satisfying parent.

Page 10: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

generator assigns edges to vertices such that the outgoingdegrees of vertices follow quasi-power-law distribution.The weight of an edge is randomly selected from theinput range of 1 to 1,000,000. According to this randomgenerator, jEðGÞjmax ¼

jV ðGÞj�ðjV ðGÞj�1Þ2 . Therefore, we are

able to generate random graphs much denser than roadsystem graphs. The data on random graphs generated areshown in Table 1.

6.1.2 Problem Instances and Performance Indicators

In each testing graph G, we randomly select a vertex s as thesource and a set " of edges whose weights are to be increasedor decreased. We denote " as nonmixed if it contains eitherincreased edges or decreased edges but not both; we denote" as mixed if it contains both. Given an outdated SPT rootedat s inG, we run SPT algorithms to update " accordingly andto compute a new SPT. Note that the outdated SPT is alreadyresiding in the main memory before an algorithm startsexecuting.

In this work, we are interested in the total number ofoperations performed and the CPU runtime for eachsolution. The types of operations interested are listed inTable 2. In the mixed cases, the semidynamic algorithmsneed to divide " into "þ and "� so that "þ contains all edgesin " whose weights are increased and "� contains the rest.The CPU time for dividing " into "þ and "� is also counted aspart of the cost. In addition, when we run semidynamicalgorithms for mixed cases, we first run the decrease routinefor "� and then the increase routine for "þ. This order,however, is arbitrary.

6.1.3 Factors Evaluated

Since different algorithms may have different properties, inorder to draw a meaningful conclusion, we examine whichalgorithm works the best in different scenarios. We extractsome factors from the general situations. Table 3 lists thesefactors and their sample values used in the experiments:

. Graph size ðgraphsizeÞ. It is the number of verticesin it. The samples are listed in Table 3.

. Percentage of changed edges ðpceÞ. It is thepercentage of changed edges. The samples are listedin Table 3. The changed edges are randomly selectedfrom the graph. For example, in a 4K-sized roadsystem graph that has approximately 10,000 edges,when pce is 1 percent, 100 edges get their weightsupdated.

. Percentage of changed weight ðpcwÞ. It is thepercentage of the changed edge’s weight that will beadded to or deducted from the its original weight.Since different applications may have different pcw,the pcw tested ranges from a small change (100 per-cent) to a relatively large change (10,000 percent).There are two groups of samples: the edge weight

increases and the edge weight decreases. Table 3provides the samples.

. Percentage of increased edges ðpieÞ. In the mixedcases, after randomly selecting a group of modifiededges, we vary the ratio between the number of theincreased edges and the number of the decreasededges in this group. The samples are given in Table 3.For instance, the value 10 stands for that 10 percentof modified edges have their weights increased while90 percent have their weights decreased.8

For all cases, given a group of sample values, a run consistsof 150 ð2� 3� 25Þ SPT computations. For example, for theroad system graphs, let graphsize ¼ 4K, pce ¼ 0:1, and pcw ¼100 be a group of sample values. In a run, two graphs (bothare 4K in size, and both have, say, 10,000 edges) are selected.For each graph, we randomly select three groups of edges,each of which contains 10 edges ðpce ¼ 0:1Þ whose weightsare increased by 100 percent, and we randomly select 25vertices as sources whose SPTs are computed. Thus, in a run,we have 150 SPT computations. For each algorithm and foreach group of sample values, the average number of unitoperations and the average execution time of a run are usedas the average data, and they are the y-values in our plots.

6.2 Experimental Results

Besides implementing our algorithms in this work, we alsoimplement Dijkstra as a reference. To obtain a fair compar-ison, the modified Dijkstra takes a group of modified edgesas its input and modifies these edges’ weights beforecomputing a new SPT for the updated graph.

In Section 6.2.1, we show how pcw affects the algorithmsinvestigated. Then, in the rest of Section 6.2, we focus on theother factors and see how they influence the performance ofan algorithm.

6.2.1 Factor pcw

Fig. 6 shows, for the increase case, the effect of pcw onvarious algorithms with road system graphs. Results onother road system graphs and random graphs are similarand therefore are not included here.9 The plot on the leftshows the execution time, while the one on the right recordsthe total number of operations performed by an algorithm.In the figure, it is observed that except for MFP, both the unitoperations and the CPU time of all algorithms remain

550 IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

TABLE 1Artificial Random Graphs Statistics

8. The weight changes, in this case, are randomly set.9. From now on, due to space limitation, only a subset of exemplifying

plots is presented.

TABLE 2Unit Operations

Page 11: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

relatively constant, regardless of the changed weights. Thereason for this phenomenon is due to the nature of thedynamic algorithms.

In the increase cases, given a graph, an SPT, and a set ofchanged edges, the set of locally affected vertices in algorithmDynDijkInc and MBallStringInc remains unchanged, regard-less of the weight changes. At the beginning of execution,these algorithms both invoke a function called findLocallyAf-fectedVertices. The set of vertices returned by this functionsolely depends on the set of changed edges but not on theincreases in their weights. For DynDijkInc, the number ofiterations is the number of locally affected vertices. ForMBallStringInc, even though the number of iterations is thenumber of branches processed, which is much smaller, theamount of work required is proportional to the number oflocally affected vertices. Therefore, the CPU time and theunits of operations remain flat. For algorithm MFP, once theweight changes pass a certain threshold (in our case, around200 percent pcw), the number of affected vertices, which needto be processed, remains relatively constant. The perfor-mance differences among these algorithms will be explained

in subsequent discussion. In summary, except for MFP, pcwhas little influence on these dynamic algorithms in theincrease case. Furthermore, MBallStringInc has the bestperformance over all values of pcw.

On the other hand, pcw has a more noticeable influence inthe decrease case than in the increase case. Figs. 7 and 8 showhow the weight decreases affect the performance of thesealgorithms. In general, the larger the decrease in weight, thelonger it takes to recompute an SPT. Contrary to the increasecase, the set of affected vertices cannot be determinedinitially. As a result, the more the edges’ weights aredecreased, the more likely a vertex is affected. The largerthe number of affected vertices, the more processing isrequired. In addition, this effect is amplified in the randomcase due to a larger number of edge visits. As explained inSection 5, each affected vertex is processed exactly once byMFP. Thus, the performance of MFP is much better in thiscase than in the increase case. Among all dynamic algorithmsand for both types of test graphs, DynDijkDec has the bestperformance and is the least influenced by pcw.

CHAN AND YANG: SHORTEST PATH TREE COMPUTATION IN DYNAMIC GRAPHS 551

TABLE 3Samples of Evaluated Factors in the DSP Problem

Fig. 6. Comparison in edge weight increases on pcw with road system graphs.

Page 12: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

For the rest of the experimental results, we shall focuson other factors and their influences on the performanceof various algorithms. We shall present and analyze theresults in three parts: the edge weight increases, the edgeweight decreases, and the mixed edge weight changes. Letus call a pce x the pce-threshold of a dynamic algorithm I,if for any value y � x, I no longer, in terms of time,outperforms Dijkstra.

6.2.2 Edge Weight Increases

For road system graphs, as shown in Fig. 9, graphsize’s

increase lowers the dynamic algorithms’ pce-thresholds. In

fact, this holds for all test data sets. In the increase case, all

dynamic algorithms outperform Dijkstra when pce is small,

say, when it is less than 1 percent. As pce increases from zero

to some pce-threshold, the performance gap between a

552 IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

Fig. 8. Comparison in edge weight decreases on pcw with random graphs.

Fig. 7. Comparison in edge weight decreases on pcw with road system graphs.

Page 13: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

dynamic algorithm and Dijkstra narrows. Thus, the advan-tage of a dynamic algorithm over Dijkstra reduces as pceincreases; after some pce-threshold is reached, no moreadvantage exists.

In general, MBallStringInc outperforms all other dynamicalgorithms, in terms of the total number of operations andthe execution time, regardless of graphsize and pce. AlthoughMBallStringInc processes the same set of affected vertices asDynDijkInc does, MBallStringInc’s better performance is dueto the branch consolidation by �. Branch consolidationresults in fewer queue operations when compared toDynDijkInc. Since MFP processes each affected vertex twice,it requires a larger number of edge visits and more queue-related operations. Consequently, it performs the worstamong all three dynamic algorithms. In sum, if pce is lessthan a certain pce-threshold, which depends on graphsize,MBallStringInc should be applied; otherwise, Dijkstra shouldbe applied. According to our tests, the range of the pce-threshold for MBallStringInc is between 2 percent and4 percent.

For random graphs, as shown in Fig. 10, the relativeperformance is similar to that in road system graphs, exceptthat DynDijkInc performs a bit better in terms of CPU time.We observe that DynDijkInc and MBallStringInc have almostthe same number of unit operations. In fact, they both havesimilar numbers over all major categories of operations.However, MBallStringInc is a more complex algorithm thanDynDijkInc. When an SPT is small, the benefit of branchconsolidation of MBallStringInc could be outweighted by itsoverhead. As a result, DynDijkInc has a better time perfor-mance than MBallStringInc.

6.2.3 Edge Weight Decreases

Figs. 11 and 12 show the experimental results, in the decreasecase, for road system graphs and for random graphs,respectively.

We observe that for road system graphs, as in the increasecase, all dynamic algorithms outperform Dijkstra when pce issmall but underperform Dijkstra once the pce passes some

pce-threshold. DynDijkDec outperforms all other dynamicalgorithms, regardless of graphsizes and pce. BallStringDecperforms significantly worse than other dynamic algorithmsdue to the duplicate distance updates. The performancedeteriorates rapidly as pce increases, because more and moresubtrees in an SPT are repeatedly processed by BallStringDec.On the contrary, MFP performs better, compared to theincrease case, due to that each affected vertex is enqueuedonly once in the decrease case, which results in far feweredge visits and queue-related operations. In sum, for roadsystem graphs, if pce is less than a certain threshold,DynDijkDec should be applied; otherwise, Dijkstra shouldbe employed. The range of the pce-thresholds is above7 percent, and the threshold varies with the size of a graph.

For random graphs, as shown in Fig. 12, DynDijkDec stillhas the best overall performance among all dynamicalgorithms, while MFP performs the worst. Although eachvertex is enqueued and extracted once, the number of edgevisits and link updates by MFP is larger than that of the twoother dynamic algorithms, resulting in MFP’s deterioratingperformance. In general, an SPT in a random graph is muchsmaller than that in a road system graph. The chance ofduplicate distance update is smaller in a small SPT than in alarge SPT. This explains why BallStringDec does notperform as bad as in the road system case.

6.2.4 Mixed Edge Weight Changes

In the previous sections, we have shown experimentally thatthe overall best performed semidynamic algorithms forincrease and decrease cases are MBallStringInc, DynDijkInc,and DynDijkDec. We construct an algorithm for the mixedcase, which we call MBSDD, by combining MBallStringIncand DynDijkDec together. Algorithm MBSDD is alsoincluded in our evaluation.

Here, we provide the experimental results in the case ofthe mixed edge weight changes. Similar to what is reportedin the previous two sections, graphsize and pce affect theperformance of all the algorithms in the same manner, andas can be expected, combining the edge weight increases

CHAN AND YANG: SHORTEST PATH TREE COMPUTATION IN DYNAMIC GRAPHS 553

Fig. 9. Comparison in edge weight increases on pce with road system graphs.

Page 14: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

and the edge weight decreases does not reverse the trend.Consequently, in this part, we choose fewer samples andfocus on testing pie. The graphsize and pce chosen for roadsystem graphs and for random graphs are shown in Table 3.Our tested samples cover almost the full range of all thepossible values for pie, i.e., from 10 percent to 90 percent.

Fig. 13 shows how the mixes of edge weight increases/decreases affect the performance of the algorithms in termsof CPU runtime. The plots for the unit operations are very

similar to the corresponding time plots and therefore are notincluded here.

Let us first look at the result on the road system graphs. Thefigure shows that pie does not influence the dynamicalgorithms uniformly. DynDijkstra and MBSDD have moreor less the same trend. For the same set of modified edges, aspie increases from 10 percent to 90 percent, two algorithms’execution time increases initially and then decreases after acertain threshold. This trend can be explained by considering

554 IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

Fig. 10. Comparison in edge weight increases on pce with random graphs.

Fig. 11. Comparison in edge weight decreases on pce with road system graphs.

Page 15: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

the behavior of MBSDD. When the pie is very large

(90 percent) or very small (10 percent), the best semidynamic

algorithm, MBallStringInc or DynDijkDec, respectively, is

invoked to handle the dominating set of edge weight changes.

Thus, the performance of MBSDD at the two extremes of pie

will be very close to (but still slightly better than) the two best

semidynamic algorithms, respectively. For the rest of the

pie sample values, MBSDD performs certainly better than all

other dynamic algorithms. Note that for DynDijkstra and

MBSDD, the worst case, in terms of affected vertices, is likely

when the modified edge set is half increases and half

decreases. For the reasons stated in the increase and decrease

cases, as pie increases, MBallString performs better, while

MFP performs worse. The result on random graphs is slightly

CHAN AND YANG: SHORTEST PATH TREE COMPUTATION IN DYNAMIC GRAPHS 555

Fig. 12. Comparison in edge weight decreases on pce with random graphs.

Fig. 13. Time comparison in mixed edge weight changes on pie with (a) road system graphs and (b) random graphs.

Page 16: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

different from that on road system graphs. We first observethat the lines look relatively flat, this, mainly due to the graphsize, is relatively small, and pce is set to at most 5 percent. Forrandom graphs, when the pce is less than 5 percent, theperformance of these dynamic algorithms vary slightly.Overall, DynDijkstra has a better performance in these tests.

The test result on pce for road system graphs issummarized in Fig. 14. As can be observed, and except forthe 2K graph and small pce’s, MBSDD performs no worse

than all other dynamic algorithms. In fact, MBSDD performsjust slightly better than DynDijkstra. Depending ongraphsize and pie, MBSDD should be applied if pce is belowa certain pce-threshold; otherwise, Dijkstra should beapplied. The threshold range in this case is about between1.5 percent and 3.5 percent.

For random graphs, the result is summarized in Fig. 15.There is not much surprise in this figure. However, unlikethe mixed case of road system graphs, DynDijkstra edges

556 IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL 2009

Fig. 14. Comparison in mixed edge weight changes on pce with road system graphs.

Fig. 15. Comparison in mixed edge weight changes on pce with random graphs.

Page 17: Shortest Path Tree Computation in Dynamic Graphs · PDF fileShortest Path Tree Computation in Dynamic Graphs Edward P.F. Chan and Yaya Yang Abstract—Let G ¼ðV;E;wÞbe a simple

out MBSDD in almost every case. The reason is thatMBallStringInc does not perform as well as DynDijkInc inthe random increase case. Consequently, the combinedalgorithm MBSDD is not as good as DynDijkstra.

7 CONCLUSION

For the DSP problem, we reviewed the previous investiga-tions and discovered that many of them either process asingle edge weight update or fail to correctly process themultiple edge weight updates. Therefore, we proposed afew semidynamic algorithms by correcting, extending, andoptimizing some of the previously studied algorithms.More specifically, DynDijkstra and MBallString are twosemidynamic SPT algorithms, whereas MFP is a fullydynamic SPT algorithm. We proved the correctness of thesealgorithms. We conducted experiments to evaluate theirperformance, in terms of both the CPU execution time andthe total number of operations. We also compared themwith the well-known static algorithm Dijkstra. The purposeof this study is to understand how these algorithms behaveand to determine the best algorithms for different graphsizes and for various mixes of modified edges. We usedboth real-life and artificial data sets in our experiments. Thereal-life data sets are road systems in Connecticut and aresparse in nature. The artificial data sets are randomlygenerated graphs and are relatively dense. We tried toeliminate the experimental anomalies by conducting a largenumber of tests. We also identified and evaluated factorsthat could affect the algorithms’ performances.

The factors we investigated in this work are graph size,pce, and pcw. We first showed that for the increase case, pcwhas very little effect on the performance of all dynamicalgorithms studied. However, there are some effects on theirperformance when the changed weights are decreases. Asexpected, dynamic algorithms should be used in place of thestatic Dijkstra algorithm when the pce is smaller than acertain threshold. These thresholds vary on the input mixesand on the graph size. We concluded the following for alldynamic algorithms examined in this work. In the increasecase, for road system graphs and for random graphs,MBallStringInc and DynDijkInc have the best overallperformance, respectively. In the decrease case, DynDijkDecperforms the best. For the mixed case, MBSDD is the bestchoice for road system graphs, while DynDijkstra outper-forms others for random graphs.

ACKNOWLEDGMENTS

The authors are grateful to the anonymous referees for theircomments that make this paper more readable. The authorswish to thank the financial support of the Natural Sciencesand Engineering Research Council of Canada.

REFERENCES

[1] Tiger/Line Files. Bureau of Census, US Dept. of CommerceEconomics and Statistics Administration, 1998.

[2] Java Universal Network/Graph Framework, June 2004.[3] G. Ausiello, G.F. Italiano, A. Marchetti-Spaccamela, and U. Nanni,

“Incremental Algorithms for Minimal Length Paths,” J. Algo-rithms, vol. 12, no. 4, pp. 615-638, 1991.

[4] S. Baswana, R. Hariharan, and S. Sen, “Improved DecrementalAlgorithms for Maintaining Transitive Closure and All-PairsShortest Paths,” Proc. 34th Ann. ACM Symp. Theory of Computing(STOC ’02), pp. 113-127, 2002.

[5] J.A. Bondy and U.S.R. Murty, Graph Theory with Applications.Elsevier North-Holland, 1976.

[6] L.S. Buriol, M.G.C. Resende, and M. Thorup, “Speeding UpDynamic Shortest Path Algorithms,” TR TD-5RJ8B, AT&T LabsResearch, Sept. 2003.

[7] C. Demetrescu, D. Frigioni, A. Marchetti-Spaccamela, andU. Nanni, “Maintaining Shortest Paths in Digraphs withArbitrary Arc Weights: An Experimental Study,” Proc. FourthInt’l Workshop Algorithm Eng. (WAE ’01), pp. 218-229, 2001.

[8] E.W. Dijkstra, “A Note on Two Problems in Connection withGraphs,” Numerical Math., vol. 1, pp. 269-271, 1959.

[9] J. Fakcharoemphol and S. Rao, “Planar Graphs, NegativeWeight Edges, Shortest Paths, and Near Linear Time,” Proc.42nd IEEE Ann. Symp. Foundations of Computer Science (FOCS ’01),pp. 232-241, 2001.

[10] D. Frigioni, M. Ioffreda, U. Nanni, and G. Pasquale, “ExperimentalAnalysis of Dynamic Algorithms for the Single-Source Shortest-Path Problem,” ACM J. Experimental Algorithms, vol. 3, p. 5, 1998.

[11] D. Frigioni, A. Marchetti-Spaccamela, and U. Nanni, “Semidy-namic Algorithms for Maintaining Single-Source Shortest PathTrees,” Algorithmica, vol. 22, no. 3, pp. 250-274, Nov. 1998.

[12] D. Frigioni, A. Marchetti-Spaccamela, and U. Nanni, “FullyDynamic Algorithms for Maintaining Shortest Paths Trees,”J. Algorithms, vol. 34, no. 2, pp. 251-281, 2000.

[13] V. King, “Fully Dynamic Algorithms for Maintaining All-PairsShortest Paths and Transitive Closure in Digraphs,” Proc. 40thIEEE Symp. Foundations of Computer Science (FOCS ’99), pp. 81-91,1999.

[14] P. Klein, S. Rao, M. Rauch, and S. Subramanian, “Faster Shortest-Path Algorithms for Planar Graphs,” Proc. 26th Ann. ACM Symp.Theory of Computing (STOC ’94), pp. 27-37, 1994.

[15] P. Narvaez, K. Siu, and H. Tzeng, “New Dynamic Algorithms forShortest Path Tree Computation,” ACM Trans. Networking, vol. 8,no. 6, pp. 734-746, 2000.

[16] P. Narvaez, K. Siu, and H. Tzeng, “New Dynamic SPT AlgorithmBased on a Ball-and-String Model,” ACM Trans. Networking, vol. 9,no. 6, pp. 706-718, 2001.

[17] S. Nguyen, S. Pallottino, and M.G. Scutella, “A New DualAlgorithm for Shortest Path Reoptimization,” Transportation andNetwork Analysis: Current Trends, pp. 221-235, Kluwer AcademicPublishers, 2002.

[18] G. Ramalingam and T.W. Reps, “An Incremental Algorithm for aGeneralization of the Shortest-Path Problem,” J. Algorithms,vol. 21, no. 2, pp. 267-305, 1996.

[19] G. Ramalingam and T.W. Reps, “On the ComputationalComplexity of Dynamic Graph Problems,” Theoretical ComputerScience, vol. 158, nos. 1-2, pp. 233-277, 1996.

[20] R.E. Tarjan, “Sensitivity Analysis of Minimum Spanning Treesand Shortest Path Trees,” Information Processing Letters, vol. 14,no. 1, pp. 30-33, Mar. 1982.

[21] B. Xiao, Q. Zhuge, and E.H.-M. Sha, “Efficient Algorithms forDynamic Update of Shortest Path Tree in Networking,”J. Computers and Their Applications, vol. 11, no. 1, 2003.

Edward P.F. Chan received the BSc, MSc, andPhD degrees in computer science from theUniversity of Toronto, Canada, in 1978, 1979,and 1984, respectively. He is currently anassociate professor in the David CheritonSchool of Computer Science, University ofWaterloo, Ontario, Canada. His present re-search interests include route queries andspatial and moving object databases.

Yaya Yang received the MMath degree in computer science in 2004from the University of Waterloo, Ontario, Canada. She is currently aconsultant in the Department of Alliance & Channel, Oracle China.

. For more information on this or any other computing topic,please visit our Digital Library at www.computer.org/publications/dlib.

CHAN AND YANG: SHORTEST PATH TREE COMPUTATION IN DYNAMIC GRAPHS 557