Exact computation of Steiner minimal trees in the plane

Exact computation of Steiner minimal trees in the plane

3 March 1986 Information Processing Letters 22 (1986) 151-156 North-Holland EXACT C O M P U T A T I O N OF STEINER M I N I M A L TREES IN THE PLANE ...

390KB Sizes 18 Downloads 135 Views

3 March 1986

Information Processing Letters 22 (1986) 151-156 North-Holland

EXACT C O M P U T A T I O N OF STEINER M I N I M A L TREES IN THE PLANE * E.J. C O C K A Y N E and D.E. H E W G I L L Department of Mathematics, University of Victoria, P.O. Box 1700, Victoria, British Columbia, Canada V8W 2 Y2 Communicated by M.A. Harrison Received 10 January 1985 Revised 24 April 1985

A Steiner Minimal Tree (SMT) for a given set A = (a I . . . . . a n ) in the plane is a tree which interconnects these points and whose total length, i.e., the sum of lengths of the branches, is minimum. To achieve the minimum, the tree may contain other points (Steiner points) besides a l , . . . ,a,. Computer programs for SMTs are exponential and have so far only been able to solve, in a reasonable time, problems with n ~<15. We present improvements to an algorithm of Winter (1981), which enable us to solve all 17-point problems and an estimated 80% of all randomly generated problems with n ~< 30.

Keywords: Cor~putation, Steiner Minimal Tree, plane

1. Introduction

A Steiner Minimal Tree (SMT) for a given set A = { a ~ , . . . , a , } of plane points is a tree which interconnects these points and whose total length, i.e., the sum of lengths of the branches, is minimum. To achieve the minimum, the tree may contain other vertices, which are called Steiner points, besides a 1. . . . , a ,. The problem of finding SMTs has been extensively studied. The reader is referred to [9] for background information and bibliographies. We are concerned with so-called 'exact' programs for finding SMTs rather than heuristic programs (e.g., [8]), which only find suboptimal trees, although

the latter often run considerably faster. All exact programs only rely on an original geometric idea of Melzak [7]. He showed how to reduce an n-point problem to a set of ( n - 1)-point problems in a finite number of steps and hence exhibited a geometric (exponential) algorithm for finding SMTs. Since 1970, successive mathematical improvements (and of course faster machines) have led to programs which are practical for higher numbers of given points. In Table 1 we list these programs, authors, and approximate application. We note that the problem is NP-complete [6] and hence it is unlikely that there is any better method than backtracking with efficient pruning of the tree(s) of possibilities.

Table 1 Program

Author(s)

Approximate application

(1) STEINER (2) STEINER72 (3) STEINER73

Cockayne and Schiller [5] Boyce and Seery [2] Boyce and Seery [3] Winter [9]

7 points 10 points 12 points 15 points

(4) GEOSTEINER

* This research was supported by Canadian NSERC Grants A7544 and A7558. 0020-0190/86/$3.50 © 1986, Elsevier Science Publishers B.V. (North-Holland)

151

Volume 22, Number 3

INFORMATION PROCESSING LETTERS

The present procedure is based on GEOSTEINER which has two main parts. Our principal improvements involve use of the geometry performed by the first part of that algorithm, to reduce the SMT problem for A, to a set of problems on subsets of smaller cardinality. This reduction enables the second part to proceed considerably faster. Machine times, of course, depend heavily on the geometry as well as on the number of given points. Computational experience has indicated that an increase in problem size from n to n + 1 for 10 ~ n ~< 17, causes at least a doubling of average computation times for GEOSTEINER without our improvements. The value n = 17 was the limit for reasonably quick ( < 200 seconds) solutions of randomly generated problems. However, when the reductions had been implemented, of one-hundred randomly generated 30point problems, seventy-nine were reduced to sets of problems on subsets of m a x i m u m cardinality 17 and hence solvable by the program in a reasonable time.

2. Improvements to Winter's algorithm For brevity, we assume the reader to be familiar with Winter's work [9], which explains any terminology undefined here. A Full Steiner Tree (FST) on a plane set B, where IB J = m, is a plane tree whose vertices are the points of B and exactly m - 2 Steiner points satisfying: (i) the degree of each point in B is 1, and (ii) each Steiner point has degree 3 and the angles at each Steiner point are 120 °. It is well known [4] that the SMT for A is an edge-disjoint union of Full Steiner Trees (FSTs) on subsets of A. Winter's principal contribution, which we call stage 1 of his algorithm, is a very clever procedure for producing TLIST, which is a list of FSTs containing all the FSTs in the SMT. His mathematical pruning techniques are so powerful that randomly generated problems with n ~< 30 seem to produce a TLIST of length at most 100 and usually considerably less. This is an outstanding achievement. Stage 2 of Winter's algorithm [9, Section 23] extracts from TLIST the precise set of FSTs whose 152

3 March 1986

union is the SMT. Each entry of TLIST stores an FST including the length, the set of indices of its leaves (original points), the set of Steiner points, and the edge set. Stage 2 of GEOSTEINER is a standard backtracking procedure along TLIST using a length test, degree test, and cycle test. The limit of n = 15 on GEOSTEINER is due to stage 2. The machine time for extraction of the SMT from TLIST, for larger n, is usually prohibitive. However, when the reductions suggested in this paper are applicable, machine times for stage 1 usually dominate the total time.

2.1. Incompatibility matrix It is possible to compute only those Steiner points which are in the SMT [9, Section 18]. However, since TLIST is SO short for n ~< 30, the computation time for computing Steiner points for all FSTs in TLIST, is insignificant. Such a computation enables the preprocessing described in this section which in fact saves large amounts of machine time. The backtraining time for stage 2 may be considerably reduced by computing beforehand an incompatibility matrix for TLlST. Two entries of TLIST may not both be in the S M T if (i) their leaf-sets intersect in at least two points, or (ii) their leaf-sets intersect in exactly one point x and the angle m a d e by their branches at x is less than 120 ° . Such pairs in TLIST are called incompatible. Time of computation of the incompatibility matrix is negligible. It is, of course, polynomial in the length of TLIST. The introduction of the incompatibility matrix into our implementation of GEOSTEINER enabled us to solve (i.e., perform both stages of the algorithm) all randomly generated problems with n ~< 17 in less than 200 secs.

2.2. Biconnected components Due to the exponential nature of the S M T algorithm, it is highly desirable to invoke theorems of the type: If (criteria C), then the SMT for A is the union of SMTs on the subsets of A 1 and A 2 of A. The only theorem of this type so far involves

Volume 22, Number 3

I N F O R M A T I O N PROCESSING LETTERS

the Steiner Polygon of A which we now define. Let V(P) be the vertex set of polygon P and suppose P1 is the convex polygon b o u n d i n g the convex hull of A. We define P2, P3, • • • , Pm recursively as follows. If Pr is not simple, the process terminates. Otherwise, for each side aua n of Pr in turn we search for an a-point a ~ A - V ( P ~ ) satisfying Lauarav =

max

a ~ A - - V(Pr)

Lauaav>~ 120 ° .

If such a point exists, Pr+l is f o r m e d by replacing the side a u a v of Pr by the two sides aua~, arab. Otherwise, the process terminates. The last polygon Pm defined by the process is called the Steiner polygon of A (see [4, p. 152]). Theorem 2.1 (Cockayne, 1968). I f the Steinerpolygon of A consists of two simple polygons with vertex sets A t and A 2 joined externally at a single given point, then any S M T for A is the union of two separate S M T s , one for A 1 and one for A 2. The set A is tested at the outset to see if T h e o r e m 2.1 gives a decomposition. T h e theorem m a y possibly be applied repeatedly to reduce the SMT p r o b l e m for A to a set of S M T problems on smaller sets A~ . . . . , A k. A n example of such a decomposition using T h e o r e m 2.1, is depicted in [4, Fig. 4]. Stages 1 and 2 are then applied to each separate set A iThe elimination of FSTs, achieved by stage 1 of GEOSTEINER, leads to a second t h e o r e m of this type. The proof is trivial because all FSTs of the SMT are in TLIST. Theorem 2.2. Let A 1 and A 2 be subsets of A satisfying (i) A1 t.) A 2 = A, (ii) IA1 (~ A21 = 1, and (iii) the leaf-set of each F S T in TLIST is entirely contained in either A 1 or A 2. Then, any S M T on A is the union of separate S M T s on A 1 and A 2. After stage 1 has been completed, T h e o r e m 2.2 m a y often be applied repeatedly to reduce the S M T problem for A to problems on subsets A 1. . . . , A k. In such a case, stage 2 need not extract an S M T for A from the entire TLIST.

Instead, for each i = 1 . . . .

3 March 1986

,k we form a subset

TLIST i of TLIST containing only those FSTs whose

leaf-sets are c o n t a i n e d in A, and use stage 2 to extract an SMT for A~ from TLIST i. The union of these SMTs is the required SMT for A. These stage 2 decompositions save vast amounts of machine time. There are two ways to determine the class of sets A 1. . . . . A k w h e n T h e o r e m 2.2 is applicable. The first is to simply draw all the FSTs in TLIST using a c o m p u t e r plotter. The decomposition is then, usually, obvious. An example is given in Figs. 1 and 2. The given points are at the locations of twenty-nine N o r t h American cities. Fig. 1 shows TLIST for this problem, drawn with the CALCOMP plotter. This computation took 155 secs on the IBM 4381 and reduced the second stage to four problems of size 2, one of size 4, one of size 6, and two of size 9. The SMT, extracted from TLIST in 12 secs, is shown in Fig. 2. However, the sets A~ may be automatically generated as follows. Construct from TLIST the undirected graph G whose vertices are the indices {1 . . . . , n ) of the given points, with vertices i, j adjacent if and only if (i, j} is contained in the leaf-set of some F S T in TLIST. Then the required sets are the biconnected components of G and m a y be found efficiently using depth-first search methods (see, e.g., [1, p. 179]). Decompositions using Theorems 2.1 and 2.2 enable us to solve, in a reasonable time, any problem in which the m a x i m u m cardinality of a set A~ is at most 17. In the next section we describe a m e t h o d which is often applicable to sets which are not reducible by Theorems 2.1 and 2.2.

2.3. Leaf-sets whose intersection graph is a cycle The decomposition of Section 2.2 used articulation points of the graph G. If G has connectivity 2, we can exploit points of G whose removal reduces the connectivity from two to one. T h e o r e m 2.3. Let A 1. . . . , A k be subsets of A such that (i) the leaf-set of each F S T in TLIST is entirely 153

Volume 22, Number 3

I N F O R M A T I O N PROCESSING LETTERS

3 March 1986

f

f

/

/

/

J

\

/

J

/

J

J

\

/

\

/

f

/

/

\

/

I

l

\

/

I \

/

\

\

/

/ \ J J

/

)

~\ \

/ \

/

Fig. 1. TLIST and reduction using Theorem 2.2.

c o n t a i n e d in s o m e A i,

(ii)

A i (3 A i + 1

[(ai}

f o r each i ~ { 1 , . . . , k } ( w h e r e Ak+ 1 = Aa), otherwise.

Then, any SMT

f o r A c o n t a i n s an S M T

for k - 1

o f t h e sets A 1 , • • • , A k.

Proof. Let Q be an SMT for A and let Q~ be the subgraph of Q which contains the vertices of A i together with all FSTs in Q Whose leaf-sets are 154

contained in A i. Each Qi is a forest and since every FST of Q is in TLIST, it follows from (i) that Uik 1Qi = Q. Suppose Qi, Qj (i 4=j) are disconnected. If there were a path in Q~ from a~_l to a i, then there would be a third vertex a m in Qi disconnected in Q from a i_ 1 and a i; a contradiction. Similarly, there is no path in Qj from aj_ 1 to aj. Hence, by (ii) there is no path in Q from a~_ 1 t o a~ and, therefore, Q is disconnected. This contradiction shows that k - 1 of the forests are trees and, by minimality, they must be SMTs on their respective sets. This completes the proof of the theorem. []

INFORMATION PROCESSING LETTERS

Volume 22, Number 3

3 March 1986

~Calgary Seattle

portland

~innipeg

Boise

St. Paul San Francisco

Lake City

Cheyenne Lincoln Peoria

Las Vegas

asaS C.

L.A.

Louisville

Wichita

P~oenix

Albuquerque

~Okl ahoma C. L

Nashville

Clemson

Memph i s

las

/

XoCharlest°n Montgomery

Antonio

(~New O r l e a n s

Fig. 2. The Steiner Minimal Tree.

This theorem is the justification for the following reduction of the SMT problem for A to a set of smaller problems. (1) Find SMTs Qi for A i, i = 1, . . . ,k. (2) For e a c h j e { 1 , . . . ,k}, let Rj =

U Qii4:j, iE {1. . . . . k}

Construct Fj, a collection of FSTs from TLIST of minimum total length, which connects the points of Aj -

U Ai ie{1 . . . . . k),i*j

to Rj. (3) Then, an SMT for A is the minimum length tree in the set {Rj W Fj :j e {1 . . . . ,k}}. Sets satisfying the hypotheses of Theorem 2.3 may be found either by inspection of the plotter

drawing of the FSTs in TLIST or by manipulating the graph G defined in Section 2.2. Specifically, if a is a vertex of G whose removal reduces the connectivity of G from 2 to 1, then the required sets are the biconnected components of the reduced graph G - {a} (with vertex a added to the appropriate components). The computation time for this manipulation is polynomially bounded and is negligible. The construction of Fj involves backtracking along the list of FSTs of TUST whose leaf-sets are contained in Aj. This computation is very similar to that for finding an SMT for Aj from a ]'LIST and takes roughly the same time. We are thus able to solve any problem with n ~< 30, which is reducible using Theorems 2.1, 2.2, or 2.3, to problems involving subsets having at most 17 points. For n > 30, the time to compute TLIST may be prohibitive. 155

Volume 22, Number 3

I N F O R M A T I O N PROCESSING LETTERS

3 March 1986

3. Computational results

References

Using an IBM 4381 machine, we ran h u n d r e d randomly generated 30-point problems. Of these, fifty-eight were solvable by applications of Theorems 2.1 or 2.2, and twenty-one of the remainder were solvable by the cycle reduction of Section 2.3. The remaining twenty-one problems did not reduce to blocks of size at most 17 and would use unreasonable a m o u n t s of time in the extraction of the SMT from TLIST. Computer times for TLIST construction varied from 1 to 5 minutes and for the seventy-nine solvable problems, SMT extraction took at most 70 secs.

[1] A.V. Aho, J.E. Hopcroft and J.D. Ullman, The Design and Analysis of Computer Algorithms (Addison-Wesley, Reading, MA, 1974). [2] W.M. Boyce and J.B. Seery, STEINER 72--An improved version of Cockayne and Schiller's program STEINERfor the minimal network problem, Tech. Rept. #35, Bell Labs., Dept. of Computer Science, 1975. [3] W.M. Boyce and J.B. Seery, STEINER 73, Private communication. [4] E.J. Cockayne, On the efficiency of the algorithm for Steiner Minimal Trees, SIAM J. Appl. Math. 18 (1) (1970) 150-159. [5] E.J. Cockayne and D.G. Schiller, Computation of Steiner Minimal Trees, in: D.J.A. Welsh and D.R. Woddall, eds., Combinatorics (Inst. Math. Appl., 1972) 52-71. [6] M.R. Garey, R.L. Graham and D.S. Johnson, The complexity of computing Steiner Minimal Trees, SIAM J. Appl. Math. 32 (4) (1977) 835-859. [7] Z.A. Melzak, On the problem of Steiner, Can. Math. Bull. 4 (1961) 143-148. [8] J.M. Smith, D.T. Lee and J.S. Liebman, An O ( n l o g n ) heuristic for Steiner Minimal Tree problems on the Euclidean metric, Networks 11 (1981) 23-29. [9] P. Winter, The Steiner problem, Masters Thesis, Institute of Datology, Univ. of Copenhagen, 1981.

156