The Steiner problem with edge lengths 1 and 2

6
Information Processing Letters 32 (1989) 171-176 North-Holland 1 September 1989 THE STEINER PROBLEM WITH EDGE LENGTHS 1 AND 2 Marshall BERN Xerox Palo Alto Research Center. Palo Alto. CA 94304. U.S.A. Paul PLASSMANN * Center for Applied Mathematics. Cornell Universit): Ithaca, NY 14853, U.S.A. Communicated by T. Lengauer Received 7 September 1989 Revised 3 April 1989 The Steiner problem on networks asks for a shortest subgraph spanning a given subset of distinguished vertices. We give a !-approximation algorithm for the special case in which the underlying network is complete and all edge lengths are either 1 or 2. We also relate the Steiner problem to a complexity class recently defined by Papadimitriou and Yannakakis by showing that this special case is MAX SNP-hard, which may be evidence that the Steiner problem on networks has no polynomial-time approximation scheme. Keywords: Steiner tree, approximation algorithm, NP-complete, complexity class 1. Introduction Given a graph G= (I’, E) with nonnegative edge lengths and a set N c V of distinguished vertices, the Steiner problem on networks asks for a minimum length tree within G that spans all mem- bers of N. The Steiner problem is NP-complete, but a tree that is not more than twice as long as an optimal tree can be computed in time 0( 1E 1 + 1V Jlog I V I) [5,6]. This approximate Steiner tree may be thought of as a minimum spanning tree on an associated complete graph K(G, N) which has vertex set equal to N and edge lengths equal to shortest-path distances in G. The Steiner problem on networks has an extensive literature (see [12] for a survey) and numerous applications, such as the design of integrated cir- cuits and telephone networks. * Partially supported by the Computational Mathematics Pro- gram of the National Science Foundation under Grant DMS-8706133. In this paper, we consider a quite restricted version, called STEINER(~, 2). in which the given graph G is complete-that is, there is an edge between every pair of vertices-and all edge lengths are either 1 or 2. We show that a simple heuristic algorithm, Rayward-Smith’s average dis- tance heuristic [10.11,12], is a $-approximation algorithm for this problem, that is, it will always compute a tree that is no more than $ the length of an optimal tree. To our knowledge, this is the first proof that a polynomial-time heuristics for an NP-complete Steiner problem achieves an ap- proximation bound better than that given by a minimum spanning tree. One can imagine practical applications for this result, for example if each link is either cheap or expensive to build. but our motivation for consid- ering STEINER& 2) is primarily theoretical. We are following the lead of Papadimitriou and Yan- nakakis who have recently studied the issue of approximability of NP-complete problems [8]. OOZO-0190/89/$3.50 0 1989, Elsevier Science Publishers B.V. (North-Holland) 171

Transcript of The Steiner problem with edge lengths 1 and 2

Page 1: The Steiner problem with edge lengths 1 and 2

Information Processing Letters 32 (1989) 171-176

North-Holland

1 September 1989

THE STEINER PROBLEM WITH EDGE LENGTHS 1 AND 2

Marshall BERN

Xerox Palo Alto Research Center. Palo Alto. CA 94304. U.S.A.

Paul PLASSMANN *

Center for Applied Mathematics. Cornell Universit): Ithaca, NY 14853, U.S.A.

Communicated by T. Lengauer Received 7 September 1989 Revised 3 April 1989

The Steiner problem on networks asks for a shortest subgraph spanning a given subset of distinguished vertices. We give a !-approximation algorithm for the special case in which the underlying network is complete and all edge lengths are either 1

or 2. We also relate the Steiner problem to a complexity class recently defined by Papadimitriou and Yannakakis by showing

that this special case is MAX SNP-hard, which may be evidence that the Steiner problem on networks has no polynomial-time

approximation scheme.

Keywords: Steiner tree, approximation algorithm, NP-complete, complexity class

1. Introduction

Given a graph G= (I’, E) with nonnegative edge lengths and a set N c V of distinguished vertices, the Steiner problem on networks asks for a minimum length tree within G that spans all mem- bers of N. The Steiner problem is NP-complete, but a tree that is not more than twice as long as an optimal tree can be computed in time 0( 1 E 1 + 1 V Jlog I V I) [5,6]. This approximate Steiner tree may be thought of as a minimum spanning tree on an associated complete graph K(G, N) which has vertex set equal to N and edge lengths equal to shortest-path distances in G. The Steiner problem on networks has an extensive literature (see [12] for a survey) and numerous applications, such as the design of integrated cir- cuits and telephone networks.

* Partially supported by the Computational Mathematics Pro- gram of the National Science Foundation under Grant DMS-8706133.

In this paper, we consider a quite restricted version, called STEINER(~, 2). in which the given graph G is complete-that is, there is an edge between every pair of vertices-and all edge lengths are either 1 or 2. We show that a simple heuristic algorithm, Rayward-Smith’s average dis- tance heuristic [10.11,12], is a $-approximation algorithm for this problem, that is, it will always compute a tree that is no more than $ the length of an optimal tree. To our knowledge, this is the first proof that a polynomial-time heuristics for an NP-complete Steiner problem achieves an ap- proximation bound better than that given by a minimum spanning tree.

One can imagine practical applications for this result, for example if each link is either cheap or expensive to build. but our motivation for consid- ering STEINER& 2) is primarily theoretical. We are following the lead of Papadimitriou and Yan- nakakis who have recently studied the issue of approximability of NP-complete problems [8].

OOZO-0190/89/$3.50 0 1989, Elsevier Science Publishers B.V. (North-Holland) 171

Page 2: The Steiner problem with edge lengths 1 and 2

Volume 32, Number4 INFORMATION PROCESSINGLETTERS 1 September1989

They introduced natural variants of NP. called MAX NP and MAX SNP, that are defined syn- tactically and consist of optimization (rather than decision) problems. MAX SNP consists of prob- lems that can be written in the form: find a structure S (such as a subgraph) within an input structure G (such as a graph) that maximizes 1 {AT:

H-v G, 9) I, where \c, is a first-order expression. For example, a B-regular graph G can be repre- sented by a (B + 1)-ary relation A encoding the adjacency lists of G, and then the maximum inde- pendent set problem is to find S that maximizes

1(x: XESA(X, 0 ,‘..., u&&4

Papadimitriou and Yannakakis showed that all problems within MAX NP and MAX SNP have constant-factor approximation algorithms. More- over, MAX SNP has problems that are complete with respect to a “careful” kind of polynomial reduction, called L-reduction, that preserves ap- proximability. The importance of MAX SNP- completeness is the following: if a MAX SNP- complete problem has a polynomial-time ap- proximation scheme, then all problems in MAX SNP do. A polynomial-time approximation scheme is a family of polynomial-time algorithms; for each E > 0, there is a member of this family that achieves an approximation ratio of (1 + E).

Examples of MAX SNP-complete problems in- clude VERTEX COVER, DOMINATING SET, and IN- DEPENDENT SET for bounded-degree graphs, MAX CUT for general graphs, and a maximization ver- sion of 3SAT. As these problems and others in MAX SNP have resisted the efforts of many re- searchers, MAX SNP-completeness may be viewed as some evidence that these problems are unlikely to have polynomial-time approximation schemes. On the other hand, MAX SNP seems to consist of especially “easy” NP-complete problems, such as problems on bounded-degree graphs, so it is con- ceivable that all problems in MAX SNP have polynomial-time approximation schemes.

In a companion paper [9], Papadimitriou and Yannakakis studied the traveling’ salesman prob- lem (TSP). Specifically, they considered the spe- cial case of TSP on the complete graph with edge

172

lengths 1 and 2, devising an +-approximation algorithm and proving that this problem is MAX SNP-hard (that is, everything in MAX SNP L-re- duces to this problem, but the problem itself may not be in MAX SNP). We complete our analogous study of the Steiner problem by showing that STEINER( 1, 2) is MAX SNP-hard.

2. The average distance heuristics

An instance of STEINER(~. 2) is specified by a complete graph G = (V. E) with edge lengths 1 and 2 and a subset N of terminals. Let optional

vertices mean V\ N and d( U, u) denote the length of the edge between vertices u and u, with d(u. u)

= 0. As applied to STEINER(~) 2), Rayward-Smith’s average distance heuristics (ADH) goes as follows:

(1) Find a vertex u (optional or terminal) and a set S of terminals (possibly containing u) that minimize the average distance C,, sd( u, u)/

( 1 S I- 1) over all choices of u and S. (2) Replace S U ( u } by a single terminal us

and for each vertex u let d(u,, U) be the mini- mum distance from u to a vertex of S U { u }.

(3) If there is still more than one terminal, return to step (1).

For the general Steiner problem in networks, the distances d(u, u) are shortest-path distances, and a star of shortest paths is contracted to a new terminal in each step. A Steiner tree is obtained from this computation by keeping track of all edges involved in each reduction. Rayward-Smith shows that this algorithm can be implemented in time 0( 1 V I’) by keeping for each c a list of terminals, sorted by increasing distance from u. The minimizing choice of S will always be an initial sequence of this list. Faster implementa- tions of ADH are possible for STEINER(~, 2); we leave these to the interested reader.

The length of the computed Steiner tree may be quite sensitive to the tie-breaking order, that is, which of a number of equally good choices of u and S are chosen at each step. We shall show below, however, that any tie-breaking order gives a $-approximation algorithm. Figure 1 shows one possible order of reductions in computing a slightly suboptimal Steiner tree. All pictured edges are of

Page 3: The Steiner problem with edge lengths 1 and 2

Volume 32. Number 4 INFORMATION PROCESSING LETTERS 1 September 1989

Fig. 1. Steiner tree computed by the average distance heuris-

tics.

length 1, except for the bold dashed edges which represent length-2 edges in the Steiner tree, added in a fourth-or a fourth and fifth-reduction. Optional vertices are denoted by circles, terminals by squares.

3. Approximation bounds

For an instance I of STEINER(~, 2), let 11 I denote the number of vertices (terminal and op- tional), n denote 1 N 1, HEU( I) denote the length of the tree found by ADH assuming a worst possible order of breaking ties, OPT(l) denote the length of an optimal Steiner tree, and

ratio(I) = HEU( I)/OPT( I).

We first demonstrate that there exist instances for which the ratio is arbitrarily close to 4. In the instance shown in Fig. 2, there is a path of length-l edges connecting all optional vertices, each of which is attached to a pair of terminals by length-l edges. All unseen edges have length 2. It is easy

0

0

0

Fig. 2. An instance with the ratio HEU( I)/OPT( I) close to 4.

to confirm that the optimal solution has length 4(3n - 2) and that the heuristic solution may have length as great as 2n - 2.

The harder part is to show that rurio(I) never exceeds j. For the rest of this section, assume that 1 is a worst-case instance, that is, ratio(l) > 1 and ratio(l) >, rutio( I’) for each I’ such that 111 >

11’1.

3.1. Lemma. A worst-case instance I contains no

pair of terminals distance 1 apart.

Proof. Assume the contrary. Then the first step of ADH finds a subgraph with average distance 1, and hence reduces a set of k terminals, where k z 2, to a single terminal using length k - 1. Let I’ be the resulting instance of STEINER(~, 2). Now HELI(I’)=HELr(l)-k+l for if there were a tie-breaking order for I’ that produced a tree longer than HEU( I) - k + 1 then we could ex- tend this to an order for I that produced a tree longer than HEU(I). Next, imagine that we add E’, the set of k - 1 length-l edges involved in the first reduction, to any optimal Steiner tree T for instance I. This forms a graph with k - 2 more edges than vertices. We can now remove k - 1 edges, none of which are edges of E’. to form a graph that spans N and contains all edges of E’.

(Alternatively, we can think of building an MST within the graph TU E’ by first choosing all of E’.) Thus there is a Steiner tree for I’ of length no more than OPT(I) -k + 1. Hence OPT(I’) < OPT(I) - k + 1, giving a contradiction to the as- sumption that I is worst-case. 0

3.2. Lemma. For instance I, the average distance in

each reduction is greater than 1.

Proof. Assume to the contrary that some step is the first with average distance 1. Then this step joins (at least) two terminals u and b distance 1 apart. By Lemma 3.1, at least one of u and b is a terminal resulting from a contraction operation, so assume that a resulted from a contraction oper- ation at a later step than 6. At the time an optional vertex v and a set of terminals S were contracted to produce a, b must have been at distance 1 from v. But v and S U {b} would have

173

Page 4: The Steiner problem with edge lengths 1 and 2

Volume 32, Number 4 INFORMATION PROCESSING LETTERS 1 September 1989

induced a subgraph with smaller average distance than u and S, a contradiction. •I

By k-star we mean a subgraph that is a star with an optional vertex u at its center and k terminals a,. a*, . . . , uk at its leaves, such that d( u, a,) = 1 for each i.

two or more vertices in P dominate a terminal u, then we arbitrarily assign a to one of them. Now let (7 be the number of equivalence classes in this partition that contain three terminals; of course, 4 depends on the arbitrary choices. Notice that the other equivalence classes necessarily contain one or two terminals.

3.3. Lemma. If I contains a k-star for k >, 3, then

rutio( I) d $.

3.5. Lemma. OPT(I) 3 $n - iq - 1.

Proof. If a worst-case instance I contains a k-star for k > 3, then the first step of ADH will reduce such a k-star. Let I’ be the resulting problem instance. HEU( I’) = HEU( I) - k, by the same argument used in the proof of Lemma .3.1. Now imagine adding the k edges E’ of the reduced star to an optimal Steiner tree T for I. This adds k edges but at most one vertex to T, and we can build a Steiner tree on I containing all edges of E’. As in the proof of Lemma 3.1, this implies that there is a tree on instance I’ of length no more than OPT(I) - k + 1. Thus OPT(I’) G

OPT(I) - k + 1; the assumption that I is worst-case then implies the lemma. q

Proof. By the way we defined the partition of N, we have 3q + 2( I PI-q) > n. which implies that I PI >, in - iq. Combining this inequality with Lemma 3.4, we obtain the result. 0

3.6. Theorem. ADH is a $-approximation al- gorithm for STEINER( 1, 2).

In light of Lemma 3.3 and the result we are trying to prove, we can assume that I contains no k-stars for k > 3. We say that a vertex u dominates

itself and all vertices at distance 1 from u. Let P

be a minimum-cardinality set of vertices (optional or terminal) that dominates all terminals in in- stance I.

3.4. Lemma. OPT(I)>,n+ IPI-1.

Proof. Assume T is an optimal Steiner tree for instance I. Let N’ c N be the terminals that are dominated by the optional vertices in P’ in T. Using Lemma 3.1, the length of T is then at least

IN’J+IP’I-1+2lN\N’I.

Now lPl6 JP’I+IN\N’I since P’UN\N’ dominates all terminals. Combining these two in- equalities yields the lemma. 0

Proof. Let I be an instance with no pair of terminals at distance 1, and no k-stars for k > 3. By Lemma 3.2 each reduction step with average distance less than 2 reduces a k-star for k 2 3. (Here notice that including another terminal at distance 2 from the central vertex c only increases the average distance.) Assume ADH reduces stars of sizes k,, kz,. . . , k, (that is. it reduces a k,-star, a k,-star, etc.) and let s denote X:x 1( k, - 2). As a k-star joins k connected components using total length k and no reduction has average distance greater than 2, we have HEU( I) d 2n - s - 2. We now assert that s 2 q. Denote the equivalence classes containing three terminals by C,, C,, . . . , Cq. ADH must reduce a k-star with k > 3 sharing two terminals with each C,; otherwise a 3-star would remain unreduced. Since the C, are disjoint, this statement implies that s 3 q. A calculation now finishes the proof:

HECJ( I) 2n-s-2 4n-2s-4

OPT(i) ’ tn-+q-1 = 3n-q-2

4n-2s-4 4 G 3n-s-2 <T’ ’

4. MAX SNP-hardness

Define a partition of N by assigning each We give an L-reduction from VERTEX COVER-B,

terminal to a member of P that dominates it. If that is, the problem of covering all edges with a

174

Page 5: The Steiner problem with edge lengths 1 and 2

Volume 32. Number 4 INFORMATION PROCESSING LETTERS 1 September 1989

minimum number of vertices in a graph with

degree bounded by B. This problem was shown MAX SNP-complete in [8]. An L-reduction in this case is a polynomial-time mapping taking each instance I of VERTEX COVER-B to an instance I’

of STEINER& 2) such that there are positive con- stants a and p that make the following statements true:

(Ll) OPT(I’) < aOPT( and (L2) for any solution of I’ with length c’, we

can, in polynomial time, find a solution of ‘I of size no more than

OPT(I)+/3(c’-OPT(1’)).

We transform an instance I of VERTEX COVER-B

given by a connected, bounded-degree graph G into an instance I’ = (G’, N), where G’ is a com-

plete graph with edge lengths 1 and 2 and N is a set of terminals, by the following steps:

(1) We replace each edge of graph G by a path of two length-l edges in which the center vertex is a terminal.

(2) Each original vertex of G is an optional vertex in G’. and we place a length-l edge between each pair of optional vertices.

(3) All other edges in G’, for example all edges between terminals, are length-2. Figure 3 illustrates an example of this reduction, again omitting length-2 edges. In the next lemma, I’ represents any instance of STEINER(~, 2) that results from the reduction just described.

4.1. Lemma. Given a solution of length c’ to STEINER(~, 2) on I’, in polynomial time we can find

a solution of length no more than c’ that uses no

length-2 edges.

Proof. We shall show how to remove a single length-2 edge without increasing the length; iterat- ing this procedure gives a polynomial-time al- gorithm for removing all length-2 edges. Let (a, b)

be a length-2 edge in T. a Steiner tree of length c’ in G’. Removing (a, 6) divides T into two non- empty connected components T, and Tz. If both T, and T, span optional vertices, then we can simply use a length-l edge between optional vertices in each component to obtain a new Steiner

Fig. 3. An L-reduction of VERTEX COVER-5 lo STEINER(~. 2).

tree of length c’- 1. So assume T, contains no optional vertices and hence no length-l edges. T,

must contain a leaf terminal e. In G’. terminal e can be connected to some other terminal with a path p consisting of two length-l edges. because the original graph G was connected. Replacing the length-2 edge in T incident to e with path p

results in a new Steiner tree with length c’ and one fewer length-2 edges. 0

4.2. Theorem. STEINER(~, 2) is MAX SNP-hard.

Proof. We must confirm that the reduction given above is an L-reduction. Let instance I consisting of graph G = (V, E) map to instance I’ with network G’ by the reduction above. The in- equality in (Ll) follows for a = 2 B from the ob- servations that

OPT(I)> jEI/B and OPT(I’)CZIEI-~.

Next we verify (L2). First observe that a vertex cover in G of size c induces a solution to the Steiner problem on G’ of length c + ) E ) - 1 in a straightforward way. Conversely, a Steiner tree on

G’ of length c’ can. by Lemma 4.1, be trans- formed into a Steiner tree with no length-2 edges.

In this second tree, every terminal is adjacent to an optional point, and hence the set of optional points corresponds to a vertex cover of size c’ - 1 E I+ 1 in G. Thus,

OPT(I)=OPT(/‘)- lEl+l.

Using this expression for OPT(I) and setting fl= 1 reduces (L2) to showing that, given a solu- tion to the Steiner problem on G’ of length c’, we can in polynomial time find a solution to VERTEX

COVER on G of size c’ - I E I + 1. This has already been shown. 0

175

Page 6: The Steiner problem with edge lengths 1 and 2

Volume 32. Number 4 INFOR.MATION PROCESSING LETTERS 1 September 1989

By this L-reduction, the result of Section 3 gives a 3approximation for VERTEX COVER for

cubic graphs; a ratio of, say. g for STEINER(~, 2) would give a $-approximation. The trivial al- gorithm of choosing all vertices is a 2-approxima-

tion, and a $approximation is known [7].

5. Conclusions

We have presented an approximation algorithm for a special case of the Steiner problem that is better than simply using a minimum spanning tree

as an approximate solution. One natural direction for further research is to extend this result to less

restricted versions of the problem. For example, consider the Steiner problem on a complete graph in which the maximum edge length is no more than twice the minimum. We can show that in this case ADH achieves an approximation ratio no worse than + [l].

For the case of arbitrary positive integer edge lengths. we can give a heuristics that achieves an approximation ratio of 2 - 1/(2t”“’ - 1). where d> 3 is the maximum edge length in an MST on

the associated complete graph K(G, N) [l]. Notice that the result of Section 3 gives a ratio of $ as

long as edge lengths are integers and d = 2, a

more general condition than all edge lengths being 1 or 2. Length d will be small if the network has small diameter or if terminals are evenly spread.

An important open problem is whether there exists an cy-approximation algorithm for the gen- eral Steiner problem on networks for some (r < 2. A related open problem is whether there exists an approximation algorithm superior to the minimum spanning tree for a geometric version of the Steiner problem. The approximation ratio of the mini- mum spanning tree is 4 for the rectilinear metric

[4]; it is known to be less than 1.214 for the Euclidean metric [2] and conjectured to be exactly

2/v5 131. The second part of our paper adds another

natural problem to the list of MAX SNP-hard problems. thereby tending to confirm the useful- ness of this new complexity class.

References

I21

131

141

151

161

[‘I

181

[91

1101

illI

1121

M. Bern and P. Plassmann. Approximation bounds for

special cases of the Steiner problem. Manuscript in

preparation. 1989.

F.R.K. Chung and R.L. Graham. A new bound for

Euclidean Steiner minimal trees. Ann. ,V. Y. Acad. Sci. 440

(1985) 328-346.

E.N. Gilbert and H.O. Polluk, Steiner minimal trees.

SIAMJ. A&. Murh. 16 (1968) l-29.

F.K. Hwang. On Steiner minimal trees with rectilinear

distance, SIAM J. Appf. Murh. 30 (1976) 104-114.

L.T. Kou and K. Makki. An even faster approximation

algorithm for the Steiner tree problem in graphs, Congr.

Numer. 59 (1987) 147-154.

K. Mehlhorn, A faster approximation algorithm for the

Steiner problem in graphs, Infiwm. Process. Eerr. 27 (1988)

125-128.

B. Monien and E. Speckenmeyer. Some further approxi-

mation algorithms for the vertex cover problem, in: Lec-

ture Notes in Computer Science 159 (Springer, Berlin.

1983) 341-349.

C.H. Papadimitriou and M. Yannakakis, Optimization.

approximation. and complexity classes. in: Proc. 2&h

ACM Symp. on Theory of Computing (1988) 229-234.

C.H. Papadimitriou and M. Yannakakis. Manuscript in

preparation. 1989.

V.J. Rayward-Smith. The computation of nearly minimal

Steiner trees in graphs. Inrernrrr. J. .Marh. Educ. Sci. Tech.

14 (1983) 15-23.

B.M. Waxman and M. Imase. Worst-case performance of

Rayward-Smith’s Steiner tree heuristic. Inform. Process.

Left. 29 (1988) 283-287.

P. Winter, Steiner problem in networks: a survey, Ner-

works 17 (1987) 129-167.

176