The Point-to-Point Delivery and Connection Problems - CiteSeerX

16 downloads 2776 Views 209KB Size Report
underlying network is a grid with sources on one side, destinations on the other. ... A point-to-point delivery network is a network containing terminal vertices and ...
The Point-to-Point Delivery and Connection Problems: Complexity and Algorithms∗ by Chung-Lun Li† S. Thomas McCormick‡ David Simchi-Levi§

ABSTRACT We consider the computational complexity of point-to-point delivery problems. These problems involve shipping one item from each one of p sources to p destinations. The destinations might be pre-matched to sources (the fixed destination case), or a source’s item might go to any destination (the non-fixed destination case). The networks can be directed or undirected. Up to K items at once can share a truck on an arc, and costs are linear in the number of trucks used. We also consider the closely related point-to-point connection problems, which are to find a minimum cost arc subset connecting sources with destinations. We find that all variations of both problems are strongly NP-hard for all K ≥ 2, but that there are polynomial algorithms in some cases if p is fixed, or if the underlying network is a grid with sources on one side, destinations on the other.

September 1988 Revised April 1989 Revised March 1990



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. The author was a graduate student at Columbia University while this work was being done. ‡ Faculty of Commerce and Business Administration, University of British Columbia, Vancouver, B.C., V6T 1Y8, Canada. Work done in part in the IE/OR department at Columbia University. § Department of Industrial Engineering and Operations Research, Columbia University, New York, NY 10027.

1. Introduction A point-to-point delivery network is a network containing terminal vertices and distribution centers. All traffic originates at and is destined for terminal vertices (consisting of source vertices and destination vertices), while distribution centers are vertices for intermediate transshipment. Our objective is to use trucks to ship one item of a single good from each source vertex, and to have one item reach each destination vertex, so as to minimize the total transportation cost, subject to a constraint on truck capacity. This problem has applications in routing, package delivery, mail delivery and rail freight shipping. Detailed descriptions of such problems are given in Leung, Magnanti and Singhal [13], which also gives heuristic algorithms. In this paper, we discuss the complexity of and optimal algorithms for various cases of the point-to-point delivery problem where the only cost is linear in the number of trucks used on each arc, and where all the trucks have the same capacity. (In particular, there is no cost incurred in returning empty trucks to where they started.) We also discuss a problem called the point-to-point connection problem, which is to find a minimum cost arc subset containing paths connecting each source-destination pair. This connection problem is closely related to the point-to-point delivery problem with “large” truck capacities, and has numerous applications in circuit switching and VLSI design (see [11]). The “routes” represent the wires used for connecting source and destination points on a circuit board or chip. An important special case of the connection problem in VLSI is when the underlying graph is a grid network. Connection problems are also closely related to Steiner tree problems (see [5]). In Section 2, we give the definitions of different variants of the point-to-point delivery and connection problems. In Section 3, we prove that the point-to-point delivery problem with a truck size greater than one, and the point-to-point connection problem, are both strongly NP-hard in general (see Garey and Johnson [10] for a background on NP-hardness). In Section 4, we give polynomial time algorithms for many cases of the 1

problems when the number of source-destination pairs is fixed. In Section 5, we consider a special case of the point-to-point connection problem in which the given network is a grid. Efficient algorithms are given for the so-called two-sided case where the sources are located at one side of the grid and the destinations are located at the opposite side.

2. Definitions and Notation Let G = (V, A) be a network with sources s1 , . . . , sp ∈ V , destinations t1 , . . . , tp ∈ V , and a nonnegative integral cost cuv for each arc u → v ∈ A. Each source has a supply of one item and each destination has a demand of one item. The point-to-point delivery problem is the problem of shipping the p items from the sources to the destinations so as to minimize the total transportation cost, which is defined as follows: If an item wants to traverse arc u → v, when it arrives at vertex u it can wait (at no cost) for other items that want to traverse arc u → v to arrive at u, and can then share a truck along u → v with them. However, each truck has a positive integral capacity of K items. The cost of dispatching each truck along arc u → v is cuv , and the transportation cost on arc u → v depends only on the number of trucks traveling along it. That is, if nuv trucks are used P on arc u → v, then the total transportation cost is u→v∈A cuv nuv , and at most K ·nuv

items can be shipped along u → v. Throughout this paper we assume that all trucks have the same capacity, and that exactly one item is sent from every source si and exactly one item arrives at every destination ti . However, since vertices s1 , . . . , sp , t1 , . . . , tp need not be distinct, supplies and demands larger than one can be handled as well. There are several variants of the problem: the network G can be directed or undirected; the item arriving at destination ti can be required to originate from source si (this is called the fixed destination case), or can be allowed to originate from any source sj , j = 1, . . . , p (this is called the non-fixed destination case). That is, in both fixed and non-fixed destination cases, p items are shipped from the sources to the destinations. In the fixed destination case the j th item is shipped from sj to tj (j = 1, . . . , p), while in the 2

non-fixed destination case, for some permutation π, the j th item is shipped from sπ(j) to tj (j = 1, . . . , p). The point-to-point connection problem is defined as follows: Given network G = (V, A) with sources s1 , . . . , sp and destinations t1 , . . . , tp , and a nonnegative integral cost (or length) cuv for each arc u → v ∈ A, find a subset of arcs A0 ⊆ A such that each sourceP destination pair is connected by a path using only arcs in A0 , and such that u→v∈A0 cuv

is minimized. As in the point-to-point delivery problem, the connection problem also has four different versions depending on whether G is directed or undirected, and whether the destinations are fixed or non-fixed. Note that if si = s, i = 1, . . . , p, then the fixed/non-fixed destination connection problem is equivalent to a Steiner tree problem (see [5]) which requires vertices s, t1 , . . . , tp to be connected by a Steiner tree. Both the directed and undirected versions of the Steiner tree problem are known to be NP-complete (see [10]). Also, if the given network G is an acyclic directed network, the point-to-point connection problem is equivalent to the point-to-point delivery problem with K “large” (K = p suffices). However, if the directed network G is not acyclic, these problems are different. For example, consider the network depicted in Figure 1, where the label on arc u → v is its cost cuv , represents a source or destination vertex, and

represents a transshipment

vertex. The optimal solution to the fixed destination point-to-point connection problem on this network is to use the heavy arcs s1 → u1 , u1 → u2 , u2 → u3 , u3 → u4 , u4 → t1 , s2 → u3 , u4 → u1 and u2 → t2 , with total cost 26. On the other hand, the optimal solution to the fixed destination point-to-point delivery problem with K = 2 on this network is to select the paths s1 → u5 → t1 and s2 → u5 → t2 for items 1 and 2, respectively, with total cost 30. If we try to use the optimal solution to the point-to-point connection problem for the delivery problem, we send item 1 on path s1 → u1 → u2 → u3 → u4 → t1 , and item 2 on path s2 → u3 → u4 → u1 → u2 → t2 . This solution is not optimal for the delivery problem since, although both items traverse arcs u1 → u2 and u3 → u4 , item 1 goes through arc u1 → u2 3

before traversing arc u3 → u4 , while item 2 goes through arc u3 → u4 first in order to get to u1 → u2 . Thus if the items share a truck on arc u1 → u2 they must use different trucks on arc u3 → u4 (and vice versa), driving the cost of this solution up to 36. Constraints of this kind where one truck has to be dispatched prior to another are called time constraints. s1

s2

1

5

u1

s1

10

s2

10 10

u2 1

1

u1

u5

1

u3

10

10

10

1

10

t2

10

u2

t1

10

Figure 2

u4 1

5

t1

t2 Figure 1

Now consider the undirected network depicted in Figure 2. The optimal value of the fixed destination point-to-point connection problem is 50, while the optimal value of the fixed destination delivery problem with a truck size K = 2 on this network is 60. This is because we need two trucks on the edge u1 − u2 , one traveling from u1 to u2 and the other from u2 to u1 . This type of constraint, which says that the cost is counted twice when a truck travels in both directions on an undirected edge, is called an orientation constraint. Note that it appears only in undirected fixed destination delivery problems. When the truck size K is equal to 1, the fixed destination case of the point-to-point 4

delivery problem can be easily solved via (polynomial time) shortest path algorithms (see [4], [8]), and the non-fixed destination case can be easily solved by (polynomial time) minimum cost network flow algorithms (see [4]). Similarly, when all sources are identical, and also all destinations are identical, the problem is again polynomially solvable by shortest path algorithms. To keep track of the many different variations of these two problems, we develop a shorthand notation. In it, each problem is represented by three components separated by slashes: The first component is either C, which means the problem is a point-to-point connection problem, or DK , which means the problem is a point-to-point delivery problem with truck size K (K = 1, 2, . . .). The second component is either f or n depending on whether the problem has fixed destinations or non-fixed destinations. The third component can be d, u, g or gt , where d means that the underlying graph is directed, u means that the underlying graph is undirected, g means that the given network is a grid, and gt means that the grid network is two-sided. For example, D2 /f /u represents the fixed destination pointto-point delivery problem on an undirected network with truck size K = 2, and C/n/ud represents both the directed and undirected cases of the non-fixed destination point-topoint connection problem.

3. NP-Hardness In this section, we prove that all four point-to-point delivery problems on general graphs for any fixed K ≥ 2 are strongly NP-hard in general, as are all four point-to-point connection problems. The “strong” part of “strongly NP-hard” will follow in each case from the fact that our reductions involve only arcs with cost bounded by a polynomial in the input size. Since such arcs can be replaced by a path of arcs of cost 1 without sacrificing polynomiality, the problems are NP-hard even if we restrict the arc costs to by 0 or 1. None of the proofs in this section make use of time or orientation constraints, so the results apply to problems without these constraints as well. The proofs are by reduction 5

from the known NP-complete problems 3-Satisfiability (3SAT) and Exact cover by 3-sets (X3C) (see Garey and Johnson [10]). Theorem 1: D2 /f /d is strongly NP-hard. Proof.

We reduce 3SAT to the decision version of D2 /f /d, which asks if there is a

routing with total cost at most M . Let X = {x1 , . . . , xn } be the set of variables and C = {c1 , . . . , cm } be the set of clauses in an arbitrary instance of 3SAT. We define M = 3m and construct a directed network G as follows. For each variable xi , let qi be the number of occurrences of literals xi and x ¯i in the clauses, and construct a lobe as shown in Figure 3 (the labels on the arcs are costs of dispatching a truck over the arc). Vertices s0i and t0i form a source-destination pair. s0i 0

0

u1i

u ¯1i

1

1

v¯i1

vi1 0

0

u2i

u ¯2i

1

1

vi2 .. .

v¯i2 .. .

uqi i

u ¯qi i

1

1

viqi

v¯iqi

0

0

t0i Figure 3 6

For each clause cj , we add a source-destination pair s00j , t00j together with the following arcs with zero costs: s00j → uki and vik → t00j ,

if the k th occurrence of variable xi is the literal xi in clause j;

s00j → u ¯ki and v¯ik → t00j ,

if the k th occurrence of variable xi is the literal x ¯i in clause j.

For example, the network corresponding to the instance (x1 ∨ x2 ∨ x3 ) ∧ (x1 ∨ x ¯2 ∨ x4 ) ∧ (¯ x1 ∨ x ¯3 ∨ x ¯4 )

(3.1)

is depicted in Figure 4.

s02

s01 0

0

0

s03 0

0

s001

s04 0

0

0

0

s002

0

s003

0

0

1

1

1

1

1

1

1

1

0

0

0

0

0

0

0

0

0

0 0

0

1

1

0

0

0 0

1

1

1

1

1

1

1

1

0

0

0

0

0

0

t01

0

0

t02

0

0

t03

0

0

Figure 4

7

t04

0

t001

t002

0

0

0

t003

Clearly, network G can be constructed in polynomial time. Therefore, it suffices to show that there exists a truth assignment that simultaneously satisfies all m clauses if and only if there exists a solution to the point-to-point delivery problem on G with total cost at most M . Suppose there exists a truth assignment τ that simultaneously satisfies all m clauses. For every i = 1, . . . , n, we select the path s0i → t0i which passes through the left portion of lobe i if τ (xi ) = true and passes through the right portion if τ (xi ) = false. The total cost Pn in selecting these paths is i=1 qi = 3m. For j = 1, . . . , m, since cj is satisfied by τ , either (i) there exists literal xi in cj such that τ (xi ) = true, or (ii) there exists literal x ¯i in cj

such that τ (xi ) = false. In either case, define k such that the k th occurrence of variable xi is in cj . In case (i), we can select the path s00j → uki → vik → t00j without incurring any additional cost. In case (ii), we can select the path s00j → u ¯ki → vik → t00j without incurring any additional cost. Hence, the point-to-point delivery problem has a solution with total cost 3m. In example (3.1), a satisfying truth assignment is τ = (T, T, F, F ). A possible set of paths with total cost 3m = 9 is shown in heavy arcs on Figure 4. Conversely, suppose there exists a solution to the point-to-point delivery problem with total cost at most 3m. Note that there exist exactly two paths connecting s0i to t0i , one on the left side of lobe i and the other on the right. Each of these two paths has exactly the same cost (qi ), and the total cost of selecting one path from each of the n (s0i , t0i ) pairs is 3m = M . Then for i = 1, . . . , n, we can define τ (xi ) = true if s0i is connected to t0i through the left portion of lobe i, and τ (xi ) = false otherwise. To avoid incurring any extra cost, the items originating at s001 , . . . , s00m must be able to share the trucks on the lobes. This implies that for j = 1, . . . , m, either there exists literal xi in clause cj with τ (xi ) = true, or there exists literal x ¯i in clause cj with τ (xi ) = false. Therefore, τ satisfies all m clauses.

The reduction in this proof is an elaboration of constructions in Li, McCormick and 8

Simchi-Levi [14] and Even, Itai and Shamir [7] (who coined the term “lobe”).

Corollary 2: D2 /f /u is strongly NP-hard.

Proof. Modify the proof of Theorem 1 by replacing all directed arcs in G by undirected edges and changing the costs of the edges s00j − uki , vik − t00j , s00j − u ¯ki , v¯ik − t00j from zero to L = 3m. This prevents a path starting at s0i from using an uki − s00j arc, and thereby possibly bypassing lobe i, as well as other difficulties. Then there exists a truth assignment that simultaneously satisfies all m clauses if and only if there exists a solution to DK /f /u on G with total cost no greater than 3m + 2Lm.

Theorem 3: D2 /n/d is strongly NP-hard.

Proof.

3SAT remains NP-complete if for each variable x there are at most 4 clauses

that contain the literal x and at most 4 clauses that contain x ¯ (see Garey and Johnson [10]). We call this restricted version Sparse 3SAT, and reduce it to our point-to-point delivery problem. Let X = {x1 , . . . , xn } be the set of variables and C = {c1 , . . . , cm } be the set of clauses in an instance of Sparse 3SAT. We define M = 60n2 + 4n and construct a directed network G as follows. For each variable xi , we construct a subgraph Gi β γ δ 1 8 8 α β γ δ 1 with sources sα i , si , si , si , si , . . . , si , destinations ti , ti , ti , ti , ti , . . . , ti and transshipment

vertices wi0 , wi1 , wi2 , yi1 , . . . , yi4 , zi1 , . . . , zi8 , u1i , . . . , u8i , vi1 , . . . , vi4 as shown in Figure 5 (the labels on the arcs are costs of dispatching a truck). For each clause cj , we add a source s00j and a destination t00j and connect them to the 9

Gi ’s by the following arcs with zero costs: s00j → u1i and vi1 → t00j ,

if the 1st occurrence of literal xi appears in cj ;

s00j → u2i and vi3 → t00j ,

if the 2nd occurrence of literal xi appears in cj ;

s00j → u3i and vi2 → t00j ,

if the 3rd occurrence of literal xi appears in cj ;

s00j → u4i and vi4 → t00j ,

if the 4th occurrence of literal xi appears in cj ;

s00j → u5i and vi1 → t00j ,

if the 1st occurrence of literal x ¯i appears in cj ;

s00j → u6i and vi2 → t00j ,

if the 2nd occurrence of literal x ¯i appears in cj ;

s00j → u7i and vi3 → t00j ,

if the 3rd occurrence of literal x ¯i appears in cj ;

s00j → u8i and vi4 → t00j ,

if the 4th occurrence of literal x ¯i appears in cj .

(If literal xi appears in clauses only twice, for example, then the third and fourth sets of arcs will not be added.) Clearly, network G can be constructed in polynomial time. Therefore, it suffices to show that there exists a truth assignment that simultaneously satisfies all m clauses if and only if there exists a solution to D2 /n/d with a total cost at most M . Suppose there exists a truth assignment τ that simultaneously satisfies all m clauses. Then for every i = 1, . . . , n, if τ (xi ) = true we select paths 0 1 1 1 1 1 α sα i → wi → wi → yi → zi → ui → vi → ti ,

sβi → wi0 → wi1 → yi1 → zi2 → u2i → vi3 → tγi , sγi → wi0 → wi1 → yi2 → zi3 → u3i → vi2 → tβi , and sδi → wi0 → wi1 → yi2 → zi4 → u4i → vi4 → tδi , whereas if τ (xi ) = false we select paths 0 2 3 5 5 1 α sα i → wi → wi → yi → zi → ui → vi → ti ,

sβi → wi0 → wi2 → yi3 → zi6 → u6i → vi2 → tβi , 11

sγi → wi0 → wi2 → yi4 → zi7 → u7i → vi3 → tγi , and sδi → wi0 → wi2 → yi4 → zi8 → u8i → vi4 → tδi . dk/2e

These paths, together with the paths ski → yi

→ zik → tki (k = 1, . . . , 8), incur a cost of

60n + 4 for each i (note that we need two trucks from wi0 to wi1 or wi2 , and at most one truck on each of the other arcs). Hence, the total cost incurred in selecting these paths is 60n2 + 4n. For j = 1, . . . , m, since cj is satisfied by τ , either (i) there exists a literal xi in cj such that τ (xi ) = true, or (ii) there exists a literal x ¯i in cj such that τ (xi ) = false. In case (i), one of the following paths exists and selecting this path does not incur any additional cost: s00j → u1i → vi1 → t00j , s00j → u2i → vi3 → t00j , s00j → u3i → vi2 → t00j , s00j → u4i → vi4 → t00j . In case (ii), one of the following paths exists and selecting this path does not incur any additional cost: s00j → u5i → vi1 → t00j , s00j → u6i → vi2 → t00j , s00j → u7i → vi3 → t00j , s00j → u8i → vi4 → t00j . Therefore, the point-to-point delivery problem has a solution with total cost at most 60n2 + 4n. Note that in this solution each of the “expensive” arcs (above the level of the yi ’s) is used an even number of times, i.e., there is no cost incurred by using trucks which are not filled to capacity. To prove the other direction, we assume that there exists a solution to the point-topoint delivery problem with total cost no greater than 60n2 +4n. For i = 1, . . . , n, sending 4 γ β δ items from sα i , si , si , si to the yi ’s requires a cost of 20n or more, and sending 8 items from

12

s1i , . . . , s8i to t1i , . . . , t8i requires a cost of 40n (here we assume, without loss of generality, that the items originating at s1i , . . . , s8i arrive at t1i , . . . , t8i , respectively), which implies that γ β δ 1 8 it costs at least 60n2 units to connect all the sα i , si , si , si , si , . . . , si to the ui ’s and ti ’s.

Furthermore, it costs at least 4n units to send all the items through the gap between all the u’s and v’s so that exactly one item can arrive at every tki (k = α, β, γ, δ, 1, . . . , 8). γ β δ 1 8 1 8 Hence, for every i = 1, . . . , n, sending items from sα i , si , si , si , si , . . . , si to zi , . . . , zi

should cost no more than 60n units (since the total cost is at most 60n2 +4n). This implies β γ δ k that the 4 items originating at sα i , si , si , si must arrive at different zi ’s in subgraph Gi

(still assuming that the items originating at s1i , . . . , s8i arrive at t1i , . . . , t8i , respectively). Suppose, for some i, we dispatch one truck from wi0 to wi1 (carrying 2 items) and another truck from wi0 to wi2 (carrying 2 items). Because of the cost limit of 60n + 4 for subgraph Gi , the two items at wi1 (respectively wi2 ) have to share a truck to the yi ’s, which implies that they will go pass u1i and u2i , or u3i and u4i (respectively u5i and u6i , or u7i and u8i ). Due to the asymmetric structure of the arcs linking the ui ’s and the vi ’s, these 4 items cannot arrive directly to 4 different vi ’s (they cannot arrive at other vl ’s, l 6= i, either). This implies that we incur an additional cost in sending an item from another source to the vi which has a shortage, pushing our cost above 60n2 + 4n. Therefore, the only possibility is either to dispatch 2 trucks from wi0 to wi1 or to dispatch 2 trucks from wi0 to wi2 for every i. We define τ (xi ) = true if arc wi0 → wi1 is selected and τ (xi ) = false if arc wi0 → wi2 is selected. Note that if arc wi0 → wi1 is selected, the arcs u1i → vi1 , u2i → vi3 , u3i → vi2 , u4i → vi4 will be used. If arc wi0 → wi2 is selected, the arcs u5i → vi1 , u6i → vi2 , u7i → vi3 , u8i → vi4 will be used. Since the total cost is no greater than 60n2 + 4n, the items originating at the s00j ’s must be able to share the truck originally scheduled on the Gi ’s. This implies that for j = 1, . . . , m, either there exists literal xi in clause cj with τ (xi ) = true or there exists literal x ¯i in clause cj with τ (xi ) = false. Therefore, τ satisfies all m clauses. Corollary 4: D2 /n/u is strongly NP-hard. Proof. We modify the proof of Theorem 3 by replacing all directed arcs in G by undirected 13

edges and changing the costs of the edges s00j − uki and vik − t00j from zero to L = 60n2 + 4n. This use of L is similar to that in Corollary 2. Then an easy extension of the proof of Theorem 3 shows that there exists a truth assignment that simultaneously satisfies all m clauses if and only if there exists a solution to D2 /n/u on G with total cost at most 60n2 + 4n + 2Lm. Rather than generalize the preceding proofs for K ≥ 3, we employ instead a much simpler proof (that fails for K = 2) as follows.

Theorem 5: DK /fn /d is strongly NP-hard for any fixed K ≥ 3.

Proof.

We transform X3C to DK /fn /d. Let X = {x1 , . . . , x3q } and C = {c1 , . . . , cr },

a collection of 3-element subsets of X, be an instance of X3C. We define M = q and construct a directed network G with 3q source nodes s1 , . . . , s3q . The corresponding destinations t1 , . . . , t3q are all equal to the same node tˆ. Thus the resulting problem is a special case of both the fixed destination and non-fixed destination variants. For each cj = {xj1 , xj2 , xj3 } ∈ C, we construct vertices uj , vj and arc uj → vj with unit cost, and add the zero-cost arcs sj1 → uj , sj2 → uj , sj3 → uj , vj → tˆ. For example, network G corresponding to instance

X = {x1 , x2 , x3 , x4 , x5 , x6 },  C = {x1 , x2 , x3 }, {x1 , x3 , x5 }, {x2 , x4 , x6 }, {x2 , x5 , x6 }

(3.2)

is depicted in Figure 6. Network G can clearly be constructed in polynomial time. Therefore, it suffices to S show that there exists C 0 ⊆ C such that |C 0 | = q and c∈C 0 c = X if and only if there

exists a solution to the point-to-point fixed/non-fixed destination delivery problem on G with total cost no greater than M . 14

s1

s2

s3

s4

s5

s6

0 0

0

0 0

0

0 0 0

0

0

0

u1

u2

u3

u4

1

1

1

1

v1

v2

v3

v4

0

0

0

0

tˆ Figure 6

Suppose there exists C 0 ⊆ C such that |C 0 | = q and

S

c∈C 0

c = X. For every cj ∈ C 0 ,

where cj = {xj1 , xj2 , xj3 }, we select the paths sjk → uj → vj → tˆ, k = 1, 2, 3. Since C 0 is a cover, all si , ti pairs are connected, and the total cost of selecting all these 3q paths is q. In example (3.2), C 0 = {c2 , c3 } is an exact cover, and thus we can select the heavy paths shown in Figure 6. Conversely, if there exists a solution to the fixed/non-fixed destination delivery problem on G with total cost no greater than M , then at most M of the arcs uj → vj (j = 1, . . . , r) are contained in the solution. Taking C 0 = {cj | uj → vj is contained in the solution}, we have |C 0 | ≤ q and

S

c∈C 0

c = X.

Note that the above arguments are independent of the value of K (as long as K ≥ 3).

Corollary 6: DK /fn /u is strongly NP-hard for any fixed K ≥ 3. 15

Proof. To derive the undirected version of Theorem 5, we simply change all directed arcs in G into undirected edges and change all the zero-cost arcs into edges with cost L = q. As in Corollary 2, letting M = q + 6Lq and following the same argument as in the proof of Theorem 5, it is easy to check that there exists a solution to DK /fn /u on G with total cost S no greater than M if and only if there exists C 0 ⊆ C such that |C 0 | = q and c∈C 0 c = X.

Remark 7: C/fn /ud is strongly NP-hard. Proof. With K = 3, the point-to-point delivery problem on the network constructed in the proof of Theorem 5 becomes the point-to-point connection problem and the proofs of Theorem 5 and Corollary 6 are still valid. (It can be checked that the time and orientation constraints do not interfere here.) Therefore, both C/fn /u and C/fn /d are strongly NP-hard. (Also, as mentioned in Section 2, a Steiner tree proof also works.)

4. Fixed Number of Sources/Destinations

4.1. The point-to-point delivery problem We now present a polynomial time algorithm for the special case of the point-to-point delivery problem where p, the number of sources/destinations, is fixed. For the undirected case, we can easily reduce it to the directed case by replacing each edge i − j by a pair of directed arcs i → j and j → i (which will ensure that all orientation constraints are satisfied). Hence, we consider here only the case where the given network G = (V, A) is directed. Let G = (V , A) be defined by:  V = hu1 , . . . , up i ui ∈ V, i = 1, . . . , p = V ×V × · · · ×V , | {z } p times

16

     

 the number of i’s such that ui 6= vi is     at least one and at most K, and there  A = hu1 , . . . , up i → hv1 , . . . , vp i ,   is an arc u → v ∈ A such that for        every i with ui 6= vi , ui = u and vi = v.  where the length of arc hu1 , . . . , up i → hv1 , . . . , vp i is the same as the length (or cost) of the arc u → v. For example, given a network G as shown in Figure 7 with p = 2, the corresponding G is depicted in Figure 8. Let s1 , . . . , sp and t1 , . . . , tp be the sources and destinations in G. In G, each vertex represents a potential current location of the p items originating from s1 , . . . , sp . That is, vertex hu1 , . . . , up i represents the state where item i is currently at vertex ui in G, i = 1, . . . , p. Each arc hu1 , . . . , up i → hv1 , . . . , vp i represents a single truck delivery across arc u → v changing the current state from hu1 , . . . , up i to hv1 , . . . , vp i. Therefore, a shortest path from hs1 , . . . , sp i to ht1 , . . . , tp i in G will give us an optimal solution to the point-topoint delivery problem with fixed destinations. Since the order of the arcs on the path in G effectively sequences the trucks in time, it is easy to check that all time constraints will be satisfied. For the non-fixed destination case, we add a source vertex s¯ to G together with zero-length arcs s¯ → hsπ(1), sπ(2), . . . , sπ(p)i for every permutation (π(1), π(2), . . . , π(p)) of (1, 2, . . . , p). The non-fixed destination problem can then be solved by finding a shortest path from s¯ to ht1 , . . . , tp i. p

Theorem 8: DK /fn /ud with p sources and destinations can be solved in O |V | log |V | +  p−1 |V | |A| time when p ≥ 2 is a constant. p Proof. Obviously, V = |V | . For every u, v ∈ V , if u → v ∈ A then there are at most

2p·|V |

p−1

arcs hu1 , . . . , up i → hv1 , . . . , vp i in A such that ui 6= vi ⇒ ui = u and vi = v, while  p−1 p−1 / A. Thus A ≤ 2p·|V | ·|A| = O |V | |A| (for fixed there is no such arc in A if u → v ∈  p−1 p), and the amount of time required for constructing G is O |V | |A| . Finding a shortest 18

 p path from hs1 , . . . , sp i to ht1 , . . . , tp i in G takes O V log V + A ≤ O |V | log |V | +  p−1 |V | |A| time (see [8]). Hence, the fixed destination case of the point-to-point delivery  p p−1 problem is solvable in O |V | log |V | + |V | |A| time (with a constant factor of O(2p )). p−1

The non-fixed destination case has at most p! + 2p · |V | · |A| arcs, and so can also be  p p−1 solved in O |V | log |V | + |V | |A| time when p is a constant. This construction is similar to constructions in [14] and [15]. Note that the construc-

tion of G from G can be easily modified to handle more general costs. Suppose that the cost of sending l items on a truck from i to j is clij , l = 1, . . . , K (we have been assuming that clij is independent of l so far). If we modify the cost of the arcs in G in the obvious way, we can solve this case as well.

4.2. The fixed destination point-to-point connection problem on a directed network We next consider the point-to-point connection problem on a directed network with p fixed. Note that for the point-to-point connection problem, because of the non-existence of the orientation constraint, we cannot reduce the undirected case to the directed case by simply replacing each edge i − j by a pair of directed arcs i → j and j → i. We now consider C/f /d with p = 2. Given directed network G = (V, A) with sources s1 , s2 and corresponding destinations ˜ = (V, A) ˜ by replacing every arc in A by two parallel t1 , t2 , we construct a new network G ˜ must also be optimal for G since it arcs. Note that an optimal solution to C/f /d on G ˜ Let d(u, v) be the minimum possible length of never pays to use both parallel arcs in A. a path from vertex u to vertex v (d(u, v) = +∞ if no such path exists). We say P is a shared segment of paths P1 and P2 if P is a common subpath of P1 and P2 , and P is maximal with this property. Now define ˜ with sources a, s2 and reS(a, d, k) = optimal value of the C/f /d problem on G spective destinations t1 , d, subject to the constraint that the number of shared segments is at most k. 19

For k = 1, . . . , |V | and a, d ∈ V , we have the recurrence relation (see Figure 9 below)

S(a, d, k) = min

      d(a, t1 )+d(s2 , d);         min    A,B∈V s.t.  

A6=B

 S(B, A, k−1)+d(a, A)+d(A, B)+d(B, d) ,

with boundary condition S(a, d, 0) = d(a, t1 ) + d(s2 , d). ˜ not for G.) (Note that this boundary condition makes sense only for G, Computing S(s1 , t2 , |V |) yields a solution.

Theorem 9: C/f /d with two sources and two destinations is solved by the dynamic 5

program above in O(|V | ) time.

Proof. To see that the above dynamic program solves the problem, we first consider the ˜ with an additional constraint on the number of point-to-point connection problem on G shared segments of the two paths a → t1 and s2 → d, where a and d are any two vertices in G. Notice that there always exists an optimal solution to the problem which either (i) contains two paths which are arc-disjoint (but it may use parallel arcs), or (ii) contains two paths a → t1 , s2 → d which have one or more shared segments. Define A as the tail of the first shared arc on path a → t1 , and B as the first vertex after A where the paths separate (see Figure 9). Clearly A 6= B. 20

a

s2

A

B

t1

d

Figure 9

In case (i), the optimal value is obviously d(a, t1 )+d(s2 , d). In case (ii), subpath a → A does not share arcs with subpaths s2 → A and B → d (by definition of vertex A). Moreover, we may assume that the path connecting a and t1 in the solution is a simple path (by optimality), which implies that the subpaths a → A, A → B and B → t1 do not intersect with each other. Similarly, we may assume the subpaths s2 → A, A → B and B → d do not intersect with each other. Furthermore, we may, without loss of generality, assume that subpaths B → t1 and B → d do not shared any arcs with each other since otherwise we would have the situation of Figure 10. If we delete the longer of the two B → C subpaths, then we get a smaller cost solution in Figure 11. But this merges the shared segments A → B and C → D into a single A → D shared segment, so the number of shared segments does not increase either. Hence we could select vertex D as our vertex B. However, the subpaths s2 → A and B → t1 can have some arcs in common. For example, in the network depicted in Figure 12, if we take a = s1 , d = t2 , then the subpaths s2 → A and B → t1 shown in heavy arcs share arc γ → δ. Hence, in this case, the optimal value can be written as 21

       optimal value of C/f /d with sources   min  B, s2 and respective destinations t1 , A  + d(a, A) + d(A, B) + d(B, d) .  A,B∈V s.t. A6=B    with at most k − 1 shared segments Since an optimal solution to the original point-to-point connection problem will not share more than |V | arcs, S(s1 , t2 , |V |) represents the correct optimal value. 3

To speed up the computation, we can precompute all the d(u, v) which takes O(|V | ) operations (see [12]). The number of possible combinations for the parameters (a, d, k) is 3

2

O(|V | ) and there are O(|V | ) possible choices for A and B. Thus the dynamic program 5

can be solved in O(|V | ) steps. An interesting open question is whether C/f /d is polynomially solvable for all fixed p ≥ 3.

4.3. The fixed destination point-to-point connection problem on an undirected network

The following algorithm solves C/f /u in polynomial time when p is a fixed number. Given undirected network G = (V, E), let t1 , . . . , tp be the destinations corresponding to sources s1 , . . . , sp , respectively.

Algorithm 1: Step 1: For every nonempty Ys ⊆ {s1 , . . . , sp }, let Yt = {tj | sj ∈ Ys } and find a minimum Steiner tree connecting vertices in Ys ∪ Yt . 23

Step 2: Solve the following dynamic program: (1) Define S(W ) = optimal value of the point-to-point connection problem in G with sources {si | i ∈ W } and destinations {ti | i ∈ W }. (W ⊆ {1, . . . , p}) (2) For W ∈ 2{1,...,p} \ {∅}, we have the recurrence relation: S(W ) = min

U⊆W U6=∅

 |ST (U )| + S(W \ U ) ,

where |ST (U )| is the sum of the lengths of the edges in the minimum Steiner tree for the vertex subset Y = {si | i ∈ U } ∪ {ti | i ∈ U }. (3) Boundary condition: S(∅) = 0. (4) Answer: S({1, . . . , p}). 2

Theorem 10: Algorithm 1 solves C/f /u in O(|V | log |V | + |V | · |A|) time if p is a fixed number. Proof. In Step 1, a minimum Steiner tree connecting a specified set of k vertices can be computed in time proportional to 2

T + |V | (2k−1 − k − 1) + |V | (3k−1 − 2k + 3)/2 using Dreyfus and Wagner’s [5] algorithm, where T is the time required in solving an all-pairs shortest path problem. Since the all-pairs shortest path problem can be solved 2

in O(|V | log |V | + |V | · |A|) time (see Fredman and Tarjan [8]), Step 1 can be done in 2

O(|V | log |V | + |V | · |A|) time because k ≤ 2p and p is a fixed number. In Step 2, the total number of possible W ’s considered is 2p − 1, and the number of possible nonempty subsets U of W is 2|W | − 1 ≤ 2p − 1. Hence Step 2 takes constant time.

Note that Algorithm 1 cannot be used to solve the directed version of the problem through finding directed Steiner trees because the solution to C/f /d is not necessarily a 24

collection of directed trees. For example, the optimal solution to C/f /d on the network depicted in Figure 12 is to select the arc subset {s1 → A, s2 → γ, γ → δ, δ → A, A → B, B → γ, δ → t1 , B → t2 }, which is not acyclic.

4.4. The non-fixed destination point-to-point connection problem The non-fixed destination case of the point-to-point connection problem can be solved as a Minimum-Concave-Cost Network Flow problem. These problems are like ordinary Minimum Cost Network Flow problems except that we want to minimize X

fuv (xuv ),

u→v

where each fuv is a concave function. In our case, fuv =



0, cuv ,

if xuv = 0; if xuv > 0,

which is indeed concave. The running time of the Send-and-split algorithm (see [6]) for Minimum-Concave-Cost Network Flow is O(|V | · 32p−1 + s · 22p−1 ), where s = |V | log2 |V | + 3|A|. Thus for fixed p we have: Remark 11: C/n/du can be solved in O(|V | log |V | + |A|) time via the Send-and-split algorithm. (Note that when we solve the Minimum-Concave-Cost Network Flow problem on an undirected network, an edge u−v will not be used in both directions in an optimal solution as long as cuv is positive since the cost function in our case is nondecreasing. Hence the cost on an undirected edge will not be double-counted.)

5. The Point-to-Point Connection Problem on a Grid In this section, we consider the special case of the point-to-point connection problem where the given network is a grid network. An m × n grid network is a rectangular-shaped 25

undirected network formed by m horizontal lines and n vertical lines as shown in Figure 13. Every intersection of a horizontal and vertical grid line is a vertex, and the line segment connecting two adjacent vertices is an edge of the network. We label the vertex formed by the intersection of the ith horizontal grid line and the j th vertical grid line by aij . For i = 1, . . . , m − 1, the “parallel” vertical edges ai1 −ai+1,1 , ai2 −ai+1,2 , . . . , ain −ai+1,n are of the same length, and for j = 1, . . . , n − 1, the “parallel” horizontal edges a1j −a1,j+1 , a2j −a2,j+1 , . . . , amj −am,j+1 are also of the same length.

a 11 a 21 a 31 .. . am1

a 12 a 22 a 32 .. . am2

a 13 a 23 a 33 .. . am3

··· ··· ···

···

a1n a2n a3n .. . amn

Figure 13

Theorem 12: C/fn /g is strongly NP-hard. Proof. The problem of finding a minimum Steiner tree on the grid is known to be NPcomplete (see [9]). We transform the minimum Steiner tree problem on the grid to our point-to-point connection problem as suggested in Section 2. Let G be an m × n grid network and Y = {a1 , . . . , ak } be the set of vertices that required to be connected by a Steiner tree in an arbitrary instance of the minimum Steiner tree problem. Define si = ak and ti = ai for i = 1, . . . , k − 1. Clearly, there is a solution to the fixed/nonfixed destination point-to-point connection problem on G with sources s1 , . . . , sk−1 and destinations t1 , . . . , tk−1 and total cost at most M if and only if there is a Steiner tree for Y with total length no greater than M . 26

Next, we define a two-sided grid network as one where all the sources are located on one side and the destinations on the opposite side of the boundary of the grid. We now consider connection problems on such networks, denoted by C/fn /gt . Problem C/n/gt can be formulated as a Minimum-Concave-Cost Network Flow problem in the same way as C/n/u in Remark 11. Here C/n/gt has the special structure of being planar with all sources and destinations on a single face. In this case, Send-and-split requires only O(np3 + np2 log n) time (see [6]). We now present a more efficient algorithm. We first consider the case of a 2 × n grid and then generalize the result to an m × n grid. For the 2 × n grid network case, we use ai and bj to denote a1i and a2j , respectively. Given a 2×n grid network with sources s1 = aj1 , s2 = aj2 , . . ., sp = ajp (j1 ≤ j2 ≤ · · · ≤ jp ) along the line [a1 , an ] and destinations t1 = bk1 , t2 = bk2 , . . ., tp = bkp (k1 ≤ k2 ≤ · · · ≤ kp ) along the line [b1 , bn ], the following algorithm solves C/n/gt . Algorithm 2: Since we have non-fixed destinations, it is obvious that we can assume that ti is the destination of si for i = 1, . . . , p and that the paths si − ti and si+1 − ti+1 do not “cross” each other (i = 1, . . . , p − 1). Hence, this problem can be solved by using the following dynamic programming formulation: Define S(i) = optimal value of the point-to-point connection problem on the given 2 × n grid network with sources si , si+1 , . . . , sp and destinations ti , ti+1 , . . . , tp (i = 1, . . . , p). For i = 1, . . . , p, we have the recurrence relation: S(i) = min

j=i,...,p

 |ST (i, j)| + S(j + 1) ,

where ST (i, j) is a minimum Steiner tree for the vertex subset {si , si+1 , . . . , sj }∪{ti , ti+1 , . . . , tj }, and |ST (i, j)| is the sum of the lengths of its edges. At the boundary, S(p + 1) = 0, and we want to compute S(1). 27

To obtain the minimum Steiner trees ST (i, j), 1 ≤ i ≤ j ≤ p, we modify Aho, Garey and Hwang’s [2] dynamic programming algorithm (see also Agarwal and Shing [1]) as follows. Let d0 denote the length of the vertical edge a1 − b1 and d(α, β) denote the length of the line segment [aα , bβ ]. Let Yi = {si , si+1 , . . . , sp } ∪ {ti , ti+1 , . . . , tp }. First note that we can reduce the 2 × n grid to a 2 × n ˆ grid (ˆ n ≤ 2p) in which at least one of al and bl belongs to Yl for each l = 1, . . . , n ˆ. Now, for i = 1, . . . , p and max{ji , ki } ≤ l ≤ n ˆ (recall that si = aji , ti = bki ), let Sl (i) T1i (l) denote a minimum Steiner tree for the set of points (Yi ∪ {al }) ∩ α=1 {aα , bα }, Sl (ii) T2i (l) denote a minimum Steiner tree for the set of points (Yi ∪ {bl }) ∩ α=1 {aα , bα }, Sl i (l) denote a minimum Steiner tree for the set of points (Yi ∪{al , bl })∩ α=1 {aα , bα }. (iii) T12 i We also let |T1i (l)|, |T2i (l)| and |T12 (l)| denote the total edge-lengths of the minimum Steiner i trees T1i (l), T2i (l) and T12 (l), respectively.

For i = 1, . . . , p and l = max{ji , ki }, we have T1i (l)

=

T2i (l)

=

i T12 (l)

=



[aji , aki ] ∪ [aki , bki ], if ji ≤ ki ; [bki , bji ] ∪ [aji , bji ], if ji > ki ,

with |T1i (l)|

=

|T2i (l)|

=

i |T12 (l)|

=



d0 + d(ji , ki ), if ji ≤ ki ; d0 + d(ki , ji ), if ji > ki .

i For i = 1, . . . , p and max{ji , ki } < l ≤ n ˆ , |T1i (l)|, |T2i (l)| and |T12 (l)| can be computed

recursively as follows: Case I: al ∈ Yi and bl ∈ / Yi  i (i) |T12 (l)| = min |T1i (l − 1)| + d0 + d(l − 1, l), |T2i (l − 1)| + d0 + d(l − 1, l), |T12 (l − 1)| + 2d(l − 1, l) (ii) |T1i (l)| = |T1i (l − 1)| + d(l − 1, l)

i (iii) |T2i (l)| = |T12 (l)|

28

Case II: al ∈ / Yi and bl ∈ Yi i (i) |T12 (l)| = same as in Case I. i (ii) |T1i (l)| = |T12 (l)|

(iii) |T2i (l)| = |T2i (l − 1)| + d(l − 1, l) Case III: al ∈ Yi and bl ∈ Yi i (i) |T12 (l)| = same as in Case I. i (ii) |T1i (l)| = |T12 (l)| i (iii) |T2i (l)| = |T12 (l)|

For 1 ≤ h ≤ i ≤ p, ST (h, i) can be obtained as follows: ST (h, i) =



T2h (max{ji , kh }) ∪ [bji , bki ], if ji ≤ ki ; T1h (max{ki , jh }) ∪ [aki , aji ], if ji > ki .

The correctness of this algorithm is based on the fact that for every pair of “adjacent” paths si − ti and si+1 − ti+1 (i = 1, . . . , p − 1), either they have some edges in common, or they are edge-disjoint (as in Theorem 9). Theorem 13: C/n/gt can be solved on a 2 × n grid in O(n + p2 ) time. Proof.

Reducing the network to a 2 × n ˆ grid requires O(n) time. We can precompute

i all ST (h, i) (1 ≤ h ≤ i ≤ p) by computing all T1i (l), T2i (l) and T12 (l) (1 ≤ i ≤ p; i max{ji , ki } < l ≤ n ˆ ). For every i = 1, . . . , p, computing T1i (l), T2i (l) and T12 (l) for

l = max{ji , ki }, . . . , n ˆ requires O(p) time (see [2]). Therefore, computing all the T•i (l)’s (and hence all the ST (h, i)’s) requires O(p2 ) time. Since computing all the S(i)’s in the dynamic program also requires O(p2 ) time, the total computational time is O(n + p2 ). We now consider the fixed destination case on a 2 × n grid with sources s1 = aj1 , s2 = aj2 , . . ., sp = ajp (j1 ≤ j2 ≤ · · · ≤ jp ) and corresponding destinations t1 = bk1 , t2 = bk2 , . . ., tp = bkp (i.e., ti is the destination of si for i = 1, . . . , p). Define tq ∼ tr if (jq ≤ jr and kq ≥ kr ) or (jq ≥ jr and kq ≤ kr ), i.e., if paths sq − tq and sr − tr must cross. The transitive closure (see [3]) of the relation “∼” can be computed in O(p) time 29

by first sorting the ti ’s in ascending order of ki and then grouping them into equivalence classes (since ki ≤ n ˆ ≤ 2p, sorting the ti ’s can be done in O(p) time). We call these equivalence classes T1 , T2 , . . . , Tk in order from left to right. For example, in Figure 14, T1 = {t1 , t2 , t3 }, T2 = {t4 }, T3 = {t5 , t6 }.

z s1

S1 }| s2

t3 |

t1 {z T1

{

s3

t2 }

S2 z}|{ s4

t4 |{z} T2

z s5

S3 }|

{ s6

t6 t | {z 5} T3

Figure 14

Let Si = {sj | tj ∈ Ti } for i = 1, . . . , k as in Figure 14. Note that in any feasible solution of the point-to-point connection problem, Si ∪Ti must be connected (i = 1, . . . , k). Hence the following algorithm solves the fixed destination case of the problem.

Algorithm 3: Step 1: Reduce the 2 × n grid to a 2 × n ˆ grid (ˆ n ≤ 2p) in which at least one of al and bl is a source or destination node for every l = 1, . . . , n ˆ. Step 2: Determine S1 , . . . , Sk and T1 , . . . , Tk . 30

Step 3: Solve the following dynamic program: (1) Define S(i) = optimal value of the point-to-point connection problem on the given 2 × n grid network with sources Si ∪ Si+1 ∪ · · · ∪ Sk and destinations Ti ∪ Ti+1 ∪ · · · ∪ Tk (i = 1, . . . , k). (2) For i = 1, . . . , k, S(i) = min

j=i,...,k

 |ST (i, j)| + S(j + 1) ,

where ST (i, j) is a minimum Steiner tree for the vertex subset Y = (Si ∪ Si+1 ∪ · · · ∪ Sj ) ∪ (Ti ∪ Ti+1 ∪ · · · ∪ Tj ), and |ST (i, j)| is the sum of the lengths of its edges. (3) Boundary condition: S(k + 1) = 0. (4) Answer: S(1). Theorem 14: Given a 2 × n grid, C/f /gt can be solved in O(n + p2 ) time, where p is the number of sources. Proof. It is easy to see that Step 1 and Step 2 can be done in O(n + p) time. For Step 3, precomputing all the ST (i, j)’s requires O(p2 ) time by using the method described in the non-fixed destination case. Hence, Step 3 can be done in O(p2 ) time. Therefore, the total computational time is O(n + p2 ). To generalize the above results to the m × n two-sided grid network, we first prove the following lemma. Lemma 15: Given an m × n two-sided grid network with sources in row 1, destinations in row m, there exists an optimal solution to C/fn /gt that uses no horizontal edge in rows 2, 3, . . . , m − 1. Proof. Suppose, to the contrary, that every optimal solution of an instance of this problem uses at least one non-boundary horizontal edge. Consider an optimal solution x∗ with a 31

minimum number of non-boundary horizontal edges. Among such, choose one such that  max k x∗ (aij , ai,j+1 ) = x∗ (ai,j+1 , ai,j+2 ) = · · · = x∗ (ai,j+k−1 , ai,j+k ) = 1,

i=2,...,m−1 j=1,...,n−k



is maximized. Less formally, x∗ is an optimal solution which uses a longest horizontal line segment which is not located on the top or bottom of the grid. Let k ∗ be the number of arcs in this longest segment, q the index of its row, and r the index of its leftmost column. Define

and

 H1 = j ∈ [r, r + k ∗ ] x∗ (aq−1,j , aqj ) = 1 ,  H2 = j ∈ [r, r + k ∗ ] x∗ (aqj , aq+1,j ) = 1 .

Thus |H1 | is the number of vertical edges incident to the top of the line segment [aqr , aq,r+k∗] and |H2 | is the number of vertical edges incident to the bottom of [aqr , aq,r+k∗ ]. By symmetry of the grid, we may, without loss of generality, assume that |H1 | ≥ |H2 |. We can move the line segment [aqr , aq,r+k∗ ] up (extending vertical paths in H2 , contracting those in H1 ) to form a new solution which is no worse than the original solution. We can keep moving the line segment [aqr , aq,r+k∗ ] up to row q¯ without increasing the total cost until we get to one of the following three cases:

Case 1: x∗ (aq¯j , aq¯,j+1 ) = 1 for some j = r, r + 1, . . . , r + k − 1. In this case, the number of non-boundary horizontal edges has been reduced below its supposed minimum. Case 2: x∗ (aq¯,r−1 , aq¯r ) = 1 or x∗ (aq¯,r+k∗ , aq¯,r+k∗ +1 ) = 1. In this case, the new solution is an optimal solution which uses the horizontal line segment [aq¯,r+k∗ , aq¯k∗ ] or [aq¯r , aq¯,r+k∗ +1 ], contradicting that x∗ is an optimal solution which uses a longest horizontal line segment which is not located on the top or bottom of the grid. 32

Case 3: q¯ = 1. The number of non-boundary horizontal edges has been reduced below its supposed minimum (as in Case 1). Theorem 16: Given an m × n grid network with p sources located on the line [a11 , a1n ] and p destinations located on the line [am1 , amn ], C/fn /gt can be solved in O(n + p2 ) time. Proof. By Theorem 13, Theorem 14 and Lemma 15.

6. Conclusion In the preceding sections we have established the complexity of many different variations of the point-to-point delivery and connection problems. We summarize our results in Table 1, cross-referenced by theorem numbers. Note that only one case is still unsolved. Given that most of the variations of these problems are NP-hard, in the future we plan to investigate heuristics for the intractible problems in the table.

Acknowledgment We would like to thank the referees for pointing out references [1] and [6] to us, and for improving several of our results.

33

PROBLEM

RESULT

REFERENCE

DK /f /d

Strongly NP-hard ∀K ≥ 2

Thm. 1 & Thm. 5

DK /f /u

Strongly NP-hard ∀K ≥ 2

Cor. 2 & Cor. 6

DK /n/d

Strongly NP-hard ∀K ≥ 2

Thm. 3 & Thm. 5

DK /n/u

Strongly NP-hard ∀K ≥ 2

Cor. 4 & Cor. 6

C/fn /du

Strongly NP-hard

Rmk. 7

DK /fn /du with fixed p

O(|V | log |V | + |V |

C/f /d with fixed p

O(|V | ) if p = 2 ? if p > 2

C/f /u with fixed p

p

p−1

|A|)

Thm. 8

5

Thm. 9

O(|V | log |V | + |V | · |A|)

2

Thm. 10

C/n/du with fixed p

O(|V | log |V | + |A|)

Rmk. 11

C/fn /g

Strongly NP-hard

Thm. 12

C/f /gt

O(n + p2 )

Thm. 14, Lemma 15 & Thm. 16

C/n/gt

O(n + p2 )

Thm. 13, Lemma 15 & Thm. 16

Table 1

The notation “P/e1 /e2 ” means finding routes between p sources and destinations, where P =DK for the delivery problem with truck size K , P =C for the connection problem; e1 =f if the destination for each source is fixed, e1 =n if not; e2 =d if the network is directed, u if undirected, g if a grid, gt if a two-sided grid.

34

References: [1] Agarwal, P. K. and M. T. Shing (1986). Algorithms for Special Cases of Rectilinear Steiner Trees: I. Points on the Boundary of a Rectilinear Rectangle, Technical Report TRCS86-17, Department of Computer Science, University of California – Santa Barbara, CA. [2] Aho, A. V., M. R. Garey and F. K. Hwang (1977). Rectilinear Steiner Trees: Efficient Special-Case Algorithms, Networks, 7, pp. 37–58. [3] Aho, A. V., J. E. Hopcroft and J. D. Ullman (1974). The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, MA. [4] Ahuja, R. K., T. L. Magnanti and J. B. Orlin (1988). Network Flows, Working paper 2059-88, Alfred P. Sloan School of Management, MIT(Cambridge, MA). [5] Dreyfus, S. E. and R. A. Wagner (1972). The Steiner Problem in Graphs, Networks, 1, pp. 195–207. [6] Erickson, R. E., C. L. Monma and A. F. Veinott, Jr. (1987). Send-and-Split Method for Minimum-Concave-Cost Network Flows, Math. Oper. Res., 12, 4, pp. 634–664. [7] Even, S., A. Itai and A. Shamir (1976). On the Complexity of Timetable and Multicommodity Flow Problems, SIAM J. Computing, 5, pp. 691–703. [8] Fredman, M. L. and R. E. Tarjan (1987). Fibonacci Heaps and Their Uses in Improved Network Optimization Algorithms, J. ACM, 34, 3, pp. 596–615. [9] Garey, M. R. and D. S. Johnson (1977). The Rectilinear Steiner Tree Problem is NP-Complete, SIAM J. Appl. Math., 32, 4, pp. 826–834. [10] Garey, M. R. and D. S. Johnson (1979). Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, San Francisco, CA. [11] Hu, T. C. and E. S. Kuh (1985). VLSI Circuit Layout: Theory and Design, IEEE Press, New York, NY. [12] Lawler, E. L. (1976). Combinatorial Optimization, Holt, Rinehart and Winston, New York. 35

[13] Leung, J. M. Y., T. L. Magnanti and V. Singhal (1988).

Routing in Point-to-

Point Delivery Systems, Working paper OR 174-88, Operations Research Center, MIT(Cambridge, MA). [14] Li, C. L., S. T. McCormick and D. Simchi-Levi (1990). The Complexity of Finding Two Disjoint Paths with Min-Max Objective Function, Discrete Applied Mathematics, 26, 1, pp. 105–115. [15] 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.

36