Transcript
Page 1: Finding disjoint paths with different path-costs: Complexity and algorithms

Finding Disjoint Paths with Different Path-Costs: Complexity and Algorithms* Chung-Lun Lit John M. Olin School of Business Washington University St. Louis, Missouri 63130

S. Thomas McCormick Faculty of Commerce and Business Administration University of British Columbia Vancouver, B.C. V6T 1 Y8, Canada

David Simchi-Levi Department of Industrial Engineering and Operations Research Columbia University New York, New York 10027

Consider a network C = ( V , E ) with distinguished vertices s and t , and with k different costs on every edge. We consider the problem of finding k disjoint paths from s to t such that the total cost of the paths is minimized, where thejth edge-cost is associated with thejth path. The problem has several variants: The paths may be vertex-disjoint or arc- disjoint and the network may be directed or undirected. We show that all four versions of the problem are strongly NP-complete even for k = 2 . We describe polynomial time heuristics for the problem and a polynomial time algorithm for the acyclic directed case. Q 1992 John Wiley & Sons, Inc.

I NTRO DU CTI 0 N

The reliability of telecommunications networks can be greatly improved through fundamental advances in routing of different kinds of traffic such as voice and data. We call these different media commodities. One issue in im- proving the reliability is finding two (or more) disjoint routes from a given

*The work of all three authors was supported by the Center for Telecommunications Research under NSF Grant CDR 84-21402. tWork done in part in the IE/OR Department at Columbia University.

NETWORKS, VOI. 22, (1992) 653-667 0 1992 by John Wiley & Sons, Inc. CCC 0028-3045/92/070653-15

Page 2: Finding disjoint paths with different path-costs: Complexity and algorithms

654 LI, MCCORMICK, AND SIMCHI-LEV1

source to a given destination. The problem has several variants: The paths may be vertex-disjoint or arc-disjoint, and the network may be directed or undi- rected.

Most of the research on disjoint paths problems has focused on whether or not a given graph has a collection of disjoint paths between specific terminals. In this problem, we are given a graph G and k pairs of vertices: si and ti for i = 1, . . . , k. We would like to find k disjoint paths, one for every pair s;, ti. Fortune et al. [4] proved that the directed version of this problem is NP- complete for k 2 2 (see Garey and Johnson [5] for a background on NP- completeness). Perl and Shiloach [ 101 presented efficient algorithms for some special cases of this problem, and Shiloach [ 131 presented a polynomial time algorithm for the undirected version of the problem when k = 2. Peleg and Upfal[9] discussed the complexity of constructing disjoint paths between given pairs of vertices on expander interconnection graphs. Robertson and Seymour [I l l showed how the Graph Minor Theorem provides an algorithm for the undirected disjoint path problem with complexity O(lV13) for fixed values of k. For a survey of the Graph Minor Theorem and its relation to the disjoint path problem, see Bienstock and Langston [2]. A variation of this is the problem of k-linked graphs: Here, for graphs on at least 2k vertices, we want to know if there are k pairwise disjoint paths between every set of k sources and sinks. This problem has been studied by Thomassen [161, who completely character- ized 2-linked graphs.

A related problem is to find a maximum number of undirected vertex-disjoint paths between two distinct vertices, such that the length of every path is bounded by a given constant. Itai et al. [7] showed that for a length greater than four, this problem is NP-complete. A polynomial heuristic was given by Ronen and Perl [12], and they proved that this heuristic solves the problem to optimal- ity when the length is less than or equal to four. Computational results show that their heuristic performs very well in general.

The optimization version of the problem is to find disjoint paths that mini- mize a specific objective function. This includes minimizing the sum of the costs of the routes (called the rnin-sum problem) or the cost of the most expen- sive of the selected routes (called the min-max problem). Previous research has considered the case of a uniform cost structure for the two commodities (“uni- form” means that both paths see the same costs on the arcs). Suurballe [14] developed a polynomial time algorithm for the min-sum version of the problem, and a more efficient algorithm for this problem was given by Suurballe and Tarjan [15]. The min-max version of the problem is much more difficult. Li et al. 181 showed that the min-max problem is strongly NP-complete even when k = 2 for its four possible variants, i.e., when the routes are either arc-disjoint or vertex-disjoint and the network is either undirected or directed. They also developed a simple and efficient heuristic that has a worst-case relative error equal to 100% and proved that there is no better heuristic for the directed version of this problem from a worst-case point of view (unless P = NP).

In this paper, we analyze the disjoint path problem with min-sum objective function when the cost structure is not uniform, i.e., when the cost associated

Page 3: Finding disjoint paths with different path-costs: Complexity and algorithms

DISJOINT PATHS WITH DIFFERENT PATH-COSTS 655

with one commodity (voice) is different from the cost associated with a differ- ent commodity (data). In practice, different communications links have differ- ent characteristics for different media; thus, nonuniform costs are a more real- istic assumption than uniform costs.

In the next section, we introduce our notation and describe the model. In Section 2, we prove that all four versions of the problem are strongly NP- complete, even for k = 2. In Section 3, we describe two polynomial-time heuristics and discuss their worst-case bounds. Our bounds are data- dependent, but we also show that no better bounds are attainable unless P = NP. Finally, Section 4 presents a polynomial time algorithm for the acyclic- directed case when k is fixed.

1. NOTATION AND DEFINITIONS

Let G = ( V , E ) be a network with source s and sink t , and k different non- negative integral costs c:,!), cl/", . . . , c:;) on each edge i - j E E . The cost of the jth path PJ is defined as

C( ' ) (PJ> = 2 c)/,). u - u on Pi

The paths are said to be edge-disjoint if they have no edges in common; they are said to be vertex-disjoint if they have no vertices in common except at the terminals.

Our problem is to find k disjoint paths from s to t such that the total cost 2"=1 c(J)(PJ) is minimized. The problem has four versions depending on whether G is a directed or undirected graph and whether the paths are required to be vertex-disjoint or edge-disjoint .

2. NP-COMPLETENESS

In this section, we use the 3-Satisfiability Problem (3SAT) to show that all the four versions of the problem are NP-complete, even when the number of com- modities is fixed at two. An instance of 3SAT has variables.xl ,x2, . . . , x,, with each variable xi giving rise to literals x, and X,. It also has clauses CI , C 2 , . . . , C,,, each a 3-subset of literals. A truth assignment is a function T : { x , } +-

{true,false}. We say that C, is satisfied under T if CJ contains a literal x, with T ( x , )

= true, or literal X, with ~ ( x , ) = false. The instance asks if there is a truth assignment that simultaneously satisfies all rn clauses. 3SAT is known to be NP-complete (see [5] ) .

Theorem 1 . The problem of finding two minimum-cost vertex-disjoint/arc- disjoint s +- t paths with nonuniform costs in a directedhndirected network is strongly NP-complete.

Proof. Obviously, this problem belongs to the class NP. We first prove the directed arc-disjoint version of the problem by reducing 3SAT to the decision

Page 4: Finding disjoint paths with different path-costs: Complexity and algorithms

656 LI, MCCORMICK, AND SIMCHI-LEV1

version of our problem: Given a directed network with nonnegative integral arc-lengths and a positive integer M , does it contain two arc-disjoint s + t paths with total cost at most M ?

Given an instance of 3SAT, we define M = 0 and construct a directed net- work G. For each variable xi, let pi be the number of occurrences of variable xi in the clauses and construct a lobe as shown in Figure 1. The label (c!!J,c!:) on arc u + v represents the costs of that arc. The lobes are connected to one another in series with w I = s and w , , + ~ = t .

For each clause Cj , we add two vertices y j ,z j ( j = 1, . . . , m) together with a rc s s+yI , z j+y j+I ( j= 1 , . . . , m - I),andz,,+t,whichhavecosts(l,O),as shown in Figure 2. Finally, to connect clauses to variables, we add the follow- ing arcs with costs (1 ,O):

y j + u; and ui + z j , if the kth occurrence of variable xi is the literal xi that is

y j +. ii; and 6; +. z j , if the kth occurrence of variable xi is the literal X i that is a literal in clause Cj;

a literal in clause Cj .

For example, network G corresponding to instance

is depicted in Figure 3. It is easy to see that G can be constructed in polynomial time and all the arc-

lengths are either 0 or 1. Therefore, it suffices to show that there exists a truth assignment that simultaneously satisfies all m clauses if and only if G has two edge-disjoint s - t paths with total cost 0.

If there exists a truth assignment 7 that simultaneously satisfies all m clauses, then we select the path that passes through the upper portion of lobe i if 7 ( x i ) = false and passes through the lower portion if ~ ( x ; ) = true as the first s +. r path P I , with cost 0. Each satisfied clause Cj contains either a literal xi such that 7(xi ) = true or a literal X i such that ~ ( x ; ) = false, which implies that there exists a subpath y j + u: + v i + zj or y j + U : + 6; + z j , which is disjoint with P I . Hence, there exist at least m such subpaths, which, together with arcs s + y l

FIG. 1.

Page 5: Finding disjoint paths with different path-costs: Complexity and algorithms

DISJOINT PATHS WITH DIFFERENT PATH-COSTS 657

FIG. 2 .

and z,,, - I , form an s + t path P2 with cost d2) (P2) = 0, which is arc-disjoint with PI.

Conversely, suppose there exist two arc-disjoint s + t paths with total cost 0. Then, path P2 must contain arcs s + yI and zm += t and must pass through vertices y j and zj in order of increasingj. On the other hand, path PI must pass through all the lobes. For i = 1, . . . , n, we set T ( X J = true if PI passes through the lower portion of the ith lobe and T ( X J = false otherwise. According to this truth assignment, clause Cj is satisfied since there is an edge in the lobe between y j and zj in P 2 . Therefore, all rn clauses are satisfied.

It is easy to see that the above arguments are also valid for the vertex-disjoint version. Furthermore, we can prove that the undirected case (for both edge- disjoint and vertex-disjoint versions) are strongly NP-complete by modifying the above proof by replacing all directed arcs in G by undirected edges. Hence, all arc-disjoint/vertex-disjoint and directedhndirected cases of the problem are strongly NP-complete.

FIG. 3.

Page 6: Finding disjoint paths with different path-costs: Complexity and algorithms

658 LI, MCCORMICK, AND SIMCHI-LEV1

The reduction in this proof is an elaboration of constructions in Even et al. [3], who coined the term “lobe.” Note that Theorem 1 also shows that all four versions of the disjoint path problem are strongly NP-complete for any fixed k 1 2.

Corollary 2. If P # NP, then any pseudopolynomial time heuristic for finding k 2 2 vertex-disjoint/arc-disjoint s - t paths in a directedhndirected network with different path-costs has no fixed worst-case bound, even if all cIj“) > 0.

Proof. Suppose there exists a pseudopolynomial time heuristic H for this problem with a fixed worst-case bound B 2 1. Then, given any instance of 3SAT, we can construct graph G a s given in the proof of Theorem 1 except that we replace each unit cost in G with a cost of B * IEl + 1 units and each zero cost with a unit cost and apply the heuristic H on G. Since the optimal solution value of this problem is no more than IE( and any nonoptimal solution has value at least B * IEl + 1, heuristic H will give us a solution with a value no more than B * /El if and only if the answer to 3SAT is yes. Hence, heuristic H can be used to solve 3SAT in polynomial time, contradicting the assumption that P f NP.

3. POLYNOMIAL-TIME HEURISTICS

Given a directed network G with k different costs c!:, . . . , .I,“,‘ on every arc u + u, we define

U,, = max {c::;)} and L,,, = min {c::”)}. j .i

A natural heuristic is to define some functionfof the k costs on each arc that “averages” the costs and then solve a Minimum Cost Network Flow (MCNF) problem using the averaged costs. More formally, consider the following heu- ristic:

Heuristic I: Step I : For every arc u - u , compute

Step 2: Solve the MCNF problem on G with cost d,, and capacity 1 for every arc u -+ u , supply k at s, and demand k at t . Assign the resulting k paths to the k commodities arbitrarily.

In Heuristic I, if the given network is undirected, after Step 1 we can trans- form it into a directed network by replacing every edge u - u by a pair of arcs u - u and u -+ u , where d,, = d,,, and then go to Step 2.

For the vertex-disjoint case, we can transform the problem into an arc- disjoint path problem as follows: Replace each vertex u in G by two vertices u’

Page 7: Finding disjoint paths with different path-costs: Complexity and algorithms

DISJOINT PATHS WITH DIFFERENT PATH-COSTS 659

and u“ and a “dummy” arc u‘ + u“ with costs c?:,, = 0 ( p = 1, . . . , k ) . All arcs into u become incoming arcs of u’ and all arcs out of u become outgoing arcs of u”. After this transformation, we can use Heuristic I to solve the problem on the new network.

Note that an integral solution to the MCNF problem can be obtained in polynomial time. Furthermore, in the undirected case, after replacing every edge u - u by arcs u + u and u + u , there is an optimal solution in which at most one of these two arcs has positive flow in the optimal MCNF solution. Hence, Heuristic I can be applied to all four versions of the problem and give us k disjoint paths. (For algorithms on the MCNF problem and its polynomial time solvability, see, e.g., [I]).

We n e e d f t o be well behaved in order to get a bound on Heuristic I. We consider only functions that are positive when L,, is positive. It turns out that the property that we need to make our analysis work is

(P) For every set of positive costs {c:,)}, there is a single arc u + u, which attains both the max in

and the max in

Two families of functions satisfying (P) are cxU,,, + (1 - cr)L,,, and UeL,Lf,;a, where cx is any number satisfying 0 5 a 5 1. Property (P) fairly tightly con- strainsfas is shown in the following lemma:

Lemma 3. on L,,, and U,,,, i.e., it is independent of the intermediate cl/””s.

If functionfsatisfies (P), then the value offon 14 + u depends only

Proof. Suppose, to the contrary, that the value off on u + u does depend on some intermediate cl/b)’s. Then, there exist (u( ’ ) , . . . , dL)) and (h“), . . , , W ) ) such that

min{a(I), . . . , dk)} = min{b(Ij, . . . , W } = L ,

and

Now arbitrarily select an arc u’ + u’ and give it costs d j ) , and give all other arcs costs W ) . Note that for this set of costs, L,,, = L and U,,, = U for all LI + u.

Page 8: Finding disjoint paths with different path-costs: Complexity and algorithms

660 LI, MCCORMICK, AND SIMCHI-LEV1

Thus, u' + u' maximizes U u u l l f ( c ~ ~ , . . . , c::)] but does not maximize [feel',', . . . , c ~ ~ ) ] / L , , , contradicting property (P).

Note that similar ideas can be used to show that any functionfsatisfying (P)

To analyze the worst-case performance of Heuristic I, define must also be monotone nondecreasing and homogeneous.

U,,IL,,, if L,, > 0; if U,, > L,, = 0; if U,, = L,,, = 0.

Theorem 4. If L,, > 0 for every arc u + u (edge u - u ) andfsatisfies (P), then Heuristic I has a worst-case bound of max,,, {R,,,}.

Proof. Let xH be the solution obtained by the heuristic and ZH be its value. Let x* be the optimal solution and Z * be the optimal value. Then,

ZH = C c>u)x;,, for some pi,, = 1, . . . , k for every arc u + u 11-u

Since f satisfies (P), the functions Uf,,ld,l, and d,,lL,, attain their maximum at the same arc. Hence,

which implies that

ZH - 5 max {R,,,}. z* M U

In practice, rather than assigning the k paths from the MCNF solution with costs d,, arbitrarily, it would be better to solve for a minimum-cost assignment

Page 9: Finding disjoint paths with different path-costs: Complexity and algorithms

DISJOINT PATHS WITH DIFFERENT PATH-COSTS 661

of the k paths to the k commodities; that is, we can solve the assignment problem API with costs Cij , where Cij is defined as di)(Pj) (the cost of assigning path Pj selected by the heuristic to commodity i). Unfortunately, this does not seem to improve the theoretical worst-case performance.

However, if we choose a different averaging function and use the assignment heuristic, then we can get slightly better worst-case performance. Consider the following heuristic:

Heuristic 11. Step 1: for every arc u - u , compute

Step 2: Solve the Minimum Cost Network Flow (MCNF) problem on G with cost d,,, and capacity 1 for every arc N +. u, supply k at s, and demand k at t . Assign the resulting k paths to the k commodities by solving API.

Note that the comments after Heuristic I about applying it to undirected or

To analyze Heuristic 11, we need to consider the very simple assignment vertex-disjoint cases also apply to Heuristic 11.

problem AP2, which has cost coefficients Cij defined by

the j th path

Thus, for each path Pi, AP2 replaces Cjj by the cost of Pj averaged over all commodities.

Theorem 5. If L,,, > 0 for every arc u +. u (edge N - u ) , then Heuristic I1 has a worst-case bound of max,,, {( 1 l k ) Xi= I c~~)IL, , , } .

Proof. We use the same notations as in the proof of Theorem 4. Note that ( l l k , l / k , . . . , l / k ) is a feasible solution to API and is an optimal solution to AP2 and that

Hence,

optimal value of API 5 optimal value of AP2.

Page 10: Finding disjoint paths with different path-costs: Complexity and algorithms

662 LI, MCCORMICK, AND SIMCHI-LEV1

Thus,

ZH = optimal value of AP,

4 optimal value of AP2

which implies that

Remark 1. Note that Theorems 4 and 5 remain valid even if U,,, = L,,, = 0 for some arc u + u (edge u - u) in the network, as in the case for the dummy arcs that we introduce in the vertex-disjoint case.

Remark 2. have a data-dependent worst-case bound.

In light of Corollary 2, it is not surprising that Heuristics I and I1

Theorem 5 implies that Heuristic I1 has a worst-case bound of

The next theorem shows that the worst-case result in (3.1) is the best possible. Furthermore, the worst-case bound of Heuristic I cannot be less than (3.1).

Theorem 6. There exists a directed (undirected) network for which

ZH - 1 + (k - I)max,,{Ril,} Z* k - -

where ZH is the value of the solution obtained by either Heuristic I or TI. This worst-case behavior remains unchanged even if we allocate commodities to the paths produced by the heuristic using the assignment model.

Page 11: Finding disjoint paths with different path-costs: Complexity and algorithms

DISJOINT PATHS WITH DIFFERENT PATH-COSTS 663

Proof. Consider the directed graph depicted in Figure 4. The numbers on each arc are the costs associated with k commodities, where r > 1. If Heuristic I is used then, since every arc u -, v has L,, = 1 and U,,, = r , and since d,, depends only on L,,, and U,, (by Lemma 31, every arc will have the same value of d,,,. If Heuristic I1 is used, then

1 + (k - l ) r k d.. = Vi-, j . V

Hence, both heuristics may select paths s + 1 + t , s + 2 + t , . . . , s -, k -, t , and, thus,

ZH = 2 + (k - 1) * 2r,

while

Z * = 2k,

which implies that

ZH Z * k k

1 + (k - I)r - 1 + (k - I)max,,+,{Z?,,,} - - - -

Note that solving the assignment problem to select an allocation of the k com- modities to the paths does not change the worst-case result.

The corresponding undirected case can be proved similarly.

FIG. 4.

Page 12: Finding disjoint paths with different path-costs: Complexity and algorithms

664 LI, MCCORMICK, AND SIMCHI-LEV1

When k = 2, the worst-case bound of Heuristic I1 becomes f(1 + max,, {Ruu}). The next theorem says that this bound is best possible among all pseudo- polynomial time heuristics for the directed case unless P = NP.

Theorem 7. If P # NP, then there exists no pseudopolynomial time heuristic with a worst-case bound strictly less than i(1 + max,~,(R,,}) for the directed nonuniform cost two disjoint path problem.

Proof. We use the following result due to Fortune et al. [4]: Given any directed graph G = ( V , A ) and four vertices sI , t l , s2 , t2 E V , the problem of finding two vertex-disjoint (arc-disjoint) paths, one from sI to t l and another one from s2 to t 2 , is NP-complete. We call this problem 2DP (two directed paths). To reduce 2DP problem into our problem, add two new vertices s and t to G = ( V , A ) and define the network G = (9,A) by

9 = v u { s , t } ,

A = A u {S + sI,s + s 2 , t l -+ t , r2 -+ t } ,

where arcs s -+ sI and t l + c have costs (1 ,r) , arcs s + s2 and t2 -+ t have costs (r , l ) , and all other arcs have costs (0,O).

Note that the solution value of the nonuniform cost two disjoint path problem on G is either 4 or at least 2 + 2r. Furthermore, there exist two vertex-disjoint (arc-disjoint) s + t paths in G with a total cost 4 if and only if there exist two vertex-disjoint (arc-disjoint) paths in G connecting sI with t l and s2 with t 2 .

Thus, if there were a pseudopolynomial time heuristic for finding two di- rected nonuniform cost disjoint paths in G with a worst-case bound strictly less than t(l + r ) , then the heuristic would optimally solve the 2DP problem in G .

I This contradicts the assumption that P # NP.

Note that the ideas in this proof can also be used to prove the directed version of Theorem I , but not the undirected case.

4. THE ACYCLIC-DIRECTED CASE

In this section, we consider the special case that the given network is an acyclic-directed network. We describe a polynomial algorithm to solve this problem. This algorithm is an extension of Per1 and Shiloach’s [lo] algorithm for finding two disjoint paths between two pairs of vertices in an acyclic- directed network.

4.1. The Vertex-Disjoint Case

We are given an acyclic-directed network G = ( V , A ) with source s and sink t . We may, without loss of generality, assume that s + t @ A (if arc s + c does exist, we can add a vertex u and replace s + t by s + u and u + t ) . Since G is

Page 13: Finding disjoint paths with different path-costs: Complexity and algorithms

DISJOINT PATHS WITH DIFFERENT PATH-COSTS 665

acyclic, we can renumber the vertices such that arc u +. u exists only if u < u (see [lo]). Note that after renumbering s = 1 and t = IVI.

Define a “k-dimensional” network G = (V ,A) by

v = ( ( ~ 1 , . . . , uk) l u I , . . . , uk E V and (u; f uj if i f j and u;, u, 4 {s, t } ) } ,

where the ‘‘length’’ of arc (u I , . . . , uj-1, uj, u,+I, . . . , ~ k ) += ( U I , . . . , uj I , C;, uj+ I , . . . , u k ) in A is equal to the cost c,,$,). Arcs of the form ( u I , . . . , u j - l , uj, v,+I, . . . , u k ) += ( u I , . . . , ujPl, C,,T~+~, . . . , u k ) are called ‘7th dimensional arcs.” Note that the definition of V implies that (s, . . . , s) and ( f , . . , , t ) belong to V .

Lemma 8. There exist k vertex-disjoint s + t paths PI, . . . , Pk in G with costs c(;)(Pj) = l j ( j = 1, . . . , k) if and only if there exists a directed path P from (s, . . . , s) to ( f , . . . , t ) in G with total jth dimensional arc length = lj ( j = 1, . . . , k).

Proof. (3): Given vertex-disjoint s -+ t paths Pi = uvl + u i ) + . + ut?, i = 1, . . . , k, where uy’ = s and u:! = t . We arrange the arcs of P I , . . . , Pk in ascending order of their tails to form the sequence ( W I +. ZI, w2 - z?, . . . , w,, + z,) with ui” + ,:I), .I2) -+ uf), . . . , uf) + uf) being the first k arcs in the sequence. Note that s = w I = . . = M’k < Wk+l < . . . < w,, and that p = ~ f = ~ (r; - 1). Define a path P = (al, . . . , a,,) in G with arcs a l , . . . , a,, as

a; = (XI , . . . , Xi-] , w;, X,+I, . . . 1 X k ) -+ (XI , . . . , X,-I, zit X,+l, . . . ~ X k ) ,

i fw i -$z i i sonP j , i = k + 1 , . . . , p ,

where (xI, . . . , x,-~, x j , xj+ I , . . . , xk) is the head of arc and wi = X; = min{xl, . . . , xk}. It is easy to check that a l , . . . , a,, are well defined and that P is an (s, . . . , s) +. ( t , . . . , t ) path in G with totaljth dimensional arc length = 1, f o r j = 1, . . . , k.

Page 14: Finding disjoint paths with different path-costs: Complexity and algorithms

666 LI, MCCORMICK, AND SIMCHI-LEV1

(G): Suppose there exists a path P = (x\l), . . . , xi')) + ( x y , . . . , x:") + . . . +. (xp), . . . , xf") in G , where (x;'), . . . , x:') = (s, . ~ . , s). The definition of G implies that for each i = 1, . . . , p , there exists j E (1, . . . , k } such that xF)+ x?+I) E A and xy = xy'l'for every j E (1, . . . , k } \ { j } . Thus, Pj = xjl) + xj2) + . . . + xy), j = 1, . . . , k , are vertex-disjoint s + t paths in G , where x(') = s and xy) = t . Furthermore, c ( j ) (P j ) = totaljth dimensional arc

W

J

length OJfP f o r j = I , . . . , k .

Theorem 9. In an acyclic-directed network, the k vertex-disjoint path prob- lem with nonuniform costs can be solved in O(IVlk I IAI) time.

Proof. From Lemma 8 , our objective is to obtain an (s, . . . 7 s> +

( 1 , . . . , t ) path P in G such that

k k k

2 c( j ) (Pj) = 2 4 = 2 (totaljth dimensional arc length) = length of P j = I j = I j = I

is minimized. Therefore, solving a shortest-path problem on G will provide us with an optimal solution to the original k vertex-disjoint path problem. Note that IA I 5 klvIk- ' IAl and G is an acyclic network. Finding a shortest path on G requires O(lA 1 ) time. Therefore, the computational complexity of this algorithm is O(IVIk-' [At). rn

4.2. The Arc-Disjoint Case

We can transform the acyclic arc-disjoint case to the vertex-disjoint case as follows: Given G , add new vertices u , u and arcs 14 + s and t + u of costs (0, . . . , 0) to G . Now form the directed line-graph (see [6]), calling the vertex corresponding to 11 + s (resp., t -+ u) s' (resp., f). Each arc in the line-graph has costs (0, . . . , 0). Now split each vertex w in the line-graph into an arc wI -+

w2 such that all arcs into (out of) w are into wI (out of w). The costs of arc wI +

w2 are the costs of the arc in G corresponding to MI. Call this new graph G ' = ( V ' , A ' ) . Clearly, G' is acyclic, and there are k vertex-disjoint s ' + t' paths in G' if and only if there are k corresponding arc-disjoint s + t paths in G . This transformation can be accomplished in O(lA1) time, so we can also solve the k arc-disjoint path problem in polynomial time as long as k is a fixed number [the time bounds in Section 4.1 will have JVl replaced by IAl since IV'I = O(lAl)].

We would like to thank Y. Per1 for pointing out several references to us, an anonymous referee for making us improve Heuristic I , and M. Queyranne for helpful discussions about Lemma 3 .

REFERENCES

[ I ] R. K . Ahuja, T. L. Magnanti, and J. B. Orlin (1989). Network flows. Handbooks in Operations Research and Management Science, Vol. I , Optimization (G. L. Nemhauser, A. H. G . Rinnooy Kan, and M. J . Todd, Eds. North-Holland, Am- sterdam (1989).

Page 15: Finding disjoint paths with different path-costs: Complexity and algorithms

DISJOINT PATHS WITH DIFFERENT PATH-COSTS 667

D. Bienstock and M. A. Langston, Algorithmic implications of the graph minor Theorem. To appear. S. Even, A. Itai, and A. Shamir, On the complexity of timetable and multicom- modity flow problems. SIAM J . Comput. 5 (1976) 691-703. S. Fortune, J. Hopcroft, and J. Wyllie, The directed subgraph homeomorphism problem. Theor. Comput. Sci. 10 (1980) 111-121. M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman, San Francisco, CA (1979). F . Harary, Graph Theory. Addison-Wesley, Reading, MA (1972). A. Itai, Y . Perl, and Y . Shiloach, The complexity of finding maximum disjoint paths with length constraints. Networks 12 (1982) 277-286. C. L. Li, S. T . McCormick, and D. Simchi-Levi, The complexity of finding two disjoint paths with min-max objective function. Discrete Appl. Muth. 26( 1) ( 1990). D. Peleg and E. Upfal, Constructing disjoint paths on expander graphs. Symp. Theory Comp. 19 (1987) 264-273. Y . Perl and Y . Shiloach, Finding two disjoint paths between two pairs of vertices in a graph. J . ACM 25(1) (1978) 1-9. N. Robertson and P. D. Seymour, Graph minors. XIII. The disjoint paths prob- lem. To appear. D. Ronen and Y . Perl, Heuristics for finding a maximum number of disjoint bounded paths. Networks 14 (1984) 531-544. Y. Shiloach, A polynomial solution to the undirected two paths problem. J . ACM

J. W. Suurballe, Disjoint paths in a network. Networks 4 (1974) 125-145. J. W. Suurballe and R. E. Tarjan, A quick method for finding shortest pairs of disjoint paths. Networks 14 (1984) 325-336. C. Thomassen, 2-Linked graphs. Eur. J. Combinatorics 1, (1980) 371-378.

27(3) (1980) 445-456.

Received December 1990 Accepted June 1992


Recommended