Finding Disjoint Paths with Different Path-Costs - CiteSeerX

11 downloads 13512 Views 133KB Size Report
The work of all three authors was supported by the Center for Telecommunications ... We call these different media commodities. One issue in improving the reliability .... Our problem is to find k disjoint paths from s to t such that the total cost ∑.
Finding Disjoint Paths with Different Path-Costs: Complexity and Algorithms∗ by Chung-Lun Li† S. Thomas McCormick‡ David Simchi-Levi§

ABSTRACT Consider a network G = (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 the j th edge-cost is associated with the j th path. The problem has several variants: The paths may be vertex-disjoint or arcdisjoint 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.

November 1990 Revised: February 1992 UBC Faculty of Commerce Working Paper 92-MSC-018



The work of all three authors was supported by the Center for Telecommunications Research under NSF Grant CDR 84-21402. † John M. Olin School of Business, Washington University, St. Louis, MO 63130. Work done in part in the IE/OR department at Columbia University. ‡ Faculty of Commerce and Business Administration, University of British Columbia, Vancouver, B.C., V6T 1Y8, Canada. § Department of Industrial Engineering and Operations Research, Columbia University, New York, NY 10027.

0. Introduction 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 improving the reliability is finding two (or more) disjoint routes from a given 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 undirected. 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 si , ti . Fortune, Hopcroft and Wyllie [4] prove that the directed version of this problem is NP-complete for k ≥ 2 (see Garey and Johnson [5] for a background on NP-completeness). Perl and Shiloach [10] present efficient algorithms for some special cases of this problem, and Shiloach [13] presents a polynomial time algorithm for the undirected version of the problem when k = 2. Peleg and Upfal [9] discuss the complexity of constructing disjoint paths between given pairs of vertices on expander interconnection graphs. Robertson and Seymour [11] show how the Graph Minor Theorem provides an algorithm for the undirected disjoint path problem with complexity O(|V |3 ) 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 [16], who completely characterized 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, Perl and Shiloach [7] show that for length greater than four this problem is NP-complete. A polynomial heuristic is given by Ronen and Perl [12], and they proved 1

that this heuristic solves the problem to optimality 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 minimize a specific objective function. This includes minimizing the sum of the costs of the routes (called the min-sum problem) or the cost of the most expensive of the selected routes (called the min-max problem). Previous research has considered the case of a uniform cost structure for the two commodities (“uniform” 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 is given by Suurballe and Tarjan [15]. The min-max version of the problem is much more difficult. Li, McCormick and Simchi-Levi [8] show 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 vertexdisjoint, and the network is either undirected or directed. They also develop a simple and efficient heuristic which has a worst-case relative error equal to 100%, and prove 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 with one commodity (voice) is different from the cost associated with a different commodity (data). In practice, different communications links have different characteristics for different media; thus nonuniform costs are a more realistic 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. 2

1. Notation and Definitions Let G = (V, E) be a network with source s and sink t, and k different nonnegative (1)

(2)

(k)

integral costs cij , cij , . . . , cij on each edge i − j ∈ E. The cost of the j th path Pj is defined as X

c(j) (Pj ) =

c(j) uv .

u−v on Pj

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. Pk Our problem is to find k disjoint paths from s to t such that the total cost j=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 commodities is fixed at two. An instance of 3SAT has variables x1 , x2 , . . . , xn , with each variable xi giving rise to literals xi and xi . It also has clauses C1 , C2 , . . . , Cm , each a 3-subset of literals. A truth assignment is a function τ : {xi } → {true, false}. We say that Cj is satisfied under τ if Cj contains a literal xi with τ (xi ) = true, or literal xi with τ (xi ) = false. The instance asks if there is a truth assignment that simultaneously satisfies all m 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 non-uniform costs in a directed/undirected network is strongly NP-complete. Proof. Obviously, this problem belongs to the class NP. We first prove the directed arcdisjoint version of the problem by reducing 3SAT to the decision version of our problem: 3

Given a directed network with non-negative 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 network G. For each variable xi , let pi be the number of occurrences of variable xi in the clauses, (1)

(2)

and construct a lobe as shown in Figure 1. The label (cuv , cuv ) on arc u → v represents the costs of that arc. The lobes are connected to one another in series with w1 ≡ s and wn+1 ≡ t. For each clause Cj , we add two vertices yj , zj (j = 1, . . . , m) together with arcs s → y1 , zj → yj+1 (j = 1, . . . , m − 1) and zm → t, which have costs (1,0), as shown in Figure 2. Finally, to connect clauses to variables we add the following arcs with costs (1,0): yj → uik and vki → zj ,

if the k th occurrence of variable xi is the literal xi which is a literal in clause Cj ;

yj → uik and v ik → zj ,

if the k th occurrence of variable xi is the literal xi which is a literal in clause Cj .

For example, network G corresponding to instance (x1 ∨ x2 ∨ x3 ) ∧ (x1 ∨ x3 ∨ x4 ) ∧ (x2 ∨ x3 ∨ x4 ) ∧ (x2 ∨ x3 ∨ x4 ) 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 τ that simultaneously satisfies all m clauses, then we select the path which passes through the upper portion of lobe i if τ (xi ) = false and passes through the lower portion if τ (xi ) = true as the first s → t path P1 , with cost 0. Each satisfied clause Cj contains either a literal xi such that τ (xi ) = true or a literal xi such that τ (xi ) = false, which implies that there exists a subpath yj → uik → vki → zj or 4

yj → uik → v ik → zj , which is disjoint with P1 . Hence, there exist at least m such subpaths which, together with arcs s → y1 and zm → t, form an s → t path P2 with cost c(2) (P2 ) = 0 which is arc-disjoint with P1 . Conversely, suppose there exist two arc-disjoint s → t paths with total cost 0. Then path P2 must contain arcs s → y1 and zm → t, and must pass through vertices yj and zj in order of increasing j. On the other hand, path P1 must pass through all the lobes. For i = 1, . . . , n, we set τ (xi ) = true if P1 passes through the lower portion of the ith lobe and τ (xi ) = false otherwise. According to this truth assignment, clause Cj is satisfied since there is an edge in the lobe between yj and zj in P2 . Therefore, all m 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 vertexdisjoint 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 directed/undirected cases of the problem are strongly NP-complete. The reduction in this proof is an elaboration of constructions in Even, Itai and Shamir [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 ≥ 2. Corollary 2: If P6=NP, then any pseudo-polynomial time heuristic for finding k ≥ 2 vertex-disjoint/arc-disjoint s − t paths in a directed/undirected network with different (k)

path-costs has no fixed worst-case bound, even if all cij > 0. Proof. Suppose there exists a pseudo-polynomial time heuristic H for this problem with a fixed worst-case bound B ≥ 1. Then, given any instance of 3SAT, we can construct graph G as given in the proof of Theorem 1 except that we replace each unit cost in G with a cost of B · |E| + 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 |E| and any non-optimal solution has value at least B · |E| + 1, heuristic H will give us a solution with value no 7

more than B · |E| 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 P6=NP.

3. Polynomial-Time Heuristics (1)

(k)

Given a directed network G with k different costs cuv , . . . , cuv on every arc u → v, we define  Uuv = max c(j) uv j

and

 Luv = min c(j) uv . j

A natural heuristic is to define some function f of 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 heuristic:

Heuristic I: Step 1: For every arc u → v, compute (k) duv = f (c(1) uv , . . . , cuv ).

Step 2: Solve the Minimum Cost Network Flow (MCNF) problem on G with cost duv and capacity 1 for every arc u → v, 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 transform it into a directed network by replacing every edge u − v by a pair of arcs u → v and v → u, where duv = dvu , 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 v in G by two vertices v 0 and v 00 and a “dummy” (p)

arc v 0 → v 00 with costs cv 0 v 00 = 0 (p = 1, . . . , k). All arcs into v become incoming arcs of 8

v 0 and all arcs out of v become outgoing arcs of v 00 . 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 − v by arcs u → v and v → 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., [1]). We need f to be well-behaved in order to get a bound on Heuristic I. We consider only functions which are positive when Luv is positive. It turns out that the property that we need to make our analysis work is: (j)

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



max



u→v

Uuv (1)

(k)

f (cuv , . . . , cuv )



and the max in u→v

(k)  (1) f (cuv , . . . , cuv ) . Luv

α 1−α Two families of functions satisfying (P) are αUuv + (1 − α)Luv and Uuv Luv , where

α is any number satisfying 0 ≤ α ≤ 1. Property (P) fairly tightly constrains f as is shown in the following lemma:

Lemma 3: If function f satisfies (P), then the value of f on u → v depends only on Luv (j)

and Uuv , i.e., it is independent of the intermediate cuv ’s. Proof.

Suppose, to the contrary, that the value of f on u → v does depend on some (j)

intermediate cuv ’s. Then there exist (a(1) , . . . , a(k) ) and (b(1) , . . . , b(k) ) such that   max a(1) , . . . , a(k) = max b(1) , . . . , b(k) ≡ U, 9

  min a(1) , . . . , a(k) = min b(1) , . . . , b(k) ≡ L, and f (a(1) , . . . , a(k) ) < f (b(1) , . . . , b(k) ). Now arbitrarily select an arc u0 → v 0 and give it costs a(j) , and give all other arcs costs b(j) . Note that for this set of costs, Luv = L and Uuv = U for all u → v. Thus u0 → v 0 maximizes Uuv (1) (k) f (cuv ,...,cuv )

but does not maximize

(k) f (c(1) uv ,...,cuv ) , Luv

contradicting property (P).

Note that similar ideas can be used to show that any function f satisfying (P) must also be monotone nondecreasing and homogeneous. To analyze the worst-case performance of Heuristic I, define

Ruv

  Uuv /Luv , if Luv > 0; = +∞, if Uuv > Luv = 0;  0, if Uuv = Luv = 0.

Theorem 4: If Luv > 0 for every arc u → v (edge u−v) and f satisfies (P), then Heuristic I  has a worst-case bound of maxu→v Ruv . Proof. Let xH be the solution obtained by the heuristic and Z H be its value. Let x∗ be the optimal solution and Z ∗ be the optimal value. Then ZH =

X

uv ) H c(p xuv , uv

X

Uuv xH uv

for some puv = 1, . . . , k for every arc u → v

u→v



u→v

 Uuv  X · duv xH uv u→v duv u→v   Uuv  X ≤ max · duv x∗uv u→v duv u→v   duv  X  Uuv   · max · Luv x∗uv ≤ max u→v Luv u→v duv u→v   duv  ∗  Uuv   · max ·Z . ≤ max u→v Luv u→v duv





max

10

Since f satisfies (P), the functions Uuv /duv and duv /Luv attain their maximum at the same arc. Hence, 

 Uuv    duv   Uuv · max = max u→v u→v Luv u→v Luv duv

max

which implies that  ZH ≤ max R . uv u→v Z∗

In practice, rather than assigning the k paths from the MCNF solution with costs duv arbitrarily, it would be better to solve for a minimum-cost assignment of the k paths to the k commodities. That is, we can solve the assignment problem AP1 with costs Cij , where Cij is defined as c(i) (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 II: Step 1: For every arc u → v, compute

duv =

k 1 X (p) c . k p=1 uv

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

Note that the comments after Heuristic I about applying it to undirected or vertexdisjoint cases also apply to Heuristic II. 11

To analyze Heuristic II, we need to consider the very simple assignment problem AP2 which has cost coefficients C ij defined by C 1j = C 2j = · · · = C kj =

X

duv

u→v on the j th path

k 1X Cij , = k i=1

for j = 1, . . . , k.

Thus for each path Pj , AP2 replaces Cij by the cost of Pj averaged over all commodities. Theorem 5: If Luv > 0 for every arc u → v (edge u − v) then Heuristic II has a worst-case  Pk (p) bound of maxu→v k1 p=1 cuv /Luv . Proof. We use the same notations as in the proof of Theorem 4. Note that ( k1 , k1 , . . . , k1 ) is a feasible solution to AP1 and is an optimal solution to AP2 , and that k

k X k X

k

1 XX 1 Cij · = C ij · . k k i=1 j=1 i=1 j=1

Hence, optimal value of AP1 ≤ optimal value of AP2 . Thus, Z H = optimal value of AP1 ≤ optimal value of AP2 X = duv xH uv u→v



X

duv x∗uv

u→v

 duv  X · Luv x∗uv u→v Luv u→v   duv  ∗ ≤ max ·Z u→v Luv ≤



max

which implies that k n1 X o ZH (p) ≤ max c /L . uv u→v Z∗ k p=1 uv

12

Remark 1: Note that Theorems 4 and 5 remain valid even if Uuv = Luv = 0 for some arc u → v (edge u − v) in the network, as in the case for the dummy arcs we introduce in the vertex-disjoint case. Remark 2: In light of Corollary 2, it is not surprising that Heuristics I and II have a data dependent worst-case bound. Theorem 5 implies that Heuristic II has a worst-case bound of max u→v

k n1 X

k

p=1

c(p) uv /Luv

o

≤ max u→v

1

k

Luv + k−1 Uuv k Luv



=

1 + (k − 1) maxu→v {Ruv } . k

(3.1)

The next theorem shows that the worst-case result in (3.1) is 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 − 1) maxu→v {Ruv } = , Z∗ k where Z H is the value of the solution obtained by either Heuristic I or II. This worst-case behavior remains unchanged even if we allocate commodities to the paths produced by the heuristic using the assignment model. 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 Luv = 1 and Uuv = r, and since duv depends only on Luv and Uuv (by Lemma 3), every arc will have the same value of duv . If Heuristic II is used then dij =

1 + (k − 1)r k

∀i → j.

Hence, both heuristics may select paths s → 1 → t, s → 2 → t, . . . , s → k → t, and thus Z H = 2 + (k − 1) · 2r, 13

while Z ∗ = 2k, which implies that 1 + (k − 1)r 1 + (k − 1) maxu→v {Ruv } ZH = = . ∗ Z k k Note that solving the assignment problem to select an allocation of the k commodities to the paths does not change the worst-case result. The corresponding undirected case can be proved similarly.

Figure 4

14

When k = 2, the worst-case bound of Heuristic II becomes

1 2

 1 + maxu→v {Ruv } .

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 P6=NP then there exists no pseudo-polynomial time heuristic with a worst case bound strictly less than 12 1 + maxu→v {Ruv } for the directed non-uniform cost two disjoint path problem.

Proof. We use the following result due to Fortune, Hopcroft and Wyllie [4]: Given any directed graph G = (V, A) and four vertices s1 , t1 , s2 , t2 ∈ V , the problem of finding two vertex-disjoint (arc-disjoint) paths, one from s1 to t1 and another one from s2 to t2 , 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 ˆ = (Vˆ , A) ˆ by G Vˆ = V ∪ {s, t}, Aˆ = A ∪ {s → s1 , s → s2 , t1 → t, t2 → t}, where arcs s → s1 and t1 → t have costs (1, r), arcs s → s2 and t2 → t have costs (r, 1) and all other arcs have costs (0, 0). ˆ is Note that the solution value of the non-uniform cost two disjoint path problem on G either 4 or at least 2 + 2r. Furthermore, there exist two vertex-disjoint (arc-disjoint) s → t ˆ with a total cost 4 if and only if there exist two vertex-disjoint (arc-disjoint) paths in G paths in G connecting s1 with t1 and s2 with t2 . Thus if there were a pseudo-polynomial time heuristic for finding two directed nonˆ with a worst-case bound strictly less than 1 (1+r), then the uniform cost disjoint paths in G 2 heuristic would optimally solve the 2DP problem in G. This contradicts the assumption that P6=NP. Note that the ideas in this proof can also be used to prove the directed version of Theorem 1, but not the undirected case. 15

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 Perl and Shiloach’s [10] 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 → t does exist, we can add a vertex u and replace s → t by s → u and u → t). Since G is acyclic, we can renumber the vertices such that arc u → v exists only if u < v (see [10]). Note that after renumbering s = 1 and t = |V |. Define a “k-dimensional” network G = (V , A) by n o / {s, t} , V = hv1 , . . . , vk i v1 , . . . , vk ∈ V and vi 6= vj if i 6= j and vi , vj ∈ A = hv1 , . . . , vj−1 , vj , vj+1 , . . . , vk i → hv1 , . . . , vj−1 , vˆj , vj+1 , . . . , vk i n

o vj → vˆj ∈ A and vj = min{v1 , . . . , vk } ,

where the “length” of arc hv1 , . . . , vj−1 , vj , vj+1 , . . . , vk i → hv1 , . . . , vj−1 , vˆj , vj+1 , . . . , vk i (j)

in A is equal to the cost cvj vˆj .

Arcs of the form hv1 , . . . , vj−1 , vj , vj+1 , . . . , vk i →

hv1 , . . . , vj−1 , vˆj , vj+1 , . . . , vk i are called “j th dimensional arcs”. Note that the definition of V implies that hs, . . . , si and ht, . . . , ti belong to V . Lemma 8: There exist k vertex-disjoint s → t paths P1 , . . . , Pk in G with costs c(j) (Pj ) = lj (j = 1, . . . , k) if and only if there exists a directed path P from hs, . . . , si to ht, . . . , ti in G with total j th dimensional arc length = lj (j = 1, . . . , k). (i)

(i)

(i)

Proof. (⇒): Given vertex-disjoint s → t paths Pi ≡ u1 → u2 → · · · → uri , i = 1, . . . , k, (i)

(i)

where u1 = s and uri = t. We arrange the arcs of P1 , . . . , Pk in ascending order of their 16

(1)

(1)

(2)

tails to form the sequence (w1 → z1 , w2 → z2 , . . . , wρ → zρ ) with u1 → u2 , u1 → (2)

(k)

(k)

u2 , . . . , u1 → u2 wk < wk+1

being the first k arcs in the sequence. Note that s = w1 = · · · = Pk < · · · < wρ and that ρ = i=1 (ri − 1). Define a path P = (a1 , . . . , aρ ) in G

with arcs a1 , . . . , aρ as

a1 = hw1 , s, . . . , si → hz1 , s, . . . , si a2 = hz1 , w2 , s, . . . , si → hz1 , z2 , s, . . . , si .. . ak−1 = hz1 , . . . , zk−2 , wk−1 , si → hz1 , . . . , zk−2 , zk−1 , si ak = hz1 , . . . , zk−1 , wk i → hz1 , . . . , zk−1 , zk i ai = hx1 , . . . , xj−1 , wi , xj+1 , . . . , xk i → hx1 , . . . , xj−1 , zi , xj+1 , . . . , xk i, if wi → zi is on Pj ,

i = k + 1, . . . , ρ,

where hx1 , . . . , xj−1 , xj , xj+1 , . . . , xk i is the head of arc ai−1 and wi ≡ xj = min{x1 , . . . , xk }. It is easy to check that a1 , . . . , aρ are well-defined and that P is an hs, . . . , si → ht, . . . , ti path in G with total j th dimensional arc length = lj for j = 1, . . . , k. (1)

(1)

(2)

(2)

(⇐): Suppose there exists a path P ≡ hx1 , . . . , xk i → hx1 , . . . , xk i → · · · → (ρ)

(ρ)

(1)

(1)

hx1 , . . . , xk i in G, where hx1 , . . . , xk i = hs, . . . , si. The definition of G implies that for (i) (i+1) (i) (i+1) each i = 1, . . . , ρ, there exists ˆj ∈ {1, . . . , k} such that xˆj → xˆj ∈ A and xj = xj (1) (2) (ρ) for every j ∈ {1, . . . , k} \ {ˆj}. Thus, Pj ≡ xj → xj → . . . → xj , j = 1, . . . , k, are (1)

vertex-disjoint s → t paths in G, where xj

(ρ)

= s and xj

= t. Furthermore, c(j) (Pj ) =

total j th dimensional arc length of P for j = 1, . . . , k. Theorem 9: In an acyclic directed network, the k vertex-disjoint path problem with k−1

non-uniform costs can be solved in O(|V |

|A|) time.

Proof. From Lemma 8, our objective is to obtain an hs, . . . , si → ht, . . . , ti path P in G such that k X j=1

(j)

c

(Pj ) =

k X j=1

k X lj = (total j th dimensional arc length) = length of P j=1

17

is minimized. Therefore, solving a shortest path problem on G will provide us with an opk−1

timal solution to the original k vertex-disjoint path problem. Note that |A| ≤ k |V |

|A|

and G is an acyclic network. Finding a shortest path on G requires O(|A|) time. Therefore, the computational complexity of this algorithm is O(|V |

k−1

|A|).

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, v and arcs u → s and t → v of costs (0, . . . , 0) to G. Now form the directed line-graph (see [6]), calling the vertex corresponding to u → s (resp. t → v) s0 (resp. t0 ). Each arc in the line-graph has costs (0, . . . , 0). Now split each vertex w in the line graph into an arc w1 → w2 such that all arcs into (out of) w are into w1 (out of w2 ). The costs of arc w1 → w2 are the costs of the arc in G corresponding to w. Call this new graph G0 = (V 0 , A0 ). Clearly G0 is acyclic, and there are k vertex-disjoint s0 → t0 paths in G0 if and only if there are k corresponding arc-disjoint s → t paths in G. This transformation can be accomplished in O(|A|) 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 |V | replaced by |A| since |V 0 | = O(|A|)).

Acknowledgements We would like to thank Y. Perl 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.

18

References: [1] Ahuja, R. K., T. L. Magnanti and J. B. Orlin (1989). Network Flows. Nemhauser, G. L., A. H. G. Rinnooy Kan and M. J. Todd (eds.), Handbooks in Operations Research and Management Science, Volume 1, Optimization, North-Holland. [2] Bienstock, D. and M. A. Langston (1992). Algorithmic Implications of the Graph Minor Theorem, to appear. [3] Even, S., A. Itai and A. Shamir (1976). On the Complexity of Timetable and Multicommodity Flow Problems, SIAM J. Computing, 5, pp. 691–703. [4] Fortune, S., J. Hopcroft and J. Wyllie (1980). The Directed Subgraph Homeomorphism Problem, Theoretical Computer Science, 10, pp. 111–121. [5] Garey, M. R. and D. S. Johnson (1979). Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, San Francisco, CA. [6] Harary, F. (1972). Graph Theory, Addison-Wesley, Reading, MA. [7] Itai, A., Y. Perl and Y. Shiloach (1982). The Complexity of Finding Maximum Disjoint Paths with Length Constraints, Networks, 12, pp. 277–286. [8] Li, C. L., S. T. McCormick and D. Simchi-Levi (1990). The Complexity of Finding Two Disjoint Paths with Min-Max Objective Function, Discrete App. Math., 26, 1, pp. 105–115. [9] Peleg, D. and E. Upfal (1987). Constructing Disjoint Paths on Expander Graphs, Symposium on Theory of Computing, 19, pp. 264–273. [10] Perl, Y. and Y. Shiloach (1978). Finding Two Disjoint Paths Between Two Pairs of Vertices in a Graph, J. ACM, 25, 1, pp. 1–9. [11] Robertson, N. and P. D. Seymour (1986). Graph Minors. XIII. The Disjoint Paths Problem, to appear. [12] Ronen, D. and Y. Perl (1984). Heuristics for Finding a Maximum Number of Disjoint Bounded Paths, Networks, 14, pp. 531–544. [13] Shiloach, Y. (1980). A Polynomial Solution to the Undirected Two Paths Problem, 19

J. ACM, 27, 3, pp. 445–456. [14] Suurballe, J. W. (1974). Disjoint Paths in a Network, Networks, 4, pp. 125–145. [15] Suurballe, J. W. and R. E. Tarjan (1984). A Quick Method for Finding Shortest Pairs of Disjoint Paths, Networks, 14, pp. 325–336. [16] Thomassen, C. (1980). 2-Linked Graphs, Europ. J. Combinatorics, 1, pp. 371-378.

20

Suggest Documents