6
New Sharpness Properties, Algorithms and Complexity Bounds for Partitioning Shortest Path Procedures Author(s): Fred Glover and Darwin Klingman Source: Operations Research, Vol. 37, No. 4 (Jul. - Aug., 1989), pp. 542-546 Published by: INFORMS Stable URL: http://www.jstor.org/stable/171255 . Accessed: 08/05/2014 21:23 Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at . http://www.jstor.org/page/info/about/policies/terms.jsp . JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship. For more information about JSTOR, please contact [email protected]. . INFORMS is collaborating with JSTOR to digitize, preserve and extend access to Operations Research. http://www.jstor.org This content downloaded from 169.229.32.137 on Thu, 8 May 2014 21:23:49 PM All use subject to JSTOR Terms and Conditions

New Sharpness Properties, Algorithms and Complexity Bounds for Partitioning Shortest Path Procedures

Embed Size (px)

Citation preview

New Sharpness Properties, Algorithms and Complexity Bounds for Partitioning Shortest PathProceduresAuthor(s): Fred Glover and Darwin KlingmanSource: Operations Research, Vol. 37, No. 4 (Jul. - Aug., 1989), pp. 542-546Published by: INFORMSStable URL: http://www.jstor.org/stable/171255 .

Accessed: 08/05/2014 21:23

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at .http://www.jstor.org/page/info/about/policies/terms.jsp

.JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range ofcontent in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new formsof scholarship. For more information about JSTOR, please contact [email protected].

.

INFORMS is collaborating with JSTOR to digitize, preserve and extend access to Operations Research.

http://www.jstor.org

This content downloaded from 169.229.32.137 on Thu, 8 May 2014 21:23:49 PMAll use subject to JSTOR Terms and Conditions

NEW SHARPNESS PROPERTIES, ALGORITHMS AND COMPLEXITY BOUNDS FOR PARTITIONING SHORTEST PATH PROCEDURES

FRED GLOVER University of Colorado, Boulder, Colorado

DARWIN KLINGMAN The University of Texas at Austin, Austin, Texas

(Received May 1987; revisions received December 1987; February, April 1988; accepted June 1988)

Building on the framework of partitioning shortest path (PSP) algorithms, we introduce two new methods that exhibit different types of sharpness properties, based on a refinement of the sharpness concept of Shier and Witzgall. We show that the first of these two methods, which we classify as globally sharp, has a complexity bound that is superior to the complexity bound for the previous PSP algorithm, THRESH-S, that exhibits the same sharpness properties. The second new method, which we classify as globally scan-sharp, has a better bound and exhibits sharpness properties that are nearly as comprehensive. Finally, we discuss methods for identifying negative cycles that possess a time-sharpness property.

W e address the problem of finding a shortest NY, [path tree with root r in a digraph G = (N, A), where G may contain negative length arcs but no negative cycles. Following the frameworks elucidated in Gallo and Pallottino (1986) and in Gilsinn and Witzgall (1973), we are concerned with methods that implicitly or explicitly maintain a directed tree T rooted at r at each step. We focus specifically on the class of partitioning shortest path (PSP) algorithms, introduced and studied in Glover, Klingman, and Phillips (1985) and Glover et al. (1985).

Our results provide two new PSP algorithms with interesting properties that may be characterized by reference to a refinement of the sharpness concept due to Shier and Witzgall (1981). We first indicate how the refined concept can be used to establish relation- ships between previous results in the literature, and then use it to classify attributes of the two new PSP algorithms. We show that one of the new PSP algo- rithms has a complexity bound that is superior to that of the previous PSP algorithms with corresponding sharpness properties. In addition, we demonstrate that the second new method has a better bound while exhibiting sharpness properties that are nearly as com- prehensive. Finally, we discuss methods for identifying negative cycles that exhibit a special time-sharp property.

1. A REFINEMENT OF THE SHARPNESS CONCEPT

Let d(i, j) denote the length of arc (i, j) E A, and for an arbitrary directed tree T rooted at r, let PI, be the directed path from r to node h. We define the length d(P,,) of path P,, by d(P,,) = E d(i, j) such that (i, j) belongs to P,,, where by convention d(P,) = 0. The identity of P,, itself, and hence, the structure of T is determined by reference to predecessor labels p(j), where p(j) = i for the unique arc (i, j) in T.

Shortest path algorithms satisfying frameworks such as Gallo and Pallottino; Gilsinn and Witzgall; Glover, Klingman and Phillips; and Glover et al. attach a distance label d(i) to each i E N, and maintain the labels in a manner so that d(i) 3 d(P,) at all steps. The sharpness concept of Shier and Witzgall involves the relationship between the distance labels d(i) and the path distances d(P). In particular, an algorithm is called sharp if d(u) = d(P,) for the node u that has been selected to be scanned at the time the scan step is initiated. Results about sharp algorithms are given in Desrochers (1987); Gallo and Pallottino; Glover, Klingman and Phillips; Glover et al.; and Shier and Witzgall.

In this paper, we refine the notion of a sharp algo- rithm to reflect properties that can influence certain

Subject classification. Networks/graphs: distance algorithms.

Operations Research 0030-364X/89/3704-0542 $01.25 Vol. 37, No. 4, July-August 1989 542 ? 1989 Operations Research Society of America

This content downloaded from 169.229.32.137 on Thu, 8 May 2014 21:23:49 PMAll use subject to JSTOR Terms and Conditions

New Sharpness Properties, Algorithms and Complexity Bounds / 543

types of processing done by a shortest path algorithm. This processing has consequences that may affect how close empirical performance is to worst case bounds. Our development shows, further, that sharpness prop- erties of increasing power may be attended by a dete- rioration in the worst case bounds, though under some conditions it is possible to maintain unchanged bounds for different sharpness properties.

In the following, we are concerned specifically with three levels of algorithmic sharpness. We say that an algorithm is: 1) globally sharp if d(i) = d(Pi) for all i E N each time T is changed (and, hence, each time a comparison involving the d(i) labels is made by the algorithm); 2) globally scan-sharp if d(i) = d(Pi) for all i E N each time a node is chosen to be scanned; 3) locally scan-sharp if d(u) = d(P,) for the specific node u chosen to be scanned at the time scanning of u is initiated. Note that the definition of a sharp algorithm by Shier and Witzgall corresponds to that of a locally scan-sharp algorithm, the least restrictive of the three definitions.

The connection between PSP algorithms and the sharpness concept was introduced in Glover et al. by means of a member of the PSP class called the THRESH-S algorithm. We restate this algorithm in a slightly different but equivalent form, renaming it PSP-GS, where GS refers to global sharpness. For the following, we define an immediate successor v of u to be a node such that (u, v) E A.

PSP-GS

Step 0. Initialization. Initialize the predecessor p(i) and the distance label

d(i) for each node i E N:

p(i)=O i E N

d(i)=oo ieN, i$r

d(r) = 0.

Set iteration counter k = 0. Partition the collection of scan eligible nodes into two sets, NOW and NEXT. Initially NOW = {r} and NEXT = 0.

Step 1. Choose a node to scan. If NOW =0, go to Step 3. Otherwise choose a node

u E NOW. Step 2. Scan selected node. Delete u from NOW. Then, sequentially, for

each immediate successor v of u calculate d, = d(u) + d(u, v) - d(v) and if d, < 0:

2.1 Set d(v) = d(v) + d,, and add v to NEXT if v is not already an element of NEXT or NOW.

2.2 Change T by setting p(v) = u.

2.3 For each node i $ v in the subtree of T rooted at v, let d(i) = d(i) + d,, and add i to NEXT if i is not an element of NEXT or NOW.

After all immediate successors of u have been ex- amined, return to Step 1.

Step 3. Repartition scan eligible nodes. If NEXT = 0, stop: d(i) is the shortest path distance

from r to i, for each i E N. Otherwise, set k = k + 1, transfer the nodes from NEXT to NOW (by renaming these sets), and return to Step 1.

The preceding description contains some redun- dancy to facilitate the description and comparison of subsequent methods (e.g., Step 2.1 could be executed as part of Step 2.3 by dropping the condition i $ v). The PSP-GS algorithm is shown in Glover et al. to have the complexity 0(1 N 12 1 A 1), based on a result of Glover, Klingman and Phillips which establishes that PSP methods require at most I N I - 1 iterations. It is evident by the nature of Step 2.3, which is executed each time T changes, that PSP-GS is not merely a sharp algorithm in the sense of Shier and Witzgall, but it is a globally sharp method.

A variant of this method is given in Glover et al. that embodies a threshold shortest path strategy for a digraph with all arcs of nonnegative length. The re- sulting procedure makes it possible to incorporate structural information about G into the node scan selection criteria. Results of Glover et al. show that the complexity of this variant ranges from 0(1 N 1" I A I) to 0(1 N I'), depending on the form of the threshold rule. In addition, a near sharp algorithm for the nonnegative arc length case, likewise based on a threshold strategy, is shown to have complexity ranging from 0(1 N I I A I) to 0(1 N 1 2). An implemen- tation of this latter method uniformly dominated all other codes tested, applied to 4,500 problems of vary- ing topologies, densities and arc length distributions.

For shortest path problems containing arcs with negative lengths, which constitute the primary con- cern of this paper, an original and innovative contri- bution to sharp PSP algorithms recently has been provided by Desrochers (1987). We designate the pro- cedure of Desrochers as PSP-LSS, conveying that it is locally scan-sharp. The method may be con- veniently described by reference to the format of PSP-GS, as follows.

PSP-LSS

Steps 0, 1, and 3 are as in PSP-GS. Step 2 is changed as follows. Drop Step 2.3, and

immediately before deleting u from NOW, generate

This content downloaded from 169.229.32.137 on Thu, 8 May 2014 21:23:49 PMAll use subject to JSTOR Terms and Conditions

544 / GLOVER AND KLINGMAN

the path P,, by means of the predecessor labels, com- puting d(P,) and setting d(u) = d(P,).

The foregoing method satisfies the definition of a locally scan-sharp procedure, since d(u) = d(P1,) is made to hold when the scan of u is undertaken (although equality is not assured at the point where u is selected). Drawing on results of Glover, Klingman and Phillips, and noting that the generation of P,, requires 0(1 N i) work, Desrochers obtains an 0(1 N I') bound for this procedure.

2. NEW PSP ALGORITHMS AND BOUNDS

In developing the main results that follow, we focus on shortest path problems that may contain negative length arcs. Our first goal will be to provide a new PSP algorithm that is globally sharp for these prob- lems. We will show that this procedure has a com- plexity bound the larger of 0(1 N I I A I log I N 1), and 0(I N I3) which compares favorably to the bound 0(1 N 12 1 A l) for PSP-GS. This method, which we call PSP-GS*, may be described as follows.

PSP-GS*

Steps 0, 1, and 3 are as in PSP-GS. Step 2 is replaced by the following: Step 2'. Delete u from NOW, and arrange the

negative d, values, for immediate successors v of u, in ascending order:

40)l :!E dv,2S...SdF, < O.

(If all d, > 0, return to Step 1.) 2.1' Let v = v(l). 2.2' Set p(v) = u and d(i) = d(i) + d, for all i in

the subtree rooted at v, adding each such i to NEXT if i does not belong to NEXT or NOW.

2.3' If v = v(q), go to Step 1. Otherwise, let v be the next node in the sequence from v(1-) to v(q).

2.4' If d, is currently equal to d(u) + d(u, v) - d(v) (i.e., d(v) has not previously changed its value because of Step 2.2'), return to Step 2.2'. Otherwise, return to Step 2.3'.

Theorem 1. PSP-GS* is a globally sharp algorithm with complexity equal to the larger of 0(1 N I I A I log IN1), and 0(l N 13).

Proof. First we establish the complexity bound. Con- sider the kth iteration (i.e., a complete scanning of NOW) and let q(u) be the length of the sequence of labels to be sorted for each node u E NOW. The

following bounds hold

E q(u)< AI, and q(u)< IN . ii(NOW

Thus, the total effort of sorting all the sequences for the kth iteration is

E q(u)log(q(u))? A I logI N l iie NOW

On the other hand, the work of executing Steps 2.1'- 2.4' is dominated by that of Step 2.2', which is at most 0(1 N I) for each u E NOW, since the union of all subtrees rooted at the immediate successors v of u contain at most I N I nodes. This yields 0(l N 12) effort for processing all u E NOW. Depending on which of IAIlogjNj and IN 1 is larger, we thus have 0( lA I log I N I) or O(I N 1 2) effort per.iteration. The maximum of I N I - 1 iterations required by PSP algorithms thus provides the complexity bounds as- serted in the theorem.

We will show that the validity of the procedure, and the global sharpness property, derive from the validity and global sharpness of PSP-GS. To see this, suppose PSP-GS is applied to the successors in their sorted order. Let node i be the first node that receives a new label, d(i) + ds, in Step 2.2', from among those nodes that receive such a new label more than once. We show such a node cannot exist. By the tree structure, node i must, in fact, be an immediate successor of node u, and must occur in the sort order after the node v that rooted the subtree in which node i was first assigned a new label. Let d'(i) and d' represent the original values of d(i) and d,, and let d*(i) and dj represent the values when node i is encountered at Step 2.2' in the role of an immediate successor of u. Also, let d, refer to the original value of d,. Then di* = d(u) + d(u, i) - d*(i). Using the fact that d*(i) = d'(i) + dv and d' = d(u) + d(u, i) - d'(i), we obtain d =d' - d,. The assumption of sort order yields d, ds, and hence, dj > 0. Consequently, node i does not qualify to have its label changed when encountered as a successor of u, and the contradiction completes the proof.

We now introduce the second new PSP algorithm. In contrast to PSP-GS*, the second method qualifies as a globally scan-sharp procedure. Although the cri- teria for global scan-sharpness are somewhat more demanding than those for local scan-sharpness, we will see that the new algorithm achieves a complexity of ?(l N I3) in common with the locally scan-sharp algorithm PSP-LSS. This new algorithm, which we call PSP-GSS, may be described as follows.

This content downloaded from 169.229.32.137 on Thu, 8 May 2014 21:23:49 PMAll use subject to JSTOR Terms and Conditions

New Sharpness Properties, Algorithms and Complexity Bounds / 545

PSP-GSS

Steps 0, 1, and 3 are as in PSP-GS. Change Step 2 as follows. Move Step 2.3 to the end

of Step 2 to be executed after all immediate successors of u have been examined. In this position, Step 2.3 is applied to those nodes v identified to have negative d, values at the start of Step 2. (These values remain the same as initially computed.)

Theorem 2. PSP-GSS is a globally scan-sharp algo- rithm with complexity 0(1 N I').

Proof. The method is by construction globally scan- sharp in accordance with the definition previously given. The complexity 0(1 N 13) makes use, once again, of the result of Glover, Klingman, and Phillips that a PSP method requires at most I N I - 1 itera- tions. Postponing the update operations of Step 2.3 to the end of Step 2 potentially allows PSP-GSS to update more subtrees than PSP-GS, but assures that the updated subtrees will be mutually disjoint, hence, entailing at most 0(1 N I) work each time Step 2 is executed. The complexity assertion of the theorem is thereby established.

A variant of PSP-GSS is also possible in which Step 2.3 is dropped entirely. This approach conducts a pass through the predecessor array at the end of Step 2, initiating a predecessor trace from each node i E N. Paths are recorded as generated so that distances to be assigned to the nodes may be computed in the direc- tion opposite to the trace. Since the predecessor trace can be stopped upon reaching a node previously en- countered, 0(1 N I) effort is required. This variant may entail more calculations than PSP-GSS, but can operate without relying on the more advanced struc- tural labels used to carry out subtree traces.

Note that the use of the sets NOW and NEXT in the PSP methods induces a structuring of scanning order that encompasses the more rigid structuring of the FIFO (or breadth first) scanning order as a special case. Indeed, the simplest of the PSP procedures, which gives no heed to sharpness concepts or to the special refinements embodied in the threshold PSP methods, has the same complexity 0(1 N I I A I) as the FIFO label correcting method. Similarly, in the pres- ent context, if we restrict both NOW and NEXT to be processed as successive FIFO queues, the PSP procedures introduced for achieving various sharpness properties give rise to corresponding variants of breadth first procedures and, therefore, provide com- plexity bounds for those procedures as well.

3. SHARP DETECTION OF NEGATIVE CYCLES

Efforts to detect negative length cycles in a digraph likewise can be usefully differentiated by means of a sharpness concept. Although negative cycle detection can be provided automatically by a PSP method by checking to see if it runs for more than I N I - 1 iterations, we may wish to detect the existence of such a cycle earlier. Beyond this, we may wish also to identify such a cycle when it exists. Accordingly, we call a procedure time-sharp if a negative cycle is both detected and identified the first time T contains one, that is, when T is changed from a tree to the union of a smaller tree and a node-disjoint digraph which con- tains exactly one cycle.

Our interest in a time-sharp procedure is addition- ally motivated by Desrochers, who observes that the PSP-LSS method can be adapted to check for nega- tive cycles in a simple manner. The procedure consists of counting the number of nodes encountered when PSP-LSS traces predecessors from u to the root. If the count exceeds I N I - 1, a negative cycle exists, and is readily identified by the same trace. This ap- proach has the advantage of retaining the 0(1 N I') complexity of PSP-LSS.

Desrochers' observation reinforces the relevance of the time-sharp distinction because the form of cycle detection and identification embedded in PSP-LSS allows Step 2 to be executed a number of times after a cycle is first created before its existence is discovered. It is possible, in fact, for T to lose the tree structure and then regain it, without detection.

Although the issue of negative cycle detection was not addressed in Glover et al., the PSP-GS algorithm can automatically provide a time-sharp procedure by checking whether root v of the subtree currently traced in Step 2.3 is encountered twice. A predecessor trace from v (or from u) then identifies the negative cycle. The same checking procedure can be applied by PSP- GS* and the complexity bounds of these methods are unaffected.

In the case of PSP-GSS, if a corresponding check is made for a second occurrence of v while tracing its subtree, the resulting procedure is nearly time-sharp. The relocation of Step 2.3 to the end of Step 2 allows the algorithm to continue to carry out processing after a negative cycle is created. However, if a cycle is created at any point during the scan step, it must contain node u, and can be destroyed only by creating a new cycle, which likewise contains u (as well as the immediate successor v involved in creating the new cycle). Thus, the relocation of Step 2.3 to the end of Step 2 will still disclose the existence of a cycle on the

This content downloaded from 169.229.32.137 on Thu, 8 May 2014 21:23:49 PMAll use subject to JSTOR Terms and Conditions

546 / GLOVER AND KLINGMAN

same scan step that a cycle is created. This observation also makes it possible to improve the PSP-LSS cycle detection procedure without changing the algorithmic complexity, by performing a second predecessor trace from u to the root after the scan of u has been completed.

Moreover, PSP-GSS and PSP-LSS can be en- dowed with a time-sharp detection capability by the following procedure. At the beginning of Step 2, trace the predecessor path of u to the root and multiply each predecessor value (the contents of the predecessor array) on this path by -1. Then a negative cycle is detected the first time a node v is encountered during the scan of u such that d, and p(v) are both negative, and identified by a simple predecessor trace. (The convention p(r) = 0 may be replaced by the conven- tion p(r) = I N I + 1 for this step, or alternatively p(v) can be checked to see if it is nonpositive.) At the end of the scan step the negative predecessor values are again made positive. The resulting algorithms are time-sharp and retain 0(1 N I') complexity.

Finally, a method is alluded to in Tarjan (1983) which, if we interpret it correctly, seeks to provide time-sharp cycle identification for breadth-first label correcting procedures without altering their 0(1 N I I A l) complexity. Though the details of the method are unpublished, we note that any such method that is not dependent on the FIFO processing of queues may appropriately be applied to those simpler PSP procedures of complexity 0(I N I I A I ) that are not concerned with maintaining globally sharp or globally scan-sharp properties.

ACKNOWLEDGMENT

We are indebted to a referee for pointing out a refine- ment of our original bound for PSP-GS* and to the Associate Editor for his many helpful suggestions. This research was supported in part by the Center for Business Decision Analysis, the Hugh Roy Cullen Centennial Chair in Business Administration, and the Office of Naval Research under contract N00014-87- K-0190.

REFERENCES

DESROCHERS, M. 1987. A Note on the Partitioning Short- est Path Algorithm. Opns. Res. Lett. 6, 183-188.

GALLO, G., AND S. PALLOTTINO. 1986. Shortest Path Methods: A Unifying Approach. Math. Program. Study 26, 38-64.

GILSINN, J., AND C. WITZGALL. 1973. A Performance Comparison of Labeling Algorithms for Calculating Shortest Path Trees. NBS Technical Note 772, U.S. Department of Commerce, Washington, D.C.

GLOVER, F., D. KLINGMAN AND N. PHILLIPS. 1985. A New Polynomially Bounded Shortest Path Algo- rithm. Opns. Res. 33, 65-73.

GLOVER, F., D. KLINGMAN, N. PHILLIPS AND R. SCHNEIDER. 1985. New Polynomial Shortest Path Algorithms and Their Computational Attributes. Mgmt. Sci. 31, 1106-1128.

SHIER, D., AND C. WITZGALL. 1981. Properties of Label- ing Methods for Determining Shortest Path Trees. .1. Res. Nati. Bur. Stand. 86, 317-330.

TARJAN, R. 1983. Data Structures and Network Algo- rithms. SIAM, Philadelphia.

This content downloaded from 169.229.32.137 on Thu, 8 May 2014 21:23:49 PMAll use subject to JSTOR Terms and Conditions