HANDBOOK OF COMPUTATIONAL GEOMETRY
This Page Intentionally Left Blank
HANDBOOK OF C O M PU TAT I O NAL GEOMETRY
E d i t e d by
J.-R. Sack Carleton University, Ottawa, Canada
J. Urrutia Universidad Nacional Aut6noma de M~xico, M(xico
N 2000 ELSEVIER Amsterdam
• Lausanne
• New
York
• Oxford
• Shannon
• Singapore
• Tokyo
E L S E V I E R S C I E N C E B.V. S a r a B u r g e r h a r t s t r a a t 25 P.O. B o x 211, 1000 A E A m s t e r d a m , T h e N e t h e r l a n d s
©
2000 Elsevier Science B.V.
A l l rights r e s e r v e d .
T h i s w o r k is p r o t e c t e d u n d e r c o p y r i g h t b y E l s e v i e r S c i e n c e , a n d the f o l l o w i n g t e r m s a n d c o n d i t i o n s a p p l y to its use: Photocopying Single photocopies of single chapters may be made for personal use as allowed by national copyright laws. Permission of the Publisher and payment of a fee is required for all other photocopying, including multiple or systematic copying, copying for advertising or promotional purposes, resale, and all forms of document delivery. Special rates are available for educational institutions that wish to make photocopies for non-profit educational classroom use. Permissions may be sought directly from Elsevier Science Rights & Permissions Department, PO Box 800, Oxford OX5 I DX, UK; phone: (+44) 1865 843830, fax: (+44) 1865 853333, e-mail:
[email protected]. You may also contact Rights & Permissions directly through Elsevier's home page (http://www.elsevier.nl), selecting first 'Customer Support', then 'General Information', then 'Permissions Query Form'. In the USA, users may clear permissions and make payments through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA; phone: (978) 7508400, fax: (978) 7504744, and in the UK through the Copyright Licensing Agency Rapid Clearance Service (CLARCS), 90 Tottenham Court Road, London W1P 0LP, UK; phone: (+44) 171 631 5555; fax: (+44) 171 631 5500. Other countries may have a local reprographic rights agency for payments. Derivative Works Tables of contents may be reproduced for internal circulation, but permission of Elsevier Science is required for external resale or distribution of such material. Permission of the Publisher is required for all other derivative works, including compilations and translations. Electronic Storage or Usage Permission of the Publisher is required to store or use electronically any material contained in this work, including any chapter or part of a chapter. Except as outlined above, no part of this work may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of the Publisher. Address permissions requests to: Elsevier Science Rights & Permissions Department, at the mail, fax and e-mail addresses noted above. Notice No responsibility is assumed by the Publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein. Because of rapid advances in the medical sciences, in particular, independent verification of diagnoses and drug dosages should be made.
First e d i t i o n
2000
Library of Congress Cataloging-in-Publication Data A c a t a l o g r e c o r d f r o m the L i b r a r y o f C o n g r e s s has b e e n a p p l i e d for.
ISBN: 0 444 82537 1
G T h e p a p e r u s e d in this p u b l i c a t i o n m e e t s the r e q u i r e m e n t s o f A N S I / N I S O Z 3 9 . 4 8 - 1 9 9 2 ( P e r m a n e n c e o f Paper). P r i n t e d in T h e N e t h e r l a n d s
Computational Geometry is a young and vibrant field of Computer Science born in the early 1970’s. Since its beginning, Computational Geometry has attracted the interest of a large number of researchers, due to its numerous and strong interactions with various fields of Science and Engineering such as Algorithms and Data Structures, Combinatorial Mathematics, Euclidean Geometry, and Optimization. Recently the demand for efficient geometric computing in a variety of areas of applied sciences such as Geographical Information Systems, Visualization, Robotics, Computer Graphics, and CAD has further fueled research in Computational Geometry. This has resulted in a wealth of powerful techniques and results of interest to researchers and practitioners. The need for a comprehensive source of information on the fundamental techniques and tools developed in Computational Geometry is evident. This handbook will be an important source of information for all of us interested in one way or another in Computational Geometry. Readers whose objectives are to use a method for their applications will be able to find and choose different approaches and techniques to solve a large number of problems, most of them described in a comprehensive and concise manner. Researchers interested in theoretical results will find this handbook an invaluable and comprehensive source of information in which most of the results, tools and techniques available in our field are to he tound. This handbook presents chapters which survey in detail most of the research available to date in this field. The handbook contains survey papers in the following fundamental topics: Arrangements, Voronoi Diagrams, Geometric Data Structures (incl. point location, convex hulls, etc.), Spatial Data Structures, Polygon Decomposition, Randomized Algorithms, Derandomization, Parallel Computational Geometry (deterministic and randomized). Visibility, Art Gallery and Illumination Problems, Closest Point Problems, Link Distance Problems. Similarity of Geometric Objects. Davenport-Schinzel Sequences, and Spanning Trees and Spanners. There are also three chapters devoted to applications of Computational Geometry to other fields of science: Geographical Information Systems, Geometric Shortest Paths and Network Optimization, and Mesh Generation. In addition, there is a chapter devoted to robustness and numerical issues, and chapters on Animation and Graph Drawing. We would like to thank for the enthusiasm shown by all the contributors to this handbook, as well as express our gratitude to the numerous anonymous referees whose invaluable contributions made this project possible. We are grateful to Arjen Sevenster of Elsevier Science for his enthusiastic support which made this handbook a reality. Finally, we thank Anil Maheshwari for his help. J.-R. Sack J. Urrutia
This Page Intentionally Left Blank
List of Contributors Agarwal, P.K., Duke University, Durham, NC (Chs. 1 , 2 ) Alt, H., Freie Univer.sitat Berlin, Berlin (Ch. 3) Asano, T., Japan Advanced Institute ofscience and Technology, Ishikawu (Ch. 19) Atallah, M.J., Purdue University, West Lafayetre, IN (Ch. 4) Aurenhammer, F., Technische Universitat Grae, Graz (Ch. 5 ) Bern, M., Xerox Palo Alto Research Center; Pa10 Alto, CA (Ch. 6 ) Chen, D.Z., University of Notre Dame, Notre Dame, IN (Ch. 4) De Floriani, L., Universita di Genova, Genova (Ch. 7 ) Djidjev, H.N., University cf Wanvick, Coventry (Ch. 12) Dobkin, D.P., Princeton University, Princeton, NJ (Ch. 8) Eppstein, D., University of California, Iwine, CA (Ch. 9) Ghosh, S.K., Tutu Institute qf Fundcimental Research, Bombay (Ch. 19) Goodrich, M.T., Johns Hopkins University, Baltimore, M D (Ch. 10) Guibas, L.J., Stanford University Stcmti,rd. CA (Ch. 3 ) Hausner, A,, Princeton Universitj: Princeton. NJ (Ch, 8 Kzil, J.M., Utiitzer,sitvc!f’Sa.skutc,hc~varr, Suskutonn. SK (Ch. i 1 ) Klein, K., F p t n Universitiit Hugen, f f u g r n (Ch. S 1 Magillo, P., I h ~ r r . s i t idi~ G m m u Grrrow (CII.7 ) Mahebhwari, A,, Carieron University, Ottawa, ON (Ch. 12j MatouSek, J., Charles Universiq, Prtiha (Ch. 13) Mitchell, J.S.B.. State Universiq ($New York, Stony Brook, NY (Ch. 15) Mulmuley, K., The University of Chicago, Chicago, IL, and l.l.i?,Bombay (Ch. 16) Nievergelt, J., ETH Zurich, Zurich (Ch. 17) Plassmann, P., Pennsylvnnia State University, University Park, PA (Ch. 6 ) Puppo, E., Universitu di Genova, Genova (Ch. 7 ) Ramaiyer, K., Infbrmix Sfhvare, Oakland, CA (Ch. 10) Reif, J.H., Duke University, Durham, NC (Ch. 18) Sack, J.-R., Carleton University, Ottawa, ON (Ch. 12) Schirra, S., ~ ~ i x - p l ~ i t i c k - l n s t i t uInfiirmatik, tfur Saarbrucken (Ch. 14) Sen, S., Indian Institute of Technology, New Delhi (Ch. IS) Sharir, M., Tel Aviv University, Tel Aviv, and New York University, New York, NY (Chs. 1,2) Shermer, T.C., Simon Fruser University, Burnaby, BC (Ch. 19) Smid, M., University ofMagdeburg, Magdeburg (Ch. 20) Tamassia, R., Brown UniversiQ, Providence, RI (Ch. 21) Urrutia, J., Universidad Nacional Autcinonza de MPxico, MPxico (Ch. 22) Widmayer, P., ETH Zurich, Zurich (Ch. 17) vii
This Page Intentionally Left Blank
Contents Preface List of Contributors
V
vii
1. Davenport-Schinzel sequences and their geometric applications l? K. Aganval and M. Sharir 2. Arrangements and their applications l? K. Aganval and M. Sharir 3. Discrete geometric shapes: M a h i n g , interpolation, and approximation H . Alt and L.J. Guibas 4. Deterministic parallel computational geometry M.J. Atallah and D.Z. Chen 5 . Voronoi diagrams E Aurenhammer and R. Klein 6. Mesh generation M. Bern and P. Plassmann 7. Applications of computational geometry to geographic information systems L. de Floriani, l? Magillo and E. Puppo 8. Making geometry visible: An introduction to the animation of geometric algorithms A. Hausner and D.P. Dobkin 9. Spanning trees and spanners D. Eppste in 10. Geometric data structures M. 7: Goodrich and K. Ramaiyer 1 1. Polygon decomposition J.M. Keil 12. Link distance problems A. Maheshwari, J.-R. Sack and H.N. Djidjev 13. Derandomization in computational geometry J. Matoufek 14. Robustness and precision issues in geometric computation S. Schirra 15. Geometric shortest paths and network optimization J.S. B. Mitchell 16. Randomized algorithms in computational geometry K. Mulmuley ix
1 49 121
155 20 1 29 1
333 389 425 463 49 1 519 559 597
633 703
x
Contents
17. Spatial data structures: Concepts and design choices
725
J. Nievergelt and P. Widmayer
18. Parallel computational geometry: An approach using randomization
765
J.H. Reif and S. Sen
19. Visibility in the plane
829
T. Asano, S.K. Ghosh and T.C. Shermer
20. Closest-point problems in computational geometry
877
M. Smid
21. Graph drawing
937
R. Tamassia
22. Art gallery and illumination problems
973
J. Urrutia
Author Index Subject Index
I-1 1-35
CHAPTER 1
Davenport-Schinzel Sequences and Their Geometric Applications* Pankaj K. Agarwal Center for Geometric Computing, Department of Computer Science, Box 90129, Duke University, Durham, NC 27708-0129, USA E-mail:
[email protected]
Micha Shark School of Mathematical Sciences, Tel Aviv University, Tel Aviv 69978, Israel, and Courant Institute of Mathematical Sciences, New York University, New York, NY 10012, USA E-mail: sharir@math. tau. ac. il
Contents 1. Introduction 2. Davenport-Schinzel sequences and lower envelopes 2.1. Lower envelopes of totally defined functions 2.2. Lower envelopes of partially defined functions 2.3. Constructing lower envelopes 3. Simple bounds and variants 4. Sharp upper bounds on A^ («) 4.1. Ackermann's function — A review 4.2. The upper bound for A.3(«) 4.3. Upper bounds onXgin) 5. Lower bounds on A^Cn) 6. Davenport-Schinzel sequences and arrangements 6.1. Complexity of a single face 6.2. Computing a single face 6.3. Zones 6.4. Levels in arrangements
.
.
. . . ,
3 4 4 7 8 9 11 11 12 16 16 20 21 23 27 28
*Both authors have been supported by a grant from the U.S.-Israeli Binational Science Foundation. Pankaj Agarwal has also been supported by a National Science Foundation Grant CCR-93-01259, by an Army Research Office MURI grant DAAH04-96-1-0013, by a Sloan fellowship, and by an NYI award and matching funds from Xerox Corporation. Micha Sharir has also been supported by NSF Grants CCR-91-22103 and CCR-93-11127, by a Max-Planck Research Award, and the Israel Science Fund administered by the IsraeU Academy of Sciences, and the G.I.F., the German-Israeli Foundation for Scientific Research and Development.
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved 1
2
RK. Agarwal and M. Sharir
7. Miscellaneous applications 7.1. Applications of D5(n, 2)-sequences 7.2. Motion planning 7.3. Shortest paths 7.4. Transversals of planar objects 7.5. Dynamic geometry 7.6. Hausdorff distance and Voronoi surfaces 7.7. Visibility problems 7.8. Union of Jordan regions 7.9. Extremal {0, l}-matrices 8. Concluding remarks References
Abstract An {n,s) Davenport-Schinzel sequence, for positive integers n and 5, is a sequence composed of n distinct symbols with the properties that no two adjacent elements are equal, and that it does not contain, as a (possibly non-contiguous) subsequence, any altemation a- -b-' a- • b- " of length s -\-2 between two distinct symbols a and b. The close relationship between Davenport-Schinzel sequences and the combinatorial structure of lower envelopes of collections of functions make the sequences very attractive because a variety of geometric problems can be formulated in terms of lower envelopes. A near-linear bound on the maximum length of Davenport-Schinzel sequences enable us to derive sharp bounds on the combinatorial structure underlying various geometric problems, which in turn yields efficient algorithms for these problems.
29 30 31 34 35 36 37 38 39 40 41 41
Davenport-Schinzel sequences and their geometric applications
3
1. Introduction Davenport-Schinzel sequences, introduced by H. Davenport and A. Schinzel in the 1960s, are interesting and powerful combinatorial structures that arise in the analysis and construction of the lower (or upper) envelope of collections of univariate functions, and therefore have applications in a variety of geometric problems that can be reduced to computing such an envelope. In addition, Davenport-Schinzel sequences play a central role in many related geometric problems involving arrangements of curves and surfaces. For these reasons, they have become one of the major tools in the analysis of combinatorial and algorithmic problems in geometry. DEFINITION 1.1. Let n and s be two positive integers. A sequence U = {u\,.. ..Um) of integers is an {n,s) Davenport-Schinzel sequence (a DS(n, s)-sequence for short) if it satisfies the following conditions: (i) I ^Ui ^n for each / < m, (ii) Ui 7^ M/+1 for each / < m, and (iii) there do not exist 5* + 2 indices 1 ^ /i < 12 < • "
and a^b. In other words, the third condition forbids the presence of long alternations of any pair of distinct symbols in a Davenport-Schinzel sequence. We refer to s as the order of L^, to n as the number of symbols composing [/, and to | (71 = m as the length of the sequence U. Define Xsin) = max{|t/| | U is SiDS{n, 5")-sequence}. Curiously, the original papers by Davenport and Schinzel [48,49] were entitled On a combinatorial problem connected with differential equations, because they were motivated by a particular application that involved the pointwise maximum of a collection of independent solutions of a linear differential equation. This, however, is only a special case of more general lower or upper envelopes. Davenport and Schinzel did establish in [48,49] the connection between envelopes and these sequences, and obtained several non-trivial bounds on the length of the sequences, which were later strengthened by Szemeredi [149]. The potential of Z)»S-sequences to geometric problems, however, remained unnoticed until Atallah rediscovered and applied them to several problems in dynamic computational geometry [22]. It is easy to show that X\(n) =n and X2(n) = 2n — 1 (see Theorem 3.1). Hart and Sharir [80] proved that k3(n) = 0(na(n)), where a(n) is the inverse Ackermann function (see below for details), and later Agarwal et al. [11] (see also Sharir [137,138]) proved sharp bounds on Xs(n) for ^ > 3. These somewhat surprising bounds show that Xs(n) is nearly linear in n for any fixed s. Davenport-Schinzel sequences have become a useful and powerful tool for solving numerous problems in discrete and computational geometry, usually by showing that the geometric structure being analyzed has smaller combinatorial
4
RK. Agarwal and M. Sharir
complexity than what more naive methods would have impHed. Many such geometric applications have been obtained in the past decade, and we review some of these applications below. The recent book by the authors [142] gives a more detailed description of the theory of D»S-sequences and of their geometric applications. As noted above, and will be shown in more detail below, Davenport-Schinzel sequences provide a complete combinatorial characterization of the lower envelope of a collection of univariate functions. In many geometric problems, though, one faces the more difficult problem of calculating or analyzing the envelope of a collection of multivariate functions. Even for bivariate functions this problem appears to be considerably harder than the univariate case. Nevertheless, recent progress has been made on the multivariate case, leading to almost-tight bounds on the complexity of envelopes in higher dimensions [77,141]. Higher-dimensional lower envelopes and related combinatorial structures will be reviewed by the authors in Chapter 2 of this Handbook. The material reviewed in this chapter is a mixture of the basic combinatorial analysis of Davenport-Schinzel sequences and of their geometric applications, both combinatorial and algorithmic. Section 2 shows the connection between D5-sequences and lower envelopes. Sections 3-5 discuss the analysis of the maximum length of (n,s) Davenport-Schinzel sequences. Section 6 presents basic combinatorial geometric appUcations of DavenportSchinzel sequences to two-dimensional arrangements of lines, segments, and arcs, and studies the role of these sequences in such arrangements. Finally, Section 7 surveys a miscellany of other geometric applicadons of Davenport-Schinzel sequences. The material given in this survey is, to a large extent, an abridged version of the material presented in the book [142], and we refer the reader to that book for more details.
2. Davenport-Schinzel sequences and lower envelopes 2.1. Lower envelopes of totally defined functions Let ^ = {/i , . . . , / „ } be a collection of AZ real-valued, continuous totally defined functions so that the graphs of every pair of distinct functions intersect in at most s points (this is the case for polynomials of fixed degree, Chebychev systems, etc.). The lower envelope of T is defined as Ejr(x)=
min
f(x),
i.e., Ejr is the pointwise minimum of the functions f; see Figure 1. Let / i , . . . , /^ be the maximal connected intervals on the jc-axis so that they cover the entire jc-axis and, for each k ^m,the same function /^^ appears on Ejr for all points in Ik (i.e., Ejr{x) = fui. {x) for all X e Ik). In other words, m is the number of (maximal) connected portions of the graphs of the fi 's that constitute the graph of Ejr. The endpoints of the intervals Ik are called the breakpoints of Ejr. Assuming that I \,.... Im are sorted from left to right, put U(J^ =
(uu...,Uni).
Davenport-Schinzel
sequences and their geometric
applications
Fig. 1. A lower-envelope sequence.
U{T) is called the lower-envelope sequence of ^ ; see Figure 1. The minimization diagram of IF, denoted by MJF, is the partition of the x-axis induced by the intervals I[,..., ImThe endpoints of these intervals are called the breakpoints of Mjr. For convenience, we add — CO, + DC as the breakpoints of Mjr. The upper envelope of T is defined, in a fully symmetric manner, to be E'^jrix)^
max fi{x),
and the maximization diagram M t is defined as the corresponding partition of the real line, as in the case of lower envelopes. In this chapter vv e mostly consider lower envelopes. This choice is arbitrary, and all the results, of course, apply equally well to upper envelopes. THEOREM 2.1 ([22,49]). U{J^) is a DS(n,s)-sequence. Conversely, for any given DS{n, s)-sequence U, one can construct a set JT = {/i,..., /„} of continuous, totally defined, univariate functions, each pair of whose graphs intersect in at most s points, such thatU{J=') = U.
(Sketch). For the first part, note that, by definition, the lower-envelope sequence U = U(JF) does not contain a pair of adjacent equal elements. For simplicity, assume that the graphs of functions in T intersect transversally at each intersection point. The proof can easily be extended to the case when the graphs of two functions touch each other. Suppose U contains A-f 2 indices i\ < i2 < - • - < is+i so that M/, = ui^ = • • • = a and M/2 = u^ = '' - — b for a ^ b.By definition of the lower-envelope sequence, we must have fa(x) < fb(x) for X € (int(//,) Uint(//3) U • • ) and faix) > fb(x) for x e (mt(Ii^)UmiiIi,) U • • •), where int(/) denotes the interior of the interval / . Since fa and ft are continuous, there must exist s + I distinct points x i , . . . , x^+i so that Xr lies between the intervals li^ and /j^^, and fa (Xr) = fb(xr), for r = I,.. .,s -\-1. This, however, contradicts the fact that the graphs of fa and //, intersect in at most s points. For the converse statement, let (7 — (wi,..., w^) be a given DS(n, ^)-sequence. Without loss of generality, suppose the symbols 1,2, . . . , n , of which U is composed, are ordered so that the leftmost appearance of symbol / in U precedes the leftmost appearance of symbol j in U if and only if / < j . We now define the required collection of functions JT = {/i,..., /„} as follows. We choose m — I distinct "transition points" PROOF
RK. Agarwal and M. Sharir
1 : 2: i:
3 : 1: 4 : 1 : 4: 3
Fig. 2. Realization of the DS{A, 3)-sequence (1, 2,1, 3, 1,4, 1,4, 3, 2).
X2 < X3 < • • • < jc^ on the jc-axis, and n -\- m — I distinct horizontal "levels," say, at y = 1,2, ...,n,—l, —2,..., —(m — 1). For each symbol 1 ^ a ^ n, the graph of the corresponding function fa is always horizontal at one of these levels, except at short intervals near some of the transition points, where it can drop very steeply from one level to a lower one. At each transition point exactly one function changes its level. More specifically: (i) Before X2, the function fa is at the level y =a,fora = 1,. ..,n. (ii) At the transition point x/, let A = M/; then fa drops down from its current level to the highest still "unused" level. See Figure 2 for an illustration. It is clear from this construction that U{T) = U, and it can be shown that each pair of functions intersect in at most s points. This completes the proof of the theorem. n COROLLARY 2.2. For any collection T={f\,...,fn}ofn continuous, totally defined, univariate functions, each pair of whose graphs intersect in at most s points, the length of the lower-envelope sequence U(J-^ is at most Xs (n), and this hound can be attained by such a collection T. COROLLARY 2.3. Let T ={f\,..., fn\ and G = {g\, - , gn) be two collections ofn continuous, totally defined, univariate functions, such that the graphs of any pair of functions ofT, or of any pair of functions ofQ, intersect in at most s points, and the graphs of any pair of functions in T x Q intersect in a (possibly larger) constant number ofpoints. Then the number of intersection points of graphs offunctions in T VJ Q that lie on the boundary of the region lying between the upper envelope ofQ and the lower envelope ofT (see Figure 3), i.e., the region
nr,Q
= [ix. y) I E:^(X) ^y^
E:f(x)},
isO(Xs(n)). PROOF. Let L = (Z?!,..., ^/) be the sequence of breakpoints of Mjr and M%, sorted from left to right. By definition, t ^ 2Xs (n). In each interval (bt ,bi^\), the envelopes Ejr, Eg are
Davenport-Schinzel
sequences and their geometric
applications
Fig. 3. The region between E% and Ejr is shown shaded; the graphs of the functions in JT (resp. in Q) are drawn soUd (resp. dashed).
attained by a unique pair of functions /^'^ e J^, g^^"* eQ. Hence, there are 0(1) intersection points on the boundary of Hjr g whose x-coordinates He in (bi,/?/+]). This completes the proof of the corollary. D
2.2. Lower envelopes ofpartially defined functions It is useful to note that a similar equivalence exists between Davenport-Schinzel sequences and lower envelopes of partially defined functions. Specifically, let f\,..,, fn be a collection of partially defined and continuous functions, so that the domain of definition of each function f is an interval //, and suppose further that the graphs of each pair of these functions intersect in at most s points. The lower envelope of T is now defined as Ejr(x) = min/;(x), where the minimum is taken over those functions that are defined at x. One can then define the minimization diagram Mjr and the lower-envelope sequence U{T) in much the same way as for totally defined functions; see Figure 4. In this case the following theorem holds. 2.4 ([80]). The lower-envelope sequence U{T) is a DS(n,s -j- 2)-sequence. Conversely, for any DS(n,s + 2)-sequence U one can construct a collection T = {/l,..., fn\ of partially-defined, continuous functions, each defined over an interval, and each pair of which intersect in at most s points, such that U{T) = U. THEOREM
Hence, we can conclude the following THEOREM 2.5 ([80]). Let T be a collection ofn partially defined, continuous, univariate functions, with at most s intersection points between the graphs of any pair. Then the length of the lower-envelope sequence U{T) is at most Xs^2{n)-
The functions constructed in Theorems 2.1 and 2.4, to realize arbitrary DS(n,s)sequences, have fairly irregular structure. A problem that arises naturally in this context
RK. Agarwal and M. Sharir 6
Fig. 4. The lower envelope of a collection of (nonvertical) segments.
is whether any DS(n, ^)-sequence can be reaHzed as the lower envelope sequence of a collection of n partial or total functions of some canonical form. For example, can any (n, 3) Davenport-Schinzel sequence be realized as the lower envelope sequence of a collection of n line segments (see Figure 4)? Some partially affirmative results on geometric relatization of DS(n, 5")-sequences will be mentioned below, although the problem is still wide open.
2.3. Constructing lower envelopes We conclude this section by presenting a simple, efficient divide-and-conquer algorithm for computing the minimization diagram of a set Tofn continuous, totally defined, univariate functions, each pair of whose graphs intersect at most s times, for some constant parameter s. Here we assume a model of computation that allows us to compute the intersections between any pair of functions in ^ in 0(1) time. We partition T into two subsets T\,T2, each of size at most fn/l^, compute the minimization diagrams Mjr,, Mjr^ recursively, and merge the two diagrams to obtain Mjr. We merge the lists of breakpoints of MJF, and of Mjr^ into a single list V = (v\ = —oo, V2,.. .,Vt = +oc), sorted from left to right. Notice that, for any 1 ^ / < r, there is a unique pair of functions /^^ e T\, / / G J^2, that attain the respective envelopes Ejr^, Ejr^ over (vf, i;/+i). We compute the real roots r\,..., ri^ (k ^ s) of the function /• — fi that lie in the interval (f,, u/+i), and add them to the list V. Let V = {v\,..., u p denote the new list of points. It is clear that, for each /, a unique function fi^T attains Ejr over the interval (u-, f •_^i). We associate // with this interval. If the same function is associated with two adjacent intervals (i^-_p i^/) and {v'., v'.^^), we delete the breakpoint v'- from y ^ The resulting list represents the minimization diagram Mjr of T. The total time spent in the merge step is 0 ( | V l ) = 0 ( | V | ) = 0(|M^,| + |M^,|)=0(A,(n)). Hence, the overall running time of the algorithm is 0(Xv {n) \ogn). If the functions in J^ are partially defined, an easy modification of the above algorithm constructs Mjr in time 0(Xv+2('^)logn). In this case, however, Mjr can be computed in time 0(Av+i {n) logn), using a more clever algorithm due to Hershberger [81].
Davenport-Schinzel sequences and their geometric applications
9
THEOREM 2.6 ([22,81]). The lower envelope of a set Tofn continuous, totally defined, univariate fiinctions, each pair of whose graphs intersect in at most s points, can be constructed, in an appropriate model of computation, in 0(Xv(n)logn) time. If the functions in T are partially defined, then Ejr can be computed in 0(As-(-i {n) \ogn) time. In particular, the lower envelope of a set of n segments in the plane can be computed in optimal 0{n\ogn) time.
3. Simple bounds and variants One of the main goals in the analysis of Z)5-sequences is to estimate the value of Xs{n). In this section we review some of the earlier results that established nontrivial bounds on Xs(n). These bounds are somewhat weaker than the best known bounds, but have simpler proofs. We begin our analysis by disposing of the two simple cases ^ = 1 and s = 2. THEOREM 3.1 ([49]). (a) Xi (n) = n.
{h)X2{n)=2n-\. PROOF (Sketch), (a) Let f/ be a DS(n, l)-sequence. U cannot contain any subsequence of the form (a---b"-a), for a ^ b, and any two adjacent elements of U are distinct, therefore all elements of U are distinct, which implies that \U\ ^n. The bound is tight, because f/ = (1 2 3 • • • n) is a DS(n, 1)-sequence. (b) The proof proceeds by induction on n. The case n = l is obvious. Suppose the claim holds for « — 1, and let U be any DS(n, 2)-sequence. Without loss of generality, we can assume that the leftmost occurrence of / in U is before the leftmost occurrence of j if and only if / < j . It can then be shown that there is only one occurrence of fi in [/, or else a forbidden subsequence of the form {x - • -n-' -x - • -n) would arise. Remove this single appearance of n from U, and if the two symbols adjacent to n are equal, remove also one of them from U. The resulting sequence is clearly a DS(n — 1, 2)-sequence, and is one or two elements shorter than U. The induction hypothesis then implies |L^| ^ 2 / i — 3 + 2 = 2n — 1. Since the sequence (123---?i — I n n — l - - 3 2 1 ) i s clearly a DS(n, 2)-sequence of length 2/1 — 1, the bound is tight. D A cycUc sequence U is called a DS(n, 2)-cycle if no two adjacent symbols are equal and if U does not contain a subcycle of the form (a • • • Z? • a • • • Z?), for any a^b. Notice that the maximum length of a DS(2, 2)-cycle is 2. The same argument as in Theorem 3.1(b) can be used to prove the following. COROLLARY
3.2. The maximum length of a DS(n,2)-cycle consisting of n symbols is
2n-2. As we will see later, obtaining a sharp bounds on the maximum length of a DS{n, s)sequence, for 5* ^ 3, is not as simple. Let us first give a simple proof of the following bound: THEOREM
3.3 ([49]). k^{n) =
0(nlogn).
10
RK. Agarwal and M. Sharir
PROOF (Sketch). Let f/ be a DS{n, 3)-sequence of length A3 {n). There must exist a symbol X that appears in U at most X^{n)/n times. For any appearance of x which is neither the leftmost nor the rightmost, the symbols immediately preceding and succeeding x must be different, or else we would have obtained a forbidden subsequence of the form (x • • • yxy " -x),. Hence, if we erase from U all appearances of jc, and, if necessary, at most two other elements, near the first and last appearances of x, we obtain a DS{n — 1,3)sequence, so this analysis implies the recurrence
A3(n>^A3(n-l)-f ^ ^ + 2 , n or n
n—\
n—\
from which the claim follows easily.
D
This bound was later improved by Davenport [48] to 0(n \ogn/ log log n). For any given n and s, a trivial upper bound on Xs(n) is sn(n — l)/2 + 1 (use Corollary 2.2 and the observation that the total number of intersections between the functions in J^ is at most si^))- Roselle and Stanton [131] proved that, for s > n, one has Xs{n) > sn{n — l)/2 — cn^, where c < 1 is a constant. Davenport and Schinzel [49] proved that, for any fixed 5-, there is a constant C.v depending on 5-, such that ks{n) ^ n • 2^^vi«g^ xhe problem was also studied in several early papers [53,108,112,122,130,132,147,148], but the next significant improvement on the bound of ks(n) was made by Szemeredi [149], who proved that Ks(n) ^ AsH log* Ai, for each s ^3 and for appropriate positive constants As (doubly exponential in s). The currently best known bounds on Ks{n) for ^ ^ 3, stated below, are by Hart and Sharir [80] and Agarwal et al. [11]. X3(«) =
&{na{n)),
X4(n) = 6^(^.2'^^''^), X2s+3(n) = n . 20(«^<^^)'^^g«'(^)),
for ^ ^ 1;
more precise forms of these bounds are given in Theorems 4.3, 4.5, 5.1, and 5.2 below. We conclude this section by mentioning some generalizations of Z)5(n, 5")-sequences. Let U = {u\yU2r •. .,Um) be a DS(n, 5-)-sequence. For 1 ^ 7 < m, let /^(y) denote the number of symbols whose leftmost occurrences in U occur at an index ^ j and whose rightmost occurrences occur at an index > j . We define the depth of U to be the maximum value of Ax(7), for 7 ^ m. Define a ^^(n, s, 0-sequence to be a DS(n, 5')-sequence whose depth is at most I, and let Xsj{n) denote the maximum length of a DS(n, s, 0-sequence.
Davenport-Schinzel sequences and their geometric applications
11
Huttenlocher et al. [83] proved that Ksjin) ^ \n/t^'ks{2t) (see also Har-Peled [78]). This result has the following interesting consequence: COROLLARY 3.4 ([83]). Let T = {f\, ..., ft} be a collection oft continuous, real-valued, piecewise-linear functions {i.e., the graph of each f is an x-monotone polygonal chain). Let n be the total number of edges in the graphs of the functions of T. Then the lower envelope of T has at most k3j(n) ^ ln/t']X3(2t) = 0(na(t)) breakpoints.
Adamec et al. [2] have studied some generalizations of Davenport-Schinzel sequences. In particular, they bound the length of sequences not containing more general forbidden subsequences, for example, subsequences consisting of more than two symbols. They also showed that the maximum length of a sequence not containing any forbidden subsequence {a^^b^^a^^b^^), where /], i2,13,14 are some fixed positive constants, is linear. See also [9599] for related results.
4. Sharp upper bounds on Xs (n) In the previous section we mentioned some weak upper bounds on A,^(n). The problem of bounding Xs(n) lay dormant for about 10 years after Szemeredi's result [149], until Hart and Sharir [80] proved a tight bound of G(na(n)) on X^in); here a(n) is the inverse Ackermann function, defined below. Later, Sharir [137] extended the analysis of Hart and Sharir to prove that Xs(n) =n-a ^n^O(a(nr ) j o r ^ > 3. Applying a more careful analysis, Agarwal et al. [11] improved the bounds further, and obtained sharp, nearly tight bounds on ks (n), for any fixed s. The best known upper bounds on Xs (n) are summarized in Theorem 4.3 (for ^ = 3) and Theorem 4.5 (for larger values of s). Since the proofs of these theorems are quite technical, we will sketch the proof of Theorem 4.3, and only briefly mention how the proof extends to the case ^ > 3. 4.1. Ackermann's function — A review In this subsection we recall the definition of Ackermann's function and its functional inverse, which appears in the upper and lower bounds for Xs (n). Ackermann's function (also called "generalized exponentials") is an extremely fast growing function defined over the integers in the following recursive manner [1]. Let N denote the set of positive integers. Given a function g from a set into itself, denote by g^^^ the composition go g o -- -o g of g with itself s times, for ^ G N. Define inductively a sequence {Ak}^i of functions from N into itself as follows: Aiin) = 2n, Ak(l) = 2, Ak(n) = Ak- \{Akin- -D).
n^l, k^2, n^2,k^2.
Finally, define Ackermann's function itself as A(n) = An(n). The function A grows very quickly; its first few values are: A(l) = 2, A(2) = 4, A(3) = 16, and A(4) is an exponential
12
RK. Agarwal and M. Sharir
"tower" of 65536 2s. See [93,121,126] for a discussion on Ackermann's and other rapidly growing functions. Let a^ and a denote the functional inverses of Ak and A, respectively. That is, ock(n) =m\n[s > 1 | Ak{s) ^ n\
and
a(n) =min{5' ^ 1 | A{s)
^n].
The functions ak are easily seen to satisfy the following recursive formula: ak{n)=mm{s
^ 1:4-i(«) = l};
(4.1)
that is, ak(n) is the number of iterations of a^-i needed to go from n to 1. In particular, (4.1) implies that, for n G N, a\(n) = [n/ll,
a2in) = [\ogn'\,
and
a^in) = \og* n.
For each k, the function a^ is nondecreasing and unbounded. The same holds for a too, which grows more slowly than any of the a^. Note that a(n) ^ 4 for all n ^ A(4), which is an exponential tower with 65536 2s, thus a{n) ^ 4 for all practical values of n. We will need the following two easily established properties of a^(n): (^a(n)if^)
^^ ^(f^)
and,
for/I > 4,
Oia(n)-\-\
(n)<4.
(4.2)
4.2. The upper bound for A3 (n) Let [/ be a DS{n, 3)-sequence. A chain in (7 is a contiguous subsequence in which each symbol appears at most once. One can show that any such U can be decomposed into at most In — 1 pairwise disjoint chains, by splitting U just before the leftmost and rightmost appearances of each symbol. Let ^(m,n) denote the maximum length of a ^^(n, 3)sequence that can be decomposed into at most m chains. LEMMA 4.1. Let m,n ^ 1, and let b > \ be a divisor of m. Then there exist integers n*,n\, n2,...,«/? ^ 0 such that
n*+y^«/=«, i=\
and ^(m,n)^4m-\-4n*-{-^{b,n'')-hJ2^(-,
m \.
(4.3)
PROOF. Let t/ be a DiS'(n, 3)-sequence, consisting of at most m chains ci, . . . , c ^ , of length ^(m,n), and let Z? > 1 be a divisor of m. Partition the sequence U into b blocks
Davenport-Schinzel sequences and their geometric applications
(contiguous subsequences) Li, . . . , L/,, so that the block C(i-.\)p-^\, C(/_i)y^+2, • • •, Cjp. Call a symbol a internal of a in L^ are within Li. A symbol is called external if Suppose that there are ui internal symbols in block L,
13
L/ consists of p = m/h chains to block L, if all the occun^ences it is not internal to any block. and n* external symbols; thus
We estimate the total number of occurrences in U of symbols that are internal to L^ as follows. Erase all external symbols from L,. Next scan L/ from left to right and erase each element that has become equal to the element immediately preceding it. This leaves us with a sequence L*, which is clearly a DS(ni, 3)~sequence consisting of at most m/h chains, and thus its length is at most ^(m/b, ni). Moreover, if two equal internal elements in Li have become adjacent after erasing the external symbols, then these two elements must have belonged to two distinct chains, thus the total number of deletions of internal symbols is at most {m/b) — 1. Hence, summing over all blocks, we conclude that the total contribution of internal symbols to | L^ | is at most b
m —b -\-
t
Next, to estimate the contribution of external symbols to |f/|, we argue as follows. For each Li, call an external symbol a a middle symbol if none of its occurrences in L, is the first or the last occurrence of a in U. Otherwise we call a a non-middle symbol. We will consider the contribution of middle and non-middle external symbols separately. Consider first the middle symbols. To estimate their contribution to the length of Li, we erase all internal and non-middle symbols from L/, and also erase a middle symbol if it has become equal to the symbol immediately preceding it. As above, at most {m/b) — 1 deletions of external middle symbols will be performed. Let LJ' be the resulting subsequence, and suppose that it is composed of pi distinct symbols. It is easily seen that L^ is a DSipi, 1)-sequence, so its length is at most pi. Hence, summing over all blocks, the total contribution of external middle symbols is at most m — b -{-^-^^ pi. But X]/=i Pi i^ the length of the sequence obtained by concatenating all the subsequences L*. This concatenation can contain at most b pairs of adjacent equal elements, and if we erase each element that is equal to its predecessor, we obtain a sequence U* which is clearly a DS{n^, 3)sequence composed of b chains (namely the subsequences L*). The length of U* is thus at most ^(b, n*). Hence, the contribution of middle external elements to the length of U is at most m-\-^(b, n*). Consider next the contribution of non-middle symbols. A symbol is called starting (resp. ending) in block L/ if does not occur in any block before (resp. after) Li. To estimate the contribution of starting symbols to the length of L/ we erase from L, all symbols occurring there except for starting symbols, and, if necessary, also erase each occurrence of a starting symbol that has become equal to the element immediately preceding it. As above, at most (m/b) — 1 deletions of external starting symbols will be performed. Let Lf be the resulting subsequence, and suppose that it is composed of pi distinct symbols. Note first that each external symbol can appear as a starting symbol in exactly one block, thus Xl/=i Pi — ^*- It is easily seen that Lf is a DS{pi, 2)-sequence, so the length of Lf
14
P.K. Agarwal and M. Sharir
is at most 2/7/ — 1, and, summing over all blocks, we conclude that the contribution of all external starting symbols to the length of U is at most b
m-b-\-
^ ( 2 / 7 / - 1) = m - 2Z7 + 2n*. i=\
In a completely symmetric manner, the contribution of external ending symbols to the length of U is also at most m — 2b -\- 2n^. Summing up all these contributions we finally obtain the asserted inequality (4.3). D Next, we solve the recurrence derived in the previous lemma. LEMMA 4.2.
For all m,n^
^(m,n)^
I, and for k
^2,
(Sk - S)mak(m) + (4k - 2)n.
(4.4)
PROOF (Sketch). For the sake of simplicity, we will only show that for n,s ^ I, k ^2, and m dividing Ak{s),
^{m,n)^
(4k - 4)ms + (4k - 2)n.
(4.5)
If m = Ak(s), then s = ak (m), and (4.5) implies the assertion of the lemma for these values of m also. The case of an arbitrary m is then easy to handle; see [80,142] for details. We will use (4.3) repeatedly to obtain the series of upper bounds on ^, stated in (4.5) for /: = 2, 3 , . . . . At each step we choose b in an appropriate manner, and estimate ^(b, n*) using the bound obtained in the preceding step. This yields a new recurrence relation on ^ , which we solve to obtain a better upper bound on ^. Specifically, we proceed by double induction on k and s. For k = 2,m divides A2(s) = 2\ so m is a power of 2. Choose b = 2 in (4.3); it is easily checked that ^(b,n*) = ^(2, n*) = 2n* for all «*, so (4.3) becomes
^(m,n)^4m-\-6n*
/m -\-^[—,n\
\
{m \ 1 + '/^( — ,M2 ).
The solution to this recurrence relation, for m a power of 2 and n =n* -\-n\ -\-n2 arbitrary, is easily verified to be ^(m, n) ^ 4m logm + 6n. The case k>2 and ^ = 1 is now a consequence of this bound (because m divides Ak(\.) = 2 in this case). Suppose next that k>2 and s > \, and that the induction hypothesis is true for all k'
Davenport-Schinzel sequences and their geometric applications
15
b = m/t, which is an integer dividing m = Ak{s) — Ak-\{t). Hence, by the induction hypothesis for /: — 1 and t, we have ^(h, n^) < {Ak - S)bt + (4k - 6)n* = (4k - 8)m + (4k -
6)n\
Then (4.3) becomes b
^(m, n) ^ (4k - 8)m + (4k - 6)n* + 4m + 4n^ + ^
^(t, ni).
i=\
Using the induction hypothesis once more (for k and 5" — 1), we obtain b
^(m, n) ^ (4k - 4)m + (4k - 2)n* + ^
{(4k - 4)t(s - 1) + (4k - 2)n/)
== (4k - 4)ms + (4k - 2)n, because n^ -\- Xl/=i ^i — '^• The case where m only divides Ak(s) is handled by taking a concatenation of p = Ak(s)/m copies of a sequence whose length is ^(m,n), using pairwise-disjoint sets of symbols for the copies. The concatenated sequence is composed of pn symbols and has at most pm chains, so p^(m,
n) ^; W(pm, pn) ^ (4^ — 4)pms -f- (4^ — 2)pn,
from which (4.5) follows. This completes the proof of the asserted bound. THEOREM PROOF.
D
4.3 ([80]). k3(n) = 0(na(n)).
By putting k = a(m) + 1 in (4.4) and using (4.2), we obtain ^(m,n)
^ 32ma(m) + (4a(m) + 2)/t.
As noted in the beginning of this subsection, ^3(11) ^ ^(2n — 1, n). Since a(2n — 1) ^ a(/i) + 1, the theorem follows. D Applying a more careful analysis, Klazar [98] has shown that X3(n) ^4na(n)
-\-0{n^/a(n)),
provided that n is sufficiently large. An immediate corollary of Theorem 4.3 is that the lower envelope of n segments in the plane has 0(na(n)) breakpoints.
P.K. Agarwal and M. Sharir
16 4.3. Upper bounds on )~s(n)
We now briefly mention how the upper bounds on )vs (n), for s > 3, are derived in [ 11]. Let q,(t (m, n) denote the maximum length of a DS(n, s)-sequence composed of at most m contiguous subsequences, each of which is a DS(n, t)-sequence. As above, Agarwal et al. [11] obtain a recurrence relation for ~ ( m , n), the length of a DS(n, s)-sequences composed of at most m chains, but the recurrence is now written in terms of qJs and q~s-2. Let S be a given DS(n, s)-sequence composed of at most m chains. The analysis in [11] divides S into b blocks and counts the contributions of internal, middle, and non-middle symbols separately, in a manner similar to that given above. This leads to the following lemma. LEMMA 4.4. L e t m , n ~ 1 and 1 < b < m beintegers. F o r a n y p a r t i t i o n i n g m - ~ 1 with m 1. . . . . mb >~ 1, there exist integers n*, n l, n2 . . . . . nb >~0 such that
mi,
b
*Z
n -+-
ni--n
i=1
and b
~s. (m, n) ~ ~ : - 2 ( b , n ' ) + 2q's-1 (m, n*) q-4m + Z
q'ts(mi'
hi).
(4.6)
i=1
If we choose b - 2, the solution of the recurrence is O(n log s-2 n). However, extending the proof of Lemma 4.2, but using a rather involved analysis, one can obtain the following bounds on L~ (n). THEOREM 4.5 ([ 11 ]). (i))~4(n) -- O(n- 2~(')). (ii) For s > 1, there exists a polynomial Cs (q) o f degree at most s - 1, such that ~-2s+l (n) <, n • 2 cr~-l(n)l°ga(n)+cs(c~(n))
)~2s+2(n) ~ n . 2 as(n)+C~(c~(n)).
5. Lower bounds on ~, (n) An even more surprising result in the theory of Davenport-Schinzel sequences is that the bounds stated in Theorems 4.3 and 4.5 are optimal for s -- 3 and 4, and are very close to optimal for s > 4. The first superlinear bound on )vs (n) was obtained by Hart and Sharir [80], who proved that )v3(n) = ; 2 ( n ~ ( n ) ) . Their original proof transforms DS(n, 3)-sequences into certain path compression schemes on rooted trees. A more direct proof for the lower bound on )~3(n) was given by Wiernik and Sharir [154] they describe an explicit recursive scheme for constructing a DS(n, 3)-sequence of length £2 ( n a ( n ) ) . See also [ 100]
Davenport-Schinzel sequences and their geometric applications
17
for another proof of the same lower bound. We sketch Wiernik and Sharir's construction, omitting many details, which can be found in [142,154]. Let [Ck{m)]k^\ be a sequence of functions from N to itself, defined by C\(m) = I, Q ( l ) = 2Q_i(2), Ck(m) = Ck(m- l)-Ck-\{Ck(m-
1)),
m ^ 1, k^2, k^2,m^2.
It can be shown that, for all /: > 4, m ^ 1, Ak-i(m) ^ Ck(m) ^ Akim + 3).
(5.1)
In what follows, let /x = Q ( m — 1), y — Ck-\ (Ck(m — 1)), and y = fx - v. For each k,m^ 1, we construct a sequence Sk(m) that satisfies the following two properties: (PI) Sk(m) is composed of Nk(m) = m • Ckim) distinct symbols. These symbols are named (d,l),ford= I,.. .,m, I = 1 , . . . , y, and are ordered in lexicographical order, so that (d, I) < (d\ /O if I < I' or 1 = 1' and d < d\ (P2) Sk(jn) contains y fans of size m, where each fan is a contiguous subsequence of the form ((1, /)(2, /) • • • (m, /)), for / == 1 , . . . , y. Since fans are pairwise disjoint, by definition, the naming scheme of the symbols of Sk(m) can be interpreted as assigning to each symbol the index / of the fan in which it appears, and its index d within that fan. The construction of Skim) proceeds by double induction on k and m, as follows. 1. k=l: The sequence is a single fan of size m: S\{m) — ((1, 1)(2, 1) • • (m, 1)). Properties (PI) and (P2) clearly hold here (Ci (m) = 1). 2. k = 2: The sequence contains a pair of disjoint fans of size m, with a block of elements following each of these fans. Specifically, S2(m) = ((1, 1) (2, 1) •. • (m - 1, 1) (m, 1) (m - 1, 1) • • • (1, 1) (1,2)(2,2)-.- ( m - l , 2 ) ( m , 2 ) ( m - 1 , 2 ) ••• (1,2)>. Indeed, S2(m) contains C2(m) = 2 fans and is composed of 2m distinct symbols. 3. k^3,m = I: The sequence is identical to the sequence for ^^ = ^ — 1 and m' = 2, except for renaming of its symbols and fans: Sk-\(2) contains Q_i(2) = ^Ck(l) fans, each of which consists of two symbols; the symbol renaming in Sk(l) causes each of these two elements to become a 1-element fan. Properties (PI) and (P2) clearly hold. 4. The general case k^3,m> 1: (i) Generate inductively the sequence S' = Sk(m — I); by induction, it contains /x fans of size m — 1 each and is composed of (m — I) - /JL symbols. (ii) Create v copies of S' whose sets of symbols are pairwise disjoint. For each j ^ V, rename the symbols in the jth copy 5y of S' as (d,i, j) where I ^d ^m — I is the index of the symbol in the fan of S'- containing it, and 1 ^ / < /x is the index of this fan in S'-.
RK. Agarwal and M. Sharir
18
fan I
fan^
fan^
SL
S'2 S[
5* fan^
faru^
fan^
Fig. 5. Lower bound construction: merging the subsequences.
(iii) Generate inductively the sequence S* = Sk-\iiJi) whose set of symbols is disjoint from that of any S'-; by induction, it contains v fans of size fi each. Rename the symbols of S* as (m, /, /) (where / is the index of that symbol within its fan, and j is the index of that fan in 5*). Duplicate the last element (m, /x, j) in each of the y fans of S*. (iv) For each 1 ^ / ^ //, 1 ig / ^ y, extend the /th fan of S'- by duplicating its last element (m — 1, /, y), and by inserting the corresponding symbol (m, /, j) of S* between these duplicated appearances of (m — \,i, j). This process extends the (m — l)-fans of S'- into m-fans and adds a new element after each extended fan. (v) Finally construct the desired sequence Sk{m) by merging the v copies S^- of S' with the sequence S*. This is done by replacing, for each 1 ^ y ^ y, the jih fan of S* by the corresponding copy 5" of S\ as modified in (iv) above. Note that the duplicated copy of the last element in each fan of S* (formed in step (iii) above) appears now after the copy S'- that replaces this fan; see Figure 5 for an illustration of this process. It is easily checked that S^ (m) consists of Nk{m) = v(m - l)/x-f
MQ-I(M)
=mCk{m)
symbols, and it can also be shown that Sk (m) is a DS(Nk (m), 3)-sequence satisfying properties (PI) and (P2). If we let a^ (m) denote the length of Sk(m), then a\(m) = m, (72 ( m ) = 4 m — 2,
Davenport-Schinzel sequences and their geometric applications
19
o^^(l) = ^^-l(2),
Gkim) = vak{m-\)
+ ak-\{ix) + v{ii + \).
The third term in the last equation is due to the duphcation of the rightmost symbol of each fan of 5'* and of each S'- (see Steps 4(iii)-(iv)). Using a double induction on k and m, one can prove that (Jk(m) > (km — 2)Ck(m) + 1. THEOREM PROOF.
5.1 ([80,154]). X3(n) =
^(na(n)).
Choose mk = Q + i (^ - 3). Then
nk = Nk(mk) =
Ck-^iik-2)^Ak+i(k-^l),
where the last inequality follows from (5.1). Therefore a(nk) ^k -\- 1, and hence >^3(nk) ^ cfkimk) ^ krik - 2Ck(mk) ^ (k - 2)nk ^ nk{a(nk) - 3). As shown in [142], this bound can be extended to any integer n, to prove that A-3(«) = D Q(na(n)). Generalizing the above construction and using induction on s — basically replacing each chain of the sequence Sk{m) by a DS{n, s — 2)~sequence, which, in turn, is constaicted recursively ~— Sharir [138] proved that A2^ + i(/i) — QCnainY). Later Agarwal et al. [11] proved that the upper bounds slated in Theorem 4.5 are almost optimal. In particular, using a rather mvolved doubly-mductive scheme, they constructed a DS{n, 4)-sequence of length i2(n2^^^"'). Then, by recurring on s, they generalized their construction of DSin, 4)sequences to higher-order sequences. The following theorem summarizes their result. THEOREM 5.2 ([11]).
(i) k4(n)--=:Q(n'2''^''^). (ii) For ^ > 1, there exists a polynomial Qsiq) of degree at most s — I, such that
OPEN PROBLEM
1. Obtain tights bounds on Xsin) for ^ > 4, especially for odd values
ofs. Wiemik and Sharir [154] proved that the DS{n, 3)-sequence Sk(m) constructed above can be realized as the lower envelope sequence of a set of n segments, w^hich leads to the following fairly surprising result: 5.3 ([154]). The lower envelope ofn segments can have Q (na(n)) breakpoints in the worst case.
THEOREM
20
RK. Agarwal and M. Sharir
Shor [145] gave a simpler example of n segments whose lower envelope also has Q (na(n)) breakpoints. These results also yield an ^{na(n)) lower bound on many other unrelated problems, including searching in totally monotone matrices [94] and counting the number of distinct edges in the convex hull of a planar point set as the points are being updated dynamically [151]. Shor has also shown that there exists a set of n degree-4 polynomials whose lower envelope has Q{na(n)) breakpoints [146] (which is somewhat weak, because the upper bound for this quantity is X4(n) = 0(n • 2"^^^^)). We conclude this section by mentioning another open problem, which we believe is one of the most challenging and interesting problems related to Davenport-Schinzel sequences. OPEN PROBLEM 2. Is there a natural geometric realization of higher order sequences? For example, can the lower envelope ofn conic sections have f2(n2^^^^) breakpoints!
6. Davenpoiit-Srhinzel sequences and arrangements In this section we consider certain geometric and topological structures induced by a family of arcs in the plane, where Davenport-Schinzel sequences play a major role in their analysis. Specifically, let T = {yi,..., y,;} be a collection of n Jordan arcs in the plane, each pair of which intersect in at most .v points, for some fixed constant s.^ DEFINITION 6.1. The arrangement AiF) of F is the planar subdivision induced by the arcs of JT; that is, AiF) is a planar map whose vertices are the endpoints of the arcs of F and their pairwise intersection points, whose edges are maximal (relatively open) connected portions of the y, 's that do not contain a vertex, and whose/ac-^5' are the connected components of R^ — (J T. The combinatorial complexity of a face is the number of vertices (or edges) on its boundary, and the combinatorial complexity of A(F) is the total complexity of all of its faces. The maximum combinatorial complexity of ^4(7") is clearly &(sn^) = 0(n^), and A(F) can be computed in time 0(n^ log«), under an appropriate model of computation, using the sweep-line algorithm of Bentley and Ottmann [29]. A slightly faster algorithm, with running time 0(nks-^2(f^)), is mentioned in Section 6.3. Many applications, however, need to compute only a small portion of the arrangement, such as a single face, a few faces, or some other substructures that we will consider shortly. Using D^-sequences, one can show that the combinatorial complexity of these substructures is substantially smaller than that of the entire arrangement. This fact is then exploited in the design of efficient algorithms, whose running time is close to the bound on the complexity of the substructures that these algorithms aim to construct. In this section we review combinatorial and algorithmic results related to these substructures, in which Z)5-sequences play a crucial role. ^ A Jordan arc is an image of the closed unit interval under a continuous bijective mapping. Similarly, a closed Jordan curve is an image of the unit circle under a similar mapping, and an unbounded Jordan curve is an image of the open unit interval (or of the entire real line) that separates the plane.
Davenport-Schinzel sequences and their geometric applications
21
'75 73
,77
"74
S
~ + ;- + + ~- ;+
-
-
+ ~ - ~ - - " ~ + ~4- - ~ 2/ - - \ 31 2
Fig. 6. A single face and its associated boundary sequence; all arcs are positively oriented from left to right.
6.1. Complexi~ o f a single face It is well known that the complexity of a single face in an arrangement of n lines is at most n [124], and a linear bound on the complexity of a face in an arrangement of rays is also known (see Alevizos et al~ [14,15]). The result of Wiernik and Sharir [154] on the lower envelopes of segments implies that the unbounded face in an arrangement of n line segments has Kg(n~(n)) vertices in the worst case. A matching upper bound was proved by Pollack et al. [123], which was later extended by Guibas et al. [75] to general Jordan arcs. The case of closed or unbounded Jordan curves was treated in [135]. THEOREM 6.2 ([75,135]). Let F be a set of n Jordan arcs in the plane, each pair of which intersect in at most s points, f o r some fixed constant s. Then the combinatorial complexity of any single face in ,,4(/-') is O(~,s+2(n)). I f each arc in Y' is a Jordan curve (closed or unbounded), then the complexity of a single face is at most/,s (n). PROOF (Sketch). We only consider the first part of the theorem; the proof of the second part is simpler, and can be found in [135,142]. Let f be a given face in A ( F ) , and let C be a connected component of its boundary. We can assume that C is the only connected component of Of. Otherwise, we repeat the following analysis for each connected component and sum their complexities. Since each arc appears in at most one connected component, the bound follows. For each arc Yi, let ui and vi be its endpoints, and let yi+ (respectively, y/-) be the directed arc yi oriented from u i to vi (respectively, from vi to u i). Without loss of generality, assume that C is the exterior boundary component of f . Traverse C in counterclockwise direction (so that f lies to our left) and let S = (sl, s2 . . . . . st) be the circular sequence of oriented arcs in F in the order in which they appear along C
22
RK. Agarwal and M. Sharir
(if C is unbounded, 5 is a linear, rather than circular, sequence). More precisely, if during our traversal of C we encounter an arc yi and follow it in the direction from «/ to vi (respectively, from Vi to w/) then we add y^ (respectively, yf) to S. See Figure 6 for an illustration. Note that in this example both sides of an arc yi belong to the outer connected component. Let § 1 , . . . , ?2n denote the oriented arcs of F. For each §/ we denote by |$/1 the nonoriented arc yj coinciding with ^/. For the purpose of the proof, we transform each arc yt into a very thin closed Jordan curve y^ by taking two nonintersecting copies of yi lying very close to one another, and by joining them at their endpoints. This will perturb the face / slightly but can always be done in such a way that the combinatorial complexity of C does not decrease. Note that this transformation allows a natural identification of one of the two sides of y* with y^ and the other side with yf. It can be shown (see [75,142]) that the portions of each arc §/ appear in 5 in a circular order that is consistent with their order along the oriented ^/. In particular, there exists a starting point in S (which depends on ^/) so that if we read S in circular order starting from that point, we encounter these portions of f, in their order along ^/. For each directed arc 5,, consider the linear sequence V, of all appearances of f/ in 5, arranged in the order they appear along $/. Let )[X/ and y/ denote respectively the index in S of the first and of the last element of V/. Consider S = {s\,.. .,St) SLS s. linear, rather than a circular, sequence (this change is not needed if C is unbounded). For each arc §,, if /x, > v, we split the symbol §/ into two distinct symbols ^/1, §,2, and replace all appearances of §/ in S between the places fjii and t (respectively, between 1 and y,) by §,1 (respectively, by f/2). Note that the above claim implies that we can actually split the arc ^/ into two connected subarcs, so that all appearances of §n in the resulting sequence represent portions of the first subarc, whereas all appearances of ^,2 represent portions of the second subarc. This splitting produces a sequence S^, of the same length as S, composed of at most 4n symbols. With all these modifications, one can then prove that 5* is a DS{4n, s -j- 2)-sequence. This is done by showing that each quadruple of the form (a • "b- • -a- • -b) in S* corresponds, in a unique manner, to an intersection point between the two arcs of F that a and b represent. See [75,142] for more details. This completes the proof of the first part of the theorem. D Theorem 6.2 has the following interesting consequence. Let T = {yi,...,}/,,} be a set of n closed Jordan curves, each pair of which intersects in at most s points. Let K = conv(r) be the convex hull of the curves in F. Divide the boundary of K into a minimum number of subarcs, ai, ^ 2 , . . . , a^?, such that the relative interior of each a/ has a nonempty intersection with exactly one of the curves yj. Then the number m of such arcs is at most Xs(n); see [135] for a proof. Recently, Arkin et al. [20] showed that the complexity of a single face in an arrangement of line segments with h distinct endpoints is only 0(h logh) (even though the number of segments can be &(h^)). A matching lower bound is proved is by Matousek and Valtr [106]. The upper bound by Arkin et al. does not extend to general arcs. Har-Peled [78] has also obtained improved bounds on the complexity of a single face in many special cases.
Davenport-Schinzel
sequences and their geometric applications
23
6.2. Computing a single face Let r be a collection of n Jordan arcs, as above, and let x be a point that does not lie on any arc of F. We wish to compute the face of A{r) that contains x. We assume that each arc in F has at most a constant number of points of vertical tangency, so that we can break it into 0(1) X-monotone Jordan arcs. We assume a model of computation allowing infinite-precision real arithmetic, in which certain primitive operations involving one or two arcs (e.g., computing the intersection points of a pair of arcs, the points of vertical tangency of an arc, the intersections of an arc with a vertical line, etc.) are assumed to take constant time. If /" is a set of n lines, or a set of n rays, then a single face can be computed in time 0{n log^). In the case of lines, this is done by dualizing the lines to points and using any optimal convex hull algorithm [124]; the case of rays is somewhat more involved, and is described in [14,15]. However, these techniques do not extend to arrangements of more general Jordan arcs. Pollack et al. [123] presented an 0{na{n) log^n)-time algorithm for computing the unbounded face in certain arrangements of line segments, but the first algorithm that works for general arcs was given by Guibas et al. [75]. Later, several other efficient algorithms — both randomized and deterministic — have been proposed. We first present randomized (Las Vegas) algorithms^ for computing a single face, and then review the deterministic solution of [75], and mention some other related results. Randomized algorithms have recently been designed for many geometric problems; see, e.g., [45,115, 136]. They are often much simpler than their deterministic counterparts, and are sometimes more efficient, as the present case will demonstrate. The efficiency of a Las Vegas randomized algorithm will be measured by its expected running time in the worst case, where the expectation is taken with respect to the internal randomizations performed by the algorithm. Randomized algorithms. The randomized algorithms that we will describe actually compute the so-called vertical decomposition of / . This decomposition, which we denote by / , is obtained by drawing a vertical segment from each vertex and from each point of vertical tangency of the boundary of / in both directions, and extend it until it meets another edge of / , or else all the way to ±oo. The vertical decomposition partitions / into "pseudo-trapezoidal" cells, each bounded by at most two arcs of F and at most two vertical segments. To simplify the presentation, we will refer to these cells simply as trapezoids; see Figure 7 for an illustration. We first present a rather simple randomized divide-and-conquer algorithm due to Clarkson [42] (see also [142]). The basic idea of the algorithm is as follows: Randomly choose a subset F\ <^ F of \n/2\ arcs. Recursively compute the vertical decompositions /^, f^ of the faces f\, /2 containing x in A{F\) and in A{F \F\), respectively. Then merge /^ and /2 to compute the vertical decomposition of the face / of A(F) that contains x. The merge step essentially performs a simultaneous depth-first search over the trapezoids of /j and of /2 , in which it computes the intersection cells Ai Pi A2, for Ai G /^, A2 G /2 , A Las Vegas algorithm always terminates with the correct output, but its running time is a random variable (over the internal randomizations it performs).
24
P.K. Agarwal and M. Sharir
Fig. 7. Vertical decomposition of a face in an arrangement of line segments; here each cell is indeed a trapezoid or a triangle.
that lie in / . After having computed all such intersection cells, / can be computed in additional 0 ( | / |) time; see [142] for details. Although the merge step is quite naive, and can take quadratic time in the worst case, one can nevertheless show that the randomization makes this step fast — its expected time is only 0(A.v+2(«))- Hence, the expected running time of the algorithm is 0(A,v+2(«) logn). The second randomized algorithm, due to Chazelle et al. [35], constructs the vertical decomposition / of the face containing x incrementally, by adding the arcs of F one by one in a random order (the choice of the insertion order is the only randomized step in the algorithm), where each permutation of F is chosen with equal probability. While the worst-case running time of this algorithm is also quadratic, the expected running time is only 0(A,5+2(«) log«), as for the preceding algorithm. The basic idea of this algorithm is as follows. Let (yi, K2, • • •, K«) denote the insertion sequence, let /] = {yi,..., y/}, and let f. be the vertical decomposition of the face containing X in A{Fi), for / = 1 , . . . , n. When }//+i is inserted, it may chop off a part of ft by separating it from the point jc, so some of the trapezoids of /j may not appear in /j._^j, and some of them, which are crossed by y/+i, will have to be replaced by new trapezoids that have )//+i on their boundary. Thus, adding )//+i requires the following steps: Compute the set of trapezoids in f- that y/+i intersects; determine the set of new cells that appear in /i+i' an^ fin^ the portion of // that is chopped off by y/+i, if any; finally, discard the trapezoids of f. that do not appear in /)_^j. To facilitate the execution of these steps, the algorithm stores f- as a vertical adjacency graph, whose edges connect pairs of trapezoids sharing a vertical edge (more precisely, having overlapping vertical edges); for each trapezoid in f^ , we store the list of trapezoids that are its neighbors in the vertical adjacency graph. The algorithm also maintains a directed acyclic graph (dag) G, referred to as the history dag. The nodes of G, after the /th insertion stage, correspond to the trapezoids that appeared in at least one / , for 7 < /. The root of the dag corresponds to the entire plane. There is a directed edge from a node v to a node w if the corresponding trapezoids Xy and r^; intersect and if Xy (resp. Xy^) appeared in / • (resp. / ^ ) for some j < k. If Xy is a trapezoid of f- , then v is an active leaf (in the
Davenport-Schinzel sequences and their geometric applications
25
version of G after the /th insertion), and if x^ was a trapezoid of /^ , j but is not in /• , and Yi does not cross Xy, then v is an inactive leaf, in the sense that no successor of Xy will ever be created. All other nodes of G are inner nodes, and represent trapezoids that existed in some / , but were crossed by some arc yk, for j < k ^i. The purpose of the dag G is to facilitate, through a top-down traversal of it, a simple and efficient technique for finding all active trapezoids that the newly inserted arc intersects. How exactly the above steps are executed and how the data structures are updated is somewhat involved, and is described in detail in [35,142]. As mentioned above, the expected running time of the algorithm is 0(Xs-\-2(n) logn). Moreover, the expected size and depth of G are 0(A.^^+2('^)) and 0(logn), respectively, so we also obtain a point-location data structure that can determine, in O(logn) expected time, whether a query point lies in / . A somewhat simpler variant of the randomized incremental algorithm is given in [50]. 6.3 ([35,42,50]). Given a collection Pofn Jordan arcs, each pair of which intersect in at most s points, and a point x not lying on any arc, the face ofA(r) containing X can be computed by a randomized algorithm in 0(Xs-\-2(n) logn) expected running time, in an appropriate model of computation. THEOREM
Deterministic algorithms. We now sketch a deterministic, divide-and-conquer algorithm, due to Guibas et al. [75], for computing / . The high-level description of the algorithm is quite simple, and is similar to the first randomized algorithm described above. We partition r into two subsets Fi, 7^2, of roughly n/2 arcs each, recursively compute the faces, / i , /2, of A{r\), A{r2), respectively, that contain x, and then "merge" these two faces to obtain the desired face / . Note that / is the connected component of f\ H /2 containing X. However, as already noted, it is generally too expensive to compute this intersection in its entirety, and then select the component containing x, because the boundaries of f\ and /2 might have Q (n ) points of intersection. We therefore need a more careful way of performing the merge. The setup for the merge step is as follows. We are given two connected (but not necessarily simply connected) regions in the plane, which we denote, respectively, as the red region R and the blue region B. Both regions contain the point x in their interior, and our task is to calculate the connected component f of RH B that contains x. The boundaries of R and B are composed of (maximal connected) portions of the given curves in F, each of which will be denoted in what follows as an arc segment (or "subarc"). For technical reasons, we extend this task as follows. Let P be the set of points containing X and all endpoints of the arcs of F that lie on the boundary of either R or B. Clearly, \P\^2n-\-l. For each M; G P, let /«; denote the connected component of ROB that contains w (these components are not necessarily distinct, and some may be empty). Our task is now to calculate all these components (but produce each distinct component just once, even if it contains several points of F). We refer to this task as the red-blue merge. We call the resulting components f^ purple regions, as each of them is covered by both the red and the blue regions. An illustration of this merge is shown below in Figure 8. The algorithm relies heavily on the following technical result, called the combination lemma, which is interesting in its own right. We first introduce a few notation. Let Ri,..., Rjn be a collection of distinct faces in an arrangement of a set Fr of 'red' Jordan
26
RK. Agarwal and M. Sharir
Fig. 8. The red-blue merge; the solid arcs are the blue arcs, and the dashed arcs are red.
arcs, and let B i , . . . , B„ be a similar collection of faces in an arrangement of a set Fb of 'blue' Jordan arcs (where, again, each pair of arcs from /^ U Ft, are assumed to intersect in at most s points). Let P = {/?i,..., /^A:} be a collection of points, so that each pt e P belongs to one red face /?^. and to one blue face 8^. Let Ei be the connected component of Rrrn n Bm containing /?/ (i.e., £"/ is the "purple" face of the combined arrangement A(Fr U Fb) containing /?/). Then we have the following result. LEMMA 6.4 (Combination Lemma, [75]). The total combinatorial complexity of all the regions Et is at most 0{r -{- b -\- k), where r and b are the total number of arc segments composing the boundaries of the red faces and of the blue faces, respectively. REMARK 6.5. A stronger combination lemma was obtained by Edelsbrunner et al. [58] for the case of line segments. They proved that the total complexity of the purple regions £'/'s is bounded by r + Z? + 0(u + f + /:), where u (resp. v) is the total number of connected components of the boundaries of the red (resp. blue) faces. Recently, Har-Peled [78] generalized the combination lemma to the overlay of more than two arrangements.
The combination lemma implies that the complexity of all the 'purple' regions in the overlay of the faces f\ and /2 is 0(r -\-b) = 0(A..v+2(«)). Exploiting this bound, Guibas et al. [75] describe a somewhat involved sweep-line algorithm that sweeps over f\ and /2, and computes the purple regions in time 0(A,.v+2('^) logn). The main idea behind this sweep is that it is performed separately, but simultaneously, over the red, blue, and purple arrangements, in a manner that processes only a small number of red-blue intersections. See [75,142] for more details. Hence, the overall running time of the algorithm is
0{Xs+2in)Wn). Recently, Amato et al. [18] have succeeded in derandomizing the algorithm by Chazelle et al. [35], described above, for a set of segments. The worst-case running time of their algorithm is 0{na^{n) logn). Hence, we can conclude the following. THEOREM 6.6 ([18,75]). Given a collection F ofn Jordan arcs, each pair of which intersect in at most s points, and a point x not lying on any arc, the face of A(F) containing
Davenport-Schinzel sequences and their geometric applications
27
X can be computed by a deterministic algorithm in time 0(Xv+2(^)log /i), in an appropriate model of computation. The running time improves to 0{Xs{n) log^ n) for collections of Jordan curves {closed or unbounded), and to 0{na {n)\ogn) for collections of line segments. We conclude this subsection by mentioning two open problems. O P E N P R O B L E M 3.
(i) Given a set Fofn segments and a point p, can the face in A{r) containing p be computed in time 0(n log/z), where h is the number of edges in the face? (ii) Given a set P ofn Jordan arcs, each pair of which intersects in at most s points, and a point p, can the face in A{r) containing p be computed in time 0(A.v+2 log^) -^
6.3.
Zones
The zone of a curve yo in the arrangement A{r) of a collection F of n Jordan arcs is the set of all faces of ^4(7") that yo intersects. The complexity of the zone is the sum of the complexities of all the faces in the zone. Zones were initially studied for arrangements of lines and hyperplanes [54,60,61], but they are also easy to analyze in the context of general arcs. The following theorem demonstrates a close relationship between zones and faces in an arrangement. A{r) T H E O R E M 6.7 ([56]). The complexity of the zone of a curve yo in an arrangement ofn Jordan arcs, each pair of which intersect in at most s points, is 0(X^+2(^))> assuming that yo intersects every arc of F in at most some constant number of points. P R O O F . Split every arc y G F into two subarcs at each intersection point of y and yo, and leave sufficiently small gaps between these pieces. In this manner all faces in the zone of yo are merged into one face, at the cost of increasing the number of arcs from n to 0(n). Now we can apply Theorem 6.2 to conclude the proof. D If F is a set of n lines and yo is also a line, then after splitting each line of F at their intersection points with yo we obtain a collection of 2n rays, and therefore the complexity of the unbounded face is 0 ( n ) . In fact, in this case one can show that the edges of the zone form a DS(4n, 2) sequence, thereby obtaining an upper bound of 8n — 1 on the complexity of the zone. Applying a more careful analysis, Bern et al. [31] proved the following theorem. T H E O R E M 6.8 ([31]). The complexity of the zone of a line in an arrangement ofn lines is at most 5.5/1, and this bound is tight within an additive constant term, in the worst case. See [14,31,37,56] for other results and applications of zones of arcs. An immediate consequence of Theorem 6.7 is an efficient algorithm for computing the arrangement A{F). Suppose we add the arcs of F one by one and maintain the arrangement of the arcs added so far. Let Ft be the set of arcs added in the first / stages, and let y/+i
28
P.K. Agarwal and M. Sharir
be the next arc to be added. Then in the (/ + l)st stage one has to update only those faces of AiPi) which He in the zone of yz+i, and this can easily be done in time proportional to the complexity of the zone; see Edelsbrunner et al. [56] for details. By Theorem 6.7, the total running time of the algorithm is 0{nXs+2(n)), and, by Theorem 6.8, the arrangement of a set of n lines can be computed in 0{n^) time. If the arcs of F are added in a random order, then the expected running time of the above algorithm is 0{n \ogn + k), where k is the number of vertices in A{r) [35,46,115], which is at most quadratic in n. The latter time bound is worst-case optimal. Theorem 6.7 can also be used to obtain an upper bound on the complexity of any m faces of A{r). Specifically, let {/i,..., /^} be a subset of m distinct faces in A{r), and let Uf denote the number of vertices in a face / of A{r). Then, using the Cauchy-Schwarz inequahty, 1/2 i=\
^ i
^
/
X 1/2
^feA(r)
^
where kj is the number of arcs in F that appear along the boundary of / . It is easily verified that
X! '^/^Z ^Y^ feAif)
yer
Y^
^f = C)(nAs+2(«)).
fe7.oneiy,r\{y})
Hence, we obtain the following result. 6.9 ([56,78]). Let F be a set ofn arcs satisfying the conditions stated earlier. The maximum number of edges bounding any m distinct faces ofA(F) is 0(m' ^'^)^s-\-2(n)).
THEOREM
It should be noted that Theorem 6.9 is weaker than the best bounds known for the complexity of m distinct faces in arrangements of several special types of arcs, such as lines, segments, and circles (see [21,33,43]), but it applies to arrangements of more general arcs.
6.4. Levels in arrangements Let F be a. set of n jc-monotone, unbounded Jordan curves, each pair of which intersects in at most s points. The level of a point p eE? in A(F) is the number of curves of F lying strictly below p, and the level of an edge e e AiF) is the common level of all the points lying in the relative interior of e. For a nonnegative integer k
Davenport—Schinzel sequences and their geometric applications
29
(^k)-level) of A(r) is (the closure of) the union of all edges in AiF) whose level is k (respectively, at most k). Note that the graph of the lower envelope Ep is the 0-level, so the complexity of the 0-level is at most KA^^)- Very little is known about the complexity of an arbitrary level, even for arrangements of lines, and there is a big gap between the known upper and lower bounds. (The so-called k-set problem, of obtaining sharp bounds on the complexity of an arbitrary level, is one of the most challenging open problems in combinatorial geometry; see [52,67,104,118,150].) However, tight bounds are known for the complexity of (^/:)-levels in arrangements of curves: THEOREM 6.10 ([46,140]). Let F be a set ofn x-monotone curves, each pair intersecting in at most s points, and let 0 < k < n be an integer The number of edges in A{r) of level at most k is 0{k^'ks{\n/k\)), and this bound is tight in the worst case.
The proof of the theorem is based on an elegant probabilistic analysis technique, due to Clarkson and Shor [46], which has been applied to a variety of other problems as well. An immediate corollary of the above theorem is the following claim. COROLLARY 6.11 ([16]). The number of edges in the (^k)-level of an arrangement ofn lines in the plane is &{nk).
Corollary 6.11 can be extended to arrangements of hyperplanes in higher dimensions as well, where the number of vertices in «^)-level is (9(^L^/2J^r^/21) [45] Efficient algorithms for computing «/:)-levels in arrangements are given in [6,68,114]. Theorem 6.10 can be extended to a more general setting. Let /C = [K\,..., j^^} be a collection of n regions in R^ so that the boundaries of any two them intersect in at most s points. Let / ( r ) denote the expected number of vertices on the boundary of the union of a random subset of r regions of /C. For example, if the boundary of each Ki is an xmonotone curve, then f{r) = 0(ks(r)) (see Corollary 2.3). Using the same probabilistic technique of [46], the following theorem can be proved. THEOREM 6.12 ([140]). Let JC = {Ki,..., Kn] be a collection ofn regions in R^ so that the boundaries of any two them intersect in at most s points. For any integer 1 ^k ^n — 2, the number of intersection points of the boundaries of regions in K that lie in the interior of at most k regions ofK is 0{k f{\n/k\)). If each dKi is an x-monotone curve, then the number of such vertices is 0{k^Xs{\nlk\)). OPEN PROBLEM 4. Obtain a tight bound on the complexity of a single level in an arrangements of lines in the plane.
7. Miscellaneous applications In the previous section we presented applications of Davenport-Schinzel sequences to planar arrangements, but the scope of geometric applications of these sequences is much wider. It is beyond the scope of this survey chapter to present all these applications in
30
RK. Agarwal and M. Sharir
detail, as they are quite diverse and require ratlier sophisticated and problem-specific geometric machinery. Instead, we briefly review here as many applications as space allows us, and provide more details for a few of them. More details, and additional applications, can be found in [142,153].
7.1. Applications ofDS(n, 2)-sequences Without having made it explicit, we have already encountered some combinatorial applications of DS(n, 2)-sequences in the previous sections (e.g., the analysis of the complexity of the zone of a line in an arrangement of lines). Here we present a few additional applications. See also Edelsbrunner and Guibas [57] and Ramos [125] for additional apphcations of this kind. Voronoi diagrams. Let S = {p\,..., pn} be a set of n points in the plane. The Voronoi diagram of S, denoted as Vor{S), under the EucHdean metric p, is a subdivision of the plane into cells V{pi), for /?/ G 5, where V{pi) = {x G R^ | p(x, /?/) < p(jc, pj), for 1 ^ 7 ^ n). See [24,102] for comprehensive surveys on Voronoi diagrams. Fortune [69] showed that Vor{S) can be computed efficiently by sweeping the xj-plane from bottom to top with a horizontal line i{t) : y = t (i.e., by varying t from —00 to +00). The basic idea of his algorithm is as follows. For a point pi = (JC/ ,yi)eS, let Q = {{X, y, z)\(x-
Xif + (y - yif =
z^',z^O};
this is a cone in 3-space. Let C = {C/ | 1 < / ^ n}. It is easily checked that, by definition, Vor(S) is the minimization diagram of C (regarding C as a set of graphs of bivariate functions). The algorithm actually sweeps a slanted plane h(t): y -\- z = t across 3-space, varying t from —00 to +oc, and maintains the jc}^-projection M{t) of the cross section h(t) n Ec, where EQ is the lower envelope of C The projection TTJ (t) of the intersection of h(t) with the cone C/ is nonempty if and only ift^ yi, and is then a parabola with directrix i(t) and focus /?/. Then M(t) is easily seen to be the lower envelope of the parabolas nt in the xj-plane. Since any two such parabolas intersect in at most 2 points. Theorem 3.1 implies that M(t) has at most 2n — 1 breakpoints. Fortune proved that, as the value of t varies, the combinatorial structure of M(t) changes at 0(n) critical values of t, and that M(t) can be updated in O(logn) time at each critical value of t. Putting all these observations together, he obtained an optimal 0(n log«)-time algorithm for computing Vor(S). See [69,142] for further details. Triangulation of convex polygons. A DS{n, 2)-sequence is called canonical if its length is 2n — 1 and if its symbols are numbered so that the leftmost appearance of / precedes the leftmost appearance of j whenever / < j . Roselle [130] has shown that there exists a close relationship between triangulations of convex polygons and canonical DS{n, 2)-sequences. A triangulation T of a convex {n + l)-gon P, whose vertices are labeled 1, 2 , . . . , n + 1 in counterclockwise order, can be represented by the set 7* consisting of all the diagonals
Davenport-Schinzel sequences and their geometric applications
31
(/, 7), with / < 7, that form 7, and of the sides (/, / + 1), for \ ^i ^n, and (1, n + 1), of P. For each vertex / of P, let §(/) be the sequence of all vertices ( j i , . . . , jk^), arranged in decreasing (i.e., clockwise) order, such that ji < i and (7/, /) G T*, for each 1 ^ / ^ ^/. Let (p{T) denote the sequence ^(7) = §(2)11^(3)11 •••11^(^ + 1). THEOREM 7.1 ([130]). Let T be a triangulation of a convex (n + l)-gon. Then the sequence (p(T) is a canonical DS{n, 2)-sequence. Conversely, every canonical DS(n,2)sequence is the image (p(T) of some triangulation T of a convex (n + \)-gon.
It is easily verified that a convex {n + l)-gon can be triangulated in (^Z\ )/n different ways, so Theorem 7.1 implies that this is also the number of distinct canonical DS(n, 2)sequences; see also [112]. There are several other combinatorial structures that are equivalent to canonical DS(n, 2)-sequences, including certain rooted plane trees and bracketing a formal product [98]. See [72,98] for other results on enumeration of DS(n, 2)-sequences.
7.2. Motion planning In this subsection we describe several applications of Davenport-Schinzel sequences to algorithmic motion planning in robotics. A typical motion-planning problem can be defined as follows: we are given a robot system B with k degrees of freedom and an environment filled with obstacles. The configuration space of JB is a /:-dimensional parametric space, each point of which represents a possible placement of J5 by a k-tup\e of real numbers that gives the values of the parameters controlling the k degrees of freedom of B. As an example of such a configuration space, consider the case where 5 is a rigid polygon moving (by translations and rotations) in the plane. Here B has three degrees of freedom, and any placement of B can be represented by the triple (x,y,0), where (x, y) are the coordinates of some fixed reference point attached to B, and 0 is the orientation of B. If we allow B only to translate, it has only two degrees of freedom, and its placements can be represented by the pair (x, y) of the coordinates of the reference point. The presence of obstacles in the robot's environment causes portions of the configuration space of B to be "forbidden" or non-free. A placement of B is called/r^^ if B does not intersect any obstacle at that placement; otherwise it is called non-free. A non-free placement n is called semi-free if B does not intersect the interior of any obstacle at TT . Our goal is to compute tht free configuration space of B, which we denote by FP, consisting of all free placements of B. The boundary of FP consists of semi-free placements of B. The motion-planning problem that we consider is to determine, for any given pair of free placements, Zi, Z2, of JB, whether there exists a continuous obstacle-avoiding motion of B from Z\ to Z2, and, if so, to plan such a motion. This problem, under reasonable assumptions concerning the geometry of B and of the obstacles, can be re-stated as the problem of computing the connected components of FP, and of representing them in an appropriate discrete combinatorial fashion. This follows from the observation that a collision-free motion of 5 is a connected arc in FP, and such an
32
RK. Agarwal and M. Sharir
arc connects Z\ and Z2 if and only if they lie in the same (arcwise-) connected component of FP. The space FP can be defined in terms of an arrangement of surfaces within the configuration space, as follows. For each obstacle feature w (e.g., an obstacle comer, boundary edge, face, etc.) and each robot feature s, let Oy^^s denote the locus of all placements of B at which s makes contact with w. Under reasonable assumptions concerning the shape of the robot and of the obstacles, the possible types of degrees of freedom of B, and an appropriate choice of the features u;, s, we can assume that each locus a^^s is a (portion of some) {k — 1)-dimensional algebraic surface of bounded degree. Let E denote the resulting collection of surface patches Oy^^s- We refer to these surfaces as contact surfaces, and let n denote their number. Let Z G FP be some initial free placement of B. As we move B from Z, it will remain free as long as the corresponding path traced in the configuration space does not reach any contact surface. The free configuration space of B is therefore a collection of some of the cells of the arrangement A{I^) of the contact surfaces. Moreover, if we only want to compute the portion of FP that consists of all free placements reachable from a fixed initial free placement Z of B, then this portion is the cell of A(U) that contains Z. Hence, the problem has been reduced to the problem of computing a single cell in an arrangement of a collection Z of n algebraic surface patches, of low bounded degree, in M^. In Chapter 2 of this volume, we will return to this problem when we discuss higherdimensional arrangements. For the time being, let us consider only the case k = 2, where we regard the configuration space of 5 as a planar region, and the problem becomes that of computing a single face in a planar arrangement of n low-degree algebraic arcs. By the results of Section 6 we immediately conclude: 7.2 ([75]). With the above notation, the combinatorial complexity of the space C of all free placements of a general robot system B with two degrees offreedom, which are reachable from Z by a collision-free motion, is 0{Xs+2(i^))> where n is the number of contact arcs and s is the maximum number of intersections between any pair of these arcs. Moreover, C can be constructed, in an appropriate model of computation, in 0{Xs+2{n) log n) deterministic time, or in 0(Av+2('^) log'^) randomized expected time. THEOREM
Note that, once C is available, a path that connects Z to some desired target placement (that also hes in C) can easily be computed in time 0{Xs-\-iin)). Let us also consider a special case of this result, in which B is an arbitrary rigid polygonal object with p edges, translating (but not rotating) in a polygonal environment Q whose boundary consists of q edges. As noted above, any placement of B can be represented by the position (JC, y) of some fixed reference point P attached to B. For each obstacle edge w and each vertex v of B, let yw^v denote the locus of all placements of B at which v touches w\ clearly, this is a line segment obtained by an appropriate translation of w. Similarly, for each obstacle comer c and each side e of B, let yc^e denote the locus of all placements of B at which e touches c; this is also an appropriately translated copy of e. Hence, in this simple instance, the contact loci are 0(pq) straight segments in the plane, and the set of all free placements reachable from a given initial free placement Z of J5 is the face containing Z in the arrangement formed by these 0(pq) contact segments. The analysis of
Davenport-Schinzel sequences and their geometric applications
33
Section 6 thus immediately implies that the combinatorial complexity of the space C of all free placements of B that are reachable from Z by a collision-free translational motion is 0(pqa(pq)). This bound was recently improved by Har-Peled et al. [79] to 0(pqa(p)). Hence, we obtain the following result. 7.3 ([79]). With the above notations, the combinatorial complexity of the space C of all free placements of the translating convex polygon B that are reachable from Z by a collision-free translational motion is 0(pqa(p)). Moreover, C can be constructed in 0(pqa^(p)logpq) deterministic time, or in 0(pqa(p)logpq) randomized expected time. THEOREM
Note that the above analysis holds for any arbitrary polygonal region B. In fact, B does not even have to be connected, and may consist of several disjoint pieces, all translating rigidly together. However, if 5 is a single convex polygon, better results can be obtained, which we mention here, for the sake of completeness. Suppose that in this case the obstacles consist of m convex polygons with pairwise-disjoint interiors (non-convex obstacles are assumed to be cut into convex pieces). For each convex obstacle O, let yo denote the locus of all placements of B at which it touches O (but their interiors remain disjoint). As is well known (see, e.g., [90]), yo is (the boundary of) a closed convex polygon, which is the Minkowski sum O 0 (—^o) = {x — y \x e 0,y e BQ], where ^o is a standard placement of B at which the reference point lies at the origin. The number of edges of yo is at most k-\-no, where ^o is the number of edges bounding O. It has been shown in [90] that, for any pair of distinct obstacles O, O' (with pairwise-disjoint interiors), the polygons Ko, yo' intersect in at most two points, assuming general position of B and of the obstacles. Hence, applying Theorem 3.1 we conclude that the space C of free placements of B reachable from Z has complexity at most X2{m) = 2m — 1. Note, however, that here we measure complexity only in terms of the number of intersections of the loci yo that appear along dC; to this we have to add the total number of vertices of the individual polygons yo, which is at most J2o(^~^^o) =km-\-n. Hence, we conclude that the boundary of the desired free component C contains at most km-\-n reflex comers and at most 2m — 1 nonreflex (convex) corners. Moreover, as shown in [90], the entire free configuration space of B (which is simply the complement of the union of the polygons yo) has at most 6m — 12 non-reflex comers (for m > 2) and at most km -\-n reflex corners (see also Section 7.8). For systems with more than two degrees of freedom, the situation is more involved (and will be mostly delegated to the companion paper). However, there are certain special motion-planning problems which admit a more direct analysis of their combinatorial and algorithmic properties, in which Davenport-Schinzel sequences are explicitly used. One such problem is that of planning the motion of a convex polygonal robot B translating and rotating in a planar polygonal environment Q, as above. Since B has three degrees of freedom, any vertex of FP is a "semi-free" placement of B at which it makes three simultaneous contacts with obstacles, while otherwise remaining free. We refer to such placements as critical placements of B. Leven and Sharir [103] proved that the number of critical placements of B is 0(pqXe(pq))- This is done by reducing the problem to the interaction of 0(pq) upper and lower envelopes of collections of univariate partially defined functions of the orientation 0, so that each collection consists of 0(pq) functions, and each
34
RK. Agarwal and M. Sharir
pair of functions intersect in at most four points; see [91,103] for more details. This implies that the combinatorial complexity of the entire free configuration space of B is also 0(pqk^(pq)). (To appreciate this bound, we note that if B is non-convex, its entire free configuration space can be shown to have f2((pq)^) complexity [142].) This combinatorial bound has led to an efficient algorithm for constructing FP [91,92], whose running time is 0(pqk^(pq) logpq). Chew and Kedem [40] gave an Oip'^qX^iq) log^)-time algorithm for finding a largest similar copy of B that can be placed inside Q without intersecting the interior of any obstacle, and also to plan a high-clearance motion of B inside Q. Later Sharir and Toledo [144] gave an 0{p^qk^^ipq) log^ pq log log p^)-time algorithm for the largest placement problem, using the result of [103] and the so called parametric searching technique. The bound was subsequently improved to Oipqk^yipq) \o^ pq \o^q) by Agarwal etal. [5]. Some other results on motion-planning and related problems, which exploit the theory of Davenport-Schinzel sequences, can be found in [3,7,10,86]. 7.3. Shortest paths Computing a collision-free shortest path between two points amidst a collection O of polyhedral obstacles in R-^ is a fundamental problem in robotics (it is a special case of optimal motion planning). Canny and Reif [34] showed that the problem is NP-Hard, which has motivated the study of efficient construction of approximate shortest paths and of developing polynomial-time algorithms for special cases of the problem. Clarkson [44] presented a polynomial-time algorithm for constructing approximate shortest paths in 3-space (see [41,119] for other such algorithms). For a given ^ > 0, his algorithm constructs a graph G^, whose nodes are points in R^, and whose edges connect some pairs of these points by straight segments. The size of Ge is 0(n^ \oginp) + n^Xs{n)/e^), where ^ is a fixed constant and p is the ratio of the length of the longest edge in O to the (straight) distance between p and q. He then reduces the problem to that of constructing a shortest path in Ge (where the weight of an edge is its Euclidean length), and shows that the ratio between the length of the path obtained in this manner and the actual collision-free shortest path between p and q is at most 1+6:. The running time of his algorithm is 0{{n^Xs{n)/e'^) \og{n/s) + n^ \og{np) \og{n log/))). A special case of shortest paths in 3-space, which has been widely studied, is when O consists of a single convex poly tope and p,q lie on its surface (see, for example, [38, 109,143]). A shortest path on the surface of a convex poly tope can be represented by the sequence of edges that it crosses, and we refer to such a sequence of edges as a shortestpath edge sequence. It is known that there are 6)(n'*) shortest path edge-sequences [111, 133]. Agarwal et al. [4] have shown that the exact set of all shortest-path edge sequences can be computed in time 0{n^Xs (n) \ogn), for some constant ^ > 0, improving a previous algorithm by Schevon and O'Rourke [134]. Baltsan and Sharir [28] considered the special case where O consists of two disjoint convex poly topes (and p and q lie anywhere in the free space). Using Davenport-Schinzel sequences to bound the number of candidate paths that one has to consider, they presented an algorithm with running time 0{n?''k\Q{n)\ogn) to find an exact collision-free shortest path between p and q.
Davenport-Schinzel
sequences and their geometric
applications
35
If the moving object is not a point and the object is allowed to rotate, the problem of computing a shortest path becomes significantly more difficult, even in the planar case. (In fact, even the notion of shortest path becomes much vaguer now.) Suppose we want to compute an optimal path for moving a line segment y =: pq (allowing both translations and rotations) amid polygonal obstacles with a total of n edges. Assume that the cost of a path is defined as the total distance traveled by one of its endpoints, say, /?, and restrict the problem further by requiring that p moves along polygonal paths that can bend only at obstacle vertices. This rather restricted version of the problem was studied by Papadimitriou and Silverberg [120], who gave an 0(n^ logn)-time algorithm for computing a shortest path in the above setting. Sharir [139] improved the running time to 0(n^a(n)\og^n), using Davenport-Schinzel sequences and planar arrangements.
7.4. Transversals ofplanar objects Let S = {Si, S2,..., Sn}hea collection of n compact convex sets in the plane. A line that intersects all sets of S is called a transversal (or a stabber) of S. Note that a line intersects a set if and only if it intersects its convex hull, so convexity is usually not a real restriction. For each set Si e S, let S* denote the set of points dual to the lines that intersect St, using a standard duality transform [54]. Sf is bounded from above by a convex x-monotone curve Ai and from below by a concave x-monotone curve Bf; see Figure 9. The stabbing region of S (or the space of all transversals) is the intersection 5* = 0/^=1 ^f- ^ ^ definition, <S* is the set of points dual to all nonvertical transversals of S [23,59]. The complexity of 5* can be measured by the number of its vertices, where a vertex is an intersection point between the boundaries of two regions S* and 5* that lies on 95*. Since «S* is the region lying between the lower envelope of the set ^ = {A, | 1 < / ^n} and the upper envelope of the set B = {Bi \ 1 < / ^ n}. Corollary 2.3 implies that the complexity of 5* is 0(ks (n)), and that it can be computed in time 0(Xs (n) log n), where s is the maximum number of common upper tangents or of common lower tangents between any two objects of S [23]. If 5 is a set of n convex polygons with a total of m vertices, then
Fig. 9. A convex set R and its stabbing region /?*
36
RK. Agarwal and M. Sharir
A and B are sets of n piecewise-linear curves, with a total of m segments, so Corollary 3.4 implies that the complexity of 5* is 0{ma{n)), and one can also show that <S* can be computed in time 0{m\ogn). For any 0 < A: < «, a line i is called a k-transversal if it intersects at least n — k objects of S. If we define K2i-\ to be the region lying above A/ and K2i to be the region lying below Bi, then the point dual to t lies in the interior of at most k Kj's. Theorem 6.12 implied that the complexity of the space of all /:-transversals of S is 0((^ + l)^ks(ln/(k + 1)J)) [140,142]. Next, suppose that <S is a set of pairwise disjoint convex objects. We say that a directed transversal i induces a geometric permutation {iiJi^ ---j, in) of 5 if ^ intersects the objects of S in the order ( 5 / , , . . . , 5/„). A directed transversal t is called extremal if it is tangent to two objects Si^, Si^ and these objects are contained in the closed halfplane that lies to the left of t. Edelsbrunner and Sharir [62] proved that, there is an extremal transversal inducing each geometric permutation. Let L'^ = (^i,..., ^m) be the (circular) sequence of all orientations, sorted in clockwise order, of the extremal directed transversals of 5 . It is shown in [62] that U can be mapped to a Z)5(n, 2)-cycle, which implies that the number of geometric permutations of 5 is at most In —2. This bound is known to be tight in the worst case; see [26,87]. Other results on geometric permutations can be found in [25,27,65], and see [73] for a comprehensive survey on geometric transversal theory.
7.5. Dynamic geometry In this section we consider various problems related to a set of points in the plane, each moving along some predefined trajectory. As mentioned in the introduction, Atallah's paper [22] on dynamic geometry problems was the first paper in computational geometry to apply Davenport-Schinzel sequences. We assume that we are given a collection S = [p\,...,pn}ofn points in the plane such that the coordinates of each /?/ are functions of time. Let pi (t) = (jc, (0, yi (0) denote the position of the point /?/ at time t, and let S(t) denote the configuration of S at time t. We assume that Xi(t), yi(t), for 1 ^ / ^ n, are polynomials of maximum degree 5, for some constant s, or similarly well-behaved functions. We want to study how various geometric structures defined by S change with time. We first bound the number of times the nearest neighbor of some point /?/ of S changes. For every 7 7^/, let
gij(t)=d\pi(t),
pj(t)) = {xi(t)-xj(t)f
+ (yiit) -
yj(t))\
and let Gi(t) = miny// gijit). By definition, the nearest neighbor of pi(t) changes only at breakpoints of G/. Since each gij is a polynomial of degree at most 2s, G/ has at most A,2.s (n) breakpoints. This bound is almost tight, because the nearest neighbor of a point can change ^(n) times, in the worst case. The same technique can also be used to bound the number of times at which the closest pair of points in S(t) changes. For this, consider the function G(t) — min/
Davenport—Schinzel sequences and their geometric applications
37
also be shown to be close to optimal in the worst case. Using a more involved argument, Atallah [22] showed that the number of combinatorial changes in the convex hull of S is 0{nX2s+2(n)). An Q{n^) lower bound on the number of combinatorial changes is proved in [8]. A more interesting and harder problem in this area is to bound the number of changes in the Delaunay triangulation of S (the dual of the Voronoi diagram of S\ see [54]), which was left as an open problem in [22]. The best known upper bound is Oin^ksin)) [70,74, 86], and the best known lower bound is Q{n^). If each point of S is moving with unit speed along a line, then the upper bound on the number of changes in the Delaunay triangulation can be improved to 0(«^); see, e.g., Guibas et al. [74]. It is conjectured that the actual bound is 0{nkr (n)), for some r depending on s, even when the points are moving at different speeds. Chew [39] showed that if the underlying metric for the Delaunay triangulation is Li or Loo, instead of the Euclidean metric, the number of combinatorial changes in the Delaunay triangulation of a set of n points moving in the plane, each with a constant velocity (along some line), is only 0(n^a(n)), thus establishing the conjecture in this special case. Aonuma et al. [19] have shown that, given k sets of points in the plane, each consisting of n points and moving rigidly according to some continuous function of time, the number of combinatorial changes in the Voronoi diagram of these kn points is 0(k^nXs(n)), for an appropriate constant s. The bound was improved by Huttenlocher et al. [83] to 0(n^k^Xs(k)). See [13,127-129] for bounds on dynamic Voronoi diagrams in higher dimensions, and [76,85,88,107,110,116,150,51,66] for other results in dynamic geometry. OPEN PROBLEM 5. Obtain a tight bound on the number of changes in the Delaunay triangulation of a set of moving points, each of which is moving with a fixed velocity.
7.6. Hausdorff distance and Voronoi surfaces Let iS be a set of points in R^. The Voronoi surface of S is defined as the bivariate function 7r(x) = min^e^ p(^, x), for x G M^, where p(-, •) is the distance function in M^, which we will assume to be some fixed Lp metric. By definition, the orthogonal projection of the graph of 7t onto the xj-plane is the Voronoi diagram of S under the metric p. Let 5 i , . . . , 5^ be a family of pairwise-disjoint point sets in the plane, with \Si\ = nt and J2T=i ^i — ^' ^^^ ^^^ ^i M denote the Voronoi surface of St. The upper envelope of these surfaces is the (graph of the) function n(x) = max]^/^^ 7ti(x). Thus n(x) gives the largest distance from x to its m nearest neighbors, one from each set St. For a point q e S, let V(q) c R^ be the set of points at which the function p(q,x) attains 77. If q e Si then, by definition, V(q) is contained in the Voronoi cell Vi(q) of q in Vor(Si). Moreover, if we denote by Vtj (q) the Voronoi cell ofq in Vor(Si U 5*^), for any j ^i, then V(q) = Vi(q) \ U J Y / ^ij(^)' Since each Voronoi cell Vij(q) is star-shaped with respect to ^ [101], we can interpret the boundary of [Jj-^i Vij{q) as the upper envelope of the boundaries of the cells Vtj (q), each represented as a univariate function r = fj (0), where (r,0) are polar coordinates about q. Using these observations, Huttenlocher et al. [84] showed that the total number of vertices of the regions V(q), summed over all points
38
P.K. Agarwal and M. Sharir
q e S,is 0{mna{mn)). For the Li - and Loo-metrics, the number of vertices is only 0(mn). Moreover, 77 can be computed in time 0(mn logmn) under any Lp metric. The study of the upper envelope of Voronoi surfaces is motivated by the following application. Let A and B be two sets of points in the plane. The Hausdorjf distance between A and B is defined as H{A, B) = max{/?(A, B), h(B, A)}, where h(A, B) — max^^^^ min/^^fi P(^^ ^)» and p(-, •) is, say, some L^-metric. Suppose we fix the set A and allow B to translate; then D(A, B), the minimum Hausdorjf distance under translation between A and B is defined as
D{A,B)=mmH{A,B®x), X
where B^x = {b-\-x \x e B}. The function D{A, B) is used as a measure of the degree to which the two sets resemble each other. Huttenlocher et al. [84] showed that D{A, B) can be computed by constructing the upper envelope of a family of Voronoi surfaces of In point sets, each consisting ofn points. Hence, D(A, B) can be computed in time Oirv" logn). See also [82,83] for some related results. The algorithm of [84] can be extended to compute the minimum Hausdorff distance D(A, B) for sets A,B of nonintersecting segments under the L\ or LQO-metric. Alt et al. [17] presented an 0(/i^ logn)-time algorithm for computing D(A, B) for sets of nonintersecting segments under the L2 metric, which has been improved by Agarwal et al. [12]. If we allow both translations and rotations, the problem of computing a placement that minimizes the Hausdorff distance becomes considerably more difficult. See [ 12,63] for efficient approximate solutions.
7.7. Visibility problems Let iJ be a polyhedral terrain (i.e., the graph of a continuous piecewise-linear, totally defined function z = ^(x, y)) having n edges, and let | be a fixed point lying above U. Without loss of generality, we can assume that ^ lies on the z-axis. We wish to preprocess E into a data structure for answering ray-shooting queries from ^, i.e., for a query ray p emanating from ^, we wish to find efficiently the first intersection point of p with U. Cole and Sharir [47] presented a data structure of size 0(na(n) logn) that can answer a query in time O(logn). We give a brief description of their data structure. For any object w in 3-space, let w* denote its projection onto the jc j-plane. For technical reasons, we consider only those rays emerging from ^ into the halfspace j > 0, and so we consider only the portion of U lying in that half-space. The edges of (this portion of) U can be partially ordered so that w < f for two edges u,v if there exists a horizontal ray from ^* intersecting both w*, i;"^ such that its intersection with u* is nearer to $*. This order is extended to a total order £ = {e\ < e2 < •-- < Cn). Next, for each edge ei, we define a partial function hi : § —> [0, 27r), where S is the unit circle of orientations, as follows. For each 0 eS, if the ray r^ in the x j-plane emanating from ^* in direction 0 does not intersect
Davenport-Schinzel sequences and their geometric applications
39
^*, then hi{0) is undefined. Otherwise, let p^ be the intersection point of r | and e*. We define hi (0) to be the polar angle (i.e., the angle with the z-axis) of the ray emanating from ^ and passing through p, where p e ei is the point whose projection is p*. For a subset E ^S,WQ define hE(0) = minhi(0) eieE
to be the lower envelope of the /i/'s. We call the graph of HE the upper rim of E. Intuitively, the upper rim of E corresponds to the 'skyline' of E seen from ^. Using DS{n, 3)sequences, it is easily seen that HE has 0(|£'|a(|£'|)) breakpoints. We construct a balanced binary tree T that stores a collection of upper rims of subsets of edges of U. Let E\ = {e\,..., en/2} and let E2 = {^«/2+i,..., ^«}. The root of T stores the upper rim HE^ and the two subtrees of the root represent recursively the search structures for the "nearer" half Ei and for the "farther" half E2 of the edges of X". It is easily seen that the total storage (and preprocessing time) that T requires is 0(na(n)\ogn). We can now process each ray-shooting query as follows. Let p be a given ray emerging from ^ in direction (0,(p), where 0 is the horizontal orientation of the ray and (p is its azimuth. We perform a binary search through T by first comparing p with the topmost upper rim /z^,, stored at the root u of T. We compute, in O(logn) time, the value of /z^, (0). If <^ < HE^ (0) then p lies above all the edges of £'1, and we continue the search through T at the right child of w; otherwise p must hit some face of Z bounded on its far side by an edge of E\, and we continue the search through T at the left child of u. When this search is completed, we will have found two edges ei < ej, necessarily bounding the same face / of X', such that p passes above et and below ej, from which the first intersection point of p and U (which lies on / ) can be calculated in constant time. The whole search takes 0(log^/i) time, which can be improved to O(logn) using fractional cascading [36]. THEOREM 7.4 ([47]). Given E and ^ as above, we can preprocess them in time 0{na{n)\ogn) into a data structure of size 0{na(n)\ogn) that supports 0(\ogn)-time ray-shooting queries from §.
Cole and Sharir also showed, using DS(n, 4)-sequences, that the total number of combinatorially different views of X, as the view point ^ moves along the z-axis, is 0(nk4(n)) (and can be Q(nX3(n)) in the worst case); see also Mulmuley [113]. Bern et al. [30] proposed a data structure of size 0{nX4(n)) that can answer a ray-shooting query, for rays emanating from any point on the z-axis, in O(logn) time per query. The problem can also be extended to situations where the view point is allowed to vary in more general regions, but then the solutions require techniques that are related to higher-dimensional arrangements. This will be picked up in Chapter 2 of this volume.
7.8. Union of Jordan regions Let r = {y\,.. .,yn} be a set of /i closed or unbounded Jordan curves in the plane, and let Ki denote any one of the two regions bounded by yi. Let K = U/Li ^i- ^^ want to
40
RK. Agarwal and M. Sharir
Fig. 10. "Almost homothetic" right-angle triangles.
bound the combinatorial complexity of K, that is, the number of intersection points of arcs of r that appear on the boundary 9 ^ of ^ . As already mentioned in Section 7.2, Kedem et al. [90] have proved that if any two curves in F intersect in at most two points, then dK contains at most 6n — 12 intersection points (provided n ^ 3), and that this bound is tight in the worst case. On the other hand, if pairs of curves in F can intersect in four or more points, then dK may contain Q{n^) intersection points in the worst case. This raises the question of what happens if any two curves in F intersect in at most three points. Using DS(n, 3)-sequences, Edelsbrunner et al. [55] have shown that the maximum combinatorial complexity of the union K is S{na(n)) (here we need to assume that the curves in F are unbounded, because two closed Jordan curves, in general position, cannot intersect in three points). The lower bound follows from Theorem 5.3, and the upper bound requires a rather sophisticated analysis of the topological structure of K. Consider next the case where F is the set of boundaries of n "almost homothetic" rightangle triangles that satisfy the following conditions (see Figure 10): Each of the corresponding regions Ki is a triangle whose orthogonal sides are parallel to the x- and y-axes, whose right-angle vertex is the lowest-leftmost point of the triangle, whose top vertex lies on the jc-axis, and whose hypotenuse has orientation in the range [ ^ — e, ^ + e}, for some small constant e > 0, Matousek at al. [105] proved, using DS(n, 4)-sequences, that the complexity of the union K is 0(A,4(/i)). This bound for the above fairly restricted problem implies the main result of [105], that the complexity of the union of n "fat" triangles, namely, triangles satisfying the property that each of their angles is at least some fixed constant angle, is 0{n log log n). Note that the union of n arbitrary triangles can have Q{n^) vertices in the worst case. See also [9,89] for other results involving fat triangles that exploit Davenport-Schinzel sequences. 7.9. Extremal (0, \}'matrices Let M = [Mij} be an m X n matrix such that M/y G {0, 1} for all 1 < / ^ m and \ ^ j we call M a (0, 1}-matrix. A configuration
^n\
is a M X i; matrix with 1 's and blanks as its entries. We say that M does not contain C if there is no submatrix A of M that contains the 1-entries of C, that is, there are no
Davenport-Schinzel
sequences and their geometric applications
41
u rows i\ < 12 < " • < iu and v columns ji < J2 < " - < jv such that Mij^ = 1 for all (s, t) for which Cst is 1. An upper bound on the number of I's in M for various C is useful in solving certain combinatorial problems in geometry, and also in bounding the time and storage complexity of certain geometric algorithms; see, for example, Bienstock and Gyori [32], Efrat and Sharir [64], and Pach and Sharir [117]. Let Co be the 2 x 4 configuration 1
1 1
1
By definition, a matrix M does not contain Co if there are no two rows /1 < (2 and four distinct columns ji < 72 < 73 < 7*4 such that
Fiiredi and Hajnal [71] have shown that the number of I's in a (0, 1 }-matrix M that does not contain Co is 0{ma{m) + n). They prove the upper bound by transforming M to a DS{n, 3)-sequence, and they construct anm x n matrix, using a recursive scheme similar to the one used in Section 5, to prove the lower bound.
8. Concluding remarks In this chapter we surveyed the basic results on the Davenport-Schinzel sequences and some of their immediate applications to a variety of geometric problems. It is impossible to include all the results and all the applications in a survey paper. We refer the interested readers to the book by the authors [142] and the survey paper by Valtr [153] for details and for many other applications of Davenport-Schinzel sequences. Finally, A natural question to ask is whether the theory of Davenport-Schinzel sequences can be extended to higher dimensions. Lower envelopes and minimization diagrams have a natural extension to higher dimensions, and they are discussed in a companion chapter in this volume. However, no purely combinatorial generalization of Davenport-Schinzel sequences to higher dimensions has been proposed so far.
References [1] W. Ackermann, Zum Hilbertschen Aufbau der reellen Zahlen, Math. Ann. 99 (1928), 118-133. [2] R. Adamec, M. Klazar and P. Valtr, Generalized Davenport-Schinzel sequences with linear upper bound. Discrete Math. 108 (1992), 219-229. [3] P.K. Agarwal, N. Amenta, B. Aronov and M. Sharir, Largest placements and motion planning of a convex polygon. Algorithms for Robotic Motion and Manipulation, J.-P. Laumond and M. Overmars, eds, A.K. Peters (1997), 143-154. [4] P.K. Agarwal, B. Aronov, J. O'Rourke and C.A. Schevon, Star unfolding ofapolytope with applications, SIAM J. Comput. 26 (1997), 1679-1713. [5] P.K. Agarwal, B. Aronov and M. Sharir, Motion planning for a convex polygon in a polygon environment. Discrete Comput. Geom. 22 (1999), 201-221.
42
RK. Agarwal and M. Sharir
[6] RK. Agarwal, M. de Berg, J. Matousek and O. Schwarzkopf, Constructing levels in arrangements and higher order Voronoi diagrams, SIAM J. Comput. 27 (1998), 654-667. [7] RK. Agarwal, A. Efrat, M. Sharir and S. Toledo, Computing a segment center for a planar point set, J. Algorithms 15 (1993), 314-323. [8] RK. Agarwal, L.J. Guibas, J. Hershberger and E. Veach, Maintaining the extent of a moving point set, Proc. 5th Workshop Algorithms Data Struct., Lecture Notes Comput. Sci. 1272, Springer-Verlag (1997), 31-44. [9] RK. Agarwal, M.J. Katz and M. Sharir, Computing depth orders and related problems, Comput. Geom. 5 (1995), 187-206. [10] RK. Agarwal and M. Sharir, Red-blue intersection detection algorithms, with applications to motion planning and collision detection, SIAM J. Comput. 19 (1990), 297-321. [11] RK. Agarwal, M. Sharir and P. Shor, Sharp upper and lower bounds on the length of general DavenportSchinzel sequences, J. Combin. Theory Ser. A 52 (1989), 228-274. [12] RK. Agarwal, M. Sharir and S. Toledo, Applications of parametric searching in geometric optimization, J. Algorithms 17 (1994), 292-318. [13] G. Albers and T. Roos, Voronoi diagrams of moving points in higher dimensional spaces, Proc. 3rd Scand. Workshop Algorithm Theory, Lecture Notes in Comput. Sci. 621, Springer-Verlag (1992), 399^09. [14] P. Alevizos, J.D. Boissonnat and P.P. Preparata, An optimal algorithm for the boundary of a cell in a union of rays, Algorithmica 5 (1990), 573-590. [15] P. Alevizos, J.D. Boissonnat and P.P. Preparata, An optimal algorithm for the boundary of a cell in a union of rays: Corrigendum, Algorithmica 6 (1991), 292-293. [16] N. Alon and E. Gyori, The number of small semispaces of a finite set of points in the plane, J. Combin. Theory Ser. A 41 (1986), 154-157. [17] H. Alt, B. Behrends and J. Blomer, Approximate matching of polygonal shapes, Ann. Math. Artif. Intell. 13(1995), 251-266. [18] N.M. Amato, M.T. Goodrich and E.A. Ramos, Computing faces in segment and simplex arrangements, Proc. 27th Annu. ACM Sympos. Theory Comput. (1995), 672-682. [19] H. Aonuma, H. Imai, K. Imai and T. Tokuyama, Maximin location of convex objects in a polygon and related dynamic Voronoi diagrams, Proc. 6th Annu. ACM Sympos. Comput. Geom. (1990), 225-234. [20] E.M. Arkin, D. Halperin, K. Kedem, J.S.B. Mitchell and N. Naor, Arrangements of segments that share endpoints: Single face results. Discrete Comput. Geom. 13 (1995), 257-270. [21] B. Aronov, H. Edelsbrunner, L.J. Guibas and M. Sharir, The number of edges of many faces in a line segment arrangement, Combinatorica 12 (1992), 261-274. [22] M.J. Atallah, Some dynamic computational geometry problems, Comput. Math. Appl. 11 (1985), 11711181. [23] M.J. Atallah and C. Bajaj, Efficient algorithms for common transversals. Inform. Process. Lett. 25 (1987), 87-91. [24] E Aurenhammer, Voronoi diagrams: A survey of a fundamental geometric data structure, ACM Comput. Surv. 23 (1991), 345-405. [25] D. Avis, J.-M. Robert and R. Wenger, Lower bounds for line stabbing. Inform. Process. Lett. 33 (1989), 59-62. [26] D. Avis and R. Wenger, Algorithms for line transversals in space, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 300-307. [27] D. Avis and R. Wenger, Polyhedral line transversals in space. Discrete Comput. Geom. 3 (1988), 257-265. [28] A. Baltsan and M. Sharir, On the shortest paths between two convex polyhedra, J. ACM 35 (1988), 267287. [29] J.L. Bentley and T.A. Ottmann, Algorithms for reporting and counting geometric intersections, IEEE Trans. Comput. C-28 (1979), 643-647. [30] M. Bern, D. Dobkin, D. Eppstein and R. Grossman, Visibility with a moving point of view, Algorithmica 11 (1994), 360-378. [31] M. Bern, D. Eppstein, P. Plassman and F. Yao, Horizon theorems for lines and polygons. Discrete and Computational Geometry: Papers from the DIMACS Special Year, J. Goodman, R. Pollack and W Steiger, eds, Amer. Math. Soc, Providence, RI (1991), 45-66.
Davenport-Schinzel
sequences and their geometric applications
43
[32] D. Bienstock and E. Gyori, An extremal problem on sparse 0-1 matrices, SIAM J. Discrete Math. 4 (1991), 17-27. [33] R. Canham, A theorem on arrangements of lines in the plane, Israel J. Math. 7 (1969), 393-397. [34] J. Canny and J.H. Reif, New lower bound techniques for robot motion planning problems, Proc. 28th Annu. IEEE Sympos. Found. Comput. Sci. (1987), 49-60. [35] B. Chazelle, H. Edelsbrunner, L. Guibas, M. Sharir and J. Snoeyink, Computing a face in an arrangement of line segments and related problems, SIAM J. Comput. 22 (1993), 1286-1302. [36] B. Chazelle and L.J. Guibas, Fractional cascading: I. A data structuring technique, Algorithmica 1 (1986), 133-162. [37] B. Chazelle and D.T. Lee, On a circle placement problem. Computing 36 (1986), 1-16. [38] J. Chen and Y. Han, Shortest paths on a polyhedron, Proc. 6th Annu. ACM Sympos. Comput. Geom. (1990), 360-369. [39] L.P. Chew, Near-quadratic bounds for the L\ Voronoi diagram of moving points, Proc. 5th Canad. Conf. Comput. Geom. (1993), 364-369. [40] L.P. Chew and K. Kedem, A convex polygon among polygonal obstacles: Placement and high-clearance motion, Comput. Geom. Theory & Appl. 3 (1993), 59-89. [41] J. Choi, J. Sellen and C.K. Yap, Approximate Euclidean shortest path in 3-space, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 4 1 ^ 8 . [42] K. Clarkson, Computing a single face in arrangements of segments. Unpublished manuscript (1990). [43] K. Clarkson, H. Edelsbrunner, L. Guibas, M. Sharir and E. Welzl, Combinatorial complexity bounds for arrangements of curves and spheres, Discrete Comput. Geom. 5 (1990), 99-160. [44] K.L. Clarkson, Approximation algorithms for shortest path motion planning, Proc. 19th Annu. ACM Sympos. Theory Comput. (1987), 56-65. [45] K.L. Clarkson, Randomized geometric algorithms. Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds, World Scientific, Singapore (1992), 117-162. [46] K.L. Clarkson and P.W. Shor, Applications of random sampling in computational geometry, II, Discrete Comput. Geom. 4 (1989), 387-421. [47] R. Cole and M. Sharir, Visibility problems for polyhedral terrains, J. Symbolic Comput. 7 (1989), 11-30. [48] H. Davenport, A combinatorial problem connected with differential equations II, Acta Arithmetica 17 (1971), 363-372. [49] H. Davenport and A. Schinzel, A combinatorial problem connected with differential equations, Amer. J. Math. 87 (1965), 684-689. [50] M. de Berg, K. Dobrindt and O. Schwarzkopf, On lazy randomized incremental construction. Discrete Comput. Geom. 14 (1995), 261-286. [51] M. de Berg, H. Everett and L. Guibas, The union of moving polygonal pseudodiscs - Combinatorial bounds and applications, Comput. Geom. 11 (1998), 69-81. [52] T. Dey, Improved bounds for k-sets and k-th levels. Discrete Comput. Geom. 19 (1998), 373-382. [53] A. Dobson and S. Macdonald, Lower bounds for lengths of Davenport-Schinzel sequences, Utilitas Math. 6(1974), 251-257. [54] H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer-Verlag, Heidelberg (1987). [55] H. Edelsbrunner, L. Guibas, J. Hershberger, J. Pach, R. Pollack, R. Seidel, M. Sharir and J. Snoeyink, Arrangements of Jordan arcs with three intersections per pair. Discrete Comput. Geom. 4 (1989), 523539. [56] H. Edelsbrunner, L. Guibas, J. Pach, R. Pollack, R. Seidel and M. Sharir, Arrangements of curves in the plane: Topology, combinatorics and algorithms, Theoret. Comput. Sci. 92 (1992), 319-336. [57] H. Edelsbrunner and L.J. Guibas, Topologically sweeping an arrangement, J. Comput. Syst. Sci. 38 (1989), 165-194. Corrigendum in 42 (1991), 249-251. [58] H. Edelsbrunner, L.J. Guibas and M. Sharir, The complexity and construction of many faces in arrangements of lines and of segments. Discrete Comput. Geom. 5 (1990), 161-196. [59] H. Edelsbrunner, H.A. Maurer, P.P. Preparata, A.L. Rosenberg, E. Welzl and D. Wood, Stabbing line segments, BIT 22 (1982), 274-281. [60] H. Edelsbrunner, J. O'Rourke and R. Seidel, Constructing arrangements of lines and hyperplanes with applications, SIAM J. Comput. 15 (1986), 341-363.
44
RK. Agarwal and M. Sharir
[61] H. Edelsbrunner, R. Seidel and M. Sharir, On the zone theorem for hyperplane arrangements, SIAM J. Comput. 22 (1993), 418^29. [62] H. Edelsbrunner and M. Sharir, The maximum number of ways to stab n convex non-intersecting sets in the plane is In - 2, Discrete Comput. Geom. 5 (1990), 35-42. [63] A. Efrat, Finding approximate matching ofpoints and segments under translation. Unpublished manuscript (1995). [64] A. Efrat and M. Sharir, A near-linear algorithm for the planar segment center problem. Discrete Comput. Geom. 16 (1996), 239-257. [65] P. Egyed and R. Wenger, Ordered stabbing ofpairwise disjoint convex sets in linear time. Abstracts 1st Canad. Conf. Comput. Geom. (1989), 23. [66] D. Eppstein, Geometric lower bounds for parametric optimization problems. Discrete Comput. Geom. 20 (1998), 463-476. [67] R Erdos, L. Lovasz, A. Simmons and E. Straus, Dissection graphs of planar point sets, A Survey of Combinatorial Theory, J.N. Srivastava, ed., North-Holland, Amsterdam (1973), 139-154. [68] H. Everett, J.-M. Robert and M. van Kreveld, An optimal algorithm for the (^k)-levels, with applications to separation and transversal problems, Intemat. J. Comput. Geom. Appl. 6 (1996), 247-261. [69] S.J. Fortune, A sweepline algorithm for Voronoi diagrams, Algorithmica 2 (1987), 153-174. [70] J.-J. Fu and R.C.T. Lee, Voronoi diagrams of moving points in the plane, Intemat. J. Comput. Geom. Appl. 1 (1991), 23-32. [71] Z. Furedi and R Hajnal, Davenport-Schinzel theory of matrices. Discrete Math. 103 (1992), 233-251. [72] D. Gardy and D. Gouyou-Beauchamps, Enumeration of some Davenport-Schinzel sequences. Report 564, Universite de Paris-Sud, Paris (1990). [73] J.E. Goodman, R. Pollack and R. Wenger, Geometric transversal theory. New Trends in Discrete and Computational Geometry, J. Pach, ed.. Springer-Verlag, Heidelberg-New York-Berlin (1993), 163-198. [74] L. Guibas, J.S.B. Mitchell and T. Roos, Voronoi diagrams of moving points in the plane, Proc. 17th Intemat. Workshop Graph-Theoret. Concepts Comput. Sci., Lecture Notes in Comput. Sci. 570, Springer-Verlag (1991), 113-125. [75] L.J. Guibas, M. Sharir and S. Sifrony, On the general motion planning problem with two degrees of freedom. Discrete Comput. Geom. 4 (1989), 491-521. [76] P. Gupta, R. Janardan and M. Smid, Fast algorithms for collision and proximity problems involving moving geometric objects, Proc. 2nd Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 855, Springer-Verlag (1994), 278-289. [77] D, Halperin and M. Sharir, New bounds for lower envelopes in three dimensions, with applications to visibility in terrains. Discrete Comput. Geom. 12 (1994), 313-326. [78] S. Har-Peled, The Complexity of Many Cells in the Overlay of Many Arrangements, M.S. thesis, Dept. Computer Science, Tel Aviv University, Tel Aviv, Israel (1995). [79] S. Har-Peled, TM. Chan, B. Aronov, D. Halperin and J. Snoeyink, The complexity of a single face of a Minkowski sum, Proc. 7th Canad. Conf. Comput. Geom. (1995), 91-96. [80] S. Hart and M. Sharir, Nonlinearity of Davenport-Schinzel sequences and of generalized path compression schemes, Combinatorica 6 (1986), 151-177. [81] J. Hershberger, Finding the upper envelope ofn line segments in 0{n \ogn) time. Inform. Process. Lett. 33 (1989), 169-174. [82] D.P. Huttenlocher and K. Kedem, Computing the minimum Hausdorjf distance for point sets under translation, Proc. 6th Annu. ACM Sympos. Comput. Geom. (1990), 340-349. [83] D.P. Huttenlocher, K. Kedem and J.M. Kleinberg, On dynamic Voronoi diagrams and the minimum Hausdorff distance for point sets under Euclidean motion in the plane, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 110-120. [84] D.P. Huttenlocher, K. Kedem and M. Sharir, The upper envelope of Voronoi surfaces and its applications. Discrete Comput. Geom. 9 (1993), 267-291. [85] H. Hwang, R. Chang and H. Tu, The separability problem in dynamic computational geometry, UnpubUshed manuscript (1990). [86] K. Imai, S. Sumino and H. Imai, Minimax geometric fitting of two corresponding sets of points, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 266-275.
Davenport-Schinzel
sequences and their geometric applications
45
[87] M. Katchalski, T. Lewis and A. Liu, The different ways of stabbing disjoint convex sets. Discrete Comput. Geom. 7 (1992), 197-206. [88] N. Katoh, T. Tokuyama and K. Iwano, On minimum and maximum spanning trees of linearly moving points. Discrete Comput. Geom. 13 (1995), 161-176. [89] M.J. Katz, 3-D vertical ray shooting and 2-D point enclosure, range searching and arc shooting amidst convex fat objects. Research Report 2583, INRIA, BP93, 06902 Sophia-Antipolis, France (1995). [90] K. Kedem, R. Livne, J. Pach and M. Sharir, On the union of Jordan regions and collision-free translational motion amidst polygonal obstacles, Discrete Comput. Geom. 1 (1986), 59-71. [91] K. Kedem and M. Sharir, An efficient motion planning algorithm for a convex rigid polygonal object in 2-dimensional polygonal space. Discrete Comput. Geom. 5 (1990), 43-75. [92] K. Kedem, M, Sharir and S. Toledo, On critical orientations in the Kedem-Sharir motion planning algorithm for a convex polygon in the plane. Discrete Comput. Geom. 17 (1997), 227-240. [93] J. Ketonen and R. Solovay, Rapidly growing Ramsey functions, Ann. of Math. 113 (1981), 267-314. [94] M.M. Klawe, Superlinear bounds on matrix searching, Proc. 1st ACM-SIAM Sympos. Discrete Algorithms (1990) 485^93. [95] M. Klazar, A general upper bound in extremal theory of sequences. Comment. Math. Univ. Carolin. 33 (1992), 737-746. [96] M. Klazar, Two results on a partial ordering of finite sequences. Comment. Math. Univ. Carolin. 34 (1993), 667-675. [97] M. Klazar, A linear upper bound in extremal theory of sequences, J. Combin. Theory Ser. A 68 (1994), 454^64. [98] M. Klazar, Combinatorial Aspects of Davenport-Schinzel Sequences, PhD thesis. Department of Applied Mathematics, Charles University, Prague, Czech Republic (1995). [99] M. Klazar and P. Valtr, Generalized Davenport-Schinzel sequences, Combinatorica 14 (1994), 463^76. [100] P. Komjath, A simplified construction of nonlinear Davenport-Schinzel sequences, J. Combin. Theory Ser. A 49 (1988), 262-267. [101] D. T. Lee, Two-dimensional Voronoi diagrams in the Lp-metric, J. ACM 27 (1980), 604-618. [102] D. Leven and M. Sharir, Intersection and proximity problems and Voronoi diagrams. Advances in Robotics 1: Algorithmic and Geometric Aspects of Robotics, J.T. Schwartz and C.-K. Yap, eds, Lawrence Erlbaum Associates, Hillsdale, NJ (1987), 187-228. [103] D. Leven and M. Sharir, On the number of critical free contacts of a convex polygonal object moving in two-dimensional polygonal space. Discrete Comput. Geom. 2 (1987), 255-270. [104] L. Lovasz, On the number of halving lines, Annal. Univ. Scie. Budapest, de Rolando Eotvos Nominatae, Sectio Math. 14 (1971), 107-108. [105] J. Matousek, J. Pach, M. Sharir, S. Sifrony and E. Welzl, Fat triangles determine linearly many holes, SIAM J. Comput. 23 (1994), 154-169. [106] J. Matousek and P. Valtr, The complexity of the lower envelope of segments with h endpoints. Intuitive Geometry, CoUoq. Math. Societ y Janos Bolyai, North-Holland, Amsterdam (1997), 407-411. [107] N. Megiddo, Dynamic location problems, Oper. Res. 6 (1986), 313-319. [108] W. Mills, Some Davenport-Schinzel sequences, Congressus Numer. IX: Proc. 3rd Manitoba Conf. on Numer. Math, and Computing, R. Thomas and H. WiUiams, eds (1973), 307-313. [109] J.S.B. Mitchell, D.M. Mount and C.H. Papadimitriou, The discrete geodesic problem, SIAM J. Comput. 16 (1987), 647-668. [110] C. Monma and S. Suri, Transitions in geometric minimum spanning trees. Discrete Comput. Geom. 8 (1992), 265-293. [ I l l ] D.M. Mount, The number of shortest paths on the surface of a polyhedron, SIAM J. Comput. 19 (1990), 593-611. [112] R. MuUin and R. Stanton, A map-theoretic approach to Davenport-Schinzel sequences. Pacific J. Math. 40 (1972), 167-172. [113] K. Mulmuley, Hidden surface removal with respect to a moving point, Proc. 23rd Annu. ACM Sympos. Theory Comput. (1991), 512-522. [114] K. Mulmuley, On levels in arrangements and Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 307338.
46
RK. Agarwal and M. Sharir
[115] K. Mulmuley, Computational Geometry: An Introduction Through Randomized Algorithms, Prentice-Hall, Englewood Cliffs, NJ (1994). [116] T. Ottmann and D. Wood, Dynamical sets of points, Comput. Vision Graph. Image Process. 27 (1984), 157-166. [117] J. Pach and M. Sharir, On vertical visibility in arrangements of segments and the queue size in the BentleyOttmann line sweeping algorithm, SIAM J. Comput. 20 (1991), 460-470. [118] J. Pach, W. Steiger and E. Szemeredi, An upper bound on the number of planar k-sets. Discrete Comput. Geom. 7 (1992), 109-123. [119] C.H. Papadimitriou, An algorithm for shortest-path motion in three dimensions. Inform. Process. Lett. 20 (1985), 259-263. [120] C.H. Papadimitriou and E.B. Silverberg, Optimal piecewise linear motion of an object among obstacles, Algorithmica 2 (1987), 523-539. [121] J. Paris and L. Harrington, A mathematical incompleteness in Peano arithmetic. Handbook of Mathematical Logic, J. Barwise, ed., North-Holland, Amsterdam (1977), 1133-1142. [122] C. Peterkin, Some results on Davenport-Schinzel sequences, Congressus Numer. IX: Proc. 3rd Manitoba Conf. on Numer. Math, and Computing, R. Thomas and H. Williams, eds (1973), 337-344. [123] R. Pollack, M. Sharir and S. Sifrony, Separating two simple polygons by a sequence of translations. Discrete Comput. Geom. 3 (1988), 123-136. [124] P.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag, New York (1985). [125] E. Ramos, Intersection of unit-balls and diameter of a point set in R^, Comput. Geom. 8 (1997), 57-65. [126] H. Rogers, Theory of Recursive Functions and Effective Computability, McGraw-Hill, New York (1967). [ 127] T. Roos, Voronoi diagrams over dynamic scenes, Proc. 2nd Canad. Conf. Comput. Geom. (1990), 209-213. [128] T. Roos, Dynamic Voronoi diagrams, PhD thesis, Bayerische Julius-Maximilians-Univ., Wurzburg, Germany (1991). [129] T. Roos, Tighter bounds on Voronoi diagrams of moving points, Proc. 5th Canad. Conf. Comput. Geom. (1993), 358-363. [130] D. Roselle, An algorithmic approach to Davenport-Schinzel sequences, Utilitas Math. 6 (1974), 91-93. [131] D. Roselle and R. Stanton, Results on Davenport-Schinzel sequences, Congressus Numer. I, Proc. Louisiana Conf. on Combinatorics, Graph Theory, and Computing, R. Mullin et al., eds (1970), 249-267. [132] D. Roselle and R. Stanton, Some properties of Davenport-Schinzel sequences. Acta Arith. 17 (1971), 355-362. [133] C. Schevon and J. O'Rourke, The number of maximal edge sequences on a convex polytope, Proc. 26th AUerton Conf. Commun. Control Comput. (1988), 49-57. [134] C. Schevon and J. O'Rourke, An algorithm for finding edge sequences on a polytope. Technical Report JHU-89/03, Dept. Comput. Sci., Johns Hopkins Univ., Baltimore, MD (1989). [135] J.T. Schwartz and M. Sharir, On the two-dimensional Davenport-Schinzel problem, J. Symbolic Comput. 10(1990), 371-393. [136] R. Seidel, Backwards analysis of randomized geometric algorithms. New Trends in Discrete and Computational Geometry, J. Pach, ed.. Springer-Verlag, Heidelberg, Germany (1993), 37-68. [137] M. Sharir, Almost linear upper bounds for the length of general Davenport-Schinzel sequences, Combinatorica7(1987), 131-143. [138] M. Sharir, Improved lower bounds on the length of Davenport-Schinzel sequences, Combinatorica 8 (1988), 117-124. [ 139] M. Sharir, A note on the Papadimitriou-Silverberg algorithm for planning optimal piecewise linear motion of a ladder. Inform. Process. Lett. 32 (1989), 187-190. [140] M. Sharir, On k-sets in arrangements of curves and surfaces. Discrete Comput. Geom. 6 (1991), 593-613. [141] M. Sharir, Almost tight upper bounds for lower envelopes in higher dimensions. Discrete Comput. Geom. 12 (1994), 327-345. [142] M. Sharir and P.K. Agarwal, Davenport-Schinzel Sequences and Their Geometric Applications, Cambridge University Press, New York (1995). [143] M. Sharir and A. Schorr, On shortest paths in polyhedral spaces, SIAM J. Comput. 15 (1986), 193-215. [144] M. Sharir and S. Toledo, Extremal polygon containment problems, Comput. Geom. 4 (1994), 99-118.
Davenport-Schinzel
sequences and their geometric applications
Al
[145] P. Shor, Geometric realization of superlinear Davenport-Schinzel sequences: I. Line segments. Unpublished manuscript (1990). [146] P. Shor, Private communication (1990). [147] R. Stanton and P. Dirksen, Davenport-Schinzel sequences, Ars Combinatorica 1 (1976), 43-51. [148] R. Stanton and D. Roselle, A result on Davenport-Schinzel sequences. Combinatorial Theory and Its Applications, Colloq. Math. Society Janos Bolyai, Vol. 4, P. Erdos et al., eds, North-Holland, Amsterdam (1969), 1023-1027. [149] E. Szemeredi, On a problem of Davenport and Schinzel, Acta Arith. 25 (1974), 213-224. [150] H. Tamaki and T. Tokuyama, How to cut pseudo-parabolas into segments. Discrete Comput. Geom. 19 (1998), 265-290. [151] A. Tamir, Improved complexity bounds for center location problems on networks by using dynamic data structures, SIAM J. Discrete Math. 1 (1988), 377-396. [152] J.-R. Sack and J. Urrutia, eds, Handbook on Computational Geometry, Elsevier Science B.V., Amsterdam, the Netherlands (1999). [153] P. Valtr, Generalization of Davenpart-Schinzel sequences. Contemporary Trends in Discrete Mathematics, J. Nesetril et al., eds., DIMACS Ser. Discrete Math. Theoret. Comput. Sci., 349-389. [154] A. Wiemik and M. Sharir, Planar realizations of nonlinear Davenport-Schinzel sequences by segments. Discrete Comput. Geom. 3 (1988), 15-47.
This Page Intentionally Left Blank
CHAPTER 2
Arrangements and Their Applications^ Pankaj K. Agarwal Center for Geometric Computing, Department of Computer Science, Box 90129, Duke University, Durham, NC 27708-0129, USA E-mail:
[email protected]
Micha Sharir School of Mathematical Sciences, Tel Aviv University, Tel Aviv 69978, Israel; and Courant Institute of Mathematical Sciences, New York University, New York, NY 10012, USA E-mail: sharir®math. tau. ac. il
Contents 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
Introduction Preliminaries Lower envelopes Single cells Zones Levels Many cells and incidences Generalized Voronoi diagrams Union of geometric objects Decomposition of arrangements 10.1. Triangulating hyperplane arrangements 10.2. Vertical decomposition 10.3. Other decomposition schemes 10.4. Cuttings 11. Representation of arrangements 12. Computing arrangements 13. Computing substructures in arrangements 13.1. Lower envelopes
51 53 58 66 68 71 76 79 81 84 84 84 87 88 88 90 93 93
*Work by P.A. was supported by Army Research Office MURI grant DAAH04-96-1-0013, by a Sloan fellowship, by an NYI award, and by a grant from the U.S.-Israeli Binational Science Foundation. Work by M.S. was supported by NSF Grants CCR-91-22103 and CCR-93-11127, by a Max-Planck Research Award, and by grants from the U.S.-Israeli Binational Science Foundation, the Israel Science Fund administered by the Israeli Academy of Sciences, and the G.I.F., the German-Israeli Foundation for Scientific Research and Development.
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
49
50
RK. Agarwal and M. Sharir
13.2. Single cells 13.3. Levels 13.4. Marked cells 13.5. Union of objects 14. Applications 14.1. Range searching 14.2. Terrain visualization 14.3. Transversals 14.4. Geometric optimization 14.5. Robotics 14.6. Molecular modeling 15. Conclusions References
95 96 97 97 98 98 99 100 101 104 105 106 106
Abstract The arrangement of a finite collection of geometric objects is the decomposition of the space into connected cells induced by them. We survey combinatorial and algorithmic properties of arrangements of arcs in the plane and of surface patches in higher dimensions. We present many applications of arrangements to problems in motion planning, visualization, range searching, molecular modeling, and geometric optimization. Some results involving planar arrangements of arcs have been presented in Chapter 1 of this Handbook, and are extended in this chapter to higher dimensions.
Arrangements and their applications
51
1. Introduction The arrangement of a finite collection F of geometric objects in M^, denoted by A{r), is the decomposition of the space into relatively open connected cells of dimensions 0 , . . . , J induced by /", where each cell is a maximal connected set of points lying in the intersection of a fixed subset of F. Besides being interesting in their own right, because of the rich geometric, combinatorial, algebraic, and topological structures that arrangements possess, they also lie at the heart of several geometric problems arising in a wide range of applications including robotics, computer graphics, molecular modeling, and computer vision. Before proceeding further, we present a few such examples. (a) Assume that we have a robot system B with d degrees of freedom, i.e., we can represent each placement of 5 as a point in R^, and we call the space of all placements the configuration space of B. Suppose the three-dimensional workspace of B is cluttered with polyhedral obstacles whose shapes and locations are known. B is allowed to move freely in a motion that traces a continuous path in the configuration space, but B has to avoid collision with the obstacles. For each combination of a geometric feature (vertex, edge, face) of an obstacle and a similar feature (face, edge, vertex) of B, define their contact surface as the set of all points in E^ that represent placements of B at which contact is made between these specific features. Let F be the set of all contact surfaces. Let Z be a point corresponding to a given imiidX free placement of B, i.e., a placement at which it does not intersect any obstacle. Then the set of all free placements of B that can be reached from Z via a collision-free continuous motion corresponds to the cell containing Z in the arrangement of the contact surfaces. Thus, the problem of determining whether there exists a collision-free path from an initial configuration / to a final configuration F is equivalent to determining whether / and F lie in the same cell of A{F). This close relationship between arrangements and motion planning has led to considerable work on arrangements; see, for example, [22,54,211,221,242,243,250,254,330]. If we want to compute the set of all placements reachable from the initial placement / , the combinatorial complexity of the cell in A{F) containing / , i.e., the total number of lower-dimensional faces appearing on its boundary, serves as a trivial lower bound for the running time. It turns out that in many instances one can design motion-planning algorithms whose performance almost matches this bound. (b) A molecule can be modeled as an arrangement of spheres, where the radius of each sphere depends on the atom that it models and the position of each sphere depends on the molecular structure. In the van der Waals model, a molecule is a family of possibly overlapping spheres, where the radius of each sphere is determined by the van der Waals radius of the corresponding atom in the molecule. Lee and Richards [251] proposed another model, called solvent accessible model, which is used to study the interaction between the protein and solvent molecules. Also in this model, a molecule is modeled as a sphere, but the balls representing the solvent molecules are shrunk to points and the balls representing atoms in the protein are inflated by the same amount [313]. Even though these models ignore various properties of molecules, they have been useful in a variety of applications. Many problems in molecular modeling can be formulated as problems related to arrangements of spheres. For example, computing the "outer surface" of the molecule corresponds to computing the
52
RK. Agarwal and M. Sharir
unbounded cell of the corresponding arrangement of spheres. See [145,146,216,222,277] for more details on applications of arrangements in molecular biology. (c) Arrangements are also attractive because of their relationship with several other structures. For example, using the duality transform, a point /? = ( p i , . . . , pd) in R^ can be mapped to the hyperplane X!/=i ^iPi — 1' ^^^ ^^^^ versa. This facilitates the formulation of several problems related to point configurations in terms of arrangements of hyperplanes. See [110,142] for a small sample of such problems. The Grassmann-Plucker relation transforms /^-flats in R^ to hyperplanes or points in R", for u = (f^\) — 1 [74,226]; e.g., lines in M? can be mapped to hyperplanes or points in R^. Therefore many problems involving lines in R^ have been solved using hyperplane arrangements in R^ [107, 139,301,334]. The well-known combinatorial structure oriented matroids of rank A: + 1 are closely related to arrangements of pseudo-hyperplanes in R^ [74,314], and zonotopes in R^ correspond to hyperplane arrangements in R^~' [142,362]. Several applications of arrangements in singularity theory, algebraic group theory, and other fields of mathematics can be found in [288,290,291]. Study of arrangements of lines and hyperplanes has a long, rich history. The first paper on this topic is perhaps by J. Steiner in 1826 [337], in which he obtained bounds on the number of cells in arrangements of lines and circles in the plane and of planes and spheres in R^. His results have since been extended in several ways [32-34,87,315,356,360,361]. A summary of early work on arrangements of hyperplanes can be found in the monograph and the survey paper by Griinbaum [198,199]. Most of the work on hyperplane arrangements until the 1980s dealt with the combinatorial structure of the entire arrangement or of a single cell in the arrangement (i.e., a convex polyhedron), and with the algebraic and topological properties of the arrangement [179,289-291]. Various substructures and algorithmic issues of hyperplane arrangements, motivated by problems in computational and combinatorial geometry, have received attention mostly during the last fifteen years. Although hyperplane arrangements possess a rich structure, many applications (e.g., the motion-planning problem and the molecular models described above) call for a systematic study of higher-dimensional arrangements of patches of algebraic surfaces. For more than a century, researchers in algebraic geometry have studied arrangements of algebraic surfaces, but their focus has largely been on algebraic and combinatorial issues rather than on algorithmic ones. Considerable progress has been made on all fronts during the last fifteen years. It is beyond the scope of a survey paper, or even of a book, to cover all aspects of arrangements. In this chapter we will survey combinatorial and algorithmic problems on arrangements of (hyper)surfaces (or of surface patches) in real affine space R^. (Hyperplane arrangements in complex space have also been studied; see, e.g., [75,291].) We will assume that J is a small constant, that the surfaces are algebraic and their degree is bounded by a constant, and that any surface patch is a semialgebraic set defined by a Boolean combination of a constant number of polynomials of constant maximum degree. There has also been some recent work on combinatorial and algorithmic issues involving arrangements of more general surfaces, known as semi-Pfaffian sets, which include graphs of trigonometric, exponential, or logarithmic functions on bounded domains [189,245]. We also note that a study of algebraic and topological problems on arrangements of algebraic surfaces can be found in [76]. In this survey we will mostly review the known results on the com-
Arrangements
and their applications
53
Fig. 1. An arrangement of lines.
binatorial complexity of various substructures of arrangements, the known algorithms for computing these substructures, and the geometric applications that benefit from these results. Many other combinatorial problems related to arrangements are discussed in [74, 180,192,293,294,332,306,336,362]. An excellent source on combinatorial and algorithmic results on arrangements of hyperplanes is the book by Edelsbrunner [142]. The book by the authors [330] covers some of the topics discussed here in more detail. Other survey papers on arrangements include [205,213,220,327]. This survey is organized as follows. In Section 2 we define arrangements formally, state the assumptions we will be making in this survey, and discuss the known bounds on the complexity of entire arrangements. Sections 3-10 discuss combinatorial complexities of various substructures of arrangements. Section 11 discusses several methods for representing arrangements. Section 12 describes algorithms for computing the entire arrangement, and Section 13 reviews algorithms for computing various substructures of arrangements. We discuss a few applications of arrangements in Section 14.
2. Preliminaries Let F = {yi,..., y^} be a collection of n (hyper)surfaces or surface patches in M^. The set r induces a decomposition of R^ into connected cells (or faces), called the arrangement of r and denoted A{r), so that each cell is a maximal connected subset of the intersection of a fixed (possibly empty) subset of surface patches that avoids all other surface patches. Thus a J-dimensional cell is a maximal connected region that does not meet any surface patch of r. The combinatorial complexity of A{r) is the total number of cells, of all dimensions, in A{r). The combinatorial complexity of a ^-dimensional cell C in A{r) is the number of cells of A{r) of dimension less than k that are contained in the boundary ofC. We assume that F satisfies the following assumptions. (Al) Each Yi G T is a semialgebraic set of constant description complexity. The local dimension of every point 'mythd —\} A subset of M is called a real semialgebraic set if it is obtained as a finite Boolean combination of sets of the
54
RK. Agarwal and M. Sharir
(A2) Each Yi ^ ^ i^ of the form {Qt = 0) A Ft (Pi, at, 0, Pi^crt^O,..., P/.a/^O). Here u is a constant; atj G {^, ^ } ; F/ is a Boolean formula; Q/, Pi,,..., Pi^^ G R[xi,...,x
0} for J-variate polynomials / . A semialgebraic set has constant description complexity if it can be described in terms of a constant number of polynomials, with a constant bound on the degrees of the corresponding polynomials. ^ A set { x j , . . . , Xyt} of real numbers is algebraically independent (over the rationals) if no /:-variate polynomial with integer coefficients vanishes 2ii{x\,X2,... ,xj^).
Arrangements and their applications
55
in general position while investigating the combinatorial complexity of substructures of arrangements. However, in order to achieve the general position defined above, the perturbation scheme has to introduce a different infinitesimal for each coefficient, which makes any algorithm based on this perturbation scheme impractical. Fortunately, most of the algorithms involving arrangements either work for any degenerate arrangement or require a considerably weaker definition of general position, e.g., the intersection of any k surface patches is either empty or a (J — /:)-dimensional set, all surface patches intersect "properly," etc. The perturbation scheme required by an algorithm depends on the degenerate situations that it wants to rule out. Several constructive perturbation schemes have been proposed that use only a few infinitesimals [69,156,171,172,181]. Although these schemes cannot handle all the cases, they work for a wide range of applications. The paper by Seidel [325] contains a detailed discussion on "linear" perturbation and its applications in geometric algorithms. A few algorithms have also been proposed to handle degeneracies directly without resorting to perturbations; see, e.g. [61,88]. We will, nevertheless, use the strong definition of general position, defined above, in order to simplify the exposition, and refer the reader to original papers for specific general-position assumptions required by different algorithms. In the light of the preceding discussion, and since we are mainly interested in asymptotic bounds, we will make the following additional assumptions on the surface patches in F , without any real loss of generality, whenever required. (A3) Each surface patch in F is connected and monotone in x i , . . . , Xd-\, and its relative interior is smooth. (A4) The surface patches in F are in general position. (A5) Any d surface patches in F intersect in at most s points, for some constant 5-. (This is a consequence of the preceding assumptions, but is stated to introduce s explicitly.) Generally, we will be stating Assumptions (Al) and (A2), but most of the proofs and algorithms sketched in the survey will also make Assumptions (A3)-(A5). Assumptions (A1)-(A3) imply that we can regard each surface patch y as the graph of a partially defined {d — l)-variate function Xd = y{x\,.. .,Xd-\) of constant description complexity. We will refer to the projection of y onto the hyperplane xj = 0 as the domain, denoted y*, of y (over which the function y is defined). The boundary of y*, called the domain boundary, is a collection of 0(1) {d — 2)-dimensional surface patches in M^~^ satisfying assumptions corresponding to (A1)-(A2). Abusing the notation slightly, we will not distinguish between the surface patch y and the underlying function y (jci,..., Xd-i)The most fundamental question in the combinatorial study of an arrangement A{F) of surfaces is to prove a bound on the combinatorial complexity, / ( / " ) , of A{F). In 1826, Steiner [337] studied the complexity of arrangements of lines and circles in E^ and of planes and spheres in M^. His results on arrangements of planes can be summarized as follows. Let F be a set of n planes in E^ so that F can be decomposed into k parallel families, containing ni,.. .,nk planes in each respective family, and the parallel families are in general position. Steiner proved the following bounds on the number of vertices,
56
P.K. Agarwal and M. Sharir
edges, two-dimensional faces, and three-dimensional cells of A{r)\ a3 a2 + 3^3 —^2 + 3(73 a\ + 2(72 + 3(J3 (Ti — 2or2 + 3a3 I + o\-\-a2-\-cfT, — \-\-a\ — a2-\-cf3
vertices, edges, bounded edges, 2-faces, bounded 2-faces, 3-cells, bounded 3-cells.
Here a\ = Y!i=\^i = n, a2 = J2i<j^i^j^ ^^d as = J2i<j
2.1 (Buck [87]). Let r be a set ofn hyperplanes in W^. For any
The equality holds when A(r)
O^k^d,
is simple.
PROOF. We will prove the theorem for simple arrangements. Let cpk (n, d) denote the number of A:-cells in a simple J-dimensional arrangement of n hyperplanes. Let A(r) be a simple arrangement of a set F of n hyperplanes in R^. Fix a subset R ^ F of d — k hyperplanes, and let 77 = ClheR^'^ 77 is a /:-flat. Set F\n = {hnn \h e H\R}.ThQ ^-cells
Arrangements and their applications
57
of A{r\n) are the same as the /:-cells of A{r) that he in 77. Since A{r\r[) is a simple ^-dimensional arrangement and there are {JL]^ subsets of F of size d — k,we obtain (Pk(n = {^_j^j(pk(n-d-^k,k). By Euler's relation for cell complexes in affine space (see, e.g., [142]), d
j2(-i)'
therefore (pkin-d-{-k,k) = (-iy k=0
^
The above equality can be rewritten as d
J2^-^^^Q'Pd-k(n-Kd-k) = L
(2.1)
k=0
We claim that
(Pd(n,d) = Y^( . j ,
(2.2)
/=o
which will complete the proof of the theorem. Since (2.1) is a recurrence with (po(n,0) = 1, there is a unique solution to the recurrence. By induction on d and substituting (2.2) in (2.1), we obtain -d-k
k=o
^ ^ L /=o ^
d d-k
^J
k=o i=o d
i
,=0^=0
\ /
' / \ \ / ' \
W
W
k^O
This completes the proof of the theorem.
D
For arrangements A(r) of a set F of surfaces satisfying assumptions (Al) and (A2), obtaining a sharp bound on f(F), the combinatorial complexity of A(F), is not easy. If
58
P.K. Agarwal and M. Sharir
the surface patches are in general position, in the sense defined above, it is obvious that f(r) = 0(n^). However, it is not easy to argue that the arrangements have maximum complexity when the surface patches are in general position (this is due to the complicated algebraic structures that can arise in degenerate settings). Heintz et al. [229] proved that fin = {nb)^^'^\ A lower bound of Q((nb/dY) is not difficult to prove. Warren [353] had proved that the number of J-dimensional cells in an arrangement of n hypersurfaces, each of degree < b, in R^ is 0((nb/d)^). This bound also follows from the results by Milnor [282], Petrovskii and Olemik [303], and Thom [345]. Using a perturbation argument. Pollack and Roy [305] generalized Warren's result and proved that the number of cells of all dimensions in an arrangement of « hypersurfaces is (0(nb)/d)^. An easy consequence of their result is the following theorem. THEOREM 2.2. Let F be a set of n surface patches in M^ satisfying Assumptions (Al) and (A2). Then
fin
-m'-
A recent result by Basu et al. [68] can be used to extend the above theorem as follows. Let U be a /^-dimensional algebraic variety of degree at most b inW^. Then the number of cells in the subdivision of E induced by F is at most 0((n/k)^b^). Improved bounds on the complexity of the arrangement can be proved in some special cases. For example, if F is a set of n (d — l)-simplices in M^' that form the boundaries of/: convex polytopes, then f(F) = 0(n^'^^^^k^'^^^'^) [45]. See [131] for improved bounds in a few other cases. A concept closely related to the combinatorial complexity of arrangements is the number of realizable sign sequences of a family of polynomials. Let Q = {Q\, •", Qn) be a set of J-variate polynomials as defined above, and let F be the family of the zero-sets of the polynomials in Q. We can define a, (x), for a point x e W^, as follows. ^/(x)=
r-l, 0,
G/(x)<0, G,(x) = 0,
l+l,
Qi(x)>0.
Since
3. Lower envelopes Definitions and preliminary results. In Chapter 1 we reviewed lower envelopes of arcs in the plane and showed the relationship between such envelopes and Davenport-Schinzel sequences, which eventually led to the derivation of tight or almost tight bounds on the
Arrangements
and their applications
59
Fig. 2. Lower envelope of triangles in M^, as viewed from below.
complexity of these structures. In this section we study lower envelopes of surface patches in higher dimensions. Let F = {yi,..., y^} be a collection of surface patches in M.^ satisfying Assumptions (A1)-(A3). If we regard each surface patch as the graph of a partially defined function, the lower envelope of F, denoted L{r) (or L for brevity), is defined as the graph of the partially defined function Lr{^)=
min y/(x),
XGM"^"^;
Yi (x) is set to +00 if X ^ ]/•*. The upper envelope U(r) of F is defined as the graph of the partially defined function Ur(x)=
max y/(x),
xeW^~^;
Yi (x) is set to —00 if X ^ }/•*. We can extend the definitions of lower and upper envelopes even if F satisfies only (Al) and (A2). We can decompose each Yi into 0(1) connected patches, each of which is monotone in x i , . . . , xj_i directions and satisfies (Al) and (A2). Let F' denote the resulting set of surface patches. We define L(F) = L{F') and U{F) = U(F^). L(F) induces a partition of W^" ^ into maximal connected ((d~ 1)-dimensional) regions so that L(F) is attained by a fixed (possibly empty) subset of F over the interior of each such region. The boundary of such a region consists of points at which L(F) is attained by at least two of the surface patches or by the relative boundary of at least one surface. Let A4(F) denote this subdivision of R^~^, which we call the minimization diagram for the collection F. A face of A4(F) is a maximal connected region over which L{F) is attained by the same set of functions and/or relative boundaries of function graphs in F. Note that if a face / e A4(F) lies on the boundary of the domain of a surface in F, then / may not correspond to any face of L(F). However, if / lies in the relative interior of the domains of all the relevant surface patches, / is the projection of a face / of L(F). The combinatorial complexity of L(F), denoted K(F), is the number of faces of all dimensions in M(F). For an infinite family G of surface patches satisfying Assumptions (A1)-(A2), we define K(n,d,G) = max/c(/"), where the maximum is taken over all subsets /" of G of size n. If
60
RK. Agarwal and M. Sharir
G is the set of all surface patches satisfying (A1)-(A2) or if G is obvious from the context, we will simply write K{n,d). The maximization diagram is defined as the subdivision of ]^j-i induced, in the same manner, by the upper envelope U{r) of F. As discussed in Chapter 1, the complexity of the lower envelope of n arcs in the plane, each pair of which intersects in at most s points, is at most Av+2(«), the maximum length of an {n, 5)-Davenport-Schinzel sequence (see also [330]). Extending to higher dimensions, it was conjectured that the complexity of the lower envelopes of a family of n surface patches satisfying (A1)-(A2) is 0(n^~^X^(n)) for a constant ^ > 0. If T is a set of n hyperplanes in R^, then the Upper Bound Theorem implies that the complexity of L(F) is 6)(nL^/^J) [362]. Let A be the set of all {d - l)-simphces in R"^. Extending the lowerbound construction by Wiemik and Sharir [357] to higher dimensions, one can prove that K(n,d, A) = Q{n^~^a{n)). This suggests we cannot hope to aim for an o(«^~^) bound on K{n,d) for general surface patches. At the end of this section we will discuss some cases in which better bounds on /<:(«, d) can be proved. Using a divide-and-conquer approach, Pach and Sharir [295] proved that, for a set F of n simplices in R^, the number of {d — 1)-dimensional faces in M{F) is 0{n^~^a{n)). Roughly speaking, they divide F into subsets F\, F2, each of size at most fn/l], and bound the number of (d — 1)-dimensional faces of M(F\), A4(F2) recursively. They prove that thenumberof(J-l)-dimensionalfacesinX(r)is|X(ri)H-|A^(r2)|+0(n^~iQf(n)), thereby obtaining the claimed bound. Edelsbrunner [143] extended their result to give the same asymptotic bound for the number of faces of all dimensions. Simpler proofs for this bound were proposed by Sharir and Agarwal [330] and Tagansky [342]. Roughly speaking, both proofs proceed by induction on d, and they bound the change in the complexity of the minimization diagram as a simplex is inserted into F. The main complexity bound. All the aforementioned proofs rely crucially on the fact that if r is a set of surface patches in general position, then any triple of surface patches intersect in at most one point. These proofs do not extend to the case in which a tripe intersects in two or more points. Halperin and Sharir [218] proved a near-quadratic bound on /c(«, 3) for the case when s ^2. Sharir [328] extended their approach to higher values of s and d. Their results are stated in the following theorem. THEOREM 3.1 (Halperin and Sharir [218], Sharir [328]). Let F be a set of n surface patches in W^ satisfying Assumptions (A1)-(A2). Then K(n,d) = 0(n^~^'^^), for any 6 > 0. The constant ofproportionality depends on 6,d,b (and s). PROOF. We will sketch the proof for a set of bivariate surface patches in R^ satisfying Assumptions (A1)-(A5) with i* = 2, i.e., a triple of surface patches intersect in at most two points. For a pair of surface patches y, ,yj e F, let Pij denote the intersection arc yi 0 yj. If Pij is not xi -monotone, we decompose it at its xi -extremal points; each intersection arc is thereby decomposed into 0(1) pieces. If any of these points appears on the lower envelope, we regard it as a vertex on the envelope and its projection as a vertex on the minimization diagram. Since F is in general position, it suffices to bound the number of vertices in M(F). Indeed, a higher-dimensional face / of Ai(F) must be incident to a vertex v of A4(F),
Arrangements
and their
applications
61
Fig. 3. Vertical cylinder Ce and the vertical cross-section Fe of F.
and we can charge / to f. By the general-position assumption, each vertex is charged only a constant number of times. For a subset R c. r, let 0*(/^) denote the number of vertices in M(R); set (/>*(r) = max0*(/?), where the maximum is taken over all subsets of F of size r. We call a vertex of M. (F) a boundary vertex if it lies on the boundary 9 }/•* of the domain of a surface yt; otherwise, we call it an inner vertex. The number of boundary vertices is 0(nkg (n)), where ^ is a constant depending on b, the maximum degree of surface patches and their boundaries. Indeed, let Q be the vertical cylinder erected on an edge e of the boundary 9}/.*, i.e., Ce = e xR. Define Fe = {y CiCe \y ^ F\ {]//}}, which is a collection of 0(n) arcs; see Figure 3. Each arc in Fe satisfies Assumptions (A1)-(A3) (with d = 2, and with larger, but still constant, parameters b and s). It is easily seen that a boundary vertex of A^(/") appearing on ^ is a vertex of M(Fe). If the arcs in Fe intersect in at most q — 2 points, 0(Xq (n)) boundary vertices lie on e. Summing over all 0(n) edges of domain boundaries of /", we obtain the desired bound on the number of boundary vertices. We call an inner vertex regular if it is not an xi-extremal vertex of any of the three intersection curves. The number of irregular vertices is obviously O(n^). For a subset R '^ F, let 0 ( ^ ) denote the number of regular (inner) vertices in M(R), and let 0(r) = max|/?|=r 0(^)- The above discussion implies that
(t>Hn^(p(n^O{nkg(n)). Next, we derive a recurrence for 0 ( F ) , which will solve to 0(n^^^). Fix a regular vertex V of J\4(F). Let V be the corresponding vertex of L(F) (since v is an inner vertex, v is well defined). Suppose v is one of the two intersection points of three surface patches, say, yi, ]/2, K3. Assume, without loss of generality, that if \yi Ci y2 H y^\ = 2, then the xicoordinate of the other intersection point of yi,y2, and ys is larger than that of v. Since i) is a regular vertex, one of the three pairwise-intersection curves yS/j, say fin, lies above L(F) in the halfspace x\ < X](v) in a sufficiently small neighborhood of v. We mark on
62
P.K. Agarwal and M. Sharir
P\2 the intersection points of ^12 with other surface patches of F and the points that he above the boundaries of other surface patches in F. We fix a parameter t = t(e) and follow fin in the (—j^i)-direction, starting from 0, until one of the following three events occurs:^ (CI) wereachtheleftendpointof ^12; (C2) P\2 appears on L(F); or (C3) we crossed t marked points on )^i2. We call V a vertex of type (C/), for f = 1, 2, 3, if we first reach an event of type (Ci). If (CI) occurs, we charge v to the left endpoint of yS 12. Since each endpoint is charged at most twice, the total number of regular vertices of type (CI) is 0(n^). If (C2) occurs, then we must have passed above the boundary of 5/3 while following P\2 because ^^12 hes strictly above ya in the halfspace x\ < x\(v). Let w be the marked point on ^612 lying above dy^ that we have visited. We charge i; to u;. Suppose w lies above an edge e of dy^. We can define Ce and Fe as above; then if is a vertex of A(Fe). Since (C2) occurred before (C3), at most t marked points lie on )6i2 between v and w, which implies that less than t arcs of Fe lie below w. As shown in [326], the number of vertices of A(Fe) that he above at most t arcs is 0(tXg (n)). Summing over all edges of domain boundaries, the number of marked points on intersection arcs to which a vertex of type (C2) is charged is 0{ntXq{n)). Since each marked point is charged 0(1) times, the number of type (C2) vertices is 0(ntXq (n)). Finally, if (C3) occurs, then we charge l/t to each marked point on ^12 that we visited. Each marked point will be charged only 0 ( 1 / 0 units, and each such marked point lies above at most t surface patches of F. Theorem 6.1 in Section 6 implies that the number of such marked points, summed over all intersection curves, is O(rV*(«/0)- The total number of vertices of type (C3) is thus
0(1/0 • O(rV*(n/0) = 0{t^Hn/t) + nkc^n)). Hence, we obtain the following recurrence for 0(«): 0(^) ^ Af^0( - I -\- BtnXqin), where A and B are constants (depending on b). The solution of the above recurrence is (t>(n) =
0{tn^^^''^'^kq(n)).
If t = t(e) is chosen sufficiently large, then (pin) = 0(n^~^^). This proves the theorem for d = 3,s = 2. For 5 > 2, Sharir [326] introduces the notion of index of a regular vertex. The index of a vertex v e f^i^^ yi is the number of points of H/^i Yi whose x\ coordinates are less than that of i;. For 0 < 7 < 5-, let (j)^J\F) be the number of regular vertices in L(F) of index j . Then0(r) = j:}i;)0O)(r). ^ If the x\ -coordinate of the other intersection point of yi,y2, and 73 were smaller than that of O, we would have traced ^12 in the (+jci)-direction.
Arrangements and their applications
63
Modifying the above argument slightly, Sharir derived a system of recurrences for the quantities 0^^^(r), for j < s. There are three main differences. First, the tracing of ^\2 is always done in the decreasing X]-direction. Second, the value of the parameter t now depends on j and is denoted by tj. Third, there is one more stopping criterion: (C4) P\2 intersects yy, let z be the (first) intersection point. Using the fact that the index of z is < j — 1 and that at most tj surface patches lie below z, Sharir derives the following recurrence for (p^J^n) = msLX\r\=n 0^^H^)0 O - ) ( ^ ) ^ A , - . > * ( j ^ ) + 5 , ( f | 0 O - - i ) ^ ^— I
-\-ntjXq(n)\.
By expanding this system of recurrences and by choosing the values of tj carefully, Sharir proved that the solution of this system satisfies 0*(n) = O(n2+"). The theorem is proved in higher dimensions by induction on d, using a similar charging scheme. See the original paper by Sharir for details. D OPEN PROBLEM 1. Let F be a set ofn surface patches in M^ satisfying Assumptions (Al) and (A2). Is K(n,d) = 0{n^~^Xq (n)), where q is a constant depending on d and bl
Bounds in special cases. As noted above, sharper bounds are known on the complexity of lower envelopes in some special cases; see [319,330]. For example, if F is a set of pseudo-planes in M^, i.e., each triple of surfaces intersects in at most one point and the intersection of a pair of surfaces in F is a single (closed or unbounded) Jordan curve, then K{r) = 0(n). On the other hand, if F is a set of pseudo-spheres, i.e., each triple intersects in at most two points and the intersection curve of any pair is a single Jordan curve, then K(r) = 0(n^). If r is a. family of hypersurfaces in R*^, a sharper bound on K(r) can be proved using the so-called linearization technique. Here is a sketch of this technique. Let F = {yi,..., y^^} be a collection of hypersurfaces of degree at most b, i.e., each yi is the zero set of a J-variate polynomial Qt of degree at most b. Let Q = { Q i , . . . , 2«}. We say that F admits a linearization of dimension k if, for some p > 0, there exists a (d + /?)-variate polynomial g(x, a) = V^o(a) + V^i(a)^i(x) + V^2(a)^2(x) +
h i/k-\(sL)(pk-i(x) + ^^^(x),
forxG R^,a e E^, so that, for each 1 < / < n, we have Qi(x) = g(x,ai) for some a/ e W. Here each V^y(a), for 0 ^ j ^ /:, is a /7-variate polynomial, and each (pj(x), for 1 < j < ^ + 1, is a J-variate polynomial. It is easily seen that such a polynomial representation always exists for p < d^'^^ — let the ^'s be the monomials that appear in at least one of the polynomials of Q, and let x/fj (a) = aj (where we think of a as the vector of coefficients of the monomials). We define a transform ^ : M*^ ^- M^ that maps each point in M.^ to the point ^(x) = {(pi(x), (p2(x),..., (pk(x));
64
RK. Agarwal and M. Sharir
the image (p(Er) is a J-dimensional algebraic surface 17 in R'^. For each function Qt (x) = g(x, a/), we define a A:-variate Hnear function hi (y) = iAo(a/) + TAI (a/) ji + • • • + i/^jt-i (aOy^^-i + jk. Let / / = {/i/ = 0 I 1 ^ / ^ n} be a set of n hyperplanes in R^. Let § be a vertex of L{r). If § is incident to y i , . . . , y j , then Q\{^) = ••• = Qd{^) = 0 and 2 J + I ( § ) O ^ J + I O , . . . , Qn(^)crnO, where cr, G {>, <}. By construction, Q/C?) = hi((p(^)). Let 2 G R [ x i , . . . , xj] be a J-variate polynomial. If we regard Q as a univariate polynomial in Xd and the coefficient of the leading term in 2 is a positive constant, then we call Q a positive polynomial. If all 2/'s are positive, then, by the definition of lower envelopes, 2/(§) < 0 for every / > d. Hence, h\{(p{^)) = • • -hd((p{^)) = 0 and hd-^\((pi^)) < 0 , . . . , hn((p(^)) < 0. That is, (p(^) is a vertex of L(H) Pi U. Since each hi is a hyperplane in R^ and the degree of E depends only on d and b, the Upper Bound Theorem for convex polyhedra (see McMullen and Shephard [273] and Ziegler [362]) implies that the number of vertices in Z" Pi L(H) is 0(n^^^^^). Hence, we can conclude the following. 3.2. Let r be a collection of n hypersurfaces in W^, of constant maximum degree b. If F admits a linearization of dimension k and each surface F is the zero set of a positive polynomial, then K(F) = 0(n^^^^^), where the constant of proportionality depends on k,d, and b.
THEOREM
We illustrate the linearization technique by giving an example. A sphere in R^ with center (a\,.. .,ad) and radius ad-^\ can be regarded as the zero set of the polynomial g(x, a), where g ( x , « l , . . . , a j + i ) = [a^-\
h « J - a J ^ i ] -[2a\ -x\] - [2a2'X2]
- [2ad ' Xd]-\-[x^-^
hxj].
Thus, setting d
V^o(a) = ^af
-
flj_^,,
if] (a) =
-2a\,...,
i=\
V^j(a) = -2ad,
V^j+i(a) = 1, d
(p\(x)=x\,...,
(pd(x) = Xd,
(pd+\ (x) = ^ ^2 ; /=1
we obtain a linearization of dimension d -\-\. We can therefore conclude the following. COROLLARY
3.3. Let F be a set ofn spheres in R^. Then K(F) = Oin^"^^^^).
Arrangements
and their applications
65
Fig. 4. S{r, r')\ solid arcs are in F, and dashed arcs are in F'.
The overlay of minimization diagrams. Motivated by several applications, researchers have studied the complexity of the overlay of two minimization diagrams. That is, let F and r' be two families of surface patches satisfying Assumptions (A1)-(A2); set n = IrI + I r^I. The overlay of M (F) and M (F^) is the decomposition of M^~^ into maximal connected regions so that each region lies within afixedpair of faces of A4 (F) and M. (F^). It is conjectured that the complexity of the overlay of the two diagrams is also close to 0(n^~^). Although this conjecture is obviously true for the minimization diagrams of arcs in the plane, it is not intuitive even in M^ because the overlay of two planar maps with m edges each may have Q{m^) vertices. Edelsbrunner et al. [151] proved an 0{n^~^a{n)) upper bound if F and F' are sets of a total of n simplices in W^. Agarwal et al. [21] proved that the overlay of two minimization diagrams, defined for a total of n surface patches, in R^ has 0{n^^^) complexity, for any ^ > 0. Note that in R^, each vertex of the overlay is a vertex of A^ (F), a vertex of M (/"O. or an intersection point of an edge of M{F) with an edge of M{F'). The proof in [21] establishes an upper bound on the number of intersection points by generalizing the proof technique of Theorem 3.1. OPEN PROBLEM
2. What is the complexity of the overlay of two minimization diagrams
inR^l The following problem is closely related to the overlay of minimization diagrams. Let F, F' be two sets of surface patches in R^ satisfying (A1)-(A2). Regarding each surface as the graph of a partially defined function, define 5 ( r , r ' ) = {x I Lrixi,...,
Xd-i) '^xd'^Urixi,...,
xj_i)},
i.e., S(F, F O is the set of points lying above all surface patches of F^ and below all surface patches of F; see Figure 4. It can be shown that the combinatorial complexity of S(F, F') is proportional to the complexity of the overlay of the minimization diagram of F and the maximization diagram of /"^ The result of Agarwal et al. [21] implies that S{F, F') = 0(n^+^) in R^. In general, the complexity of the overlay of the minimization diagram of F and the maximization diagram of F' may be larger than that of S{F, F'). As an application, which also illustrates this discrepancy, consider the following example. Let 5 = {5'i,..., 5^} be a set of n spheres in R^. A line in R^ can be parameterized by four real
66
P.K. Agarwal and M. Sharir
parameters. We can therefore define the set of fines tangent to a sphere St and lying above (resp. below) St as a surface patch // (resp. y'.) in R^. Define F = {y/ | 1 ^ / < n} and r^ = {)// I 1 ^ / ^ n}. If the lines are parameterized carefully, Agarwal et al. [10] showed that S{r, r') is the set of lines intersecting all the spheres of S and that the combinatorial complexity of <S(F, F') is 0(n^+^), for any ^ > 0.
4. Single cells Lower envelopes are closely related to other substructures in arrangements, notably cells and zones. The lower envelope is a portion of the boundary of the bottommost cell of the arrangement, though the worst-case complexity of L{r) can be larger than that of the bottommost cell of A{r). In two dimensions, it was shown in [206] that the complexity of a single face in an arrangement of n arcs, each pair of which intersect in at most s points, is 0(Xs+2(w))» and so has the same asymptotic bound as the complexity of the lower envelope of such a collection of arcs. This suggest that the complexity of a single cell in an arrangement of n surface patches in E^ satisfying the Assumptions (Al) and (A2) is close to 0{n^~^). The Upper Bound Theorem impfies that the complexity of a single cell in arrangement of hyperplanes in R^ is 0{n^^f^^), and the linearization technique described in Section 3 implies that the complexity of a single cell in an arrangement of n spheres is 0(«^^/^^). However, the lower-bound construction for lower envelopes implies a lower bound of Q (n^~ ^«(«)) for the complexity of a single cell for arrangements of simplices.
Fig. 5. A single cell in an arrangement of segments.
Pach and Sharir [295] were the first to prove a subcubic upper bound on the complexity of a single cell in arrangements of triangles in R-^. This bound was improved by Aronov and Sharir [52] to 0(n^/^), and subsequendy to 0(n^ log n) [54]. The latter approach extends to higher dimensions; that is, the complexity of a single cell in an arrangement ofn (d — 1)simplices in R^ is 0(n^~^ log«). A simpler proof was given by Tagansky [342]. These approaches, however, do not extend to nonlinear surfaces even in R^. Halperin [211,212] proved near-quadratic bounds on the complexity of a single cell in arrangement of certain classes of n bivariate surface patches, which arise in motionplanning applications. Halperin and Sharir [221] proved a near-quadratic bound on the
Arrangements and their applications
67
complexity of a single cell in an arrangement of the contact surfaces that arise in a rigid motion of a simple polygon amid polygonal obstacles in the plane, i.e., the surfaces that represent the placements of the polygon at which it touches one of the obstacles. The proof borrows ideas from the proof of Theorem 3.1. A near-optimal bound on the complexity of a single cell in the arrangement of an arbitrary collection of surface patches in R-^ satisfying Assumptions (Al) and (A2) was finally proved by Halperin and Sharir [219]: THEOREM 4.1 (Halperin and Sharir [219]). Let F be a set of surface patches in E^ satisfying Assumptions (Al) and (A2). For any £ > 0, the complexity of a single cell in A(F) IS 0(n^^')Jor any s > 0, where the constant of proportionality depends on s and on the maximum degree of the surface patches and of their boundaries.
The proof proceeds along the same lines as the proof of Theorem 3.1. However, they establish the following two additional results to "bootstrap" the recurrences that the proof derives. Let C be the cell of A(F) whose complexity we want to bound. (a) There are only O(n^) vertices v of the cell C that are locally x-extreme (that is, there is a neighborhood N of v and a connected component C^ of the intersection of A^ with the interior of C, such that v lies to the left (in the x-direction) of all points of C\ or v lies to the right of all these points). (b) There are only 0(n^+^) vertices on popular faces of C, that is, 2-faces / for which C lies locally near / on both sides of / . Property (a) is proved by an appropriate decomposition of C into 0(n^) subcells, in the style of a Morse decomposition of C (see [281]), so that each subcell has at most two points that are locally x-extreme in C. Property (b) is proved by applying the machinery of the proof of Theorem 3.1, where the quantity to be analyzed is the number of vertices of popular faces of C, rather than all inner vertices. Once these two results are available, the proof of Theorem 3.1 can be carried through, with appropriate modifications, to yield a recurrence for the number of vertices of C, whose solution is 0(n^+^). We refer the reader to the original paper for more details. To extend the above proof to higher dimension appropriate extensions of both properties (a) and (b) have to be established. The extension of (a) requires topological considerations related to Morse theory, and the extension of (b) requires an inductive argument, in which bounds on the number of vertices of popular faces of all dimensions need to be derived, using induction on the dimension of the faces. Recently, Basu [67] showed that the topological complexity, i.e., the sum of the Betti numbers, of a single cell in an arrangement of n surface patches satisfying Assumptions (A1)-(A2) is 0(n^~^). Using this result and the ideas in [219], he showed that the combinatorial complexity of a set of n surface patches in W^ satisfying Assumptions (Al) and (A2) is 0(n^~^~^^). He also showed that under certain geometric assumptions on surface patches the combinatorial complexity of a single cell is alsoO(n^-i). The linearization technique in the previous section can be extended to bound the complexity of a cell as well, namely, one can prove the following.
68
RK. Agarwal and M. Sharir
THEOREM 4.2. Let r be a collection of n hypersurfaces in M^, of constant maximum degree b. If F admits a linearization of dimension k, then the combinatorial complexity of a cell ofA(r) is 0(n^^^'^^), where the constant ofproportionality depends on k, d, and b.
5. Zones Let F be a set of n surfaces in R^. The zone of a variety a (not belonging to F), denoted as zone(a; T), is defined to be the set of J-dimensional cells in A(r) that intersect a. The complexity of zone(a; F) is defined to be the sum of complexities of the cells of A(F) that belong to zone(a; F), where the complexity of a cell in A(F) is the number of faces of all dimensions that are contained in the closure of the cell. The complexity of a zone was first studied by Edelsbrunner et al. [157]; see also [110]. The "classical" zone theorem [142,159] asserts that the maximum complexity of the zone of a hyperplane in an arrangement of n hyperplanes in W^ is 0(n^~^), where the constant of proportionality depends on d. The original proof given by Edelsbrunner et al. [157] had some technical problems. A correct, and simpler, proof was given by Edelsbrunner et al. [159]. Their technique is actually quite general and can also be applied to obtain several other interesting combinatorial bounds involving arrangements. For example, the proof by Aronov and Sharir for the complexity of a single cell in arrangements of simphces [54] used a similar approach. Other results based on this technique can be found in [4,50,51]. We therefore describe the technique, as applied in the proof of the zone theorem: THEOREM 5.1 (Edelsbrunner, Seidel and Sharir [159]). The maximum complexity of the zone of a hyperplane in an arrangement of n hyperplanes
This result is easy to prove for d = 2; see Chapter 1. For a set F of n hyperplanes in R*^ and another hyperplane b, let r^ (b; F) denote the total number of ^-faces contained on the boundary of cells in zone(b; F); each such /:-face is counted once for each cell that it bounds. Let Ti^(n,d) = maxr^(b\ F), where the maximum is taken over all hyperplanes b and all sets F of n hyperplanes in R^. The maximum complexity of zone(b; F) is at most Ylk=o ^^ (^' ^)- Thus the following lemma immediately implies the upper bound in Theorem 5.1. LEMMA
5.2. For each d and O^k
^d,
Tk(n,d) = 0{n'^-^), where the constants ofproportionality depend on d and k. PROOF. We use induction on d. As just noted, the claim holds for d = 2. Assume that the claim holds for all
Arrangements
and their applications
Fig. 6. Inserting y into zone(h; r
69
\{y}).
hyperplane. Without loss of generality, we can assume that the hyperplanes in T U {b} are in general position. We define a k-border to be a pair (/, C), where / is a ^-face incident to a J-dimensional cell C of A{r). Thus Xk{b\ F) is the total number of ^-borders (/, C) for which C e zone(b; F). We pick a hyperplane y e F and count the number of all ^-borders (/, C) in zone{b\ F) such that / is not contained in y. If we remove y from F, then any such ^-border is contained in a ^-border (/', C) of zone (b; F \ {y}) (i.e., / c / ' and C c C'). Our strategy is thus to consider the collection of /^-borders in zone(b; F\{y}) and to estimate the increase in the number of /^-borders as we add y back to F. Observe that we do not count /:-borders that lie in y. Let F\y = {y^Dy \ y^ e F\{y}}; the set F\y forms a (J — 1)-dimensionalarrangement of n — 1 hyperplanes within y. Let (/, C) be a /:-border of zone(b; F \ {y}), and consider what happens to it when we reinsert y. The following cases may occur: y n C = 0: In this case the /:-border (/, C) gives rise to exactly one /:-border in zone(b; F), namely itself. y nC j^0, y 0 f = 0: Let y+ be the open halfspace bounded by y that contains / , and let C~^ = C Pi y+. If C+ intersects b, then (/, C) gives rise to one ^-border in zone(b; F), namely (/, C+) (this is the case for the edge / = ^ in Figure 6); otherwise it gives rise to no ^-border in zone(b; F). y f] f ^id: Let y + and y ~ be the two open halfspaces bounded by y and let C+ = C fl y+ and C~ = C n y ~ . If the closure of only one of C+ and C~ intersects b, say, C+, then (/, C) gives rise to only one ^-border in zone(b; F), namely ( / H y+, C"^) (this is the case for the edge f = e^ in Figure 6). If both C+ and C~ intersect b, then (/, C) gives rise to two ^-borders in zone(b; F), namely ( / Pi y"^, C+) and (fC^y~,C~) (this is the case for the edge / = e'^ in Figure 6). In this case, however, we can charge uniquely this increase in the number of ^-borders to ( / D y, C Pi y), which, as easily seen, is a (^ — l)-borderin zoneib fl y; F\y).
70
RK. Agarwal and M. Sharir
If we repeat this process over all ^-borders of zone(b; r\{y}),we obtain that the total number of /:-borders (/, C) in zone(b; F), for / not contained in y, is at most rk{b;r\{y})-\-rk-iibny;r\y)
< rk(n - l,d)-\-Tk-i(n =
- l,d - I)
Tk(n-l,d)-\-0{n'^-^),
where the last inequality follows from the induction hypothesis. Repeating this analysis for all hyperplanes y e F, summing up the resulting bounds, and observing that each A:-border of zone(b; F) is counted exactly n — d -\-k times, we obtain Tk(n.d)^
5 - — ( r ^ ( n - l , J ) + 0(n^-2)).
Edelsbrunner et al. [159] showed that this recurrence solves to 0{n^~^) for k^2. Using Euler's formula for cell complexes, one can show that r^(n, d) — 0(/i^~') for /: = 0,1 as well. This completes the proof of the theorem. For the lower bound, it is easily checked that the complexity of the zone of a hyperplane b in an arrangement of n hyperplanes in M^ in general position is Q{YI^~^). In fact, the complexity of the cross-section of the arrangement within b is already Q (n^~ ^). D The above technique can be extended to bound the quantity J^c^Ain 1^1^' where F is a set of hyperplanes, C ranges over all J-dimensional cells of the arrangement, and \C\ denotes the number of lower-dimensional faces incident to C. For J ^ 3, an easy application of the zone theorem (see Edelsbrunner [142]) implies that ^ ^ |C|^ = 0(n^); this bound is obviously tight if the lines or planes of F are in general position. For d >3, the same application of the zone theorem yields only Ylc l^l/c = 0(«^), where fc is the number of hyperplanes of F meeting the boundary of C. Using the same induction scheme as in the proof of Theorem 5.1, Aronov et al. [50] showed that
J2
|C|2 = 0(n^logLfJ-^).
CeAiF)
It is believed that the right bound is 0(n^). Note that such a result does not hold for arrangements of simplices or of surfaces because the complexity of single cell can be Q{n^~^). The zone theorem for hyperplane arrangements can be extended as follows. THEOREM 5.3 (Aronov, Pellegrini and Sharir [51]). Let F be a set ofn hyperplanes in W^. Let a be a p-dimensional algebraic variety of some fixed degree, or the relative boundary of any convex set with affine dimension /? + 1, for 0 ^ p ^ d. The complexity of the Zone(a; F) is 0(n^^^~^^^^^^ log^n), where ^ = d -\- p (mod 2), and the bound is almost tight (up to the logarithmic factor) in the worst case.
In particular, for p = J — 1, the complexity of the zone is 0(n^~^ logn), which is almost the same as the complexity of the zone of a hyperplane in such an arrangement.
Arrangements and their applications
71
The proof proceeds along the same lines of the inductive proof of Theorem 5.1. However, the removal and re-insertion of a hyperplane y e F splits a face / of zone (a; F \ {y}) into two subfaces, both lying in zone (a; F), the charging scheme used in the proof of Theorem 5.1 becomes inadequate, because f C\ y need not belong to the zone of cr Pi y in the {d — 1)-dimensional cross-section of A{F) along y. What is true, however, is that / n y is a face incident to a popular facet of zone {a \ F) along y, that is, a facet g ^ y whose two incident cells belong to the zone. Thus the induction proceeds not by decreasing the dimension of the arrangement (as was done in the proof of Theorem 5.1), but by reapplying the same machinery to bound the number of vertices of popular facets of the original zone (a; F). This in turn requires similar bounds on the number of vertices of lower-dimensional popular faces. We refer the reader to Aronov et al. [51] for more details. In general, the zone of a surface in an arrangement of n surfaces in W^ can be transformed to a single cell in another arrangement of 0(n) surface patches in M^. For example. Let 7^ be a set of n (d— l)-simplices in R^, and let cr be a hyperplane. We split each y e F into two polyhedra at the intersection of A and a (if the intersection is nonempty), push these two polyhedra slightly away from each other, and, if necessary, retriangulate each polyhedron into a constant number of simplices. In this manner, we obtain a collection F^ of 0(n) simplices, and all cells of the zone of a in A(F) now fuse into a single cell of A(F^). Moreover, by the general position assumption, the complexity of the zone of cr in F is easily seen to be dominated by the complexity of the new single cell of A(F^). (The same technique has been used earlier in [150], to obtain a near-linear bound on the complexity of the zone of an arc in a two-dimensional arrangement of arcs.) Hence, the following theorem is an easy consequence of the result by Aronov and Sharir [54]. 5.4. The complexity of the zone of a hyperplane in an arrangement of n (d — \)-simplices in R^ is 0(n^~^ logn).
THEOREM
Using a similar argument one can prove the following. THEOREM 5.5 (Basu [67]; Halperin and Sharir [219]). Let F be a collection ofn surface patches in M.^, satisfying Assumptions (Al) and (A2). The combinatorial complexity of the zone in A{F) of an algebraic surface a of some fixed degree is 0{n^~^^^), for any £ > 0, where the constant of proportionality depends on e, on the dimension on the maximum degree of the given surfaces and their boundaries, and on the degree of a.
Once the bound on the complexity of a single cell in an arrangement of general algebraic surfaces is extended to higher dimensions, it should immediately yield, using the same machinery, to a similar bound for the zone of a surface in such an arrangement.
6. Levels The level of a point p eW^ m an arrangement A{F) of a set F of surface patches satisfying (A1)-(A3) is the number of surfaces of F lying vertically below p. For 0 < A: < n, we define k-level (resp. <^-level), denoted by Ak(F) (resp. A^k(J^)), to be the closure of all
72
RK. Agarwal and M. Sharir
(i)
(ii)
Fig. 7. The 2-level in (i) an arrangement of lines, and (ii) in an arrangement of segments.
points on the surfaces of F whose level is k (resp. at most k). A face of ^ ^ ( r ) or A^ki^) is a maximal connected portion of a face of A(r) consisting of points having a fixed subset of surfaces lying below them. For totally defined functions, any such face coincides with a face of A(r). Note that Ao(F) is the same as L(r). If the surfaces in F are graphs of totally defined functions, then the level of all points on a face of A(F) is the same and AkiF) is a connected monotone surface; otherwise Ak(F) may have discontinuities. See Figure 7 for an example of levels in arrangements of lines and segments. Levels in hyperplane arrangements in R^ are closely related to k-sets of point sets in M^. Let 5* be a set of n points in R^, and let 5* be the set of hyperplanes dual to 5. A subset A c 5 is called a k-set (resp. ^k-set) if \A\ = k (resp. \A\ ^ k) and A can be strictly separated from S \ A by a. hyperplane h. The level of point /i*, dual to /i, in AiS"^) is k or n — k. The k-set problem is to bound the maximum number of ^-sets of S (in terms of k and n). It is easy to see that the maximum number of k-seis in a set of n points in R^ is bounded by the maximum number of facets in the /:-level and the (n — /:)-level in an arrangement of n hyperplanes in R^. Let ifkiF) (resp. V^^^(^)) be the total number of faces in Ak{F) (resp. A^ki^))- Let G be a (possibly infinite) family of surfaces in R^' satisfying Assumptions (A1)-(A3). We define -^kin, d, G) = msix\l/k(F) and ^^k(n, d, G) = maxi/^^^(r), where the maximum in both cases is taken over all subsets T c G of size n. If G is not important or follows from the context, we will omit the argument G. The following theorem follows from a result by Clarkson and Shor [120]. THEOREM 6.1 (Clarkson and Shor [120]). Let G be an infinite family of surfaces satisfying Assumptions (A1)-(A3). Then for any 0 ^k < n — d,
where /c(n, J, G) is the maximum complexity of the lower envelope ofn surfaces in G. Let r c G be a set of n surface patches satisfying Assumptions (A1)-(A5). For a subset X c r and an integer 0 ^ A: < |X| — J, let Vk(X) denote the set of vertices at PROOF.
Arrangements
and their applications
73
level k in A{r). As is easily seen, ij/^ki^) is proportional to J2j=o \^j(^)\^ which we thus proceed to bound. We bound below only the number of vertices in the first k levels that lie in the interior ofd surface patches; the other types of vertices are easier to analyze, and the same bound applies to them as well. We choose a random subset R ^ F of size r = ln/(k + 1)J and bound the expected number of vertices in Vo(R)- A vertex i; e Vj (F) is in Vo(R) if and only if the d surfaces defining v are in R and none of the j surfaces of F lying below v are chosen in R, so the probability that i; e Vo(R) is {^~i_^ )/(r)- Hence, easy manipulation of binomial coefficients implies that n—d 7=0 k
> y^\Vi(F)r
rn—j—d\ Vr; /n~j-d\
"""^
Thus k
J2\yj(n\^c(k+lfE[\Vo(R)\l
(6.1)
for some constant c. Since every vertex in Vo(R) lies on the lower envelope of R, the assertion now follows from the definition of /c. D 6.2. (i) xj/^kin, d) = 0((k + ly-'n"^-^^'). (ii) Let H be the set of all hyperplanes in W^. Then V^
COROLLARY
PROOF. Part (i) follows from Theorems 3.1 and 6.1. Part (ii) follows from the fact that /c(n,J,H) = (9(n^^/^J). n
There is even a tighter upper bound ofkn-\-l on the number of
74
RK. Agarwal and M. Sharir
Fig. 8. A set of 14 points with 14 halving segments, split into 7 convex x-monotone chains.
his argument to prove that yj/k (F) = 0(n\/k-\-1). Since the original proof many different proofs have been proposed for obtaining the same bound on ^//k (F) [8,208]. Goodman and Pollack [191] proved a similar bound on the maximum complexity of the /:-level in an arrangement of pseudo-lines. Erdos et al.'s bound was slightly improved by Pach et al. [298] to o(ny/k-\-1), using a rather complicated argument. Erdos et al. [176] constructed, for any n and 0 ^ k < n, a SQt F of n lines so that irk(F) = Q(n log(^ + 1)); see Edelsbrunner and Welzl for another construction that gives the same lower bound [163]. Klawe et al. [247] constructed a set F of n pseudo-lines so that x/fn/iiF) has n2^^^'^^"^ vertices. Recently, Toth [346] proved the some lower bound on ifn/iiF) for a set of n lines in the plane. A major breakthrough in this direction was recently made by Dey, who obtained the following improvement. 6.3 (Dey [134]). Let F be a set ofn lines in the plane. Then for any O^k irk(F) = 0(n(k + iy^h
THEOREM
Dey's proof is quite simple and elegant. It uses the following result on geometric graphs, which was independently proved by Ajtai et al. [31] and by Leighton [252].^ LEMMA 6.4. Let G be a geometric graph with n vertices and m ^ 4n edges. Then there are Q{m^ /n^) pairs of edges in G whose relative interiors cross. PROOF OF THEOREM 6.3. For simplicity we assume that n is even and prove the bound for k = n/2. We argue in the dual plane, where we have a set S of n points in general position and we wish to establish the asserted bound for the number of halving segments of S, where a halving segment is a straight segment connecting a pair of points u,v e S so that the line passing through u and v has exactly (n/2) — 1 points of S below it. Let H denote the set of halving segments. The segments in H are decomposed into n/2 convex jc-monotone chains as follows. Let wf be an edge of H, with u lying to the right of v. We rotate the line that passes through u ^ A geometric graph G = (V, E) is a. graph drawn in the plane so that its vertices are points and its edges are straight segments connecting pairs of these points. A geometric graph need not be planar.
Arrangements and their applications
75
and V clockwise about v and stop as soon as the line overlaps another halving segment vw incident to f. It is easy to check that w lies to the right of v and that uvw is a right turn. We now rotate about w, and continue in this manner until our line becomes vertical. We apply the same procedure "backwards" by turning the line uv counterclockwise around u and keep iterating until the line becomes vertical. The halving segments that we have encountered during the whole process constitute one convex polygonal chain. By applying this procedure repeatedly, we obtain the desired decomposition of the entire H into convex x-monotone polygonal chains. Using the properties of halving segments proved by Lovasz [258], we can conclude that the segments are partitioned into n/2 convex chains. (These convex chains are in a certain sense dual to the concave chains in the dual line arrangement that were defined by Agarwal et al. [8]; see also [208].) The number of crossing points between two convex chains is bounded by the number of upper common tangents between the same two chains. Any line passing through two points of S is an upper common tangent of at most one pair of chains. Thus there are 0(n^) crossings between the segments in ^ . By Lemma 6.4, any graph with n vertices and crossing number 0(n^) has at most 0(n^^^) edges, so S has at most 0(n^^^) halving segments. A similar, slightly more detailed, argument proves the bound for arbitrary values of ^. n Tamaki and Tokuyama generalized Dey's proof to prove a similar bound on the complexity of the ^-level in arrangements of pseudo-lines [343]. Combining the ideas from an old result of Welzl [355] with Dey's proof technique, one can obtain the following generalization. See also [42] for some other generalizations of Dey's result. COROLLARY 6.5. Let r be a set ofn lines in the plane. Then for any 0^k
0<j<
Y,ftxn = o{n{k^\)"^j^/^). Barany and Steiger proved a linear upper bound on the expected number of /:-sets in a random planar point set [65]; the points are chosen uniformly from a convex region. Edelsbrunner et al. [162] proved that if 5 is a set of points in the plane so that the ratio of the maximum and the minimum distance in S is at most c ^ (a so-called dense set), then the number of ^-sets in S is 0(c-y/n\lrk (c->/n)). Applying Dey's result, the number of /:-sets in a dense point set is 0(n^^^). Recently Alt et al. [38] have proved that if the points in S lie on a constant number of pairwise disjoint convex curves, then the number of ^-sets in S is 0(n). See [118,174,235,236] for more results on planar k-sets and their generalization. The following question is related to the complexity of levels in arrangements of lines: Let F be a set of n lines in the plane. Let FI be an x-monotone polygonal path whose vertices (the points at which 77 bends) are a subset of the vertices of A(r) and whose edges are contained in the lines of P. What is the maximum number of vertices in 77? Matousek [261] proved that there exists a set F of n lines in the plane that contains an X-monotone path with Q(n^^^) vertices. No subquadratic upper bound is known for this problem.
76
RK. Agarwal and M. Sharir Table 1 Upper bounds on A:-levels Objects
Bound
Source
Lines in B? Segments in M^ Planes in M^ Triangles in 'M? Hyperplanes in M^ Parabolas in M^ (Vertical axis)
0(«(Jt +1)^/3) 0{n{k + \)^/^a{n/{k+\))) 0{n{k + \)^^^) 0{r?{k+\)^/'^a{n/{k+\))) 0{n^d/2\^\d/l\-Ed^^ 0(«23/12)
[134] [8,134] [8] [8,236] [352] [344]
Agarwal et al. [8] proved a nontrivial upper bound on the complexity of the ^-level in an arrangement of segments. Combining their argument with that of Dey's, one can prove that the maximum complexity of the k-\t\t\ in a planar arrangement of n segments is 0{n{k -f \y/^a{n/{k + 1))). Very little is known on the complexity of a single level in an arrangement of n arcs in the plane. Recently, Tamaki and Tokuyama [344] proved that the complexity of any level in an arrangement of parabolas, each with a vertical axis, is 0^^23/12^ (Their bound actually applies io pseudo-parabolas, i.e., graphs of continuous, totally defined, univariate functions, each pair of which intersect at most twice.) OPEN PROBLEM 3. (i) What is the maximum complexity of a level in an arrangement of n lines in the planel (ii) What is the maximum complexity of a level in an arrangement of n x-monotone Jordan arcs, each pair of which intersect in at most s points, for some constant s > \1
Barany et al. [64] proved an 0{n^~^) bound on the complexity of the k-\t\t\ in arrangements of n planes in M^, for any k, for some absolute constant y > 0. The bound was improved by Aronov et al. [46] and Eppstein [173] to OC/i^/"^ poly log /i), and then by Dey and Edelsbrunner [135] to 0(«^/^). The best bound known, due to Agarwal et al. [8], is 0{n{k -\- 1)^/-^). They also proved a bound on the complexity of the A:-level for arrangements of triangles in M^. A nontrivial bound on the complexity of the /c-level in an arrangement of n hyperplanes in J > 3 dimensions, of the form 0(n^~^''), for some constant Sd that decreases exponentially with d, was obtained in [36,352]. This has later been slightly improved to 0(n^^^'^^k^^^'^^~^'^) in [8]. Table 1 summarizes the known upper bounds on /:-levels.
7. Many cells and incidences In the previous two sections we bounded the complexity of families of J-dimensional cells in A(r) that satisfied certain conditions (e.g., cells intersected by a surface, the cells of level at most k). We can ask a more general question: What is the complexity of any m distinct cells in AiF)! A single cell in an arrangement of lines in the plane can have n
Arrangements
and their applications
11
Table 2 Complexity of many cells Objects
Complexity
Source
Lines in M^ Segments in M^ Unit circles in M^
0{m^l^n^l^ +n) Q^^2/3^2/3 _|_ ^^^^^^ _^ ^ logm) Oim^^^n^^^a^^^in)+n)
[121] [48] [121]
Circles in M^
Q(^^3/5^4/54Q'(«)/5 _^ ^>,
Arcs in M^ Planes in M^ Hyperplanes in M^, J ^ 4
0(^Xq (n)) 0{m^/^n + n^) 0(m ^/^^^/^ log/^«) ;6 = ( L ^ / 2 J - l ) / 2
^21]
[150] [7] [50]
edges, but can the total complexity of m cells in an arrangement of lines be f2(mn)l This is certainly false for m = Q{n^). We can also formulate the above problem as follows: Let P be a set of m points and F a set of n surfaces in W^ satisfying Assumptions (Al) and (A2). Define C(P, F) to be the set of cells in A(F) that contain at least one point of P. Define /x(P, F) = Y1CGC(P r) 1^1 and fji(m,n,G) = max/x(P, F), where the maximum is taken over all sets P of m points and over all sets F of n surfaces in a given class G. Let L be the set of all lines in the plane. Canham [89] proved that /x(m,fi,L) = 0(m^ + n), from which it easily follows that /x(m, n, L) = 0{m^ -{-n). Although this bound is optimal for m ^ ^ , it is weak for larger values of m. Clarkson et al. [121] proved that iji(m,n,lj) = &(m^^^n^^^ + n). Their technique, based on random sampling, is general and constructive. It has led to several important combinatorial and algorithmic results on arrangements [121,204,205]. For example, following a similar, but considerably more involved, approach, Aronov et al. [48] proved that /x(m, n, E) = 0(m^/^n^/^ + m logn + na(n)), where E is the set of all line segments in the plane. An improved bound can be attained if the number of vertices in the arrangement of segments is small. Hershberger and Snoeyink [232] proved an 0(m^/^n^/-^ + n) upper bound on the complexity of m distinct cells in the arrangements of n segments in the plane where the segments satisfy certain additional conditions. Although Clarkson et al. [121] proved nontrivial bounds on the complexity of m distinct cells in arrangements of circles (see Table 2 above), no tight bound is known. OPEN PROBLEM 4. What is the maximum complexity of m distinct cells in an arrangement ofn circles in the planel
Complexity of many cells in hyperplane arrangements in higher dimensions was first studied by Edelsbrunner and Haussler [155]. Let H be the set of all hyperplanes in M^. They proved that the maximum number of (d — 1)-dimensional faces in m distinct cells in an arrangement of n hyperplanes in W^ is 0(m^^^n^^^ + n^~^). Refining an argument by Edelsbrunner et al. [153], Agarwal and Aronov [7] improved this bound to 0{m^^^n^/^ + n^~^). By a result of Edelsbrunner and Haussler [155], this bound is tight in the worst case.
78
RK. Agarwal and M. Sharir
Aronov et al. [50] proved that /x(m,n,H) = OCm^/^n^/^log^n), where ^ = ([d/l] l)/2. They also proved several lower bounds on /x(m,n,H): For odd values of d and m ^n, />6(m,n,H) = ©(m^L^/^J); for m of the form 6)(n^-2^) where 0 < i^ < [d/2i is an integer, /x(m, n, H) = ^(m^/^n^^/^^); and for arbitrary values of m, /x(m,«, H) = -^(m^/^n^/^-i/4). Agarwal [4], Guibas et al. [201], and Halperin and Sharir [217] obtained bounds on "special" subsets of cells in hyperplane arrangements. A problem closely related to, but somewhat simpler than, the many-cells problem is the incidence problem. Here is a simple instance of this problem: Let 7" be a set of n lines and P a. set of m points in the plane. Define X(P, F) = ^Z^er 1^ f^ ^h set T(m, n) = max J ( P , F), where the maximum is taken over all sets P of m distinct points and over all sets F of n distinct lines in the plane. Of course, this problem is interesting only when the lines in F are in highly degenerate position. If n = m^ -\-m-i-1, then a finite projective plane of order m has n points and n lines and each line contains m-\-l = Q (n^/^) points, so the number of incidences between n points and n lines is Q(n^^^). Szemeredi and Trotter [339] proved that such a construction is infeasible in R^. In a subsequent paper, Szemeredi and Trotter [340] proved that l(m, n) = 0{ni^f^n^f^ -\-m-\-n). Their proof is, however, quite intricate, and an astronomic constant is hidden in the big-O notation. Their bound is asymptotically tight in the worst case, as shown in [165]. A considerably simpler proof, with a small constant of proportionality in the bound, was given by Clarkson et al. [121], based on the random-sampling technique. In fact, the bound on many cells in arrangements of lines immediately yields a similar bound on X(m, n) [121], but the proof can be somewhat simplified for the incidence problem. Here we present an even more elegant and simpler proof, due to Szekely [338], for the bound on J(m, n) using Lemma 6.4: THEOREM 7.1 (Szemeredi and Trotter [340]). Let F be a set ofn lines and P a set ofm points in the plane. Then
X(P, F) = 0(n?l^n^l^ + m -h «). PROOF. We construct a geometric graph G = (V, £) whose vertices are the points of P. We connect two vertices /?, ^ by an edge if the points p and q are consecutive along a line in F. Each edge of G is a portion of a line of F, and no two edges overlap. Therefore at most (2) pairs of edges cross each other. Note that X(P, F) ^ \E\-\-n. \f\E\^ 4m, there is nothing to prove. Otherwise, by Lemma 6.4,
0 n\
\E\^
1
\3
which implies that J ( P , F) = 0(m^l^n^l^ + «).
D
Valtr [348] has studied the incidence problem and its generalization for dense point sets, where the ratio of the maximum and the minimum distances in P is at most O(v^). The incidence problem has been studied for other curves as well. Of particular interest is the number of incidences between points and unit circles in the plane [121,335] because of its close relationship with the following major open problem in combinatorial geometry.
Arrangements and their applications
79
which was originally introduced by Erdos in 1946 [175]: Let S be a set ofn points in the plane. How many pairs of points in S are at distance 1? Spencer et al. [335] had proved, by modifying the proof of Szemeredi and Trotter [340], that the number of incidences between m points and n unit circles is Oim^^^n^^^ -\- m -\- n). The proofs by Clarkson et al. [121] and by Szekely [338] have been extended to this case. The incidence bound implies that the number of unit distances between the points of S is 0(/i^/^). However, the best known lower bound on the number of unit distances is only ^i+^((iogiog^)/iog") [175] (see also [294]). OPEN PROBLEM
5. How many pairs of points in a given planar set of points are at dis-
tance 1? Furedi [188] showed that if points in S are in convex position, then the number of pairs at distance 1 is 0{n log^); the best known lower bound is 7n — 12 by Edelsbrunner and Hajnal [154]. The best known upper bound on the unit distances in R^ is 0{n^^^) [121]. Let 5* be a set of n points in M^ so that no four points of P lie on a circle, then the number of pairs of points in S at unit distance is 0{n^^^^) [204]. We can state the incidence problem in higher dimensions. If we do not make any additional assumptions on points and surfaces, the maximum number of incidences between m points and n planes is obviously mn: Take a set of n planes passing through a common line and place m points on this line. Agarwal and Aronov [7] proved that if F is a set of n planes and P is a set of m points in M^ so that no three points in P are colinear, then 1{P, F) = 0{m^^^n'^^^ -\-m-\-n). Edelsbrunner and Sharir [160] showed that if /" is a set of n unit spheres in R^ and P is a set of m points so that none of the points in P lies in the interior of any sphere, then X{P, F) = 0{m^/^n^'^ -\-m-\-n). See [204,297] for other results on incidences in higher dimensions.
8. Generalized Voronoi diagrams An interesting application of the new bounds on the complexity of lower envelopes is to generalized Voronoi diagrams in higher dimensions. Let 5 be a set of n pairwise-disjoint convex objects in R^, each of constant description complexity, and let p be some metric. For a point x G R^, let ^(x) denote the set of objects nearest to x, i.e., 0(x) = {seS\
p(x, s) < p{x, s') W e S}.
The Voronoi diagram Yorp(S) of S under the metric p (sometimes also simply denoted as Yor(S)) is a partition of R'^ into maximal connected regions C of various dimensions, so that the set 0(x) is the same for all x € C. Let yt be the graph of the function x^+i = p(x, Si). Set F = {yt \ 1 ^ / ^n}. Edelsbrunner and Seidel [158] observed that Vorp(5) is the minimization diagram of F. In the classical case, in which p is the Euclidean metric and the objects in S are singletons (points), the graphs of these distance functions can be replaced by a collection of n hyperplanes in R^+^, using the linearization technique, without affecting the minimization
80
P.K. Agarwal and M. Sharir
diagram. Hence the maximum possible complexity of Vor(5) is 0{n 1^^/^^), which actually can be achieved (see, e.g., [248,322]). In more general settings, though, this reduction is not possible. Nevertheless, the bounds on the complexity of lower envelopes imply that, under reasonable assumption on p and on the objects in 5, the complexity of the diagram is 0(n^+^), for any e >0. While this bound is nontrivial, it is conjectured to be too weak. For example, this bound is near-quadratic for planar Voronoi diagrams, but the complexity of almost every planar Voronoi diagram is only 0(n), although there are certain distance functions for which the corresponding planar Voronoi diagram can have quadratic complexity [59]. In three dimensions, the above-mentioned bound for point sites and Euclidean metric is 0(n^). It has been a long-standing open problem to determine whether a similar quadratic or near-quadratic bound holds in E^ for more general objects and metrics (here the new results on lower envelopes only give an upper bound of 0(n^~^^)). The problem stated above calls for improving this bound by roughly another factor of n. Since we are aiming for a bound that is two orders of magnitude better than the complexity of A(r), it appears to be a considerably more difficult problem than that of lower envelopes. The only hope of making progress here is to exploit the special structure of the distance functions p(x,s). Fortunately, some progress on this problem was made recently. It was shown by Chew et al. [115] that the complexity of the Voronoi diagram is 0(n^a(n)\ogn) for the case in which the objects of S are lines in E? and the metric p is a convex distance function induced by a convex polytope with a constant number of facets (see [115] for more details). Note that such a distance function is not necessarily a metric, because it will fail to be symmetric if the defining polytope is not centrally symmetric. The L i and Loo metrics are special cases of such distance functions. The best known lower bound for the complexity of the diagram in this special case is ^{n^a(n)). Dwyer [140] has shown that the expected complexity of the Voronoi diagram of a set of n random lines in R'^ is 0(n^^^). In another recent paper [80], it is shown that the maximum complexity of the Li-Voronoi diagram of a set of n points in R^ is G(n^). Finally, it is shown in [341] that the complexity of the three-dimensional Voronoi diagram of point sites under a general polyhedral convex distance function (induced by a polytope with 0(1) facets) is 0(«^ log«). OPEN PROBLEM 6. (i) Is the complexity of the Voronoi diagram of a set S ofn lines under the Euclidean metric in R? close to n^l (ii) Is the complexity of the Voronoi diagram of a set S ofpairwise disjoint convex polyhedra in M^, with a total ofn vertices, close to n^ under the polyhedral convex distance functions!
An interesting special case of these problems involves dynamic Voronoi diagrams for moving points in the plane. Let 5 be a set ofn points in the plane, each moving along some line at some fixed velocity. The goal is to bound the number of combinatorial changes of the Euclidean Vor(5) over time. This dynamic Voronoi diagram can easily be transformed into a three-dimensional Voronoi diagram, by adding the time f as a third coordinate. The points become lines in M^, and the metric is a distance function induced by a horizontal disk (that is, the distance from a point pixQ, yo, to) to a line i is the Euclidean distance from p to the point of intersection of i with the horizontal plane ^ = ^o)- Here too the open
Arrangements and their applications
81
problem is to derive a near-quadratic bound on the complexity of the diagram. Cubic or near-cubic bounds are known for this problem, even under more general settings [184,203, 328], but subcubic bounds are known only in some very special cases [114]. Next, consider the problem of bounding the complexity of generalized Voronoi diagrams in higher dimensions. As mentioned above, when the objects in S are n points in R^ and the metric is Euclidean, the complexity of Vor(5) is 0(n'^^/^^). As d increases, this becomes significantly smaller than the naive 0{n^^^) bound or the improved bound, 0(n^+^), obtained by viewing the Voronoi diagram as a lower envelope in IR^+^. The same bound of Q^^r^/21^ has recently been obtained in [80] for the complexity of the Loo-diagram of n points in W^ (it was also shown that this bound is tight in the worst case). It is thus tempting to conjecture that the maximum complexity of generalized Voronoi diagrams in higher dimensions is close to this bound. Unfortunately, this was recently shown by Aronov to be false [44], by presenting a lower bound of Q{n^~^). The sites used in this construction are convex polytopes, and the distance is either Euclidean or a polyhedral convex distance function. For d = 3, this lower bound does not contradict the conjecture made above, that the complexity of generalized Voronoi diagrams should be at most near-quadratic in this case. Also, in higher dimensions, the conjecture mentioned above is still not refuted when the sites are singleton points. Finally, for the general case, the construction by Aronov still leaves a gap of roughly a factor of n between the known upper and lower bounds. 9. Union of geometric objects Let /C = {^1,..., ^„} be a set of n connected J-dimensional sets in M^. In this section, we want to study the complexity of ^ = U/^=i ^i • Most of the work to date on this problem has been in two or three dimensions. Union of planar objects. Let us assume that each Ki is a Jordan region, bounded by a closed Jordan curve yi. Kedem et al. [241] have proved that if any two boundaries yi intersect in at most two points, then dK contains at most 6n ~ 12 intersection points (provided n ^ 3), and that this bound is tight in the worst case. An immediate corollary of their result is that the number of intersection points on the boundary of the union of a collection of homothets of some fixed convex set is linear, because the boundaries of any two such homothetic copies in general position can intersect in at most two points. The bound also holds when the homothets are not in general position. On the other hand, if pairs of boundaries may intersect in four or more points, then dK may contain Q{n^) intersection points in the worst case; see Figure 9. This raises the question of what happens if any two boundaries intersect in at most three points. Notice that in general this question is meaningless, since any two closed curves must intersect in an even number of points (assuming nondegenerate configurations). To make the problem interesting, let T be a collection of n Jordan arcs, such that both endpoints of each arc yt e F lie on the ;c-axis, and such that Ki is the region between yt and the X-axis. Edelsbrunner et al. [149] have shown that the maximum combinatorial complexity of the union K is G{na{n)). The upper bound requires a rather sophisticated analysis of the topological structure of K, and the lower bound follows from the construction by Wiemik and Sharir for lower envelopes of segments [357].
82
PK. Agarwal and M. Sharir
Fig. 9. Union of Jordan regions.
Next, consider the case when earh v io . • , . arbitrary, then a simple modTficTtiontf J . I . % " ^ ' ' ' " * ' P'^"^' ^^ * ^ trianglesear may have quadratic L ^ e x ^ nTwor^^^^^^^^ ' " ^'^"^^ ' ^^'^-'^^t K be "thin," that is, some of thefr anglesTr^v^^^^^^^ '^tT'^ * ^ « - g l e s have to that if the given triangles are all i f m e a n i r t h r l f T ! ' ' '' ''• ^'"'1 ^^^^ ^^ow n fixed constant ^o, then their u n i o n l ^ a s onfv . ' u ' ' ' ' " ' ' ' ' ' ' '^ '"^^^ ^'^"^ ^ components of R2 y ^ . .™ . l ^ "^'"' ""•"''^'" "^ ''«'^* (ie., connected constants Of p r o p o ^ . l ^ a m y ^ : i % r ; ^ ^ ^ ^ ^ ^ ^ ^ complexity of the union of « fat wedgesTs 0 ^ ; ? T T^'^.i^' '' "'• ^^^^ P^^^^'l *at the un:on Of fat Objects. M. Bern asJ d l h T f l ' : : ; ^ ^ ^el^^^^^ OPEN PROBLEM 7. Let A = (A,
A \ h
the aspect ratio of the smallest rctangle i l ' l l l " ^ V " " " ' ' . ^ " " ' " ' '''"''• ^ ^ «'' ^^ ?/ie complexity o / U L , 4 , ? ^«^to««5 4 , . Suppose £ « ^ , a, ^ 0(n). What is
//cr^;e"rii^:^^^^^^
r H -^'" ^ -^ ^ -"---«
constant number . of points He e f ^ n e ' 1 . t u " ' ' ' " ' ' '"^''"^^^^'" ^' "^^'^ «ome t " '"^^^ ' '^°"^*^"^ « ^^^^ that for each object of S the^atio bet "eerthe ,^^^ .nscribed disk is at most a. T h e r Z w e d th ' I ' ' ' " " " ' ' " ^ '"^"^ ^"'^ *^^ l^^g^^t for any . > 0, where the constLt of 1 I 'complexity of the union K is 0(„i+^) 167] for sHghtly improved rltsnson^^^^^^^^^ ^'^T^' ^" ^' ^' -^^ «^ - « [166! requires as an imtial but import ntsubs^P n a . '''''l''^'^^ '^ ^^' objects. Their proo the union: these are vertice^ o f X . Z l ^ u " ' " ^ ' • ^ ° ' '*^^ """^ber of regular vertices of exactly twice. In fact, the a n a l y r b X a t a n d T h f " ' '\'"° ' " " " ' ' " ' ^ ^ '^at intersect vertices of the union. Nevertheli m^^^L?. K ! " " " ' ' " ^^^ ""'"^'^ ^^^''^^ '^' i^^8"l^ shown that, for an arbitrary coltSoTo^^^^^^^^ ' P™'''™' ''^'^•' '^"'^ ^^arir [296] have cross in a constant number of l^ronehar/;';^^^^^^^^ the number of regular (resp. irregular) vertices o n l ^ h H " ' " ' ^ ' " ' ^ ^^^^P' ^) ^^ --eenusedmn70]toobtamtLrL::l;^rnrre7hel^^^^^^^^^^^^^^^
Arrangements and their applications
83
interesting in their own right, and some additional results concerning them have recently been obtained by Aronov et al. [49]. First, if there are only regular vertices (i.e., every pair of boundaries intersect at most twice), then the inequality obtained by [296] implies that the complexity of the union in this case is at most 6^ — 12, so the result by Pach and Sharir extends the older results of Kedem et al. [241]. In general, though, / can be quadratic, so the above inequality only yields a quadratic upper bound on the number of regular vertices of the union. However, it was shown in [49] that in many cases R is subquadratic. This is the case when the given regions are such that every pair of boundaries cross at most a constant number of times. If in addition all the regions are convex, the upper bound is close toO(«^/2). Aronov and Sharir [55] proved that the complexity of the union of n convex polygons in M^ with a total of s vertices is 0(n^ + sain)). Union in three and higher dimensions. Little is known about the complexity of the union in higher dimensions. It was recently shown in [80] that the maximum complexity of the union of n axis-parallel hypercubes in M^ is 6)(n^^/^^), and this improves to 0{n^^/^^) if all the hypercubes have the same size. However, the following problem remains open. OPEN PROBLEM
8. What is the complexity of the union ofn congruent cubes in M?l
Aronov and Sharir [53] proved that the complexity of the union of n convex polyhedra in R^ with a total of s faces is 0{n^ + sn log^ n). The bound was improved by Aronov et al. [57] to 0{n^ +sn\ogs). Unions of objects also arise as subproblems in the study of generalized Voronoi diagrams, as follows. Let S and p be as in the previous section (say, for the 3-dimensional case). Let K denote the region consisting of all points x G R^ whose smallest distance from a site in S is at most r, for some fixed parameter r > 0. Then K = \^^^^ B(s,r), where B(s,r) = {x eM? \ p(x,s) ^r}. We thus face the problem of bounding the combinatorial complexity of the union of n objects in R^ (of some special type). For example, if 5 is a set of lines and p is the Euclidean distance, the objects are n congruent infinite cylinders in R-^. In general, if the metric p is a distance function induced by some convex body P, the resulting objects are the Minkowski sums s 0 (—rP), for s e S, where A^B = {x-\-y\xeA, y e B]. Of course, this problem can also be stated in any higher dimension. Since it has been conjectured that the complexity of the whole Voronoi diagram in M? should be near-quadratic, the same conjecture should apply to the (simpler) structure K (whose boundary can be regarded as a level curve of the diagram at height r; it does indeed correspond to the cross-section at height r of the lower envelope in R^ that represents the diagram). Recently, this conjecture was confirmed by Aronov and Sharir in [56], in the special case where both P and the objects of S are convex polyhedra. They specialized their analysis of the union of convex polytopes to obtain an improved bound in the special case in which the polyhedra in question are Minkowski sums of the form /?/ 0 P, where the Ri 's are fz pairwise-disjoint convex polyhedra, P is a convex polyhedron, and the total number of faces of these Minkowski sums is s. The improved bounds are 0(ns logn) and ^{nsa(n)). If P is a cube, then the complexity of the Minkowski sum is 0(n^a(n)) [223].
84
P.K. Agarwal and M. Sharir
Agarwal and Sharir [26] showed that if 5 is a set of n Hnes and P is a sphere in M^, i.e., /C is a set of n congruent cyhnders, then the complexity of K is 0(n^/^"^^), for any ^ > 0. This bound was later improved and extended in [27]. They proved that the complexity of the Minkowski sum of a ball with a set of n triangles in M^ is 0{n^^^). OPEN PROBLEM
9. What is the complexity of the union ofn infinite cylinders of different
radii in M? ?
10. Decomposition of arrangements Many applications call for decomposing each cell of the arrangement into constant size cells; see Sections 12 and 13 for a sample of such applications. In this section we describe a few general schemes that have been proposed for decomposition of arrangements.
10.1. Triangulating hyperplane arrangements Each /:-dimensional cell in an arrangement of hyperplanes is a convex polyhedron, so we can triangulate it into /:-simplices. If the cell is unbounded, some of the simplices in the triangulation will be unbounded. A commonly used scheme to triangulate a convex polytope V is the so-called bottom-vertex triangulation, denoted 7^^. It recursively triangulates every face of 7^ as follows. An edge is a one-dimensional simplex, so there is nothing to do. Suppose we have triangulated all 7-dimensional cells of 7^ for j < k. We now triangulate a A:-dimensional cell C as follows. Let v be the vertex of C with the minimum A:j-coordinate. For each (k — 1)-dimensional simplex A lying on the boundary of C but not containing v (A was constructed while triangulating a (/: — 1)-dimensional cell incident to C), we extend A to a /:-dimensional simplex by taking the convex hull of A and v; see Figure 10(i). (Unbounded cells require some care in this definition; see [117].) The number of simplices in P ^ is proportional to the number of vertices in V. If we want to triangulate the entire arrangement or more than one of its cells, we compute the bottom-vertex triangulation / ^ for each face / in the increasing order of their dimension. Let A^^ (F) denote the bottom-vertex triangulation of A(r). A useful property of A^iF) is that each simplex A e A^ (F) is defined by a set D(A) of at most d(d + 3)/2 hyperplanes of F , in the sense that A e A'^iDiA)). Moreover, if IC(A) c r is the subset of hyperplanes intersecting Z\, then A e A^(R), for a subset R ^ F, if and only if D(A) c R and IC(A) Pi /? = 0. A disadvantage of bottom-vertex triangulation is that some vertices may have large degree. Methods for obtaining low-degree triangulations have been proposed in two and three dimensions [137].
10.2. Vertical decomposition Unfortunately, the bottom-vertex triangulation scheme does not work for arrangements of surfaces. Collins [124] described a general decomposition scheme, called cylindrical
Arrangements
and their applications
85
Fig. 10. (i) Bottom vertex triangulation of a convex polygon; (ii) vertical decomposition of a cell in an arrangement of segments.
algebraic decomposition, that decomposes A(r) into (bn)^ cells, each semialgebraic of constant description complexity (however, the maximum algebraic degree involved in defining a cell grows exponentially with d) and homeomorphic to a ball of the appropriate dimension. Moreover, his algorithm produces a cell complex, i.e., closures of any two cells are either disjoint or their intersection is the closure of another lower-dimensional cell of the decomposition. This bound is quite far from the known trivial lower bound of Q(n^), which is a lower bound on the size of the arrangement. A significantly better scheme for decomposing arrangements of general surfaces is their vertical decomposition. Although vertical decompositions of polygons in the plane have been in use for a long time, it was extended to higher dimensions only in the late 1980s. We describe this method briefly. Let C be a
86
RK. Agarwal and M. Sharir
THEOREM 10.1 (Chazelle et al. [103,104]). The number of cells in the vertical decomposition A (F) of the arrangement A(r), for a set Fofn surface patches in W^ satisfying (A1)-(A2), is 0(n^^~^kq(n)), where q is a constant depending on d and b.
The only known lower bound on the size of A (F) is the trivial Q{n^), so there is a considerable gap here, for J > 3; for J = 3 the two bounds nearly coincide. Improving the upper bound appears to be very challenging. This problem has been open since 1989; it seems difficult enough to preempt, at the present state of knowledge, any specific conjecture on the true maximum complexity of the vertical decomposition of arrangements in J > 3 dimensions. OPEN PROBLEM 10. What is the complexity of the vertical decomposition of the arrangement ofn surfaces in M^ satisfying Assumptions (A1)-(A2)?
The bound stated above applies to the vertical decomposition of an entire arrangement of surfaces. In many applications, however, one is interested in the vertical decomposition of only a portion of the arrangement, e.g., a single cell, the lower envelope, the zone of some surface, a specific collection of cells of the arrangement, etc. Since, in general, the complexity of such a portion is known (or conjectured) to be smaller than the complexity of the entire arrangement, one would like to conjecture that a similar phenomenon applies to vertical decompositions. Schwarzkopf and Sharir [320] showed that the complexity of the vertical decomposition of a single cell in an arrangement of n surface patches in R^, as above, is 0(«^"^^), for any 6: > 0. A similar near-quadratic bound has been obtained by Agarwal et al. [9] for the vertical decomposition of the region enclosed between the envelope and the upper envelope of two sets of bivariate surface patches. Another recent result by Agarwal et al. [14] gives a bound on the complexity of the vertical decomposition of A^k{F) for a set F of surfaces in M^, which is only slightly larger that the worst-case complexity of A^k (F). OPEN PROBLEM 11. What is the complexity of the vertical decomposition of the minimization diagram ofn surfaces in W^ satisfying Assumptions (A1)-(A2)?
Agarwal and Sharir [25] proved a near-cubic upper bound on the complexity of the vertical decomposition in the special case when the surfaces are graphs of trivariate polynomials and the intersection surface of any pair of surfaces is jc}^-monotone. In fact, their bound holds for a more general setting; see the original paper for details. An interesting special case of vertical decomposition is that of hyperplanes. For such arrangements, the vertical decomposition is a too cumbersome construct, because, as described above, one can use the bottom-vertex triangulation (or any other triangulation) to decompose the arrangement into 0(n^) simplices. Still, it is probably a useful exercise to understand the complexity of the vertical decomposition of an arrangement of n hyperplanes in M^. A result by Guibas et al. [202] gives an almost tight bound of 0(n^logn) for this quantity in R^, but nothing significantly better than the general bound is known for d > 4. Another interesting special case is that of triangles in 3-space. This has been studied by [130,342], where almost tight bounds were obtained for the case of a single
Arrangements
and their applications
87
Table 3 Combinatorial bounds on the maximum complexity of the vertical decomposition of n surfaces. In the second row, K is the combinatorial complexity of the arrangement Objects
Bound
Source
SurfacesinR^, J > 3 Triangles in R Surfaces in R^, single cell Triangles in M , zone w.r.t. an algebraic surface Surfaces in M^, (^ i^)-level Hyperplanes in M"^
0(«2^-4x^(«)) 0(n^a(n)\ogn-hK) 0(n^+^) 0(n^log^n)
[103,330] [130,342] [320] [342]
0(n'^+'k) 0(n logn)
[14] [202]
cell (0(n^log^n)), and for the entire arrangement (0(n^a(n) logn + K)), where K is the complexity of the undecomposed arrangement). The first bound is slightly better than the general bound of [320] mentioned above. Tagansky [342] also derives sharp complexity bounds for the vertical decomposition of many cells in an arrangement of simplices, including the case of all nonconvex cells.
10.3. Other decomposition schemes Linearization, defined in Section 3, can be used to decompose the cells of the arrangement A{r) into cells of constant description complexity as follows. Suppose F admits a Hnearization of dimension k, i.e., there is a transformation ^ :M^ -> M^ that maps each point X G M^ to a point ^(x) e E^, each surface yt G T to a hyperplane hi C M^, and E^ to a J-dimensional surface U c E^. Let H = {hi \ I ^ i ^ n). We compute the bottomvertex triangulation J^ {H) of A{H). For each simplex A e A^(H), let Z = Z^ Pi T, and let zl* = (p~^(A) be the back projection of A onto E^; Z\* is a semialgebraic cell of constant description complexity. Set E = {A"" \ A e A'^(H)}. S is a decomposition of A(r) into cells of constant description complexity. If a simplex A G A ^ (H) intersects U, then A lies in the triangulation of a cell in zone(U; H). Therefore, by Theorem 5.3, \S\ = 0(n^(^~^^^^^^ log^ n), where y = (d -\-k) (mod 2). Hence, we can conclude the following. THEOREM 10.2. Let F be a set of hypersurfaces in M.^ of degree at most b. If F admits a linearization of dimension k, then A{F) can be decomposed into 0(nL^^+^^/^J log^ n) cells of constant description complexity, where y = d -\- k (mod 2).
As shown in Section 3, spheres in E^ admit a linearization of dimension J + 1 ; therefore, the arrangement of n spheres in E^ can be decomposed into 0(n^ logn) cells of constant description complexity. Aronov and Sharir [52] proposed another scheme for decomposing arrangements of triangles in E^ by combining vertical decomposition and triangulation. They first decompose
88
RK. Agarwal and M. Sharir
each three-dimensional cell of the arrangement into convex polyhedron, using an incremental procedure, and then they compute a bottom-vertex triangulation of each polyhedron. Other specialized decomposition schemes in M^ have been proposed in [221,271].
10.4. Cuttings All the decomposition schemes described in this section decompose M^ into cells of constant description complexity, so that each cell lies entirely in a single face of A{r). In many applications, however, it suffices to decompose M^ into cells of constant description complexity so that each cell intersects only a few surfaces of F. Such a decomposition lies at the heart of divide-and-conquer algorithms for numerous geometric problems. Let r be a set of n surfaces in R^ satisfying Assumptions (A1)-(A2). For a parameter r ^ n, a family E = {A\,..., As) of cells of constant description complexity with pairwise disjoint interiors is called a {\/r)-cutting of A{r) if the interior of each cell in E is crossed by at most n/r surfaces of F and E covers R^. If F is a set of hyperplanes, then E is typically a set of simplices. Cuttings have led to efficient algorithms for a wide range of geometric problems and to improved bounds for several combinatorial problems. For example, the proof by Clarkson et al. [121] on the complexity of m distinct cells in arrangements of lines uses cuttings; see the survey papers [3,265] for a sample of applications of cuttings. Clarkson [116] proved that a (l/r)-cutting of size 0(r^ log^ r) exists for a set of hyperplanes in R^. The bound was improved by Chazelle and Friedman [108] to O(r^); see also [1,259,263]. An easy counting argument shows that this bound is optimal for any nondegenerate arrangement. There has been considerable work on computing optimal (1/r)cuttings efficiently [1,100,224,259,263]. Chazelle [100] showed that a (l/r)-cutting for a set of n hyperplanes in R^ can be computed in time 0(nr^~^). Using Haussler and Welzl's result on ^-nets [227], one can show that if, for any subset /? c r , there exists a canonical decomposition of A(R) into at most g(\R\) cells of constant description complexity, then there exists a (l/r)-cutting of A(F) of size 0(^(rlogr)). By the result of Chazelle et al. [103] on the vertical decomposition of A(F), there exists a (l/r)-cutting of size 0((r logr)^'^~'^+^) of A(F). On the other hand, if F admits a linearization of dimension k, then there exists a (l/r)-cutting of size 0((rlogr)L(^+^)/2Jlogr).
11. Representation of arrangements Before we begin to present algorithms for computing arrangements and their substructures, we need to describe how we represent arrangements and their substructures. Planar arrangements of fines can be represented using any standard data structure for representing planar graphs such as quad-edge, winged-edge, and half-edge data structures [207, 244,354]. However, representation of arrangements in higher dimensions is challenging because the topology of ceUs may be rather complex. Exactly how an arrangement is represented largely depends on the specific application for which we need to compute it. For
Arrangements and their applications
89
example, representations may range from simply computing a representative point within each cell, or the vertices of the arrangement, to storing various spatial relationships between cells. We first review representations of hyperplane arrangements and then discuss surface arrangements. Hyperplane arrangements. A simple way to represent a hyperplane arrangement A{r) is by storing its l-skeleton [141]. That is, we construct a graph (V, E) whose nodes are the vertices of the arrangement. There is an edge between two nodes vi, Vj if they are endpoints of an edge of the arrangement. Using the l-skeleton of A{r), we can traverse the entire arrangement in a systematic way. The incidence relationship of various cells in A{r) can be represented using a data structure called incidence graph. A /^-dimensional cell C is called a subcell of a (/: + 1)-dimensional cell C if C lies on the boundary of C\ C is called the supercell of C. We assume that the empty set is a (—1)-dimensional cell of v4(r), which is a subcell of all vertices of A{r)\ and M^ is a (J + 1)-dimensional cell, which is the supercell of all J-dimensional cells of A{r). The incidence graph of A{r) has a node for each cell of A{r), including the (— 1)-dimensional and {d + 1)-dimensional cells. There is a (directed) arc from a node C to another node O if C is a subcell of C^; see Figure 11. Note that the incidence graph forms a lattice. Many algorithms for computing the arrangement construct the incidence graph of the arrangement. A disadvantage of 1-skeletons and incidence graphs is that they do not encode ordering information of cells. For examples, in planar arrangements of lines or segments, there is a natural ordering of edges incident to a vertex or of the edges incident to a twodimensional face. The quad-edge data structure encodes this information for planar arrangements. Dobkin and Laszlo [138] extended the quad-edge data structure to M^, which was later extended to higher dimensions [83,255,256]. Dobkin et al. [136] described an algorithm for representing a simple polygon as a short Boolean formula, which can be used to store faces of segment arrangements to answer various queries efficiently. Surface arrangements. Representing arrangements of surface patches is considerably more challenging than representing hyperplane arrangements because of the complex topology that cells in such an arrangement can have. A very simple representation of A{r) is to store a representative point from each cell of A{r) or to store the vertices of A{r). An even coarser representation of arrangements of graphs of polynomials is to store all realizable sign sequences. It turns out that this simple representation is sufficient for some applications [35,77]. The notion of l-skeleton can be generalized to arrangements of surfaces. However, all the connectivity information cannot be encoded by simply storing vertices and edges of the arrangement. Instead we need a finer one-dimensional structure, known as the roadmap. Roadmaps were originally introduced by Canny [90,92] to determine whether two points lie in the same connected component of a semialgebraic set; see also [195,197,230]. They were subsequently used for computing a semialgebraic description of connected components of a semialgebraic set [71,94,231]. We can extend the notion of roadmaps to entire arrangements. Roughly speaking, a roadmap 7l{r) of A{r) is a one-dimensional semialgebraic set that satisfies the following two conditions. (Rl) For every cell C in A{r), C Pi lZ{r) is nonempty and connected.
90
RK. Agarwal and M. Sharir
(R2) Let Cu) be the cross-section of a cell C G A(r) at the hyperplane x\=w. For any w; G R and for cell C e A{r), C^^^ impHes that every connected component of Cyo intersects 1Z(r). We can also define the roadmap of various substructures of arrangements. See [69,90] for details on roadmaps. A roadmap does not represent "ordering" of cells in the arrangement or adjacency relationship among various cells. If we want to encode the adjacency relationship among higher dimensional cells of ^ ( F ) , we can compute the vertical decomposition or the cylindrical algebraic decomposition of A(r) and compute the adjacency relationship of cells in the decomposition [43,317]. Brisson [83] describes the cell-tuple data structure that encodes topological structures, ordering among cells, the boundaries of cells, and other information for cells of surface arrangements. Many query-type applications (e.g., point location, ray shooting) call for preprocessing A{r) into a data structure so that various queries can be answered efficiently. In these cases, instead of storing various cells of an arrangement explicitly, we can store the arrangement implicitly, e.g., using cuttings. Chazelle et al. [104] have described how to preprocess arrangements of surfaces for point-location queries; Agarwal et al. [9] have described data structures for storing lower envelopes in R"* for point-location queries.
12. Computing arrangements We now review algorithms to compute the arrangement A{r) of a set F of n surface patches satisfying Assumptions (A1)-(A2). As in Chapter 1, we need to assume here an appropriate model of computation in which various primitive operations on a constant number of surfaces can be performed in constant time. We will assume an infinite-precision real arithmetic model in which the roots of any polynomial of constant degree can be computed exactly in constant time. Constructing arrangements of hyperplanes and simplices. Edelsbrunner et al. [157] describe an incremental algorithm that computes in time O(n^) the incidence graph of A{r), for a set Fofn hyperplanes in R^. Roughly speaking, their algorithm adds the hyperplanes of F one by one and maintains the incidence graph of the arrangement of the hyperplanes added so far. Let 7^ be the set of hyperplanes added in the first / stages, and let )//+i be the next hyperplane to be added. In the (/ + l)st stage, the algorithm traces )//+i through A(Fi). If a /:-face / of A(Fi) does not intersect y/, then / remains a face of A(Fi^]). If / intersects y/+i, then / G zone(yi-^\; Fi) and / is split into two /:-faces f'^, f~, lying in the two open halfspaces bounded by y/+i, and a (/: — l)-face f = f C\yi^\. The algorithm therefore checks the faces of zone{yiJ^\; Fi) whether they intersect y/+i. For each such intersecting face, it adds corresponding nodes in the incidence graph and updates the edges of the incidence graph. The (/ + l)st stage can be completed in time proportional to the complexity of zone (yi-^\; Fi), which is 0(/^~^); see [142,157]. Hence, the overall running time of the algorithm is 0(n^). A drawback of the algorithm just described is that it requires 0(n^) "working" storage because it has to maintain the entire arrangement constructed so far in order to determine
Arrangements
and their
applications
91
(ii)
(i)
Fig. 11. (i) Incidence graph of the arrangement of 2 Hnes. (ii) Adding a new line; incremental changes in the incidence graph as the vertex v, the edge 5, and the face A' are added.
which of the cells intersect the new hyperplane. An interesting question is whether A{r) can be computed using only 0{n) working storage. Edelsbrunner and Guibas [148] proposed the topological sweep algorithm that can construct the arrangement of n lines in O(n^) time using 0{n) working storage. Their algorithm, which is a generalization of the sweep-line algorithm of Bentley and Ottmann [72], sweeps the plane by a pseudo-line. The algorithm by Edelsbrunner and Guibas can be extended to enumerate all vertices in an arrangement of n hyperplanes in R^ in 0(n^) time using 0(n) space. See [41,58,161] for other topological-sweep algorithms. Avis and Fukuda [61] developed an algorithm that can enumerate in 0(n^k) time, using 0(n) space, all k vertices of the arrangement of a set F of n hyperplanes in M.^ in which every vertex is incident to d hyperplanes. Their algorithm is useful when there are many parallel hyperplanes in F. See also [62,186] for some related results. Using the random-sampling technique, Clarkson and Shor [120] developed an 0(n log n + k) expected time algorithm for constructing the arrangement of a set Fofn line segments in the plane; here k is the number of vertices in A(F); see also [284,285]. Chazelle and Edelsbrunner [102] developed a deterministic algorithm that can construct A(F) in time 0(n logn -j- k), using 0(n -f- k) storage. The space complexity was improved to 0(n), without affecting the asymptotic running time, by Balaban [63]. If F is a set of n triangles in R^, A (F) can be constructed in 0(n^ logn + k) expected time using a randomized incremental algorithm [106,330]. De Berg et al. [130] proposed a deterministic algorithm with 9
II
0(n a(n) logn + klogn) running time for computing A (F).
92
RK. Agarwal and M. Sharir
Chazelle and Friedman [109] described an algorithm that can preprocess a set F of n hyperplanes into a data structure of size 0(n^/log^ n) so that a point-location query can be answered in O(logn) time. Their algorithm was later simplified by Matousek [267] and Chazelle [100]. Mulmuley and Sen [287] developed a randomized dynamic data structure of size 0(n^) for point location in arrangements of hyperplanes that can answer a point-location query in 0(\ogn) expected time and can insert or delete a hyperplane in 0(n^~^ logn) expected time. Hagerup et al. [210] described a randomized parallel algorithm for constructing the arrangement of hyperplanes under the CRCW model. Their algorithm runs in 0(\ogn) time using 0(n^/logn) expected number of processors. A deterministic algorithm under the CREW model with the same worst-case performance was proposed by Goodrich [193]. There has been some work on constructing arrangements of lines and segments using floating-point (finite precision) arithmetic. Milenkovic [279] developed a general technique called double-precision geometry that can be applied to compute arrangements of lines and segments in the plane. For example, if the coefficients of each line in a set Fofn lines are represented using at most b bits, then his technique can compute A(r) in 0(n^ logn) time using at most b-\-20 bits of precision. A careful implementation of the algorithm by Edelsbrunner et al. [157] requires 3b bits of precision. Because of finite-precision arithmetic, Milenkovic's technique computes the coordinates of vertices approximately, and therefore produces a planar geometric graph, which is an arrangement of pseudo-lines. If the approximate arithmetic used by his algorithm makes relative error e, then the maximum error in the coordinates of vertices of A(r) computed by his algorithm is 0(^/s). Fortune and Milenkovic [182] showed that the sweep-line and incremental algorithms can be implemented so that the maximum error in the coordinates of vertices is at most 0(ne). For all practical purposes this approach is better than the one described in [279]. See [196,200, 222,278,280,308] for a few additional results on constructing arrangements using floatingpoint arithmetic. Constructing arrangements of surfaces. The algorithm by Edelsbrunner et al. [157] for computing hyperplane arrangements can be extended to computing the vertical decomposition A (F) for a set F of n arcs in the plane. In the (/ + l)st step, the algorithm traces }//+i through zone{yi-^\; Fi) and updates the trapezoids of A (Fj) that intersect )//+i. The running time of the (/ + l)st stage is 0(Ks-\-2(i))^ where s is the maximum number of intersection points between a pair of arcs in F. Hence, the overall running time of the algorithm is 0(nks-\-2(n)) [150]. Suppose F is a set of arcs in the plane in general position. If the arcs in F are added in a random order and a "history dag," as described in Chapter 1, is used to efficiently find the trapezoids of ^ (Fi) that intersect y/+i, the expected running time of the algorithm can be improved to 0(n logn -J- k), where k is the number of vertices in A(F) [106,330]. Very little is known about computing the arrangement of a set F of surfaces in higher dimensions. Chazelle et al. [103] have shown that A (F) can be computed in randomized expected time 0(«^^~^+^), using the random-sampling technique. Their algorithm can be made deterministic without increasing its asymptotic running time, but the deterministic algorithm is considerably more complex.
Arrangements and their applications
93
There has been some work for computing arrangements under the more reahstic model of precise rational arithmetic model used in computational real algebraic geometry [76]. Canny [93] had described an {nb)^^^''-iix^t algorithm for computing a sample point from each cell of the arrangement of a set of n hypersurfaces in R^, each of degree at most b. The running time was improved by Basu et al. [70] to n^+'^iy^i^) ^ Basu et al. [69] described an n^'^ ^ b^^^ ^ -time algorithm for computing the roadmap of a semialgebraic set defined by n polynomials, each of degree at most b. Although their goal is to develop the roadmap of a semialgebraic set, their algorithm first constructs the road map of the entire arrangement of the surfaces defining the semialgebraic set and then outputs the appropriate portion of the map.
13. Computing substructures in arrangements 13.1. Lower envelopes Let r be a set of surface patches satisfying Assumptions (A1)-(A2). We want to compute the minimization diagram A^(F) of F. We described in Chapter 1 the algorithms for computing the minimization diagram of a set of arcs in the plane. In this chapter we will focus on minimization diagrams of sets of surface patches in higher dimensions. There are again several choices, depending on the application, as to what exactly we want to compute. The simplest choice is to compute the vertices or the 1-skeleton of A4(r). A more difficult task is to compute all the faces of MiF) and represent them using any of the mechanisms described in the previous section. Another challenging task, which is required in many applications, is to store F into a data structure so that Lr(x), for any point x G M^""^ can be computed efficiently. For collections F of surface patches in M?, the minimization diagram A4(F) is a planar subdivision. In this case, the latter two tasks are not significantly harder than the first one, because we can preprocess M (F) using any optimal planar point-location algorithm [ 132]. Several algorithms have been developed for computing the minimization diagram of bivariate (partial) surface patches [21,78,79,128,328,330]. Some of these techniques use randomized algorithms, and their expected running time is 0(n^+^), which is comparable with the maximum complexity of the minimization diagram of bivariate surface patches. The simplest algorithm is probably the deterministic divide-and-conquer algorithm presented by Agarwal et al. [21]. It partitions F into two subsets A , A of roughly equal size, and computes recursively the minimization diagrams A^i, M2 of Fi and F2, respectively. It then computes the overlay A^* of A^i and M.2' Over each face / of A^* there are only (at most) two surface patches that can attain the final envelope (the one attaining L(Fi) over / and the one attaining L(F2) over / ) , so we compute the minimization diagram of these two surface patches over / , replace / by this refined diagram, and repeat this step for all faces of A^*. We finally merge any two adjacent faces / , /^ of the resulting subdivision if the same surface patches attain L(F) over both / and f\ The cost of this step is proportional to the number of faces of Al*. By the result of Agarwal et al. [21], A^* has 0(n^+^) faces. This imphes that the complexity of the above divide-and-conquer algorithm is 0(n^+^). If r is a set of triangles in M^, the running time of the algorithm is 0(n^a(n)) [151].
94
P.K. Agarwal and M. Sharir
This divide-and-conquer algorithm can also be used to compute S{r, F'), the region lying above all surface patches of one collection F' and below all surface patches of another collection T, in time Oin^^^), where n = \F\ + \F'\ [21]. A more difficult problem is to devise output-sensitive algorithms for computing M{F), whose complexity depends on the actual combinatorial complexity of the envelope. A rather complex algorithm is presented by de Berg [127] for the case of triangles in R^, whose running time is 0{n^^^^^ + n^^^^^k'^f^), where k is the number of vertices in M{F). If the triangles in F are pairwise disjoint, the running time can be improved to The algorithm by Edelsbrunner et al. [151] can be extended to compute in 0{n^~^a{n)) time all faces of the minimization diagram of {d — l)-simplices in R^ for d^A. However, little is known about computing the minimization diagram of more general surface patches in J ^ 4 dimensions. Let F be a set of surface patches in R^ satisfying Assumptions (A1)-(A2). Agarwal et al. [9] showed that all vertices, edges, and 2-faces of A^(r) can be computed in randomized expected time 0(n^~^+^). We sketch their algorithm below. Assume that F satisfies Assumptions (A1)-(A5). Fix a (J — 2)-tuple of surface patches, say y i , . . . , y^-2, and decompose their common intersection H t i ^ // i^^o smooth, x\X2monotone, connected patches, using a stratification algorithm. Let 77 be one such piece. Each surface yi ,fori^d—l, intersects 77 at a curve $,, which partitions 77 into two regions. If we regard each yi as the graph of a partially defined (d — l)-variate function, then we can define Ki c 77 to be the region whose projection on the hyperplane 7/ : Xd = 0 consists of points X at which y, (x) ^ yi (x) = • • • = yj-ii^)- The intersection Q = n / > j - i ^i is equal to the portion of 77 that appears along the lower envelope L(F).Wc repeat this procedure for all patches of the intersection P|-r, y, and for all (d — 2)-tuples of surface patches. This will give all the vertices, edges and 2-faces of L(F). Since 77 is x 1^2-monotone 2-manifold, computing Q is essentially the same as computing the intersection ofn — d-\-2 planar regions. Q can thus be computed using an appropriate variant of the randomized incremental approach [106,128]. It adds ^/ = y/ D 77 one by one in a random order (^ may consist of 0(1) arcs), and maintains the intersection of the regions Ki for the arcs added so far. Let Qr denote this intersection after r arcs have been added. We maintain the "vertical decomposition" of Qr (within 77), and represent Qr as a collection of pseudo-trapezoids. We maintain additional data structures, including a history dag and a union-find structure, and proceed exactly as in [106,128] (See Chapter 1). We omit here the details. We define the weight of a pseudo-trapezoid r to be the number of surface patches y/, for / > J — 1, whose graphs either cross r or hide r completely from the lower envelope (excluding the up to four function graphs whose intersections with 77 define r). The cost of the above procedure, summed over all (d — 2)-tuples of 7^, is proportional to the number of pseudo-trapezoids that are created during the execution of the algorithm, plus the sum of their weights, plus an overhead term of 0(n^~') needed to prepare the collections of arcs §/ over all two-dimensional patches 77. Modifying the analysis in the papers cited above, Agarwal et al. prove the following. 13.1 (Agarwal, Aronov and Sharir [9]). Let F be a set ofn surface patches in W^ satisfying Assumptions (A1)-(A2). The vertices, edges, and 2-faces of M{F) can be computed in randomized expected time 0{n^~^^^),for any 6: > 0. THEOREM
Arrangements and their applications
95
For d = A, the above algorithm can be extended to compute the incidence graph (or celltuple structure) of M.{r). Their approach, however, falls short of computing such representations for J > 4. Agarwal et al. also show that the three-dimensional point-location algorithm by Preparata and Tamassia [307] can be extended to preprocess a set of trivariate surface patches in time 0(n^+^) into a data structure of size 0(n^+^) sothatLr(x), for any point x G M^, can be computed in 0(log^ n) time. OPEN PROBLEM 12. Let r be a set of n surface patches in R^, for d > 4, satisfying Assumptions (A1)-(A3). How fast can F be preprocessed, so that Lr(x), for a query point X G M^~^ can be computed efficiently!
13.2. Single cells Computing a single cell in an arrangement of n hyperplanes in M^ is equivalent, by duality, to computing the convex hull of a set of n points in E^ and is a widely studied problem; see, e.g., [142,324] for a summary of known results. For J > 4, an 0(nL^/^^) expected-time algorithm for this problem was proposed by Clarkson and Shor [120] (see also [323]), which is optimal in the worst case. By derandomizing this algorithm, Chazelle [101] developed an 0(«^^/^^)-time deterministic algorithm. A somewhat simpler algorithm with the same running time was later proposed by Bronnimann et al. [85]. These results imply that the Euclidean Voronoi diagram of a set of n points in W^ can be computed in time 0(n ^^/^^). Since the complexity of a cell may vary between 0(1) and 0(n^^^^^), output-sensitive algorithms have been developed for computing a single cell in hyperplane arrangements [111,246,321]. For J < 3, Clarkson and Shor [120] gave randomized algorithms with expected time 0(nlogh), where h is the complexity of the cell, provided that the planes are in general position. Simple deterministic algorithms with the same worst-case bound were developed by Chan [95]. Seidel [321] proposed an algorithm whose running time is 0(n^ + h logn); the first term can be improved to 0(n^~^/^^^/^^+^^ log^ n) [266] or to 0((n/i)^"^/^L^/^J+^Hog''n) [96]. Chan et al. [99] described another output-sensitive algorithm whose running time is 0((n + (nf) ^ ~ ^/ ^^^'^'^ + fn^~^l ^^/^^) log*^ n). Avis et al. [60] described an algorithm that can compute in 0(nf) time, using 0(n) space, all / vertices of a cell in an arrangement of n hyperplanes in M^; see also [82,185]. All these outputsensitive bounds hold only for simple arrangements. Although many of these algorithms can be extended to nonsimple arrangements, the running time increases. As mentioned in Chapter 1, Guibas et al. [206] developed an 0(A^+2(^) log^ n)-time algorithm for computing a single face in an arrangement of n arcs, each pair of which intersect in at most s points. Later a randomized algorithm with expected time 0(A,^+2 W log n) was developed by Chazelle et al. [106]. Since the complexity of the vertical decomposition of a single cell in an arrangement of n surface patches in M? is 0(n^+^) [320], an application of the random-sampling technique yields an algorithm for computing a single cell in time 0(n^^^) in an arrangement of n surface patches in M? [320]. If F is a set of triangles, the running time can be improved to 0(n^ log^ n) [128]. Halperin [211,212] developed faster algorithms for computing a single cell in arrangements of "special" classes of bivariate surfaces that arise in motion-planning applications.
96
P.K. Agarwal and M. Sharir
13.3. Levels Let T be a set of n arcs in the plane, each pair of which Constructing the ^k-level intersect in at most 5" points. A^k (^) can be computed by a simple divide-and-conquer algorithm as follows [326]. Partition F into two subsets Fi, F2, each of size at most \n/2'], compute recursively A^k(^\), A^ki^^i), and then use a sweep-line algorithm to compute A^k(^) from A^k(J"\) and A^ki^i)- The time spent in the merge step is proportional to the number of vertices in A^ki^)^ A^k(^2) and the number of intersections points between the edges of two subdivisions, each of which is a vertex of A(F) whose level is at most 2k. Using Theorem 6.1, the total time spent in the merge step is 0(Xs-\-2(n)klogn). Hence, the overall running time of the algorithm is 0(Xs-\-2(n)k\og^ n). If we use a randomized incremental algorithm that adds arcs one by one in a random order and maintains A^kin)^ where Fi is the set of arcs added so far, the expected running time of the algorithm is 0(ks-\-2(n)k login/k)); see, e.g., [286]. Everett et al. [178] showed that if F is a set of n lines, the expected running time can be improved to 0(n \ogn + nk). Recently Agarwal et al. [13] gave another randomized incremental algorithm that can compute A^k(^) in expected time 0(ks-\-2(n)(k -\-\ogn)). In higher dimensions, little is known about computing A^ki^)^ for collections F of surface patches. For d = 3, Mulmuley [286] gave a randomized incremental algorithm for computing the ^/:-level in an arrangement of n planes whose expected running time is 0(nk^ login/k)). The expected running time can be improved to 0(n log'^ n -f nk^) using the algorithm by Agarwal et al. [13]. There are, however, several technical difficulties in extending this approach to computing levels in arrangements of surface patches. Using the random-sampling technique, Agarwal et al. [14] developed an Oin^^^k) expected-time algorithm for computing A^ki^)^ for a collection F of n surface patches in R^. Their algorithm can be derandomized without affecting the asymptotic running time. For J > 4, Agarwal et al.'s and Mulmuley's algorithms can compute the ^/:-level in arrangements of n hyperplanes in expected time Oin^^^'^^k^^^^^). These algorithms do not extend to computing the ^/:-level in surface arrangements because no nontrivial bound is known for the complexity of a triangulation of A^k i^) in four and higher dimensions. Constructing a single level Edelsbrunner and Welzl [ 164] gave an 0(/i logn-\-b log^ n)time algorithm to construct the /:-level in an arrangement of n lines in the plane, where b is the number of vertices of the /:-level. This bound was slightly improved by Cole et al. [123] to 0(« Xogn + b log^ k) and then recently by Chang [98] to 0(« \ogn + b \og^^^ n) for any ^ > 0. Haar-Peled [225] gave on 0((n + b)ain)\ogn) expected time algorithm. However, these algorithms do not extend to computing the /:-level in arrangements of curves. The approach by Agarwal et al. [13] can compute the /:-level in an arrangement of lines in randomized expected time OinXo^n + nk^^^Xo^^^n), and it extends to arrangements of curves and to arrangements of hyperplanes. Agarwal and Matousek [19] describe an output-sensitive algorithm for computing the /:-level in an arrangement of planes. The running time of their algorithm, after a slight improvement by Chan [96], is OinXogb + b^^^), where b is the number of vertices of the A:-level. Their algorithm can compute the k-lt\tX in an arrangement of hyperplanes in R^ in time 0(nlogZ? + («Z?)^-^/(L^/^J+^^+^ + Z?ni-2/(L^/2J+J)+^). As in the case ofsingle cells, all the output-sensitive algorithms assume that the hyperplanes are in general position.
Arrangements and their applications
97
13.4. Marked cells Let F be a set of n lines in the plane and S a set of m points in the plane. Edelsbmnner et al. [152] presented a randomized algorithm, based on the random-sampling technique, for computing C(S, F), the set of cells in A(r) that contain at least one point of S, whose expected running time is 0(m^^^~^n^^^^^^ -{-mlogn-\-nlognlogm), for any ^ > 0. A deterministic algorithm with running time 0{m^/^n^^^ \og^ n -\-n log^ n-^m logn) was developed by Agarwal [2]. However, both algorithms are rather complicated. A simple randomized divide-and-conquer algorithm, with 0((my/n + n) logn) expected running time, was recently proposed by Agarwal et al. [20]. Using random sampling, they improved the expected running time to 0(m^/^n^/^ log^^^(n/^/m) -\- (m-\-n) logn). If we are interested in computing the incidences between F and 5, the best known algorithm is by Matousek whose expected running time is o(m^/^f2^/^2^^^''§*^'^+''^^ + (m -f n)log(m + n)) [268]. An Q{m^/^n^^^ -^ {m-\-n) log(m + n)) lower bound for this problem is proved by Erickson [177] under a restricted model of computation. Matousek's algorithm can be extended to higher dimensions to count the number of incidences between m points and n hyperplanes in M^ in time 0((mn)^-i/^^+^>2^^^^g*^^+^>> + (m + w) log(m + n)) [268]. The above algorithms can be modified to compute marked cells in arrangements of segments in the plane. The best known randomized algorithm is by Agarwal et al. [20] whose running time is 0{m^^^n^^^ log^(n/v^) + (m + nlogm + na{n)) logn). Little is known about computing marked cells in arrangements of arcs in the plane. Using a randomized incremental algorithm, C{S, F) can be computed in expected time 0{ks+2(n)\f^^ogn), where s is the maximum number of intersection points between a pair of arcs in F [330]. If F is a set of n unit-radius circles and 5 is a set of m points in the plane, the incidences between F and S can be computed using Matousek's algorithm [268]. Randomized incremental algorithms can be used to construct marked cells in arrangements of hyperplanes in higher dimensions in time close to their worst-case complexity. For example, if F is a set of n planes in M^ and ^ is a set of m points in M^, then the incidence graph of cells in C{S, F) can be computed in expected time 0{nm^/^ logn) [128]. For J > 4, the expected running time is 0(m^/^n^/^log^ n), where y = {[_d/2\ — l)/2. De Berg et al. [133] describe an efficient point-location algorithm in the zone of a /c-flat in an arrangement of hyperplanes in R^. Their algorithm can answer a query in 0(log n) time using 0(nL^^+^V^J log^n) space, where y =d-\-k (mod2).
13.5. Union of objects Let r be a set of n semialgebraic simply connected regions in the plane, each of constant description complexity. The union of F can be computed in 0 ( / ( n ) log^ n) time by a divide-and-conquer technique, similar to that described in Section 13.3 for computing A^k{F). Here f(m) is the maximum complexity of the union of a subset of F of size m. Alternatively, \JF can be computed in 0 ( / ( n ) l o g n ) expected time using the lazy randomized incremental algorithm by De Berg et al. [128]. As a consequence, the union of n convex fat objects, each of constant description complexity, can be computed in 0(n^"^^) time, for any ^ > 0; see Section 9.
98
RK. Agarwal and M. Sharir
Aronov et al. [57] modified the approach by Agarwal et al. [9] so that the union of n convex polytopes in R^ with a total of s vertices can be computed in expected time 0{sn log n log s-\-rv'). The same approach can be used to compute the union of n congruent cylinders in time 0{n^^^). (Again, consult Section 9 for the corresponding bounds on the complexity of the union.) Many applications call for computing the volume or surface area of [J /" instead of its combinatorial structure. Overmars and Yap [292] showed that the volume of the union of n axis-parallel boxes in R^ can be computed in 0(n^^^ logn) time. Edelsbrunner [144] gave an elegant formula for the volume and the surface area of the union of n balls in R^, which can be used to compute the volume efficiently.
14. Applications In this section we present a sample of applications of arrangements. We discuss a few specific problems that can be reduced to bounding the complexity of various substructures of arrangements of surfaces or to computing these substructures. We also mention a few general areas that have motivated several problems involving arrangements and in which arrangements have played an important role.
14.1. Range searching A typical range-searching problem is defined as follows: Preprocess a set Sofn points in R*^, so that all points of S lying in a query region can be reported {or counted) quickly. A special case of range searching is halfspace range searching, in which the query region is a halfspace. Because of numerous applications, range searching has received much attention during the last twenty years. See [16,269] for recent surveys on range searching and its applications. If we define the dual of a point p = (a\,..., aj) to be the hyperplane p* :xcj = —a\xi — • • • — ad~\Xd-\ + ad, and the dual of a hyperplane h : Xd = b\x\ -\ h bd-\Xd-i + bd to be the point h* = (b\,..., bd), then p lies above (resp. below, on) h if and only if the hyperplane p* lies above (resp. below, on) the point h*. Hence, halfspace range searching has the following equivalent "dual" formulation: Preprocess a set F of n hyperplanes in R^ so that the hyperplanes of H lying below a query point can be reported quickly, or the level of a query point can be computed quickly. Using the point-location data structure for hyperplane arrangements given in [100], the level of a query point can be computed in O(logn) time using 0(n^/ \og^ n) space. This data structure can be modified to report all t hyperplanes lying below a query point in time 0(\ogn + t). Chazelle et al. [110] showed, using results on arrangements, that a two-dimensional halfspace range-reporting query can be answered in 0(logn + t) time using 0(n) space. In higher dimensions, by constructing (l/r)-cuttings for A^k(F), Matousek [264] developed a data structure that can answer a halfspace range-reporting query in time 0(\ogn + t) using 0(n^^^'^^ log^n) space, for some constant c. He also developed a data structure that can answer a query in time 0(n^~^^^^^^^ log'^n + t) using 0(nlog\ogn) space [264]. See also [6,112]. Using
Arrangements and their applications
99
linearization, a semialgebraic range-searching query, where one wants to report all points of S lying inside a semialgebraic set of constant description complexity, can be answered efficiently using some of the halfspace range-searching data structures [18,359]. Point location in hyperplane arrangements can be used for simplex range searching [113], ray shooting [17,18,271], and several other geometric searching problems [29].
14.2. Terrain visualization Let i^ be di polyhedral terrain in Mr" with n edges; that is, E is the graph of a continuous piecewise-linear bivariate function, so it intersects each vertical line in exactly one point. The orthographic view of X" in direction Z? G §^ is the decomposition of 77, a plane normal to the direction h and placed at infinity, into maximal regions so that the rays emerging in direction b from all points in such a region hit the same face of U, or none of them hit iJ. The perspective view of U from a point a G M^ is the decomposition of S^ into maximal connected regions so that, for each region /? c S^ and for all points b e R, either the first intersection point of E and the ray r emanating from a in direction b lie in the same face of E (which depends on R), or none of these rays meet E. The orthographic (resp. perspective) aspect graph of E represents all topologically different orthographic (resp. perspective) views of E. For background and a survey of recent research on aspect graphs, see [81]. Here we will show how the complexity bounds for lower envelopes can be used to derive near-optimal bounds on the aspect graphs of polyhedral terrains. A pair of parallel rays (pi, p2) is called critical if for each / = 1, 2, the source point of Pi lies on an edge at of E, pi passes through three edges of E (including a/), and pi does not intersect the (open) region lying below E. It can be shown that the number of topologically different orthographic views of E is 0(n^) plus the number of critical pairs of parallel rays. Fix a pair a\, a2 of edges of E. Agarwal and Sharir [23] define, for each pair (a\, ^2) of edges of E, a collection J-'a^aj of n trivariate functions, so that every pair (pi, P2) of critical rays, where pi emanates from a point on a/ (for / = 1, 2), corresponds to a vertex of A4(Tai,a2)- They also show that the graphs of the functions in J-'ai,a2 satisfy Assumptions (A1)-(A2). Using Theorem 3.1 and summing over all pairs of edges of iJ, we can conclude that the number of critical pairs of rays, and thus the number of topologically different orthographic views of E, is O(n^+0. Using a more careful analysis, Halperin and Sharir [218] proved that the number of different orthographic views is n De Berg et al. [131] have constructed a terrain for which there are Q(n^a(n)) topologically different orthographic views. If E is an arbitrary polyhedral set with n edges, the maximum possible number of topologically different orthographic views of E is 0(n^) [304]. De Berg et al. [131] showed that if i7 is a set of k pairwise-disjoint convex polytopes with a total of n vertices, then the number of orthographic views is 0{n^k^)\ the best known lower bound is Q {n^0). Agarwal and Sharir extended their approach to bound the number of perspective views of a terrain. They argue that the number of perspective views of E is proportional to the number of triples of rays emanating from a common point, each of which passes through three edges of E before intersecting the open region lying below E. Following a similar
100
RK. Agarwal and M. Sharir
approach to the one sketched above, they reduce the problem to the analysis of lower envelopes of O(n^) families of 5-variate functions, each family consisting of 0(n) functions that satisfy Assumptions (A1)-(A2). This leads to an overall bound of 0{n^^^) for the number of topologically different perspective views of E. This bound is also known to be almost tight in the worst case, as follows from another lower-bound construction given by De Berg et al. [131]. Again, in contrast, if U is an arbitrary polyhedral set with n edges, the maximum possible number of topologically different perspective views of i:is6)(n^) [304].
14.3. Transversals Let 5 be a set of n compact convex sets in R^. A hyperplane h is called a transversal of S if h intersects every member of 5. Let T{S) denote the space of all hyperplane transversals of S. We wish to study the structure of T{S). To facilitate this study, we apply the dual transform described in Section 14.1. Let h \ Xd = a\x\ -\h ad-\Xd~\ + ^j be a hyperplane that intersects a set ^ G 5. Translate h up and down until it becomes tangent to s. Denote the resulting upper and lower tangent hyperplanes by Xd=a\x\
H
Vad-\Xd-\ +Us{a\,..
.,ad-\)
Xd=a\x\
H
\-ad-\Xd-\ + L,.(ai,..., aj_i),
and
respectively. Then we have Ls{a\,...,ad-\)<,ad
^ Us{a\,...
,ad-\).
Now if /z is a transversal of 5, we must have maxLy(ai, • • '^cid-\) ^^d ^ minUs(a\,.. seS
seS
.,ad-\).
In other words, if we define F = {Us \ s e S] and T' = {L, \seS}, then T(S) is 5 ( r , TO, the region lying below the lower envelope of F and above the upper envelope of r\ The results of Agarwal et al. [21] imply that if each set in S has constant description complexity, then the complexity of T(S) is 0(n^^^), for any ^ > 0 in R^. The results in [21] concerning the complexity of the vertical decomposition of S(r, F') imply that T{S) can be constructed in 0{n^^^) time. No sharp bounds are known on T{S) in higher dimensions. However, in four dimensions, using the algorithm by Agarwal et al. [9] for point location in the minimization diagram of trivariate functions, we can preprocess S into a data structure of size 0(«^+^) so that we can determine in O(logn) time whether a hyperplane /? is a transversal of S. The problem can be generalized by considering lower-dimensional transversals. For example, in R^ we can also consider the space of all line transversals of S (lines that meet
Arrangements and their applications
101
every member of S). By mapping lines in R^ into points in R"^, and by using an appropriate parametrization of the lines, the space of all line transversals of S can be represented as the region in M^ enclosed between the upper envelope and the lower envelope of two respective collections of surfaces. Pellegrini and Shor [302] showed that if 5* is a set of triangles in R^, then the space of line transversals of S has ^320(Viogn) complexity. The bound was slightly improved by Agarwal [4] to 0(n^ logn). He reduced the problem to bounding the complexity of a family of cells in an arrangement of 0{n) hyperplanes in R^. Agarwal et al. [10] proved that the complexity of the space of line transversals for a set of n balls in R^ is 0(^z^+^). Their argument works even if 5* is a set of homothets of a convex region of constant description complexity in R^. Smorodinsky et al. [333] showed that n disjoint balls in R^ can be stabbed by a line in 0{n^~^) different ways.
14.4. Geometric optimization In the past few years, many problems in geometric optimization have been attacked by techniques that reduce the problem to constructing and searching in various substructures of surface arrangements. Hence, the area of geometric optimization is a natural extension, and a good application area, of the study of arrangements. See [24] for a recent survey on geometric optimization. One of the basic techniques for geometric optimization is the parametric searching technique, originally proposed by Megiddo [275]. This technique reduces the optimization problem to a decision problem, where one needs to compare the optimal value to a given parameter. In most cases, the decision problem is easier to solve than the optimization problem. The parametric searching technique proceeds by a parallel simulation of a generic version of the decision procedure with the (unknown) optimum value as an input parameter. In most applications, careful implementation of this technique leads to a solution of the optimization problem whose running time is larger than that of the decision algorithm only by a polylogarithmic factor. See [24] for a more detailed survey of parametric searching and its applications. Several alternatives to parametric searching have been developed during the past decade. They use randomization [25,97,262], expander graphs [238], and searching in monotone matrices [183]. Like parametric searching, all these techniques are based on the availability of an efficient procedure for the decision problem. When applicable, they lead to algorithms with running times that are similar to, and sometimes slightly better than, those yielded by parametric searching. These methods have been used to solve a wide range of geometric optimization problems, many of which involve arrangements. We mention a sample of such results. Slope selection. Given a set S of n points in R^ and an integer k, find the line with the ^th smallest slope among the lines passing through pairs of points of 5. If we dualize the points in 5 to a set F of lines in R^, the problem becomes that of computing the ^th leftmost vertex of A{r). Cole et al. [122] developed a rather sophisticated 0(n log n)-time algorithm for this problem, which is based on parametric searching. (Here the decision problem is to determine whether at most k vertices of A{r) lie to the left of a given vertical
102
RK. Agarwal and M. Sharir
line.) A considerably simpler algorithm, based on (l/r)-cuttings, was later proposed by Bronnimann and Chazelle [84]. See also [237,262]. Distance selection. Given a set 5 of n points in R^ and a parameter k ^ (2), find the A:-th largest distance among the points of S [12,238]. The corresponding decision problem reduces to point location in an arrangement of congruent disks in R^. Specifically, given a set r of m congruent disks in the plane, we wish to count efficiently the number of containments between disks of F and points of S. This problem can be solved using parametric searching [12], expander graphs [238], or randomization [262]. The best known deterministic algorithm, given by Katz and Sharir [238], runs in 0(«^/-^ log^"^^ n) time. Segment center. Given a set S of n points in R^ and a line segment e, find a placement of e that minimizes the largest distance from the points of 5 to ^ [15,169]. The decision problem reduces to determining whether given two families F and F' of bivariate surfaces, S{F, F'), the region lying between Lp and Up', is empty. Exploiting the special properties of F and F\ Efrat and Sharir [169] show that the complexity of S{F, F') is 0{n\ogn). They describe an 0(n*"^^)-time algorithm to determine whether S{F, F') is empty, which leads to an 0(n'"^^)-time algorithm for the segment-center problem. Extremal polygon placement. Given a convex m-gon P and a closed polygonal environment Q with n vertices, find the largest similar copy of P that is fully contained in Q [331]. Here the decision problem is to determine whether P, with a fixed scaling factor, can be placed inside Q\ this is a variant of the corresponding motion-planning problem for P inside Q, and is solved by constructing an appropriate representation of the 3-dimensional free configurafion space, as a collection of cells in a corresponding 3dimensional arrangement of surfaces. The running time of the whole algorithm is only slightly larger than the time needed to solve the fixed-size placement problem. The best running time is 0{mnk(i{mn)\og'mn\o^n) [11]; see also [243,331]. If Q is a convex n-gon, the largest similar copy of P that can be placed inside Q can be computed in 0{mn^\ogn) time [5]. Diameter in 3D. Given a set S of n points in R^^, determine the maximum distance between a pair of points in S. The problem is reduced to determining whether S lies in the intersection of a given set Fofn congruent balls. A randomized algorithm with 0(n logn) expected time was proposed by Clarkson and Shor [120]. A series of papers [105,272, 310,309] describe near-linear-time deterministic algorithms. The best known deterministic algorithm runs in 0(n log^ n) time [73,309]. Width in 3D. Given a set S of n points in R^^, determine the smallest distance between two parallel planes enclosing S between them. This problem has been studied in a series of papers [9,25,105], and the currently best known randomized algorithms computes the width in 0(n^/^+^) expected time [25]. The technique used in attacking the decision problems for this and the two following problems reduce them to point location in the region above the lower envelope of a collection of trivariate functions in R^.
Arrangements and their applications
103
Biggest stick in a simple polygon. Compute the longest line segment that can fit inside a given simple polygon with n edges. The current best solution is 0(n^/^"^^) [25] (see also [9,28]). Minimum-width annulus. Compute the annulus of smallest width that encloses a given set of n points in the plane. This problem arises in fitting a circle through a set of points in the plane. Again, the current best solution is 0{n^^'^^^) [25] (see also [9,28]). Geometric matching. Consider the problem where we are given two sets S\, S2 of n points in the plane, and we wish to compute a minimum-weight matching in the complete bipartite graph Si x S2, where the weight of an edge (p,q) is the Euclidean distance between p and q. One can also consider the analogous nonbipartite version of the problem, which involves just one set S of 2n points, and the complete graph on S. The goal is to explore the underlying geometric structure of these graphs, to obtain faster algorithms than those available for general abstract graphs. Vaidya [347] had shown that both the bipartite and the nonbipartite versions of the problem can be solved in time close to 0(n^^^). A fairly sophisticated application of vertical decomposition in three-dimensional arrangements, given in [14], has improved the running time for the bipartite case to 0(n^^^). Recently, Varadarajan [350] proposed an 0(n^^^log'^ n)-timt algorithm for the nonbipartite case. Center point. A center point of a set S of n points in the plane is a point TT G M^ so that each line i passing through n has the property that at least [n/?>\ points lie in each halfplane bounded hy I. It is well known that such a center point always exists [142]. If we dualize 5 to a set F of n lines in the plane, then n*, the line dual to n, lies between Ain/3\ (r) and Ai2n/3] (^). Cole et al. [123] described an 0(n log^ n)-timc algorithm for computing a center point of S, using parametric searching. The problem of computing the set of all center points reduces to computing the convex hull of Ak(r) for a given k. Matousek [260] described an 0(n log^ n)-time algorithm for computing the convex hull of Ak(r) for any k ^n; recall, in contrast, that the best known upper bound for Ak(r) is 0(n(k + 1)^/^); see [119] for an approximation algorithm. Ham sandwich cuts. Let Si, S2,. --, Sd be d sets of points in R^, each containing n points. Suppose n is even. A ham sandwich cut is a hyperplane h so that each open halfspace bounded by h contains at most n/2 points of 5*/, for / = 1 , . . . , d. It is known [142, 358] that such a cut always exists. Let Ft be the set of hyperplanes dual to 5/. Then the problem reduces to computing a vertex of the intersection of An/2(^i) and .4^/2(^2)Megiddo [276] developed a linear-time algorithm for computing a ham sandwich cut in the plane if Si and ^2 can be separated by a line. For arbitrary point sets in the plane, a linear-time algorithms was later developed by Lo et al. [257]. Lo et al. also described an algorithm for computing a ham sandwich cut in M^ whose running time is 0(i/n/2 (^) log^ n), where ij/kin) is the maximum complexity of the /^-level in an arrangement of n lines in the plane. By Dey's result on /^-levels [134], the running time of their algorithm is Oin'^/Hog^n).
104
P.K. Agarwal and M. Sharir
14.5. Robotics As mentioned in the introduction, motion planning for a robot system has been a major motivation for the study of arrangements. Let 5 be a robot system with d degrees of freedom, which is allowed to move freely within a given two- or three-dimensional environment cluttered with obstacles. Given two placements / and F of B, determining whether there exists a collision-free path between these placements reduces to determining whether / and F lie in the same cell of the arrangement of the family F of "contact surfaces" in W^, regarded as the configuration space of B (see the introduction for more details). If / and F lie in the same cell, then a path between / and F in R^ that does not intersect any surface of F corresponds to a collision-free path of B in the physical environment from / to F. Schwartz and Sharir [317] developed an n^ -time algorithm for this problem. If J is a part of the input, the problem was later proved to be PSPACE-complete [91,312]. Canny [90,92] gave an n^^^^-time algorithm to compute the roadmap of a single cell in an arrangement A(F) of a set F of n surfaces in R^ provided that the cells in A(F) form a Whitney regular stratification of R^ (see [194] for the definition of Whitney stratification). Using a perturbation argument, he showed that his approach can be extended to obtain a Monte Carlo algorithm to determine whether two points lie in the same cell of A(F). The algorithms was subsequently extended and improved by many researchers see [69, 195,230]. The best known algorithm, due to Basu et al. [69], can compute the roadmap in time n^-^^tf^(^ \ Much work has been done on developing efficient algorithms for robots with a small number of degrees of freedom, say, two or three [211,221,242]. The result by Schwarzkopf and Sharir [320] gives an efficient algorithm for computing a collision-free path between two given placements for fairly general robot systems with three degrees of freedom. See [214,318,329] for surveys on motion-planning algorithms. It is impractical to compute the roadmap, or any other explicit representation, of a single cell in A(F) if d is large. A general Monte Carlo algorithm for computing a probabilistic roadmap of a cell in A(F) is described by Kavraki et al. [240]. This approach avoids computing the cell explicitly. Instead, it samples a large number of random points in the configuration space and only those configurations that lie in the free configuration space (FP) are retained (they are called milestones); we also add / and F as milestones. The algorithm then builds a "connectivity graph" whose nodes are these milestones, and whose edges connect pairs of milestones if the line segment joining them in configuration space lies in F P (or if they satisfy some other "local reachability" rule). Various strategies have been proposed for choosing random configurations [40,66,234,239]. The algorithm returns a path from / to F if they lie in the same connected component of the resulting network. Note that this algorithm may fail to return a collision-free path from I to F even if there exists one. This technique nevertheless has been successful in several real-world applications. Assembly planning is another area in which the theory of arrangements has led to efficient algorithms. An assembly is a collection of objects (called parts) placed rigidly in some specified relative positions so that no two objects overlap. A subassembly of an assembly A is a subset of objects in A in their relative placements in A. An assembly operation is a motion that merges some subassemblies of A into a new and larger subassembly. An assembly sequence for A is a sequence of assembly operations that starts with the individual parts separated from each other and ends up with the full assembly A. The goal of assembly
Arrangements and their applications
105
planning is to compute an assembly sequence for a given assembly. A classical approach to assembly sequencing is disassembly sequencing, which separates an assembly into its individual parts [233]. The reverse order of a sequence of disassemblying operations yields an assembly sequence. Several kinds of motion have been considered in separating parts of an assembly, including translating a subassembly along a straight line, arbitrary translational motion, rigid motion, etc. A common approach to generate a disassembly sequence is the so-called nondirectional blocking graph approach. It partitions the space of all allowable motions of separation into a finite number of cells so that within each cell the set of "blocking relations" between all pairs of parts remains fixed. The problem is then reduced to computing representative points in cells of the arrangement of a family of surfaces. This approach has been successful in many instances, including polyhedral assembly with infinitesimal rigid motion [201]; see also [214,215]. Other problems in robotics that have exploited arrangements include fixturing [311], MEMS (micro electronic mechanical systems) [77], path planning with uncertainty [129], and manufacturing [30]. 14.6. Molecular modeling In the introduction, we described the Van der Waals model, in which a molecule M is represented as a collection F of spheres in R^. (See [125,145,277] for other geometric models of molecules.) Let i7 = 9(IJ T). 17 is called the "surface" of M. Many problems in molecular biology, especially those that study the interaction of a protein with another molecule, involve computing the molecular surface, a portion of the surface (e.g., the socalled active site of a protein), or various features of the molecular surface [147,216,253, 351]. We briefly describe two problems in molecular modeling that can be formulated in terms of arrangements. The chemical behavior of solute molecules in a solution is strongly dependent on the interactions between the solute and solvent molecules. These interactions are critically dependent on those molecular fragments that are accessible to the solvent molecules. Suppose we use the Van der Waals model for the solute molecule and model the solvent by a sphere S. By rolling S on the molecular surface i7, we obtain a new surface U\ traced by the center of the rolling sphere. If we enlarge each sphere of F by the radius of 5, U^ is the boundary of the union of the enlarged spheres. As mentioned above, several methods have been proposed to model the surface of a molecule. The best choice of the model depends on the chemical problem the molecular surface is supposed to represent. For example, the Van der Waals model represents the space requirement of molecular conformations, while isodensity contours and molecular electrostatic potential contour surfaces [277] are useful in studying molecular interactions. An important problem in molecular modeling is to study the interrelations among various molecular surfaces of the same molecule. For example, let X" = { U i , . . . , iJ^j be a family of molecular surfaces of the same molecule. We may want to compute the arrangement A{IJ), or we may want to compute the subdivision of Et induced by
[EjCMJill^Ji^i^m}. Researchers have also been interested in computing "connectivity" of a molecule, e.g., computing voids, tunnels, and pockets of 17. A void of U is a bounded component of
106
RK. Agarwal and M. Sharir
^^ \ (U ^ ) ' ^ tunnel is a hole through | J F that is accessible from the outside, i.e., an "inner" part of a non-contractible loop in R^ \ | J F ; and ?i pocket is a depression or cavity on E. Pockets are not holes in the topological sense and are not well defined; see [126,147] for some of the definitions proposed so far. Pockets and tunnels are interesting because they are good candidates to be binding sites for other molecules. Efficient algorithms have been developed for computing 17, connectivity of i7, and the arrangement A{r) [145,216,351]. Halperin and Shelton [222] describe an efficient perturbation scheme to handle degeneracies while constructing A{r) or U. Some applications require computing the measure of different substructures of A{r), including the volume of U, the surface area of E, or the volume of a void of E. Edelsbrunner et al. [146] describe an efficient algorithm for computing these measures; see also [144,145].
15. Conclusions In this survey we reviewed a wide range of topics on arrangements of surfaces. We mentioned a few old results, but the emphasis of the survey was on the tremendous progress made in this area during the last fifteen years. We discussed combinatorial complexity of arrangements and their substructures, representation of arrangements, algorithms for computing arrangements and their substructures, and several geometric problems in which arrangements play pivotal roles. Although the survey covered a broad spectrum of results, many topics on arrangements were either not included or very briefly touched upon. For example, we did not discuss arrangements of pseudo-lines and oriented matroids, we discussed algebraic and topological issues very briefly, and we mentioned a rather short list of applications that have exploited arrangements. There are numerous other sources where more details on arrangements and their applications can be found; see e.g. the books [74, 281,291,294,330] and the survey papers [192,213,283,293].
Acknowledgments The authors thank Boris Aronov, Saugata Basu, Bernard Chazelle, Herbert Edelsbrunner, Jeff Erickson, Leo Guibas, Dan Halperin, Sariel Har-Peled, Jifi Matousek, Ricky Pollack, Marie-Francoise Roy, Raimund Seidel, and Emo Welzl for several useful discussions, for valuable comments on an earlier version of the paper, and for pointing out a number of relevant papers.
References [1] RK. Agarwal, Partitioning arrangements of lines: I. An efficient deterministic algorithm. Discrete Comput. Geom. 5 (1990), 449-483. [2] RK. Agarwal, Partitioning arrangements of lines: II. Applications, Discrete Comput. Geom. 5 (1990), 533-573. [3] RK. Agarwal, Geometric partitioning and its applications, Computational Geometry: Papers from the DIMACS Special Year, I.E. Goodman, R. Pollack and W. Steiger, eds, Amer. Math. Soc, Providence, RI (1991), 1-37.
Arrangements
and their applications
107
[4] P.K. Agarwal, On stabbing lines for polyhedra in 3d, Comput. Geom. Theory Appl. 4 (1994), 177-189. [5] P.K. Agarwal, N. Amenta and M. Sharir, Placement of one convex polygon inside another. Discrete Comput. Geom. 19 (1998), 95-104. [6] P.K. Agarwal, L. Arge, J. Erickson, P.G. Franciosa and J.S. Vitter, Efficient searching with linear constraints, Proc. Annu. ACM Sympos. Principles Database Syst. (1998), 169-178. [7] P.K. Agarwal and B. Aronov, Counting facets and incidences. Discrete Comput. Geom. 7 (1992), 359-369. [8] P.K. Agarwal, B. Aronov, T.M. Chan and M. Sharir, On levels in arrangements of lines, segments, planes and triangles. Discrete Comput. Geom. 19 (1998), 315-331. [9] P.K. Agarwal, B. Aronov and M. Sharir, Computing envelopes in four dimensions with applications, SIAM J. Comput. 26 (1997), 1714-1732. [10] P.K. Agarwal, B. Aronov and M. Sharir, Line traversals of balls and smallest enclosing cylinders in three dimensions. Discrete Comput. Geom. 21 (1999), 373-388. [11] P.K. Agarwal, B. Aronov and M. Sharir, Motion planning for a convex polygon in a polygonal environment. Discrete Comput. Geom. 22 (1999), 201-221. [12] P.K. Agarwal, B. Aronov, M. Sharir and S. Suri, Selecting distances in the plane, Algorithmica 9 (1993), 495-514. [13] P.K. Agarwal, M. de Berg, J. Matousek and O. Schwarzkopf, Constructing levels in arrangements and higher order Voronoi diagrams, SIAM J. Comput. 27 (1998), 654-667. [14] P.K. Agarwal, A. Efrat and M. Sharir, Vertical decomposition of shallow levels in ?>-dimensional arrangements and its applications, Proc. 11th Annu. Sympos. Comput. Geom. (1995), 39-50. [15] P.K. Agarwal, A. Efrat, M. Sharir and S. Toledo, Computing a segment center for a planar point set, J. Algorithms 15 (1993), 314-323. [16] P.K. Agarwal and J. Erickson, Geometric range searching and its relatives. Advances in Discrete and Computational Geometry, B. Chazelle, J.E. Goodman and R. Pollack, eds, Amer. Math. Soc, Providence, RI (1998), 1-56. [17] P.K. Agarwal and J. Matousek, Ray shooting and parametric search, SIAM J. Comput. 22 (1993), 794806. [18] P.K. Agarwal and J. Matousek, On range searching with semialgebraic sets. Discrete Comput. Geom. 11 (1994), 393^18. [19] P.K. Agarwal and J. Matousek, Dynamic half-space range reporting and its applications, Algorithmica 13 (1995), 325-345. [20] P.K. Agarwal, J. Matousek and O. Schwarzkopf, Computing many faces in arrangements of lines and segments, SIAM J. Comput. 27 (1998), 491-505. [21] P.K. Agarwal, O. Schwarzkopf and M. Sharir, The overlay of lower envelopes and its applications. Discrete Comput. Geom. 15 (1996), 1-13. [22] P.K. Agarwal and M. Sharir, Red-blue intersection detection algorithms, with applications to motion planning and collision detection, SIAM J. Comput. 19 (1990), 297-321. [23] P.K. Agarwal and M. Sharir, On the number of views of polyhedral terrains. Discrete Comput. Geom. 12 (1994), 177-182. [24] P.K. Agarwal and M. Sharir, Efficient algorithms for geometric optimization, ACM Comput. Surv. 30 (1998), 412^58. [25] P.K. Agarwal and M. Sharir, Efficient randomized algorithms for some geometric optimization problems. Discrete Comput. Geom. 16 (1996), 317-337. [26] P.K. Agarwal and M. Sharir, Motion planning of a ball amidst segments in three dimensions, Proc. 10th ACM SIAM Sympos. Discrete Algo. [27] P.K. Agarwal and M. Sharir, Pipes, cigars, and kreplach: The union of Minkowski sums in three dimensions, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 143-153. [28] P.K. Agarwal, M. Sharir and S. Toledo, Applications of parametric searching in geometric optimization, J. Algorithms 17 (1994), 292-318. [29] P.K. Agarwal, M. van Kreveld and M. Overmars, Intersection queries in curved objects, J. Algorithms 15 (1993), 229-266. [30] H.-K. Ahn, M. de Berg, P. Bose, S.-W. Cheng, D. Halperin, J. Matousek and O. Schwarzkopf, Separating an object from its cast, Proc. 13th Annu. Sympos. Comput. Geom. (1997), 221-230.
108
RK. Agarwal and M. Sharir
[31] M. Ajtai, V. Chvatal, M. Newborn and E. Szemeredi, Crossing-free subgraphs, Ann. Discrete Math. 12 (1982), 9-12. [32] G.L. Alexanderson and J.E. Wetzel, Dissections of a plane oval, Amer. Math. Monthly 84 (1977), 442449. [33] G.L. Alexanderson and J.E. Wetzel, Simple partitions of space. Math. Mag. 51 (1978), 220-225. [34] G.L. Alexanderson and J.E. Wetzel, Arrangements ofplanes in space. Discrete Math. 34 (1981), 219-240. [35] N. Alon, Tools from higher algebra. Handbook of Combinatorics, R.L. Graham, M. Grotschel and L. Lovasz, eds, Elsevier, Amsterdam (1995), 1749-1783. [36] N. Alon, I. Barany, Z. Fiiredi and D. Kleitman, Point selections and weak s-netsfor convex hulls, Combin. Probab. Comput. 1 (1992), 189-200. [37] N. Alon and E. Gyori, The number of small semispaces of a finite set of points in the plane, J. Combin. Theory Ser. A 41 (1986), 154-157. [38] H. Alt, S. Felsner, F. Hurtado and M. Noy, Point sets with few k-sets, Proc. 14th Symp. Comput. Geom. (1998), 200-205. [39] H. Alt, R. Fleischer, M. Kaufmann, K. Mehlhom, S. Naher, S. Schirra and C. Uhrig, Approximate motion planning and the complexity of the boundary of the union of simple geometric figures, Algorithmica 8 (1992), 391^06. [40] N. Amato, O.B. Bayazit, L.K. Dale, C. Jones and D. Vallejo, OBPRM: An obstacle-based PRM for 3D workspaces, Proc. Workshop on Algorithmic Foundations of Robotics, P.K. Agarwal, L.E. Kavraki and M. Mason, eds, A.K. Peters, Wellesley, MA (1998), 155-168. [41] E.G. Anagnostou, L.J. Guibas and V.G. Polimenis, Topological sweeping in three dimensions, Proc. 1st Annu. SIGAL Intemat. Sympos. Algorithms, Lecture Notes in Comput. Sci. 450, Springer-Verlag (1990), 310-317. [42] A. Andrzejak, B. Aronov, S. Har-Peled, R. Seidel and E. Welzl, Results on k-sets and j-facets via continuous motion arguments, Proc. 14th Symp. Comput. Geom. (1998), 192-199. [43] D.S. Amon, G.E. Collins and S. McCallum, Cylindrical algebraic decomposition II: The adjacency algorithm for the plane, SIAM J. Comput. 13 (1984), 878-889. [44] B. Aronov, A lower bound on Voronoi diagram complexity. Unpublished manuscript (1998). [45] B. Aronov, M. Bern and D. Eppstein, Arrangements of convex polytopes. Unpublished manuscript (1995). [46] B. Aronov, B. Chazelle, H. Edelsbrunner, L.J. Guibas, M. Sharir and R. Wenger, Points and triangles in the plane and halving planes in space. Discrete Comput. Geom. 6 (1991), 435^42. [47] B. Aronov and T. Dey, Polytopes in arrangements, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 154-162. [48] B. Aronov, H. Edelsbrunner, L.J. Guibas and M. Sharir, The number of edges of many faces in a line segment arrangement, Combinatorica 12 (1992), 261-274. [49] B. Aronov, A. Efrat, D. Halperin and M. Sharir, On the number of regular vertices on the union of Jordan regions, Proc. 6th Scandinavian Workshop on Algorithm Theory (1998), 322-334. [50] B. Aronov, J. Matousek and M. Sharir, On the sum of squares of cell complexities in hyperplane arrangements, J. Combin. Theory Ser. A 65 (1994), 311-321. [51] B. Aronov, M. Pellegrini and M. Sharir, On the zone of a surface in a hyperplane arrangement. Discrete Comput. Geom. 9 (1993), 177-186. [52] B. Aronov and M. Sharir, Triangles in space or building {and analyzing) castles in the air, Combinatorica 10(1990), 137-173. [53] B. Aronov and M. Sharir, The union of convex polyhedra in three dimensions, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (1993), 518-527. [54] B. Aronov and M. Sharir, Castles in the air revisited. Discrete Comput. Geom. 12 (1994), 119-150. [55] B. Aronov and M. Sharir, The common exterior of convex polygons in the plane, Comput. Geom. 8 (1997), 139-149. [56] B. Aronov and M. Sharir, On translational motion planning of a convex polyhedron in 3-space, SIAM J. Comput. 26 (1997), 1785-1803. [57] B. Aronov, M. Sharir and B. Tagansky, The union of convex polyhedra in three dimensions, SIAM J. Comput. 26 (1997), 1670-1688. [58] T. Asano, L.J. Guibas and T. Tokuyama, Walking on an arrangement topologically, Intemat. J. Comput. Geom. Appl. 4 (1994), 123-151.
Arrangements
and their applications
109
[59] F. Aurenhammer, Voronoi diagrams: A survey of a fundamental geometric data structure, ACM Comput. Surv. 23 (1991), 345-405. [60] D. Avis, D. Bremner and R. Seidel, How good are convex hull algorithms!, Comput. Geom. 7 (1997), 265-302. [61] D. Avis and K. Fukuda, A pivoting algorithm for convex hulls and vertex enumeration of arrangements andpolyhedra. Discrete Comput. Geom. 8 (1992), 295-313. [62] D. Avis and K. Fukuda, Reverse search for enumeration. Discrete Appl. Math. 65 (1996), 2 1 ^ 6 . [63] I.J. Balaban, An optimal algorithm for finding segment intersections, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 211-219. [64] I. Barany, Z. Fiiredi and L. Lovasz, On the number of halving planes, Combinatorica 10 (1990), 175-183. [65] I. Barany and W. Steiger, On the expected number ofk-sets. Discrete Comput. Geom. 11 (1994), 243-263. [66] J. Barraquand and J.-C. Latombe, Robot motion planning: A distributed representation approach, Intemat. J. Robot. Res. 10 (1991), 628-649. [67] S. Basu, On the combinatorial and topological complexity of a single cell, Proc. 39th Annual JEEE Sympos. on Foundations of Comp. Sci. (1999), 606-616. [68] S. Basu, R. Pollack and M.-F Roy, On the number of cells defined by a family ofpolynomials on a variety, Mathematika 43 (1994), 120-126. [69] S. Basu, R. Pollack and M.-F. Roy, Computing roadmaps of semi-algebraic sets, Proc. 28th Annu. ACM Sympos. Theory Comput. (1996), 168-173. [70] S. Basu, R. Pollack and M.-F. Roy, On computing a set of points meeting every semi-algebraically connected component of a family ofpolynomials on a variety, J. Complexity 13 (1997), 28-37. [71] S. Basu, R. Pollack and M.-F. Roy, Complexity of computing semi-algebraic descriptions of the connected components of a semi-algebraic set. Unpublished manuscript (1998). [72] J.L. Bentley and T.A. Ottmann, Algorithms for reporting and counting geometric intersections, IEEE Trans. Comput. C-28 (1979), 643-647. [73] S. Bespamyatnikh, An efficient algorithm for the three-dimensional diameter problem, Proc. 9th Annu. ACM-SIAM Sympos. Discrete Algorithms (1998), 137-146. [74] A. Bjomer, M. Las Vergnas, N. White, B. Sturmfels and G.M. Ziegler, Oriented Matroids, Cambridge University Press, Cambridge (1993). [75] A. Bjomer and G.M. Ziegler, Combinatorial stratification of complex arrangements, J. Amer. Math. Soc. 5 (1992), 105-149. [76] J. Bochnak, M. Coste and M.-F. Roy, Geometric Algebrique Reelle, Springer-Verlag, Heidelberg, West Germany (1987). [77] K.-F Bohringer, B. Donald and D. Halperin, The area bisectors of a polygon and force equilibria in programmable vector fields, Proc. 13th Annu. Sympos. Comput. Geom. (1997), 457^59. [78] J.-D. Boissonnat and K. Dobrindt, Randomized construction of the upper envelope of triangles in R , Proc. 4th Canad. Conf. Comput. Geom. (1992), 311-315. [79] J.-D. Boissonnat and K. Dobrindt, On-line construction of the upper envelope of triangles and surface patches in three dimensions, Comput. Geom. 5 (1996), 303-320. [80] J.-D. Boissonnat, M. Sharir, B. Tagansl^y and M. Yvinec, Voronoi diagrams in higher dimensions under certain polyhedral distance functions. Discrete Comput. Geom. 19 (1998), 485^19. [81 ] K. W. Bowyer and C.R. Dyer, Aspect graphs: An introduction and survey of recent results. Int. J. of Imaging Systems and Technology 2 (1990), 315-328. [82] D. Bremner, K. Fukuda and M. Marzetta, Primal-dual methods for vertex and facet enumeration, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 49-56. [83] E. Brisson, Representing geometric structures in d dimensions: Topology and order. Discrete Comput. Geom. 9 (1993), 387-426. [84] H. Bronnimann and B. Chazelle, Optimal slope selection via cuttings, Proc. 6th Canad. Conf. Comput. Geom. (1994), 99-103. [85] H. Bronnimann, B. Chazelle and J. Matousek, Product range spaces, sensitive sampling and derandomization, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (1993), 400-409. [86] U.A. Brousseau, A mathematician's progress, Math. Teacher 59 (1966), 722-727. [87] R.C. Buck, Partition of space, Amer. Math. Monthly 50 (1943), 541-544.
110
RK. Agarwal and M. Sharir
[88] C. Bumikel, K. Mehlhom and S. Schirra, On degeneracy in geometric computations, Proc. 5th ACMSIAM Sympos. Discrete Algorithms (1994), 16-23. [89] R. Canham, A theorem on arrangements of lines in the plane, Israel J. Math. 7 (1969), 393-397. [90] J. Canny, The Complexity of Robot Motion Planning, MIT Press, Cambridge, MA (1987). [91] J. Canny, Some algebraic and geometric computations in PSPACE, Proc. 20th Annu. ACM Sympos. Theory Comput. (1988), 460-467. [92] J. Canny, Computing roadmaps in general semialgebraic sets, Comput. J. 36 (1993), 409^18. [93] J. Canny, Improved algorithms for sign determination and existential quantifier elimination, Comput. J. 36(1993), 504-514. [94] J.F. Canny, D. Grigor'ev and N. Vorobjov, Finding connected components of a semi-algebraic set in subexponential time, Appl. Algebra Emg. Commun. Comput. 2 (1992), 217-238. [95] T.M. Chan, Optimal output-sensitive convex hull algorithms in two and three dimensions. Discrete Comput. Geom. 16 (1996), 361-368. [96] T.M. Chan, Output-sensitive results on convex hulls, extreme points and related problems. Discrete Comput. Geom. 16 (1996), 369-387. [97] T.M. Chan, Geometric applications of a randomized optimization technique, Proc. 14th ACM Symp. Comput. Geom. (1998), 269-278. [98] T. Chan, Remarks on k-level algorithms in the plane. Unpublished manuscript (1999). [99] T.M. Chan, J. Snoeyink and C.K. Yap, Primal dividing and dual pruning: Output-sensitive construction of 4-dpolytopes and 3-d Voronoi diagrams. Discrete Comput. Geom. 18 (1997), 433^54. [100] B. Chazelle, Cutting hyperplanes for divide-and-conquer. Discrete Comput. Geom. 9 (1993), 145-158. [101] B. Chazelle, An optimal convex hull algorithm in any fixed dimension, Discrete Comput. Geom. 10 (1993), 377^09. [102] B. Chazelle and H. Edelsbrunner, An optimal algorithm for intersecting line segments in the plane, J. ACM 39 (1992), 1-54. [103] B. Chazelle, H. Edelsbrunner, L.J. Guibas and M. Sharir, A singly-exponential stratification scheme for real semi-algebraic varieties and its applications, Proc. 16th Internal. Colloq. Automata Lang. Program., Lecture Notes Comput. Sci. 372, Springer-Verlag (1989), 179-192. [104] B. Chazelle, H. Edelsbrunner, L.J. Guibas and M. Sharir, A singly-exponential stratification scheme for real semi-algebraic varieties and its applications, Theoret. Comput. Sci. 84 (1991), 77-105. [105] B. Chazelle, H. Edelsbrunner, L.J, Guibas and M. Sharir, Diameter, width, closest line pair and parametric searching. Discrete Comput. Geom. 10 (1993), 183-196. [106] B. Chazelle, H. Edelsbrunner, L.J. Guibas, M. Sharir and J. Snoeyink, Computing a face in an arrangement of line segments and related problems, SIAM J. Comput. 22 (1993), 1286-1302. [107] B. Chazelle, H. Edelsbrunner, L.J. Guibas, M. Sharir and J. Stolfi, Lines in space: Combinatorics and algorithms, Algorithmica 15 (1996), 428-447. [108] B. Chazelle and J. Friedman, A deterministic view of random sampling and its use in geometry, Combinatorica 10 (1990), 229-249. [109] B. Chazelle and J. Friedman, Point location among hyperplanes and unidirectional ray-shooting, Comput. Geom. 4 (1994), 53-62. [110] B. Chazelle, L.J. Guibas and D.T. Lee, The power of geometric duality, BIT 25 (1985), 76-90. [ I l l ] B. Chazelle and J. Matousek, Derandomizing an output-sensitive convex hull algorithm in three dimensions, Comput. Geom. 5 (1995), 27-32. [112] B. Chazelle and F.P. Preparata, Half space range search: An algorithmic application of k-sets. Discrete Comput. Geom. 1 (1986), 83-93. [113] B. Chazelle, M. Sharir and E. Welzl, Quasi-optimal upper bounds for simplex range searching and new zone theorems, Algorithmica 8 (1992), 407^29. [114] L.P. Chew, Near-quadratic bounds for the L \ Voronoi diagram of moving points, Comput. Geom. 7 (1997), 73-80. [115] L.P. Chew, K. Kedem, M. Sharir, B. Tagansky and E. Welzl, Voronoi diagrams of lines in 3-space under polyhedral convex distance functions, J. Algorithms 29 (1998), 238-255. [116] K.L. Clarkson, New applications of random sampling in computational geometry. Discrete Comput. Geom. 2 (1987), 195-222. [117] K.L. Clarkson, A randomized algorithm for closest-point queries, SIAM J. Comput. 17 (1988), 830-847.
Arrangements
and their applications
111
[118] K. Clarkson, A bound on local minima of arrangements that implies the upper bound theorem. Discrete Comput. Geom. 10 (1993), 427-433. [119] K. Clarkson, D. Eppstein, G.L. Miller, C. Sturtivant and S.-H. Teng, Approximating center points with iterative Radon points, Intemat. J. Comput. Geom. Appl. 6 (1996), 357-377. [120] K.L. Clarkson and P.W. Shor, Applications of random sampling in computational geometry, II, Discrete Comput. Geom. 4 (1989), 387-421. [121] K.L. Clarkson, H. Edelsbrunner, L.J. Guibas, M. Sharir and E. Welzl, Combinatorial complexity bounds for arrangements of curves and spheres. Discrete Comput. Geom. 5 (1990), 99-160. [122] R. Cole, J. Salowe, W. Steiger and E. Szemeredi, An optimal-time algorithm for slope selection, SIAM J. Comput. 18 (1989), 792-810. [123] R. Cole, M. Sharir and C.K. Yap, On k-hulls and related problems, SIAM J. Comput. 16 (1987), 61-77. [124] G.E. Collins, Quantifier elimination for real closed fields by cylindrical algebraic decomposition, Proc. 2nd GI Conference on Automata Theory and Formal Languages, Lecture Notes in Comput. Sci. 33, Springer-Verlag, Berlin, West Germany (1975), 134-183. [125] M.L. Connolly, Analytical molecular surface calculation, J. Appl. Cryst. 16 (1983), 548-558. [126] T.H. Connolly, Molecular interstitial skeleton. Computer Chem. 15 (1991), 37-45. [127] M. de Berg, Ray Shooting, Depth Orders and Hidden Surface Removal, Springer-Verlag, Berlin, Germany (1993). [128] M. de Berg, K. Dobrindt and O. Schwarzkopf, On lazy randomized incremental construction. Discrete Comput. Geom. 14 (1995), 261-286. [129] M. de Berg, L. Guibas, D. Halperin, M. Overmars, O. Schwarzkopf, M. Sharir and M. Teillaud, Reaching a goal with directional uncertainty, Theoret. Comput. Sci. 140 (1995), 301-317. [130] M. de Berg, L.J. Guibas and D. Halperin, Vertical decompositions for triangles in 3-space, Discrete Comput. Geom. 15 (1996), 35-61. [131] M. de Berg, D. Halperin, M. Overmars and M. van Kreveld, Sparse arrangements and the number of views ofpolyhedral scenes, Intemat. J. Comput. Geom. Appl. 7 (1997), 175-195. [132] M. de Berg, M. van Kreveld, M. Overmars and O. Schwarzkopf, Computational Geometry: Algorithms and Applications, Springer-Verlag, Berlin, Germany (1997). [133] M. de Berg, M. van Kreveld, O. Schwarzkopf and J. Snoeyink, Point location in zones of k-flats in arrangements, Comput. Geom. 6 (1996), 131-143. [134] T.K. Dey, Improved bounds on planar k-sets and related problems. Discrete Comput. Geom. 19 (1998), 373-382. [135] T.K. Dey and H. Edelsbrunner, Counting triangle crossings and halving planes. Discrete Comput. Geom. 12(1994), 281-289. [136] D.R Dobkin, L.J. Guibas, J. Hershberger and J. Snoeyink, An efficient algorithm for finding the CSG representation of a simple polygon, Comput. Graph. 22 (1988), 31-40. Proc. SIGGRAPH '88. [137] D.P. Dobkin and D.G. Kirkpatrick, Fast detection of polyhedral intersection, Theoret. Comput. Sci. 27 (1983), 241-253. [138] D.P. Dobkin and M.J. Laszlo, Primitives for the manipulation of three-dimensional subdivisions, Algorithmica4(1989), 3-32. [139] D.P. Dobkin and S. Teller, Computer graphics. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, PL (1997), 779-796. [140] R.A. Dwyer, Voronoi diagrams of random lines and flats. Discrete Comput. Geom. 17 (1997), 123-136. [141] H. Edelsbrunner, Edge-skeletons in arrangements with applications, Algorithmica 1 (1986), 93-109. [142] H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer-Verlag, Heidelberg (1987). [143] H. Edelsbrunner, The upper envelope of piecewise linear functions: Tight complexity bounds in higher dimensions. Discrete Comput. Geom. 4 (1989), 337-343. [144] H. Edelsbrunner, The union of balls and its dual shape. Discrete Comput. Geom. 13 (1995), 415^40. [145] H. Edelsbrunner, Geometry of modeling biomolecules, Proc. Workshop on Algorithmic Foundations of Robotics, PK. Agarwal, L.E. Kavraki and M. Mason, eds, A.K. Peters, Wellesley, MA (1998), 265-277. [146] H. Edelsbrunner, M. Facello, P. Fu and J. Liang, Measuring proteins and voids in proteins, Proc. 28th Ann. Hawaii Internat. Conf. System Sciences, Biotechnology Computing, Vol. V (1995), 256-264.
112
RK. Agarwal and M. Sharir
[147] H. Edelsbrunner, M. Facello and J. Liang, On the definition and the construction of pockets in macromolecules. Tech. Report IULU-ENG-95-1736, Department of Computer Science, University of Illinois at Urbana-Champaign (1995). [148] H. Edelsbrunner and L.J. Guibas, Topologically sweeping an arrangement, J. Comput. Syst. Sci. 38 (1989), 165-194. Corrigendum in 42 (1991), 249-251. [149] H. Edelsbrunner, L.J. Guibas, J. Hershberger, J. Pach, R. Pollack, R. Seidel, M. Sharir and J. Snoeyink, Arrangements of Jordan arcs with three intersections per pair, Discrete Comput. Geom. 4 (1989), 523539. [150] H. Edelsbrunner, L.J. Guibas, J. Pach, R. Pollack, R. Seidel and M. Sharir, Arrangements of curves in the plane: Topology, combinatorics and algorithms, Theoret. Comput. Sci. 92 (1992), 319-336. [151] H. Edelsbrunner, L.J. Guibas and M. Sharir, The upper envelope ofpiecewise linear functions: Algorithms and applications. Discrete Comput. Geom. 4 (1989), 311-336. [152] H. Edelsbrunner, L.J. Guibas and M. Sharir, The complexity and construction of many faces in arrangements of lines and of segments. Discrete Comput. Geom. 5 (1990), 161-196. [153] H. Edelsbrunner, L.J. Guibas and M. Sharir, The complexity of many cells in arrangements of planes and related problems. Discrete Comput. Geom. 5 (1990), 197-216. [154] H. Edelsbrunner and P. Hajnal, A lower bound on the number of unit distances between the vertices of a convex polygon, J. Combin. Theory Ser. A 56 (1991), 312-316. [155] H. Edelsbrunner and D. Haussler, The complexity of cells in three-dimensional arrangements. Discrete Math. 60 (1986), 139-146. [156] H. Edelsbrunner and E.P. Miicke, Simulation of simplicity: A technique to cope with degenerate cases in geometric algorithms, ACM Trans. Graph. 9 (1990), 66-104. [157] H. Edelsbrunner, J. O'Rourke and R. Seidel, Constructing arrangements of lines and hyperplanes with applications, SIAM J. Comput. 15 (1986), 341-363. [158] H. Edelsbrunner and R. Seidel, Voronoi diagrams and arrangements. Discrete Comput. Geom. 1 (1986), 25^4. [159] H. Edelsbrunner, R. Seidel and M. Sharir, On the zone theorem for hyperplane arrangements, SIAM J. Comput. 22 (1993), 418^29. [160] H. Edelsbrunner and M. Sharir, A hyperplane incidence problem with applications to counting distances, Applied Geometry and Discrete Mathematics: The Victor Klee Festschrift, P. Gritzman and B. Sturmfels, eds, AMS Press, Providence, RI (1991), 253-263. [161] H. Edelsbrunner and D.L. Souvaine, Computing median-of-squares regression lines and guided topological sweep, J. Amer. Statist. Assoc. 85 (1990), 115-119. [162] H. Edelsbrunner, P. Valtr and E. Welzl, Cutting dense point sets in half. Discrete Comput. Geom. 17 (1997), 243-255. [163] H. Edelsbrunner and E. Welzl, On the number of line separations of a finite set in the plane, J. Combin. Theory Ser. A 40 (1985), 15-29. [164] H. Edelsbrunner and E. Welzl, Constructing belts in two-dimensional arrangements with applications, SIAM J. Comput. 15 (1986), 271-284. [165] H. Edelsbrunner and E. Welzl, On the maximal number of edges of many faces in an arrangement, J. Combin. Theory Ser. A 41 (1986), 159-166. [166] A. Efrat, The complexity of the union of {a, fi)-covered objects, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 134-142. [167] A. Efrat and M. Katz, On the union ofa-curved objects, Proc. 14th Annual Sympos. on Comput. Geom. (1998), 206-213. [168] A. Efrat, G. Rote and M. Sharir, On the union of fat wedges and separating a collection of segments by a line, Comput. Geom. 3 (1993), 277-288. [169] A. Efrat and M. Sharir, A near-linear algorithm for the planar segment center problem. Discrete Comput. Geom. 16 (1996), 239-257. [170] A. Efrat and M. Sharir, On the complexity of the union of fat objects in the plane, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 104-112. [171] I. Emiris and J. Canny, A general approach to removing degeneracies, SIAM J. Comput. 24 (1995), 650664.
Arrangements
and their applications
113
[172] I.Z. Emiris, J.F. Canny and R. Seidel, Efficient perturbations for handling geometric degeneracies, Algorithmica 19 (1997), 219-242. [173] D. Eppstein, Improved bounds for intersecting triangles and halving planes, J. Combin. Theory Ser. A 62 (1993), 176-182. [174] D. Eppstein, Geometric lower bounds for parametric optimization problems. Discrete Comput. Geom. 20 (1998), 463^76. [175] P. Erdos, On a set of distances ofn points, Amer. Math. Monthly 53 (1946), 248-250. [176] P. Erdos, L. Lovasz, A. Simmons and E. Straus, Dissection graphs of planar point sets, A Survey of Combinatorial Theory, J.N. Srivastava, ed., North-Holland, Amsterdam, Netherlands (1973), 139-154. [177] J. Erickson, New lower bounds for Hopcroft's problem. Discrete Comput. Geom. 16 (1996), 389^18. [178] H. Everett, J.-M. Robert and M. van Kreveld, An optimal algorithm for the (^k)-levels, with applications to separation and transversal problems, Internat. J. Comput. Geom. Appl. 6 (1996), 247-261. [179] M. Falk and R. Randell, On the homotopy theory in arrangements. Complex Analytic Singularities, NorthHolland, Amsterdam (1987), 101-124. [180] S. Felsner, On the number of arrangements ofpseudolines. Discrete Comput. Geom. 18 (1997), 257-267. [181] S. Fortune, Progress in computational geometry. Directions in Computational Geometry, R. Martin, ed., Information Geometers (1993), 81-128. [182] S. Fortune and V. Milenkovic, Numerical stability of algorithms for line arrangements, Proc. 7th Annu. ACM Sympos. Comput. Geom. (1991), 334-341. [183] G.N. Frederickson and D.B. Johnson, The complexity of selection and ranking inX + Y and matrices with sorted rows and columns, J. Comput. Syst. Sci. 24 (1982), 197-208. [184] J.-J. Fu and R.C.T. Lee, Voronoi diagrams of moving points in the plane, Internat. J. Comput. Geom. Appl. 1 (1991), 23-32. [185] K. Fuioida, T. Liebling and F. Margot, Analysis of backtrack algorithms for listig all vertices and all faces of a convex polyhedron, Comput. Geom. 8 (1997), 1-12. [186] K. Fukuda, S. Saito and A. Tamura, Combinatorial face enumeration in arrangements and oriented matroids. Discrete Appl. Math. 31 (1991), 141-149. [187] K. Fukuda, S. Saito, A. Tamura and T. Tokuyama, Bounding the number of k-faces in arrangements of hyperplanes. Discrete Appl. Math. 31 (1991), 151-165. [188] Z. Fliredi, The maximum number of unit distances in a convex n-gon, J. Combin. Theory Ser. A 55 (1990), 316-320. [189] A. Gabrielov and N. Vorobjov, Complexity of stratification of semi-pfaffian sets. Discrete Comput. Geom. 14 (1995), 71-91. [190] J.E. Goodman and R. Pollack, On the number of k-subsets of a set ofn points in the plane, J. Combin. Theory Ser. A 36 (1984), 101-104. [191] J.E. Goodman and R. Pollack, Semispaces of configurations, cell complexes of arrangements, J. Combin. Theory Ser. A 37 (1984), 257-293. [192] J.E. Goodman and R. Pollack, Allowable sequences and order types in discrete and computational geometry. New Trends in Discrete and Computational Geometry, J. Pach, ed., Springer-Verlag (1993), 103-134. [193] M.T. Goodrich, Constructing arrangements optimally in parallel. Discrete Comput. Geom. 9 (1993), 371385. [194] M. Goresky and R. MacPherson, Stratified Morse Theory, Springer-Verlag, Heidelberg, Germany, 1987. [195] L. Goumay and J.-J. Risler, Construction of roadmaps in semi-algebraic sets, Appl. Algebra Engrg. Comm. Comput. 4 (1993), 239-252. [196] D.H. Greene and F.F. Yao, Finite-resolution computational geometry, Proc. 27th Annu. IEEE Sympos. Found. Comput. Sci. (1986), 143-152. [197] D. Grigor'ev and N. Vorobjov, Counting connected components of a semi-algebraic set in subexponential time, Comput. Complexity 2 (1992), 133-186. [198] B. Griinbaum, Arrangements of hyperplanes, Congr. Numer. 3 (1971), 41-106. [199] B. Griinbaum, Arrangements and Spreads, Amer. Math. Soc, Providence, RI (1972). [200] L. Guibas and D. Marimont, Rounding arrangements dynamically, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 190-199.
114
RK. Agarwal and M. Sharir
[201] LJ. Guibas, D. Halperin, H. Hirukawa, J.-C. Latombe and R.H. Wilson, A simple and efficient procedure for assembly partitioning under infinitesimal motions, Proc. IEEE Intemat. Conf. Robot. Autom. (1995), 2553-2560. [202] L.J. Guibas, D. Halperin, J. Matousek and M. Sharir, On vertical decomposition of arrangements ofhyperplanes in four dimensions. Discrete Comput. Geom. 14 (1995), 113-122. [203] L.J. Guibas, J.S.B. Mitchell and T. Roos, Voronoi diagrams of moving points in the plane, Proc. 17th Intemat. Workshop Graph-Theoret. Concepts Comput. Sci., Lecture Notes in Comput. Sci. 570, SpringerVerlag (1991), 113-125. [204] L.J. Guibas, M.H. Overmars and J.-M. Robert, The exact fitting problem for points, Comput. Geom. 6 (1996), 215-230. [205] L.J. Guibas and M. Sharir, Combinatorics and algorithms of arrangements. New Trends in Discrete and Computational Geometry, J. Pach, ed.. Springer-Verlag, Heidelberg, Germany (1993), 9-36. [206] L.J. Guibas, M. Sharir and S. Sifrony, On the general motion planning problem with two degrees of freedom. Discrete Comput. Geom. 4 (1989), 491-521. [207] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans. Graph. 4 (1985), 74-123. [208] D. Gusfield, Bounds for the parametric spanning tree problem, Proc. West Coast Conf. Combinatorics, Graph Theory and Comput. (1979), 173-181. [209] H. Hadwiger, Eulers Charakteristik und kombinatorische Geometric, J. Reine Angew. Math. 134 (1955), 101-110. [210] T. Hagerup, H. Jung and E. Welzl, Efficient parallel computation of arrangements of hyperplanes in d dimensions, Proc. 2nd ACM Sympos. Parallel Algorithms Architect. (1990), 290-297. [211] D. Halperin, Algorithmic Motion Planning via Arrangements of Curves and of Surfaces, PhD thesis. Computer Science Department, Tel-Aviv University, Tel Aviv (1992). [212] D. Halperin, On the complexity of a single cell in certain arrangements of surfaces related to motion planning. Discrete Comput. Geom. 11 (1994), 1-34. [213] D. Halperin, Arrangements, Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 389-412. [214] D. Halperin, L.E. Kavraki and J.-C. Latombe, Robotics, Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 755-778. [215] D. Halperin, J.-C. Latombe and R.H. Wilson, A general framework for assembly planning: The motion space approach, Unpubhshed manuscript (1997). [216] D. Halperin and M.H. Overmars, Spheres, molecules and hidden surface removal, Comput. Geom. 11 (1998), 83-102. [217] D. Halperin and M. Sharir, On disjoint concave chains in arrangements ofipseudo) lines. Inform. Process. Lett. 40 (1991), 189-192. [218] D. Halperin and M. Sharir, New bounds for lower envelopes in three dimensions, with applications to visibility in terrains. Discrete Comput. Geom. 12 (1994), 313-326. [219] D. Halperin and M. Sharir, Almost tight upper bounds for the single cell and zone problems in three dimensions. Discrete Comput. Geom. 14 (1995), 385^10. [220] D. Halperin and M. Sharir, Arrangements and their applications in robotics: Recent developments, Proc. Workshop on Algorithmic Foundations of Robotics, K. Goldberg, D. Halperin, J.-C. Latombe and R. Wilson, eds, A.K. Peters, Wellesley, MA (1995), 495-511. [221] D. Halperin and M. Sharir, A near-quadratic algorithm for planning the motion of a polygon in a polygonal environment. Discrete Comput. Geom. 16 (1996), 121-134. [222] D. Halperin and C. Shelton, A perturbation scheme for spherical arrangements with application to molecular modeling, Comput. Geom. 10 (1998), 273-287. [223] D. Halperin and C.-K. Yap, Combinatorial complexity of translating a box in polyhedral 3-space, Comput. Geom. Theory Appl. 9 (1998), 181-196. [224] S. Har-Peled, Constructing cuttings in theory and practice, Proc. 14th Symp. Comput. Geom. (1998), 327-336. [225] S. Har-Peled, Talking a walk in a planar arrangement, Proc. 40th Annual Sympos. Foundations of Comp. Sci. (1999), to appear. [226] J. Harris, Algebraic Geometry (A First Course), Springer-Verlag, Berlin, Germany (1992).
Arrangements
and their applications
115
[227] D. Haussler and E. Welzl, Epsilon-nets and simplex range queries. Discrete Comput. Geom. 2 (1987), 127-151. [228] J. Heintz, T. Reico and M.-F. Roy, Algorithms in real algebraic geometry and applications to computational geometry. Discrete and Computational Geometry: Papers from the DIMACS Special Year, J.E. Goodman, R. Pollack and W. Steiger, eds, AMS Press, Providence, RI (1991), 137-163. [229] J. Heintz, M.-F. Roy and P. Solemo, On the complexity of semialgebraic sets, Proc. IFIP San Francisco (1989), 293-298. [230] J. Heintz, M.-F. Roy and P. Solemo, Single exponential path finding in semi-algebraic sets II: The general case. Algebraic Geometry and its Applications, C. Bajaj, ed.. Springer-Verlag, New York (1993), 467^81. [231] J. Heintz, M.-F. Roy and P. Solemo, Description of the connected components of a semialgebraic set in single exponential time. Discrete Comput. Geom. 11 (1994), 121-140. [232] J.E. Hershberger and J.S. Snoeyink, Erased arrangements of lines and convex decompositions ofpolyhedra, Comput. Geom. 9 (1998), 129-143. [233] L.S. Homem de Mello and A.C. Sanderson, A correct and complete algorithm for the generation of mechanical assembly sequences, IEEE Trans. Robot. Autom. 7 (1991), 228-240. [234] D. Hsu, L.E. Kavraki, J.-C. Latombe, R. Motwani and S. Sorkin, On finding narrow passages with probabilistic roadmap planners, Proc. 1998 Workshop on the Algorithmic Foundations of Robotics, P.K. Agarwal, L.E. Kavraki and M. Mason, eds, A.K. Peters, Wellesley, MA (1998), 141-153. [235] N. Katoh, H. Tamaki and T. Tokuyama, Parametric polymatroid optimization and its geometric applications, Proc. 10th ACM-SIAM Sympos. Discrete Algorithms (1999), 517-526. [236] N. Katoh and T. Tokuyama, Lovdsz lemma for the three-dimensional k-level of concave surfaces and its applications, Proc. 40th Annual Sympos. Foundations of Comp. Sci. (1999), to appear. [237] M.J. Katz and M. Sharir, Optimal slope selection via expanders. Inform. Process. Lett. 47 (1993), 115122. [238] M.J. Katz and M. Sharir, An expander-based approach to geometric optimization, SIAM J. Comput. 26 (1997), 1384-1408. [239] L.E. Kavraki, J.-C. Latombe, R. Motwani and P. Raghavan, Randomized query processing in robot path planning, Proc. 27th Annu. ACM Sympos. Theory Comput. (1995), 353-362. [240] L.E. Kavraki, P. Svestka, J.-C. Latombe and M.H. Overmars, Probabilistic roadmaps for path planning in high dimensional configuration spaces, IEEE Trans. Robot. Autom. 12 (1996), 566-580. [241] K. Kedem, R. Livne, J. Pach and M. Sharir, On the union of Jordan regions and collision-free translational motion amidst polygonal obstacles. Discrete Comput. Geom. 1 (1986), 59-71. [242] K. Kedem and M. Sharir, An efficient motion planning algorithm for a convex rigid polygonal object in 2-dimensional polygonal space. Discrete Comput. Geom. 5 (1990), 43-75. [243] K. Kedem, M. Sharir and S. Toledo, On critical orientations in the Kedem-Sharir motion planning algorithm for a convex polygon in the plane. Discrete Comput. Geom. 17 (1997), 227-240. [244] L, Kettner, Designing a data structure for polyhedral surfaces, Proc. 14th Symp. Comput. Geom. (1998), 146-154. [245] A.G. Khovanskii, Fewnomials, Amer. Math. Soc, Providence, RI (1991). [246] D.G. Kirkpatrick and R. Seidel, The ultimate planar convex hull algorithm!, SIAM J. Comput. 15 (1986), 287-299. [247] M. Klawe, M. Paterson and N. Pippenger, Inversions with ^2^+'^^^+^^°S«) transpositions at the median. Unpublished manuscript (1982). [248] V. IGee, On the complexity of d-dimensional Voronoi diagrams. Arch. Math. 34 (1980), 75-80. [249] M. Las Vergnas, Convexity in oriented matroids, J. Comb. Theory, Ser. B 29 (1980), 231-243. [250] J.-C. Latombe, Robot Motion Planning, Kluwer Acad. Publ., Boston (1991). [251] B. Lee and F.M. Richards, The interpretation of protein structure: Estimation of static accessibility, J. Molecular Biology 55 (1971), 379-400. [252] F.T. Leighton, Complexity Issues in VLSI, MIT Press, Cambridge, MA (1983). [253] T. Lengauer, Algorithmic research problems in molecular bioinformatics, Proc. 2nd IEEE Israeli Sympos. Theory of Comput. and Systems (1993), 177-192. [254] D, Leven and M. Sharir, On the number of critical free contacts of a convex polygonal object moving in two-dimensional polygonal space. Discrete Comput. Geom. 2 (1987), 255-270.
116
RK. Agarwal and M. Sharir
[255] P. Lienhardt, Topological models for boundary representation: A comparison with n-dimensional generalized maps, Comput. Aided Design 23 (1991), 59-82. [256] P. Lienhardt, N-dimensional generalized combinatorial maps and cellular quasi-manifolds, Intemat. J. Comput. Geom. Appl. 4 (1994), 275-324. [257] C.-Y. Lo, J. Matousek and W.L. Steiger, Algorithms for ham-sandwich cuts, Discrete Comput. Geom. 11 (1994), 433^52. [258] L. Lovasz, On the number of halving lines, Ann. Uni. Sci. Budapest de Rolando Eotvos Nominatae, Sectio Math. 14(1971), 107-108. [259] J. Matousek, Construction of e-nets. Discrete Comput. Geom. 5 (1990), 427-448. [260] J. Matousek, Computing the center of planar point sets. Computational Geometry: Papers from the DIMACS Special Year, J.E. Goodman, R. Pollack and W. Steiger, eds, Amer. Math. Soc, Providence, RI (1991), 221-230. [261] J. Matousek, Lower bounds on the length of monotone paths in arrangements. Discrete Comput. Geom. 6 (1991), 129-134. [262] J. Matousek, Randomized optimal algorithm for slope selection. Inform. Process. Lett. 39 (1991), 183187. [263] J. Matousek, Efficient partition trees. Discrete Comput. Geom. 8 (1992), 315-334. [264] J. Matousek, Reporting points in halfspaces, Comput. Geom. 2 (1992), 169-186. [265] J. Matousek, Epsilon-nets and computational geometry. New Trends in Discrete and Computational Geometry, J, Pach, ed.. Springer-Verlag, Heidelberg, Germany (1993), 69-89. [266] J. Matousek, Linear optimization queries, J. Algorithms 14 (1993), 432^148. [267] J. Matousek, On vertical ray shooting in arrangements, Comput. Geom. 2 (1993), 279-285. [268] J. Matousek, Range searching with efficient hierarchical cuttings. Discrete Comput. Geom. 10 (1993), 157-182. [269] J. Matousek, Geometric range searching, ACM Comput. Surv. 26 (1994), 421^61. [270] J. Matousek, J. Pach, M. Sharir, S. Sifrony and E. Welzl, Fat triangles determine linearly many holes, SIAM J. Comput. 23 (1994), 154-169. [271] J. Matousek and O. Schwarzkopf, On ray shooting in convex polytopes. Discrete Comput. Geom. 10 (1993), 215-232. [272] J. Matousek and O. Schwarzkopf, A deterministic algorithm for the three-dimensional diameter problem, Comput. Geom. 6 (1996), 253-262. [273] P. McMullen and G.C. Shephard, Convex Polytopes and the Upper Bound Conjecture, Cambridge University Press, Cambridge (1971). [274] J. Mecke, Random tesselations generated by hyperplanes. Stochastic Geometry, Geometric Statistics, Stereology, Teubner, Leipzig (1984), 104-109. [275] N. Megiddo, Applying parallel computation algorithms in the design of serial algorithms, J. ACM 30 (1983), 852-865. [276] N. Megiddo, Partitioning with two lines in the plane, J. Algorithms 6 (1985), 430^33. [277] P.G. Mezey, Molecular surfaces, Reviews in Computational Chemistry, K.B. Lipkowitz and D.B. Boyd, eds. Vol. 1, VCH Publishers (1990). [278] V. Milenkovic, Calculating approximate curve arrangements using rounded arithmetic, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 197-207. [279] V. Milenkovic, Double precision geometry: A general technique for calculating line and segment intersections using rounded arithmetic, Proc. 30th Annu. IEEE Sympos. Found. Comput. Sci. (1989), 500-505. [280] V. Milenkovic, Robust polygon modeling, Comput. Aided Design 25 (1993). [281] J.W. Milnor, Morse Theory, Princeton University Press, Princeton, NJ (1963). [282] J.W. Milnor, On the Betti numbers of real algebraic varieties, Proc. Amer. Math. Soc. 15 (1964), 275-280. [283] B. Mishra, Computational real algebraic geometry. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, PL (1997), 537-558. [284] K. Mulmuley, A fast planar partition algorithm, I, J. Symbolic Comput. 10 (1990), 253-280. [285] K. Mulmuley, A fast planar partition algorithm, II, J. ACM 38 (1991), 74-103. [286] K. Mulmuley, On levels in arrangements and Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 307338.
Arrangements
and their applications
111
[287] K. Mulmuley and S. Sen, Dynamic point location in arrangements of hyperplanes. Discrete Comput. Geom. 8 (1992), 335-360. [288] P. Orlik, Introduction to Arrangements, Amer. Math. Soc, Providence, RI (1989). [289] P. Orlik, Arrangements in topology, Discrete and Computational Geometry: Papers from the DIMACS Special Year, J.E. Goodman, R. Pollack and W. Steiger, eds, AMS Press, Providence, RI (1991), 263-272. [290] P. Orlik and L. Solomon, Combinatorics and topology of complements of hyperplanes. Invent. Math. 59 (1980), 77-94. [291] P. Orlik and H. Terao, Arrangements of Hyperplanes, Springer-Verlag, Berlin, West Germany (1991). [292] M.H. Overmars and C.-K. Yap, New upper bounds in Klee's measure problem, SIAM J. Comput. 20 (1991), 1034-1045. [293] J. Pach, Finite point configurations. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 3-18. [294] J. Pach and P.K. Agarwal, Combinatorial Geometry, Wiley, New York, NY (1995). [295] J. Pach and M. Sharir, The upper envelope of piecewise linear functions and the boundary of a region enclosed by convex plates: Combinatorial analysis. Discrete Comput. Geom. 4 (1989), 291-309. [296] J. Pach and M. Sharir, On the boundary of the union of planar convex sets. Discrete Comput. Geom. 21 (1999), 321-328. [297] J. Pach and M. Sharir, On the number of incidences between points and curves. Combinatorics, Probability and Computing 7 (1998), 121-127. [298] J. Pach, W. Steiger and E. Szemeredi, An upper bound on the number of planar k-sets. Discrete Comput. Geom. 7 (1992), 109-123. [299] G.W Peck, On k-sets in the plane. Discrete Math. 56 (1985), 73-74. [300] M. Pellegrini, Lower bounds on stabbing lines in 3-space, Comput. Geom. 3 (1993), 53-58. [301] M. Pellegrini, Ray shooting and lines in space. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 599-614. [302] M. Pellegrini and P. Shor, Finding stabbing lines in 3-space, Discrete Comput. Geom. 8 (1992), 191-208. [303] I.G. Petrovskii and O.A. Oleinik, On the topology of real algebraic surfaces, Isvestia Akad. Nauk SSSR. Ser. Mat. 13 (1949), 389-^02. In Russian. [304] H. Plantinga and C.R. Dyer, Visibility, occlusion and the aspect graph. Internal. J. Comput. Vision 5 (1990), 137-160. [305] R. Pollack and M.F Roy, On the number of cells defined by a set of polynomials, C. R. Acad. Sci. Paris 316 (1993), 573-577. [306] A. Postnikov and R. Stanley, Deformation of Coxeter hyperplane arrangements. Unpublished manuscript (1999). [307] F.P. Preparata and R. Tamassia, Efficient point location in a convex spatial cell-complex, SIAM J. Comput. 21 (1992), 267-280. [308] S. Raab, Controlled perturbation of arrangement of polyhedral surfaces with applications of swept volumes, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 163-172. [309] E. Ramos, Construction of 1-d lower envelopes and applications, Proc. 13th Annu. Sympos. Comput. Geom. (1997), 57-66. [310] E. Ramos, Intersection of unit-balls and diameter of a point set in R , Comput. Geom. 8 (1997), 57-65. [311] A. Rao and K. Goldberg, Placing registration marks, IEEE Transactions on Industrial Electronics 41 (1994). [312] J.H. Reif, Complexity of the generalized movers problem. Planning, Geometry and Complexity of Robot Motion, J. Hopcroft, J. Schwartz and M. Sharir, eds, Ablex Pub. Corp., Norwood, NJ (1987), 267-281. [313] FM. Richards, Areas, volumes, packing and protein structure, Annu. Rev. Biophys. Bioeng. 6 (1977), 151-176. [314] J. Richter-Gebert and G.M. Ziegler, Oriented matroids. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 111-132. [315] S. Roberts, On thefiguresformed by the intercepts of a system of straight lines in a plane and an analogous relations in space of three dimensions, Proc. London Math. Soc. 19 (1888), 405^22. [316] R. Schneider, Tessellations generated by hyperplanes. Discrete Comput. Geom. 2 (1987), 223-232. [317] J.T. Schwartz and M. Sharir, On the "piano movers" problem II: General techniques for computing topological properties of real algebraic manifolds. Adv. Appl. Math. 4 (1983), 298-351.
118
RK. Agarwal and M. Sharir
[318] J.T. Schwartz and M. Sharir, Algorithmic motion planning in robotics, Algorithms and Complexity, Handbook of Theoretical Computer Science, J. van Leeuwen, ed., Vol. A, Elsevier, Amsterdam (1990) 391^30. [319] J.T. Schwartz and M. Sharir, On the two-dimensional Davenport-Schinzel problem, J. Symbolic Comput. 10 (1990), 371-393. [320] O. Schwarzkopf and M. Sharir, Vertical decomposition of a single cell in a three-dimensional arrangement of surfaces and its applications. Discrete Comput. Geom. 18 (1997), 269-288. [321] R. Seidel, Constructing higher-dimensional convex hulls at logarithmic cost per face, Proc. 18th Annu. ACM Sympos. Theory Comput. (1986), 404-^13. [322] R. Seidel, Exact upper bounds for the number offaces in d-dimensional Voronoi diagrams, Applied Geometry and Discrete Mathematics: The Victor Klee Festschrift, R Gritzman and B. Sturmfels, eds, AMS Press, Providence, RI (1991), 517-530. [323] R. Seidel, Small-dimensional linear programming and convex hulls made easy. Discrete Comput. Geom. 6 (1991), 423-434. [324] R. Seidel, Convex hull computations. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 361-376. [325] R. Seidel, The nature and meaning of perturbations in geometric computing. Discrete Comput. Geom. 19 (1998), 1-17. [326] M. Sharir, On k-sets in arrangements of curves and surfaces. Discrete Comput. Geom. 6 (1991), 593-613. [327] M. Sharir, Arrangements of surfaces in higher dimensions: Envelopes, single cells and other recent developments, Proc. 5th Canad. Conf. Comput. Geom. (1993), 181-186. [328] M. Sharir, Almost tight upper bounds for lower envelopes in higher dimensions. Discrete Comput. Geom. 12 (1994), 327-345. [329] M. Sharir, Algorithmic motion planning. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 733-754. [330] M. Sharir and PK. Agarwal, Davenport-Schinzel Sequences and Their Geometric Applications, Cambridge University Press, New York, NY (1995). [331] M. Sharir and S. Toledo, Extremal polygon containment problems, Comput. Geom. 4 (1994), 99-118. [332] PW. Shor, Stretchability of pseudolines is NP-hard, Applied Geometry and Discrete Mathematics: The Victor Klee Festschrift, P Gritzman and B. Sturmfels, eds, AMS Press (1991), 531-554. [333] S. Smorodinsky, J. Mitchell and M. Sharir, Sharp bounds on geometric premutations ofpairwise disjoint balls in M^, Proc. 15th Annual Sympos. on Comput. Geom. (1999), 400-406. [334] D.M.Y. Sommerville, Analytical Geometry in Three Dimensions, Cambridge University Press, Cambridge (1951). [335] J. Spencer, E. Szemeredi and W.T. Trotter, Unit distances in the Euclidean plane. Graph Theory and Combinatorics, B. Bollobas, ed., Academic Press, New York, NY (1984), 293-303. [336] R. Stanley, Hyperplane arrangements, interval orders, and trees, Proc. Nat. Acad. Sci. 93 (1996), 26202625. [337] J. Steiner, Einige Gesetze liber die Theilung der Ebene und des Raumes, J. Reine Angew. Math. 1 (1826), 349-364. [338] L. Szekely, Crossing numbers and hard Erdos problems in discrete geometry. Combinatorics, Probability and Computing 6 (1997), 353-358. [339] E. Szemeredi and W. Trotter, Jr., A combinatorial distinction between Euclidean and projective planes, European J. Combin. 4 (1983), 385-394. [340] E. Szemeredi and W. Trotter, Jr., Extremal problems in discrete geometry, Combinatorica 3 (1983), 381392. [341] B. Tagansky, The Complexity of Substructures in Arrangements of Surfaces, PhD thesis, Tel Aviv University, Tel Aviv (1996). [342] B. Tagansky, A new technique for analyzing substructures in arrangements of piecewise linear surfaces, Discrete Comput. Geom. 16 (1996), 455-479. [343] H. Tamaki and T. Tokuyama, A characterization of planar graphs by pseudo-line arrangements, Proc. 8th Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 1350, Springer-Verlag (1997), 123-132. [344] H. Tamaki and T. Tokuyama, How to cut pseudo-parabolas into segments. Discrete Comput. Geom. 19 (1998), 265-290.
Arrangements
and their applications
119
[345] R. Thorn, Sur I'homologie des varietes algebriques reelles, Differential and Combinatorial Topology, S.S. Cairns, ed., Princeton Univ. Press, Princeton, NJ (1965). [346] G. Toth, Point sets with many k-sets, in preparation. [347] PM. Vaidya, Geometry helps in matching, SIAM J. Comput. 18 (1989), 1201-1225. [348] P. Valtr, Lines, line-point incidences and crossing families in dense sets, Combinatorica 16 (1996), 269294. [349] M. van Kreveld, On fat partitioning, fat covering and the union size ofpolygons, Comput. Geom. 9 (1998), 197-210. [350] K.R. Varadarajan, A divide-and-conquer algorithm for min-cost perfect matching in the plane, Proc. 39th Annual Sympos. on Foundations of Comp. Sci. (1998), 320-329. [351] A. Varshney, F.P. Brooks, Jr. and W.V. Wright, Computing smooth molecular surfaces, IEEE Comput. Graph. Appl. 15 (1994), 19-25. [352] S. Vrecica and R. Zivaljevic, The colored Tverberg's problem and complexes of injective functions, J. Combin. Theory Sen A 61 (1992), 309-318. [353] H.E. Warren, Lower bound for approximation by nonlinear manifolds. Trans. Amer. Math. Soc. 133 (1968), 167-178. [354] K. Weiler, Edge-based data structures for solid modeling in a curved surface environment, IEEE Comput. Graph. Appl. 5 (1985), 21-40. [355] E. Welzl, More on k-sets of finite sets in the plane. Discrete Comput. Geom. 1 (1986), 95-100. [356] J.E. Wetzel, On the division of the plane by lines, Amer. Math. Monthly 85 (1978), 648-656. [357] A. Wiemik and M. Sharir, Planar realizations of nonlinear Davenport-Schinzel sequences by segments. Discrete Comput. Geom. 3 (1988), 15^7. [358] D.E. Willard, Polygon retrieval, SIAM J. Comput. 11 (1982), 149-165. [359] A.C. Yao and F.F. Yao, A general approach to D-dimensional geometric queries, Proc. 17th Annu. ACM Sympos. Theory Comput. (1985), 163-168. [360] T. Zaslavsky, Facing up to Arrangements: Face-Count Formulas for Partitions of Space by Hyperplanes, Amer. Math. Soc, Providence, RI (1975). [361] T. Zaslavsky, A combinatorial analysis of topological dissections. Adv. Math. 25 (1977), 267-285. [362] G.M. Ziegler, Lectures on Polytopes, Springer-Verlag, Heidelberg, Germany (1994).
This Page Intentionally Left Blank
CHAPTER 3
Discrete Geometric Shapes: Matching, Interpolation, and Approximation* Helmut Alt Institut fiir Informatik, Freie Universitdt Berlin, Takustrafie 9, D-14195 Berlin, Germany
Leonidas J. Guibas Computer Science Department, Stanford University, Stanford, CA 94305, USA
Contents 1. Introduction 2. Point pattern matching 2.1. Exact point pattern matching 2.2. Approximate point pattern matching 3. Matching of curves and areas 3.1. Optimal matching of line segment patterns 3.2. Approximate matching 3.3. Distance functions for non-point objects 4. Shape simplification and approximation 4.1. Two-dimensional results 4.2. Three dimensions 5. Shape interpolation References
123 124 124 126 133 133 136 139 142 142 145 146 150
Abstract In this chapter we survey geometric techniques which have been used to measure the similarity or distance between shapes, as well as to approximate shapes, or interpolate between shapes. Shape is a modality which plays a key role in many disciplines, ranging from computer vision to molecular biology. We focus on algorithmic techniques based on computational geometry that have been developed for shape matching, simplification, and morphing.
*Partially supported by Deutsche Forschungsgemeinschaft (DFG), Grant No. Al 253/4-2. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved 121
This Page Intentionally Left Blank
Discrete geometric shapes: Matching, interpolation, and approximation
123
1. Introduction The matching and analysis of geometric patterns and shapes is of importance in various appHcation areas, in particular in computer vision and pattern recognition, but also in other disciplines concerned with the form of objects such as cartography, molecular biology, and computer animation. The general situation is that we are given two objects A, B and want to know how much they resemble each other. Usually one of the objects may undergo certain transformations like translations, rotations or scalings in order to be matched with the other as well as possible. Variants of this problem include partial matching, i.e. when A resembles only some part of B, and a data structures version where, for a given object A, the most similar one in a fixed preprocessed set of objects has to be found, e.g., in character or traffic sign recognition. Another related problem is that of simplification of objects. Namely, given an object A find the most simple object A' resembling A within a given tolerance. For example, A could be a smooth curve and A' a polygonal line with as few edges as possible. We also will discuss shape interpolation ("morphing"), a problem that has become very interesting recently, especially in computer animation. The objective is to find for two given shapes A and B a continuous transformation that transforms A into B via natural intermediate shapes. First, it is necessary to formally define the notions of objects, resemblance, matching, and transformations. Objects are usually finite sets of points ("point patterns") or "shapes" given in two dimensions by polygons. Generalizations to, for example, polyhedral surfaces in three and higher dimensions are possible, but most of the work has concentrated on two or three dimensions. In order to measure "resemblance" various distance functions have been used, in particular much work has been based on the so-called Hausdorff distance. For two compact subsets A, B of the J-dimensional space M^, we define the one-sided Hausdorff distance from A to B as 5//(A, B) = maxmin||a — b\\, aeA beB
where || • || is the Euclidean distance in M^ (if not explicitly stated otherwise). The (bidirectional) Hausdorff distance between A and B then is defined as SH{A, B) = max(5//(A, B), 8H(B, A)). The Hausdorff distance simply assigns to each point of one set the distance to its closest point on the other and takes the maximum over all these values. It performs reasonably well in practice but may fail if there is noise in the images. An variant intended to be more robust will be presented in Section 2.2.3. What kind of geometric transformations are allowed to match objects A and B depends on the application. The most simple kind are certainly translations. The matching problem usually becomes much more difficult if we allow rotations and translations (these transfor-
124
H. Alt and L.J. Guibas
mations are called rigid motions, or Euclidean transformations). In most cases reflections can be included as well without any further difficulty. Scaling means the linear transformation that "stretches" an object by a certain factor X about the origin and is represented by the matrix (^ J) in two dimensions. We call combinations of translations and scalings homotheties and combinations of Euclidean transformations and scalings similarities. The most general kind of transformations we will consider are arbitrary ajfine transformations which can occur, e.g., in orthographic 2-dimensional projections of 3-dimensional objects. Considerable research on these topics has been done in computational geometry in recent years. This chapter will give a survey on these results.
2. Point pattern matching In this section we present a variety of geometric techniques for matching points sets exactly or approximately, under some allowed transformation group. We discuss methods of both theoretical and practical interest.
2.1. Exact point pattern matching A seemingly very natural question is whether two finite sets A, 5 C M^ of n points each can be matched exactly by say, rigid motions, i.e. whether are A and B congruent. Of course unless we assume that the input consists of points on a grid, this problem is numerically very unstable. Nevertheless, studying it assuming a "real RAM" model of computation gives some insight into the nature of matching problems and may help in designing algorithms for more realistic cases. Furthermore, it could be possible to implement the algorithms for rational inputs directly using arbitrary precision computations as they are provided, for example, by the LEDA library [24] but to our knowledge this possibility has not been investigated in detail yet. In two dimensions exact point-pattern matching can easily be reduced to string matching, as is shown by the following algorithm which was invented independently by several authors, for example Atkinson [19]. 1. Determine the centroids CA, CB (i.e. arithmetic means) of the sets A and B, respectively. 2. Determine the polar coordinates of all points in A using CA as the origin. Then sort A lexicographically with respect to these polar coordinates (angle first, length second) obtaining a sequence (0i, r i ) , . . . , (0«, r^). Let u be the sequence (i/^i, r i ) , . . . , {\lrn, rti) where T/^/ = 0/ — 0(/+i) mod «• Compute in the same way the corresponding sequence i; of the set B. 3. Determine whether i; is a cyclic shift of w, i.e. a substring of uu by some fast stringmatching algorithm. It is easy to see that A and B are congruent exactly if the algorithm gives a positive answer. The running time is 0{n \ogn) because of the sorting in step 2; all other operations take linear time.
Discrete geometric shapes: Matching, interpolation, and approximation
125
For exact point pattern matching in three dimensions the following algorithm is given byAltetal. [13]: 1. Determine the centroid CA and project all points of A onto the unit sphere around CA obtaining a set A' of points on the sphere. Label each point a e A' with the sorted list of distances from CA of all points that have been mapped onto a. 2. Compute the 3-d convex hull CA of A \ 3. In addition to the labeling of step 2 attach to each point a e A^ an adjacency list of vertices connected to a by an edge of CA sorted in clockwise order (seen from outside). This list should contain all distances of a to adjacent points and all angles between neighboring edges. 4. Execute steps 1-3 with set B, as well. 5. The hulls CA and CB can be considered as labeled planar graphs. The point sets A and B are congruent exactly if these graphs are isomorphic. This isomorphism can be decided by a variant of the partition algorithm of Hopcroft (see [10], Section 4.13). A detailed analysis shows that the running time of this algorithm is 0(n logn). Using similar techniques it can be shown that the matching problem in arbitrary dimension d can be reduced to n problems in dimension d — 1. Consequently we have that the exact point pattern matching problem can be solved for patterns of n points in time 0(n log w) in 2 dimensions and in time 0(n^~^ logn) for arbitrary dimension d ^3. An alternative approach yielding the same bound for dimension 3 was developed by Atkinson [19]. Concerning transformations other than rigid motions, in some cases there are obvious optimal algorithms for exact point pattern matching in arbitrary dimensions. For translations, for example, it suffices to match those two points with the lexicographically smallest coordinate vectors and then to check, whether the other points match as well. If scaling of the pattern B to be matched is allowed, one can first determine the diameters dA, ds of both sets. Their ratio dA/ds gives the correct scaling factor for B. Therefore, there is an easy reduction of homotheties to translations and of similarities to rigid motions. Reflections can easily be incorporated by trying to match the set B as well as the set B' which is B reflected through some arbitrary hyperplane, for example, jci = 0. Exact point pattern matching under arbitrary ajfine transformations is considered by Sprinzak and Werman [88]. First the sets A and B are brought into "canonical form" by transforming their second moment matrices into unit matrices. Then it is shown that A, B can be matched under affine transformations exactly if their canonical forms can be matched under rotations. Since the canonical forms can be computed in linear time the asymptotic time bounds for matching under linear transformations are the same as the ones for rigid motions described above. A natural generalization of deciding whether two point patterns A and B are congruent is to ask for the largest subsets of both that are and to find the corresponding rigid motion. Akutsu et al. [20] address this problem and solve it by a voting algorithm. More specifically, to any pair (/?, ^) G A x ^ all pairs (r, 5") G A x 5 are determined where the lengths of the line segments ~pr and 'qs are the same. In this case the rigid motion that maps ~pf to qs gets a vote. In the end the rigid motion that obtained the most votes is the one matching the largest subsets. The running time of the deterministic version of this algorithm is
126
H. Alt and LJ. Guibas
0((X(n,m) -\-n^) logn). Here A-(w, m) is a combinatorial geometric quantity related to the number of possible occurrences of a fixed length line segment in a set of points and it has an upper bound of 0(n^-^^m^-^^). Also a more efficient Monte-Carlo algorithm based on random sampling is given that produces an approximate solution to the problem.
2.2. Approximate point pattern matching More realistic than exact point pattern matching is approximate point pattern matching. Here, given two finite sets of points A, 5 , the problem is to find a transformation matching each point b e B into the ^-neighborhood (e ^ 0) of some point A G A. On the other hand each point in A should lie in the ^-neighborhood of some transformed point of B. Clearly, there are many variants to this problem. The first distinction we make is whether A and B must have the same number of points and the matching must be a one-one-mapping, or whether several points in one set may be matched to the same point in the other. Obviously in the latter case we consider matching with respect to the Hausdorjf-distance. 2.2.1. One-to-one matching. Alt et al. [13] give polynomial time algorithms for many variants of one-one-matching of finite point sets. These variants are obtained by the following characteristics: • Different types of transformations that are allowed. • Solving either the decision problem: given e, is there a matching? or the optimization problem: find the minimal e allowing a matching. • A fixed one-one-mapping between A and B is either already given or one should be found. • Different metrics, a concept generalized by Arkin et al. [11] to arbitrary "noise regions" around the points. We will demonstrate the techniques used with the example of solving the decision problem, for a given £ as a Euclidean tolerance, of matching under arbitrary rigid motions without a predetermined one-one-mapping between the point sets A = [a\,...,an} and B = {bu...,bn}. First, it can be shown by an easy geometric argument that, if there exists a valid matching of 5 to A then there is one where two points Z?/, bj of B are matched exactly to the boundaries of the 6:-neighborhoods Us{ak), Ugiai) of two points in A. Consider this configuration for all 4-tuples of points ak, ai, Z?/, bj. Mapping bi, bj onto the boundaries of Us(ak) and Ue(ai) respectively in general leaves one degree of freedom which is parametrized by the angle 0 e [0, 27t) between the vector bi — ak and a horizontal line. Considering any other point bm ^ B,m^i, j , for all possible values of 0, that point will trace an algebraic curve Cm (of degree 6, in fact; see Figure 1). Being an algebraic curve of constant degree, any Cm intersects the boundary of any Ueiar) at most a constant number of times, in fact, at most 12 times. So there are at most 6 intervals of the parameter 0 where the image of bm lies inside Us(ar). All interval boundaries of this kind are collected. They partition the parameter space [0, In) into 0(n^) intervals, so that for all 0 in one interval the same points of B are mapped into the same neighborhoods of points of A. All these relationships are represented as edges in a
Discrete geometric shapes: Matching, interpolation,
and approximation
127
Fig. 1. Curve of point bm when bt, bj are moved on the boundaries of Usia^), Ueiag).
bipartite graph whose two sides of nodes are A and B. Clearly, the decision problem has a positive solution exactly if there is some (/) for which the corresponding graph has a perfect matching. This is checked by finding the graph for the first subinterval of [0, 27r) and constructing a maximum matching for it. Then, while traversing the subintervals from left to right, the maximum matching is updated until a perfect matching is found or it turns out that none exists. Observe, that this procedure is carried out 0(n^) times for all 4-tuples ak, ai, bi, bj. A detailed analysis shows that the total running time of the algorithm is O(w^). In addition, determining the intersection points of the curves of degree 6 with circles could cause nontrivial numerical problems. However, simpler and faster algorithms were found for easier variants of the one-one-matching problem. For the case of translation only, Efrat and Itai [39] improve the bounds of [13] using geometric arguments to speed up the bipartite graph matching involved (for fixed sets, they can compute what they call the optimum bottleneck matching in time 0(n^-^ logn)). Arkin et al. [11] give numerous efficient algorithms mostly assuming that the 6:-neighborhoods or other noise-regions of the points are disjoint. For example, the problem considered above is shown to be solvable in 0(n^ log n) time under this assumption. Also a generalization from rigid motions to similarity transformations is given in that article. Heffeman and Schirra [59] take an alternative approach to reduce the complexity of the decision problem in point pattern matching, which they call approximate decision algorithms. They only require the algorithm to give a correct answer if the given tolerance s is not too close to the optimal solution; more precisely, it has to lie outside the interval [^opt -• oi, ^opt + )^] for fixed a, fi ^0. This way, using network flow algorithms, they can reduce the running time for solving the problem described above to 0(n^-^). Behrends [22] also considers approximate decision algorithms. Assuming in addition that the £-neighborhoods are disjoint, he obtains a running time of 0(n^logn). The best results
128
H. Alt and L.J. Guibas
Fig. 2. Voronoi surface of A.
in the case that the mapping between A and B is predetermined, are due to Imai, Sumino, and Imai [66] who analyze the lower envelope of multivariate functions in order to find the optimal solution. 2.2.2. Point pattern matching with respect to Hausdorjf-distance. Now A and B may have different cardinalities, let A = {^i,..., «„} and B = {b\,... .bm]- The Hausdorffdistance between A and B can be computed straightforwardly in time 0(nm). It is more efficient to construct the Voronoi-diagrams VD(A) and VD(B) and to locate each point of A in VD(B) and vice versa in order to determine its nearest neighbor in the other set. This way the running time can be reduced to 0((n -\- m) \og(n + m)) (see [2]). Algorithms for optimally matching A, B under translations for arbitrary L,;-metrics in 2 and 3 dimensions using Voronoi diagrams are given by Huttenlocher, Kedem, and Sharir [56]. The idea of these algorithms is as follows: The Voronoi-surface of the set A is the graph of the function d{x) =min \\x — a\\ aeA
which assigns to each point x the distance to the nearest point in A. Clearly, d{x) is the lower envelope of all da {x) = || jc — a ||, where aeA. For example, for L2 and dimension 2 the graph of da{x) is an infinite cone in 3-dimensional space whose apex lies in a (see Figure 2). The graph of J(JC) is piecewise composed of these cones and the projection of the boundaries of these pieces is the Voronoi diagram of A. If B is translated by some vector t the distance of any b e B to its nearest neighbor in A is 8b(t) =min\\a — (b-\-t)\\ =min\\(a — b) — t\\= aGA
aGA
min dx(t) xeA-b
Discrete geometric shapes: Matching, interpolation, and approximation
129
SO the graph of 8t> is the Voronoi surface of A translated by the vector —b. The directed Hausdorff distance IH{B -\-t, A) is the function /(0=max5/,(0 beB
and, consequently, the upper envelope of m Voronoi surfaces, namely those of A — /?i, A — Z?2,..., A — Z?^. On the other hand we consider g{t) =
lH{A,B^-t).
Since git) = ^//(A + (—t), B) we can define g{t) by upper envelopes like / ( / ) , interchanging the roles of A and B and replacing thy—t. The Hausdorff-distance between A and 5 + f is then /i(0=max(/(0,^(0). Again, for L2 the graph of h is composed of piecewise "conic" segments. We are searching for mmth{t). This minimum is found by determining all local minima of h(t). By the bounds on the number of these minima derived in [56], algorithms are obtained for matching 2- and 3-dimensional finite point sets under translations minimizing the Hausdorff distance. In 2 dimensions their running times are 0(nm(n + m) lognm) for the Liand Loo-metric and 0(nm(n + m)a(nm) login + m)) for other L^-metrics, r = 2, 3 , . . . . In 3 dimensions time Oiinm)^in + m)^+^) is obtained for the L2-metric. At first glance it is not clear how the technique described earlier can be generalized from translations to arbitrary rigid motions. However, this is done by Huttenlocher et al. in [54] by considering so called dynamic Voronoi diagrams. Here, it is assumed that we have a point set consisting of k rigid subsets of n points each. Each of the subsets may move according to some continuous function of time. The dynamic Voronoi diagram is the subdivision of the 3-dimensional space-time such that every cross section obtained by fixing some time t equals the Voronoi diagram at time t. The authors investigate how many topological changes the Voronoi diagram can undergo as time passes which gives upper bounds on the complexity of the dynamic Voronoi diagram. These results are applied to matching under rigid motion by representing the optimal solution as DiA, B) = minSn(reiA),
B-{-x)
where x € R^ is the translation vector, and re is the rotation around the origin by angle 0 e [0, 27r). For fixed 0 we have the situation described before in the case of translations. The (directed) optimal Hausdorff-distance can be determined by finding the minimum of the upper envelope of m Voronoi surfaces, namely the ones of r^ (A) — b\,.. .,r@ (A) — bm. The minimum algorithm keeps track of this for changing values of © by considering the dynamic Voronoi diagram of these sets where © is identified with the time parameter. As a consequence, an optimal match of two point sets under arbitrary rigid motions can be found in time 0((m + n)^ logimn)).
130
H. Alt and L.J. Guibas
Matching of point patterns under translations in higher dimensions is investigated by Chew et al. [27]. For the decision problem in case of the Loo-metric, the space of feasible translations is an intersection of unions of unit boxes. This space is maintained using a modification of the data structure of orthogonal partition trees by Overmars and Yap [79]. This gives algorithms for the decision problem which are used to solve the optimization problem by parametric search [74,32]. In particular, for the Loo-metric an algorithm of running time 0(n^^^~^^/^log^n) is obtained where n is the number of points in both patterns. For J-dimensional point patterns under the L2-metric, the matching takes time 0(nr^^/2^+4og^n). The methods described before are probably quite difficult to implement and numerically unstable due to the necessary computation of intersection points of algebraic surfaces. A much simpler but practically more promising method is given by Goodrich et al. in [48]. For a "pattern" P and a "background" B of m and n points, respectively, it approximates the optimal directed Hausdorff-distance min7 5//(r(P), B) up to some constant factor. T ranges over all possible transformations which are translations in arbitrary dimensions or rigid motions in 2 or 3 dimensions. The approximation factors are between 2 + ^ for translations in R^ and 8 + 6^ for rigid motions in M^. The running times are considerably faster than the ones of algorithms computing the optimum exactly. The algorithm for rigid motions in R^ essentially works as follows: 1. Fix a pair (p,q) of diametrically opposing points in P. 2. Match the pair by some rigid motion as good as possible to each pair of points of B. 3. For each such rigid motion determine the distance of the image of each point in P to its nearest neighbor. Choose that match where the maximum of these distances is minimized. In higher dimensions the nearest neighbor search is done approximately by the data structure of Arya et al. [12]. 2.2.3. Practical variations Percentile-Based Hausdorff Distance
As was mentioned above, the Hausdorff-distance is probably the most natural function for measuring the distance between sets of points. Furthermore, it can easily be applied to partial matching problems. In fact, suppose that sets A and B are given where A is a large "image" and 5 is a "model" of which we want to know whether it matches some part of A. This is the case exactly if there is some allowable transformation T such that the one-way Hausdorff-distance 8H(T(B), A) is small. In fact, many of the matching algorithms with respect to Hausdorff-distance presented previously can be applied to partial matching as well. An application of this property to the matching of binary images is given by Huttenlocher et al. in [55] where a discrete variant of the Voronoi-diagram approach for matching under translation with respect to Hausdorff-distance is used. In the same article a modification of the Hausdorff-distance is suggested for the case that it is not necessary to match B completely to some part of A but only at least k of the m points in 5 . In fact, the distance measure being used is hk(B, A) = mmkTmn\\a — b\\,
Discrete geometric shapes: Matching, interpolation, and approximation
131
where min/: denotes the k-ih smallest rather than the largest value. This percentile definition allows us to overcome the sensitivity of the Hausdorff-distance to outliers, which is very important in practice. The paper [55] is also interesting in that the authors show how to adapt some of the conceptual geometric ideas presented earlier to their rasterized context so as to obtain, after several other optimizations they invented, efficient practical algorithms for the partial Hausdorff matching described above. Alignment and Geometric Hashing
A number of other techniques for point pattern matching have been developed and used in computer vision and computational molecular biology. In computer vision the point pattern matching problem arises in the context of model-based recognition [38,21] — in this case we are interested in knowing whether a known object (we will call it the model M) appears in an image of a scene (which we will denote by S). Both the model and the scene are subjected to a feature extraction process whose details need not concern us here. The outcome of this process is to represent both M and 5 as a collection of geometric objects, most commonly points. The same principle applies to the molecular biology applications — typically molecular docking [77]. In that context we are trying to decide if the pattern, usually a small molecule (the ligand), can sterically fit into a cavity, usually the active site of some protein. Again through a feature extraction process, both the ligand and the active site can be modeled by point sets. The dimensionalities of the point sets M and 5, as well as the transformation group we are allowed to use in matching M to 5, are application dependent. In computer vision S is always 2-D while M can be either 2-D or 3-D; both are 3-D in the biology context. To illustrate the methods of alignment and of geometric hashing we use below an example in which both M and S are planar point sets of cardinalities m and s respectively. In the example we will assume that the allowed transformation group when matching M to 5 is the group of similarities, i.e. Euclidean transformations and scalings. We are interested in one-way matches from M to 5, in the sense of the one-way percentile Hausdorff distance: we will be looking for transformations that place many (most) points of M near points of S. The extension of these ideas to the case of other dimensions and other transformation groups is in general straightforward; the one exception is when the allowed transformations include a (dimension-reducing) projection — about which more below. In the alignment method [62], two points a and b of M are first chosen to define a reference coordinate frame [a; b] for the model. We can think of the first point as the origin (0,0) and the second point as the unit along the x-axis (1,0). This choice also fixes the _y-axis and thus an orthogonal coordinate system in which all points of M can be represented by two real values. Note that this representation of the points in M is invariant under translations, rotations, and scalings. We now align the points of a and b of M with two chosen points p and q of S respectively. Up to a reflection, this fixes a proposed similarity mapping M to 5 (we will ignore the reflection case in what follows). In order to test the goodness of this proposed transformation, we express all points of S using coordinates in the frame [p; q]. Now that we have a common coordinate system for two sets, we just check for every point of M to see if there is a point of S nearby (within
132
H. Alt and LJ. Guibas
some preselected error tolerance). The number of points on M that can thus match in this verification step is the score for the particular transformation we are considering. The alignment method consists of trying in this way to align pairs of points of M with pairs of points of S and in the process discover those transformations that have the highest matching score. If we could assume that all points of M are present in S, in principle we could get by with matching and verifying a specific pair from M with all its counterparts in S. Because of occlusions, however, this assumption cannot be made in practice and usually we need to try many pairs of points from M before the correct match is found. Alignment is thus an exhaustive method and its worst-case combinatorial complexity is bad, Oinr's^) — even assuming only a linear 0(m) verification cost (0(m log^) would be a more theoretically correct bound). Things get worse as the size of the frames we need to consider increases with higher dimensions or larger transformation groups. Thus in the vision context a lot of attention must be given to the feature extraction process, so that only the most critical and significant features of each of M and S are used during the ahgnment. Since we may want to match the same model M into many scenes or, conversely, we may be looking for the presence of any one of a set of models Mi, M 2 , . . . , M^ in a given scene, it makes sense to try to speed up the matching computation through the use of preprocessing. This leads to to the idea of geometric hashing [72,70,71]. Let us describe geometric hashing in the same context as the in the above alignment problem, but with several models Mi, M 2 , . . . , M^. As above, for each model M/ and each frame [a\ Z?] of two points for that model, we calculate coordinates for all other points of M/ in that frame. The novel aspect of geometric hashing is that these coordinates are then used as a key to hash into a global hash table. We record at that hash table entry the model index and frame pair the entry came from. The computation of this hash table completes the preprocessing phase of the algorithm. Note that there is a hash table entry for each triplet (model, frame for that model, other point in that model); multiple triplets may hash to the same table entry, in which case they are linked together in a standard fashion. At recognition time, we choose a frame pair [p\q] in the scene S and compute the coordinates of all points of S in that frame. Using then these coordinates as a key, we then hash into the global hash table and 'vote' for each (model, frame) pair stored at that hash table entry. If we were lucky to choose two scene points which correspond to two points [a-, Z?] in an instance of some model M/, we can then expect that the pair (M/, [a\ bY) will get many votes during that process, thus signahng the presence of M, in the scene and also indicating the matching transformation involved. In general, of course, we cannot expect to be so lucky in choosing p and q the first time around, so we will have to repeat the voting experiment several times. In the worst case, preprocessing for a model M of size m costs O(m^) and the recognition by voting also costs 0{s^) (we assume throughout that the cost of accessing the hash table is constant). Note that by appropriately rounding the coordinates used as a key to the hash table we can allow for a certain error tolerance in matching points of M and S. Also, once some promising (model, frame) pairs have been identified, the votes for the winner actually give us a proposed correspondence between model and scene points. The matching transformation can then be calculated more accurately using a leastsquares fit [71]. As was mentioned above for the alignment problem, these ideas also extend to matching point sets in 3-D, as well to other transformation groups, such as the group of affine maps.
Discrete geometric shapes: Matching, interpolation, and approximation
133
One noteworthy aspect of this in the vision case is the dimension-reducing projection maps that must be allowed in matching (as when M is 3-D but S is 2-D). This makes the problem harder, as the projection map is not invertible and a point in S has an inverse image which is a line in 3-D. This can be handled in geometric hashing by having each point of S, after a frame has been chosen, generate samples along a line of possible matching points from M in 3-D and vote for each of them separately [72]. Geometric hashing has been successfully used in both identifying CAD/CAM models in scenes, as well in the molecular docking problem [72,70,71,77,78]. Performance in practice tends to be much better than the above combinatorial worst-case bounds would indicate. Recent theoretical studies also suggest that randomization can improve the above bounds for alignment and geometric hashing, especially in cases where the model is not present in the the scene, or when the point sets involved have limited 'self-similarity' [65]. 3. Matching of curves and areas Apart from point patterns, research has been done in recent years also on the resemblance of more complex patterns and shapes, mostly in two dimensions. These objects usually are assumed to be given by polygonal chains or one or more simple polygons representing their boundary. As a measure for their resemblance usually the Hausdorff-distance is used, though some articles are concerned with other variants, as described in Section 2.2.3. 3.1. Optimal matching of line segment patterns Throughout this section we will assume, if not explicitly stated otherwise, that the input to the algorithms consists of two sets A, B of n, m line segments in two dimensions, respectively. The aim is to find an optimal match between A and B, i.e. a transformation T minimizing the Hausdorff-distance 8H(A, T(B)). Here, A and B are identified with the sets of points lying on their line segments and the metric underlying the Hausdorff-distance is L2. Notice that while there is a straightforward 0(nm) algorithm for computing the Hausdorff distance between fixed finite point sets A and B, this is no longer the case for sets of line segments. In the case of convex polygons Atallah [18] gave a linear time algorithm. For arbitrary sets of line segments an asymptotically optimal 0(nlogn) algorithm was given by Alt et al. in [2]. This algorithm is based on the fact, that the Hausdorff distance can only occur at endpoints of line segments or at intersection points of line segments of A with the Voronoi diagram of B or vice versa. Furthermore, for any Voronoi cdgQ this can happen only at the two extreme intersection points with line segments of the other set. These points are then determined by a line sweep algorithm. In [2] it was also observed that the matching problem under translations or rigid motions can be solved in polynomial time. These results are based on the fact that if the transformation has k degrees of freedom (e.g. ^ = 3 for rigid motions) then in the optimal position the Hausdorff-distance essentially must occur in at least k-\-l different places. More sophisticated techniques leading to asymptotically faster, but probably practically quite complicated algorithms are used by Agarwal et al. [16] for translations and Chew et
134
H. Alt and L.J. Guibas
Fig. 3. The set Ag
al. [29] for arbitrary rigid motions. Both articles start with essentially the same idea. They first solve the decision problem whether for given A, B, and ^ > 0 there exists a transformation T such that 5//(A, T{B)) ^ e. Let us consider the one-way Hausdorff-distance in detail; with just a few technical details it can be extended to the two way Hausdorff distance. Let Cs be the disk of radius e around the origin and A^ the Minkowski sum A 0 Q . Clearly, As is the union of so called "racetracks" ([16]), i.e. rectangles of width 2e with semidisks of radius e attached at their ends (see Figure 3). Now, for a transformation T the one-way Hausdorff-distance 8H(T(B), A) ^S exactly if T(B) C Ag. Let us consider the case of translations first. Suppose r is a translation vector not satisfying the inclusion above. So we have 5 -f- f ^ A^, in particular t -\-bi gl Ag for some line segment bi e B. This is equivalent to r G A^ 0 (—^/), where A^ denotes the complement B? \ A^ of A^. Conversely, a translation t moves B into A^ exactly if r G Ag 0 {—bi) for / = 1 , . . . , m. The latter set we will denote by A^, (see Figure 4) so there is a one way match exactly if the set
S^^A^ i=\
is nonempty. Figure 4 shows that in the construction of the sets A^, / =: 1 , . . . , m, we use the circular arcs and line segments bounding As and, additionally, these curves translated by the vector bi; altogether there are 0(nm) circular arcs and line segments. Each A^ is a union of some of the cells of the arrangement A defined by these curves. The decision problem for translations can be solved by a sweep line algorithm. While sweeping across the arrangement the algorithm computes the depth of the cells, i.e. the number of different A^ that cover a cell. Clearly, S is nonempty, exactly if there is a cell of depth m. Since the complexity of the arrangement is 0{{mn)^) the sweep line algorithm solves the decision problem for translations in 0((mn)^log(mn)) time (see [16]). In the case of rigid motions (see [29]) we assume that first the set B is rotated around the origin and then translated in order to match the set A. For each orientation 0 € [0, 2n) we consider the sets A^.{0) which are defined like A?, only that bi is rotated by angle 0 around the origin. Likewise the arrangement A(0) depends on the orientation 0.
Discrete geometric shapes: Matching, interpolation,
and
approximation
135
-h
Fig. 4. The set Af (shaded).
b) Fig. 5. Orientations where the arrangement changes: (a) double event; (b) triple event.
^(0) and the depth of its cells can be determined as described before. Then while increasing 0 the algorithm keeps track of the changes that occur in the arrangement and of the depth of the newly appearing cells. The arrangement only changes topologically for orientations 0 where two sets of the form {aj 0 £) 0 (—^j) touch each other, a so-called "double event" (see Figure 5(a)), or the boundaries of three of them intersect in one point, a "triple event" (see Figure 5(b)). Altogether, there are O(m^n^) events. The algorithm determines them and sorts them in a preprocessing phase. Then it makes use of a suitable data structure where all local changes in the arrangement due to an event can be processed in constant time. In this
136
H. Alt and LJ. Guibas
manner, starting from ^(0) all arrangements are inspected whether for some 0 there is a cell in A{0) of depth m. If so, a positive answer is given to the decision problem. Altogether the algorithm requires Oirri^n^ log(mn)) time. In both cases the algorithms for the decision problem can be turned into ones for the optimization problem hy parametric search (see [74,32]) on the parameter e. For matching by translation, Agarwal et al. [16] describe a parallel algorithm which first computes the arrangement A. Then it determines the depth of its cells by considering the dual graph, finding an Eulerian path in it and using that to traverse the cells systematically. This parallel algorithm is used to direct the parametric search. Altogether, an 0((mn)^log^(mn)) algorithm for finding the optimal matching under translations is obtained. For optimal matching by rigid motions Chew et al. [29] use an EREW-PRAM sorting algorithm for the events to direct the parametric search. Whenever this algorithm attempts to compare two events 0\ (s), 62(8), the set of critical parameters e is determined and sorted. Then a binary search is done on these critical parameters in each step involving the decision algorithm described before to determine the interval containing the optimal e. Altogether an 0((mn)^ \og^(mn)) algorithm is obtained for optimal matching under rigid motions. With essentially the same ideas and the usage of dynamic Voronoi diagrams efficient algorithms for point pattern matching are obtained in [29], as was mentioned in Section 2. Huttenlocher et al. [56] also extend the Voronoi diagram approach described in Section 2 to sets of fine segments. This method leads to rather complicated surfaces if the Hausdorffdistance with respect to the L2-metric is considered. However, if the underlying metric is L\ or Loo the situation is simpler and an 0({mn)^a(mn)) algorithm can be obtained.
3.2. Approximate matching As we have seen in the previous sections the algorithms for finding the optimal solution of the matching problem use quite sophisticated techniques from computational geometry and, therefore, are probably too complicated to implement. Also the asymptotic running times are, although polynomial, rather high. One approach to overcome these problems are approximation algorithms for the optimization problem. These are algorithms that do not necessarily find the optimal solution, but find one whose distance is within a constant factor c of the optimum. Again, if not explicitly stated otherwise we will consider matching of sets of line segments with respect to Hausdorff-distance based on the L2-metric. Approximation algorithms in this context were considered first by Alt et al. [2,3] using so called reference points. These are points rA, rg that are assigned to the sets A and B and have the property that when B is transformed to match A optimally then the distance of the transformed r^ to r^ is also bounded by a constant factor a times the Hausdorff-distance of the matching. The factor a is called the quality of the reference point. A reference point can be found very easily in the case of translations as allowable transformations. In fact, to a set A assign the point r^ = (-^min' ^min^ where x^-^^ (Jmin) ^^ ^^^ lowest X-coordinate (j-coordinate) of any point in A. So rA is the lower left comer of the smallest axes-parallel rectangle enclosing A. Observe that if in an optimal match A and the translated image B^ of B have Hausdorff-distance 8 then \x^- — Xj?- | ^ 8 and
Discrete geometric shapes: Matching, interpolation, and
approximation
137
<
Fig. 6. Optimal match between A and B under translations.
I>^min ~ ^^minl ^ ^ (^^^ Figure 6). Consequently, the distance of TA and r^/, which is the image of fB under the translation, is at most \/28. So r^ is a reference point for A of quality
V2. Now, suppose that instead of finding the optimal translation of B to match A we use just the one that matches rs to r^ obtaining an image B^^ of B. Then, since B^ is obtained from B^^ by translation by the vector r^/ — r^, SH(B\ B") < V25. Consequently SH{A,B')
^
8H{A,B')^8H{B\B')
< (v^+l)5. So the Hausdorff-distance of the match found by the reference points is at most by a factor V2 + 1 ^ 2.4 worse than the optimal one. In general, matching with respect to a reference point of quality a for translations yields a match that is at most a factor a + \ worse than the optimal one. Observe that the approximation algorithm has linear running time, since only the reference points need to be determined. So it is much faster and much simpler than the best known algorithm for finding the optimal match which has running time
Oiimnflog^mn) [16]. Reference points for rigid motions are not that easy to find. Obviously the one for translations given above does not work any more. Nor do the seemingly obvious choices like the center of gravity of the convex hull of a set A or the center of the smallest enclosing circle. It was shown by Alt et al. [2] that for an arbitrary bounded set A the center of gravity of the boundary of the convex hull is a reference point with respect to rigid motions. However, the upper bound given for the quality of this reference point is rather large, in fact, it is 47r + 4 ^ 1 6 . 6 .
138
H. Alt and L.J. Guibas
Aichholzer et al. in [1] found a better reference point. In fact, imagine that the axesparallel wedge determining the reference point for translations given above is circled around the set A always keeping the bounding half-lines tangent to A. Then its apex describes a closed curve. For the "average point" on this curve no particular direction is preferred, so it might be a candidate for a reference point under rigid motions. Formalizing and slightly simplifying this idea, we obtain the following definition for arbitrary bounded sets A: ^2n
s{A):=-
1 r"" /
n Jo
hAm
/cos0\
. l]d(t>^
ysmcpj
where HA (0) is the so called support function of A which assigns to 0 the largest extent of A in direction 0. The point s(A) is the so called Steiner-point of A. The Steiner point is well investigated in the field of convex geometry [85,52] as well as in functional analysis [80]. Using these results it is shown in [1] that the Steiner point is a reference point not only for translations and rigid motions, but even for similarities and not only for two but for arbitrary dimensions. Its quality is A/n ^ 1.27 in two, 1.5 in three and between ->J2/n\/d and V2/7rV^ + 1 in d dimensions. Usually the Steiner point is defined for convex bodies only, it can be extended to arbitrary bounded sets by taking the Steiner point of the convex hull. In the case of sets of line segments we obtain convex polygons for which the Steiner point can easily be computed. In fact it is the weighted average of the vertices where each vertex is weighted by its exterior angle divided by In. Furthermore, Przeslawski and Yost [80] showed that for translations there is no reference point whose quality is better than the one of the Steiner point. In the case of translations the usage of a reference point for approximate matching was obvious. In the case of rigid motions first the two reference points are matched by a translation and then the optimal matching is sought under rotations around the common reference point. This is easier than the general optimization problem since the matching of the reference points reduces the number of degrees of freedom by two (in two dimensions). In the case of similarities, figure B is first stretched by the factor dA/ds, where dA and dg are the diameters of A and B, respectively. Then the algorithm for rigid motions is applied. In [1] it is shown that from reference points of quality a approximation algorithms are obtained yielding a solution within a factor of a + 1 of the optimal one in the case of rigid motions and within a factor of a + 3 of the optimum in the case of similarities. The running times for both approximate matching algorithms are Oinm Xoginm) log*(nm)). Finally it should be mentioned that by an idea due to Schirra [82] it is possible to get the approximation constant of reference point based matching with respect to translations or rigid motions arbitrarily close to 1. In fact, suppose that the quality of the reference point is a. This means that in the optimal match the reference point r^ is mapped into the a5-neighborhood UofrA- In order to achieve an approximation constant 1 + ^ for a given s, we place onto U a sufficiently small grid so that no point in U has distance greater than eS from the nearest grid point. Instead of placing rg onto TA only we place it onto each grid point and proceed as described before. Since at some point rg is placed at a distance of at most e^ of its optimal position, the approximation constant is at most \-\- e. Notice,
Discrete geometric shapes: Matching, interpolation,
and
approximation
139
Fig. 7. Two curves with small Hausdorff-distance 8.
that for a constant s only constantly many grid points are considered so the running time only changes by a constant factor.
3.3. Distance functions for non-point objects In some applications, the simplicity of the Hausdorff-distance can be a disadvantage. In fact, when the distance between curves is measured the Hausdorff-distance may give a wrong picture. Figure 7 shows an example where two curves have a small Hausdorffdistance although they have no resemblance at all. The reason for this problem is that the Hausdorff-distance is only concerned with the point sets but not with the course of the curves. A distance considering the curves' courses can informally be illustrated as follows: Suppose a man is walking his dog, he is walking on one curve, the dog on the other. Both are allowed to control their speed but not to go backward. What is the shortest length of a leash that is possible? Formally, this distance measure between two curves in J-dimensional space can be described as follows 8F{f g) = inf max \\f{a(t)) - g{p(t)) \\ where / , ^ : [0, 1] ^ M*^ are parameterizations of the two curves and a, ^ : [0, 1] -^ [0, 1] range over all continuous and monotone increasing functions. This distance measure is known under the name Frechet-distance. The Frechet-distance seems considerably more difficult to handle than the Hausdorffdistance and no matching algorithms have been developed yet. The following algorithm for measuring the Frechet-distance between two polygonal chains has been given by Alt andGodau[8,9]. Let P and Q be the given polygonal chains consisting of n and m line segments respectively. First we consider the decision problem, so in addition to P and Q some 6: > 0 is given and we want to decide whether (5/r(P, Q) ^s. We first consider the m x n-diagram DsiP, Q) shown in Figure 8 which indicates by the white area for which points p e P, ^ ^ Q \\p — ^W ^ £' The horizontal direction of the diagram corresponds to the natural parameterization of P and the vertical one to that of Q. One square cell of the diagram corresponds to a pair of edges one from P and one from Q and can easily be computed since it is the intersection of the bounding square with an ellipse.
140
H. Alt and L.J. Guibas
Fig. 8. P, Q, 6 and the diagram D^iP, Q).
0 i
Fig. 9. Turning function of a simple polygon.
Now it follows from the definition that S^iP, Q) ^ e exactly if there is a monotone increasing curve from the lower left to the upper right comer of the diagram. These considerations lead to an algorithm of running time 0(mn) for the decision problem. Then Cole's variant of parametric search [33] can be used to obtain an algorithm of running time 0(mnlog(mn)) to compute the Frechet-distance between P and Q. In practice, it seems more reasonable to determine 8f(P, Q) bit by bit using binary search where in each step the algorithm for the decision problem is applied. Arkin et al. [6] consider a distance function between shapes in two dimensions that is based on the slope of the bounding curves. In fact, for a given shape A some starting point O on the bounding curve is chosen and the curve is then parametrized with the natural parameterization HA (i.e. parameterization by arc length) which is normalized so that the parameter interval is [0,1]. To each parameter r € [0,1] the angle &A{t) between the counter-clockwise tangent of A in the point n^CO and a horizontal line is assigned. 0A is called the turning function of A. OA is piecewise constant for simple polygons (see Figure 9), it is invariant under translations and, because of the normalization of the parameterization under scaling. A rotation of A corresponds simply to a shift in 6)-direction and a change of the origin to a shift in ^-direction. Now, as a distance measure between shapes A and B the L^-metric {p e N) between
Discrete geometric shapes: Matching, interpolation, and approximation
141
&A and GB is being used, i.e. we define 8,(A,B)=(j
\0A(s)-eB(s)\'ds\
.
Then this distance measure is made invariant under translations and the choice of the starting point 0: ^P
dp(A,B)=
min
( f
ISAis + t) - 0B(S) ^ 0\^ ds]
It is shown that dp is a metric for all /? € N. An algorithm is given for computing d2(A, B) where A, B are simple polygons with n and m edges, respectively. It can be shown that the minimum in the definition of dp can occur for at most 0(mn) "critical" values of ^ By considering partial derivatives with respect to G it is shown that for any fixed t the optimal 0 can easily be computed. Altogether, an 0(mn logmn) algorithm is obtained. An extension of this algorithm to deal with scaling as well was given by Cohen and Guibas [28]. The drawback of this distance measure is its sensitivity to noise, especially nonuniformly distributed noise, but it works properly if the curves are sufficiently smooth. A generalization of this distance to a distance measure that is invariant under affine transformations is given by Huttenlocher and Kedem [53]. With respect to this distance, matching of two polygons with n and m vertices under affine transformations is possible in time 0(mn log mn). A different idea is to represent shapes by their areas rather than by their boundaries. In this context the probably most natural distance measure between two shapes is the area of their symmetric difference. However, this measure seems to be much more difficult to handle than Hausdorff-distance. Within computational geometry it was first considered in a paper by Alt et al. [4] in connection with the very special problem of optimally approximating a convex polygon by an axes-parallel rectangle. Meanwhile some more results on the symmetric difference have been obtained. In fact, de Berg et al. in [34] consider matching algorithms maximizing the area of overlap of convex polygons which is the same as minimizing the symmetric difference. They obtain an algorithm of running time 0((n + m) \og{n + m)) for translations where n and m are the numbers of vertices of the two polygons. In addition, it is shown that if just the two centers of gravity are being matched by a translation this yields a position of two convex figures where the area of overlap is within a constant factor of the maximal one. A lower bound of 9/25 and an upper bound of 4/9 is obtained for this constant, so the center of gravity is a reference point with respect to maximizing the overlap under translations. As can easily be seen this does not imply directly that it is a reference point with respect to the area of the symmetric difference. However, this can be shown, as well. In fact, Alt et al. [7] show that if the centers of gravity of two convex figures are matched the area of the symmetric difference is at most 11/3 times the minimal one. It is demonstrated with an example that this bound is tight. The center of gravity is also a reference point for other sets of transformations such as rigid motions, homotheties, similarities, and arbitrary affine mappings.
142
H. Alt and L.J. Guibas
4. Shape simplification and approximation In manipulating shape representations, it is often advantageous to reduce the complexity of the representation as much as possible, while still staying geometrically close to the original data. There is a vast literature on shape simplification and approximation, both within computational geometry and in the various applied disciplines where shape representation and manipulation issues arise. In this section we cannot possibly attempt to survey all the approaches taken and the results obtained. We will focus on a small subset of results giving efficient algorithms for shape simplification under precise measures of the approximation involved.
4.1. Two-dimensional results To focus our attention, let us consider the problem of simplifying a shape represented as a polygonal chain in the plane. Our goal is to find another polygonal chain with a smaller number of links and which stays close to the original. Let the original chain be C, defined by n vertices v\,V2, •• -.Vn (we assume in this discussion that C is open), and let the desired approximating chain A be defined by m vertices ifi, w;2, • • •, w;^. A number of variations on the problem are possible, depending on exactly how the error, or distance, between C and A is measured, and on whether the Wj 's need to be a subset of the u/ 's, or can be arbitrary points of the plane. In general we have to solve one of two problems in finding A: The min-# problem: Find an A which minimizes m (the combinatorial complexity of A), given some a priori bound e on the maximum allowed distance between C and A, or The min-e problem: For a given m, find an A which minimizes the distance e between CandA. In order to illustrate some of the ideas involved in solving these problems, let us further assume that both C and A are jc-monotone chains — in other words, C and A are piecewise linear continuous functions C{x) and A{x). For such chains a very natural measure of distance is the so-called uniform or Chebyshev metric defined as J(A, C) = max|A(jc) - C(JC)|,
where the max is taken over the support on the x-axis for C Let us consider the case when the vertices of A can be arbitrary points, i.e. need not be vertices of C. Imai and Iri [63,64], and Hakimi and Schmeichel [57] gave optimal 0(n) algorithms for the min-# problem in this context. Their methods can be viewed as an extension of the linear-time algorithm of Suri [87] for computing a minimum link path between two given points inside a simple polygon (here the polygon is the chain C appropriately 'fattened' vertically by the allowed error s) and make crucial use of the concept of weak-visibility from an edge inside a simple polygon [17]. Similar ideas were also used by Aggarwal et al. [5] to give an
Discrete geometric shapes: Matching, interpolation, and approximation
I A3
0{n\ogk) algorithm for finding a convex polygon with the smallest number k of sides nested between two given convex polygons of total complexity n. For the min-6: variant of the chain simplification problem, Hakimi and Schmeichel gave an 0{n^ \ogn) algorithm by cleverly limiting the critical values of 6" to a set of size 0{n^) and then using a certain kind of binary search. More recently, Goodrich [49] used a number of new geometric insights to reduce the set of critical e values to 0{n) and thus obtained an 0{n\ogn) algorithm through several applications of pipelined parametric searching techniques. For a survey of results when A and C are not constrained to be jc-monotone, see the paper of Eu and Toussaint [41] and related work by Hershberger and Snoeyink [60], and Guibas et al. [46]. In general, algorithms for the min-# problem have linear complexity, while those for the min-^ have quadratic complexity. Next let us consider the problem variant where the vertices of A have to be a subset of the vertices of C Now we do not require that A or C be x-monotone (so we revert to using the Hausdorff distance function). One of the oldest and most popular algorithms for this problem is the heuristic Douglas-Peucker [37] line simplification algorithm from the Geographical Information Systems community; Hershberger and Snoeyink showed how to implement this algorithm to run in 0{n\ogn) time [58]. A more formal approach to the problem was initiated in the papers by Imai and Iri cited above. For the min-# variant, Imai and Iri reduce the problem to a graph-theoretic problem as follows. A line segment vJiTj joining vertices vi and Vj of C is called a shortcut for the subchain f /, i;/+i,..., f y of C. A shortcut is allowed if the error it induces is at most the prescribed error e\ the error of the shortcut 'vTv] is defined to be the maximum distance from Wv] to a point Vk, where i ^ A: ^ j . It is easy to see that this is also the Hausdorff distance from IJrv] to the subchain f/, f/+i,..., f J. Our goal is to replace C by a chain consisting of allowed shortcuts. So we consider a directed acyclic graph G whose nodes V are the vertices fi, i'2,..., f,2 of C and whose edges E are the pairs {vt, Vj) if and only if / < j and the shortcut vt Vj is allowed. A shortest (in terms of the number of edges) path from vi to Vn corresponds to a minimum vertex simplification of C; such a path can be found in time linear in the size of G by topological sorting [31]. The size of G is O(n^) and it can be computed by an obvious method in 0(n^) time. Thus constructing G is the bottleneck in the computation. Mellonan and O'Rourke [75] showed how to reduce the construction time to 0(n^ logn), and Chan and Chin [26] further reduced it to optimal O(w^). The Chan and Chin algorithm starts from the observation that the error of a shortcut WvJ, i < j , is the maximum of the errors of two half-lines: the one starting at vt and going towards Vj (call it Uj), and of the one starting at Vj and going towards vt (call it Ijt). To compute the graph G we intersect the graphs G\ and G2, where Gi contains the edge (f/, Vj) if and only if / < j and the error of Uj is less than s and G2 contains the edge {vi, Vj) if and only if / < j and the error of Ijt is less than e. We show how to compute G\ in O(n^) time; the computation of G2 is entirely symmetric by reversing the number of the vertices of C We examine the vertices of Gi in the sequence v\,V2, - • .,Vn. When we process vertex Vi, we calculate in turn the errors determined by all half-lines Uj, where j takes on the values / + 1, / -f 2 , . . . , n. Let Dk denote a closed disk of radius e centered at Vk. The error of Uj is at most e if and only if Uj intersects all disks Dk with i ^k ^ j . Thus the algorithm works by maintaining the cone of half-lines from vt which intersect the disks
144
H. Alt and L.J. Guibas
^z+l
Fig. 10. The computation of the allowed shortcuts starting at Vj.
D/+1, D/+2, • • •, ^y (which is nothing but the intersection for the corresponding cones for all these disks separately). When we process fy+i it suffices to update this cone, which is a constant time computation. If the cone stays non-empty, then (f,, fy+1) is in G i; otherwise we are done with Vi as all further half-lines will also have error which is too large. Thus the computation of G i, and therefore of G and of our desired shortest path can be done in 0(n^) time. Figure 10 illustrates the situation with the disks and the cone of vi a some intermediate point. Methods based on the Imai-Iri graph construction seem inherently quadratic as, if e is large enough, the graph will have Q{n^) allowed shortcuts. However, Varadarajan [89] was able to use graph chque compression techniques such as those proposed by Feder and Motwani [44] to obtain an 0(«^/'^"^'^) algorithm for this min-# problem in the case of X-monotone chains. Varadarajan gave a randomized and a more complex deterministic algorithm for the min-^ version of this problem as well, with the same time bound. In the general (non-x-monotone) case of the above chain simplification problems it is quite possible that A may end up being self-intersecting, even though C itself is simple. This is clearly undesirable in many application contexts. Even worse, one is often simplifying several chains at once, as in the case of boundaries between regions in, say, a geographical map. In this case it is important that the topological structure of the regions be maintained after simplification, so the simplifications of disjoint chains are not allowed to end up crossing each other. Guibas et al. [46] showed that the min-# problem is NP-hard in this case, when the positions of the approximating vertices can be arbitrary. When the vertices of the approximating chain have to be a subset of the original chain and we are in the x-monotone setting, de Berg et al. [35] gave an 0{n(n + m) log^i) algorithm for the min-# problem for a chain C of n vertices so that the resulting approximating chain A is guaranteed to be simple and to be on the same side of each of m given points as C is. Using this algorithm as a local subroutine, they give a method for polygonal subdivision simpHfication which is guaranteed to avoid topological inconsistencies (but which need not be globally optimal).
Discrete geometric shapes: Matching, interpolation, and approximation
145
4.2. Three dimensions Unfortunately the situation is not an equally happy one in three dimensions. Nearly all natural extensions of the above problems are NP-hard, so most of the extant work to-date has focused on approximation algorithms. The analog of an x-monotone chain in 3-D is that of a polyhedral terrain, which is just a continuous bivariate (and possibly non-total) function z = T{x,y) which happens to be piecewise linear. The complexity of a terrain can be measured by its total number of vertices, edges, and faces. The numbers of these are linearly related by Ruler's relation, so most often we will use the number of faces as our measure of the complexity of a terrain. There is a plethora of techniques in the literature for simplifying polyhedral terrains, by effectively deleting vertices which lie in relatively flat neighborhoods (and retriangulating the hole thus created). Unfortunately not much has been proved about such methods. In fact, Agarwal and Suri [14] have shown that even the simpler problem of deciding the approximability within a vertical tolerance 6: of a collection of n isolated points by a polyhedral terrain with at most k faces is NP-hard. Similarly, though more surprisingly. Das and Joseph [36] showed that finding a convex polytope of at most k facets nested between two other convex polytopes P and Q with a total of n facets is also NP-hard, thus settling an old question first posed by Klee. With these results in sight, researchers turned their effort to approximation algorithms. Mitchell and Suri [76] formalized the nested convex polytope problem as a set-cover problem by considering the regions defined on the outer polytope by tangent planes to the inner polytope. They showed that the greedy method of set covering computes a nested polytope with 0(/c \ogn) facets, where K is the complexity of an optimal nested polytope. The same approach also works for the approximation by a convex surface of n points themselves sampled from another convex surface. These algorithms run in O(n^) time. These results were extended by Clarkson [30], who gave a randomized algorithm with expected time complexity 0(/cn^+^) for computing a nested polytope of size 0(/clog/c). Bronnimann and Goodrich [23] further improved the set cover algorithm using VC-dimension ideas to obtain a deterministic algorithm that computes a nested polytope which is to within a constant factor of the optimal one. The set cover formulation, unfortunately, does not work for the terrain approximation problem, as we cannot independently select faces in the approximating surface. Agarwal and Suri in the paper cited above formulate instead the terrain fitting problem as a geometric partitioning problem: first we project all the points to be approximated on the x j-plane; then we seek a disjoint collection of triangles in the xj-plane which cover all these points and such that each triangle satisfies a certain legality constraint w.r.t. the points it covers. This constraint, which can be formulated as a linear program, is that the triangle can be lifted to 3-D so that it 6:-approximates all the points it contains. Agarwal and Suri gave an approximation algorithm which solves this problem and produces a covering set of legitimate triangles whose size is 0(/c log/c), where again K is the minimum number of triangles possible. Unfortunately their algorithm has a very high complexity 0(n^).
146
H. Alt and LJ. Guibas
5. Shape interpolation Shape interpolation, more commonly known as morphing, has recently become a topic of active research interest in computer graphics, computer animation and entertainment, solid reconstruction, and image compression. The general problem is that of continuously transforming one geometric shape into another in a way that makes apparent the salient similarities between the two shapes and 'smoothes over' their dissimilarities. Some of the relevant graphics papers are [68,83,67,84]. The morphing transformation may be thought of as taking place either in the time domain, as in animation, or in the space domain, as in surface reconstruction from planar sections. The latter area has already an extensive literature of its own [43], and computational geometric techniques have been used with good results [90,25] (though the problem is not always solvable [50]). In general there are numerous ways to interpolate between two shapes and little has been said about criteria for comparing the quality of different morphs and notions of optimality. Often, the class of allowable or desirable morphing transforms in only vaguely specified, with the result that the problem ends up being either under- or over-constrained. In this section we will survey the rather small amount of work in this area which relates to Computational Geometry. Let P and Q be the two shapes we wish to morph. For now we do not specify how the shapes P and Q are described, or what is the ambient space (2-D, 3-D, etc.). Most morphing algorithms operate according to the following paradigm: firstly relevant 'features' of P and Q are identified and matched pairwise; secondly, smooth motions are planned that will bring into alignment these pairs of corresponding features; and thirdly the whole morphing transformation is generated, while respecting other global constraints which the shapes P, Q, and their interpolants must satisfy. This paradigm works well when the class of shapes to be morphed consists of fairly similar objects. In cases, however, when we want to be able to morph a great variety of different shapes, the above process is commonly subdivided into a series of stages. The shapes P and Q are first 'canonicalized' by mapping them into their canonical forms K(P) and K(Q) respectively — these canonical forms are more standardized and therefore easier to morph to each other. The whole transformation is then done by going from P to /c(P) to /c((2) to Q. As the above description makes clear, there are numerous connections between the problems of shape matching and shape interpolation, and several of the matching techniques already discussed are applicable to the morphing problem, especially in the feature matching stage. It is not so obvious, but it is equally true that morphing techniques can also be used for shape comparison problems. In a certain sense, the optimum morph from P to Q is the transformation that distorts P as little as possible in order to make it look like Q. In a morphing algorithm we can assign a notion of 'work' or cost to the distortions the algorithm needs to perform. The minimum work then required to morph P into Q can then serve as a measure of the distance from shape P to shape Q. Note that such a distance function based on morphing clearly satisfies the triangle inequality. To make these matters concrete, let us discuss a few simple examples in 2-D and 3-D. Let P be an open simple polygonal chain of m vertices P = p\p2- • -Pm and Q be an open simple polygonal chain of n vertices Q = qxqi-•-qn- This problem was considered by Sederberg and Greenwood [83]. According to our paradigm above, we first need to establish a correspondence between the 'features' of P and Q — for polygonal chains the
Discrete geometric shapes: Matching, interpolation,
and
approximation
Ul
Fig. 11. An example of matching polygonal chain vertices.
natural notion is that of vertices (though other choices also make sense in applications). Now since m might be different from n, in general this will have to be a many-to-one, or one-to-many mapping. But where should these duplicate vertices be added? We can represent all possible ways to pair up vertices of P with vertices of Q in sequence by considering monotone paths in the [l..m] x [\..n\ grid. An example is shown in Figure 11, which shows a particular matching between a chain P of 8 vertices and a chain 2 of 10 vertices. A diagonal move on the monotone path corresponds to advancing on both P and Q, while a horizontal move corresponds to advancing on Q only (and thus duplicating the corresponding vertex of P. We can choose an optimum correspondence, by selecting the path n to be of minimal cost in some appropriate sense. For example, we may want to minimize the sum of the distances of all the corresponding pairs of vertices. Sederberg and Greenwood developed a physics-based measure of the energy required to stretch and bend P into Q once the correspondence by n is given. The optimal n under such measures can be computed by classical dynamic programming techniques [31] in time 0(mn). Similar ideas have been used to fit polyhedral sleeves to polygonal slices in parallel planes [25]. Once we have the correspondence, we can then move corresponding vertices to each other through linear interpolation. Implicitly, at each time t, this defines an interpolating polygonal chain Rt and thus our construction of a morph between the polygonal chains is complete. Note also that in order to extend this method to closed polygonal chains we
148
H. Alt and L.J. Guibas
(a)
(b) Fig. 12. Examples of polygonal chain morphs: (a) a good case, (b) a bad case.
must decide first on an appropriate 'origin' for each chain, and this is not a trivial matter. Figure 12 shows some successful and unsuccessful examples of this method, depending on the origin chosen. Note in particular that the interpolating chain Rf can self-intersect, even though neither P and Q do. Sederberg et al. also proposed another simple method for polygon interpolation based on interpolating side lengths and angles, once a vertex correspondence is established [84] — but now the challenge becomes to get the polygons to 'close up'. Preserving structural properties during a morph, such as the simplicity of a chain in the example above, is a difficult problem. Guibas and Hershberger [45], consider how to morph two parallel polygons to each other while maintaining simplicity. The setting is now that P and Q are two simple polygons in the plane of n sides each, and there is a 1-1 correspondence between the sides of P and Q so that corresponding sides are parallel. The goal is to continuously deform P io Q while at all times the interpolating polygon Rt has its corresponding sides parallel to those of P and Q and stays simple. In this case the very statement of the problem provides the correspondence between features of the polygons. Even so, the two polygons P and Q can look quite different and the existence of a morph which remains parallel and simple is not obvious; see Figure 13 (a morph between these two spiraling polygons can happen by simulating the way recording tape can move from one reel to another). Guibas and Hershberger showed that this is, nevertheless, always possible and gave an algorithm which uses 0(n^^^^^) primitive operations called 'parallel moves'; this was later improved to O(nlogn) by Hershberger and Suri [61]. A parallel move is a translation of a side of a polygon parallel to itself, with appropriate modifications of the polygon at the endpoints of the edge. Guibas and Hershberger first showed that parallel moves can be used to take each polygon to a fractal-like canonical or reduced form in which portions of the polygon's boundary have been shrunk to micro-structures of widely different scales.
Discrete geometric shapes: Matching, interpolation,
and
approximation
149
I
L 1
Q Fig. 13. These oppositely spiraling parallel polygons are still morphable.
A polygon in this canonical form corresponds, roughly speaking, to a binary tree whose leaf weights are the angles of the original polygon. Once P and Q are in this canonical form, the corresponding trees can be morphed into each other through a series of standard tree rotation transformations; certain validity conditions have to hold throughout this process. These tree rotations can be realized geometrically through parallel moves on the polygons. The fractal-like structure of the canonical form helps in arguing that the translations required to implement particular rotations do not interfere with other parts of the polygon. Clearly the Guibas-Hershberger morph solves only a limited problem and even for that the canonical form used introduces unnecessarily large distortions into the interpolating shapes. Different polygon morphing techniques were developed by Shapira and Rappoport [86], based on the star-skeleton representation of a polygon (a decomposition of the polygon into star-shaped pieces). Such methods do much better in preserving the metric properties of the polygons, but unfortunately they still do not preserve global constraints, such as simplicity — plus they are expensive, requiring O(n^) time. Another idea for morphing polygons can be based on the compatible triangulations result of Aronov, Seidel, and Souvaine [15]. They showed that P and Q can always be 'compatibly'-triangulated by adding O(n^) Steiner points (compatibility means that the triangulations are combinatorially equivalent). The use of conformal mappings has also been suggested. Let us now also look at some work in three dimensions. The only case that has been extensively studied is that of morphing convex polytopes [67]. If P and Q are convex polyhedra, a natural way to construct a matching between their surfaces is to match points on the two polyhedra that admit of the same (outwards) normal. In general, this will match all points on each face of P to a vertex of Q and vice versa, as well as matching (the points of) certain pairs of edges, one from P and one from g . If we place the origin at an arbitrary point of space and compute the vector sums of corresponding pairs of points from P and 2 , the resulting set of points will form the boundary of another convex polytope, called the Minkowski sum of P and Q and denoted by P 0 2 [69,73]. Armed with this concept, we can then morph P to Q by constructing the mixed volume {\ — t)P ®tQ, diSi varies in the range 0 < f ^ 1. This type of morph was exploited by Kaul and Rossignac [68,81]. The same technique works, of course, in 2-D or dimensions higher than three. A nice way to visualize this morph in 2-D is to think of P and Q as two convex polygons placed on
150
H. Alt and LJ.
Guibas
parallel planes in 3-D. One then constructs the convex hull of the union of P and Q by adding a 'sleeve' wrapping around P and Q. The sections of this sleeve by a plane moving parallel to itself from that containing P to that containing Q gives us the morph. The 'kinetic framework' of [51] allows the extension of this type of morph to general polygons in the plane. Also, since regular subdivisions of the plane or alpha shapes [40] can be viewed as projections of convex polytopes in one dimension higher, the above method also gives us some possibilities for morphing such subdivisions or alpha shapes. Other approaches to morphing 2-D or 3-D shapes are given in [47,67,42].
References [1] O. Aichholzer, H. Alt and G. Rote, Matching shapes with a reference point, Intemat. J. Comput. Geom. Appl. 7 (1997), 349-363. [2] H. Alt, B. Behrends and J. Blomer, Approximate matching of polygonal shapes, Proc. 7th Annu. ACM Sympos. Comput. Geom. (1991), 186-193. [3] H. Alt, B. Behrends and J. Blomer, Approximate matching ofpolygonal shapes, Ann. Math. Artif. Intell. 13 (1995), 251-266. [4] H. Alt, J. Blomer, M. Godau and H. Wagener, Approximation of convex polygons, Proc. 17th Intemat. CoUoq. Automata Lang. Program., Lecture Notes in Comput. Sci. 443, Springer-Verlag (1990), 703-716. [5] A. Aggarwal, H. Booth, J. O'Rourke, S. Suri and C.K. Yap, Finding minimal convex nested polygons. Inform. Comput. 83(1) (October 1989), 98-110. [6] E.M. Arkin, L.P. Chew, D.P. Huttenlocher, K. Kedem and J.S.B. Mitchell, An efficiently computable metric for comparing polygonal shapes, IEEE Trans. Pattern Anal. Mach. Intell. 13 (3) (1991), 209-216. [7] H. Alt, U. Fuchs, G. Rote and G. Weber, Matching convex shapes with respect to the symmetric difference, Proc. 4th Annual European Symp. on Algorithms-ESA'96, Springer Lecture Notes in Comput. Sci. 1136 (1996), 320-333. [8] H. Alt and M. Godau, Measuring the resemblance of polygonal curves, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 102-109. [9] H. Alt and M. Godau, Computing the Frechet distance between two polygonal curves, Intemat. J. Comput. Geom. Appl. 5 (1995), 75-91. [10] A.V. Aho, I.E. Hopcroft and J.D. Ullman, The Design and Analysis of Computer Algorithms, AddisonWesley, Reading, MA (1974). [11] E.M. Arkin, K. Kedem, J.S.B. Mitchell, J. Sprinzak and M. Werman, Matching points into pairwise-disjoint noise regions: Combinatorial bounds and algorithms, ORSA J. Comput. 4 (4) (1992), 375-386. [12] S. Arya, D.M. Mount, N.S. Netanyahu, R. Silverman and A. Wu, An optimal algorithm for approximate nearest neighbor searching, Proc. 5th ACM-SIAM Sympos. Discrete Algorithms (1994), 573-582. [13] H. Alt, K. Mehlhom, H. Wagener and E. Welzl, Congruence, similarity and symmetries of geometric objects. Discrete Comput. Geom. 3 (1988), 237-256. [14] P.K. Agarwal and S.Suri, Surface approximation and geometric partitions, Proc. 5th ACM-SIAM Sympos. Discrete Algorithms (1994), 24-33. [15] B. Aronov, R. Seidel and D. Souvaine, On compatible triangulations of simple polygons, Comput. Geom. 3 (1) (1993), 27-35. [16] P.K. Agarwal, M. Sharir and S. Toledo, Applications of parametric searching in geometric optimization, J. Algorithms 17 (1994), 292-318. [17] D. Avis and G.T. Toussaint, An optimal algorithm for determining the visibility of a polygon from an edge, IEEE Trans. Comput. C-30 (1981), 910-1014. [18] M.J. Atallah, A linear time algorithm for the Hausdorff distance between convex polygons. Inform. Process. Lett. 17 (1983), 207-209. [19] M.D. Atkinson, An optimal algorithm for geometrical congruence, J. Algorithms 8 (1987), 159-172.
Discrete geometric shapes: Matching, interpolation,
and approximation
151
[20] T. Akutsu, H. Tamaki and T. Tokuyama, Distribution of distances and triangles in a point set and algorithms for computing the largest common point set, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 314323. [21] H.S. Baird, Model-Based Image Matching Using Location, Distinguished Dissertation Series, MIT Press (1984). [22] B. Belirends, Algorithmen zur Erkennung der e-Kongruenz von Punktmengen und Polygonen, M.S. thesis, Freie Univ. Berlin, Institute for Computer Science (1990). [23] H. Bronnimann and M.T. Goodrich, Almost optimal set covers in finite VC-dimension, Discrete Comput. Geom. 14 (1995), 263-279. [24] C. Burnikel, J. Konnemann, K. Mehlhom, S. Naher, S. Schirra and C. Uhrig, Exact geometric computation in LEDA, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), C18-C19. [25] G. Barequet and M. Sharir, Piecewise-linear interpolation between polygonal slices, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 93-102. [26] W.S. Chan and F. Chin, Approximation of polygonal curves with minimum number of line segments or minimum error, Intemat. J. Comput. Geom. Appl. 6 (1996), 59-77. [27] L.P. Chew, D. Dor, A. Efrat and K. Kedem, Geometric pattern matching in d-dimensional space, Proc. 2nd Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 979, Springer-Verlag (1995), 264-279. [28] S.D. Cohen and L.J. Guibas, Partial matching of planar polylines under similarity transformations, Proc. 8th ACM-SIAM Sympos. Discrete Algorithms (January 1997), 777-786. [29] L.P. Chew, M.T. Goodrich, D.P Huttenlocher, K. Kedem, J.M. Kleinberg and D. Kravets, Geometric pattern matching under Euclidean motion, Comput. Geom. 7 (1997), 113-124. [30] K.L. Clarkson, Algorithms for polytope covering and approximation, Proc. 3rd Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 709, Springer-Veriag (1993), 246-252. [31] T.H. Cormen, C.E. Leiserson and R.L. Rivest, Introduction to Algorithms, MIT Press, Cambridge, MA (1990). [32] R. Cole, Slowing down sorting networks to obtain faster sorting algorithms, Proc. 25th Annu. IEEE Sympos. Found. Comput. Sci. (1984), 255-260. [33] R. Cole, Slowing down sorting networks to obtain faster sorting algorithms, J. ACM 34 (1987), 200-208. [34] M. de Berg, O. Devillers, M. van Kreveld, O. Schwarzkopf and M. Teillaud, Computing the maximum overlap of two convex polygons under translation, Proc. 7th Annu. Intemat. Sympos. Algorithms Comput. (1996). [35] M. de Berg, M. van Kreveld and S. Schirra, A new approach to subdivision simplification, Proc. 12th Internal. Sympos. Comput.-Assist. Cartog. (1995), 79-88. [36] G. Das and D. Joseph, The complexity of minimum convex nested polyhedra, Proc. 2nd Canad. Conf. Comput. Geom. (1990), 296-301. [37] D.H. Douglas and T.K. Peucker, Algorithms for the reduction of the number of points required to represent a digitized line or its caricature, Canadian Cartographer 10 (2) (December 1973), 112-122. [38] W. Eric and L. Grimson, Object Recognition by Computer: The Role of Geometric Constraints, MIT Press (1990). [39] A. Efrat and A. Itai, Improvements on bottleneck matching and related problems using geometry, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 301-310. [40] H. Edelsbrunner and E.P Miicke, Three-dimensional alpha shapes, ACM Trans. Graph. 13 (1) (January 1994), 43-72. [41] D. Eu and G. Toussaint, On approximating polygonal curves in two and three dimensions, Comput. Vision Graph. Image Process. 56 (1994), 231-246. [42] H. Edelsbrunner and R. Waupotitsch, A combinatorial approach to cartograms, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 98-108. [43] H. Fuchs, Z.M. Kedem and S.P. Uselton, Optimal surface reconstruction from planar contours, Comm. ACM 20 (1977), 693-702. [44] T. Feder and R. Motwani, Clique partitions, graph compression and speeding up algorithms, Proc. 23rd ACM Symp. Theory of Computing (1991), 123-133. [45] L. Guibas and J. Hershberger, Morphing simple polygons, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 267-276.
152
H. Alt and LJ.
Guibas
[46] LJ. Guibas, J.E. Hershberger, J.S.B. Mitchell and J.S. Snoeyink, Approximating polygons and subdivisions with minimum link paths, Intemat. J. Comput. Geom. Appl. 3(4) (December 1993), 383^15. [47] A. Glassner, Metamorphosis ofpolyhedra, Manuscript (1991). [48] M.T. Goodrich, J.S. Mitchell and M.W. Orietsky, Practical methods for approximate geometric pattern matching under rigid motion, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 103-112. [49] M.T. Goodrich, Efficient piecewise-linear function approximation using the uniform metric. Discrete Comput. Geom. 14 (1995), 445-462. [50] C. Gitlin, J. O'Rourke and V. Subramanian, On reconstructing polyhedra from parallel slices, Intemat. J. Comput. Geom. Appl. 6 (1) (1996), 103-122. [51] L.J. Guibas, L. Ramshaw and J. Stolfi, A kinetic framework for computational geometry, Proc. 24th Annu. IEEE Sympos. Found. Comput. Sci. (1983), 100-111. [52] B. Grunbaum, Convex Polytopes, Wiley, New York, NY (1967). [53] D.P. Huttenlocher and K. Kedem, Computing the minimum Hausdorff distance for point sets under translation, Proc. 6th Annu. ACM Sympos. Comput. Geom. (1990), 340-349. [54] D.P. Huttenlocher, K. Kedem and J.M. Kleinberg, On dynamic Voronoi diagrams and the minimum Hausdorff distance for point sets under Euclidean motion in the plane, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 110-120. [55] D.P. Huttenlocher, G.A. Klanderman and W.J. Rucklidge, Comparing images using the Hausdorff distance, IEEE Trans, on Pattern Analysis and Machine Intelligence 15 (1993), 850-863. [56] D.P. Huttenlocher, K. Kedem and M. Sharir, The upper envelope of Voronoi surfaces and its applications. Discrete Comput. Geom. 9 (1993), 267-291. [57] S.L. Hakimi and E.F. Schmeichel, Fitting polygonal functions to a set ofpoints in the plane, CVGIP: Graph. Models Image Process. 53 (2) (1991), 132-136. [58] J. Hershberger and J. Snoeyink, Speeding up the Douglas-Peucker line simplification algorithm, Proc. 5th Inti. Symp. Spatial Data Handling. IGU Commission on GIS (1992), 134-143. [59] P.J. Heffeman and S. Schirra, Approximate decision algorithms for point set congruence, Comput. Geom. 4 (1994), 137-156. [60] J. Hershberger and J. Snoeyink, Computing minimum length paths of a given homotopy class, Comput. Geom. 4 (1994), 63-98. [61] J. Hershberger and S. Suri, Morphing binary trees, Proc. 6th ACM-SIAM Sympos. Discrete Algorithms (1995), 396-404. [62] D. Huttenlocher and S. Ullman, Recognizing solid objects by alignment with an image, Intemat. J. Computer Vision 5 (1990), 195-212. [63] H. Imai and M. Iri, Computational-geometric methods for polygonal approximations of a curve, Comput. Vision Graph. Image Process. 36 (1986), 3 1 ^ 1 . [64] H. Imai and M. Iri, Polygonal approximations of a curve-formulations and algorithms. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1988), 71-86. [65] S. Irani and P. Raghavan, Combinatorial and experimental results for randomized point matching algorithms, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 68-77. [66] K. Imai, S. Sumino and H. Imai, Minimax geometric fitting of two corresponding sets of points, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 266-275. [67] J. Kent, W. Carlson and R. Parent, Shape transformation for polyhedral objects. Computer Graphics (SIGGRAPH '92 Proceedings), Vol. 26 (1992), 47-54. [68] A. Kaul and J. Rossignac, Solid-interpolating deformations: Construction and animation of PIPs, Proc. Eurographics '91 (1991), 493-505. [69] J.-C. Latombe, Robot Motion Planning, Kluwer Acad. Publ., Boston (1991). [70] Y. Lamdan, J.T. Schwartz and H.J. Wolfson, Object recognition by affine invariant matching. Proceedings of Computer Vision and Pattern Recognition (1988), 335-344. [71] Y Lamdan, J.T. Schwartz and H.J. Wolfson, On recognition o/3-d objects from 2-d images. Proceedings of the 1988 IEEE International Conference on Robotics and Automation (1988), 1407-1413. [72] Y Lamdan and H.J. Wolfson, Geometric hashing: A general and efficient model-based recognition scheme, Second Intemational Conference on Computer Vision (1988), 238-249. [73] L.A. Lyustemik, Convex Figures and Polyhedra, D.C. Heath, Boston, MA (1966).
Discrete geometric shapes: Matching, interpolation,
and approximation
153
[74] N. Megiddo, Applying parallel computation algorithms in the design of serial algorithms, J. ACM 30 (1983), 852-865. [75] A. Melkman and J. O'Rourke, On polygonal chain approximation. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1988), 87-95. [76] J.S.B. Mitchell and S. Suri, Separation and approximation ofpolyhedral objects, Comput. Geom. 5 (1995), 95-114. [77] R. Norel, D. Fischer, H. Wolfson and R. Nussinov, Molecular surface recognition by a computer visionbased technique. Protein Engineering 7 (1994), 3 9 ^ 6 . [78] R. Norel, S.L. Lin, H. Wolfson and R. Nussinov, Shape complimentarity at protein-protein interfaces, Biopolymers 34 (1994), 933-940. [79] M.H. Overmars and C.-K. Yap, New upper bounds in Klee's measure problem, SIAM J. Comput. 20 (1991), 1034-1045. [80] K. Przeslawski and D. Yost, Continuity properties of selectors and Michael's theorem, Michigan Math. J. 36(1989), 113-134. [81] J. Rossignac and A. Kaul, Agrels and bips: Metamorphosis as a Bezier curve in the space of polyhedra, Eurographics '94 Proceedings, Vol. 13 (1994), 179-184. [82] S. Schirra, Uber die Bitkomplexitdt der s-Kongruenz, M.S. thesis, Univ. des Saarlandes, Computer Science Department (1988). [83] T. Sederberg and E. Greenwood, A physically based approach to 2D shape blending. Computer Graphics (SIGGRAPH '92 Proceedings), Vol. 26 (1992), 25-34. [84] T. Sederberg, P. Gao, G. Wang and H. Mu, 2D shape blending: An intrinsic solution to the vertex path problem. Computer Graphics (SIGGRAPH '93 Proceedings), Vol. 27 (1993), 15-18. [85] G.C. Shephard, The Steiner point of a convex poly tope, Canadian J. Math. 18 (1966), 1294-1300. [86] M. Shapira and A. Rappoport, Shape blending using the skeleton representation, IEEE Computer Graphics and Appl. 16 (1995), 44-50. [87] S. Suri, A linear time algorithm for minimum link paths inside a simple polygon, Comput. Vision Graph. Image Process. 35 (1986), 99-110. [88] J. Sprinzak and M. Werman, Affine point matching. Pattern Recogn. Lett. 15 (1994), 337-339. [89] K. Varadarajan, Approximating monotone polygonal curves using the unfirm metric, Proc. 12th ACM Symp. Computational Geometry (1996). [90] E. Welzl and B. Wolfers, Surface reconstruction between simple polygons via angle criteria, J. Symbolic Comput. 17 (1994), 351-369.
This Page Intentionally Left Blank
CHAPTER 4
Deterministic Parallel Computational Geometry Mikhail J. Atallah* Department of Computer Sciences, Purdue University, West Lafayette, IN 47907, USA E-mail: [email protected]
Danny Z. Chen^ Department of Computer Science and Engineering, University of Notre Dame, Notre Dame, IN 46556, USA E-mail: [email protected]
Contents 1. Introduction 2. PRAM models 3. Basic subproblems 3.1. Sorting and merging 3.2. Parallel prefix 3.3. List ranking 3.4. Tree contraction 3.5. Brent's theorem 3.6. Euler tour technique 3.7. Lowest common ancestors (LCA) 4. Inherently sequential geometric problems 4.1. Plane-sweep triangulation 4.2. Weighted planar partitioning 4.3. Visibility layers 4.4. Open problems 5. Parallel divide and conquer 5.1. Two-way divide and conquer 5.2. "Rootish" divide and conquer 5.3. Example: visibility in a polygon 6. Cascading 6.1. A rough sketch of cascading 6.2. Cascading merge sort
157 157 159 160 160 160 160 161 161 162 163 163 163 163 164 164 164 165 165 168 168 169
* Portions of the work of this author were supported by the National Science Foundation under Grant CCR9202807, and by sponsors of the COAST Laboratory. ^The work of this author was supported in part by the National Science Foundation under Grant CCR-9623585. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
155
156
M.J. Atallah and D.Z. Chen
7. Fractional cascading in parallel 8. Cascading with labeling functions 8.1. The 3-dimensional maxima problem 8.2. The two-set dominance counting problem 8.3. Other applications of cascading 9. Cascading without concurrent reads 10. Matrix searching techniques 10.1. Row minima 10.2. Tube minima 10.3. Generalized monotone matrices 11. Other useful PRAM techniques 11.1. Geometric hierarchies 11.2. From CREW to EREW 11.3. Array-of-trees 11.4. Deterministic geometric sampling 11.5. Output-sensitive algorithms 11.6. Stratified decomposition trees 11.7. Prune-and-search 12. Further remarks References
172 176 176 178 179 180 181 181 184 187 187 187 187 188 189 189 190 191 191 192
Abstract We describe general methods for designing deterministic parallel algorithms in computational geometry. We focus on techniques for shared-memory parallel machines, which we describe and illustrate with examples. We also discuss some open problems in this area.
Deterministic parallel computational geometry
157
1. Introduction Many problems in computational geometry come from application areas (such as pattern recognition, computer graphics, operations research, computer-aided design, robotics, etc.) that require real-time speeds. This need for speed makes parallelism a natural candidate for helping achieve the desired performance. For many of these problems, we are already at the limits of what can be achieved through sequential computation. The traditional sequential methods can be inadequate for those applications in which speed is important and that involve a large number of geometric objects. Thus, it is important to study what kinds of speed-ups can be achieved through parallel computing. As an indication of the importance of this research direction, we note that four of the eleven problems used as benchmark problems to evaluate parallel architectures for the DARPA Architecture Workshop Benchmark Study of 1986 were computational geometry problems. In parallel computation, it is the rule rather than the exception that the known sequential techniques do not translate well into a parallel setting; this is also the case in parallel computational geometry. The difficulty is usually that these techniques use methods which either seem to be inherently sequential, or would result in inefficient parallel implementations. Thus new paradigms are needed for parallel computational geometry. The goal of this chapter is to give a detailed look at the currently most successful techniques in parallel computational geometry, while simultaneously highlighting some open problems, and discussing possible extensions to these techniques. It differs from [33] in that it gives a much more detailed coverage of the shared-memory model at the expense of the coverage of networks of processors. Since it is impossible to describe all the parallel geometric algorithms known, our focus is on general algorithmic techniques rather than on specific problems; no attempt is made to list exhaustively all of the known deterministic parallel complexity bounds for geometric problems. For more discussion of parallel geometric algorithms, the reader is referred to [15,139]. The rest of the chapter is organized as follows. Section 2 briefly reviews the PRAM parallel model and the notion of efficiency in that model. Section 3 reviews basic subproblems that tend to arise in the solutions of geometric problems on the PRAM, Section 4 is about inherently sequential (i.e. non-parallelizable) geometric problems, Section 5 discusses the parallel divide and conquer techniques. Section 6 discusses the cascading technique, Section 7 discusses parallel fractional cascading, Section 8 discusses cascading with labeling functions. Section 9 discusses cascading in the EREW model. Section 10 discusses parallel matrix searching techniques, Section 11 discusses a number of other useful PRAM techniques, and Section 12 concludes.
2. PRAM models The PRAM (Parallel Random Access Machine) has so far been the main vehicle used to study the parallel algorithmics of geometric problems, and hence it is the focus of this chapter. This section briefly reviews the PRAM model and its variants. The PRAM model of parallel computation is the shared-memory model in which the processors operate synchronously [153], as illustrated in Figure 1. A step on a PRAM
158
MJ. Atallah and D.Z. Chen Processors
Shared Memory Cell 1
p, ^
Cell 2 Cell 3
P2
P3
• • •
-
• • •
r^ Fig. 1. The PRAM model.
consists of each processor reading the content of a cell in the shared memory, writing data in a cell of the shared memory, or performing a computation within its own registers. Thus all communication is done via the shared memory. There are many variants of the PRAM, differing from one another in the way read and/or write conflicts are treated. The CREW (Concurrent Read Exclusive Write) version of this model allows many processors to simultaneously read the content of a memory location, but forbids any two processors from simultaneously attempting to write in the same memory location (even if they are trying to write the same thing). The CRCW (Concurrent Read Concurrent Write) version of the PRAM differs from the CREW one in that it also allows many processors to write simultaneously in the same memory location: In any such common-write contest, only one processor succeeds, but it is not known in advance which one. (There are other versions of the CRCW PRAM but we shall not concern ourselves with these here.) The EREW PRAM is the weakest version of the PRAM: It forbids both concurrent reading and concurrent writing. The PRAM has been extensively used in theoretical studies as a vehicle for designing parallel algorithms. Although it captures important parameters of a parallel computation, the PRAM does not account for communication and synchronization (more recent variations of the model do account for these factors, but we do not discuss them since essentially no parallel geometric algorithms have yet been designed for them). The PRAM is generally considered to be a rather unrealistic model of parallel computation. However, although there are no PRAMs commercially available, algorithms designed for PRAMs can often be efficiently simulated on some of the more realistic parallel models. The PRAM enables the algorithm designer to focus on the structure of the problem itself, without being distracted by architecture-specific issues. Another advantage of the PRAM is that, if one can give strong evidence (in the sense explained in the next paragraph) that a problem has no fast parallel solution on the PRAM, then there is no point in looking for a fast solution to it on more realistic parallel models (since these are weaker than the PRAM). We now review some basic notions concerning the speed and efficiency of PRAM computations. The time x processor product of a PRAM algorithm is called its work (i.e., the total number of operations performed by that algorithm). A parallel algorithm is said to run
Deterministic parallel computational geometry
159
in poly logarithmic time if its time complexity is 0(log^ n), where n is the problem size and ^ is a constant independent of n (i.e., k = 0{\)). A problem solvable in polylogarithmic time using a polynomial number of processors is said to be in the class NC. It is strongly believed (but not proved) that not all problems solvable in polynomial time sequentially are solvable in polylogarithmic time using a polynomial number of processors (i.e., it is believed that P ^ NC). As in the theory of NP-completeness, there is an analogous theory in parallel computation for showing that a particular problem is probably not in NC: By showing that the membership of that problem in NC would imply that P = NC. Such a proof consists of showing that each problem in P admits an NC reduction to the problem at hand (an NC reduction is a reduction that takes polylogarithmic time and uses a polynomial number of processors). Such a problem is said to be V-complete. For a more detailed discussion of the class NC and parallel complexity theory, see (for example) [189] or [156]. A proof establishing P-completeness of a problem is viewed as strong evidence that the problem is "inherently sequential". Once one has established that a geometric problem is in NC, the next step is to design a PRAM algorithm for it that runs as fast as possible, while being efficient in the sense that it uses as few processors as possible. Ideally, the parallel time complexity of the PRAM algorithm should match the parallel lower bound of the problem (assuming such a lower bound is known), and its work complexity should match the best known sequential time bound of the problem. A parallel lower bound for a geometric problem is usually established by showing that such an algorithm can be used to solve some other (perhaps non-geometric) problem having that lower bound. For example, it is well known [94] that computing the logical OR of n bits has an Q (logn) time lower bound on a CREW PRAM. This can easily be used to show that detecting whether the boundaries of two convex polygons intersect also has an Q(\ogn) time lower bound in that same model, by encoding the n bits whose OR we wish to compute in two concentric regular n-gons such that the /th bit governs the relative positions of the /th vertices of the two n-gons. Interestingly, if the word "boundaries" is removed from the previous sentence then the lower bound argument falls apart and it becomes possible to solve the problem in constant time on a CREW PRAM, even using a sublinear number of processors [43,224]. Before reviewing the techniques that have resulted in many PRAM geometric algorithms that are fast and efficient in the above sense, a word of caution is in order. From a theoretical point of view, the class NC and the requirement that a "fast" parallel algorithm should run in polylogarithmic time, are eminently reasonable. But from a more practical point of view, not having a polylogarithmic time algorithm does not entirely doom a problem to being "non-parallelizable". One can indeed argue [221] that, e.g., a problem of sequential complexity G){n) that is solvable in 0{^) time by using ^ processors is "parallelizable" in a very real sense, even if no polylogarithmic time algorithm is known for it.
3. Basic subproblems This section reviews some basic subproblems that tend to be used as subroutines in the design of PRAM geometric algorithms.
160
M.J. Atallah and D.Z. Chen
3.1. Sorting and merging Sorting is probably the most frequently used subroutine in parallel geometric algorithms. Fortunately, for PRAM models we know how to sort n numbers optimally: 0(log«) time and n processors on the EREW PRAM [87,12]. Merging on the PRAM is easier than sorting [211,222,54,147]; on the CREW PRAM it is O(loglogn) time with n/\og\ogn processors, and O(logn) time with n/\ogn processors on the EREW PRAM.
3.2. Parallel prefix Given an array A of n elements and an associative operation denoted by +, the parallel prefix problem is that of computing an array Bofn elements such that B(i) = J2k=i Mk)Parallel prefix can be performed in O(logn) time and n/\ogn processors on an EREW PRAM [159,164], 0(log«/loglogn) time and n\og\ogn/\ogn processors on a CRCW PRAM [92]. Computing the smallest element in array A is a special case of parallel prefix: In the CRCW model, this can be done faster than general parallel prefix — in 0(1) time with n^~^^ processors for any positive constant e or, alternatively, in O(loglogn) time with n/loglogn processors [211].
3.3. List ranking List ranking is a more general version of the parallel prefix problem: The elements are given as a linked list, i.e., we are given an array A each entry of which contains an element as well as a pointer to the entry of A containing the predecessor of that element in the linked list. The problem is to compute an array B such that B(i) is the "sum" of the first / elements in the linked list. This problem is considerably harder than parallel prefix, and most tree computations as well as many graph computations reduce, via the Euler tour technique (described below), to solving this problem. EREW PRAM algorithms that run in O(logn) time and n/ \ogn processors are known for list ranking [90,24].
3.4. Tree contraction Given a (not necessarily balanced) rooted tree 7, the problem is to reduce T to a 3-node tree by a sequence of rake operations. A rake operation can be applied at a leaf v by removing V and the parent of v, and making the sibling of i; a child of f's grandparent (note that rake cannot be applied at a leaf whose parent is the root). This is done as follows: Number the leaves 1,2,..., etc., in left to right order, and apply the rake operation first to all the odd-numbered leaves that are left children, then to the other odd-numbered leaves. Renumber the remaining leaves and repeat this operation, until done. The number of iterations performed by such an algorithm is logarithmic because the number of leaves is reduced by half at each iteration. Note that applying the rake to all the odd-numbered leaves at the same time would not work, as can be seen by considering the situation where
Deterministic parallel computational
geometry
161
Fig. 2. The Euler tour of a tree T.
V is an odd-numbered left child, w is an odd-numbered right child, and the parent of v is the grandparent of w (what goes wrong in that case is that i; wants to remove its parent p and simultaneously w wants its sibling to become child of p). Tree contraction is an abstraction of many other problems, including that of evaluating an arithmetic expression tree [175]. Many elegant optimal EREW PRAM algorithms for it are known [1,90,128, 158], running in 0(logn) time with n/logn processors.
3.5. Brent's theorem This technique is frequently used to reduce the processor complexity of an algorithm without any increase in the time complexity. THEOREM 3.1 (Brent). Any synchronous parallel algorithm taking time T that consists of a total ofW operations can be simulated by P processors in time 0{{W/P) + T).
There are actually two qualifications to the above Brent's theorem [60] before one can apply it to a PRAM: (i) At the beginning of the /-th parallel step, we must be able to compute the amount of work Wt done by that step, in time 0{Wi/P) and with P processors, and (ii) we must know how to assign each processor to its task. Both (i) and (ii) are generally (but not always) easily satisfied in parallel geometric algorithms, so that the hard part is usually achieving W operations in time T.
3.6. Euler tour technique "Wrapping a chain" around a tree defines an Euler tour of that tree. More formally, if T is an undirected tree, the Euler tour of T is obtained in parallel by doing the following for every node vofT\ Letting WQ,W\, .. .,Wk-\ be the nodes of T adjacent to f, in the order in which they appear in the adjacency list of i;, we set the successor of each (directed)
162
MJ. Atallah and D.Z. Chen
edge {wi, v) equal to the (directed) edge (u, u;(/+i)mod k)- See Figure 2 for an illustration. Most tree computations as well as many graph computations reduce, via the Euler tour technique, to the list ranking problem [216], as the following examples demonstrate. 1. Rooting an undirected tree at a designated node i;: Create the Euler tour of the tree, "open" the tour at v (thus making the tour an Euler path), then do a parallel prefix along the linked list of arcs described by the successor function (with a weight of 1 for each arc). For each undirected edge [x,y] of the tree, if the prefix sum of the directed edge {x,y)m the Euler tour is less than that of the directed edge (y, x), then set X to be the parent of y. This parallel computation of parents makes the tree rooted at V. 2. Computing post-order numbers of a rooted tree, where the left-to-right ordering of the children of a vertex is the one implied by the Euler path: Do a list ranking on the Euler path, where each directed edge (jc, j ) of the Euler path has a weight of unity if y is the parent of x, and a weight of zero if x is the parent of y. 3. Computing the depth of each node of a rooted tree: Do a list ranking on the Euler path, where each directed edge {x,y) of the Euler path has a weight of — 1 if y is the parent of x, and a weight of -hi if JC is the parent ofy. 4. Numbering of descendants of each node: Same computation as for post-order numbers, followed by making use of the observation that the number of descendants of i; equals the fist rank of (f, parent(i;)) minus that of (parent(i;), i;). These examples of reductions of so many problems to list ranking demonstrate the importance of the list ranking problem. See [216,153] for other examples, and for more details about the above reductions.
3.7. Lowest common ancestors (LCA) The problem is to preprocess a rooted tree T so that a lowest common ancestor (LCA) query of any two nodes x,y of T can be answered in constant time by one processor. The preprocessing is to be done in logarithmic time and n/\ogn EREW PRAM processors. The problem is easy when T is a simple path (list ranking does the job), or when it is a complete binary tree (it is then solved by comparing the binary representations of the inorder numbers of x and y, specifically finding the leftmost bit where they disagree). For a general tree, the problem is reduced to that of the range minima: Create an Euler tour of the tree, where each node v knows its first and last appearance on that tour as well as its depth (i.e., the distance from the root) in the tree. This reduces the problem of answering an LCA query to determining, in constant sequential time, the smallest entry in between two given indices /, j in an array. This last problem is called the range-minima problem. The book [153] contains more details on the reduction of LCA to range minima, a solution to range minima, and references to the relevant literature for this problem. The above list of basic subproblems is not exhaustive in that (i) many techniques that are basic for general combinatorial problems were omitted (we have focused only on those most relevant to geometric problems rather than to general combinatorial problems), and (ii) among the techniques applicable to geometric problems, we have postponed covering the more specialized ones.
Deterministic parallel computational geometry
163
4. Inherently sequential geometric problems Most of the problems shown to be P-complete to date are not geometric (most are graph or algebra problems). This is no accident: Geometric problems in the plane tend to have enough structures to enable membership in NC. Even the otherwise P-complete problem of linear programming [119,120] is in NC when restricted to the plane. In the rest of this section, we mention the (very few) planar geometric problems that are known to be P-complete, and also a problem that is conjectured to be P-complete. Several of the problems known to be P-complete involve a collection of line segments in the plane. The P-completeness proofs of the three problems in the following subsections were given in [28]; for the third problem see also [149]. The proofs consist of giving NC reductions from the monotone circuit value problem and planar circuit value problem, which are known to be P-complete [129,160,181]. These reductions typically involve the use of geometry to simulate a circuit, by utilizing the relative positions of objects in the plane. 4.1. Plane-sweep triangulation One is given a simple n-vertex polygon P (which may contain holes) and asked to produce the triangulation that would be constructed by the following sequential algorithm: Sweep the plane from left to right with a vertical line L, such that each time L encounters a vertex f of P one draws all diagonals of P from v that do not cross previously drawn diagonals. This problem is a special case of the well-known polygon triangulation problem (see [124, 193]), and it clearly has a polynomial time sequential solution. 4.2. Weighted planar partitioning Suppose one is given a collection of n non-intersecting line segments in the plane, such that each segment s is given a distinct weight w{s), and asked to construct the partitioning of the plane produced by extending the segments in the sorted order of their weights. The extension of a segment "stops" at the first segment (or segment extension) that is "hit" by the extension. This problem has applications to "art gallery problems" [98,186], and is P-complete even if there are only 3 possible orientations for the line segments. It is straightforward to solve it sequentially in O(nlog^n) time (by using the dynamic point-location data structure of [194]), and in 0(n \ogn) time by a more sophisticated method [98]. 4.3. Visibility layers One is given a collection of n non-intersecting line segments in the plane, and asked to label each segment by its "depth" in terms of the following layering process (which starts with / = 0 ) : Find the segments that are (partially) visible from point (0, +oo), label each such segment as being at depth /, remove each such segment, increment /, and repeat until no segments are left. This is an example of a class of problems in computational geometry known as layering problems or onion peeling problems [63,165,187], and is P-complete even if all the segments are horizontal.
164
M.J. Atallah and D.Z. Chen
*:' I *
Fig. 3. The convex layers of a point set in the plane.
4.4. Open problems Perhaps the most famous open problem in the area of geometric P-completeness is that of the convex layers problem [63]: Given n points in the plane, mark the points on the convex hull of the n points as being layer zero, then remove layer zero and repeat the process, generating layers 1,2,..., etc. See Figure 3 for an example. Some recent work has shown that a generalization of the convex layers problem, called multi-list ranking [114], is indeed P-complete. Although the results in [114] shed some light on the convex layers problem, the P-completeness of the convex layers problem remains open. In view of the P-completeness of the above-mentioned visibility layers problem, it seems reasonable to conjecture that the convex layers problem is also P-complete; however not all layering problems are P-complete. For example, the layers of maxima problem (defined analogously to convex layers but with the words "maximal elements" playing the role of "convex hull") is easily shown to be in NC by a straightforward reduction to the computation of longest paths in a directed acyclic graph [31] (each input point is a vertex, and there is a directed edge from point p to point q iff both the x and y coordinates of p are ^ those of ^, respectively).
5. Parallel divide and conquer As in sequential algorithms, divide and conquer is a useful technique in parallel computation. Parallel divide and conquer comes in many flavors which we discuss next.
5.1. Two-way divide and conquer The sequential divide and conquer algorithms that have efficient PRAM implementations are those for which the "conquer" step can be done extremely fast (e.g., in constant time). Take, for example, an 0{n \ogn) time sequential algorithm that works by recursively solving two problems of size n/2 each, and then combining the answers they return in linear time. In order for a PRAM implementation of such an algorithm to run in O(logn) time with n processors, the n processors must be capable of performing the "combine" stage in constant time. For some geometric problems this is indeed possible (e.g., the convex hull
Deterministic parallel computational geometry
165
problem [43,224]). The time complexity T(n) and processor complexity P(n) of such a PRAM implementation then obey the recurrences T(n)^T(n/2)^cu P(n)^max{n,2P(n/2)}, with boundary conditions T(l) < C2 and P ( l ) = 1, where c\ and C2 are positive constants. These imply that T(n) = 0(logn) and P(n) = n. But for many problems, such an attempt at implementing a sequential algorithm fails because of the impossibility of performing the "conquer" stage in constant time. For these, the next approach often works.
5.2. ''Rootish " divide and conquer By "rootish", we mean partitioning a problem into n^/^ subproblems to be solved recursively in parallel, for some positive constant integer k (usually, k = 2). For example, instead of dividing the problem into two subproblems of size n/2 each, we divide it into (say) ^/n subproblems of size ^/n each, which we recursively solve in parallel. That the conquer stage takes O(logn) time (assuming it does) causes no harm with this subdivision scheme, since the time and processor recurrences in that case would be T(n)^T{^/n)-\-cilogn, P(n) < maxjw, ^/nP(^^/n)], with boundary conditions T(l) ^C2 and P ( l ) = 1, where ci and C2 are positive constants. These imply that T(n) = O(logn) and P(n) = n. The problems that can be solved using rootish divide and conquer scheme include the convex hull of points [4,42,131], the visibility of non-intersecting planar segments from a point [53], the visibility of a polygonal chain from a point [36], the convex hull of a simple polygon [71], detecting various types of weak visibility of a simple polygon [69,72-74], triangulating useful classes of simple polygons [71,132], and the determination of monotonicity of a simple polygon [76]. This scheme also finds success in other computational models such as the hypercube [32,70]. The scheme is useful in various ways and forms, and sometimes with recurrences very different from the above-mentioned ones, as the next example demonstrates.
5.3. Example: visibility in a polygon Given a source point q and a simple n-vertex polygonal chain P in the plane, this visibility problem is that of finding all the points of P that are visible from ^ if P is "opaque". We seek an algorithm that takes 0(log n) time and uses 0(n/ log n) FREW PRAM processors,
166
MJ. Atallah and D.Z. Chen
Fig. 4. The visibility chain VIS{C) of a polygonal chain C from the point q = (0, oo).
which is optimal to within a constant factor because (i) there is an obvious Q{n) sequential lower bound for the problem, and (ii) an Q(\ogn) lower bound on its EREW PRAM time complexity can be obtained by reducing to it the problem of computing the maximum of n entries, a problem with a known logarithmic time lower bound [94]. This is one instance of a problem in which one has to use a hybrid of two-way divide and conquer and rootish divide and conquer, in order to obtain the desired complexity bounds. The recursive procedure we sketch below follows [36] and takes two input parameters (one of which is the problem size) and uses either fourth-root divide and conquer or twoway divide and conquer, depending on the relative sizes of these two parameters. The role played by the geometry is central to the "combine" step (other algorithms of this kind can be found in [68,71-74,130-132] for solving many problems on polygons and point sets). We call VisChain the recursive procedure for computing the visibility chain of a simple polygonal chain from the given source point q (see Figure 4 for an example of the visibility chain VIS{C) from the point q = (0, oo)). The procedure is outlined below. Let \C\ denote the number of vertices of a polygonal chain C. The initial call to the procedure is VisChaiii(P,«, log«), where P is a simple polygonal chain and n = \P\. VisChain(C,m,J) Input: A simple polygonal chain C, m = |C|, and a positive integer d of our choice. Output: The visibility chain of C, V75(C), from the point ^. Step 1. If m ^ J, then compute VIS{C) with one processor in 0(m) time, using any of the known sequential linear-time algorithms. Step 2. \i d <m ^(f-, then divide C into two subchains C\ and C2 of equal length and recursively call VisChain(Ci, \C\\,d) and VisChain(C2, IC2I, J^, then partition C into g = (m/d)^^^ subchains Ci, C2, •.., Cg of length m^/4ji/4 ^^^^ jj^ parallel, call VisChain(Ci, |Ci |, J), VisCham(C2, IC2I, J), . . . , VisChain(Q, | Q |, J). Then compute VIS(C) from VlSiCi), VlSiCi),..., VIS(Cg),
Deterministic parallel computational geometry
167
in O(logm) time and using m/d processors (we henceforth use g to denote
im/dy^^). end. The main difficulty Hes in the "conquer" steps: Even though Q and Cj do not intersect, there can be more than one intersection between their visibihty chains VIS{Ci) and VIS{Cj), and we have (cf. Step 3 above) only g^ = (m/dy^^ processors to compute these intersections between each pair (VIS(Ci), VIS(Cj)). Doing this in O(logm) time may appear impossible at first sight: the length of each of VlS(Ci) and VIS(Cj) can be nr'^^d^/^, and there is a well-known linear lower bound [65] on the work needed for computing the two intersections of two arbitrary simple polygonal chains that intersect twice. This seems to imply that, since we have only {m/d)^^^ processors assigned to the task, it will take nr"I^d^I^{mId)~'^ 1^ ~ m^l^d^l^ time rather than the claimed O(logm). What enables us to achieve O(logm) time is the fact that both Ci and Cj are subchains of a simple polygonal chain. Observe that, if we could perform the various steps of the above algorithm within the claimed bounds, then it would indeed run in 0{d + logm) time with 0{m/d) processors since its time and processor complexities would satisfy the following recurrences:
t(m,d)
=
p(m,d)
=
c\m if m ^ J, t{m/2,d) + C2(\ogmf ifd<m^d^, t{rrv'/^d^'^, d) + C3 logm if d^ < m, \max[l, m/d) max{2p{m/2,d), m/d] [m^x{(m/dy^'^p{m^^^d^^'^,d),m/d}
ifm^J, ifd<m^d^, ifd^<m.
where ci, C2, C3 are constants. From the above recurrences, the following bounds for t(m,d) and p(m,d) are easy to prove by induction: r a\d t(m d) < 1 a2d -\- ^2(logmy log J [ a s J + ^slogm p{m ,d) = m/d,
if m ^d. ifd <m ^d^ ifd' ' < m,
where CYI, 0^2, y^2, 0^3, y^3 are constants. Choosing d to be logm, the above implies that r(m, logm) = O(logm) and p(m, logm) = 0(m/logm). Hence the call VisChain(P, n, logn) would compute VIS(P)in O(logn) time using 0(n/logn) processors. Thus it suffices to show how, with m/d processors, to do the "combine" part of Step 2 in 0((logm)^) time, and more importantly, how to implement the "combine" part of Step 3 in O(logm) time. The geometric facts that make this possible are: • If C^ is a subchain of a chain C then VIS(C) H VIS(C^) has at most three connected components (i.e., at most three separate portions of VIS(C^) appear in VIS(C)). • If C^ and C^^ are two subchains of C that are disjoint except that they may share one endpoint, then there are at most two intersections between VIS(C^) and VIS(C'^).
168
MJ. Atallah and D.Z. Chen
Although the above limits to two the number of possible intersections between the visibility chains of two subchains of C that are disjoint (except possibly at a common endpoint), the linear-work lower bound we mentioned earlier for detecting intersections between polygonal chains [65] holds even for two chains that intersect each other no more than twice. The solution in [36] exploits the fact that the two chains are subchains of a simple chain in order to get around the lower bound when solving the two-intersection case. Specifically, it shows how to compute, for each C/, the (at most two) portions of VIS{Ci) that are hidden. Once one has done this (in parallel) for every / G { 1 , . . . , g}, it is easy to "stitch" the resulting g' ^ 3g pieces of VIS{C) and create VIS{C)\ first split the trees representing VIS{C\), VIS{C2),.. •, VIS(Cg), in order to discard all portions of the V75(C/)'s that are invisible in VIS(C); then the problem essentially becomes that of sorting (by the polar angles) the 0(g) endpoints of those portions of the V 7 5 ( 0 ' s that are visible in VIS{C), which can be done in time O(logm) using 0(g) EREW PRAM processors [87]. There are g^ processors available, more than enough to do this sorting.
6. Cascading Cascading is a sampling and iterative refinement method that was introduced by Cole [87] for the sorting problem, and was further developed in [37,130] for the solutions of geometric problems. It has proved to be a fundamental technique, one that enables optimal solutions when most other techniques fail. Since its details are intricate even for sorting, the next subsection gives a rough sketch — too broad to be useful but enough to give the reader a feel for the main idea (later subsections give a more detailed description and illustrate with examples).
6.1. A rough sketch of cascading Since this technique works best for problems that are solved sequentially by divide and conquer, we use such a hypothetical problem to illustrate the discussion: Consider an 0(nlogn) time sequential algorithm that works by recursively solving two subproblems of size n/2 each, followed by an 0(n) time conquer stage. Let T be the tree of recursive calls for this algorithm, i.e., a node of this recursion tree at height h corresponds to a subproblem of size equal to the number of leaves in its subtree (=2^). A "natural" way of parallelizing such an algorithm would be to mimic it by using n processors to process r in a bottom up fashion, one level at a time, completing level h before moving to level h -\-1 of T (where by "level h'\ we mean the set of nodes of T whose height is h). Such a parallelization will yield an O(logn) time algorithm only if processing each level can be done in constant time. It can be quite nontrivial to process one level in constant time, so this natural parallelization can be challenging. However, it is frequently the case that processing one level cannot be done in constant time, and it is precisely in these situations that the cascading idea can be useful. In order to be more specific when sketching this idea, we assume that the hypothetical problem being solved is about a set 5 of n points, with the points stored in the leaves of T.
Deterministic parallel computational geometry
169
In a nutshell, the general idea of cascading is as follows. The computation proceeds in a logarithmic number of stages, each of which takes constant time. Each stage involves activity by the n processors at more than one level, so the computation diffuses up the tree T, rather than working on only one level at a time. For each node i; G T, let h{v) be the height of f in T, L{v) be the points stored in the leaves of the subtree of f in T, and let I(L(v)) be the information we seek to compute for node v (the precise definition of /(•) varies from problem to problem). The ultimate goal is for every v eT to compute the I(L(v)) array. Each v eT lies "dormant" and does nothing until the stage number exceeds a certain value (usually /i(i;)), at which time node v "wakes up" and starts computing, from stage to stage, I(V) for a progressively larger subset L^ of L(i;), a subset L^ that (roughly) doubles in size from one stage to the next of the computation. I(L^) can be thought of as an approximation of the desired I(L(v)), an approximation that starts out being very rough (when L^ consists of, say, a single point) but gets repeatedly refined from one stage to the next. When V eventually becomes equal to L(v), node v becomes inactive for all the future stages (i.e., it is done with its computation, since it now has I(L(v))). There are many (often intricate) implementation details that vary from one problem to the next, and many times the scheme substantially deviates from the above rough sketch, but the above nevertheless gives the general idea of cascading. The cascading technique has been used to solve many problems (not just geometric ones). The next section explains in more detailed the basic version of the technique, for the problem of sorting. Some of the geometric problems for which it has been used are covered later, in order to illustrate variants of the method. The exposition follows [37], with proofs and details omitted.
6.2. Cascading merge sort In this section we sketch the cascading technique for the merge sorting problem; later we show how it can be modified to solve geometric problems. Suppose we are given a binary tree T (not necessarily complete) with items, taken from some total order, placed at the leaves of T, so that each leaf contains at most one item. For simplicity, we assume that the items are distinct. We wish to compute for each internal node u G T the sorted list U{v) that consists of all the items stored in descendant nodes of i;. We show how to construct U{v) for every node in the tree in 0(height(r)) time using \T\ processors, where \T\ denotes the number of nodes in T. Without loss of generality, we assume that every internal node i; of r has two children (otherwise we can add an extra leaf child that is empty, i.e., does not store any items from the total order). Let two sorted (nondecreasing) lists A = (ai, ^2, • • •, ^w) and J5 = (Z?i, Z?2,..., ^m) be given. We define the rank of an element at in B to be the number of elements in B that are less than at. We say that A is ranked in B if for every element in A we know its rank in B. We say that A and B are cross ranked if A is ranked in B and B is ranked in A. We define A U 5 to be the sorted merged list of all the elements in A or 5 . If ^ is a subset of A, then we define A — 5 to be the sorted list of the elements in A that are not in B. Let r be a binary tree. For any node v inT the altitude, denoted alt(i;), is height(r) — depth(f). Desc(i;) denotes the set of descendant nodes of i; (including v itself).
170
MJ. Atallah and D.Z. Chen
Let a sorted list L and a sorted list J be given. We say that L is a c-cover of / if between each two adjacent items in (—oo, L, oo) there are at most c items from / . We let SAMPc(L) denote the sorted list consisting of every c-th element of L, and call this list the c-sample of L. That is, SAMPdL) consists of the c-th element of L followed by the (2c)-th element of L, and so on. The algorithm for constructing Uiv) for each v eT proceeds in stages. Intuitively, in each stage we will be performing a portion of the merge of [/(lchild(i')) and L^(rchild(i;)) to give the list U(v). After performing a portion of this merge we will gain some insight into how to perform the merge at u's parent. Consequently, we will pass some of the elements formed in the merge at f to f's parent, so we can begin performing the merge at u's parent. Specifically, we denote the list stored at a node i; in 7 at stage s by Us(v). Initially, Uo(v) is empty for every node except the leaf nodes of T, in which case Uo(v) contains the item stored at the leaf node v (if there is such an item). We say that an internal node v is active at stage s if [s/Sj ^ alt(i;) ^ 5, and we say v is full at stage s if alt(i;) = [s/Sj. As will become apparent below, if a node v is full, then Us(v) = U(v). For each active node f G r we define the list U^^_^^ (v) as follows: SAMP4(Us(v)) if alt(u) > 5/3, ^ ; + i ( ^ ) = SAMP2(Us(v)) if alt(i;) = (s - l ) / 3 , I SAMP\ (Us (v)) if alt(i;) = (s - 2)/3. At stage 5 + 1 we perform the following computation at each internal node v that is currently active: Per-Stage Computation(v, s -\- I): Form the two lists L^^!^j(lchild(i;)) and U^^_^^(rchi\d(v)), and compute the new list Us+iiv) := ^;^i(lchild(u)) U ^;^,(rchild(i;)). This formalizes the notion that we pass information from the merges performed at the children of v in stage s to the merge being performed at v in stage 5 + 1. Note that until V becomes full U^^_^^(v) will be the fist consisting of every fourth element of Us(v). This continues to be true about U^^_^^(v) up to the point that v becomes full. If Sy is the stage at which v becomes full (and Us(v) = U(v)), then at stage Sy -h 1, U'^_^^(v) is the twosample of Us(v), and, at stage Sy -f 2, U^^_^^ (v) = Us(v) (= U(v)). Thus, at stage Sy + 3, parent(i;) is full. Therefore, after 3 * height(r) stages every node has become full and the algorithm terminates. We have yet to show how to perform each stage in 0(1) time using n processors. The next lemma states that the number of items in Us+\ (v) can be only a little more than twice the number of items in Us (v), a property that is essential to the construction. LEMMA
6.1. For any stage s ^0 and any node v eT, \ f/s + i i'^) I ^ 2ms (^) I + 4.
The next lemma states that the way in which the UsivYs grow is "well behaved."
Deterministic parallel computational geometry
111
L E M M A 6.2. Let [a, b] be an interval with a,b e (—oo,U!.(v), oo). If [a,b] intersects k -h I items in (—00, U'^{v), 00), then it intersects at most 8/: + 8 items in Us(v) for all k^ I ands ^ 1. C O R O L L A R Y 6.3. The list (-00,
U!,(v), 00) is a A-coverfor
U[_^^{v), for all
s^O.
This corollary is used in showing that we can perform each stage of the merge procedure in 0 ( 1 ) time. In addition to this corollary, we also need to maintain the following rank information at the start of each stage s: 1. For each item in U^(v): its rank in 6^^^(sibling(i;)). 2. For each item in U^^ (v): its rank in Us (v) (and hence, implicitly, its rank in U^^_^ 1 (f ))• The lemma that follows states that the above information is sufficient to allow us to merge L^^^^j(lchild(i;)) and t/^^^j(rchild(i;)) into the list Us-\-i(v) in 0 ( 1 ) time using IUs-i-i (v)I processors. L E M M A 6.4 (The Merge Lemma). Suppose one is given sorted lists As, ^ ^ ^ ^ j , ^^, ^v+P C[, and C^^p where the following (input) conditions are true: 1. AS =
B'^\JC^\
2. A'^^^ is a subset of As', 3. B^^ is a c\ -coverfor ^^^^; 4. Cy is a C2~coverfor C'^\ 5. B[. is ranked in B'.^\ 6. C'^ is ranked in C^^j; 7. B'^ and C^ are cross ranked. Then in 0 ( 1 ) time using |^^ 1 J + I ^^4-11 processors can compute the following {output computations): 1. the sorted list A^+i = 5^^^ U C^^^; 2. the ranking of A'^ in A^+i; 3. the cross ranking of B^^.^ and C^.-^.
in the CREW PRAM model, one
We apply this lemma by setting As = Us(v), A^_^j = U^^^-^iv), A^+i = Us-^i(v), B'^ = f/;(x), 5;,^^ = K^iM, C; = [/;(y), and C;^i = f/;+i(y), where x = leftchild(i;) and y = rightchild(i;). Note that assigning the lists of Lemma 6.4 in this way satisfies input conditions 1-4 from the definitions. The ranking information we maintain from stage to stage satisfies input conditions 5-7. Thus, in each stage s we can construct the list L^^+i (v) in 0 ( 1 ) time using \Us-\-i(v)\ processors. Also, the new ranking information (of output computations 2 and 3) gives us the input conditions 5-7 for the next stage. By Corollary 6.3 we have that the constants c\ and C2 (of input conditions 3 and 4) are both equal to 4. Note that in stage s it is only necessary to store the lists for .y — 1; we can discard any lists for stages previous to that. The method for performing all these merges with a total of | T | processors is basically to start out with 0 ( 1 ) virtual processors assigned to each leaf node, and each time we pass k elements from a node v to the parent of v (to perform the merge at the parent), we also pass O(^) virtual processors to perform the merge. When f's parent becomes full, then we no longer "store" any processors at v. There can be at most 0(n) elements present
172
M.J. Atallah and D.Z. Chen
in active nodes of T for any stage s (where n is the number of leaves of 7), since there are n elements present on the full level, at most n/2 on the level above that, n/8 on the level above that, and so on. Thus, we can perform the entire cascading procedure using 0{n) virtual processors, or n actual processors (by a simple simulation argument). This also implies that we need only 0{n) storage for this computation, in addition to that used for the output, since once a node v becomes full we can consider the space used for U{v) to be part of the output. Equivalently, if we are using the generalized merging procedure in an algorithm that does not need a U{v) list once u's parent becomes full, then we can implement that algorithm in 0(n) space by deallocating the space for a U{v) list once it is no longer needed. It will often be more convenient to relax the condition that there is at most one item stored at each leaf. So, suppose there is an unsorted set A{v) (which may be empty) stored at each leaf. In this case one can construct a tree T' from T by replacing each leaf v of T with a complete binary tree with |A(i;)| leaves, and associating each item in A{v) with one of these leaves. T' would now satisfy the conditions of the method outhned above. We incorporate this observation in the following theorem, which summarizes the discussion of this section: 6.5. Suppose one is given a binary tree T such that there is an unsorted set A{v) {which may he empty) stored at each leaf. Then one can compute, for each node V eT, the list U(v), which is the union of all items stored at descendants ofv, sorted in an array. This computation can be implemented in 0(height(r) + log(maXi; | A(i;)|)) time using a total ofn-\-N processors in the CREW PRAM computational model, where n is the number of leaves of T and N is the total number of items stored in T. THEOREM
The next three sections give specific examples of other applications and extensions of the cascading technique. 7. Fractional cascading in parallel Fractional cascading is a fundamental technique that has a large number of different applications in geometry [67]. First we briefly review the problem. Given a directed graph G = (V, E), such that every node v contains a sorted list C(v) (called a catalogue), the fractional cascading problem is to construct an 0{n) space data structure that, given a walk (vi,V2,.. •,Vni) in G and an arbitrary element x, enables a single processor to locate X quickly in each C(f/), where « = | y | + l^l + ^y^y \C(v)\. Fractional cascading problems arise naturally from a number of computational geometry problems. As a simple example of a fractional cascading problem, suppose one has five different EngHsh dictionaries and would like to build a data structure that would allow one to look up a word w in all the dictionaries. Chazelle and Guibas give an elegant 0(n) time sequential method for constructing a fractional cascading data structure from any graph G, as described above, achieving a search time of 0(logn + m log J(G)), where d(G) is the maximum degree of any node in G. However, their approach does not appear to be "parallelizable." In this section, which follows [37], we show how to construct a data structure achieving the same performance as that of Chazelle and Guibas in O(logn) time using fn/logn']
Deterministic parallel computational geometry
173
processors. The method begins with a preprocessing step similar to one used by Chazelle and Guibas where we "expand" each node of G into two binary trees — one for its in-edges and one for its out-edges — so that each node in our graph has in-degree and out-degree at most 2. We then perform a cascading merge procedure in stages on this graph. Each catalogue Civ) is "fed into" the node v in samples that double in size with each stage and these lists are in turn sampled and merged along the edges of G. Lists continue to be sampled and "pushed" across the edges of G (even in cycles) for a logarithmic number of stages, at which time we stop the computation and add some links between elements in adjacent lists. We show that this gives us a fractional cascading data structure, and that the computation can be implemented in O(logn) time and 0{n) space using \n/\ogn'\ processors. We show below how to perform the computations in 0(log n) time and 0(n) space using n processors. It is possible to get the number of processors down to \n/ \ogn\ by a careful application of Brent's theorem. Define In(i', G) (resp. Out(i;, G)) to be the set of all nodes winV such that {w,v) G E (resp. (u, w) e E). The degree of a vertex v, denoted by d(v), is defined as d(v) = max{|In(i;, G)|, |Out(i;, G)|}. The degree of G, denoted by J(G), is defined as d(G) = maxyQv{d(v)]. A sequence (vi, f2, • • •, Vm) of vertices is a walk if (vi, f/+i) e E for all /G{l,2,...,m~l}. As mentioned above, we begin the construction by preprocessing the directed graph G to convert it into a directed graph G = (V, E) such that d{G) < 2 and such that an edge (f, w) in G corresponds to a path in G of length at most 0(log J(G)). Specifically, for each node f G y we construct two complete binary trees T^^ and T^^^. Each leaf in T^^ (resp., T^^^) corresponds to an edge coming into v (resp., going out of v). So there are |In(i;, G)\ leaves in TJ" and |Out(i;, G)\ leaves in 7;^^^ We call 7;^^ the fan-in tree for v and r°"^ the fan-out tree for v. An edge ^ = (f, if) in G corresponds to a node e in G such that e is a leaf of the fan-out tree for v and e is also a leaf of the fan-in tree for w. The edges in T^^ are all directed up towards the root of TJ", and the edges in T^^^ are all directed down towards the leaves of T^^^. For each v e V we create a new node v' and add a directed edge from i;^ to f, a directed edge from the root of T^ to v^ and an edge from v^ to the root of T^^^. We call v^ the gateway for v. Note that d(G) = 2. We assume that for each node v we have access to the nodes in ln(v, G) as well as those in Out(i;, G). We structure fan-out trees so that a processor needing to go from f to u; in G, with {v,w) eE, can correctly determine the path down T^^^ to the leaf corresponding to {v,w). More specifically, the leaves of each fan-out tree are ordered so that they are listed from left to right by increasing destination name, i.e., if the leaf in T^^^ for e = (f, u) is to the left of the leaf for / = (f, w), then u <w. (The leaves of TJ" need not be sorted, since all edges are directed towards the root of that tree.) If we are not given the Out(i;, G) sets in sorted order, then we must perform a sort as a part of the T^^^ construction, which can be done in 0(log J(G)) time using n processors using Cole's merge sorting algorithm [87]. We also store in each internal node z of T^^^ the leaf node u that has the smallest name of all the descendents of z. The above preprocessing step is similar to a preprocessing step used in the sequential fractional cascading algorithm of Chazelle and Guibas. This is where the resemblance to the sequential algorithm ends, however.
174
M.J. Atallah and D.Z. Chen
The goal for the rest of the computation is to construct a special sorted list B{v), which we call the bridge list, for every node v eV. We shall define these bridge lists so that B{v) = C{v) if V is in V, and, if i; is in V but not in V, then for every (u, w) e E if 2i single processor knows the position of a search item x in B{v), then it can find the position of X in B{w) in 0(1) time. The construction of the 5(i;)'s proceeds in stages. Let Bs{v) denote the bridge fist stored at node i; € V at the end of stage s. Initially, BQ{V) = 0 for all u in V. Intuitively, the perstage computation is designed so that if v came from the original graph G (i.e., v e V), then V will be "feeding" Bs(v) with samples of the catalogue C(v) that double in size with each stage. These samples are then cascaded back into the gateway v^ for i; and from there back through the fan-in tree for v. We will also be merging any samples "passed back" from the fan-out tree for v with B^ (v^), and cascading these values back through the fan-in tree for v as well. We iterate the per-stage computation for [log A^l stages, where N is the size of the largest catalogue in G. We will show that after we have completed the last stage, and updated some ranking pointers, G will be a fractional cascading data structure for G. More details follow. Recall that Bo(v) = 0 for all i; G V. For stage 5 ^ 0 we define B^_^j (v) and Bs-\-\(v) as follows: , _ I SAMP4{Bs(v)) ^.+1 ^^) I SAMPcis){C(v)) B;,_^,(U;I)
Bs^\(v)
=
^;+,(w;) 10
if i; G y - V, if i; G y.
U 5;+,(u;2)
if Out(i;, G) = [wuW2], ifOut(i;,G) = {M;}, ifOut(i;,G) = 0,
where c(s) = 2^^^^^^-' and A^ is the size of the largest catalogue. The per-stage computation, then, is as follows: Per-Stage Computation(v, 5 + 1 ) : Using the above definitions, construct Bv+i (v) for all i; G V in parallel (using \Bs-\-i(v)\ processors for each v). The function c(s) is defined so that if i; G V, then as the computation proceeds the list B[_^i (v) will be empty for a while, then at some stage 5 + 1 it will consist of a single element of C(v) (the (2'^'^^^^~^)-th element), in stage 5* + 2 at most three elements (evenly sampled), in stage 5 + 3 at most five elements, in stage 5- + 4 at most nine elements, and so on. This continues until the final stage (stage flog A^l), when B^^_^^ (v) = C(v). Intuitively, the c(s) function is a mechanism for synchronizing the processes of "feeding" the C(v) lists into the nodes of G so that all the processes complete at the same time. We show below that each stage can be performed in 0(1) time, resulting in a running time of the cascading computations that is 0(log N) (plus the time it takes time to compute the value of N: namely, O(logn)). The following important lemma is similar to Lemma 6.1 in that it guarantees that the bridge lists do not grow "too much" from one stage to another. LEMMA
7.1. For any stage s ^0 and any node v eT,\ Bs+\ {v) \^2\Bs{v)\-\-
4.
Deterministic parallel computational geometry COROLLARY
7.2. The list (-00, B[.(v), oo) is a 4-coverfor B[_^^(v), for s ^ 0 .
COROLLARY
7.3. The list (—oc, Bs(v),oc)
is a 14-cover for Bs(w), for s ^0
175
and
(v, w) e E. The first of these two corollaries implies that we can satisfy all the c-cover input conditions for the Merge Lemma (Lemma 6.4) for performing the merge operations for the computation at stage s in 0(1) time using ris processors, where ris = Xluev \^s{'^)\' We use the second corollary to show that when the computation completes we will have a fractional cascading data structure (after adding the appropriate rank pointers). We maintain the following rank information at the start of each stage s: 1. For each item in B[^ {v): its rank in B^^(w) if In(i', G) O In(w;, G) is non-empty, i.e., if there is a vertex u such that (u,v) e E and (u,w) e E. 2. For each item in 5^ (v): its rank in B^ (v) (and thus, implicitly, its rank in B^^_^y(v)). By having this rank information available at the start of each stage s we satisfy all the ranking input conditions of the Merge Lemma. Thus, we can perform each stage in 0(1) time using ris processors. Moreover, the output computations of the Merge Lemma allow us to maintain all the necessary rank information into the next stage. Note that in stage s it is only necessary to store the lists for 5* — 1; we can discard any lists for stages previous to that, as in the generalized cascading merge. Recall that we perform the computation for [log A^] stages, where N is the size of the largest catalogue. When the computation completes, we take B(v) = Bs(v) for all v eV, and for each (v,w)eEwe rank B(v) in B(w). We can perform this ranking step by the following method. Assign a processor to each element b in B(v) for all f G F in parallel. The processor for b can find the rank of b in each 5^ (w) such that w e Out(i', G) in 0(1) time because Bs(v) contains B'^{w) as a proper subset {B'^{w) was one of the lists merged to make Bs {v)). This processor can then determine the rank of b in B{w) = Bs (w) for each w e Out(i;, G) in 0(1) time by using the ranking information we maintained (from B'^{w) io Bs{w)) for stage s (rank condition 2 above). Given a walk W = {v\,.. .,Vm), and an arbitrary element x, the query that asks for locating x in every C{vi) is called the multilocation of x in ( f i , . . . , f^). To perform a multilocation of jc in a walk ( f i , . . . , f;^) we extend the walk VF in G to its corresponding walk W = (iTi,... , ^ ) in G and perform the corresponding multilocation in G, similar to the method given by Chazelle and Guibas for performing multilocations in their data structure. The multilocation begins with the location of x in B(v^\) = B{v[), the gateway bridge list for i^i, by binary search. For each other vertex in this walk we can locate the position of X in B(v^i) given its position in J5(i^_i) in 0(1) time. The method is to follow the pointer from x 's predecessor in i5(i^ _ 1) to the predecessor of that element in B(vi) and then locate x in B(vi) by a linear search from that position (which will require at most 13 comparisons by Corollary 7.3). In addition, if t^ corresponds to a gateway v\ then we can locate X in C(i;) in 0(1) time given its position in B{v') by a similar argument. Since each edge in the walk W corresponds to a path in W of length at most 0(log J(G)), this implies that we can perform the multilocation of x in (i^i,..., fw) in 0(log \B{v[)\-\-m log J(G)) time. In other words, G is a fractional cascading data structure. The next lemma states that G uses 0{n) space.
176
MJ. Atallah and D.Z. Chen
LEMMA 7.4. Let n y denote the amount of space that is added to G because of the presence of a particular catalogue C{v), v eV. Then n^ ^ 2|C(i;)|. COROLLARY 7.5. The total amount of space used by the fractional cascading data structure is 0(n), where n = \V\-\-\E\-\- Y.y^y \C(v)\.
Note that the upper bound on the space of the fractional cascading data structure holds even if G contains cycles. This corollary, then, implies that we can construct a fractional cascading data structure G from any catalogue graph G in O(logn) time and 0(n) space using n processors, even if G contains cycles. See [37] for details of how to assign these n processors to their respective jobs. In fact [37] establishes the following stronger result. 7.6. Given a catalogue graph G = (V, E), such that d(G) is 0(1) or one is given each Out(i;, G) set in sorted order, one can build a fractional cascading data structure for G in O(logn) time and 0{n) space using \n/ log/i] processors in the CREW PRAM model, where n = \V\-\-\E\-\-^^^y\C{v)\. This bound is optimal THEOREM
8. Cascading with labeling functions The merging procedure of Section 6.2 can be combined with divide-and-conquer strategies based on merging lists with labels defined on their elements. This gives rise to variants of cascading that resulted in efficient parallel solutions to many geometric problems. We illustrate some of these here. For most of these problems this approach gives an efficient sequential alternative to the known sequential algorithms (which typically use the planesweeping paradigm), as well as giving rise to efficient parallel algorithms. We begin with the 3-dimensional maxima problem. 8.1. The 3-dimensional maxima problem Let V = {p\, /72, •••,/?«} be a set of points in R^^. For simplicity, we assume that no two input points have the same x (resp., y, z) coordinate. We denote the JC, y, and z coordinates of a point p by x{p), y{p), and z{p), respectively. We say that a point /?/ \-dominates another point pj if x{pi) > x(pj), 2-dominates pj if x{pi) > x(pj) and y{pi) > y(Pj), and 3-dominates pj if x(pi) > x(pj), y(pi) > y(Pj), and z(pi) > z(pj)> A point pt e V is said to be a maximum if it is not 3-dominated by any other point in V. The 3-dimensional maxima problem, then, is to compute the set, M, of maxima in V. We show how to solve the 3-dimensional maxima problem efficiently in parallel in the following algorithm. The method is based on cascading a divide-and-conquer strategy in which the merging step involves the computation of two labeling functions for each point. The labels we use are motivated by the optimal sequential plane-sweeping algorithm of Kung, Luccio, and Preparata [163]. Specifically, for each point pi we compute the maximum z-coordinate from all points which 1-dominate pi and use that label to also compute the maximum zcoordinate from all points which 2-dominate pi. We can then test if pi is a maximum point by comparing z(pi) to this latter label.
Deterministic parallel computational geometry
177
Without loss of generality, assume the input points are given sorted by increasing >'-coordinates, i.e., y{pi) < _y(/7/+i). Let 7 be a complete binary tree with leaf nodes v\, V2,. ",Vn (in this order). In each leaf node vi we store the list B{vi) — (—oo, /?/), where — oo is a special symbol such that x{—od) < x(pj) and y(—oo) < y(pj) for all points pj in V. Initializing T in this way can be done in 0(log/i) time using n processors. We then perform a generalized cascading-merge from the leaves of T as in Theorem 6.5, basing comparisons on increasing x-coordinates of the points (not their J-coordinates). Using the notation of Section 6.2, we let U(v) denote the sorted array of the points stored in the descendants of v e T sorted by increasing x-coordinates. For each point pi in U(v) we store two labels: zod(pi, v) and ztd(pi, v), where zod(/?/, v) is the largest z-coordinate of the points in U(v) that 1-dominate /?/, and ztd(pi, v) is the largest z-coordinate of the points in U(v) that 2-dominate pi. Initially, zod and ztd labels are only defined for the leaf nodes of T. That is, zod(/?/, f/) = ztd(pi ,Vi) = —oc and zod(—oo, Vi) = ztd(—oo, Vi) = z(pi) for all leaf nodes Vi in T (where U(vi) = (—oo, pt)). In order to be more explicit in how we refer to various ranks, we let pred(/7/, v) denote the predecessor of pi in U{v) (which would be — oo if the x-coordinates of the input points are all larger than x{pi)). As we are performing the cascading-merge, we update the labels zod and ztd based on the equations in the following lemma: LEMMA 8.1. Let pt be an element ofU(v) and let u = lchild(i') and w = rchild(i;). Then we have the following:
.,
^
zod(/7/, v) =
, max lzod(pi, u), zod(pred(/?/, w),w)] ' max \zod{pxtd{pi,u), u), zod(pi, w)]
ztd(p/ i;) = |max{ztd(/7/,w), zod(pred(p/, w;), w)}
\zid{pi,w)
if pt e U{u), if pi e U{w),
(1)
ifpieU{u),
^2)
ifpteUiw).
We use these equations during the cascading merge to maintain the labels for each point. By Lemma 8.1, when v becomes full (and we have U{u), U(w), and U(v) = U(u)U U{w) available), we can determine the labels for all the points in U{v) in 0(1) additional time using |t/(i^)| processors. Thus, the running time of the cascading-merge algorithm, even with these additional label computations, is still O(logn) using n processors. Moreover, after u's parent becomes full we no longer need U{v) any more, and can deallocate the space it occupies, resulting in an 0(n) space algorithm, as outlined in Section 6.2. After we complete the merge, and have computed L^(root(r)), along with all the labels for the points in U(jooi{T)), note that a point pt e U(root(T)) is a maximum if and only if ztd(pi,root(T)) < z(pi) (there is no point that 2-dominates pi and has z-coordinate greater than z(pi)). Thus, after completing the cascading merge we can construct the set of maxima by compressing all the maximum points into one contiguous list using a simple parallel prefix computation. We summarize in the following theorem: THEOREM 8.2. Given a set V ofn points in R^, one can construct the set M of maximal points in V in O(logn) time and 0(n) space using n processors in the CREW PRAM model, and this is optimal.
178
MJ. Atallah and D.Z. Chen
(The optimality follows from the fact that [163] have shown that this problem has an ^ in log n) sequential lower bound.) It is worth noting that one can use roughly the same method as that above as the basis step of a recursive procedure for solving the general ^-dimensional maxima problem for ^ > 3. The resulting time and space complexities are 0{(\ogn)^~^) time using n processors in the CREW PRAM model. Next, we address the two-set dominance counting problem. 8.2. The two-set dominance counting problem In the two-set dominance counting problem we are given a set A = {^i, ^2, • • •»^m} and a set 5 = {ri, r 2 , . . . , r/} of points in the plane, and wish to know for each point r/ in B the number of points in A that are 2-dominated by r/. For simplicity, we assume that the points have distinct x (resp. y) coordinates. The approach to this problem is similar to that of the previous subsection, in that we will be performing a cascading merge procedure while maintaining two labeling functions for each point. In this case the labels maintain for each point Pi (from A or B) how many points of A are 1-dominated by /?/ and also how many points of A are 2-dominated by pi. As in the previous solution, the first label is used to maintain the second. The details follow. Let y = {/?i, /72,..., p/+m} be the union of A and B with the points listed by increasing >'-coordinate, i.e., y{pi) < y(pi-^\). We can construct Y in O(logn) time using n processors [87], where n = I -\- m. The method for solving the two-set dominance counting problem is similar to the method used in the previous subsection. As before, we let T be a complete binary tree with leaf nodes v\,V2,.. .,Vn, in this order, and in each leaf node Vi we store the list Uivi) = (—00, /?/), (—00 still being a special symbol such that jc(—00) < x(pi) and y(—oo) < y(pi) for all points pi in Y). We then perform a generaUzed cascading-merge from the leaves of T as in Theorem 6.5, basing comparisons on increasing x-coordinates of the points (not their 3;-coordinates). We let U(v) denote the sorted array of the points stored in the descendants of v e T sorted by increasing jc-coordinate. For each point /?/ in U(v) we store two labels: nod(/7/, v) and ntd(/?/, v) The label nod(/7/, v) is the number of points in U(v) that are in A and are 1-dominated by Pi, and the label ntd(/7/, v) is the number of points in U(v) that are in A and are 2dominated by pi. Initially, the nod and ntd labels are only defined for the leaf nodes of T. That is, nod(/7/, u/) = nod(—00, Vi) = ntd(/7/, Vi) = ntd(—00, Vi) = 0. For each pi G 7 we define the function ^A(Pi) as follows: ^A(Pi) = I if Pi e A, and ^A(Pi) = 0 otherwise. (We also use pred(/?/, v) to denote the predecessor of p in U(v).) As we are performing the cascading-merge, we update the labels nod and ntd based on the following lemma. LEMMA 8.3. Let pi be an element ofU(v) and let u = lchild(i') and w = rchild(i;). Then we have the following:
nod{pi,v)
=
nod{pi, u) + nod(pred(/7/,w),w) -\-^A (pred(/?/, w)) if Pi e U(u), nod(pred(/7/, w), M) + nod(p/, w;) + <^A (pred(/7/, u)) if Pi e U{w),
(3)
Deterministic parallel computational geometry
179
f ntd(/7/, u) if Pi e U{u), ntd(;7/,u) = nod(pred(/7/, w), w) + ntd(p/,W)-\-^A(pred(p/, u)) if Pi G t/(u;).
(4)
By Lemma 8.3, when v becomes full (and we have U{u), U(w), and U(v) — U(u) U U(w) available), we can determine the labels for all the points in U(v) in 0(1) additional time using |f/(f)| processors. Thus, the running time of the cascading-merge algorithm, even with these additional label computations, is still O(logw) using n processors. After we complete the merge, and have computed U(root(T)), along with all the labels for the points in U(root(T)), then we are done. We summarize in the following theorem: THEOREM 8.4. Given a set A of I points in the plane and a set B of m points in the plane, one can compute for each point p in B the number of points in A 2-dominated by p in O(logn) time and 0{n) space using n processors in the CREW PRAM model, where n = l -\-m, and this is optimal. There are a number of other problems that can be reduced to two-set dominance counting, and can thus be solved within the same bounds (i.e., in logarithmic time with linear space and processors). We mention two here, the first being the multiple range-counting problem: Given a set V of / points in the plane and a set R of m isothetic rectangles (ranges) the multiple range-counting problem is to compute the number of points interior to each rectangle. Another problem that reduces to two-set dominance counting is rectilinear segment intersection counting: Given a set 5 of n rectilinear line segments in the plane, determine for each segment the number of other segments in S that intersect it.
8.3. Other applications of cascading Cascading can be used to solve other problems, too many to cover in detail. We mention the following: • Trapezoidal decomposition. Given a set S oin planar line segments, determine for each segment endpoint p the first segment encountered by starting at p and walking vertically upward (or downward). An O(logn) time and n-processor CREW PRAM algorithm is known [37]. This implies similar bounds for the polygon triangulation problem [130, 132,227]. • Topological sorting of n non-intersecting line segments. This is the problem of ordering the segments so that, if a vertical line / intersects segments Si and Sj and / < j , then the intersection between / and Si is above the intersection between / and Sj. An O(logn) time, /z-processor CREW PRAM algorithm is easily obtained by implementing the main idea of the mesh algorithm of [45] (which reduces the problem to a trapezoidal decomposition computation followed by a tree computation). • Planar point location. Given a subdivision of the plane into polygons called faces, build a data structure that enables one processor to quickly locate, for any query point, the face containing it. Using n processors, cascading can be used to achieve O(logn) time
180
M.J. Atallah and D.Z. Chen
for both construction and query [37,214,93]. The planar point location problem itself tends to arise rather frequently, even in geometric problems apparently unrelated to it. • Intersection detection, all nearest neighbors, visibility from a point. For these problems, cascading can be used to achieve O(logn) time with n processors [37,88]. Alternative approaches to cascading have been proposed for some of the above problems; for example, see [53,197,226] and also the elegant parallel hierarchical approach of Dadoun and Kirkpatrick [100,99].
9. Cascading without concurrent reads In this section we briefly note that the same techniques as employed by Cole in [87] to implement his merging procedure in the EREW PRAM model (no simultaneous reads) can be applied to the algorithms for generalized merging, fractional cascading, 3-dimensional maxima, 2-set dominance counting, and many others, resulting in EREW PRAM algorithms for these problems. Applying Cole's techniques to these algorithms results in EREW PRAM algorithms with the same asymptotic bounds except that the space bounds for the problems addressed in Section 8 all become 0(n logn). The reason that his techniques increase the space complexity of these problems is because of our use of labeling functions. Specifically, it is not clear how to perform the merges on-line and still update the labels in 0(1) time after a node becomes full. This is because a label whose value changes on level / may have to be broadcast to many elements in level / — 1 to update their labels, which would require i7(log/i) time in this model if there were 0{n) such elements. One can get around the problems arising from the labeling functions, however [37]. For the 3-dimensional maxima problem and the two-set dominance counting problem we separate the computation of the U{v) lists and computation of the labeling functions into two separate steps, rather than "dove-tailing" the two computations as before. Each of the labeling functions we used for these two problems can re-defined so as to be EREWcomputable. Specifically, the label for an element p in U{v), on level /, can be expressed in terms of a label pref(/7, v) and a label up(/7, u), where pref(/7, v) can be computed by performing a parallel prefix computation [159,164] in U{v) and up(/7, v) can be defined in terms of pref(pred(/7, lchild(u)), lchild(i;)), pref(pred(/7, rchildCf)), rchild(i;)), and the up label p had on level / + 1 (say, in L^(rchild(f)) if p e L'^(rchild(i;))). In particular, for the 3-dimensional maxima problem pref(p, v) = zod(p, v) and up(p, v) = ztd(p, v), and for the two-set dominance counting problem pref(/7, i;) = nod(p, v) and up(/?, v) = ntd(p, v). One can compute all the pref(p, v) labels in O(logn) time using n processors by assigning l\U(v)\/logn'] processors to each node v [159]. One can then broadcast each pref(/7, v) label to the successor of v in sibling(i'), which takes O(logn) time using n processors by assigning f\U(v)\/logn'\ processors to each node v. Finally, one can compute all the up(p, v) labels in O(logn) additional time by assigning a single processor to each point p and tracing the path in the tree from the leaf node which contains p up to the root. This is an EREW operation because computing all the up(/7, v) labels only depends upon accessing memory locations associated with the point p. The EREW solution to the visibility from a point problem requires 0(n logn) space for a different reason (cf. [37]).
Deterministic parallel computational geometry
181
10. Matrix searching techniques A significant contribution to computational geometry (both sequential and parallel) is the formulation of many geometric problems as searching problems in monotone matrices [8, 6]. Geometric problems amenable to such a formulation include the largest empty rectangle [10], various area minimization problems [8,9,206] (such as finding a minimum area circumscribing d-gon of a polygon), perimeter minimization [8] (finding a minimum perimeter triangle circumscribing a polygon), the layers of maxima problem [8,35], rectilinear shortest paths in the presence of rectangular obstacles [29,30], longest increasing chains [31,35], approximation of certain geometric shapes used in VLSI design [77], and shortest paths in certain planar graphs with geometric structures [34,204]. Many more problems are likely to be formulated as such matrix searching problems in the future. This section discusses the current best deterministic parallel solutions to these monotone matrix searching problems.
10.1. Row minima An important matrix searching technique for solving geometric problems was introduced by Aggarwal et al. in [6], where a linear time sequential solution was also given. The technique has myriads of applications to geometric and combinatorial problems [8,6]. Suppose we have an m x w matrix A and we wish to compute the array OA such that, for every row index r (1 < r ^ m), ^A(^) is the smallest column index c that minimizes A{r, c) (that is, among all the c's that minimize A{r, c), ^A(^) is the smallest). If OA satisfies the following sorted property: OA{r)^eA{r + l), and if for every submatrix A' of A, OA' also satisfies the sorted property, then matrix A is said to be totally monotone [8,6]. Given a totally monotone matrix A, the problem of computing array 6A is known as that of "computing the row minima" of A [8]. The best EREW PRAM algorithm for this problem runs in O(logn) time and n processors [46] (where m = n). THEOREM 10.1. The row minima (that is, the array OA) of an m x n totally monotone matrix A can be computed in 0(logm + logn) time with 0(m -\- n) processors in the EREW PRAM model
Any improvement in these parallel complexity bounds will also imply corresponding improvements on the parallel complexities of many geometric applications of this problem. In fact [46] proves a somewhat stronger result: an implicit description of OA can be computed, within the same time bound as in the above theorem, by 0(n) processors. From this implicit description, a single processor can obtain any particular OA(T) value in 0(\ogn) time. One important ingredient that is crucial to the overall scheme is an 0(max(/2, logm)) time algorithm using min(n, logm) processors in the EREW PRAM model. The heart of
182
M.J. Atallah and D.Z. Chen
the CREW method uses a new kind of sampHng and pipeHning, where samples are evenly spaced (and progressively finer) clusters of elements and where the "help" for computing the information at a node does not come only from its children (as it did in cascading) but also from some of its subtree's leaves. This CREW algorithm is later improved into an EREW algorithm; this is achieved by (i) storing each leaf solution in a suitable parallel data structure, and (ii) re-defining the nature of the information stored at the internal nodes. A more specific overview follows. Since the matrix A is understood, we henceforth use ^ as a shorthand for OA- Let R denote the set of m row indices of A, C its « column indices. An interval of rows or columns is a non-empty set of contiguous (row or column) indices [/, 7 ] = {/, / + 1 , . . . , 7}. We imagine row indices to lie on a horizontal line, so that a row is to the left of another row if and only if it has a smaller index (similarly "left o f is defined for columns). We say that interval I\ is to the left of interval h, and h is to the right of I\, if the largest index of I\ is smaller than the smallest index of h. Let / be a column interval, and let A/ be the m X I /1 submatrix of A consisting of the columns of A in / . We use Oj as a shorthand for OAJ . That is, if r is a row index, then Oj (r) denotes the smallest c € / for which A(r, c) is minimized. Note that Oj (r) usually differs from ^(r), since we are minimizing only over / rather than C. Instead of storing Oj directly, we shall instead store a function TTI which is an implicit description of Oj. DEFINITION 1. For any column interval / and any column index c, TTI (C) is the row interval such that, for every row index r in that interval, we have Oi(r) = c; 7r/(c) is empty if no such r exists.
Note that the monotonicity of A implies that, if ci < C2, then 7ii(c\) is to the left of 7r/(C2).
Note that each TT/ (C) can be stored in 0(1) space, since we need only store the beginning and end of that row interval. We actually use TT/ as an implicit description of Oj. The advantage of doing so is that we use 0 ( | / | ) storage instead of the 0(|/?|) that would be needed for explicitly storing Oj. The disadvantage is that, given a row index r, a processor needs to binary search in the TTI array for the position of row index r in order to determine 0/(r). Had we stored directly Oj, Oj{r) would be readily available in constant time. From now on, we consider our problem to be that of computing the nc array. Once we have ixc, it is easy to do a postprocessing computation that obtains (explicitly) 0 from 7tc with m processors: each column c gets assigned |7rc(c)| processors which set 0(r) = c for every r e 7tc(c). Therefore Theorem 10.1 would easily follow if we can establish the following. 10.2. nc can be computed in 0(logm + \ogn) time and 0{n) processors in the EREW PRAM model
THEOREM
The following lemma is an important ingredient in the overall solution. LEMMA 10.3. The nc array can be computed in 0(max(n, log m)) time with min(n, log m) processors in the EREW PRAM model.
Deterministic parallel computational geometry
183
The bounds of the above lemma might look unappealing at first sight, but their significance lies in the fact that m can be much larger than n. In fact the overall solution uses this lemma on problems of size m x (logn). Simple-minded approaches to proving the above lemma, like "use one processor to binary search for TCC{C) in parallel for each c e C" do not work, the difficulty being that we do not know which 7rc(c)'s are empty. In fact, if we knew which 7rc(c)'s are empty then we could easily achieve O(logw) time with n processors (by using the above-mentioned straightforward binary search — e.g., binary search for the right endpoint of TTC {C) by doing logm comparisons involving the two columns c and c', where c' is the nearest column to the right of c having a nonempty 7Xc{c')). The proof of the above lemma is in fact quite elaborate (cf. [46] for its details). In addition to using the above lemma, the overall CREW algorithm for this problem also uses sampling and iterative refinement methods that are reminiscent of cascading, and are similar to those used in [25] for solving in parallel the string editing problem. As in cascading, it is useful to think of the computation as progressing through the nodes of a tree T which we now proceed to define. Partition the column indices into n/ \ogn adjacent intervals / i , . . . , In/\ogn of size log^ each. Call each such interval It a fat column. Imagine a complete binary tree T on top of these fat columns, and associate with each node v of this tree a fat interval I(v) (i.e., an interval of fat columns) in the following way: The fat interval associated with a leaf is simply the fat column corresponding to it, and the fat interval associated with an internal node is the union of the two fat intervals of its children. Thus a node v at height h has a fat interval I(v) consisting of |/(f)| = 2^ fat columns. The storage representation we use for a fat interval I(v) is a list containing the indices of the fat columns in it; we also call that list I(v), in order to avoid introducing extra notation. For example, if v is the left child of the root, then the I(v) array contains ( 1 , 2 , . . . , n/(2logn)). Observe that
j:^^T\I(v)\=0(\T\log\T\)
= 0((n/logn)logn) = 0(n).
The ultimate goal is to compute 7tc(c) for every c eC. Let leaf problem Ii be the problem of computing Jti^ (c) for all c e If. Thus a leaf problem is a subproblem of size m x log n. From Lemma 10.3 it easily follows that the leaf problems can all be solved in 0(logn + logm) time by n processors. It remains to show that an additional 0(logn + logm) time with 0(n) processors is enough for obtaining TtcDEFINITION 2. Let J(v) be the interval of original columns that belong to fat intervals in I(v) (hence 1/(^)1 = |/(i^)| • logn). For every v eT, fat column f e I(v), and subset R^ of R, let i/v(R\ f) be the interval in R' such that, for every r in that interval, 9j(y)(r) is a column in fat column / . We use "}l/y{R\ *)" as a shorthand for ''\l/y(R\ f) for all
We henceforth focus on the computation of the V^root(r) {R, *) array, where root(r) is the root node of T. Once we have the array \l/root(T)(R, *)» it is easy to compute the required 7Tc array within the prescribed complexity bounds: For each fat column / , we replace the V^root(r) (R, f) row interval by its intersection with the row intervals in the njj- array (which are already available at the leaf / / of 7).
184
MJ. Atallah and D.Z. Chen
LEMMA 10.4. V^^(/?, *) for every v e T can be computed by a CREW PRAM in time 0(height(r) + logm) and 0{n) processors, where height(r) is the height of T (= O(logn)).
Since ^^^j(\I{v)\-\-\ogn) = 0(n), we have enough processors to assign |/(i;)| +logn of them to each v eT. The computation proceeds in logm + height(r) — 1 stages, each of which takes constant time. Each v eT will compute V^^;(/?^ *) for progressively larger subsets R^ of R, subsets R^ that double in size from one stage to the next of the computation. We now state precisely what these subsets are. Let Ri denote the (m/2')-sample of /?, sothat |/?/| = 2^ At the t-th stage of the algorithm, a node v of height h in T will use its \I(v)\ -\logn processors to compute, in constant time, V^U(^/-/J,*) if h ^ t ^ h -\- logm. It does so with the help of information from i/r^(/?r-i-/z, *), V^eftChiid(i;)(^r-/z. *)^ and i^ightChM(v)(^t-h, *). ^11 of which are available from the previous stage t — I (note that (t — 1) — (h — I) = t — h). If t < h or t > h -\- logm then node i; does nothing during stage t. Thus before stage h the node v hes "dormant", then at stage t = h it first "wakes up" and computes ij/yiRo, *), then at the next stage t = h -\-1 it computes i/yiRi, *), etc. At stage t = h-\- logm it computes ^v(R\ogm, *), after which it is done. See [46] for the details of what information v stores and how it uses its \I{v)\ + logn processors to perform stage t in constant time. In [46] a method is also given for avoiding the use of the "concurrent read" capability of the CREW PRAM, thus making the results hold in the EREW PRAM model.
10.2. Tube minima In what can be viewed as the three-dimensional version of the above row minima problem [8], one is given an w i x ^2 x «3 matrix A and one wishes to compute, for every 1 ^ / < ni and 1 ^ 7 ^ ^3, the «! x n^ matrix OA such that OA(i, j) is the smallest index k that minimizes A(i,k,j) (that is, among all the k's that minimize A(i,k,j), OA(i,j) is the smallest). The matrix A is such that OA satisfies the following sorted property:
OA(iJ)^OA(iJ-\-l), OA(iJ)^OA(i-\-lJ). Furthermore, for any submatrix A^ of A, OA' also satisfies the sorted property. Given such a matrix A, the problem of computing array OA is called by Aggarwal and Park [8] "computing the tube minima" of A. Many geometric applications of this problem are mentioned in [8]. There are many non-geometric applications to this problem as well. These include parallel string editing [25], constructing Huffmann codes in parallel [48], and other tree-construction problems. (In [48], the problem was given the name "multiplying two concave matrices".) The best CREW PRAM algorithms for this problem run in 0(logn) time and n^/logn processors [8,25], and the best CRCW PRAM algorithm runs in O(loglogn) time and n^/ log logn processors [27] (where n = n\ =n2 = n^). Both the CREW and the CRCW bounds are easily seen to be optimal.
Deterministic parallel computational geometry
185
We sketch the CRCW solution, which is an example of rootish divide and conquer. A crucial ingredient in the solution is the judicious use of the "aspect ratio condition": intuitively, the idea is to allow the aspect ratio of the subproblems solved recursively to deteriorate, but not too much, and in a controlled fashion. We sketch a version of the algorithm that has the right time complexity, but does too much work (hence uses too many processors). The procedure is recursive, and requires that Aht I x h x i with h ^ i^. We call this last condition the aspect ratio requirement; we assume it to be true initially, and we maintain it through the recursion (doing so without damaging the time complexity or the work complexity is, in fact, the main difficulty in this preliminary algorithm). The preliminary CRCW PRAM algorithm runs in O(log log ^) time and has work (that is, number of operations) complexity 0((£/z + l^)(\ogif). Before describing the algorithm, we need a few definitions and a review of some properties. Let X (resp., Y) be a subset of the row (resp., height) indices of A, and let Z be a contiguous interval of the column indices of A. The problem induced by the triplet (X, Z, Y) is that of finding OA' for the \X\ x \Z\ x \Y\ submatrix A^ of A induced by X, Z and Y. That is, it consists of finding, for each pair u, v with u e X and v eY, the smallest index k e Z such that A(u,k, v) is minimized. This k need not equal OA(U, V) since we are minimizing only over Z. However, the following property holds [8,25]. Assume X (resp., Y) is a contiguous interval of row (resp., height) indices of A. Let x, z, y (resp., x\ z\ yO be the smallest (resp., largest) indices in X, Z, Y respectively. If 6A(X, y) = Z and OA(X\ y^) = z\ then the solution to the triplet (X, Y, Z) gives the correct value of OA(U,V) for ail u e X and V eY (this follows from the sortedness of OA)The first stage of the computation partitions the row indices of A into l^^^ contiguous intervals Xi, X 2 , . . . , X^ip of size €^/^ each. Similarly, the height indices of A are partitioned into €^/^ contiguous intervals Fi, F2,..., F^i/3 of size £^^^ each. An endpoint of an interval Xi (resp., 7/) is the largest or smallest index in it. For each pair v, w such that V is an endpoint of Xi and w is an endpoint of Yj, we assign /ji+(i/6) processors which compute, in constant time, the index OA {V,W). (Computing the minimum of h entries using ^i+(i/6) processors is known to take constant time [211].) The total number of processors used in this step of the algorithm is 0(€^/^€^/^/z^+^^/^^), which is 0(ih) because h ^ i^. Let X (resp., x^) be the smallest (resp., largest) index in Xi, and let y (resp., y^) be the smallest (resp., largest) index in Yj. Let Zij be the interval [a, b] where a = OA(x,y) and b = 6A{x\y^). In the sequel, when we want to define such a Zij, we shall simply say "let Z/y denote the interval of column indices of A defined by the set OA(V, W) such that V G Xi and w G F / ' ; we do so for simplicity of expression, although it is an abuse of language (because Z/j might include an index k that is not the OA(M, V) of any pair u eXi, V e Yj). After the above stage of the computation we know the beginning and end of each such interval Zij. As already observed, for any pair of indices u, v where u e Xi and V eYj, we have ^A(W, V) e Zij. Thus it suffices to solve all of the subproblems defined by triplets (Xi, Zij, Yj). However, some of these triplets might violate the aspect ratio condition because their Zij is too large (larger than \Xi\^ = t^l^)'. Each such troublesome triplet (we call it a bad triplet) will be further partitioned into kij = \\Zij\ll^l^^ smaller
186
MJ. Atallah and D.Z. Chen
subproblems, by partitioning Ztj into kij pieces of size i^^^ each (except that possibly the kij-\h piece might be smaller). Specifically, if Z^. . denotes the A:-th piece from this partition of Ztj, then the k-ih subproblem spawned by the bad triplet (X/, Ztj, Yj) is {Xi, Z^. ., Yj). Of course such a spawned subproblem (X/, Z] •, Yj) no longer has the property that OA{U, V) G Z\J for u e Xi and v ^Yj. However, the answer returned by solving such an (X/, Z^ ., Yj) is not meaningless: We can obtain ^A(W, V) for u e Xi and V e Yj by choosing the best among the kij candidates returned by the kij subproblems (k)
(Xi, Z^ •, Fy), 1 < ^ < kij. We are now ready to give the details of the second stage of the computation. The second stage of the computation "fills in the blanks" by doing one parallel recursive call on a number of problems, defined as follows. In what follows, we describe these problems one at a time, but one should keep in mind that they are all solved in parallel. The first class of problems to be solved recursively are the good ones, those defined by triplets (Xi, Zij, Yj) where \Zij\ ^ i^^^. The Zij of such a good problem is not large enough to violate the aspect ratio constraint (because it satisfies \Zij | ^ |X/ p). The second class of problems to be solved recursively are those spawned by the bad triplets (X/, Zij, Yj), namely subproblems (X/, z[^j, Yj), I ^k^ kij. By definition, each such (X/, z f ] , Yj) satisfies the aspect ratio requirement. When these recursive calls return, we need not do further work for the good triplets, but for the bad ones we only have the answers for the kij subproblems they spawned. We can use these kij subanswers to get the correct answers in constant time, however. For each bad triplet (X/, Zij, Yj), we need to compute, for every pair u e Xi and v e Yj, the minimum among /:/,y entries. We do so by using kijh^^^ processors for each such pair u e Xi and i; e Yj (this is enough, since we are then computing the minimum of kij entries using ^ ki~^ ' processors). Since there are 1^1^ such u, V pairs per bad triplet, the total work done for this "bad triplet postprocessing" is upper-bounded by i'^^^h^^^ J2i / ^ij '•> ^^^^ since ^l/3_i
H^^^j =
E
^l/3_i
E^'''+/^ ^
E
i^h/i^^')=o(h/i),
this work is 0(l'^^^h^f^h/i) = 0(M) (where the fact that h^i^ was used). The bottom of the recursion is as usual: We stop when t is some small enough constant (note that, by the aspect ratio condition, a constant t implies a constant h, since h ^ l^). Analysis of the above shows that the time complexity satisfies T(l, h) = 0(loglog£), and the work complexity satisfies W(l, h)0((lh + f-)(\ogl)^). The above algorithm does too much work. We refer the reader to [27] for a solution that uses the above algorithm to achieve an optimal amount of work without requiring any aspect ration condition.
Deterministic parallel computational geometry
187
10.3. Generalized monotone matrices Aggarwal et al. [7] considered some generalizations of monotone matrices. An m x n array A is called staircase monotone if the following conditions hold: 1. Every entry of A is either a real number or oo. 2. A[/, 7] = 00 implies that A[i, /] = 00 for all / with / > 7, and A[k, 7] = 00 for all k with k > i. 3. For any 1 < z < ^ ^ m and 1 ^ 7 < / < n, A[i, 7] + A[k, I] < A[/, /] + A[k, j] if all the four entries involved are finite. Clearly, monotone matrices are a special case of staircase monotone matrices. It was indicated in [71 that staircase monotone matrices, like monotone matrices, appear in numerous applications (see [7] for references). Efficient parallel algorithms for computing row-maxima in n x n staircase monotone matrices were presented in [7]. In particular, the algorithms take O(logn) time and n processors on the CRCW PRAM, and O (log n log log n) time and n/loglogn processors on the CREW PRAM. Using these parallel row-maxima algorithms for two-dimensional staircase monotone matrices, several geometric problems were solved efficiently, such as the largest-area empty rectangle among points contained in a given rectangle, the nearestvisible neighbors or farthest-visible neighbors between two non-intersecting convex polygons, and other related problems [7]. 11. Other useful PRAM techniques There are other geometric techniques on the PRAM that we did not describe in detail, yet are also very useful. In particular, the following techniques are noteworthy. 11.1. Geometric hierarchies The paradigm of geometric hierarchies has proved extremely useful and general in computational geometry, both sequential [157,116-118] and parallel [100,99]. Generally speaking, the method consists of building a sequence of descriptions of the geometric objects under consideration, where an element of the sequence is simpler and smaller (by a constant factor) than its predecessor, and yet "close" enough that information about it can be used to obtain in constant time information about the predecessor. This "information" could be, for example, the location of a query point in the planar subdivision, assuming that the elements of the sequence are progressively simpler subdivisions of the plane (in that case, pointers exist between faces of a subdivision and those of its predecessor — these pointers are part of the data structure representing the sequence of subdivisions). This technique turns out to be useful for other models than the PRAM. 11.2. From CREW to EREW In order to turn a CREW PRAM algorithm into an EREW PRAM one, one needs to get rid of the read conflicts, the simultaneous reading from the same memory cell by many
188
MJ. Atallah and D.Z. Chen
processors. Such read conflicts often occur in the conquer stage, and can take the form of concurrent searching of a data structure by many processors (e.g., see [36,68,71]). To avoid read conflicts during such concurrent searching, the scheme of [190] can be helpful: LEMMA 11.1 (Paul, Vishkin, Wagener). Suppose T is a 2-3 tree with m leaves, suppose a\, a2, . . . , ak are data items that may or may not be stored in {the leaves of) T, and suppose each processor Pj wants to search for aj in T, j = 1,2,.. .,k. Then in 0(logm + log k) time, the k processors can perform their respective searches without read conflicts.
Many types of searches can be accommodated by the above lemma. The following tends to occur in geometric applications: • Type 1: Searching for a particular item in the tree, and • Type 2: Searches of the type "find the t-ih item starting from item p in the tree". The search tree need not be a 2-3 tree: The requirements for the concurrent searching scheme of [190] to be applicable are that (i) each node of the tree has 0(1) children, and (ii) the k searches should be "sortable" according to their ranks in the sorted order of the leaves of the tree. (The scheme of [190] has other requirements, but they are needed only for the concurrent insertions and deletions that it can also handle, not for searching.) Requirement (i) is usually satisfied in geometric applications. Requirement (ii) is also clearly satisfied for the searches of Type 1. It can be made to be satisfied for searches of Type 2 by sorting the queries according to the leaf orders of their targets (this requires first doing a search of Type 1 to determine the leaf order of /?).
11.3. Array-of-trees The array-of-trees data structure was originally developed in a non-geometric framework [47] for designing parallel algorithms, and was later generalized in [133,140] for parallelizing a number of sweeping algorithms for geometric problems. The array-of-trees data structure can be viewed as a parallel version of the persistence paradigm of Driscoll et al. [121]. Suppose a sequence Sofn operations is to be performed in an on-line fashion, and S contains m ^n set-modifying operations (e.g., insert, delete, extract-minimum, etc.). The idea in [47] is to maintain m relevant "snapshots" of a sequential data structure for evaluating S on-line, with O(logm) time per operation. Of course, storing explicitly the m copies of the sequential data structure (with one copy for each set-modifying operation) would be very expensive. Hence, a single "compressed" structure T for the m logical data structures is used, such that this structure can be built and processed in O(logm) time with m processors. Actually, the structure T can be considered as an array of m trees that share nodes, such that the t-th tree stores the information that is present right after the t-th set-modifying operation in S is performed (hence the name "array-of-trees"). T is represented as a complete binary tree with m leaves. A node of T, called a super-node, contains a number of minor-nodes that are nodes of the m individual trees represented by T. The array-of-trees data structures were generalized in [133,140], becoming a general technique for parallelizing sweeping algorithms for geometric problems. Note that the
Deterministic parallel computational geometry
189
"sweeping" paradigm has been widely used in designing sequential geometric algorithms [124,165,193]. The array-of-trees based parallel methods in [133,140] address those geometric problems for which the sweeping can be described either as a single sequence of data operations or as a related collection of operation sequences. These methods establish efficient parallel bounds for a number of geometric problems, such as computing the intersections of line segments in the plane [133], several types of hidden-surface elimination, CSG evaluation, and construction of the contour of a collection of rectangles [140].
11.4. Deterministic geometric sampling A general type of geometric structure that has proven very useful in designing efficient randomized as well as deterministic geometric algorithms is the geometric partition (e.g., see [82,84,148]). The general framework is that given a collection X of n geometric objects in the 2 [138,142], intersections of planar line segments [19], arrangements of lines and hyperplanes [135], lower envelope of constant degree algebraic functions of one variable [196], various Voronoi diagrams [22,196], etc. More interestingly, the parallel geometric algorithms based on deterministic geometric sampling techniques often are also efficient in the sense of being output-sensitive (see Subsection 11.5 for more discussion of this type of parallel geometric algorithms).
11.5. Output-sensitive algorithms Parallel output-sensitive algorithms are those whose complexity bounds depend on not only the size of the input but also the size of the output. For example, when computing the
190
M.J. Atallah and D.Z. Chen
intersections of n line segments in the plane, the time and number of processors used by an algorithm may depend on n as well as the number of the actual intersections between the given line segments [19,133,202]. There have been quite a few interesting deterministic output-sensitive PRAM algorithms for geometric problems. Notable examples of such algorithms are 3-dimensional convex hull [18], intersections of planar line segments [19, 133,202], lower envelope of constant degree algebraic functions of one variable [196], various Voronoi diagrams [22,196], rectilinear hidden-surface elimination [140], contour construction for a collection of rectangles [140], construction of the visibility graph of a simple polygon [143], etc. The above parallel output-sensitive geometric algorithms are in general based on the paradigm that the pool of virtual processors (in a slightly different PRAM model) can grow as the computation progresses, provided that the processor allocation happens globally [133,202], In this paradigm, r new processors are allowed to be allocated in time t only if an r-element array that stores pointers to the r tasks on which these new processors are to begin performing in time r + 1 has been constructed. This PRAM model is essentially the same as the "standard" PRAM, with the exception that in the "standard" PRAM, processors are requested and allocated only once (at the beginning of the computation).
11.6. Stratified decomposition trees The stratified decomposition tree was used in [143] for solving efficiently in parallel visibility and shortest path problems on a simple polygon. These polygon problems include shortest path queries, visibility from an edge, visibility graph, finding the convex rope, finding all-farthest neighbors, etc. [143]. Given a triangulation of an «-vertex simple polygon P, let T be a centroid decomposition tree of the graph-theoretic planar dual of the triangulation (the centroid decomposition tree T can be constructed from the triangulation of P in 0(log/i) time and n/\ogn processors [91]). The tree T represents a decomposition of P into subpolygons. Let J be a chosen integer parameter. A contraction operation is first performed on T, such that for each node vofT, the subtree Ty of T rooted at v is "contracted" into a single node at v if and only if the subtree T^ of T rooted at every child w; of i; has less than d vertices but Ty has at least d vertices. Let T^^ be the contracted tree obtained from T. Then mark every vertex vofT^^ if f is at a level / * J of T'^ for / = 0, 1,..., or if i; is a leaf of T'\ Let the marked vertices form a "compressed" version S{T") of T" based on their ancestor-descendant relation in T'\ The tree S{T'') so obtained is the stratified decomposition tree for P (the name "stratified decomposition tree" refers to the "layering" of the marked vertices in T^O- By storing appropriate information about certain shortest paths in the subpolygons associated with the vertices of S(T"), the stratified decomposition tree can be used for answering shortest path queries in P and for solving other problems [143]. By choosing d = r \\og^ n'\ for a certain constant r, the stratified decomposition tree can be built in O(logw) time using n/\ogn CREW PRAM processors [143].
Deterministic parallel computational geometry
191
11.7. Prune-and-search Pmne-and-search techniques have been used by many sequential geometric algorithms [193]. In parallel, Cole [86] gave an efficient prune-and-search algorithm for solving the selection problem [57,95] on the EREW PRAM. Cole's parallel selection algorithm takes 0(logn log* n) time and O(^) work. When the ^-th smallest element is to be selected from an n-element set S, Cole's algorithm [86] performs the following main steps: 1. Use k to find in S two "good" approximations to the ^-th smallest element with ranks k\ and k2 respectively, such that k\ ^k ^k2 and k2 — k\ is sufficiently small. 2. Eliminate from S all the elements whose ranks are not in the range of [^i, ^2], and recursively solve the problem on the remaining elements in S. 3. When \S\ is 0{n/\ogn), use Cole's parallel merge sort [87] to finish the selection. Cole's selection algorithm consists of 0(log*n) recursion levels, with O(logn) time per level. A key feature of Cole's parallel selection algorithm is that the approximations are determined based on an already known rank k. But, this feature could limit the applicability of Cole's parallel prune-and-search technique. For certain problems such as two-variable linear programming [122,174] and weighted selection [95], finding in parallel good approximations based on rank information as in [86] can be difficult, since useful rank information is not as readily available as for the selection problem. Actually, an EREW PRAM algorithm for two-variable linear programming can be obtained by a straightforward parallelization of a sequential prune-and-search algorithm [122, 174]: Select the median of the candidate elements, eliminate a constant fraction of these elements, and recurse on the remaining elements. By using Cole's EREW PRAM algorithm for approximate median selection [86], one can simulate in parallel this sequential prune-and-search procedure, until the number of the remaining elements is 0{n/ logn) (at that point, one can simply apply a parallel algorithm for computing common intersection of half-planes such as [71]). Such a parallel prune-and-search algorithm for two-variable linear programming takes 0(log/z loglog^) time and Oin) work on the EREW PRAM. In fact, Deng [113] gave an O(logn) time, 0(n) work algorithm on the CRCW PRAM for two-variable linear programming that is based on such a parallelization of the sequential prune-and-search procedure. A more general parallel prune-and-search technique was recently developed in [78]. This technique is different from Cole's [86] in that it does not depend on any given rank information. This new parallel prune-and-search technique has led to 0(logn log* n) time, 0{n) work algorithms for two-variable linear programming and other problems on the EREW PRAM. This is an improvement over the EREW PRAM algorithms of [123,142] when applied to the two-variable case (the algorithms in [123,142] are based on more sophisticated parallel techniques). A key procedure used in the prune-and-search algorithms [78] is the parallel algorithm of Chen et al. for partitioning sorted sets [75]. 12. Further remarks In addition to the open problems in parallel computational geometry that we already mentioned earlier, the following open problems are likely to receive attention in the future:
192
MJ. Atallah and D.Z. Chen
• 0(log n) time, optimal-work deterministic construction on the CREW or EREW PRAM for Voronoi diagrams in the plane. The current best parallel bounds are 0(log n log log n) time and j ^ ^ CREW PRAM processors [89], or 0(log^ n) time and n/logn EREW PRAM processors [22,196]. • O(logn) time, optimal-work deterministic construction on the CREW or EREW PRAM for 3-dimensional convex hull. The current best parallel bounds are 0(logn) time and 0(«^+^) work on the CREW PRAM [21] (for any constant e > 0), or O(log^n) time and 0(n logn) work on the EREW PRAM [18,136]. • 0(\ogn) time, optimal-work deterministic EREW PRAM solutions for linear programming in any fixed dimension d ^ 2. The current best EREW PRAM bounds are 0(logn log* n) time and 0(n) work for J = 2 [78], and 0(logn(loglog/i)^~^) time and 0(n) work for any fixed J > 3 [142]. • 0(log n) time, optimal-work deterministic EREW PRAM solution for the row minima in ann xn totally monotone matrix. The current best EREW PRAM bounds are O(logn) time and 0(n\ogn) work [46] (and O(logn) time and 0(n) work, but a randomized solution [195]). The following are additional promising directions for future research: • Output-sensitive PRAM algorithms. Most geometric problems remain open when being looked at from the parallel output-sensitive perspective, that is, time and work optimal algorithms are yet to be found. This is the case with the known deterministic output-sensitive PRAM solutions [18,19,22,133,140,143,196,202]. Recently, there are also several randomized output-sensitive PRAM algorithms [83,127,134,146,196]. • Robust parallel algorithms. Recall that robust algorithms are such that their correctness is not destroyed by roundoff errors. Most existing parallel geometric algorithms misbehave if implemented with rounded arithmetic. There has been recently an increasing interest in designing efficient and robust sequential algorithms for geometric problems (see [169] for a list of references), and it is natural for this activity to spread to the design of parallel geometric algorithms as well.
References [1] K. Abrahamson, N. Dadoun, D.A. Kirkpatrick and T. Przytycka, A simple parallel tree contraction algorithm, J. Algorithms 10 (1989), 287-302. [2] P.K. Agarwal, A deterministic algorithm for partitioning arrangements of lines and its applications, Proc. 5th Annual ACM Symp. on Computational Geometry (1989), 11-22. [3] P.K. Agarwal, Intersection and Decomposition Algorithms for Planar Arrangements, Cambridge University Press, New York (1991). [4] A. Aggarwal, B. Chazelle, L. Guibas, C. O'Dunlaing and C. Yap, Parallel computational geometry, Algorithmica 3 (1988), 293-328. [5] A. Aggarwal and M.-D. Huang, Network complexity of sorting and graph problems and simulating CRCW PRAMS by interconnection networks. Lecture Notes in Comput. Sci. 319: VLSI Algorithms and Architectures, 3rd Aegean Workshop on Computing, Springer-Verlag (1988) 339-350. [6] A. Aggarwal, M.M. Klawe, S. Moran, P. Shor and R. Wilber, Geometric applications of a matrix searching algorithm, Algorithmica 2 (1987), 209-233. [7] A. Aggarwal, D. Kravets, J.K. Park and S. Sen, Parallel searching in generalized Monge arrays with applications, Proc. 2nd ACM Symp. Parallel Algorithms and Architectures (1990), 259-268.
Deterministic parallel computational
geometry
193
[8] A. Aggarwal and J. Park, Parallel searching in multidimensional monotone arrays, Proc. 29th Annual IEEE Symp. on Foundations of Computer Science (1988), 497-512. (To appear in J. Algorithms.) [9] A. Aggarwal, B. Schieber and T. Tokuyama, Finding a minimum weight k-linkpath in graphs with Monge property and applications, Proc. 9th Annual Symp. on Computational Geometry (1993), 189-197. [10] A. Aggarwal and S. Suri, Fast algorithms for computing the largest empty rectangle, Proc. 3rd ACM Symp. on Computational Geometry (1987), 278-290. [11] A. Aggarwal and J.S. Vitter, The input/output complexity of sorting and related problems, Comm. ACM 31(1988), 1116-1127. [12] M. Ajtai, J. Komlos and E. Szemeredi, Sorting in clogn parallel steps, Combinatorica 3 (1983), 1-19. [13] M. Ajtai and N. Megiddo, A deterministic Poly(loglogN)-time N-processor algorithm for linear programming in fixed dimension, SIAM J. Comput. 25 (1996), 1171-1195. [14] S.G. Akl, A constant-time parallel algorithm for computing convex hulls, BIT 22 (1982), 130-134. [15] S.G. Akl and K.A. Lyons, Parallel Computational Geometry, Prentice-Hall, Englewood Cliffs, NJ (1993). [16] N. Alon and N. Megiddo, Parallel linear programming infixed dimension almost surely in constant time, Proc. 31st Annual IEEE Symp. on Foundation of Computer Science (1990), 574-582. [17] N.M. Amato, Finding a closest visible vertex pair between two polygons, Algorithmica 14 (1985), 183201. [18] N.M. Amato, M.T. Goodrich and E.A. Ramos, Parallel algorithms for higher-dimensional convex hulls, Proc. 35th IEEE Symp. on Foundations of Computer Science (1994), 683-694. [19] N.M. Amato, M.T. Goodrich and E.A. Ramos, Computing faces in segment and simplex arrangements, Proc. 27th ACM Symp. on Theory of Computing (1995), 672-682. [20] N.M. Amato and F.P. Preparata, The parallel 3D convex-hull problem revisited, Intemat. J. Comput. Geom. Appl. 2 (1992), 163-174. [21] N.M. Amato and F.P. Preparata, A time-optimal parallel algorithm for three-dimensional convex hulls, Algorithmica 14 (1995), 169-182. [22] N.M. Amato and E.A. Ramos, On computing Voronoi diagrams by divide-prune-and-conquer, Proc. 12th Annual ACM Symp. on Computational Geometry (1996), 166-175. [23] R. Anderson, P. Beame and E. Brisson, Parallel algorithms for arrangements, Proc. 2nd ACM Symp. Parallel Algorithms and Architectures (1990), 298-306. [24] R. Anderson and G.L. Miller, Deterministic parallel list ranking, Algorithmica 6 (1991), 859-868. [25] A. Apostolico, M.J. Atallah, L. Larmore and H.S. McFaddin, Efficient parallel algorithms for string editing and related problems, SIAM J. Comput. 19 (1990), 968-988. [26] M.J. Atallah, Parallel techniques for computational geometry. Proceedings of the IEEE 80 (1992), 14251448. [27] M.J. Atallah, A faster parallel algorithm for a matrix searching problem, Algorithmica 9 (1993), 156-167. [28] M.J. Atallah, P. Callahan and M.T. Goodrich, P-complete geometric problems, Intemat. J. Comput. Geom. Appl. 3 (1993), 443^62. [29] M.J. Atallah and D.Z. Chen, Parallel rectilinear shortest paths with rectangular obstacles, Comput. Geom.: Theory and Applications 1 (1991), 79-113. [30] M.J. Atallah and D.Z. Chen, On parallel rectilinear obstacle-avoiding paths, Comput. Geom.: Theory and Applications 3 (1993), 307-313. [31] M.J. Atallah and D.Z. Chen, Computing the all-pairs longest chains in the plane, Intemat. J. Comput. Geom. Appl. 5 (1995), 257-271. [32] M.J. Atallah and D.Z. Chen, Optimal parallel hypercube algorithms for polygon problems, IEEE Trans. Comput. 44 (1995), 914-922. [33] M.J. Atallah and D.Z. Chen, Parallel computational geometry. Current and Future Trends in Parallel and Distributed Computing, A. Zomaya, ed.. International Thomson (1996), 162-197. [34] M.J. Atallah, D.Z. Chen and O. Daescu, Efficient parallel algorithms for planar st-graphs, Proc. 8th Annual Int. Symp. on Algorithms and Computation (1997), 223-232. [35] M.J. Atallah, D.Z. Chen and K.S. Klenk, Parallel algorithms for longest increasing chains in the plane and related problems, Proc. of the Ninth Canadian Conference on Computational Geometry (1997), 59-64. [36] M.J. Atallah, D.Z. Chen and H. Wagener, An optimal parallel algorithm for the visibility of a simple polygon from a point, J. ACM 38 (1991), 516-533.
194
M.J. Atallah and D.Z. Chen
[37] MJ. Atallah, R. Cole and M.T. Goodrich, Cascading divide-and-conquer: A technique for designing parallel algorithms, SIAM J. Comput. 18 (1989), 499-532. [38] MJ. Atallah, F. Dehne, R. Miller, A. Rau-Chaplin and J.-J. Tsay, Multisearch techniques for implementing data structures on a mesh-connected computer, J. Parallel Distribut. Comput. 20 (1994), 1-13. [39] M.J. Atallah and A. Fabri, On the multisearching problem for hypercubes. Technical Report 93-029, Dept. of Computer Sciences, Purdue University (1993). [40] M.J. Atallah, G.N. Frederickson and S.R. Kosaraju, Sorting with efficient use of special-purpose sorters. Inform. Process. Lett. 27 (1988), 13-15. [41] M.J. Atallah and M.T. Goodrich, Efficient plane sweeping in parallel, Proc. 2nd Annual ACM Symp. on Computational Geometry, Yorktown Heights, New York (1986), 216-225. [42] M.J. Atallah and M.T. Goodrich, Efficient parallel solutions to some geometric problems, J. Parallel Distribut. Comput. 3 (1986), 492-507. [43] M.J. Atallah and M.T. Goodrich, Parallel algorithms for some functions of two convex polygons, Algorithmica 3 (1988), 535-548. [44] M.J. Atallah and S.E. Hambrusch, Solving tree problems on a mesh-connected processor array. Inform, and Control 69 (1986), 168-187. [45] M.J. Atallah, S.E. Hambrusch and L.E. TeWinkel, Parallel topological sorting of features in a binary image, Algorithmica 6 (1991), 762-769. [46] M.J. Atallah and S.R. Kosaraju, An efficient parallel algorithm for the row minima of a totally monotone matrix, J. Algorithms 13 (1992), 394-^13. [47] M.J. Atallah, S.R. Kosaraju and M.T. Goodrich, Parallel algorithms for evaluating sequences of set manipulation operations, J. ACM 41 (1994), 1049-1088. [48] M.J. Atallah, S.R. Kosaraju, L. Larmore, G.L. Miller and S. Teng, Constructing trees in parallel, Proc. 1st Annual ACM Symp. on Parallel Algorithms and Architectures, Santa Fe, New Mexico (1989), 421-431. [49] M.J. Atallah and J.-J. Tsay, On the parallel-decomposibility of geometric problems, Algorithmica 8 (1992), 209-231. [50] R. Beigel and J. Gill, Sorting n objects with a k-sorter, IEEE Trans. Comput. 39 (1990), 714-716. [51] B. Berger, J. Rompel and P.W. Shor, Efficient NC algorithms for set cover with applications to learning and geometry, Proc. 30th Annual IEEE Symp. Found. Comput. Sci. (1989), 54^59. [52] O. Berkman, B. Schieber and U. Vishkin, A fast parallel algorithm for finding the convex hull of a sorted point set, Intemat. J. Comput. Geom. Appl. 6 (1996), 231-242. [53] P. Bertolazzi, C. Guerra and S. Salza, A parallel algorithm for the visibility problem from a point, J. Parallel Distribut. Comput. 9 (1990), 11-14. [54] G. Bilardi and A. Nicolau, Adaptive bitonic sorting: An optimal parallel algorithm for shared memory machines, SIAM J. Comput. 18 (1989), 216-228. [55] G.E. Blelloch, Scans as primitive parallel operations, Proc. Int. Conf. on Parallel Processing (1987), 355362. [56] G.E. Blelloch, Scan primitives and parallel vector models, PhD thesis, Massachusetts Institute of Technology (1988). [57] M. Blum, R.W. Floyd, V.R. Pratt, R.L. Rivest and R.E. Tarjan, Time bounds for selection, J. Comput. System Sci. 7 (1973), 448-461. [58] A. Borodin and I.E. Hopcroft, Routing, merging, and sorting on parallel models of computation, J. Comput. System Sci. 30 (1985), 130-145. [59] L. Boxer and R. Miller, Dynamic computational geometry on meshes and hypercubes, J. Supercomputing 3(1989), 161-191. [60] R.P Brent, The parallel evaluation of general arithmetic expressions, J. ACM 21 (1974), 201-206. [61] P.B. Callahan, Optimal parallel all-nearest-neighbors using the well-seated pair decomposition, Proc. 34th Annual IEEE Sympos. Found. Comput. Sci. (1993), 332-340. [62] V. Chandru, S.K. Ghosh, A. Maheshwari, V.T Rajan and S. Saluja, NC-algorithms for minimum link path and related problems, J. Algorithms 19 (1995), 173-203. [63] B.M. Chazelle, On the convex layers of the planar set, IEEE Trans. Inform. Theory IT-31 (1985), 509-517. [64] B.M. Chazelle, Computational geometry on a systolic chip, IEEE Trans. Comput. C-33 (1984), 774-785. [65] B.M. Chazelle and D.P Dobkin, Intersection of convex objects in two and three dimensions, J. ACM 34 (1987), 1-27.
Deterministic parallel computational
geometry
195
[66] B.M. Chazelle and J. Friedman, A deterministic view of random sampling and its use in geometry, Combinatorica 10 (1990), 229-249. [67] B.M. Chazelle and L.J. Guibas, Fractional cascading: I. A data structuring technique, Algorithmica 1 (1986), 133-162. [68] D.Z. Chen, Parallel techniques for paths, visibility and related problems, PhD thesis. Technical Report 92-051, Department of Computer Sciences, Purdue University (July 1992). [69] D.Z. Chen, Determining weak external visibility of polygons in parallel, Proc. 6th Canadian Conf. on Computational Geometry (1994), 375-380. [70] D.Z. Chen, Optimal hypercube algorithms for triangulating classes of polygons and related problems, Proc. 7th Int. Conf. on Parallel and Distributed Computing Systems (1994), 174-179. [71] D.Z. Chen, Efficient geometric algorithms on the EREW-PRAM, IEEE Trans. Parallel Distribut. Systems 6 (1995), 41-^7. [72] D.Z. Chen, An optimal parallel algorithm for detecting weak visibility of a simple polygon. Internal. J. Comput. Geom. Appl. 5 (1995), 93-124. [73] D.Z. Chen, Optimally computing the shortest weakly visible subedge of a simple polygon, J. Algorithms 20 (1996), 459^78. [74] D.Z. Chen, Determining weak visibility of a polygon from an edge in parallel. Internal. J. Comput. Geom. Appl., to appear. [75] D.Z. Chen, W. Chen, K. Wada and K. Kawaguchi, Parallel algorithms for partitioning sorted sets and related problems, Proc. 4th Annual European Symp. on Algorithms (1996), 234-245. [76] D.Z. Chen and S. Guha, Testing a simple polygon for monotonicity optimally in parallel. Inform. Process. Lett. 47(1993), 325-331. [77] D.Z. Chen and X. Hu, Efficient approximation algorithms for fioorplan area minimization, Proc. of 33rd ACM/IEEE Design Automation Conf. (1996), 483^86. [78] D.Z. Chen and J. Xu, Two-variable linear programming in parallel (1998), submitted. [79] W. Chen, K. Wada and K. Kawaguchi, Parallel robust algorithms for constructing strongly convex hulls, Proc. 12th Annual ACM Symp. on Computational Geometry (1996), 133-140. [80] W. Chen, K. Wada, K. Kawaguchi and D.Z. Chen, Finding the convex hull of discs in parallel, Internat. J. Comput. Geom. Appl., to appear. [81] A. Chow, Parallel Algorithms for Geometric Problems, PhD thesis, Computer Science Dept., University of Illinois at Urbana-Champaign (1980). [82] K.L. Clarkson, New applications of random sampling in computational geometry. Discrete Comput. Geom. 2 (1987), 195-222. [83] K.L. Clarkson, R. Cole and R.E. Tarjan, Randomized parallel algorithms for trapezoidal diagrams, Internat. J. Comput. Geom. Appl. 2 (1992), 117-133. [84] K.L. Clarkson and P. W. Shor, Applications of random sampling in computational geometry, II, Discrete Comput. Geom. 4 (1989), 387^21. [85] E. Cohen, R. Miller, E.M. Sarraf and Q.F. Stout, Efficient convexity and domination algorithms for fineand medium-grain hypercube computers, Algorithmica 7 (1992), 51-75. [86] R.J. Cole, An optimally efficient selection algorithm. Inform. Process. Lett. 26 (1987/1988), 295-299. [87] R. Cole, Parallel merge sort, SIAM J. Comput. 17 (1988), 110-7^5. [88] R. Cole and M.T. Goodrich, Optimal parallel algorithms for point-set and polygon problems, Algorithmica 7 (1992), 3-23. [89] R. Cole, M.T. Goodrich and C. O'Diinlaing, A nearly optimal deterministic parallel Voronoi diagram algorithm, Algorithmica 16 (1996), 569-617. [90] R. Cole and U. Vishkin, Approximate and exact parallel scheduling with applications to list, tree and graph problems, Proc. 27th Annual IEEE Symp. on Foundations of Comp. Sci. (1986), 4 8 7 ^ 9 1 . [91] R. Cole and U. Vishkin, The accelerated centroid decomposition technique for optimal parallel tree evaluation in logarithmic time, Algorithmica 3 (1988), 329-346. [92] R. Cole and U. Vishkin, Faster optimal parallel prefix sums and list ranking. Inform, and Control 81 (1989), 334-352. [93] R. Cole and O. Zajicek, An optimal parallel algorithm for building a data structure for planar point location, J. Parallel Distribut. Comput. 8 (1990), 280-285.
196
MJ. Atallah and D.Z. Chen
[94] S. Cook and C. Dwork, Bounds on the time for parallel RAM's to compute simple functions, Proc. 14th ACM Annual Symp. on Theory of Computing (1982), 231-233. [95] T.H. Coraien, C.E. Leiserson and R.L. Rivest, Introduction to Algorithms, McGraw-Hill (1990). [96] R. Cypher and C.G. Plaxton, Deterministic sorting in nearly logarithmic time on the hypercube and related computers, J. Comput. System Sci. 47 (1993), 501-548. [97] R. Cypher and J.L.C. Sanz, Optimal sorting on feasible parallel computers, Proc. International Conference on Parallel Processing (1988), 339-350. [98] J. Czyzowicz, I. Rival and J. Urrutia, Galleries, light matchings and visibility graphs, Proc. Workshop on Algorithms and Data Structures, Lecture Notes in Comput. Sci. 382, Springer-Verlag (1989), 316-324. [99] N. Dadoun, Geometric hierarchies and parallel subdivision search, PhD thesis, U. of British Columbia (1990). 100] N. Dadoun and D. Kirkpatrick, Parallel processing for efficient subdivision search, Proc. 3rd ACM Symp. Computational Geom. (1987), 205-214. 101] N. Dadoun and D. Kirkpatrick, Parallel construction of subdivision hierarchies, J. Comput. System Sci. 39 (1989), 153-165. 102] A. Datta, A. Maheshwari and J.-R. Sack, Optimal parallel algorithms for direct dominance problems, Nordic J. Comput. 3 (1996), 71-87. 103] M. de Berg, M. van Kreveld, M. Overmars and O. Schwartzkopf, Computational Geometry: Algorithms and Applications, Springer-Verlag (1997). 104] F. Dehne, Solving visibility and separability problems on a mesh of processors. The Visual Computer 3 (1988), 356-370. 105] F. Dehne, Computing the largest empty rectangle on one and two dimensional processor arrays, J. Parallel Distribut. Comput. 9 (1990), 63-68. 106] F. Dehne, A. Fabri and A. Rau-Chaplin, Scalable parallel computational geometry for coarse grained multicomputers, Intemat. J. Comput. Geom. Appl. 6 (1996), 379-400. 107] F. Dehne, A. Ferreira and A. Rau-Chaplin, Parallel fractional cascading on a hypercube multiprocessor, Comput. Geom.: Theory and Applications 2 (1992), 141-167. 108] F. Dehne, A.-L. Hassenklover and J.-R. Sack, Computing the configuration space for a robot on a mesh of processors. Parallel Comput. 12 (1989), 221-231. 109] F. Dehne, A.-L. Hassenklover, J.-R. Sack and N. Santoro, Computational geometry algorithms for the systolic screen, Algorithmica 6 (1991), 734—761. 110] F Dehne and A. Rau-Chaplin, Implementing data structures on a hypercube multiprocessor, with applications in parallel computational geometry, J. Parallel Distribut. Comput. 8 (1990), 367-375. I l l ] F. Dehne, J.-R. Sack and I. Stojmenovic, A note on determining the ?>-dimensional convex hull of a set of points on a mesh ofprocessors, Proc. Scandinavian Workshop on Algorithms and Theory (1988), 154-162. 112] F. Dehne and I. Stojmenovic, An O(yrt) time algorithm for the ECDF searching problem for arbitrary dimensions on a mesh of processors. Inform. Process. Lett. 28 (1988), 67-70. 113] X. Deng, An optimal parallel algorithm for linear programming in the plane. Inform. Process. Lett. 35 (1990), 213-217. 114] A. Dessmark, A. Lingas and A. Maheshwari, Multi-list ranking: Complexity and applications, Theoret. Comput. Sci. 141 (1995), 337-350. 115] O. Devillers and A. Fabri, Scalable algorithms for bichromatic line segment intersection problems on coarse grained multicomputers, Intemat. J. Comput. Geom. Appl. 6 (1996), 487-506. 116] D.P. Dobkin and D.G. Kirkpatrick, Fast detection of polyhedral intersections, Theoret. Comput. Sci. 27 (1983), 241-253. 117] D.P. Dobkin and D.G. Kirkpatrick, A linear time algorithm for determining the separation of convex polyhedra, J. Algorithms 6 (1985), 381-392. 118] D.P. Dobkin and D.G. Kirkpatrick, Determining the separation of preprocessed polyhedra — a unified approach, Proc. of the Int. CoUoq. on Automata, Lang, and Programming (1990), 154—165. 119] D.P. Dobkin, R.J. Lipton and S. Reiss, Linear programming is log-space hard for P, Inform. Process. Lett. 9 (1979), 96-97. 120] D.P Dobkin and S. Reiss, The complexity of linear programming, Theoret. Comput. Sci. 11 (1980), 1-18. 121] J.R. DriscoU, N. Samak, D.D. Sleator and R.E. Tarjan, Making data structures persistent, Proc. 18th Annual ACM Symp. on Theory of Computing (1986), 109-121.
Deterministic parallel computational
geometry
197
[122] M.E. Dyer, Linear time algorithms for two- and three-variable linear programs, SIAM J. Comput. 13 (1984), 3 1 ^ 5 . [123] M.E. Dyer, A parallel algorithm for linear programming infixed dimension, Proc. 11th Annual Symp. on Computational Geometry (1995), 345-349. [124] H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer-Verlag, New York (1987). [125] H. ElGindy and M.T. Goodrich, Parallel algorithms for shortest path problems in polygons. The Visual Computer 3 (1988), 371-378. [126] G.N. Frederickson and D.B. Johnson, The complexity of selection and ranking in X -{-Y and matrices with sorted columns, J. Comput. System Sci. 24 (1982), 197-208. [127] M. Ghouse and M.T. Goodrich, Fast randomized parallel methods for planar convex hull construction, Comput. Geom.: Theory and Applications, to appear. [128] A. Gibbons and W. Rytter, An optimal parallel algorithm for dynamic expression evaluation and its applications, Proc. Symp. on Found, of Software Technology and Theoretical Comp. Sci., Springer-Verlag (1986), 453^69. [129] L.M. Goldschlager, The monotone and planar circuit value problems are log space complete for P, SIGACT News 9 (1977), 25-29. [ 130] M.T. Goodrich, Efficient parallel techniques for computational geometry, PhD thesis. Department of Computer Sciences, Purdue University (1987). [131] M.T. Goodrich, Finding the convex hull of a sorted point set in parallel. Inform. Process. Lett. 26 (1987), 173-179. [132] M.T. Goodrich, Triangulating a polygon in parallel, J. Algorithms 10 (1989), 327-351. [133] M.T. Goodrich, Intersecting line segments in parallel with an output-sensitive number ofprocessors, SIAM J. Comput. 20 (1991), 737-755. [134] M.T. Goodrich, Using approximation algorithms to design parallel algorithms that may ignore processor allocation, Proc. 32nd IEEE Symp. on Foundations of Computer Science (1991), 711-722. [135] M.T. Goodrich, Constructing arrangements optimally in parallel. Discrete Comput. Geom. 9 (1993), 371385. [136] M.T. Goodrich, Geometric partitioning made easier, even in parallel, Proc. 9th Annual ACM Symp. Computational Geometry (1993), 73-82. [137] M.T. Goodrich, Planar separators and parallel polygon triangulation, J. Comput. System Sci. 51 (1995), 374-389. [138] M.T. Goodrich, Fixed-dimensional parallel linear programming via relative Epsilon-approximations, Proc. 7th Annual ACM-SIAM Symp. Discrete Algorithms (1996), 132-141. [139] M.T. Goodrich, Parallel computational geometry, CRC Handbook of Discrete and Computational Geometry, I.E. Goodman and J. O'Rourke, eds, CRC Press, Inc. (1997), 669-682. [140] M.T. Goodrich, M. Ghouse and J. Bright, Sweep methods for parallel computational geometry, Algorithmica 15, 126-153. [141] M.T. Goodrich, C. O'Dunlaing and C. Yap, Computing the Voronoi diagram of a set of line segments in parallel, Algorithmica 9 (1993), 128-141. [142] M.T. Goodrich and E.A. Ramos, Bounded-independence derandomization of geometric partitioning with applications to parallel fixed-dimensional linear programming. Discrete Comput. Geom., to appear. [143] M.T. Goodrich, S.B. Shauck and S. Guha, Parallel method for visibility and shortest path problems in simple polygons, Algorithmica 8 (1992), 461^86. [144] S. Guha, Parallel computation of internal and external farthest neighbours in simple polygons, Intemat. J. Comput. Geom. Appl. 2 (1992), 175-190. [145] S. Guha, Optimal mesh computer algorithms for simple polygons, Proc. 7th International Parallel Processing Symp., Newport Beach, California (April 1993), 182-187. [146] N. Gupta and S. Sen, Faster output-sensitive parallel convex hulls for d ^3: Optimal sublogarithmic algorithms for small outputs, Proc. 12th Annual ACM Symp. Computational Geometry (1996), 176-185. [147] T. Hagerup and C. Riib, Optimal merging and sorting on the EREW-PRAM, Inform. Process. Lett. 33 (1989), 181-185. [148] D. Haussler and E. Welzl, Epsilon-nets and simplex range queries. Discrete Comput. Geom. 2 (1987), 127-151.
198
M.J. Atallah and D.Z. Chen
[149] J. Hershberger, Upper envelope onion peeling, Proc. 2nd Scandinavian Workshop on Algorithm Theory, Springer-Verlag (1990), 368-379. [150] J. Hershberger, Optimal parallel algorithms for triangulated simple polygons, Proc. 8th Annual ACM Symp. Computational Geometry (1992), 3 3 ^ 2 . [151] J.A. Holey and O.H. Ibarra, Triangulation in a plane and 3-d convex hull on mesh-connected arrays and hypercubes. Tech. Rep., University of Minnesota, Dept. of Computer Science (1990). [152] J.-W. Hong and H.T. Kung, I/O complexity: The red-blue pebble game, Proc. 13th Annual ACM Symp. on Theory of Computing (1981), 326-333. [153] J. Jaja, An Introduction to Parallel Algorithms, Addison-Wesley, Reading, MA (1992). [154] C.S. Jeong and D.T. Lee, Parallel geometric algorithms for a mesh-connected computer, Algorithmica 5 (1990), 155-177. [155] S.L. Johnsson, Combining parallel and sequential sorting on a Boolean n-cube, Proc. International Conf. on Parallel Processing (1984), 444-448. [156] R.M. Karp and V. Ramachandran, Parallel algorithms for shared-memory machines. Handbook of Theoretical Computer Science, J. van Leeuwen, ed.. Vol. 1, Elsevier Science Publishers (1990). [157] D.G. Kirkpatrick, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1983), 28-35. [158] S.R. Kosaraju and A. Delcher, Optimal parallel evaluation of tree-structured computations by raking. Lecture Notes in Comput. Sci. 319: VLSI Algorithms and Architectures, 3rd Aegean Workshop on Computing, Springer-Verlag (1988), 101-110. [159] C.R Kruskal, L. Rudolph and M. Snir, The power of parallel prefix, IEEE Trans. Comput. C-34 (1985), 965-968. [160] C.R Kruskal, L. Rudolph and M. Snir, A complexity theory of efficient parallel algorithms. Lecture Notes in Comput. Sci. 317, Proc. 15th Coll. on Autom., Lang, and Prog., Springer-Verlag (1988), 333-346. [161] V. Kumar and V. Sinch, Scalability ofparallel algorithms for the all-pairs shortest-path problem, J. Parallel Distribut. Comput. 13 (1991), 124-138. [162] M. Kunde, Optimal sorting on multidimensional mesh-connected computers, Proc. 4th Symp. on Theoretical Aspects of Computer Science, Lecture Notes in Comput. Sci., Springer (1987), 408^19. [163] H.T. Kung, F. Luccio and F.P. Preparata, On finding the maxima of a set of vectors, J. ACM 22(4) (1975), 469^76. [164] R.E. Ladner and M.J. Fischer, Parallel prefix computation, J. ACM 27 (1980), 831-838. [165] D.T. Lee and F.P. Preparata, Computational geometry — a survey, IEEE Trans. Comput. C-33 (1984), 872-1101. [166] D.T. Lee, F.P. Preparata, C.S. Jeong and A.L. Chow, SIMD parallel convex hull algorithms. Tech. Rep. AC-91-02, Northwestern University, Dept. of Electrical Eng. and Computer Science (1991). [167] F.T. Leighton, An Introduction to Parallel Algorithms and Architectures: Arrays, Trees, Hypercubes, Morgan Kaufmann Publishers, San Mateo, CA (1992). [168] C. Levcopoulos, J. Katajainen and A. Lingas, An optimal expected time algorithm for Voronoi diagrams, Proc. 1st Scandinavian Workshop on Algorithm Theory, Springer-Verlag (1988). [169] Z. Li and V. Milenkovic, Constructing strongly convex hulls using exact or rounded arithmetic, Algorithmica 8 (1992), 345-364. [170] A. Lingas, A. Maheshwari and J.-R. Sack, Optimal parallel algorithms for rectilinear link distance problems, Algorithmica 14 (1995), 261-289. [171] P.D. MacKenzie and Q. Stout, Asymptotically efficient hypercube algorithms for computational geometry, Proc. 3rd Symp. on the Frontiers of Massively Parallel Computation (1990), 8-11. [ 172] J.M. Marberg and E. Gafni, Sorting in constant number of row and column phases on a mesh, Proc. 24th Annual AUerton Conf. on Communication, Control and Computing, Monticello, Illinois (1986), 603-612. [173] J. Matousek, Epsilon-nets and computational geometry. New Trends in Discrete and Computational Geometry, J. Pach, ed., Algorithms and Combinatorics, Vol. 10, Springer-Verlag (1993), 69-89. [174] N. Megiddo, Linear time algorithms for linear programming in R^ and related problems, SIAM J. Comput. 12 (1983), 759-776. [175] G.L. Miller and J.H. Reif, Parallel tree contraction and its applications, Proc. 26th IEEE Symp. on Foundations of Comp. Sci. (1985), 478-489. [176] R. Miller and S.E. Miller, Convexity algorithms for digitized pictures on an Intel iPSC hypercube. Supercomputer J. 31 (VI-3) (1989), 45-53.
Deterministic parallel computational
geometry
199
[ 177] R. Miller and Q.F. Stout, Geometric algorithms for digitized pictures on a mesh-connected computer, IEEE Trans. PAMI 7 (1985), 216-228. [178] R. Miller and Q.F. Stout, Efficient parallel convex hull algorithms, IEEE Trans. Comput. C-37 (1988), 1605-1618. [179] R. Miller and Q.F. Stout, Mesh computer algorithms for computational geometry, IEEE Trans. Comput. C-38 (1989), 321-340. [180] R. Miller and Q.F. Stout, Parallel Algorithms for Regular Architectures, The MIT Press, Cambridge, Massachusetts (1991). [181] S. Miyano, S. Shiraishi and T. Shoudai, A list of P-complete problems. Technical Report RIFIS-TR-CS-17, Kyushu University (1989). [ 182] R. Motwani, J. Naor and M. Naor, The probabilistic method yields deterministic parallel algorithms, Proc. 30th Annual IEEE Symp. Found. Comput. Sci. (1989), 8-13. [183] H. Mueller, Sorting numbers using limited systolic coprocessors. Inform. Process. Lett. 24 (1987), 351354. [184] K. Mulmuley, Computational Geometry: An Introduction through Randomized Algorithms, Prentice-Hall, New Jersey (1994). [185] D. Nassimi and S. Sahni, Data broadcasting in SIMD computers, IEEE Trans. Comput. 30 (1981), 101106. [186] J. O'Rourke, Art Gallery Theorems and Algorithms, Oxford University Press (1987). [187] J. O'Rourke, Computational geometry, Ann. Rev. Comp. Sci. 3 (1988), 389-411. [188] J. O'Rourke, Computational Geometry in C, Cambridge University Press (1993). [189] I. Parberry, Parallel Complexity Theory, Pitman, London (1987). [190] W. Paul, U. Vishkin and H. Wagener, Parallel dictionaries on 2-3 trees, Proc. 10th Coll. on Autom., Lang. and Prog., Lecture Notes in Comput. Sci. 154, Springer, Berlin (1983), 597-609. [191] CO. Plaxton, Load balance, selection and sorting on the hypercube, Proc. 1st Annual ACM Symp. on Parallel Algorithms and Architectures (1989), 64-73. [192] C.G. Plaxton, On the network complexity of selection, Proc. 30th Annual IEEE Symp. on Foundations of Computer Science (1989), 396-401. [193] F.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag (1985). [194] F.P. Preparata and R. Tamassia, Fully dynamic techniques for point location and transitive closure in planar structures, Proc. 29th IEEE Symp. on Foundations of Computer Science (1988), 558-567. [195] R. Raman and U. Vishkin, Optimal parallel algorithms for totally monotone matrix searching, Proc. 5th Annual ACM-SIAM Symp. on Discrete Algorithms (1994), 613-621. [196] E.A. Ramos, Construction ofl-d lower envelopes and applications, Proc. 13th Annual ACM Symp. Computational Geometry (1997), 57-66. [197] J.H. Reif and S. Sen, Optimal randomized parallel algorithms for computational geometry, Algorithmica 7(1992), 91-117. [198] J.H. Reif and S. Sen, Polling: A new random sampling technique for computational geometry, SIAM J. Comput. 21 (1992), 466-485. [199] J.H. Reif and S. Sen, Randomized algorithms for binary search and load balancing on fixed connection networks with geometric applications, SIAM J. Comput. 23 (1994), 633-651. [200] J.H. Reif and Q.F. Stout, Manuscript. [201] J.H. Reif and L. Valiant, A logarithmic time sort for linear size networks, J. ACM 34 (1987), 60-76. [202] C. Riib, Line-segment intersection reporting in parallel, Algorithmica 8 (1992), 119-144. [203] K.W. Ryu and J. Jaja, Efficient algorithms for list ranking andfor solving graph problems on the hypercube, IEEE Trans. Parallel and Distributed Systems 1 (1990), 83-90. [204] S. Sairam, R. Tamassia and J.S. Vitter, An efficient parallel algorithm for shortest paths in planar layered digraphs, Algorithmica 14 (1995), 322-339. [205] J.L.C. Sanz and R. Cypher, Data reduction and fast routing: A strategy for efficient algorithms for message-passing parallel computers, Algorithmica 7 (1992), 77-89. [206] B. Schieber, Computing a minimum-weight k-link path in graphs with the concave Monge property, Proc. 6th Annual ACM-SIAM Symp. on Discrete Algorithms (1995), 405-411. [207] C.P. Schnorr and A. Shamir, An optimal sorting algorithm for mesh-connected computers, Proc. 18th ACM Symp. on Theory on Computing (1986), 255-261.
200
MJ. Atallah and D.Z. Chen
[208] S. Sen, A deterministic Poly (log log «) time optimal CRCW PRAM algorithm for linear programming in fixed dimension. Technical Report 95-08, Dept. of Computer Science, University of Newcastle (1995). [209] S. Sen, Parallel multidimensional search using approximation algorithms: With applications to linearprogramming and related problems, Proc. 8th ACM Symp. Parallel Algorithms and Architectures (1996), 251-260. [210] M. Sharir and P.K. Agarwal, Davenport-Schinzel Sequences and Their Geometric Applications, Cambridge University Press, New York (1995). [211] Y. Shiloach and U. Vishkin, Finding the maximum, merging, and sorting in a parallel computation model, J. Algorithms 2 (1981), 88-102. [212] I. Stojmenovic, Manuscript (1988). [213] Q.F. Stout, Constant-time geometry on PRAMs, Proc. 1988 Int'l. Conf. on Parallel Computing, Vol. HI, IEEE, 104-107. [214] R. Tamassia and J.S. Vitter, Parallel transitive closure and point location in planar structures, SIAM J. Comput. 20 (1991), 708-725. [215] R. Tamassia and J.S. Vitter, Optimal cooperative search in fractional cascaded data structures, Algorithmica 15 (1996), 154-171. [216] R.E. Tarjan and U. Vishkin, Finding biconnected components and computing tree functions in logarithmic parallel time, SIAM J. Comput. 14 (1985), 862-874. [217] CD. Thompson and H.T. Kung, Sorting on a mesh-connected parallel computer, Comm. ACM 20 (1977), 263-271. [218] G.T. Toussaint, Solving geometric problems with rotating calipers, Proc. IEEE MELECON '83, Athens, Greece (May 1983). [219] J.-J. Tsay, Optimal medium-grained parallel algorithms for geometric problems. Technical Report 942, Dept. of Computer Sciences, Purdue University (1990). [220] J.-J. Tsay, Parallel algorithms for geometric problems on networks ofprocessors, Proc. 5th IEEE Symp. on Parallel and Distributed Processing, Dallas, Texas (Dec. 1993), 200-207. [221] P. Vaidya, Personal communication. [222] L. Valiant, Parallelism in comparison problems, SIAM J. Comput. 4 (1975), 348-355. [223] V.N. Vapnik and A.Y. Chervonenkis, On the uniform convergence of relative frequencies of events to their probabilities. Theory Probab. Appl. 16 (1971), 264-280. [224] H. Wagener, Optimally parallel algorithms for convex hull determination. Manuscript (1985). [225] H. Wagener, Optimal parallel hull construction for simple polygons in 0(log log^i) time, Proc. 33rd Annual IEEE Sympos. Found. Comput. Sci. (1992), 593-599. [226] D.E. Willard and Y.C. Wee, Quasi-valid range querying and its implications for nearest neighbor problems, Proc. 4th Annual ACM Symp. on Computational Geometry (1988), 34-43. [227] C.K. Yap, Parallel triangulation of a polygon in two calls to the trapezoidal map, Algorithmica 3 (1988), 279-288.
CHAPTER 5
Voronoi Diagrams^ Franz Aurenhammer Institutfiir Grundlagen der Informationsverarbeitung, Technische Universitdt Graz, Klosterwiesgasse 32/2, A-8010 Graz, Austria
Rolf Klein Praktische Informatik VI, Fern Universitdt Hagen, Informatikzentrum, D-58084 Hagen, Germany
Contents 1. Introduction 2. Definitions and elementary properties 3. Algorithms 3.1. A lower bound 3.2. Incremental construction 3.3. Divide & conquer 3.4. Sweep 3.5. Lifting to 3-space 4. Generalizations and structural properties 4.1. Characterization of Voronoi diagrams 4.2. Optimization properties of Delaunay triangulations 4.3. Higher dimensions, power diagrams, and order-A: diagrams 4.4. Generalized sites 4.5. Generalized spaces and distances 4.6. General Voronoi diagrams 5. Geometric applications 5.1. Distance problems 5.2. Subgraphs of Delaunay triangulations 5.3. Geometric clustering 5.4. Motion planning 6. Concluding remarks and open problems References
* Partially supported by the Deutsche Forschungsgemeinschaft, grant Kl 655 2-2. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V All rights reserved
201
203 204 209 209 211 215 217 220 221 221 225 229 239 248 260 264 264 270 275 278 280 281
This Page Intentionally Left Blank
Voronoi diagrams
203
1. Introduction The topic of this chapter, Voronoi diagrams, differs from other areas of computational geometry, in that its origin dates back to the 17th century. In his book on the principles of philosophy [87], R. Descartes claims that the solar system consists of vortices. His illustrations show a decomposition of space into convex regions, each consisting of matter revolving round one of the fixed stars; see Figure 1. Even though Descartes has not explicitly defined the extension of these regions, the underlying idea seems to be the following. Let a space M, and a set S of sites p in M he given, together with a notion of the influence a site p exerts on a point x of M. Then the region of p consists of all points x for which the influence of p is the strongest, over all seS. This concept has independently emerged, and proven useful, in various fields of science. Different names particular to the respective field have been used, such as medial axis transform in biology and physiology, WignerSeitz zones in chemistry and physics, domains of action in crystallography, and Thiessen polygons in meteorology and geography. The mathematicians Dirichlet [95] and Voronoi [253,252] were the first to formally introduce this concept. They used it for the study of quadratic forms; here the sites are integer lattice points, and influence is measured by the Euclidean distance. The resulting structure has been called Dirichlet tessellation or Voronoi diagram, which has become its standard name today. Voronoi [253] was the first to consider the dual of this structure, where any two point sites are connected whose regions have a boundary in common. Later, Delaunay [86] obtained the same by defining that two point sites are connected iff (i.e. if and only if) they lie on a circle whose interior contains no point of S. After him, the dual of the Voronoi diagram has been denoted Delaunay tessellation or Delaunay triangulation. Besides its applications in other fields of science, the Voronoi diagram and its dual can be used for solving numerous, and surprisingly different, geometric problems. Moreover, these structures are very appealing, and a lot of research has been devoted to their study (about one out of 16 papers in computational geometry), ever since Shamos and Hoey [232] introduced them to the field. The reader interested in a complete overview over the existing literature should consult the book by Okabe et al. [210] who list more than 600 papers, and the surveys by Aurenhammer [27], Bemal [39], and Fortune [124]. Also, Chapters 5 and 6 of Preparata and Shamos [215] and Chapter 13 of Edelsbrunner [104] could be consulted. Within one chapter, we cannot review all known results and applications. Instead, we are trying to highlight the intrinsic potential of Voronoi diagrams, that lies in its structural properties, in the existence of efficient algorithms for its construction, and in its adaptability. We start in Section 2 with a simple case: the Voronoi diagram and the Delaunay triangulation of n points in the plane, under the Euclidean distance. We state elementary structural properties that follow directly from the definitions. Further properties will be revealed in Section 3, where different algorithmic schemes for computing these structures are presented. In Section 4 we complete our presentation of the classical two-dimensional case, and turn to generalizations. Next, in Section 5, important geometric applications of the Voronoi diagram and the Delaunay triangulation are discussed. The reader who is mainly
204
F. Aurenhammer
and R. Klein
Fig. 1. Descartes' decomposition of space into vortices.
interested in these applications can proceed directly to Section 5, after reading Section 2. Finally, Section 6 concludes the chapter and mentions some open problems.
2. Definitions and elementary properties Throughout this section we denote by 5 a set of w ^ 3 point sites /?, ^, r , . . . in the plane. For points p = (pi, p2) and x = (x\,X2) let d(p,x) = ^J{p\ — x\)'^ -\- {p2 — xi)^ denote their Euclidean distance. By ~pq we denote the line segment from p to q. The closure of a set A will be denoted by A. DEFINITION 2.1. For p,q
eSlei
B(p,q) = {x \d(p,x)
= d(q,x)]
Voronoi diagrams
205
be the bisector of p and q. B{p,q) is the perpendicular Une through the center of the Hne segment ~pq. It separates the halfplane D{p, q) = i^x\ d(p, x) < d(q, x)] containing p from the halfplane D(q, p) containing q. We call
YR(p,S)=
P I D(p,q) qeS,q^p
the Voronoi region of p with respect to S. Finally, the Voronoi diagram of S is defined by V{S)=
U
VR(/7,5)nVR(^,5).
p,q^S,p^q
By definition, each Voronoi region VR(/^, S) is the intersection of n — 1 open halfplanes containing the site p. Therefore, VR(/7, S) is open and convex. Different Voronoi regions are disjoint. The common boundary of two Voronoi regions belongs to V{S) and is called a Voronoi edge, if it contains more than one point. If the Voronoi edge e borders the regions of p and q then e C B{p, q) holds. Endpoints of Voronoi edges are called Voronoi vertices', they belong to the common boundary of three or more Voronoi regions. There is an intuitive way of looking at the Voronoi diagram V{S). Let x be an arbitrary point in the plane. We center a circle, C, at x and let its radius grow, from 0 on. At some stage the expanding circle will, for the first time, hit one or more sites of S. Now there are three different cases. LEMMA 2.L If the circle C expanding from x hits exactly one site, p, then x belongs to VR(/7, S).IfC hits exactly two sites, p and q, then x is an interior point of a Voronoi edge separating the regions of p and q. If C hits three or more sites simultaneously, then x is a Voronoi vertex adjacent to those regions whose sites have been hit. PROOF. If only site p is hit then p is the unique element of S closest to x. Consequently, X e Dip, r) holds for each site r e S with r ^ p.lfC hits exactly p and q, then x is contained in each halfplane D(p,r), D(q,r), where r ^ {p,q}, and in B(p,q), the common boundary of D(p, q) and D{q, p). By Definition 2.1, x belongs to the closure of the regions of both p and q, but of no other site in 5. In the third case, the argument is analogous.
n This lemma shows that the Voronoi regions form a decomposition of the plane; see Figure 2. Conversely, if we imagine n circles expanding from the sites at the same speed, the fate of each point x of the plane is determined by those sites whose circles reach x first. This "expanding waves" view has been systematically used by Chew and Drysdale [66] and Thurston [248].
206
F. Aurenhammer
and R. Klein
Fig. 2. A Voronoi diagram of 11 points in the Euclidean plane.
The Voronoi vertices are of degree at least three, by Lemma 2.1. Vertices of degree higher than three do not occur if no four point sites are cocircular. The Voronoi diagram V(S) is disconnected if all point sites are colinear; in this case it consists of parallel lines. From the Voronoi diagram of S one can easily derive the convex hull of 5, i.e. the boundary of the smallest convex set containing S. LEMMA 2.2. A point p of S lies on the convex hull of S iff its Voronoi region VR(/7, S) is unbounded.
The Voronoi region of p is unbounded iff there exists some point q e S such that V(S) contains an unbounded piece of B{p, q) as a Voronoi edge. Let x e B(p, q), and let C(x) denote the circle through p and q centered at x, as shown in Figure 3. Point x belongs to V(S) iff C(x) contains no other site. As we move x to the right along B(p, q), the part of C(x) contained in halfplane R keeps growing. If there is another site r in R,it will eventually be reached by C(JC), causing the Voronoi edge to end at x. Otherwise, all other sites of S must be contained in the closure of the left halfplane L. Then p and q both lie on the convex hull of 5. D PROOF.
Sometimes it is convenient to imagine a simple closed curve F around the "interesting" part of the Voronoi diagram, so large that it intersects only the unbounded Voronoi edges; see Figure 2. While walking along F, the vertices of the convex hull of S can be reported in cyclic order. After removing the halflines outside F, a connected embedded planar graph with n -\- I faces results. Its faces are the n Voronoi regions and the unbounded face outside F. We call this graph the finite Voronoi diagram.
207
Voronoi diagrams
L
I
R
B(p,q)
Fig. 3. As jc moves to the right, the intersection of circle C{x) with the left half plane shrinks, while C(x) H /? grows.
One virtue of the Voronoi diagram is its small size. LEMMA 2.3. The Voronoi diagram V{S) has 0(n) many edges and vertices. The average number of edges in the boundary of a Voronoi region is less than 6. PROOF. By the Euler formula (see, e.g. [129]) for planar graphs, the following relation holds for the numbers u, e, / , and c of vertices, edges, faces, and connected components.
V— e+ f =
l+c.
We apply this formula to the finite Voronoi diagram. Each vertex has at least three incident edges; by adding up we obtain e ^ 3^/2, because each edge is counted twice. Substituting this inequality together with c = 1 and f = n^l yields v^2n
—2
and
^ ^ 3 n —3.
Adding up the numbers of edges contained in the boundaries of all w + 1 faces results in 2e ^6n — 6 because each edge is again counted twice. Thus, the average number of edges in a region's boundary is bounded by {6n — 6)/(n -f 1) < 6. The same bounds apply to V{S). U Now we turn to the Delaunay tessellation. In general, a triangulation of 5 is a planar graph with vertex set S and straight line edges, which is maximal in the sense that no further straight line edge can be added without crossing other edges. Each triangulation of S contains the edges of the convex hull of S. Its bounded faces are triangles, due to maximality. Their number equals 2n — k — 2, where k denotes the size of the convex hull. We call a connected subset of edges of a triangulation a tessellation of S
208
F. Aurenhammer
and R. Klein
Fig. 4. Voronoi diagram and Delaunay tessellation.
if it contains the edges of the convex hull, and if each point of S has at least two adjacent edges. 2.2. The Delaunay tessellation DT(S) is obtained by connecting with a line segment any two points p,q of 5 for which a circle C exists that passes through p and q and does not contain any other site of S in its interior or boundary. The edges of DTC^S) are called Delaunay edges. DEFINITION
The following equivalent characterization is a direct consequence of Lemma 2.1. LEMMA 2.4. Two points of S are joined by a Delaunay edge iff their Voronoi regions are edge-adjacent.
Since each Voronoi region has at least two neighbors, at least two Delaunay edges must emanate from each point of 5. By the proof of Lemma 2.2, each edge of the convex hull of S is Delaunay. Finally, two Delaunay edges can only intersect at their endpoints, because they allow for circumcircles whose respective closures do not contain other sites. This shows that DT(5) is in fact a tessellation of S. Two Voronoi regions can share at most one Voronoi edge, by convexity. Therefore, Lemma 2.4 implies that DTC^") is the graph-theoretical dual of V(S), realized by straight hne edges. An example is depicted in Figure 4; the Voronoi diagram V(S) is drawn by solid lines, and DTC^S) by dashed lines. Note that a Voronoi vertex (like w) need not be contained in its associated face of DTC^S). The sites p,q,r,s art cocircular, giving rise to a Voronoi vertex V of degree 4. Consequently, its corresponding Delaunay face is bordered by four edges. This cannot happen if the points of S are in general position.
Voronoi diagrams
209
THEOREM 2.1. If no four points of S are cocircular then DT(^), the dual of the Voronoi diagram V{S), is a triangulation of S, called the Delaunay triangulation. Three points of S give rise to a Delaunay triangle iff their circumcircle does not contain a point of S in its interior.
3. Algorithms In this section we present several ways of computing the Voronoi diagram and its dual, the Delaunay tessellation. For simplicity, we assume of the n point sites of S that no four of them are cocircular, and that no three of them are colinear. According to Theorem 2.1 we can then refer to DT(5) as to the Delaunay triangulation. All algorithms presented herein can be made to run without the general position assumption. Also, they can be generalized to metrics other than the Euclidean, and to sites other than points. This will be discussed in Subsections 4.5 and 4.4. Data structures well suited for working with planar graphs like the Voronoi diagram are the doubly connected edge list, DCEL, by Muller and Preparata [202], and the quad edge structure by Guibas and Stolfi [136]. In either structure, a record is associated with each edge e that stores the following information: the names of the two endpoints of e; references to the edges clockwise or counterclockwise next to e about its endpoints; finally, the names of the faces to the left and to the right of e. The space requirement of both structures is 0(n). Either structure allows to efficiently traverse the edges incident to a given vertex, and the edges bounding a face. The quad edge structure offers the additional advantage of describing, at the same time, a planar graph and its dual, so that it can be used for constructing both the Voronoi diagram and the Delaunay triangulation. From the DCEL of V(S) we can derive the set of triangles constituing the Delaunay triangulation in linear time. Conversely, from the set of all Delaunay triangles the DCEL of the Voronoi diagram can be constructed in time 0(n). Therefore, each algorithm for computing one of the two structures can be used for computing the other one, within 0(n) extra time. It is convenient to store structures describing the finite Voronoi diagram, as introduced before Lemma 2.3, so that the convex hull of the point sites can be easily reported by traversing the bounding curve F; see Figure 2. 3,1. A lower bound Before constructing the Voronoi diagram we want to establish a lower bound for its computational complexity. Suppose that n real numbers x i , . . . , x^ are given. From the Voronoi diagram of the point set S = [pi = (xi ,Xi^)\l^i^n} one can derive, in linear time, the vertices of the convex hull of 5, in counterclockwise order. From the leftmost point in S on, this vertex sequence contains all points pt, sorted by increasing values of Xf; see Figure 5(i). This argument due to Shamos [231] shows that constructing the convex hull and, a fortiori, computing the Voronoi diagram, is at least as difficult as sorting n real numbers, which requires 0(n logn) time in the algebraic computation tree model.
F. Aurenhammer
210
\
Y
Fig. 5. Proving the Q(n\ogn)
and R. Klein
.Y
lower bound for constructing the Voronoi diagram (i) by transformation from sorting, and (ii) by transformation from ^-closeness.
However, a fine point is lost in this reduction. After sorting n points by their x-values, their convex hull can be computed in linear time [101], whereas sorting does not help in constructing the Voronoi diagram. The following result has been independently found by Djidjev and Lingas [96] and by Zhu and Mirzaian [262]. 3.1. It takes time Q{n\ogn) to construct the Voronoi diagram of n points Pn whose X-coordinatesare strictly increasing.
THEOREM
p\,...,
PROOF. By reduction from the e-closeness problem which is known to be in 0(nlogn). Let y\,.. .,yn be positive real numbers, and let £ > 0. The question is if there exist / / j such that \yi — yj\ < e holds. We form the sequence of points pi = (is/n, yi), 1 ^ / < n, and compute their Voronoi diagram; see Figure 5(ii). In time 0(«), we can determine the Voronoi regions that are intersected by the >^-axis, in bottom-up order (such techniques will be detailed in Subsection 3.3). If, for each /?/, its projection onto the >'-axis lies in the Voronoi region of pt then the values yi are available in sorted order, and we can easily answer the question. Otherwise, there is a point pi whose projection lies in the region of some other point pj. Because of
\yi -yj\^
d{(0, yi), Pj) < J((0, yd, pi) = ^ ^ ^,
in this case the answer is positive.
D
On the other hand, sorting n arbitrary point sites by x-coordinates is not made easier by their Voronoi diagram, as Seidel [225] has shown.
Voronoi diagrams
211
With Definition 2.1 in mind one could think of computing each Voronoi region as the intersection ofn — l halfplanes. This would take time G{n logn) per region, see [215]. In the following subsections we describe various algorithms that compute the whole Voronoi diagram within this time; due to Theorem 3.1, these algorithms are worst-case optimal. 3.2. Incremental construction A natural idea first studied by Green and Sibson [133] is to construct the Voronoi diagram by incremental insertion, i.e. to obtain V{S) from V(5 \ {p}) by inserting the site p. As the region of p can have up to n — 1 edges, for n = \S\, this leads to a runtime of 0{n^). Several authors have fine-tuned the technique of inserting Voronoi regions, and efficient and numerically robust implementations are available nowadays; see Ohya et al. [209] and Sugihara and Iri [242]. In fact, runtimes of 0{n) can be expected for well distributed sets of sites. The insertion process is, maybe, better described, and implemented in the dual environment, for the Delaunay triangulation: construct DT/ = DT({/7i,..., p / - i , p/}) by inserting the site pi into DT/_i. The advantage over a direct construction of V(S) is that Voronoi vertices that appear in intermediate diagrams but not in the final one need not be constructed and stored. We follow Guibas and Stolfi [136] and construct DT/ by exchanging edges, using Lawson's [176] original edge flipping procedure, until all edges invalidated by pi have been removed. To this end, it is useful to extend the notion of triangle to the unbounded face of the Delaunay triangulation. If 'pq is an edge of the convex hull of S we call the supporting halfplane H not containing S an infinite triangle with edge 'pq. Its circumcircle is H itself, the limit of all circles through p and q whose center tend to infinity within H\ compare Figure 3. As a consequence, each edge of a Delaunay triangulation is now adjacent to two triangles. Those triangles of DT/_i (finite or infinite) whose circumcircles contain the new site. Pi, are said to be in conflict with pi. According to Theorem 2.1, they will no longer be Delaunay triangles. Let ^ be an edge of DT/_i, and let T{q,rJ)ht the triangle adjacent to 'qr that lies on the other side of ^ than pi\ see Figure 6. If its circumcircle C{q,r, t) contains pi then each circle through q, r contains at least one of pi,t\ see Figure 3 again. Consequently, 'qr cannot belong to DT/, due to Definition 2.2. Instead, ^ will be a new Delaunay edge, because there exists a circle contained in C(^, r, t) that contains only pi and t in its interior or boundary. This process of replacing edge 'qr by p7? is called an edge flip. The necessary edge flips can be carried out efficiently if we know the triangle T(q,s,r) of DTj_i that contains pt, see Figure 7. The line segments connecting pt to q, r, and s will be new Delaunay edges, by the same argument from above. Next, we check if, e.g. edge 'qr must be flipped. If so, the edges 'qt and Jr are tested, and so on. We continue until no further edge currently forming a triangle with, but not containing pi, needs to be flipped, and obtain DT/. LEMMA 3.1. If the triangle ofDTt-i containing pi is known, the structural work needed for computing DT/ from DT/_i is proportional to the degree d of pi in DT/.
212
F. Aurenhammer
and R. Klein
t
C(q,r,t) Fig. 6. If triangle T(q,r, t) is in conflict with pj then former Delaunay edge qr must be replaced by pit.
(iii) Fig. 7. Updating DT/_i after inserting the new site pj. In (ii) the new Delaunay edges connecting pi to q,r,s have been added, and edge ^ has already been flipped. Two more flips are necessary before the final state shown in (iii) is reached.
PROOF. Continued edge flipping replaces d — 2 conflicting triangles of DT/_i by d new triangles in DT/ that are adjacent to pi; compare Figure 7. D
Lemma 3.1 yields an obvious O(n^) time algorithm for constructing the Delaunay triangulation ofn points: we can determine the triangle of DT/_i containing pi within linear time, by inspecting all candidates. Moreover, the degree of pi is trivially bounded by n. The last argument is quite crude. There can be single vertices in DT/ that do have a high degree, but their average degree is bounded by 6, as Lemma 2.3 and Lemma 2.4 show. This fact calls for randomization. Suppose we pick pn at random in 5, then choose pn-\ randomly from S — {pn}, and so on. The result is a random permutation {p\, pi^ ---^ Pn) of the site set S.
Voronoi diagrams
213
If we insert the sites in this order, each vertex of DT/ has the same chance of being pi. Consequently, the expected value of the degree of /?/ is 0(1), and the expected total number of structural changes in the construction of DT^ is only 0(w), due to Lemma 3.1. In order to find the triangle that contains /?/ it is sufficient to inspect all triangles that are in conflict with pi. The following lemma shows that the expected total number of all conflicting triangles so far constructed is only logarithmic. LEMMA 3.2. For each h < i, let dh denote the expected number of triangles in DT/^ \ DT/j_i that are in conflict with pi. Then,
^J/,=O(log0. Let C denote the set of triangles of DT/j that are in conflict with pi. A triangle T eC belongs to DT/^ \ DT/^-i iff it has pu as a vertex. As ph is randomly chosen in DT/^, this happens with probability 3//z. Thus, the expected number of triangles in C \ Tflh-i equals 3 • \C\/h. Since the expected size of C is less than 6 we have dh < 18//z, hence PROOF.
i : l = \ 4 < i8El=\ i/h = e(iogi).
n
Suppose that 7 is a triangle of DTj adjacent to pt, see Figure 7(iii). Its edge Jr is in DT/_i adjacent to two triangles: To its father, F, that has been in conflict with pi; and to its stepfather, SF, who is still present in DT/. Any further site in conflict with T must be in conflict with its father or with its stepfather, as illustrated by Figure 8. This property can be exploited for quickly accessing all conflicting triangles. The Delaunay tree due to Boissonnat and Teillaud [46] is a directed acyclic graph that contains one node for each Delaunay triangle ever created during the incremental construction. Pointers run from fathers and stepfathers to their sons. The triangles of DT3 are the sons of a dummy root node. When P/+1 must be inserted, a Delaunay tree including all triangles up to DT/ is available. We start at its root and descend as long as the current triangle is in conflict with /?/+i. The above property guarantees that each conflicting triangle of DT/ will be found. The expected number of steps this search requires is O(log0, due to Lemma 3.2. Once DT/+1 has been computed, the Delaunay tree can easily be updated to include the new triangles. Thus, we have the following result. THEOREM 3.2. The Delaunay triangulation of a set ofn points in the plane can be constructed in expected time 0{n\ogn), using expected linear space. The average is taken over the different orders of inserting the n sites.
As a nice feature, the insertion algorithm is on-line. That is, it is capable of constructing DT/ from DT/_i without knowledge of /7/+1,..., p^. Note also that we did not make any assumptions concerning the distribution of the sites in the plane; the incremental algorithm achieves its 0{n\ogn) time bound for every pos-
214
F. Aurenhammer
and R. Klein
Fig. 8. The circumcircle of T is contained in the union of the circumcircles of F and SF.
sible input set. Only under a "poor" insertion order can a quadratic number of structural changes occur, but this is unlikely. Randomized geometric algorithms are presented in more detail in a separate chapter of this book. Though conceptually simple, they tend to be tricky to analyze. Since Clarkson and Shor [74] introduced their technique, many researchers have been working on generalizing and simplifying the methods used. To mention but a few results, Boissonnat et al. [43] and Guibas et al. [135] have refined the methods of storing the past in order to locate new conflicts quickly, Clarkson et. al. [73] have generaHzed and simplified the analytic framework, and Seidel [230] systematically applied the technique of backward analysis first used by Chew [62]. The method in [135] for storing the past is briefly described in Subsection 4.3.3 for constructing a generalized planar Voronoi diagram. If the set S of sites can be expected to be well distributed in the plane, bucketing techniques for accessing the triangle that contains a new site /?/ have been used for speed-up. Joe [152], who implemented Sloan's algorithm [238], and Su and Drysdale [240], who used a variant of Bendey et al.'s spiral search [36], report on fast experimental runtimes. The arising issues of numerical stability have been addressed in Fortune [123], Sugihara [241], and JUnger et al. [154]. A technique similar to incremental insertion is incremental search. It starts with a single Delaunay triangle, and then incrementally discovers new ones, by growing triangles from edges of previously discovered triangles. This basic idea is used, e.g., in Maus [189] and in Dwyer [103]. It leads to efficient expected-time Delaunay algorithms in higher dimensions; see [103]. The paper [240] gives a thorough experimental comparison of available Delaunay triangulation algorithms.
Voronoi diagrams
215
3.3. Divide & conquer The first deterministic worst-case optimal algorithm for computing the Voronoi diagram has been presented by Shamos and Hoey [232]. In their divide & conquer approach, the set of point sites, S, is split by a dividing line into subsets L and R of about the same sizes. Then, the Voronoi diagrams V(L) and V(R) are computed recursively. The essential part is in finding the split line, and in merging V(L) and V(R), to obtain V(S). If these tasks can be carried out in time 0(n) then the overall running time is 0(n logn). During the recursion, vertical or horizontal split lines can be found easily if the sites in S are sorted by their x- and y-coordinates beforehand. The merge step involves computing the set B(L, R) of all Voronoi edges of V(S) that separate regions of sites in L from regions of sites in R. Suppose that the split line is vertical, and that L lies to its left. LEMMA 3.3. The edges of B{L, R) form a single y-monotonepolygonal chain. In V{S), the regions of all sites in L are to the left of B(L, R), whereas the regions of the sites of R are to its right. PROOF. Let b be an arbitrary edge of B(L, R), and let / G L and r e Rhe the sites whose regions are adjacent to b. Since / has a smaller x-coordinate than r, b cannot be horizontal, and the region of / must be to its left. D
Thus, V(S) can be obtained by glueing together B(L, R), the part of V(L) to the left of B(L, R), and the part of V(R) to its right; see Figure 9, where V(R) is depicted by dashed lines. The polygonal chain B(L, R) is constructed by finding a starting edge at infinity, and by tracing B(L,R) through V(L) and V(R). Due to Shamos and Hoey [232], an unbounded starting edge of B(L, R) can be found inO(n) time by determining a line tangent to the convex hulls of L and R, respectively. Here we describe an alternative method by Chew and Drysdale [66] since that method also works for generalized Voronoi diagrams (Subsection 4.5.2). The unbounded regions of V(L) and V(R) are scanned simultaneously in cyclic order. For each non-empty intersection VR(/, L) n VR(r, R), we test if it contains an unbounded piece of B(l,r).lf so, this must be an edge of B(L, R), by Definition 2.1. Since B(L, R) has two unbounded edges, by Lemma 3.3, this search will be successful. It takes time | V(L)\ + | V(R)\ = 0(n). Now we describe how B(L, R) is traced. Suppose that the current edge b of B(L, R) has just entered the region VR(/, L) at point v while running within VR(r, R), see Figure 10. We determine the points VL and VR where b leaves the regions of / resp. of r. The point VL is found by scanning the boundary of VR(/, L) counterclockwise, starting from v. In our example, VR is closer to v than VL, SO that it must be the endpoint of edge b. From VR, B{L,R) continues with an edge Z?2 separating / and r2. Now we have to determine the points UL,2 and VR^2 where b2 hits the boundaries of the regions of / and r2- The crucial observation is that VL,2 cannot be situated on the boundary segment of VR(/, L) from v to VL that we have just scanned; this can be inferred from the convexity of VR(/, S). Therefore, we need to scan the boundary of VR(/, L) only from VL on, in counterclockwise direction.
216
F. Aurenhammer and R. Klein B(L,R)
V(R)
Fig. 9. Merging V{L) and V{R) into V{S).
The same reasoning applies to V{R)\ only here, region boundaries are scanned clockwise. Even though the same region might be visited by B{L, R) several times, no part of its boundary is scanned more than once. The edges of V(L) that are scanned all lie to the right of B{L, R). This part of V(L), together with B(L, R), forms a planar graph each of whose faces contains at least one edge of B(L, R) in its boundary. As a consequence of Lemma 2.3, the size of this graph does not exceed the size of B(L, R), times a constant. The same holds for V(R). Therefore, the cost of constructing B(L, R) is bounded by its size, once a starting edge is given. This leads to the following result. THEOREM 3.3. The divide SL conquer algorithm allows the Voronoi diagram ofn point sites in the plane to be constructed within time 0(n logn) and linear space, in the worst case. Both bounds are optimal.
Of course, the divide & conquer paradigm can also be applied to the computation of the Delaunay triangulation DT(5). Guibas and Stolfi [136] give an implementation that uses the quad-edge data structure and only two geometric primitives, an orientation test and an in-circle test. Fortune [123] showed how to perform these tests accurately with finite precision.
Voronoi diagrams
217
Bd.rs) K /
\ \ I
, / /
/ B(l,r2) '
/
/ /
'
'
B(l,r)
IVR(I,L)
"B(r2,r3)
b^
•r2
B(r,r2)
Fig. 10. Computing the chain B(L, R).
Dwyer's implementation [102] uses vertical and horizontal split lines in turn, and Katajainen and Koppinen's [157] merges square buckets in a quad-tree order. Both papers report on favorable results. Divide & conquer algorithms are candidates allowing for cffLcitnt parallelization. Several theoretically efficient algorithms for computing in parallel the Voronoi diagram or the Delaunay triangulation have been proposed. We refer to the recent paper by Blelloch et al. [41] for references and for a practical parallel algorithm for computing DT(5). They highlight an algorithm by Edelsbrunner and Shi [116] that uses the lifting map for S (see Subsection 3.5) to construct a chain of Delaunay edges that divides S. They show experimentally that their implementation is comparable in work to the best sequential algorithms.
3.4. Sweep The well-known line sweep algorithm by Bentley and Ottmann [34] computes the intersections of n line segments in the plane by moving a vertical line, H, across the plane. The line segments currently intersected by H are stored in bottom-up order. This order must be updated whenever H reaches an endpoint of a line segment, or an intersection point. To discover the intersection points in time, it is sufficient to check, after each update of the order, those pairs of line segments that have just become neighbors on H. It is tempting to apply the same approach to Voronoi diagrams, by keeping track of the Voronoi edges that are currently intersected by the vertical sweep line. The problem is in discovering new Voronoi regions in time. By the time the sweep line hits a new site it has been intersecting Voronoi edges of its region for a while.
218
F. Aurenhammer
and R. Klein
Pe Pe
-'
H
V
H'
Fig. 11. Voronoi diagrams of the sweep line, H, and of the points to its left.
Fortune [125] was the first to find a way around this difficulty. He suggested a planar transformation under which each point site becomes the leftmost point of its Voronoi region, so that it will be the first point hit during a left-to-right sweep. His transformation does not change the combinatorial structure of the Voronoi diagram. Later, Seidel [228] and Cole [75] have shown how to avoid this transformation. They consider the Voronoi diagram of the point sites to the left of the sweep line H and of H itself, considered an additional site; see Figure 11. Because the bisector of a line and a non-incident point is a parabola, the boundary of the Voronoi region of / / is a connected chain of parabola segments whose top- and bottommost edges tend to infinity. This chain is called the wavefront, W. Let /? be a point site to the left of H. Any point to the left of, or on, the parabola B(p, H) is not farther from p than from //; hence, it is a fortiori closer to p than to any site to the right of H. Consequently, as the sweep line moves on to the right, the waves must follow because the sets D(pi, H) grow. On the other hand, each Voronoi edge to the left of W that currently separates the regions of two point sites /?/, pj will be (part of) a Voronoi edge in
y{s). During the sweep, there are two types of events that cause the structure of the wavefront to change, namely when a new wave appears in W, or when an old wave disappears. The
Voronoi diagrams
219
first happens each time the sweep line hits a new site, e.g. pe in Figure 11. At that very moment B(H, pe)is2i horizontal line through pe, according to Definition 2.1. A little later, its left halfline unfolds into a parabola that must be inserted into the wavefront by gluing it onto the wave of p4 (which now contributes two segments to W). Let p,q be two point sites whose waves are neighbors in W. Their bisector, B(p,q), gives rise to a Voronoi edge to the left of W. Its prolongation into the region of H is called a spike. In Figure 11 spikes are depicted as dashed lines; one can think of them as tracks along which the waves are moving. A wave disappears from W when it arrives at the point where its two adjacent spikes intersect. Its former neighbors become now adjacent in the wavefront. In Figure 11, the wave of p3 would disappear at point i;, if the new site, p^, did not exist. But after the wave of p^ has been inserted, there will be a previous event at v\ where the lower part of the wave of p4 disappears. While keeping track of the wavefront one can easily maintain the Voronoi diagram of H and of the point sites to its left. As soon as all point sites have been detected and all spike intersections have been processed, V(S) is obtained by removing the wavefront and extending all spikes to infinity. Even though one wave may contribute several segments to the wavefront, the following holds. LEMMA
3.4. The size of the wavefront is 0(n).
Since any two parabolic bisectors B(p, H), B(q, H) can cross at most twice, the size of the wavefront is bounded by A2(n) = 2n — 1, where Xs{n) denotes the maximum length of a Davenport-Schinzel sequence over n symbols in which no two symbols appear s times each in alternating positions; see [21]. D PROOF.
The wavefront can be implemented by a balanced binary tree that stores the segments in bottom-up order. This enables us to insert a wave, or remove a wave segment, in time OiXogn). Before the sweep starts, the point sites are sorted by increasing x-coordinates and inserted into an event queue. After each update of the wavefront, newly adjacent spikes are tested for intersection. If they intersect at some point f, we insert into the event queue the time, i.e. the position x of the sweep line, when the wave segment between the two spikes arrives at v. Since the point f is a Voronoi vertex of V(5), there are only 0(n) many events caused by spike intersections. In addition, each of the n sites causes an event. For each active spike we need to store only its first intersection event. Thus, the size of the event queue never exceeds 0(n). We obtain the following result. THEOREM 3.4. Plane sweep provides an alternative way of computing the Voronoi diagram ofn points in the plane within 0(n logn) time and linear space.
McAllister et al. [191] have pointed out a subtle difference between the sweep technique and the two methods mentioned before. The divide & conquer algorithm computes 0 (n log n) many vertices, even though only a linear number of them appears in the final diagram. The randomized incremental construction method performs an expected 0 (n log n)
220
F. Aurenhammer
and R. Klein
tz Xg-X^ +^2
Fig. 12. Lifting circles onto the paraboloid.
number of conflict tests. Both tasks, constructing a Voronoi vertex and testing a subset of sites for conflict, are usually handled by subroutines that deal directly with point coordinates, bisector equations etc. They can become quite costly if we consider sites more general than points, and distance measures more general than the Euclidean distance; see Sections 4.4, 4.5, and 4.6. The sweep algorithm, on the other hand, processes only 0(n) many spike events.
3.5. Lifting to 3-space The following approach employs the powerful method of geometric transformation. Let P = [{x\,X2,xi) I x^ -h x | = X3} denote the paraboloid depicted in Figure 12. For each point x = {x\,X2) in the plane, let x' = {x\,X2,x]-\- jc|) denote its lifted image on P. LEMMA
3.5. Let C bea circle in the plane. Then C' is a planar curve on the paraboloid P.
PROOF.
Suppose that C is given by the equation r^ = (X\ -C\)^
-\-(X2 -02)^
=x]+xl
-2x\C\
- 2X2C2 + c] + C^.
By substituting jc^ -h jc| = JC3 we obtain x^ — 2x\c\ — 2x2C2 + Cj + ^2 — r
=0
for the points of C. This equation defines a plane in 3-space.
D
This lemma has an interesting consequence. By the lower convex hull of a set of points in 3-space we mean that part of the convex hull which is visible from the {xi, jC2)-plane.
Voronoi diagrams
221
THEOREM 3.5. The Delaunay triangulation of S equals the projection onto the {x\, X2)plane of the lower convex hull of S'. PROOF. Let p,q,r denote three point sites of S. By Lemma 3.5, the hfted image, C\ of their circumcircle C Hes on a plane, E, that cannot be vertical. Under the lifting mapping, the points inside C correspond to the points on the paraboloid P that lie below the plane E. By Theorem 2.1, p,q,r define a triangle of the Delaunay triangulation iff their circumcircle contains no further site. Equivalently, no lifted site s^ is below the plane E that passes through p\ q\ r'. But this means that p\ q', r' define a face of the lower convex hull of S'.
D
Because there exist Oiji log/t) time algorithms for computing the convex hull of/i points in 3-space, see, e.g. Preparata and Shamos [215], we have obtained another optimal algorithm for the Voronoi diagram. The connection between Voronoi diagrams and convex hulls has first been studied by Brown [49] who used the inversion transform. The simpler lifting mapping has been used, e.g., in Edelsbrunner and Seidel [113]. We shall see several applications and generalizations in Subsection 4.3. In [113] also the following fact is observed. For each point p of 5, consider the paraboloid Pp = {(xi, X2, ^3) | {x\ — pi)^ + (^2 — P2)^ = X3}. If these paraboloids were opaque, and of pairwise different colors, an observer looking upwards from ^3 = — oc would see the Voronoi diagram V(S). In fact, the projection X = {x\, X2) of a point (x\, X2, X3) e Pp 0 Pq belongs to B{p, q); and there is no site s closer to x than p and q iff (xi, X2, X3) lies below all paraboloids Ps. Instead of the paraboloids Pp one could use the surfaces {(xi,X2, f((xi — pi)^ + (x2 — P2)^))] generated by any function / that is strictly increasing. For example, f(x) = ^ gives rise to cones of slope 45° with apices at the sites. This setting illustrates the concept of circles expanding from the sites at equal speed, as mentioned after the proof of Lemma 2.1. Coordinate X3 represents time. In order to visualize a Voronoi diagram on a graphic screen one can feed the n surfaces to a z-buffer, and eliminate by brute force those parts not visible from below. Finally, we would like to mention a nice connection between the two ways of obtaining the Voronoi diagram by means of paraboloids explained above; it goes back to [113]. For a point w = (wi, W2, W3), let -'W denote its mirror image (wi, W2, —w^). If we apply to 3-space the mapping which sends x to (x\, X2, ^3 — (xi — p\)^ — (x2 — P2)^) then, for each point p in the plane, the paraboloid Pp corresponds to the tangent plane of the paraboloid -"P at the point —"{p'), where p' denotes the lifted image of p\ compare the plane equation derived in the proof of Lemma 3.5, letting c = p and r = 0.
4. Generalizations and structural properties 4.1. Characterization of Voronoi diagrams The process of constructing the Voronoi diagram for n point sites can be seen as an assignment of a planar convex region to each of the sites, according to the nearest-neighbor
222
F. Aurenhammer and R. Klein
rule. We now address the following, in some sense inverse, question: Given a partition of the plane into n convex regions (which are then necessarily polygonal), do there exist sites, one for each region, such that the nearest-neighbor rule is fulfilled? In other words, when is a given convex partition the Voronoi diagram of some set of sites? Whether a given set of sites induces a given convex partition as its Voronoi diagram is, of course, easy to decide by exploiting symmetry properties among the sites. For the same reason, it is easy to check whether a given triangulation is Delaunay, by exploiting the empty circumcircle property of its triangles, stated in Theorem 2.1. Conditions for a given graph to be isomorphic to the Delaunay triangulation of some set of sites are mentioned, e.g., in the survey article by Fortune [124]. Below we concentrate on the recognition of Voronoi diagrams without knowing the sites. Questions of this kind arise in facility location and in the recognition of biological growth models (as report, e.g., in Suzuki and Iri [245]) and, in particular, in the so-called gerrymander problem mentioned in Ash and Bolker [20]: When the sites are regarded as polling places and election law requires that each person votes at the respective closest polling place, the election districts form a Voronoi diagram. If the legislature draws the district lines first, how can we tell whether election law is satisfied? Let Ri and Rj be two of the given regions. Assume that they share a common edge, and let hij be the line containing that edge. Further, let a/y denote the reflection at line htj. LEMMA 4.1. A convex partition R\,..., Rn of the plane defines a Voronoi diagram if and only if there exists a point pi for each region Ri such that the following holds. (1) Pi e Ri {containment condition), (2) crij(pi) = pj if Rj is adjacent to Ri (reflection condition). PROOF. If we do have a Voronoi diagram then its defining sites exist and obviously fulfill (1) and (2). To prove the converse, assume that points p\,..., pn fulfilling both conditions exist. Take any region Ri and any point x therein. We show that d(x, pi) is a minimum. To get a contradiction, suppose pj, j ^ i, is closest to x. Consider an edge of Rj that is intersected by xpj, and let Rk be the region adjacent to Rj at that edge; see Figure 13. Note that k = i may happen. By convexity of Rj and by (1), the line hjk separates pj from X. Hence by (2) we gQtd(x, pk)
Based on Lemma 4.1, the recognition problem can now be formulated as a linear programming problem; see Hartvigsen [138]. We first exploit the reflection condition to get a system of linear equations. Reflection at a line is an affine transformation, so we may write a/y (x) as AijX + bij, for appropriate matrix A/y and vector bij. Consider a depth-first search order of the regions such that for each region Ri an adjacent region /?/+i is known. To get a linear system in x, set PI = X, Pi = A\2X + bi2 := C2X + dj,
Voronoi diagrams
223
R.
Fig. 13. Region Ri must be closest to x.
P3 = A23(Ai2X + bn) + b23 := C3X + J3
and so on. This expresses all points pi in terms of pi by using n — 1 adjacencies among the regions. Each of the remaining adjacencies now gives an equation of the form Aij (CiX +
224
F. Aurenhammer
and R. Klein
Fig. 14. Sites might be taken in the polygonal areas.
Consider each region /?/ as the intersection of all halfplanes bounded by the lines htj. Then pt e Ri gives a set of inequalities of the form pJUj ^ aij which, by plugging in pi = C/x + di, yields
{Cjtij)x^aij-djtij. Finding a feasible solution of the corresponding linear program means finding a possible site p\ —X for /?! which, by reflection, gives all the desired sites. Since we deal with a linear program with 0{n) constraints and of constant dimension (actually two), only linear time (Megiddo [194]) is spent in this more complicated case. THEOREM 4.1. Let C be a partition of 2-space into n convex regions, given by halfplanes supporting the regions and by adjacencies among regions. 0(n) time suffices for deciding whether C is a Voronoi diagram, and also for restoring a suitable set of sites in case of its existence.
Voronoi diagrams
225
This result is clearly optimal, and the underlying method is easy to program. A generalization to higher dimensions is straightforward. Still, the method has to be used with care as even a slight deviation from the correct Voronoi diagram (stemming from imprecise measurement or numerical errors) will cause the method to classify C as non-Voronoi. Suzuki and Iri [245] give a completely different method capable of approximating C by a Voronoi diagram. Lemma 4.1 extends to more general Voronoi-like partitions. The characterizing configuration of points is commonly called a reciprocalfigure.A nice survey on this subject is Ash et al. [19]. Reciprocal figures play a role in recognizing seemingly unrelated properties of a convex partition C, for instance checking equilibrium states of C, see Crapo and Whiteley [77], and finding polyhedra whose boundaries project to C, see Aurenhammer [23]. The relationship between Voronoi diagrams and polyhedra in one dimension higher will be described in Subsection 4.3.2.
4.2. Optimization properties of Delaunay triangulations The Delaunay triangulation, DT(5'), of a set Sofn sites in 2-space possesses a host of nice and useful properties many of which are well known and understood nowadays. Being the geometric dual of the Voronoi diagram V{S), DT(5) comprises the proximity information inherent to ^S in a compact manner. Apart from the present subsection, various properties of DTC^*) and their applications are described in Section 5 and, in particular, in Subsection 5.2. Here we look at DT(5) as a triangulation per se and concentrate on parameters which are optimized by DT(5) over all possible triangulations of the point set S. Recall that a triangulation 7 of 5 is a maximal set of non-crossing line segments spanned by the sites in S. Let us call T locally Delaunay if, for each of its convex quadrilaterals Q, the corresponding two triangles have circumcircles empty of vertices of Q. Clearly, DT(5) is locally Delaunay because all circumcircles for its triangles are empty of sites; see Theorem 2.1. Interestingly, the local property also implies the global one. THEOREM
4.2. If a triangulation of S is locally Delaunay then it equals DT(5).
PROOF. Let r be a triangulation of S and assume that T is locally Delaunay. We show that, for each triangle Z\ of T, its circumcircle C(zl) is empty of sites in S. Assuming the contrary, \ti s eC{A) for some s e S and some AinT. Observe s ^ A and let e be the edge of A closest to s. Suppose, w.l.o.g., that (z\, s, e) maximizes the angle at s spanned by e, for all such triples (triangle, site, edge). See Figure 15. Because of s, e cannot be an edge of the convex hull of S. Let triangle A' be adjacent to A at e, and let s' be the third vertex of A'. AsT is locally Delaunay, s' ^ C(Z\), hence s ^ s'. Further, observe s e C{A'), and let e' be the edge of A' closest to s. The angle at s spanned by e' is larger than that spanned by e, which gives a contradiction.
D
An edge flip in a triangulation T of ^ is the exchange of the two diagonals in one of r ' s convex quadrilaterals; see Subsection 3.2. Call an edge flip good if — after the flip
226
F. Aurenhammer
and R. Klein
Fig. 15. Angle spanned by e cannot be maximum.
— the triangulation inside the quadrilateral is locally Delaunay. Repeated exchange of diagonals of the same quadrilateral always produces an alternating sequence of good and not good flips. Theorem 4.2 now can be used to prove that DT(5) optimizes various quality measures, by showing that each good flip increases quality. Any sequence of good flips then terminates at the global optimum, the Delaunay triangulation. One of the most prominent quality measures concerns the angles occurring in a triangulation. Recall that the number of edges (and thus of triangles) does not depend on the way of triangulating 5, and let t be the number of triangles for S. The equiangularity of a triangulation is defined to be the sorted list of angles ( a i , . . . , Qf3/) of its triangles. A triangulation is called equiangular if it possesses lexicographically largest equiangularity among aU possible triangulations for S. As a matter of fact, every good flip increases equiangularity. Figure 16 gives evidence for this fact. Lawson [176] called a triangulation locally equiangular if no flip can increase equiangularity. Locally equiangular thus is equivalent to locally Delaunay. Sibson [235] first proved Theorem 4.2, showing that locally equiangular triangulations are Delaunay and hence unique. Edelsbrunner [104] observed that DT(5) is equiangular (in the global sense) as the global property implies the local one. In case of cocircularities among the sites, DT(5') is not a full triangulation; see Section 2. Mount and Saalfeld [201] showed that DT(5') can be completed by retaining local equiangularity, in 0{n log/i) time. THEOREM 4.3. Let S be a finite set of sites in 2-space. A triangulation ofS is equiangular only if it is a completion o/DT(5).
The equiangular triangulation obviously maximizes the minimum angle of all triangles. This property is desirable for applications to terrain modelling or to the finite element method, as was first observed in Lawson [176] and McLain [192]. By Theorem 4.3, such
Voronoi diagrams
227
Fig. 16. Equiangularity and empty circle property.
triangulations can be computed in O(^logn) time by Delaunay triangulation algorithms, see Section 3. Only recently, it has been observed that several other parameters are optimized by DT(5'). All the properties listed below can be proved by observing that every good edge flip locally optimizes the respective parameter. Consider the circumcircle for each triangle in a triangulation, and measure coarseness by the largest such circle that arises. As a matter of fact, DTC^) minimizes coarseness among all possible triangulations for S\ see D'Azevedo and Simpson [79]. We may define coarseness also by taking smallest enclosing circles rather than circumcircles. (Note that the smallest enclosing circle differs from the circumcircle iff the triangle is obtuse.) D'Azevedo and Simpson proved that DTC^S) minimizes coarseness in this sense, and Rajan [217] showed that this property of Delaunay triangulations — unlike others — generalizes to higher dimensions. Similarly, fatness of a triangulation may be defined as the sum of inradii, that is, radii of largest circles inscribed to each triangle. Lambert [174] showed that DT(5') maximizes fatness, or equivalently, the mean inradius. Given an individual function value (height) h{p) for each site p e S, every triangulation 7 of 5 defines a triangular surface in 3-space. The roughness of such a surface may be measured by
Ei^i(«'+^') AeT
with |Z\| being the area of Z\, and a, ^ being the slopes of the corresponding triangle in 3-space. In other words, roughness is the integral of the squared gradients. As has been shown by Rippa [220], roughness is minimum for the surface obtained from DT(5), for any fixed heights h(p). For a simpler proof, see Powar [214]. See also Musin [205] for various functional on triangular surfaces which are optimized by DT(5).
228
F. Aurenhammer and R. Klein
Let us mention that, in addition, DT(5) provides a means for smoothing the corresponding triangular surface. As was shown in Sibson [236], each point x within the convex hull of S can be expressed as the weighted mass center of its Delaunay neighbors p in DT(5'U {x}). Weights Wp{x) can be computed from area properties of the corresponding Voronoi diagram, and as functions of jc, are continuously differentiable; see also Farin [121]. The corresponding interpolant to the spatial points (/?, h{p)) is given by
(p{x) =
^Wp{x)h{p). pes
This useful property of DT(5) is shown to generalizes to regular triangulations (duals of power diagrams for 5, cf. Subsection 4.3.2), and to higher-order Voronoi diagrams (Subsection 4.3.3) in Aurenhammer [25]. On the negative side, DT(5) in general fails to fulfill optimization criteria similar to those mentioned above, such as minimizing the maximum angle, or minimizing the longest edge. Edelsbrunner et al. [119,117] give near-quadratic time algorithms for computing triangulations optimal in that sense. DT(»S) is not even locally short, in the sense that it does not always include the shorter diagonal for each of its convex quadrilaterals. Kirkpatrick [162] proved that DT(5') may differ arbitrarily strongly from a minimumweight triangulation, which is defined to have minimum total edge length. Computing a minimum-weight triangulation is an important and interesting problem, whose complexity status is unknown; see Garey and Johnson [127]. Subsets of edges of DT(5) which always have to belong to a minimum-weight triangulation are exhibited in Subsection 5.2.3. On the other hand, the widely used greedy triangulation, which is obtained by inserting non-crossing edges in increasing length order, can be constructed from DT(5) in 0(n) time, by a recent result in Levcopoulos and Krznaric [185]. Finally, let us mention that the Delaunay triangulation avoids an undesirable property that might affect other triangulations. Fix a point v in the plane, called the viewpoint. For two triangles A and Z\Mn a given triangulation, write A < A' if A fully or partially hides A' as seen from v. This defines a partial relation, called the in-front/behind relation, on the triangles. De Floriani et al. [81] observed that this relation is acyclic if the triangulation is Delaunay. An example of a triangulation which is cyclic in spite of being minimum-weight can be found in Aichholzer et al. [10]. Edelsbrunner [105] generalized the result in [81] for regular triangulations in d dimensions, a class that includes Delaunay triangulations as a special case; see Subsection 4.3.2. An application stems from a popular algorithm in computer graphics that eliminates hidden objects by first partially ordering the objects according to the in-front/behind relation and then displaying them from back to front, thereby overpainting invisible parts. In particular, this algorithm will work well for a-shapes in 3-space, discussed in Subsection 5.2.2. For a systematic treatment of planar triangulations, the reader is referred to the theses by Tan [246] and Lambert [175], respectively.
Voronoi diagrams
229
4.3. Higher dimensions, power diagrams, and order-k diagrams. In order to meet practical needs, the concept of Voronoi diagram has been modified and generahzed in many ways, for example by changing the underlying space, the distance function used, or the shape of the sites. Subsections 4.3 to 4.6 give a systematic treatment of generalized Voronoi diagrams. The most obvious generalization is to J-space, for J > 3. Several nice properties of the Voronoi diagram are retained (e.g., the convexity of the regions) while others are lost (e.g., the linear size). Voronoi diagrams in J-space are closely related to geometric objects in {d + 1)-space. These relationships, and their structural and algorithmic implications, are discussed in the present subsection. 4.3.1. Voronoi diagrams and Delaunay tessellations in 3-space. Let us consider Voronoi diagrams in 3-space first. Let 5 be a set of n point sites in 3-space. The bisector of two sites p,q e S is the perpendicular plane through the midpoint of the line segment p ^ . The region VR(/?, S) of a site p e S is the intersection of halfspaces bounded by bisectors, and thus is a 3-dimensional convex polyhedron. The boundary of VR(/7, S) consists of facets (maximal subsets within the same bisector), of edges (maximal line segments in the boundary of facets), and of vertices (endpoints of edges). The regions, facets, edges, and vertices of V(S) define a cell complex in 3-space. This cell complex is face-to-face: if two regions have a non-empty intersection / , then / is a face (facet, edge, or vertex) of both regions. As an appropriate data structure for storing a 3-dimensional cell complex we mention the facet-edge structure in Dobkin and Laszlo [99]. The number of facets of VR(/?, S) is at most n — l,at most one for each site q e S\{p]. Hence, by the Eulerian polyhedron formula, the number of edges and vertices of VR(/?, S) is 0(n), too. This shows that the total number of components of the diagram V{S) in 3-space is O(n^). In fact, there are configurations S that force each pair of regions of V(S) to share a facet, thus achieving their maximum possible number of (2); see, e.g., Dewdney and Vranch [89]. This fact sometimes makes Voronoi diagrams in 3-space less useful compared to 2-space. On the other hand, Dwyer [103] showed that the expected size of V{S) in J-space is only 0(n), provided S is drawn uniformly at random in the unit ball. This result indicates that high-dimensional Voronoi diagrams will be small in many practical situations. In analogy to the 2-dimensional case, the Delaunay tessellation DT(5) in 3-space is defined as the geometric dual of V{S). It contains a tetrahedron for each vertex, a triangle for each edge, and an edge for each facet, of V{S), Equivalently, DT(5) may be defined using the empty sphere property, by including a tetrahedron spanned by S as Delaunay iff its circumsphere is empty of sites in S. The circumcenters of these empty spheres are just the vertices of V{S). DT(5) is a partition of the convex hull of S into tetrahedra, provided S is in general position, which will be assumed in the sequel. Note that the edges of DT(5) may form the complete graph on S. Among the various proposed methods for constructing V{S) in 3-space, incremental insertion of sites (cf. Subsection 3.2) is most intuitive and easy to implement. Basically, two different techniques for integrating a new site p into V{S) have been applied. The more obvious method first determines all facets of the region of p in the new diagram, V (5 U {/?}),
230
F. Aurenhammer and R. Klein
Fig. 17. Two-into-three tetrahedraflipforfivesites.
and then deletes the parts of V(S) interior to this region; see, e.g. Watson [256], Field [122], and Tanemura et al. [247]. Inagaki et al. [148] describe a robust implementation of this method. In the dual environment, this amounts to detecting and removing all tetrahedra of DT(5) whose circumspheres contain /?, and then filling the 'hole' with empty-sphere tetrahedra with p as apex, to obtain DT(S U {/?}). Joe [151], Rajan [217], and Edelsbrunner and Shah [115] follow a different and numerically more stable approach. Like in the planar case, after having added a site to the current Delaunay tessellation, certain flips changing the local tetrahedral structure are performed in order to achieve local Delaunay hood. The existence of such a sequence of flips is less trivial, however. Joe [150] demonstrated that no flipping sequence might exist that turns an arbitrary tetrahedral tessellation for S into DT(5). Let us focus on a single flip. Recall that in 2-space, there are exactly two ways of triangulating four sites in convex position, and a flip changes one into the other. In 3-space there are also two ways of tetrahedralizing five sites in convex position, and a flip per definition exchanges them. Note, however, that the flip will replace two tetrahedra by three or vice versa; see Figure 17. This indicates an important difference between triangulations in 2-space and tetrahedral tessellations in 3-space: The number of tetrahedra does depend on the way of tetrahedralizing S. It may vary from & (n) to & (n^). After having added a site p e S to the current Delaunay tessellation, the tetrahedron containing p is spHt into four tetrahedra with apex /?, in the obvious way. The algorithm first considers the four triangles opposite to p, that is, the bases of the tetrahedra with apex p. Generally, each triangle A of the tessellation is shared by two tetrahedra T and T^ which, in turn, are spanned by five sites. Three of them span A, and the remaining two sites q and q' belong to T and T\ respectively. A is called locally Delaunay if the circumsphere of T does not enclose q' (or, equivalently, if the circumsphere of T' does not enclose q). A third tetrahedron might be spanned by these five sites. A is cailQdflippableif the union of these two or three tetrahedra is convex.
Voronoi diagrams
231
For each triangle A opposite to p, the algorithm now performs the flip that involves the five sites corresponding to Z\, provided A is flippable and not locally Delaunay. Thereby, new triangles become opposite to p and possibly have to be flipped, too. This sequence of flips terminates in the Delaunay tessellation that includes p. The algorithm works locally and thus is elegant and relatively easy to understand. The runtime is O(n^) which is optimal in the worst case. Still, the incremental approach has its drawbacks. It might construct quadratically large intermediate tessellations, in spite of the possibly linear size of the final tessellation. This unpleasant phenomenon cannot even be overcome by inserting the sites in random order. In fact, proving the existence of an — in this sense — efficient insertion order is an open problem. Another difficulty stems from finding the starting tetrahedron that contains a newly inserted site. Search may be based on the construction history of the tessellation [115] or on bucketing techniques [152]. The algorithm can be found in much more detail in [115], including correctness proofs and a data structure for storing tetrahedral tessellations. Rajan [217] and Edelsbrunner and Shah [115] discuss the J-dimensional variant, and the latter paper generalizes the algorithm to so-called regular triangulations (Subsection 4.3.2). Joe [152] provides an efficient implementation in 3-space, and Cignoni et al. [70] propose a hybrid method that works in general ^-space and efficiently combines insertion, divide & conquer, and bucketing. 4.3.2. Power diagrams and convex hulls. Voronoi diagrams are intimately related to geometric objects in higher dimensions. This fact, along with one of its algorithmic applications, has already been addressed in Subsection 3.5. Here, we base the discussion on a generalization of Voronoi diagrams cdM^d power diagrams; the geometric correspondences to be described extend to that type in a natural manner. We refer to d dimensions in order to point out the general validity of the results. Consider a set S oin point sites in d'-space. Assume that each point in S has assigned an individual weight w{p). In some sense, w{p) measures the capability of p to influence its neighborhood. This is expressed by the power function pow(x, p) = {x- pf(x
- p)-
w(p)
of a point x in J-space with respect to a site p e S. A nice geometric interpretation is the following. For positive weights, a weighted site p can be viewed as a sphere with center p and radius ^w(p)', for a point x outside this sphere, pow(x, p) > 0, and ^/pow(x, p) expresses the distance of x to the touching point of a line tangent to the sphere and through x. The locus of equal power with respect to two weighted sites p and ^ is a hyperplane called the power hyperplane of p and q. Let h(p,q) denote the closed halfspace bounded by this hyperplane and containing the points of less power with respect to p. The power cell of p is given by
cell(/7)= P I h{p,q). qeS\[p}
232
F. Aurenhammer
and R. Klein
Fig. 18. Power diagram for circles in the plane.
In analogy to the classical Voronoi regions, the power cells define a partition of J-space into convex polyhedra, the so-called power diagram, PD{S), of S. See Figure 18 for a planar example. PD(S) coincides with the Voronoi diagram of S if all weights are the same. In contrast to Voronoi regions, power cells might be empty if general weights are used; see cell(/7) in Figure 18. PD(S) is a face-to-face cell complex in J-space that consists of polyhedral faces of various dimensions j , for 0 ^ 7 ^ d. In the non-degenerate case, exactly d -\- I edges, ( J ) facets (faces of dimension d — I), and d + 1 cells meet at each vertex of PD(S). For storing a J-dimensional cell complex, the cell-tuple structure in Brisson [48] seems appropriate. This data structure represents the incidence and ordering information in a cell complex in a simple uniform way. When each weighted site p e S is interpreted as the sphere cTp = (p, ^Jw{p)), we can make the following nice observation. The part of Op that contributes to the union of all these spheres, Une^ ^p^ is just the part of cr^ within cell(/7). This means that PD(S) defines
Voronoi diagrams
233
a partition of this union into simply-shaped and algorithmically tractable pieces. Several algorithms concerning the union (and also the intersection) of spheres are based on this partition; see Avis et al. [32], Aurenhammer [24], and Edelsbrunner [106]. Power diagrams (and thus Voronoi diagrams) are, in a strong sense, equivalent to the boundaries of convex polyhedra in one dimension higher. This is a fact with far-ranging implications and has been observed in Brown [49], Klee [165], Edelsbrunner and Seidel [113], Paschinger [213], and Aurenhammer [22]. The power function pow(x, p) can be expressed by the hyperplane 7t(p):Xd-^i = 2x^p - p^p + w(p) in (d + l)-space, in the sense that a point x lies in cell(p) of PD(S) iff, at x, 7t(p) is vertically above all hyperplanes 7t(q) for q e S\ {p}. Hence PD(S) corresponds, by vertical projection, to the upper envelope of these hyperplanes, which is the surface of a convex polyhedron, 17(5), in (d + 1)-space. Conversely, it is not difficult to see that every upper envelope of n non-vertical hyperplanes in (d + 1)-space corresponds to the power diagram of n appropriately weighted sites in d-spact. The following upper bound is a direct consequence of the upper bound theorem for convex polyhedra proved in McMuUen [193]. The bound is trivially sharp for power diagrams, but is achieved also for Voronoi diagrams, as was shown in Seidel [224]. 4.4. Let S be a set ofn point sites in d-space. Any power diagram for S, and in particular, the Voronoi diagram for S, realizes at most fj faces of dimension j , for
THEOREM
Y^ /i\/n
— d-^i — 2\
^^-y /d — i -^ l\ /n — d -\- i — 2\
where a = \^'] and b = [f J. The numbers fj are 0(n^^^),for 0 < j < J — 1. For algorithmic issues, power diagrams can be brought in connection to convex hulls in (d + 1)-space, by exploiting a duality (actually, polarity) between upper envelopes of hyperplanes (or intersections of upper halfspaces) and convex hulls of points. This connection is best described by generalizing the lifting map in Subsection 3.5 to weighted points. A site p e S with weight w(p) is transformed into the point Up) = (\p^ T p -^ w(p)J r ^) in (d -h 1)-space. There is a interelation cdillQd polarity between the transforms k and n. The point k(p) is called the pole of the hyperplane 7t(p) which, in turn, is called the polar hyperplane ofk(p). Polarity defines a one-to-one correspondence between arbitrary points and non-vertical hyperplanes in (d + 1)-space. It is well known that polarity preserves the relative position of points and hyperplanes. To show the connection to convex hulls, consider an arbitrary face / of the polyhedron n(S). Let / be the intersection of m = d — j-\-l hyperplanes 7r(/7i),..., 7t(pm), such
234
F. Aurenhammer and R. Klein
that / is of dimension j . Each point x e f lies on these but above all other hyperplanes n(q) defined by S. Hence the polar hyperplane of x has the points X(pi),..., X{pm) on it and the remaining points X{q) above it. This shows that the points X(/7i),..., X(pm) span a face of dimension d — j of the convex hull of the point set {Xip) \ p e S}. We conclude that each 7-dimensional face of /7(5), and thus of PD(S), is represented by a (J — 7)-dimensional face of this convex hull. This implies a duaUty between power diagrams in J-space and convex hulls in (d + l)-space. In the special case of an unweighted point set 5 in the plane, the parts of the convex hull that are visible from the plane project to the vertices, edges, and triangles of the Delaunay triangulation of S, and we obtain Theorem 3.5 of Section 3.5. A triangulation which can be obtained by projecting a convex hull is called a regular triangulation in Edelsbrunner and Shah [115]. Regular triangulations are just those being dual to planar power diagrams. Once the convex hull of {k(p) \ p e S] has been computed, the faces of PD(S), as well as their incidence and ordering relations, can be obtained in time proportional to the size of PD(S). 4.5. Let Cd-\-\ (n) be the time needed to compute a convex hull ofn points in (d +1)-space. A power diagram (and in particular, the Voronoi diagram) of a given n-point set in d-space can be computed in Cj+i (n) time. THEOREM
Worst-case optimal convex hull algorithms working in general dimensions have been designed by Clarkson and Shor [74], Seidel [229], and Chazelle [58], yielding Q+i(«) = 0(n logn -h n^2^). So Theorem 4.5 is asymptotically optimal in the worst case. Note, however, that power diagrams in J-space may as well have a fairly small size, 0(/i), which emphasizes the use of output-sensitive convex hull algorithms. The algorithm in Seidel [226] achieves C^+i (n) = 0(n^ + / log / ) , where / is the total number of faces of the convex hull constructed. The latest achievements are C4 = 0((n -h / ) log^ / ) in Chan et al. [56] and C5 = 0((n + / ) log'^ / ) in Amato and Ramos [15]. Space constraints preclude our discussion of power diagrams. Still, some remarks are in order to point out their central role within the context of Voronoi diagrams. For a detailed discussion and references, see Aurenhammer and Imai [30]. The regions of a Voronoi diagram are usually defined by a set of sites and a distance function. If the regions are polyhedral, then any such Voronoi diagram can be shown to be the power diagram of a suitable set of weighted point sites. For instance, this is the case for the furthest site Voronoi diagram, whose regions consist of all points having the same furthest site in the given set. A polyhedral cell complex in J-space is called simple if exactly d-\-l cells meet at each vertex. For example, the Voronoi diagram of a set of point sites in J-space is simple if no d -\-2 sites are co-spherical. If J ^ 3, any simple cell complex can be shown to be a power diagram. The class of power diagrams is closed under taking cross-sections with a hyperplane. That is, the diagram obtained from intersecting a power diagram in J-space with a hyperplane is again a power diagram, in (d — 1)-space. Moreover, the class of power diagrams is closed under the modifications to higher order defined in Subsection 4.3.3.
Voronoi diagrams
235
Several generalized Voronoi diagrams in J-space have an embedding in a power diagram in {d + 1)-space, in the sense that they can be obtained by intersecting a power diagram with certain simple geometric objects and then projecting the intersection. For example, the additively weighted Voronoi diagram (i.e., the closest-point Voronoi diagram for spheres, or the Johnson-Mehl model [153]), and the multiplicatively weighted Voronoi diagram (or the Apollonius model) have this property. In all situations mentioned above, a set of weighted sites for the corresponding power diagram can be computed easily. Thus general methods of handling Voronoi diagrams and cell complexes become available. For example, the Voronoi diagram for spheres in 3-space, and the multiplicatively weighted Voronoi diagram in the plane, can both be computed in 0{n^) time which is optimal. The latter diagram is investigated in detail in Aurenhammer and Edelsbrunner [28] and in Sakamoto and Takagi [223]. 4.3.3. Higher-order Voronoi diagrams and arrangements. Higher-order Voronoi diagrams are natural and useful generalizations of classical Voronoi diagrams. Given a set S of n point sites in J-space, and an integer k between 1 and n — 1, the order-k Voronoi diagram of S, Vk{S), partitions the space into regions such that each point within a fixed region has the same k closest sites. V\ (S) just is the classical Voronoi diagram of S. The regions of Vk (S) are convex polyhedra, as they arise as the intersection of halfspaces bounded by symmetry hyperplanes of the sites. A subset Mofk sites in S has a non-empty region in Vk(S) iff there is a sphere that encloses M but no site in 5 \ M. In fact, the region of M in Vk(S) just is the set of centers of all such spheres. Figure 19 illustrates a planar order-2 Voronoi diagram. Two differences to the classical Voronoi diagram are apparent. A region need not contain its defining sites, and the bisector of two sites may contribute more than one facet. In the extreme case of k = n — 1, the furthest-site Voronoi diagram of S is obtained. It contains, for each site p e S, the region of all points x for which p is the furthest site in S. Exact upper bounds on the size of furthest-site Voronoi diagrams in J-space are derived in Seidel [227]. The family of all higher-order Voronoi diagrams for a given set S of sites in J-space is closely related to an arrangement of hyperplanes in (d -\-1)-space; see Edelsbrunner and Seidel [113]. We describe this relationship in the more general setting of power diagrams, by defining an order-/: power diagram, PDk(S), for a set S of weighted point sites in an analogous way. See Aurenhammer [22,27] for more details. Recall from Subsection 4.3.2 that the power function with respect to a site p e S can be expressed by a hyperplane 7t(p) in (d + l)-space. The set of hyperplanes {nip) \ p e S} dissects (d + 1)-space into a polyhedral cell complex called an arrangement. Arrangement cells are convex, and can be classified according to their relative position with respect to the hyperplanes in [7z{p) \ p ^ S). A cell C is said to be of level k if exactly k hyperplanes are vertically above C. For example, the upper envelope of [n^p) \ p e S} bounds the only cell, 11 (S), of level 0. All cells of level 1 share some facet with n(S), so that their vertical projection gives the (order-1) power diagram PD(S). More generally, the cells of level k project to the regions of PDk(S), for each k between 1 and n — 1. To see this, let x be a point in some ^-level cell C. Then k hyper-
236
F. Aurenhammer and R. Klein
Fig. 19. Region of {p,q} in V2('^)-
planes 7r(/?i),..., Tr(pk) are above x, and n — k hyperplanes 7T(pk-\-\),..., 7t(pn) are below X. That means that, for the vertical projection x^ of x onto J-space, we have pow(x^ Pi) < pow(jc', pj) for 1 ^ / ^ /: and k -\- I ^ j ^ n. Hence x^ is a point in the region of {p\,..., pk) in PDk(S). Hyperplane arrangements are well-investigated objects, concerning their combinatorial as well as their algorithmic complexity; see Edelsbrunner et al. [112,114]. We obtain: THEOREM 4.6. Let S be a set ofn {weighted or unweighted) point sites in d-space. The family of all higher-order power diagrams {or Voronoi diagrams) for S realizes a total of 0 (^^+1) faces, and it can be computed in optimal G {n^^ ^) time.
Clarkson and Shor [74] proved that the number of arrangement cells with levels up to a given value oik is 0{n^^^'^^k^^^'^^). The collection of these cells can be constructed within this time for J > 4, with the algorithm in Mulmuley [203]. A modification by Agarwal et al. [2] achieves roughly 0{nk^) time also in 3-space. An output-sensitive construction algorithm is given in Mulmuley [204]. All these results apply to families of order-/: diagrams in one dimension lower.
Voronoi diagrams
237
Most practical applications ask for the computation of a single order-^ Voronoi diagram Vk(S) in the plane, for a given value of k. (Typically, k does not depend on \S\=n but is a small constant.) As for the classical Voronoi diagram V(S), edges are pieces of perpendicular bisectors of sites. Vertices are centers of circles that pass through three sites. However, these circles are no longer empty; they enclose either /: — 1 or ^ — 2 sites. Lee [181] showed that this diagram has 0(k(n — k)) regions, edges, and vertices. It is easy to see that the regions of ViiS) are in one-to-one correspondence with the edges of V(S). Hence ViiS) realizes at most 3^ — 6 regions in the plane. Considerable efforts have been made to compute the single planar order-^ Voronoi diagram efficiently. Different approaches have been taken in Lee [181], Chazelle and Edelsbrunner [59], Aurenhammer [26], Clarkson [71], and Agarwal et al. [2]. In the last two papers randomized runtimes of 0(^n^+^) and (roughly) 0(k(n — k)\ogn) are achieved, respectively, which is close to optimal. Below we describe a (roughly) 0(k^(n — k) \ogn) time randomized incremental algorithm by Aurenhammer and Schwarzkopf [31], that can be modified to handle arbitrary on-line sequences of site insertions, site deletions, and knearest neighbor queries. Though not being most time efficient, the algorithm profits by its simplicity and flexibility. The heart of the algorithm is a duality transform that relates the diagram Vk (S) to a certain convex hull in 3-space. This transform allows us to insert and also delete sites in a simple fashion by computing convex hulls. Let M c S be any subset of k sites. M is transformed into a point q(M) in 3-space, by taking the centroid of M and lifting it up vertically. More precisely.
Now consider the set Qk (5) of all points that can be obtained from S in this way. That is, e^(5) = { ^ ( M ) | M c 5 } . LEMMA
4.2. The part of the convex hull of Qk (S) that is visible from the plane is dual to
Vkisy The lemma can be proved by first mapping each ^-subset M of 5 into a non-vertical plane 7t{M) in 3-space,
PGM
peM
and then considering the upper envelope HkiS) of all these planes. It is not difficult to show that the facets of Flk (S) project vertically to the regions of Vk(S). The lemma follows from observing the polarity (cf. Subsection 4.3.2) between the planes 7t(M) and the points To construct Vk(S), we could just compute Qk(S), determine its convex hull, and then dualize its triangles, edges, and vertices that are visible from the plane. However, Qk (S)
238
F. Aurenhammer and R. Klein
contains a point for each /^-subset of 5, and thus has cardinaHty (^) = 0 (n^). Only 0(k(n — k)) points He on the convex hull, as Vk{S) has this many regions. We use randomized incremental insertion of sites in order to compute this convex hull efficiently. Let S = [p\,..., pn), and let C/ denote the visible part of the convex hull of Qk{{p\,...,/?/}), for ^ 4-1 ^ / ^n. Points of Qk (S) lying on the triangular surface C/ are called corners of C/. We start by determining Q + i . Qk({p\, "-, Pk+\}) contains k-\-\ points which can be calculated in time 0{k), so Oiklogk) time suffices. The generic step of the algorithm is the insertion of site /?/ into C/_ i, for / > /: + 2. (1) Identify all triangles of C/_i which are destroyed by pi and cut them out. Let B be the set of comers on the boundary of the hole. (2) Calculate the set P of all new comers created by pi. (3) Compute the convex hull of P U J5, and fill the hole with the visible part Ft of this convex hull. This gives C/. Each triangle A of C/_i is dual to a vertex of Vk{S). This vertex is the center of a circle that passes through three sites m S, A will be destroyed if this circle encloses pt. The destroyed triangles of C/_i form a connected surface I^i-\. Hence, if we know one of them in advance, iJ/_i can be identified in time proportional to the number ni of its triangles. Moreover, the set P of new comers can be calculated easily from the edges of Ui-i, as each such edge gives rise to a unique comer. LEMMA 4.3. Given C/_i we can construct Ci in time 0(/2/ log/i/), provided we know a triangle ofCi-\ that is destroyed by /?/.
When looking for a starting triangle of X',-!, we profit from another nice property of the duality transform: If the vertical projection A' of a triangle A of C/_i contains pt then A is destroyed by the insertion of pi. This leaves us with the problem of locating pt in the triangulation given by the planar projection of C/_ i. In fact, we get the desired point-location stmcture nearly for free. Adapting a technique used in Guibas et al. [135] for constmcting Delaunay triangulations, we do not remove the triangles of C/_ i that get destroyed by the insertion of pi, but mark them as old. When marked old, each triangle gets a pointer to the newly constmcted part Ft of C/. The next site then is located by scanning through the 'construction history' of C/. The structure for point location within each surface Fy, j ^ /, which is needed in addition, is a byproduct of the randomized incremental convex hull algorithm in [135], which we used for computing Fj. In summary, the order-/: Voronoi diagram for n sites in the plane can be computed in expected time 0{{k^{n — k))\ogn + nk\o^n), and optimal 0(k(n — k)) deterministic space, by an online randomized incremental algorithm. Full details and the following extensions are given in [31]. Deletion of a site can be done in the reverse order of insertion, again by computing a convex hull. The historybased point location structure used by the algorithm can be adapted to support ^-nearest neighbor queries (see Subsection 5.1.1). A dynamic data stmcture is obtained, allowing for insertions and deletions of sites in expected time 0(k^ \ogn -\- klog^ n), and A:-nearest neighbor queries in expected time 0(klog^n). This promises a satisfactory performance for small values of k.
Voronoi diagrams
239
4.4. Generalized sites It is commonly agreed that most geometric scenarios can be modeled with sufficient accuracy by polygonal objects. Two typical and prominent examples are the description of the workspace of a robot moving in the plane, and the geometric information contained in a geographical map. In both applications, robot motion planning and geographical information systems, the availability of proximity information for the scenario is crucial. This is among the reasons why considerable attention has been paid to the study of Voronoi diagrams for polygonal objects. Still, in some applications the scenario can be modeled more appropriately when curved objects, for instance, circular arcs are also allowed. Many Voronoi diagram algorithms working for line segments can be modified to work for curved objects as well. 4.4.1. Line segment Voronoi diagram and medial axis. Let G be a planar straight line graph on n points in the plane, that is, a set of non-crossing fine segments spanned by these points. For instance, G might be a tree, or a collection of disjoint line segments or polygons, or a complete triangulation of the points. The number of segments of G is maximum, 3n — 6, in the last case. We will discuss several types of diagrams for planar straight line graphs in the present and following subsections. The classical type is the {closestpoint) Voronoi diagram, V(G), of G. It consists of all points in the plane which have more than one closest segment in G. V{G) is known under different names in different areas, for example, as the line Voronoi diagram or skeleton of G, or as the medial axis when G is a simple polygon. Applications in such diverse areas as biology, geography, pattern recognition, computer graphics, and motion planning exist; see, e.g. Kirkpatrick [161] and Lee [180] for references. See Figure 20. V{G) is formed by straight line edges and parabolically curved edges, both shown as dashed lines. Straight edges are part of either the perpendicular bisector of two segment endpoints, or of the angular bisector of two segments. Curved edges consist of points equidistant from a segment endpoint and a segment's interior. There are two types of vertices, namely of type 2 having degree two, and of type 3 having degree three (provided G is in general position). Both are equidistant from a triple of objects (segment or segment endpoint), but for type-2 vertices the triple contains a segment along with one of its endpoints. Together with G's segments, the edges of V(G) partition the plane into regions. These can be refined by introducing certain normals through segment endpoints (shown dotted in Figure 20), in order to delineate/ace^ each of which is closest to a particular segment or segment endpoint. Two such normals start at each segment endpoint where G forms a reflex angle, and also at each terminal of G which is an endpoint belonging to only one segment in G. A normal ends either at a type-2 vertex of V(G) or extends to infinity. It is well known that the number of faces, edges and vertices of V{G) is linear in n, the number of segment endpoints for G. The number of vertices is shown to be at most An — 3 in Lee and Drysdale [182]. An exact bound, that also counts the 'infinite' vertices at unbounded edges and segment normals, is given below.
240
F. Aurenhammer
and R. Klein
..6
Fig. 20. Line segment Voronoi diagram.
LEMMA 4.4. Let G be a planar straight line graph on n points in the plane, and let G realize t terminals and r reflex angles. The number of {finite and infinite) vertices of V{G) is exactly 2n -\-1 -\- r — 2. PROOF. Suppose first that G consists of e disjoint segments (that do not touch at their endpoints). Then there are e regions, and each type-3 vertex belongs to three of them. By the Euler formula for planar graphs, there are exactly 2^ — 2 such vertices, if we also count those at infinity. To count the number of type-2 vertices, observe that each segment endpoint is a terminal and gives rise to two segment normals each of which, in turn, yields one (finite or infinite) vertex of type 2. Hence there are 4e such vertices, and 6^ — 2 vertices in total. Now let G be a general planar straight line graph with e segments. We simulate G by disjoint segments, by shortening each segment slightly such that the segment endpoints are in general position. Then we subtract from 6^ — 2 the number of vertices which have been generated by this simulation.
Voronoi diagrams
241
Consider an endpoint p that is incident to J ^ 2 segments of G. Obviously, p gives rise to d copies in the simulation. The Voronoi diagram of these copies has d — 2 finite vertices, which are new vertices of type 3. As the sum of the degrees J > 2 in G is 2e — /, we get 2e — t — 2(n — t) new vertices in this way. Each convex angle at p gives rise to two new normals emanating at the respective copies of /?, and thus to two (finite) type-2 vertices. A possible reflex angle at p gives rise to one (finite or infinite) type-3 vertex, on the perpendicular bisector of the corresponding copies of p. There are r reflex angles in G, and thus 2e — t — r convex angles. This gives D r + 2(2^ — t — r) new vertices in addition. The lemma follows by simple arithmetic. Surprisingly, the number of edges of G does not influence the bound in Lemma 4.4. The maximum number of vertices, ?>n — 2, is achieved, for example, if G is a set of disjoint segments {t = n and r = 0), or if G is a simple polygon P (t = 0 and r =n). In the latter case, the majority of appHcations concerns the part of V(P) interior to P. This part is commonly called the medial axis of P. The medial axis of an n-gon with r reflex interior angles has a tree-like structure and realizes exactly n -\- r — 2 vertices and at most 2(n + r) — 3 edges. Lee [180] first mentioned this bound, and also listed some applications of the medial axis. An interesting application to NC pocket machining is described in Held [139]. Several algorithms for computing V{G), for general or restricted planar straight line graphs G, have been proposed and tested for practical efficiency. V (G) can be computed in 0{n logn) time and 0{n) space by divide & conquer (Kirkpatrick [161], Lee [180], and Yap [261]), plane sweep (Fortune [125]), and randomized incremental insertion (Boissonnat et al. [43] and Klein et al. [170]). Burnikel et al. [51] give an overview of existing methods, and discuss implementation details of an algorithm in Sugihara et al. [243] that first inserts all segment endpoints, and then all the segments, of G in random order. An algorithm of comparable simplicity and practical efficiency (though with a worst-case running time of 0(n^)) is given in Gold et al. [130]. They first construct a Voronoi diagram for point sites by selecting one endpoint for each segment, and then maintain the diagram while expanding the endpoints, one by one, to their corresponding segments. During an expansion, the resulting topological updates in the diagram can be carried out efficiently. In fact, Voronoi diagrams for moving point sites are well-studied concepts; see, e.g. Guibas et al. [134] and Roos [221]. An efficient 0{n\o^n) work parallel algorithm for computing V(G) is given in Goodrich et al. [132]. This is improved to O(logn) parallel (randomized) time using 0(n) processors in Rajesekaran and Ramaswami [218]. (The latter result also implies an optimal parallel construction method for the classical Voronoi diagram.) If G is a connected graph then V{G) can be computed in randomized time 0{n log* n)\ see Devillers [88]. Recently, 0{n) time randomized, and deterministic, algorithms for the medial axis of a simple polygon have been designed by Klein and Lingas [169] and Chin et al. [68], settling open questions of long standing. The case of a convex polygon is considerably easier; see Subsection 4.4.3. Some of the algorithms above also work for curved objects. The plane-sweep algorithm in Fortune [125] elegantly handles arbitrary sets of circles (i.e., the additively weighted
242
F. Aurenhammer and R. Klein
Voronoi diagram, or Johnson-Mehl model) without modification from the point site case. Yap [261] allows sets of disjoint segments of arbitrary degree-two curves. A randomized incremental algorithm for general curved objects is given in Alt and Schwarzkopf [12]. They show that complicated curved objects can be partitioned into 'harmless' ones by introducing new points. All these algorithms achieve an optimal running time, 0{n \ogn). In dimensions more than two, the known results are sparse. The complexity of the Voronoi diagram for n line segments in J-space may be as large as Q{n^~^), as was observed by Aronov [17]. By the relationship of Voronoi diagrams to lower envelopes of hypersurfaces (see Subsection 4.6), the results in Sharir [234] imply an upper bound of roughly O(n^). No better upper bounds are known even for line segments in 3-space. The Voronoi diagram for n spheres in J-space has a size of only 0(nL^/^^+^), by its relationship to power diagrams proved in Aurenhammer and Imai [30]. A case of particular interest in several applications is the medial axis M(P) of a (generally non-convex) polyhedron P in 3-space. M(P) contains pieces of parabolic and hyperbolic surfaces and thus has a fairly complicated structure. A practical and numerically stable algorithm for computing M(P) is proposed in Milenkovic [198]. 4.4.2. Straight skeletons. In comparison to the Voronoi diagram for point sites, which is composed of straight edges, the occurrence of curved edges in the line segment Voronoi diagram V(G) is a disadvantage in the computer representation and construction, and sometimes also in the application, of V(G). There have been several attempts to linearize and simplify V(G), mainly for the sake of efficient point location and motion planning; see Canny and Donald [54], Kao and Mount [155], de Berg et al. [80], and McAlhster et al. [191]. The compact Voronoi diagram in [191] is particularly suited to these applications. It is defined for the case where G is a set of k disjoint convex polygons. Its size is only 0(k), rather than 0(n), and it can be computed in time 0(k logn); see Subsection 5.1.1 for more details. As a different alternative to V(G), we now describe the straight skeleton, S(G), of a planar straight line graph G. This structure is introduced, and discussed in much more detail, in Aichholzer and Aurenhammer [9]. 5(G) is composed of angular bisectors and thus does not contain curved edges. In general, its size is even less than that of V(G). Beside its use as a type of skeleton for G, 5(G) applies, for example, to the reconstruction of terrains from a given geographical map as will be sketched later. 5(G) is defined as the interference pattern of certain wavefronts propagated from the segments and segment endpoints of G. Let F be a connected component (called SL figure) of G. Imagine F as being surrounded by a belt of (infinitesimally small) width e. For example, a single segment s gives rise to a rectangle of length l^l -|- 26: and width 2s, and a simple polygon P gives rise to two homothetic copies of P with minimum distance 2s. In general, if F partitions the plane into c connected faces then F gives rise to c simple polygons called wavefronts for F. The wavefronts arising from all the figures of G are now propagated simultaneously, at the same speed, and in a self-parallel manner. Wavefront vertices move on angular bisectors of wavefront edges which, in turn, may increase or decrease in length during the propagation. This situation continues as long as wavefronts do not change combinatorially. Basically, there are two types of changes.
Voronoi diagrams
243
Fig. 21. Straight skeleton.
(1) Edge event: A wavefront edge collapses to length zero. (The wavefront may vanish due to three simultaneous edge events.) (2) Split event: A wavefront edge splits due to interference or self-interference. In the former case, two wavefronts merge into one, whereas a wavefront splits into two in the latter case. After either type of event, we are left with a new set of wavefronts which are propagated recursively. The edges of 5(G) are just the pieces of angular bisectors traced out by wavefront vertices. Each vertex of 5(G) corresponds to an edge event or to a split event. S{G) is a unique structure defining a polygonal partition of the plane; see Figure 21. During the propagation, each wavefront edge e sweeps across a certain area which we call ihtface of e. Each segment of G gives rise to two wavefront edges and thus to two faces, one on each side of the segment. Each terminal of G (endpoint of degree one) gives rise to one face. Faces can be shown to be monotone polygons and thus are simply connected. This gives a total of 2m + ^ = 0(^2) faces, if G realizes m edges and t terminals. There is also an exact bound on the number of vertices of S{G).
244
F. Aurenhammer and R. Klein
4.5. Let G be a planar straight line graph on n points, t of which are terminals. The number of (finite and infinite) vertices of S(G) is exactly 2n-\-t — 2.
LEMMA
From Lemma 4.4 in the previous subsection it is apparent that 5(G) has r vertices less than V{G) if G has r reflex angles. In particular, if G is a simple polygon with r reflex interior angles, then the part of S{G) interior to G is a tree with only n — 2 vertices, whereas the medial axis of G has n-\-r — 2 vertices. A wavefront model similar to that yielding S{G) is sometimes used to define the Voronoi diagram V{G) of G (cf. the expanding waves view in Section 2). There, the propagation speed of all points on the wavefront is the same, whereas, in the model for 5(G), the speed of each wavefront vertex is controlled by the angle between its incident wavefront edges. The sharper the angle, the faster is the movement of the vertex. This behaviour may make 5(G) completely different from the Voronoi diagram of G. It can be shown that, without prior knowledge of its structure, S(G) cannot be defined by means of distances from G. Moreover, S{G) does not fit into the framework of abstract Voronoi diagrams described in Subsection 4.6: The bisecting curve for two segments of G would be the interference pattern of the rectangular wavefronts they send out, but these curves do not fulfill condition (ii) in Definition 4.2. As a consequence, the well-developed machinery for constructing Voronoi diagrams (see Section 3) does not apply to S{G). An algorithm that simulates the wavefront propagation by maintaining a triangulation of the wavefront vertices is given in [9]. The method is simple and practically efficient but has a worst-case running time of 0(/i^ log«). S{G) has a three-dimensional interpretation, obtained by defining the height of a point X in the plane as the unique time when x is reached by a wavefront. In this way, S{G) lifts up to a polygonal surface EG, where points on G have height zero. In a geographical application, G may delineate rivers, lakes, and coasts, and Ec represents a corresponding terrain with fixed slope. EG has the nice property that every raindrop that hits a terrain facet / runs off to the segment or terminal of G defining / ; see Aichholzer et al. [8]. This may have applications in the study of rain water fall and its impact on the floodings caused by rivers in a given geographic area. The concept of 5(G) can be generalized by tuning the propagation speed or angle of the individual wavefront edges, in order to achieve prescribed facet slopes for EG, or individual elevations for the terrain points on G. The size of 5(G), and its construction algorithm, remain unaffected. When restricted to the interior of a simple polygon P, Ep is used in [8] as a canonical construction of a roof of given slope above P. For rectilinear (and axis-aligned) polygons P, the medial axis of P in the Loo-metric will do the job. 5(P) coincides with this structure for such polygons, and thus generalizes this roof construction technique to general shapes of P. Straight skeletons can be generalized to higher dimensions without much difficulties. They retain their piecewise-linear shape and thus, for example, offer a simpler alternative to the medial axis of a non-convex polyhedron in 3-space. 4.4.3. Convex polygons. Voronoi diagrams for a single convex polygon have a particularly simple structure. Tailor-made algorithms for their construction have been designed.
Voronoi diagrams
245
Let C be a convex n-gon in the plane. The medial axis M{C) of C is a tree whose edges are pieces of angular bisectors of C's sides. In fact, M{C) coincides with the part of the straight skeleton S{C) interior to C. M{C) realizes exactly n faces, n — 2 vertices, and 2/1 — 3 edges. There is a simple randomized incremental algorithm by Chew [62] that computes M{C) in 0{n) time. The algorithm first removes, in random order, the halfplanes whose intersection is C. Removing a halfplane means removing the corresponding side e, and extending the two sides adjacent to e so that they become adjacent in the new convex polygon. This can be done in constant time per side. The adjacency history of C is stored. That is, for each removed side e, one of its formerly adjacent sides is recorded. In a second stage, the sides are put back in reversed (still randomized) order, and the medial axis is maintained during these insertions. Let us focus on the insertion of the /-th side et. We have to integrate the face, /(e/), of Ci into the medial axis of the / — 1 sides that have been inserted before et. From the adjacency history, we already know a side e' of the current polygon that will be adjacent to et after its insertion. Hence we know that the angular bisector of et and e' will contribute an edge to /(e/). Having a starting edge available in 0(1) time, the face /(^/) now can be constructed in time proportional to its size. We construct /(^/) edge by edge, by simply tracing and deleting parts of the old medial axis interior to / ( ^ / ) . As the medial axis of an /-gon has 2/ — 3 edges, and each edge belongs to two faces, the expected number of edges of a randomly chosen face is less than 4. Thus fiei) can be constructed in constant expected time, which gives an 0{n) randomized algorithm for computing M{C). The same technique also applies to the Voronoi diagram for the vertices of a convex n-gon C, that is, to the Voronoi diagram of a set Sofn point sites in convex position. By Lemma 2.2, all regions in V{S) are unbounded, and the edges of V{S) form a tree. Hence V{S) has the same numbers of edges and (finite) vertices as the medial axis of C. For each p e S, its region VR(/?, S) shares an unbounded edge with the regions YR(p\ S) and YR(p^\ 5), where p' and p^^ are adjacent to p on the convex hull of S (which is the polygon C). An adjacency history can be computed in 0(n) time, by removing the sites in random order and maintaining their convex hull. For each site that is re-inserted, the expected number of edges is less than 4. So an 0(n) randomized construction algorithm is obtained. The diagrams V(S) and M(C) can also be computed in deterministic linear time; see Aggarwal et al. [4]. The details of this algorithm are much more involved, however. 4.4.4. Constrained Voronoi diagrams and Delaunay triangulations. In certain situations, unconstrained proximity among a set of sites is not enough information to meet practical needs. There might be reasons for not considering two sites as neighbors although they are geometrically close to each other. For example, two cities that are geographically close but separated by high mountains might be far from each other from the point of view of a truck driver. The concepts described below have been designed to model constrained proximity among a set of sites.
F. Aurenhammer
246
and R. Klein
Fig. 22. Bounded Voronoi diagram extended, and its dual.
Let 5 be a set of n point sites in the plane, and let L be a set of non-crossing line segments spanned by S. Note that \L\ ^3n — 6. The segments in L are viewed as obstacles: we define the bounded distance between two points x and y in the plane as
b{x,y) =
d{x,y)
\ixyr\L = 9i,
oo
otherwise,
where d stands for the Euclidean distance. In the resulting bounded Voronoi diagram y ( 5 , L), regions of sites that are close but not visible from each other are clipped by segments in L. Regions of sites being segment endpoints are nonconvex near the corresponding segment; see Figure 22. The dual of V{S, L) is not a full triangulation of S, even if the segments in L are included. However, V{S, L) can be modified to dualize into a triangulation which includes L and, under this restriction, is as much 'Delaunay' as possible. The modification is simple but nice. For each segment € G L, the regions clipped by I from the right are extended to the left of £, as if only the sites of these regions were present. The regions clipped by I from the left are extended similarly; see Figure 22. Of course, extended regions may overlap now, so they fail to define a partition of the plane. If we dualize now by connecting sites of regions that share an edge, a full triangulation that includes L is obtained: the constrained Delaunay triangulation Yyi{S, L). It is clear that the number of edges of DT(5', L) is at most 3n — 6, and that, in general, the number of edges of V(5, L) is even less. Hence both structures have a linear size.
Voronoi diagrams
247
The original definition of DT(5, L) in Lee and Lin [183] is based on a modification of the empty circle property: DTC^, L) contains L and, in addition, all edges between sites p,q e S that have b(p,q) < oo and that lie on a circle enclosing only sites r e S with at least one of b(r, p), b(r, q) = oo. Algorithms for computing V(S, L) and DTC^", L) have been proposed in Lee and Lin [183], Chew [63], Wang and Schubert [255], Wang [254], Seidel [228], and Kao and Mount [156]. The last two methods seem best suited to implementation. For an application of DT(»S, L) to quality mesh generation see Chew [65]. We sketch the 0(n logn) time plane sweep approach in [228]. If only V{S, L) is required then the plane sweep algorithm described in Subsection 3.4 can be applied without much modification. If DT(5, L) is desired then the extensions of V{S, L) as described above are computed in addition. To this end, an additional sweep is carried out for each segment i e L. The sweep starts from the line through i in both directions. It constructs, on the left side of this line, the (usual) Voronoi diagram of the sites whose regions in V(S, L) are clipped by I from the right, and vice versa. The special case where S and L are the sets of vertices, and sides, of a simple polygon has received special attention, mainly because of its applications to visibility problems in polygons. The bounded Voronoi diagram V{S, L) is constructable in 0(n) randomized time in this case; see Klein and Lingas [167]. If the Li-metric instead of the Euclidean metric is used to measure distances, the same authors [169] give a deterministic linear time algorithm. Both algorithms, as well as the linear time medial axis algorithms in [168] and in [68], first decompose the polygon into smaller parts called histograms. These are polygons whose vertices, when considered in cyclic order, appear in sorted order in some direction. An alternative concept that forces a set L of line segments spanned by S into DT(*S') is the conforming Delaunay triangulation. For each segment i E L that does not appear in DTC^), new sites on I are added such that i becomes expressible as the union of Delaunay edges in DT(5' U C), where C is the total set of added sites. For several site adding algorithms, \C\ depends on the size as well as on the geometry of L. See, e.g., the survey article by Bern and Eppstein [37] and references therein. Edelsbrunner and Tan [118] show that \C\= 0(k^n) is always sufficient, and construct a set of sites with this size in time
0{k^n-\-n^)Jork=\L\. A different, and more complicated, type of constrained Voronoi diagram is the geodesic Voronoi diagram. Here, the distance between a point site p and a point x in the plane is equal to the length of the shortest obstacle-avoiding path between p and x. The obstacles are usually modeled by a set of non-crossing line segments. If all segment endpoints are sites then the bounded Voronoi diagram is obtained. However, this is typically not the case. The fact that computing geodesic distances is not a constant-time operation complicates the construction of geodesic Voronoi diagrams. The only known subquadratic algorithm is by Mitchell [199]. An 0((^ -h k) log(n + k)) time algorithm for the geodesic Voronoi diagram of k sites inside a simple n-gon is given in Papadopoulou and Lee [212], improving over an earlier approach in Aronov [16].
248
F. Aurenhammer and R. Klein
4.5. Generalized spaces and distances So far we have mainly discussed Voronoi diagrams of sites in J-space, that are defined with respect to the Euchdean distance function. Now we want to generaUze both the space in which the sites are situated and the distance measure used; but we shall only discuss the case of point sites. The main questions are which of the structural properties the standard Voronoi diagram enjoys will be preserved, and will the remaining properties be strong enough to apply one of the algorithmic approaches for computing the Voronoi diagram introduced in Section 3. 4.5.1. Generalized spaces. Since the surface of earth is not flat, it seems very natural to ask about Voronoi diagrams of point sites on curved surfaces in 3-space. The distance between two points on the surface is the minimum Euclidean length of a curve that connects the points and runs entirely inside the surface. Such a curve will be called a shortest path. Brown [50] has addressed the Voronoi diagram of points on the surface of the twodimensional sphere. Here great circles play the role of lines in the Euchdean plane. In fact, the bisector of two points is a great circle, and the shortest paths are segments of great circles, too. (One can show that the only other metric space in which all bisector segments are shortest paths is the hyperbolic space; see Busemann [52].) For each pair of antipodal points on the sphere there is a continuum of shortest paths connecting them. But this does not affect the Voronoi diagram of n points; it can be computed in optimal 0(/i log n) time and linear space, by adaption of the algorithms mentioned in Section 3. Quite different is the situation on the surface of a cone. In order to determine the bisector of two points, p and q, we can cut the cone along a halfline emanating from the apex, and unfold it; in Figure 23 the halfline diametrically opposed to p has been chosen. Since curve length does not change in this process, each shortest path on the cone that does not cross the cut is transformed into a shortest path in the plane, i.e. into a line segment. In order to represent those shortest paths that cross the cut, we add to the unfolded cone two more copies, as shown in Figure 23(ii). Now the shortest path on the cone from some point x to site q corresponds to the shortest one of the line segments 'qx, q'x, and q^'x. This explains why the unfolded bisector B(p,q) consists of segments of the planar bisectors of p,q and
p,q\ In spite of this strong connection to the plane, the Voronoi diagram of points on a cone has structural properties surprisingly different from the planar Voronoi diagram. If the unfolded cone forms a wedge of angle less than 180° then the bisector of two points can be a closed curve. If three points p,q,r are placed, in this order, on a halfline emanating from the apex of such a cone, the bisector B(q, r) fully encircles B{p, q) which in turn encircles the apex. This causes the Voronoi region of q in V{{p,q, r}) to be not simply connected. Also, the closures of two Voronoi regions can have more than one Voronoi edge in common. Such a situation is shown in Figure 24, on the unfolded cone. The bisectors of the three points cross twice, at the Voronoi vertices v and w\ the latter happens to lie on the cut. (It is interesting to observe that none of these phenomena occurs on the sphere, although there, too, bisectors are closed curves and cross twice.) Despite these fundamental differences to the plane, the Voronoi diagram of n points on the surface of a cone can be constructed in optimal time and space, using a sweep circle that
Voronoi diagrams
249
Fig. 23. A cone sliced and unfolded, showing the bisector of p and q.
Fig. 24. The common border of the Voronoi regions of q and r consists of two Voronoi edges.
expands from the apex; see Dehne and Klein [83]. This approach works without unfolding the cone. Mazon and Recio [190] have independently pointed out the algebraic background of the unfolding procedure illustrated by Figure 23(i), and obtained the following generalization.
250
F. Aurenhammer and R. Klein
Let P denote the Euclidean plane or two-dimensional sphere, and let G be a discrete group of motions on P: a group of bijections that leave the distance between any pair of points of P invariant, such that for each point p e P there exists a constant c satisfying
Pl^gip)"^
\p-gip)\
^c
for all motions g eG. Examples in the plane are the group generated by a rotation of rational angle about some given point, or the group generated by two translations that move each point afixeddistance to the right and a fixed distance upwards, respectively. In the 19th century, mathematicians have completely classified all discrete groups. Two points p, p^ e P axQ equivalent if there exists a motion in G that takes pio p'', the equivalence class, [/?], of p is called the orbit of p. The quotient space, P/G, consists of all orbits. In order to geometrically represent P/G one starts with a connected subset of P that contains a representative out of every orbit; equivalent points must be on the boundary. Such a set is called a fundamental domain, if it is convex. The following lemma provides a nice way of obtaining a fundamental domain; a proof can be found in Ehrlich and Im Hof[120]. 4.6. Let p be a point of P that is left fixed only by the unit element ofG. Then its Voronoi region VR(/7, [p]) is a fundamental domain.
LEMMA
In Figure 23(ii), for example, the point set {p, p\ p") is the orbit of p under a clockwise rotation by 120°. The Voronoi region VR(/7, {/?, p\ p'^]) equals the master copy of the unfolded cone, as drawn by solid lines. Each interior point x is the only point of [x] contained in this region, only the points on the boundary (i.e. the cut) of the unfolded cone are mapped into each other by rotation. If we identify these two halflines we obtain the cone depicted in Figure 23(i), a model of the quotient space of the Euclidean plane over the cyclic group of order 3. In a similar way we would obtain a rectangle as fundamental domain of the group of two translations mentioned above, and identifying opposite edges would result in a torus. If we want to compute the Voronoi diagram of a set S of point sites on a surface associated with such a quotient space P/G,WQ can proceed as follows. Let So denote a set of representatives of 5 in a fundamental domain D c P. First, we compute the Voronoi diagram V([5o]), where [So] denotes the union of the orbits of the elements of 5o, an infinite but periodic set. Due to [190], ^([^o]) can be obtained by applying the motions in G to the Voronoi diagram of a finite set of points of 5o and translated copies of ^oTHEOREM
4.7. There exists a finite subset U of [So] such that V([So]) = [V(U) (1 D]
holds. If one removes from y([5o]) all Voronoi edges that separate points of the same orbit and intersects the resulting structure with the fundamental domain D, the desired diagram V(S) results, after identifying equivalent points. Although the set ^o can be constructed effectively, it seems hard to establish an upper bound for the efficiency of this step.
Voronoi diagrams
Fig. 25. By dc ip,q) = ,.
251
/. a convex distance function dc with unit circle C is defined.
To mention a few other spaces considered, Ehrlich and Im Hof [120] have studied, from a differential geometrist's point of view, structural properties of the Voronoi diagram in such Riemannian manifolds where any two points are connected by a unique shortest path. In order to compute the Voronoi diagram of n points on SL polyhedral surface in 3-space containing m vertices, one can make use of its discrete structure and apply the continuous Dijkstra technique usually employed for computing shortest paths. It allows the Voronoi diagram to be computed in O(A^^logiV) time and O(N^) space, where A^ = max(m, n); see Mitchell et al. [200]. 4.5.2. Convex distance functions. In numerous appHcations the Euclidean metric does not provide an appropriate way of measuring distance. In the following subsections we consider the Voronoi diagram of point sites under distance measures different from the Euclidean metric. We start with convex distance functions, a concept that generalizes the Euchdean distance but slightly. Whereas this generalization does not cause serious difficulties in the plane, surprising changes will occur as we move to 3-space. Let C denote a compact, convex set in the plane that contains the origin in its interior. Then a convex distance function can be defined in the following way. In order to measure the distance from a point p to some point q, the set C is translated by the vector p. The half line from p through q intersects the boundary of C at a unique point q'\ see Figure 25. Now one puts
d{p,q) dc(p,q) = ~ -. d{p,q') By definition, C equals the unit circle of d, that is, the set of all points q satisfying dc(0,q) ^ 1. The value of dc(p,q) does not change if both p and q are translated by the same vector. One can show that the triangle inequality dc(p,r) ^dc(p,q) -\-dc(q,r) is fulfilled, with equality holding for colinear points p,q,r.ln general, we have dc(p,q) = dc'iq, p), where C' denotes the reflected image of C about the origin. We can define the Voronoi diagram based on an arbitrary convex distance function by associating with each site p all points x of the plane such that dc(p,x)
252
F. Aurenhammer and R. Klein
J^ p"-
(iii)
B(p,q)
B(p,q)
Fig. 26. Unit circle and bisectors of the Manhattan distance L \.
Well-known is the family of Lp (or: Minkowski) norms, 1 < /? < oo, defined by the equation Lp{q,r)=^\qx-rx\P^\q2-r2\P
for q = (quq2),r
=
{n,r2).
Whereas L2 is the Euclidean distance, L\(q, r) = \qx — r\\ -\- \q2 — ^2! is called the Manhattan distance of q and r, because it equals the minimum length of a path from q to r that follows a rectangular grid. Its unit circle is shown in Figure 26(i). If index p tends to 00, the value of Lp(q, r) converges to Lodq, r) = max(|^i — r\\,\q2 — ^2!). The unit circle of Loo equals the aligned square [—1,1]^; therefore, L1 and Loo are related by a 45° rotation of the plane. In Figure 26(ii) the bisector of two points under the Manhattan distance L1 is shown. Another possible situation can be obtained by rotating picture (ii) by 90°. If p and q are the diagonal vertices of an aligned square then their bisector B(p, q) is no longer a curve: it consists of two quarterplanes connected by a line segment; see Figure 26(iii). In general, if the unit circle C is strictly convex, that is, if its boundary contains no line segment, this phenomenon cannot occur. For a strictly convex distance function dc, each bisector B{p, q) is a curve homeomorphic to a line. Also, the strict triangle inequality holds: We have dcip, r) < dc(p, q) -\-dc(q, r) unless p,q,r are colinear. Moreover, two circles with respect to dc intersect in at most two points, and two bisectors B(p,q), B(p,r) intersect in at most one point; proofs can be found in Icking et al. [146]. If C is not strictly convex then there are points p, q whose bisector contains twodimensional pieces. In this case one can choose from the set B(p,q) a curve that separates p and q, and use this curve as the bisector. In Figure 26(iii), for example, one could proceed as if p and q were slightly moved apart in >^-direction and use the curve drawn by solid lines as their bisector. In general, bisecting curves can be chosen as follows. We assume that the point sites in S are linearly ordered. If p
Voronoi diagrams
253
their sites: For each point x G £)(/?, ^), the hne segment ^ is also contained in D(p,q). This follows from a more general fact shown in Lemma 4.8 below. The star-shapedness of the Voronoi regions, together with the convexity of the circles, is a property strong enough for applying the divide & conquer algorithm; cf. Subsection 3.3. Hwang [145], Lee [179], and Lee and Wong [184] have studied the Voronoi diagram based on Lp norms; they provided algorithms that run within 0(n logn) many steps. Here and in the sequel, a step not only denotes a single operation of a Real Random Access Machine (cf. [215]) but also an elementary operation like computing the intersection of two bisector curves. Widmayer et al. [258] have described an optimal algorithm for computing the Voronoi diagram of a distance function based on a convex m-gon, C. This generalizes the Manhattan distance to an environment where motions are restricted to a finite set of orientations given by the rays from the origin through the vertices of C. Eventually, Chew and Drysdale [66] have shown how to construct, in 0(nlogn) many steps, the Voronoi diagram based on an arbitrary convex distance function in the plane, using divide & conquer. One crucial point is in the merge step. If we use a split line to subdivide the site set S into subsets L and R, the set B(L, R) of all Voronoi edges of V(S) that separate L-regions from 7?-regions need not be connected, but it must be acyclic. Each of its connected components is an unbounded chain, not a loop. Therefore, a starting edge of each component can be found at infinity, as in the Euclidean case. Skyum [237] has shown how to construct the dual of the Voronoi diagram based on a convex distance function using the sweep line approach, in 0(n logn) many steps. It is well known that each symmetric convex distance function dc is equivalent to the Euclidean distance J, in the sense that for suitable constants a and A, the inequalities a • dip, q) ^ dcip. q)^A'
d(p, q)
hold for all points p,q. In particular, a sequence of points pt converges to some limit point p under dc iff it does so under the Euclidean distance. One might wonder if these similarities cause the Voronoi diagrams of d and dc to have similar combinatorial structures. A counterexample is shown in Figure 27; the regions of p and q are adjacent under L2 but not under Li. Corbalan et al. [76] have provided systematic answers to the above question. Let dc, do denote two symmetric, strictly convex distance functions whose unit circles are smooth. If for each set S of at most 4 points in the plane, Vj^ (S) and Vj^ (S) have the same structure as embedded planar graphs, then D must be a scaled version of C. More generally, if for each set S of at most 4 points the Voronoi diagram Vdc (S) has the same combinatorial structure as VdoifiS)), for some bijection / of the plane, then / is linear and / ( C ) = D holds, up to scaling. Conversely, if / is a linear bijection of the plane then the Voronoi diagram of f(S) with respect to the convex set / ( C ) can be obtained by applying / to Vdc (*^)' fo^* ^^ch site set S. The image of the Euclidean circle under a linear bijection is an ellipse. The above result implies that convex distance functions based on ellipses are the only ones whose Voronoi diagrams can be obtained from the Euclidean Voronoi diagram of a transformed set of sites. The following theorem gives an even stronger reason why such a reduction is not possible for unit circles other than ellipses.
254
F. Aurenhammer
and R. Klein
P
Fig. 27. Four point sites whose Voronoi diagrams based on the Manhattan and the Euchdean distance have a different combinatorial structure.
4.8. Let C be a strictly convex, compact set, symmetric about the origin, which is not an ellipse. Then there exists a set of 9 points in the plane whose Voronoi diagram with respect to dc has a structure no Euclidean Voronoi diagram can achieve. THEOREM
In the proof given in [76] a Voronoi diagram based on dc is constructed whose dual is either of the topological shape shown in Figure 28(i), or of similar type. Let us assume that it can be reahzed by a Euclidean Delaunay tessellation; cf. Section 2. Since r lies outside the circumcircle of ^, ^, z we have fi -\-fi^< K; see Figure 28(ii). Similarly, 8 -\- 8^ < TT holds. Since p lies on the circumcircle of w,q,z we have a -\- a^ = TT, and y -\- y^ = n holds for the same reason. The primed angles at z add up to 27r. Therefore, we obtain
a-\-fi-+-y-\-8<2n. But this is impossible because the points different from z must be in convex position (the convex hull of a point set equals the boundary of the unbounded face of its Delaunay triangulation) so that each of the angles at p,r,t,v includes an angle of the quadrilateral drawn by dashed lines. These angles add up to 27r. The definitions of a convex distance function and of the L^-norms stated above can easily be extended to dimensions higher than 2. In the remainder of this subsection we study convex distance functions in 3-space. Such a distance function is based on a convex, compact set C in 3-space which contains the origin in its interior. We call such a unit sphere C good if it is, in addition, strictly convex, symmetric, and smooth.
Voronoi diagrams
255
P
Fig. 28. The graph shown in (i) is not a EucHdean Delaunay tessellation. In (ii) we have ^ -]- ^^ < n iff r lies outside the circle. Equality holds iff r lies on the circle.
Some of the pleasant properties of 2-dimensional convex distance functions have their counterparts in 3-space. For example, the bisector B(p, q) of two points is a surface homeomorphic to the plane, and two such bisector surfaces B(p, q), B(p, r) have an intersection homeomorphic to the line, or empty. In these aspects, convex distance functions in 3-space do not differ from the 3-dimensional Euclidean distance. But whereas a Euclidean sphere is uniquely determined by four points in space, this is no longer true for convex distance functions. In Icking et al. [146] the following result has been shown. THEOREM 4.9. For each n > 0 there exist a good convex set C and 4 points in 3-space such that there are 2n -\-1 homothetic copies of C containing these points in their boundaries. This number does not decrease as the 4 points are independently moved within small neighborhoods.
The center i; of a scaled and translated copy of C containing p, ^, r, ^ in its boundary is of the same dc distance to each of these points. Hence, u is a Voronoi vertex in the diagram Vdciip, q,r,s]). Therefore, Theorem 4.9 implies that there exists no upper bound to the number of vertices of the Voronoi diagram of 4 points in 3-space, that holds for arbitrary convex distance functions. If it is known that for a particular convex distance function dc no more than k homothetic copies of C can pass through any four points in general position, then the complexity of the Voronoi diagram of n points based on dc is in O(^n^), because at least 4 Voronoi regions meet at a Voronoi vertex. As an explicit function of k and n, nothing better than this trivial bound seems to be known, which is conjectured to be far off. For the Euclidean distance, for example, k=\ holds, and the true complexity is 6>(n^); see Subsection 4.3.1. Since the Lp norms are defined by algebraic equations of degree p, it is possible to say more about their Voronoi diagrams. From a general result by Sharir [234] on lower envelopes it follows that the complexity of the Voronoi diagram of n points in
256
F. Aurenhammer and R. Klein
Le [177] has obtained the following result on the number of L^ spheres that can pass through a set of given points. The proof uses results from the theory of additive complexity, see Benedetti and Risler [33]. This and the subsequent results require that the sites be in general position. THEOREM 4.10. There exists an upper bound to the number of Lp spheres in d-space that can pass through d -\-\ given points, which depends only on d but not on p.
More is known only for special cases. Recently, Boissonnat et al. [45] have shown the following. THEOREM 4.11. The Voronoi diagram of n points in 3-space based on the L\ norm is of complexity 0{n^). The Voronoi diagrams ofn points in d-space based on Loo or on a simplex as the unit sphere are both of complexity @(n^^^'^~^).
The unit spheres for the Loo and L\ norm are hypercubes and crosspolytopes (i.e. duals of hypercubes), respectively. In contrast to hypercubes, crosspolytopes have a large number of facets in high dimensions, which partially explains why tight bounds for L i -diagrams are only available for dimensions up to three. Whereas for the complexity of the Voronoi diagram of a set of lines in 3-space under the Euclidean distance only an 0(n^^^) upper bound is known (see [234]), Chew et al. [67] were able to provide a smaller bound for lines under a polyhedral convex distance function. 4.12. Let C denote a convex polyhedron of constant complexity in 3-space. Then the Voronoi diagram ofn lines based on dc is of complexity 0{n^a{n)\ogn). A lower bound is given by Q(n^a{n)).
THEOREM
Here a{n) denotes the extremely slowly growing inverse of the Ackermann function. 4.5.3. Nice metrics. Convex distance functions do not apply to environments where the distance between two points can change under translations. This happens in the presence of obstacles, or in cities whose streets do not form a regular grid. In order to model such environments in a realistic way we can use the concept of a metric. In this subsection we consider point sites in the plane, and Voronoi diagrams that are based on a metric, m. It associates with any two points, p and q, a non-negative real number m(p,q) which equals 0 iff p = ^. Moreover, m(p,q) = m(q, p), and the triangle inequality m(/?, r) ^m(p,q) -\-m(q, r) holds. General metrics are quite a powerful modeling tool. Suppose there is an air-lift between two points a, bin the plane. Then
{d{p.q). m(p, q) = min | d{p, a)-\- f -\- d(b, q), [d(p,b)-^f-^d(a,q) describes how fast one can travel from p to q; we assume that going by car takes time equal to the Euclidean distance, d, whereas the flight takes time f < d(a,b).liis easy to
257
Voronoi diagrams
\ a Dm( a,q)
^ -" if - " '^
1 \
. D,(q,a)
y\~^
B(a,q) Fig. 29. If there is an air line connecting a and /?, the Voronoi region of a with respect to q is disconnected.
verify that the function m is a metric in the plane (we could warp the plane so that a and b have Euclidean distance / in 3-space, and glue on a straight handle connecting them; the function m describes the lengths of shortest paths in the resulting space). Voronoi regions with respect to this metric m need not be connected. Suppose site q lies on the line segment aZ?, as shown in Figure 29. In order to construct the Voronoi diagram of the two sites a and q we use the expanding waves approach mentioned in Section 2, and let two Euclidean circles expand from a and q at the same speed. Their intersections form the Euclidean bisector B(a,q). As soon as the radius of these circles has reached / , the duration of the flight from ^ to Z?, a new circle starts growing from b. Subsequently, its radius is always by / smaller than the radius r of the other two circles. The intersections of the circles expanding from q and from b form a hyperbola, / / ; it is the locus of all points X satisfying d(q, x) — f ~ d(b, x). Such Voronoi diagrams of points with additive weights are also known as the JohnsonMehl model or Voronoi diagrams of circles', compare the end of Subsection 4.4.1. They have been studied, e.g. by Lee and Drysdale [182] and Sharir [233]. Fortune [125] has shown how to construct them in time 0(n logn) using the sweep line approach. Clearly, the region of a with respect to metric m, Dyn{a, q), consists of the two parts shaded in Figure 29; they are not connected. In order to exclude such phenomena we restrict ourselves to a subclass of metrics introduced in Klein and Wood [171]. DEFINITION 4.1. A metric m in the plane is called nice if it enjoys the following properties. (i) A sequence pi converges to p under m iff this holds under the Euclidean distance; the case p = oo is included, (ii) For any two points p, r there exists a point q different from p and r such that m(p, r) = m(p, q) + m(q, r) holds, (iii) For any two points p,q is the common boundary of Dm (q, p) and Bm(p,q) ^ curve homeomorphic to the line. It is called a bisector curve, Jm(p,q)(iv) The intersection of two bisector curves Jmip,^), Jm {p, O consists of only finitely many connected components.
258
F. Aurenhammer and R. Klein
Each symmetric, strictly convex distance function is a nice metric. Conversely, if a nice metric m is invariant under translations, and if m(p, r) = m(p,q) -\-m(q, r) holds for any three consecutive points p,q,r on a. line, then m is a convex distance function. Whereas in Definition 4.1 properties (iii) and (iv) are of technical nature, (i) and (ii) have an important structural consequence, due to results by Menger [197]. LEMMA 4.7. Let m be a nice metric in the plane. Then for any two points p,r there exists a path n connecting them, such that for each point q on n the equality m(p,r) = m(p, q) -\-m(q,r) holds.
Such paths are called m-straight; they are true generalizations of straight lines in the Euclidean distance: If one defines the m-length of a path TT in a way analogous to the Euclidean path length (i.e., by adding up the m-distances between consecutive points on Tt, making the resolution arbitrarily fine) then the m-straight paths from ptor are precisely the paths of minimum m-length, which equals m{p, r). Voronoi diagrams based on nice metrics have a nice structural property. LEMMA 4.8. Let m be a nice metric. Then each Voronoi region VKmip^S) is connected: Each m'Straight path ix from p to some point x G VRm(/?, S) is fully contained in YRfnXp^ S). That is, the Voronoi regions under a nice metric m are m-star-shaped as seen from their sites. PROOF. Suppose that some point y onn does not belong to VR^ (/?, S). Then there must be a site q e S different from p such that m(^, y) ^m(p,y) holds, and by the straightness of 7t we obtain
m(p,x) — m(p, y) -^m(y,x) ^ m{q,y)-\-m{y,x)^m{q,x), a contradiction to the fact that x lies in the Voronoi region of p. This shows that n is in fact contained in VR^ (p, S). Lemma 4.7 ensures that for each x in the region of p at least one such m-straight path from pio x exists. Consequently, VR^ (/7, S) is a connected set. D
Clearly, in the example of the air-lift metric, property (ii) of Definition 4.1 is violated: All points q satisfying m(a, b) = m(a, q) -\- m(q, b) that are not equal to one of the two airports, a and b, are in mid air! Examples of nice metrics are composite metrics that result from assigning different convex distance functions to the regions of a planar subdivision, or the Karlsruhe (or: Moscow) metric; see Klein [166]. Here a center point, 0, is fixed and only such paths are allowed that consist of pieces of circles around 0 and of pieces of radii from 0. The Karlsruhe metric m(p,q) denotes the minimum Euclidean length of an allowed path from pio q. It depends on the angle between p and q if the shortest connecting path runs through the center, or around it; see Figure 30(i). The bisector of two points consists of up to eight
Voronoi diagrams
259
(i) Fig. 30. The shortest path in the Karlsruhe metric runs through the center iff the angle between p and q exceeds 114, 59...°. In (ii) a Voronoi diagram in the Karlsruhe metric is shown.
. 0
Fig. 31. The unique shortest path between x and y does not stay within the region of ^.
segments that are pieces of straight hnes or hyperbolae if written in polar coordinates. In (ii), the Voronoi diagram of 8 point sites under the Karlsruhe metric is shown. Whereas the star-shapedness of the Voronoi regions is preserved, the example of the Karlsruhe metric m shows that the convexity of the Euclidean Voronoi regions has no counterpart in nice metrics. In Figure 31 the Voronoi diagram of 4 point sites on the same radius is shown. There exists exactly one m-straight path connecting the points x, y of the Voronoi region of q, but this path is not contained in the region of q. That the Voronoi regions under a nice metric m are m-star-shaped is a property strong enough for computing the Voronoi diagram efficiently. The following has been shown by Dehne and Klein [84]. THEOREM 4.13. The Voronoi diagram ofn point sites under a nice metric in the plane can be constructed within 0(n logn) many steps, using the sweep line approach.
260
F. Aurenhammer and R. Klein
It is also possible to apply the randomized incremental construction method introduced in Subsection 3.2, or the divide & conquer technique. With the latter a new difficulty arises: If we use a line to subdivide S into subsets L and R then the set Bm (L, R) of Voronoi edges separating L-regions from /?-regions can contain cycles that would not be detected during the merge phase. In [166] two criteria have been introduced for BmiL, R) to be acyclic. For example, if the m-circles are simply-connected we can use, as a divider of 5, any curve / homeomorphic to the line whose intersection with all m-circles is connected (possibly empty). This generalizes a result by Chew and Drysdale [66] on convex distance functions, where each straight line possesses this property.
4.6. General Voronoi diagrams One might wonder if there exist some intrinsic properties most Voronoi diagrams have in common, and if these properties are a foundation strong enough for a unifying approach to the definition and to the construction of Voronoi diagrams. Edelsbrunner and Seidel [113] have introduced a very general approach. It does not explicitly use the concepts of sites and distance functions. Rather, the site set, 5, is a mere set of indices {p,q,...). A fixed domain, X, is given, and for each p e S a. real-valued function fp'.X^^R. The graph Hp =
{{x^fp{x))\xeX}
of fp can be considered a hypersurface in the space X x R. Now the Voronoi diagram of (S^ {fp \ P ^ S}) is defined to be the projection onto X of the lower envelope
L = I (x,mmfp(x)j pes
\x e x\
of the arrangement {Hp\ p e S} of hypersurfaces. At the end of Subsection 3.5 we have already studied an example of this approach: If S denotes a set of points in D = R^, and if the functions fp are defined by fp(x) = d(p, x), we obtain an arrangement of cones whose lower envelope projects onto the Euclidean Voronoi diagram of 5. More importantly. Subsection 4.3.2 shows that linear functions fp exist whose envelope projects onto the Voronoi (or power) diagram of S. Moreover, the order-A: Voronoi (or power) regions of S are the projections of certain cells of the corresponding arrangement, see Subsection 4.3.3. To establish this connection between Voronoi diagrams and arrangements of hypersurfaces in a space one dimension higher is one of the great advantages of this approach. As one implication, an upper bound of 0(n^'^^) on the combinatorial complexity of general classes of Voronoi diagrams follows from a result in Sharir [234] on envelopes of hypersurfaces; see Subsections 4.4.1 and 4.5.2. A different approach to planar Voronoi diagrams has been suggested in Klein [166]. Again, there are no physical sites but an index set, 5. Instead of distance functions or their graphs in 3-space, bisecting curves are used as primary objects.
Voronoi diagrams
261
Let us assume that for any two different indices p, ^ in 5, a bisecting curve J(p,q) = J(q, p) homeomorphic to the Hne is given, which cuts the plane into two unbounded, open domains, D(p, q) and D{q, p). In the subsequent pictures, the index p denotes the "halfplane" D(p,q). As in Definition 2.1, the Voronoi region VR(p, S) is defined as the intersection of the open domains D(p, q), where q e S\ {p}. The Voronoi diagram V(S) of {J(p, q) \ p,q e S and p y^q} is defined as the union of all boundaries at least two Voronoi regions have in common. V(S) is called the abstract Voronoi diagram with respect to the bisecting curves
J(p,q). DEFINITION 4.2. The system J = {J(p,q) \ p,q e S and p ^ q\) is called admissible iff for each subset S' of S of size at least 3 the following conditions are fulfiled. (i) The Voronoi regions VR(/7, S') are pathwise connected. (ii) Each point of the plane lies in a Voronoi region VR(/?, S'), or on the Voronoi diagram y ( 5 0 . (iii) The intersection of two curves J{p,q) and J(p,r) consists of only finitely many components. From these conditions important structural properties of "concrete" Voronoi diagrams can be derived, as the following example shows. For simplicity, we assume that two bisecting curves cross transversally wherever they intersect. LEMMA 4.9. Let J be an admissible system, and suppose that J{p,q) and J(p,r) cross at the point X. Then J(q,r) also passes through x, in the way shown in Figure 32. PROOF. In a suitable neighborhood of x the curves J(p,q) and J(p,r) run as depicted in Figure 32(i). Let S^ = {p,q,r}. Precisely the shaded area belongs to VR(/>, 50, by definition of the abstract Voronoi diagram. Point y is not contained in VR(r, 50 because it lies in D(p,r). By moving y a little we can make sure that it is not on the curve J(q,r). Now condition (ii) of Definition 4.2 implies y e VR(^, 50- Similarly, z must belong to the Voronoi region of r. But if, in each neighborhood of x, points of VR(^, 50 C D(q,r) and of VR(r, 50 C D(r,q) can be found in the wedges containing y and z, respectively, then J{q,r) must run through x in the way shown in picture (ii) of Figure 32. D
The finite abstract Voronoi diagram (i.e. the result of encircling it with a closed curve F, as proposed in Section 2) is a 2-connected planar graph with at most n + 1 faces, all of whose vertices have degree at least 3 (exactly 3 for the vertices on F). Each such graph can be obtained as an abstract Voronoi diagram. One can show that Definition 4.2 holds for all subsets 5^ of 5 if it is satisfied for each subset 5^ of size 3. The conditions are met, for example, by the bisectors of power diagrams (Subsection 4.3.2), of sites with respect to a nice metric in the plane (Subsection 4.5.3), of sites with additive weights, and of non-intersecting line segments or convex polygons (Subsection 4.4.1); see Meiser [196]. Not covered by this approach are e.g. non-convex polygonal sites, or point sites with multiplicative weights (the ApoUonius model); in either case the bisector curves can be closed, rather than homeomorphic to the line.
262
F. Aurenhammer
J(p,r)
and R. Klein
J(p,r:
(ii) Fig. 32. Where two related bisecting curves J(p, q), J(p, r) meet, the third one, J(q, r), also passes through, like in a Euclidean Voronoi diagram.
Another example has been provided by Abellanas et al. [1]. They studied disjoint compact, convex sites in the plane and their Hausdorjf Voronoi diagram based on a convex distance function dc, which puts each point x in the Voronoi region of the first site that is fully contained in a circle C expanding from x\ cf. Subsection 4.5.2. It can be shown that the resulting regions are pathwise connected. If, in addition, all convex sets have semialgebraic boundaries then also property (iii) in Definition 4.2 is fulfiled. Of the four algorithmic methods mentioned in Section 3 for computing the EucHdean Voronoi diagram, two have been adapted to abstract Voronoi diagrams. How to generalize the divide & conquer approach has been shown in [166]. As in the case of nice metrics (Subsection 4.5.3) one has to assume that the index set, 5, can recursively be split into subsets L and R such that B{L, /?), the set of edges separating L- from /^-regions, contains no cycle, in order to find the starting edges of B{L, R) at infinity. Once a starting edge has been found, B{L, R) can be traced efficiently, because abstract Voronoi regions are pathwise connected; no stronger properties, like star-shapedness or convexity, are needed. This is illustrated in Figure 33, which should be compared to Figure 10. It has been shown in Mehlhom et al. [195] and in Klein et al. [170] that one can, without further assumptions, apply the randomized incremental construction technique to abstract Voronoi diagrams. 4.14. The abstract Voronoi diagram of an admissible system J = {J(p,q) \ p,q e S and p ^q]), where \S\ =n, can be constructed within expected 0(n logn) many steps and expected space 0(n), by randomized incremental construction. THEOREM
Voronoi diagrams
263
Fig. 33. If J(p,q2) ran like this, the disconnected shaded areas would both belong to VR(/7, {p, Pi,q2}), a contradiction! Therefore, the first point, vi2^ on the boundary of VR(/>, L) can still be found by scanning the boundary from vi on counterclockwise.
This algorithm provides a universal tool that can be used for computing all types of concrete Voronoi diagrams whose bisector curves have the properties required in Definition 4.2. To adapt the algorithm to a special type one has to implement only certain elementary operations on bisector curves. For example, it is sufficient to have a subroutine that accepts 5 elements of S as input, and returns the graph structure of their abstract Voronoi diagram. All numerical computations can be kept to this subroutine. It seems difficult to apply the sweep approach to abstract Voronoi diagrams. One reason is the absence of sites whose detection by the sweep line could indicate that a new region must be started. Abstract Voronoi diagrams can also be thought of as lower envelopes, in the sense mentioned at the beginning of this subsection. Namely, for each point x not situated on a bisecting curve, the relation
p <^q^x
eD(p,q)
defines a total ordering on S. If we construct a set of surfaces Hp, p e S, in 3-space such that Hp is below Hq iff p <x q holds, then the projection of their lower envelope equals the abstract Voronoi diagram. The concept of abstract Voronoi diagrams has been generalized to 3-space in Le [178], under structural restrictions; for example, any two bisecting surfaces J(p,q), J(p,r) must have an intersection homeomorphic to a line, or empty. These assumptions apply, e.g. to convex distance functions whose unit sphere is an ellipsoid; compare Subsection 4.5.2. Rasch [219] has introduced abstract inverse (or. furthest-site, order n — 1) Voronoi diagrams in the plane; cf. Subsection 4.3.3. Here the region of p is defined as the intersection
264
F. Aurenhammer
and R. Klein
©
Fig. 34. An inverse abstract Voronoi diagram. The region of p is not connected.
of all open domains D{q, /?), where q eS\{p}An contradistinction to the Euclidean case, the resulting regions are in general not pathwise connected; a situation that could also arise in the concrete furthest site diagram of line segments is shown in Figure 34. If the admissible system J is such that none of the regular abstract Voronoi regions is empty then the inverse diagram with respect to J ' is a tree of complexity 0{n). It can be constructed within expected 0(/i \ogn) many steps and expected linear storage. 5. Geometric applications This section is devoted to some of the numerous applications of the Voronoi diagram V{S) and its dual, the Delaunay triangulation DT(5), in solving geometric problems. Some applications have been mentioned previously in this chapter, mostly along with generalizations of the classical type. Applications in relation to optimization properties of the Delaunay triangulation can be found in Subsection 4.2. Whereas distance is implicitly involved in almost all applications of the Voronoi diagram, we start with some examples of "pure" distance problems. These distance problems are, apart from their direct use in practical applications that will be mentioned occasionally, frequently arising subroutines in more involved geometric algorithms. 5.1. Distance problems Unless otherwise stated, the following problems address point sites in the plane under the standard Euclidean distance. However, most solutions can be generalized, at least to convex distance functions; see Subsection 4.5.2. 5.1.1. Post office. Our first example is the post office (or: nearest neighbor) problem mentioned in the seminal paper [232] by Shamos and Hoey. Given a set of n sites (post offices) in the plane, determine, for an arbitrary query point x, the post office closest to x. The Voronoi diagram of the post offices represents the locus approach to the post office problem: it partitions the plane into regions whose points x have identical nearest post offices.
Voronoi diagrams
265
It remains to quickly determine the region that contains the query point, x. This point location problem has received a lot of interest in computational geometry; it is the topic of a separate chapter of this book the reader is referred to. Here we sketch an elementary solution first mentioned in Dobkin and Lipton [100], called the slab method. Through each Voronoi vertex a horizontal line is drawn. These extra lines partition the Voronoi regions into triangles and trapezoids. By construction, no horizontal "slab" between two consecutive lines contains a Voronoi vertex in its interior, so that all crossing Voronoi edges are ordered within the slab. To locate a query point, x = (xi,X2), we use one binary search for X2 among the slabs, and another one for x\ among the edge segments of the slab found. This gives us O(logn) query time, at quadratic storage cost. There are more efficient techniques like, e.g. Kirkpatrick [163] or Edelsbrunner et al. [109] that need only linear storage and can be derived in linear time from the Voronoi diagram. Together with any of the optimal Voronoi diagram algorithms presented in Section 3 this yields the following solution to the post office problem. THEOREM 5.1. Given a set S ofn point sites in the plane, one can, within 0(n logn) time and linear storage, construct a data structure that supports nearest neighbor queries: for an arbitrary query point x, its nearest neighbor in S can be found in time O(logn).
Storing the history of the Voronoi diagram during incremental insertion (cf. Subsection 3.2) even obviates the need of processing the diagram for point location. Guibas et al. [135] showed that nearest neighbor queries are supported in (expected) time O(log^n) by the resulting structure. Analogously, the order-^ Voronoi diagram introduced in Subsection 4.3.3 can be used for finding the k nearest neighbors in 5* of a query point x. Aurenhammer and Schwarzkopf [31] generalized the practical approach in [135], obtaining a dynamic structure with expected query time 0(^ log^ n), that allows both insertion and deletion of sites, at a space requirement of 0{k{n — k))\ see also Subsection 4.3.3. A sophisticated technique of compacting order-^ Voronoi diagrams in Aggarwal et al. [5] achieves optimal query time 0{k-\- logn) and space 0(n), but with high constants. The locus approach also works for more general sites and distance measures. Let us assume that the site set, 5, consists of k non-intersecting convex polygons with n edges in total. The bisector of two sites is composed of 0(n) many straight or parabolic segments; if we also count the endpoints of such segments as vertices (of degree 2), then the Voronoi diagram of the k convex polygons is of complexity G{n), as Lemma 4.4 shows. It could be constructed in time 0(n logn) by first computing the line segment Voronoi diagram of the polygon edges (see Subsection 4.4.1), and then joining those regions that belong to parts of the same convex polygon. A more efficient structure for solving the post office problem of k disjoint convex polygons has been introduced in McAllister et al. [191]. Using only 0{k) many line segments, it partitions the plane into regions bounded by at most 6 edges each. With each region one or two sites are associated: for any point x in the region, one of them is the nearest neighbor of X in S. This planar straight line graph can be defined quite easily. Its vertices are the O(^) original Voronoi vertices defined by the k polygonal sites, plus, for each Voronoi vertex v of
266
F. Aurenhammer
and R. Klein
Fig. 35. A linear subdivision of size 0{k) for solving the post office problem of convex polygons.
3 sites, the closest points to v on their respective boundaries. Straight Une edges run from each vertex v to its closest points and, around the boundary of each site, between the points closest to its Voronoi vertices; see Figure 35. For each site C in extreme position, a halfline to infinity is added all of whose points have the same closest point on the boundary of C. THEOREM 5.2. Given a set Sofk disjoint convex polygonal sites in the plane with a total ofn edges, one can, within 0{k\ogn) time and 0(k) storage, construct a data structure that allows nearest neighbor queries to be answered within time 0(log«).
The essential task is in constructing the 0{k) many original Voronoi vertices of the k polygons spending only 0(\ogn) time on each vertex. This can be achieved by a clever adaption of the sweep line approach described in Subsection 3.4, and by means of a subroutine that computes, in O(logn) time, the Voronoi vertex of three convex polygons. The subroutine uses the tentative prune and search technique described in Kirkpatrick and Snoeyink[160]. The same approach works for convex distance functions; see Subsection 4.5.2.
Voronoi diagrams
267
Fig. 36. The nearest neighbor graph of 11 points.
5.1,2. Nearest neighbors and the closest pair Another distance problem the Voronoi diagram directly solves is the all nearest neighbors problem: For each point site in the set S, a nearest neighbor in S is required. An example is shown in Figure 36; arrows are pointing from each site towards its nearest neighbor. For sites in general position the resulting nearest neighbor graph is a forest of trees each of whose vertices is of outdegree 1 and indegree at most 6. The solution offered by the Voronoi diagram is based on the following fact. LEMMA 5.1. Let S = PU Q be a disjoint decomposition of the point set S, and let po ^ P and qo € Q be such that d(po,qo)=
min
peP,qeQ
d{p,q).
Then the Voronoi regions of pQ and qo are edge-adjacent in V(S). Otherwise, the line segment poqo contains a point z that belongs to the closure of some Voronoi region VR(r, S), where r ^ po,qo. Let us assume that r belongs to Q; the case r € P is symmetric. From z G VR(r, S) follows d(z,r) ^d(z,qo), hence
PROOF.
dipo,r)
<
d(po,z)-^d{z,r)
^ d(po, z) +
268
F. Aurenhammer and R. Klein
But since po lies on the bisector B{qo, r), each point z in the interior of ^opo is strictly closer to q^ than to r, a contradiction. D If we apply Lemma 5.1 to the subsets {p} and 5 \ {/?} it follows that the nearest neighbor of p is sitting in a neighboring Voronoi region (i.e. it is a Delaunay neighbor). Therefore, it is sufficient to inspect, for each p e S, all neighbors of p in the Voronoi diagram, and select the closest of them. This way, each edge of V{S) will be accessed twice. Since their total number is linear, due to Lemma 2.3, we can solve the all nearest neighbor problem by constructing the Voronoi diagram. THEOREM 5.3. Given a set Sofn points in the plane, 0{n\ogn) time and linear space are sufficient for determining, for each p e S, a nearest neighbor in S.
Once for each p its nearest neighbor in S is known, we can easily determine a pair of points whose distance is a minimum. COROLLARY 5.1. The closest pair among n points in the plane can be determined within 0(n logn) time and linear space.
Hinrichs et al. [142] have shown that it suffices to maintain certain parts of the Voronoi diagram by a sweep algorithm (cf. Subsection 3.4), in order to detect the closest pair. Whereas finding the closest pair seems an easier task than constructing the Voronoi diagram, it still has an Q (n log n) lower bound, by reduction from the ^-closeness problem; compare Theorem 3.1. In dimension d, constructing the Voronoi diagram is no longer the method of choice for finding the closest pair, due to its exponentially increasing size; see Subsection 4.3.2. Already in 1976, Bentley and Shamos [35] provided an 0(n logn) algorithm for arbitrary fixed dimensions. Golin et al. [131] showed that randomization plus use of the floor function (which is forbidden in the algebraic decision tree model of computation) allows the closest pair of n points in J-space to be found within expected 0(n) time, for any fixed d. The problem of finding the closest pair of n points can be generalized to reporting the k closest pairs in S, for some number k ^ (2). A brute-force solution would sort all interpoint distances in time 0(n^\ogn) and then report the k smallest. Time 0(n^) is sufficient if one uses the selection method for finding, in time 0(m), the k-th smallest of m objects. Smid [239] has shown how to enumerate the 0(n'^^^) smallest distances in time 0(n logn) and linear space. A simple yet elegant solution using the Delaunay triangulation DT(5) of S has been provided by Dickerson et al. [90]. Their approach is as follows. The closest pair in S corresponds to the shortest edge of the Delaunay triangulation DT(5'), as Lemma 5.1 shows. But the k-th closest pair (/?, q) need not define an edge of DT(5), not even for small values of k. However, there exists a path of Delaunay edges connecting p and q that are of length smaller than d(p,q) each. This can be used for proving the following elegant algorithm correct. It maintains a queue Q of pairs of points by distance. Initially, Q contains all Delaunay neighbors. In the i-th step, the closest pair (p,q) in Q is removed and reported /-th closest. Then, for
Voronoi diagrams
269
all Delaunay edges Irp satisfying d(o, p) ^ d(p,q), the pair (o,q) is inserted into Q; similarly, each pair (p,r) is added to Q where ^ is a Delaunay edge of length at most
d(p,q). The performance of this algorithm is stated in the next theorem. THEOREM 5.4. The k closest pairs of a set S ofn points can be computed in time 0((n + k) logn) and space 0(n + k).
A similar approach even works efficiently in higher dimensions. Dickerson and Eppstein [91] showed that several interdistance enumeration problems for a point set S in J-space can be solved by means of DT(5). The prohibitive size of DT(5) in J-space is reduced by augmenting S to have a linear-size, bounded degree Delaunay triangulation, with the method of Bern et al. [38]. 5.1,3. Largest empty and smallest enclosing circle. Suppose someone wants to build a new residence within a given area, as far away as possible from each of n sources of disturbance. If the area is modeled by a convex polygon A over m vertices, and the disturbing sites by a point set 5, we are looking for the largest circle with center in A that does not contain a point of S. The task of determining this circle has been named the largest empty circle problem. Shamos and Hoey [232] observed that this circle must have its center at a Voronoi vertex of y (5), or at the intersection of a Voronoi edge with the boundary of A, or at a vertex of P. For, if a circle C with center x e A contains no /? G 5, not even on its boundary, we blow it up until it does. If its boundary now contains three sites then x is a Voronoi vertex; see Lemma 2.1. If there are two sites on its boundary, x lies on a Voronoi edge. In this case we move x along their bisector away from the two sites until the expanding circle hits a third site, or x hits the boundary of A. If, in the beginning, only one point site p e S lies on the boundary of C then we expand C, while keeping its boundary in contact with p, until X reaches a vertex of A, or one of the before-mentioned events occurs. This observation leads to the following result. THEOREM 5.5. The largest circle not containing a point of S, whose center lies inside a convex polygon A, can be found within 0(m + nlogn) time and linear space. Here, m denotes the number of vertices of A, and n is the size of S. PROOF. We spend 0{n logn) time on constructing the Voronoi diagram V{S). The largest empty circles centered at the Voronoi vertices can be determined in constant time each. We can trace the convex boundary of A through the Voronoi diagram, in order to detect its intersections with the Voronoi edges, in time 0(w + m). Simultaneously we can find, for each vertex f of A, its nearest neighbor in S, by determining the Voronoi region containing v. D
The smallest enclosing circle problem asks for the circle of minimum radius that encloses a given set 5 of n points in the plane. AppUcations are the placement of a least powerful transmitter station that can reach a given set of locations, or the placement of a plant that minimizes the maximum distance to the customers.
270
F. Aurenhammer and R. Klein
As was observed in Bhattacharya and Toussaint [40], there are two cases. Either the smallest enclosing circle contains three points of S on its boundary, or it runs through two antipodal points whose distance equals the diameter of S. From the convex hull of S its diameter, together with a pair of points realizing it, can be derived in Unear time; then it can be checked if the smallest circle through these points contains S. Otherwise, the center i; of the smallest enclosing circle C must be a vertex of the furthest site (or: order n — I) Voronoi diagram introduced in Subsection 4.3.3. Namely, the three sites on the boundary of C are furthest from i;. This yields an 0(n\ogn) algorithm for computing the smallest enclosing circle. The linear programming technique by Megiddo [194] is more efficient: For fixed dimension d it allows the smallest sphere enclosing n points in J-space to be constructed in time 0(n). A more practical way of achieving linear (randomized) time is the elegant minidisk algorithm by Welzl [257]; here the constant in O has been shown to be a subexponential function of d by Matousek et al. [187]. 5.2. Subgraphs of Delaunay triangulations The Delaunay triangulation DT(5) of a set S oin point sites contains, as subgraphs, various structures with diverse applications. One example, the nearest-neighbor graph of 5, has already been discussed in Subsection 5.1.2. Efficient algorithms for computing these structures follow from the fact that DT(5) has size 0(n), and can be constructed in O(nlogn) time, in the plane. This positive effect is partially lost in higher dimensions as DT(5) may be the complete graph on S. 5.2.1. Minimum spanning trees and cycles. A minimum spanning tree, MST(5'), of 5 is a planar straight fine graph on S which is connected and has minimum total edge length. This structure plays an important role, for instance, in transportation problems, pattern recognition, and clustering. Shamos and Hoey [232] first observed the connection to Delaunay triangulations. LEMMA 5.2. MST(5) is a subgraph o/DT(5). PROOF. Let e be an edge of MST(^). Removal of e splits MST(5) into two subtrees, and S into two subsets S\ and 52. Clearly, e is the shortest edge connecting S\ and 82A shorter edge, if existent, would lead to a spanning tree shorter than MST(5). It follows that the circle C with diameter e is empty of sites in S. A site enclosed by C would have to belong to either ^i or ^2, leading to a connection between ^i and ^2 shorter than e. By Definition 2.2 in Section 2, C proves e Delaunay. D
We thus can select the n — 1 edges of MST(5) from the 0{n) edges of DT(5), rather than from all the (2) edges spanned by 5, by standard application of Kruskal's [172] or Prim's [216] greedy algorithms. Edges are considered in increasing length order, and an edge is classified as a tree edge if it does not violate acyclicity. An 0{n \ogn) time algorithm for computing MST(5) is obtained.
Voronoi diagrams
271
Lemma 5.2 generalizes to metrics different from the Euclidean (for example Li, see Hwang [145]), and to higher dimensions. When staying in the plane, equally efficient algorithms result. In higher dimensions, however, DTC^) may not be of much use for the construction of MST(5), because of the possibly quadratic size. Subquadratic worst-case time algorithms for computing MST(5) in J-space exist (Yao [259] and Agarwal et al. [3]), but it still remains open whether an 0{n\ogn) time algorithm can be developed, at least for 3-space. A traveling salesman tour, TST(-S'), for a set S of point sites in the plane is a minimum length cycle passing through all the sites. It is known that TST(5) is no subgraph of DTC-S), in general. Dillencourt [92] showed that DT(5) need not even contain any cycle through all sites in S (a Hamiltonian cycle), and that finding Hamiltonian cycles in Delaunay triangulations is NP-complete [94]. He also gives a partial explanation for the fact that DTC^S) is Hamiltonian in most cases [93]. Another optimization graph which is known to be not part of DT(5) is a minimum length matching for 5; see Akl [11]. However, DT(5) is guaranteed to contain some perfect matching, see Dillencourt [93], a property not shared by all triangulations of S. Finding a traveling salesman tour has been shown to be NP-complete in Papadimitriou [211], but a factor-2 length approximation of TST(5) can be found easily using MST(5). Let A{S) be a cycle through S that results from traversing MSTC^S) in preorder. Rosenkrantz et al. [222] observed the following. Let |X| be the total length of a set X of edges. LEMMA 5.3. |A(5)| < 2-|TST(5)|. PROOF. When traversing each edge of MST(5) twice, a tour longer than A (S) is obtained. Hence \A(S)\ < 2 • |MST(5)|. To see IMSTC^)! < |TST(5)|, note that removing an edge from TST(5) leaves a path which is some, but not necessarily the minimum, spanning tree of 5. D
A(S) can be constructed in linear time from MSTCS). A more sophisticated construction of a spanning cycle by means of MSTC^S) is given in Christofides [69]. An approximation factor of 1.5 is achieved, at an expense of roughly 0(n^^) in construction time. Another NP-complete problem, which has a factor-2 approximation by means of MST(5), is the construction of optimal radii graphs; see Huang [143]. Let 7? be a realvalued vector that associates each site p e S with an individual radius r^ > 0. The corresponding radii graph, GR(S), contains an edge between two sites p,q e S iff d(p,q) ^ mm{rp, r^j. The optimization problem now asks for a radii vector /?* such that GR* (S) is connected and |7^*| = J2peS ^p ^^ minimum. Radii graphs have applications in the design of radio networks. Consider the vector R that takes, as a radius for each site /? G 5, the length of the longest edge of MST(5) incident to p. Then GR(S) is connected; it contains MST(5) as a subgraph. LEMMA 5.4. \R\ < 2-1/^*1.
272
F. Aurenhammer
and R. Klein
Fig. 37. a-shapes for different values of a.
PROOF. Let e = (p,q)bc some edge of MST(5). Then e appears at most twice as a radius in R, namely if e is the longest edge incident to p and the longest edge incident to q. This gives |/?| <2-|MST(5)|. To verify |MST(5)| ^ |/?*|, let us consider GR*(S). AS being connected, this graph contains some spanning tree, T. We may orient the edges of T such that each site p e S (except one) has a unique edge ep of T pointing at it. As Cp is also an edge of GR* (5), we have r * ^ ep\. Hence \R*\ > | r | ^ |MST(5)|. D
Lemma 5.4 remains true for more general measures \R\ = YlpGS f(^p^'^^^ ^^y increasing function / . This is because MSTC^*) also minimizes J^eeT /(kD^ f^^ ^^ spanning trees T of S. The case / ( r ) = r^ is relevant to the application mentioned above, as the received power of a radio terminal decreases with the square of the distance. 5.2.2. a-shapes. Extracting the shape of a given set S of point sites in the plane is a problem that arises, for example, in data visualization and pattern recognition. To some extent, the shape of S is reflected by the convex hull of S. The edges of the convex hull are part of the Delaunay triangulation DTC^). The concept of a-shape, introduced in Edelsbrunner et al. [110] (see also [104]), generalizes the convex hull of S for the sake of better shape approximation, while still remaining a subgraph of DT(5). For Of > 0, the a-shape a(S) of 5 is defined to contain an edge between sites p,q e S iff there is some disc of radius a that avoids S and has p and q on its boundary. By Definition 2.2 in Section 2, a(S) is always part of DT(5) and thus has only 0(n) edges. For a being sufficiently large, the convex hull of S is obtained. The smaller is the value of a, the finer is the level of resolution of the shape of S; see Figure 37. a(S) contains no edges if a is smaller than the distance of the closest pair in S.
Voronoi diagrams
273
The definition ofa(S) can be extended to negative values of a, by requiring that the discs of radius —a fully contain S. In this case, approximations of the shape of S more crude than the convex hull are obtained, and the edges ofa(S) appear in the dual triangulation of the furthest-site Voronoi diagram of 5; see Subsection 4.3.3. It follows that all the edges of the whole family of of-shapes for 5, for —oo < a < oo, are contained in two triangulations of size 0(n). For each triangulation edge e, an interval of activity can be specified, containing all values of a such that a(S) contains e. These activity intervals can be computed in 0(n logn) time, and allow us to extract a(S) for an input value a mO(n) time. Another nice feature of a-shapes is their flexibility. The notion of a-shape, along with its relationship to Delaunay triangulations, nicely generalizes to higher dimensions, a-shapes in 3-space are of particular interest, and implementations have been used in several areas of science and engineering; see Edelsbrunner and Mucke [111]. Also, the concept of a-shape can be generalized to represent different levels of detail at different parts of space; see Edelsbrunner [107]. This is achieved by weighting the sites in the given set S individually. The corresponding weighted a-shapes are subgraphs of the regular triangulation for the weighted set S which, in turn, is the dual of the power diagram for this set; see Subsection 4.3.2. The combinatorial and algorithmic properties of weighted of-shapes are similar to that of their unweighted counterparts. A different approach for reconstructing shapes in 3-space by means of Delaunay triangulations is pursued in Boissonnat and Geiger [44]. They exploit additional information on the sites available in certain applications, namely that S is contained in k parallel planes (corresponding to cross sections of the object to be reconstructed). The Delaunay edges connecting sites in neighbored planes can be computed in an output-sensitive manner; see Boissonnat et al. [42]. The edges describing the final shape are selected according to several criteria. Geiger [128] reports that satisfactory shapes are produced even for complicated medical images. 5.2.3. fi-skeletons. Another family of graphs, defined by empty discs and thus consisting of subgraphs of DT(5), is the family of ^-skeletons of a set S of point sites. ^skeletons have been introduced in Kirkpatrick and Radke [164] as a class of empty neighborhood graphs, and have recently received increased attention because of their relation to minimum-weight triangulations. Actually, in [164] both a circle-based and a lune-based version of ^S-skeletons are proposed. Here we will consider only the former, as defined below. In contrast to of-shapes, the radii of the empty discs defining a /3-skeleton are not fixed but depend on the interpoint distances in S. Let p,q e S. For yS ^ 1, the edge (p,q) is included in the yS-skeleton P(S) iff the two discs of diameter ^ - d{p,q) that pass through both p and q are empty of sites in S. See Figure 38. Note that P(S) is a subgraph of ^'(S) if fi > fi\FoT fi = 1, the Gabriel graph of S is obtained. Whereas P(S) may be disconnected for any yS > 1, the Gabriel graph is always connected as it contains the minimum spanning tree of 5 as a subgraph; cf. the proof of Lemma 5.2. It is easy to see that the Gabriel graph just consists of those edges of DT(5) that cross their dual Voronoi edges. This observation yields an 0(n logn) algorithm for its construction. In fact, general yS-skeletons can be constructed from DT(5) in linear time;
274
F. Aurenhammer and R. Klein
Fig. 38. /0-skeleton for ^ = 1.2
see Jaromczyk et al. [149] and Lingas [186]. Gabriel graphs have proved useful in the processing of geographical data; see Gabriel and Sokal [126] and Matula and Sokal [188]. Recently it has been realized that, for ^ large enough, p{S) is contained in the minimumweight triangulation, MWT(5), of S (a triangulation having minimum total edge length). The original bound p ^ ^/2 in Keil [158] has been improved in Cheng and Xu [61] to P > 1.1768, which is close to the value 2/V5 for which a counterexample is known. Apart from the edges of the convex hull of 5, only the shortest edge in S has been known to be part of MWT(5) before. One of the heuristics for the intriguing problem of constructing MWT(5) first computes ^ (S), for the smallest admissible value of p. The obtained k connected components of fi (S) then can be completed length-optimally to a triangulation, using dynamic programming, in 0(n^+^) time; see Cheng et al. [60]. Thus, if P(S) is connected or has only a constant number of components, MWT(5) can be constructed in polynomial time. Unfortunately, k tends to be linear in n. A slight modification of the empty neighborhood of an edge in S gives rise to the class of relative neighborhood graphs for S. Applications in pattern recognition are reported in Toussaint [249]. These graphs are also constructable in 0(/i \ogn) time by exploiting their containment in DTC^); see Supowit [244] and Kirkpatrick and Radke [164]. 5.2.4. Shortest paths. Let 5 be a set of n point sites in the plane. A (connected) planar straight fine graph G on 5 is said to have dilation t if, for any p,q e S, the length of the shortest path in G between p and q is at most t d(p,q). In this case, G is also called a t-spanner (of the complete Euclidean graph) for S. Sparse ^-spanners that have only 0(n) edges are of special interest in the field of robotics.
Voronoi diagrams
275
The minimum spanning tree MST(5'), though being optimally sparse, may have dilation 0{n). In contrast, DT(^) is sparse but 'sufficiently connected' to exhibit constant dilation, independently from the size n of S. Consequently, good spanners for S can be constructed in 0{n \ogn) time. A dilation of / ^ 5 for DT(5) is proved in Dobkin et al. [98], a result which has been strengthened to f ^ 2.5 in Keil and Gutwin [159]. An easy lower bound is t ^ 7r/2. Surprisingly, better upper bounds can be achieved by taking the Delaunay dual of generalized Voronoi diagrams. The convex distance function (Subsection 4.5.2) whose unit circle is an equilateral triangle leads to a triangulation with t = 2. This was shown in Chew [64], along with the following result concerning the constrained Delaunay triangulation (Subsection 4.4) for the Li-metric: There is always a path between two given sites, whose length is at most \/To times the geodesic distance with respect to the constraining line segments. This yields an 0{n logn) time algorithm for computing constant approximations of optimal paths in the presence of polygonal obstacles. Alternative triangulations of S are known to exhibit good spanner properties. Examples are the greedy triangulation and the minimum-weight triangulation; see Das and Joseph [78]. However, only for DT(5') are there algorithms available that are worst-case efficient and easy to implement. In higher dimensions, DT(5') may loose its sparseness and thus is of minor interest for computing spanners. Different techniques have been used with success; see, e.g. Vaidya [251] and Chandra et al. [57].
5.3. Geometric clustering Clustering a set of data means finding subsets (called clusters) whose in-class members are similar, and whose cross-class members are dissimilar, according to a predefined similarity measure. Data clustering is important in diverse areas of science, and various techniques have been developed; see, e.g. Hartigan [137]. In many situations, similarity of objects has a geometric interpretation in terms of distances between points in J-space. The role of Voronoi diagrams in the context of clustering is manifold. For certain applications, the relevant cluster structure among the objects is well reflected, in a direct manner, by the structure of the Voronoi diagram of the corresponding point sites; see, e.g. Ahuja [7]. For instance, dense subsets of sites give rise to Voronoi regions of small area (or volume). Regions of sites in a homogeneous cluster will have similar shape. For clusters having a direction-sensitive density, the regions will exhibit an extreme width in the corresponding direction. Perhaps more important is the fact that numerous types of optimal clusterings are induced by Voronoi diagrams, and/or can be computed by first computing a Voronoi diagram, for a certain set of sites. This set need not coincide with the set of points to be clustered. A general distinction is between off-line and on-line clustering methods. The former methods assume the availability of the whole data set before starting, whereas the latter cluster the data upon arrival, according to an on-line classification rule. Though Voronoi diagrams play a role in on-line clustering, see, e.g. Hertz et al. [140], we restrict attention to off-line methods below.
276
F. Aurenhammer and R. Klein
5.3.1. Partitional clusterings. Let P be a set of n points in J-space. A A:-clustering of P is a partition of P into k subsets (clusters) C i , . . . , Q . The dissimilarity of a single cluster C is measured by an appropriate intra-cluster criterion /x(C), which may be variance, diameter, radius, etc. The dissimilarity of the whole clustering, in turn, is expressed as a (usually monotone) function / of />6(Ci),..., /X(CA:), called the inter-cluster criterion. Common examples for / are the maximum or the sum. C i , . . . , Q is called optimal if f(lji(Ci),..., fjiiCk)) is minimal for all possible /:-clusterings of P. If k is part of the input, the problem of finding an optimal /:-clustering is NP-complete in general, even in the plane; see Capoyleas et al. [55] for references. Forfixedk, polynomialtime algorithms are known for various criteria. This is due to the fact that optimal clusters are separable in a certain sense, and in several cases are induced by the regions of (generalized) Voronoi diagrams. This approach was first systematically used in [55]. A common intra-cluster criterion is variance.
f^^^'> = jk E
1^1 .wee
dip.qf.
Variance can be rewritten as J^peC ^^P^ ^i^))^^ with s(C) being the centroid (mass center) of C. Note that s(C) is the point x in J-space that minimizes the squared distance 5^^^^(/7,jc)^toC. Hence, if the inter-cluster criterion / is sum, the clustering problem is equivalent to the k-centroidproblem: Given a set P of points to be clustered, find a set S ofk sites (cluster centroids) that minimizes ^p^p d(p, S)^, where d(p, S) is the distance from p to the closest site in S. This implies that the optimal /:-clustering C*,..., Q has the following nice property; see Boros and Hammer [47]. For 1 ^ / < /:, C* is contained in the region of ^(C*) in the Voronoi diagram of S = {^(C*),..., s(C^)}. The candidates for an optimal /^-clustering of P thus are the possible partitions of P induced by a Voronoi diagram of k point sites. The number of such partitions is n^^^^^ in J-space; see Inaba et al. [147]. This implies a polynomial-time algorithm for computing an optimal ^-clustering for fixed k, which proceeds by enumerating all candidate solutions and comparing their dissimilarities. The problem becomes considerably easier when a set S of k 'cluster centers' is fixed in advance. A clustering minimizing the sum of the squared distances of the clusters to their centers is easily found by constructing the Voronoi diagram of S. Of more interest is the case where the sizes of the k clusters are prescribed. Now a corresponding optimal clustering is induced by a power diagram of S (Subsection 4.3.2), a fact which leads to an algorithm with roughly 0(k^n) runtime if P is a set of n points in the plane; see Aurenhammer etal. [29]. In Inaba et al. [147], optimal /:-clusterings for the intra-cluster measure /x(C) = J2p qec ^(P^ ^)^ (^^^^ variance, but without division by \C\) are considered. Again, these clusterings are induced by a kind of power diagram of the cluster centroids, weighted additively by |C| and multiplicatively by />6(C). Another popular measure /x(C) is the radius of the smallest sphere enclosing C. If maximum is taken as the inter-cluster criterion, the k-center problem is obtained: Find a set S of k centers such that rs = max^^p d(p, S) is minimized. In other words, choose a set S of centers such that P can be covered by k spheres of minimum radius rs. (This simplifies
Voronoi diagrams
277
to the smallest enclosing sphere problem for ^ = 1; see Subsection 5.1.3.) It is easy to see that the Voronoi diagram of S gives rise to optimal clusters. Capoyleas et al. [55] observed that an optimal /:-clustering for /x, for any monotone increasing inter-cluster criterion / , is induced by the power diagram of the enclosing spheres. For both intra-cluster measures /x above, polynomial-time algorithms for fixed k result from considering the n^^^^^ candidate clusterings. For k = 2, the 'Voronoi property' of the 2-centroid or 2-center problem just means linear separability of the two optimal clusters. However, linear separability for all pairs of clusters in a given clustering does not always imply that this clustering has a realization by means of Voronoi or power diagrams. An example is the intra-cluster criterion diameter in 2-space [55]. The problem of constructing linearly (or circularly) separable clusterings in the plane, where each cluster C of P is separable by a straight line (or circle) from P \ C, is addressed in Dehne and Noltemeier [85] and Heusinger and Noltemeier [141]. They give a polynomial-time algorithm for deciding the existence, and finding an optimal clustering, with prescribed cluster sizes. A correspondence between separable clusters and regions of higher-order Voronoi diagrams for P (Subsection 4.3.3) is exploited. The order-^ Voronoi diagram, Vk(P), of P is also useful for selecting from P a ^-sized cluster C* of minimal dissimilarity /x(C*). This approach is pursued in Dobkin et al. [97] and Aggarwal et al. [6]. For instance, if /x is variance, C* has a non-empty region in Vi^ (P). If jbi is diameter, C* is contained in a subset of P having a non-empty region in Vsk-siP). These properties hold in arbitrary
F. Aurenhammer
278
and R. Klein
zs
Fig. 39. Moving a disk from 5 to r in the presence of barriers is faciliated by their Voronoi diagram.
diameter. To remedy this deficiency, other inter-cluster distances have been used. Among them is the complete-linkage distance 8(C, C') = max{ J(/7, q)\peC,qe
C'}.
Constructing the complete-hnkage hierarchy for S efficiently is much more elusive. A direct approach leads to an 0(n^) time and 0(n) space algorithm in general J-space. (The frequently cited O(n^) time insertion algorithm in Defays [82] only approximates the hierarchy. Its output depends on the insertion order.) In the plane, it seems of advantage to use, as an auxiliary structure, the Voronoi diagram of the intermediate clusters C i , . . . , Q , defined by the Hausdorjf distance h(x,C) = msix{d(x, p) \ p e C} of a. point x to a cluster C; see, e.g. Edelsbrunner et al. [108] and Huttenlocher et al. [144]. Unfortunately, the closest pair of clusters does not necessarily yield adjacent regions in this diagram. Recently, an 0(n\og^n) time algorithm has been given in Krznaric and Levcopoulos [173]. Among other structures, they use the Delaunay triangulation DT(5) and the furthest-site Voronoi diagram of the points in the intermediate clusters C,. They also show that approximations of the complete-linkage hierarchy for S can be obtained from DTC^S) in 0(n) time.
5.4. Motion planning Suppose that for a disc-shaped robot centered at some start point, s, a motion to some target point, t, must be planned in the presence of n line segments as obstacles. We assume that the line segments are pairwise disjoint, and that there are four line segments enclosing the
Voronoi diagrams
279
scene, as shown in Figure 39. While the robot is navigating through a gap between two Hne segments, /] and I2, at each position x its "clearance", i.e. its distance d{xJi) =xmn[d{x, y)\y
^h]
to the obstacles, should be maximized. This goal is achieved if the robot maintains the same distance to either segment! In other words, the robot should follow the bisector B(l\,l2) of the line segments l\ and h until its distance to another obstacle gets smaller than d(xJi). Roughly, this observation implies that the robot should walk along the edges of the Voronoi diagram V(S) of the line segments in S = {l\,..., In}- This diagram is connected, due to the four surrounding line segments. If start and target point are both lying on V(S), the motion planning task immediately reduces to a discrete graph problem: After labeling each edge of V(S) with its minimum distance to its two sites, and adding s and t as new vertices to V(5), a breadth first search from s can find, within 0(n) time, a collision-free path to t in V(S) if one exists (those edges whose clearance is less than the robot's radius are ignored during the search). If the target point, t, does not lie on V(S), we first determine the line segment l(t) whose Voronoi region contains t; to this end, point location techniques as mentioned in Subsection 5,1.1 can be applied. Next, we find the point z(t) on l(t) that is closest to r; see Figure 39. If its distance to t is less than the robot's radius then the robot cannot be placed at t and no motion from s to t exists. Otherwise, we consider the ray from z(t) through t. It hits a point t^ on V(S) which serves as an intermediate target point. Similarly a point s' can be defined if the original start point, s, does not lie on V(S). THEOREM 5.6. The robot can move from s to t without collision iff its radius does not exceed one of the distances d(z(t), t) and d{z{s), s), and if there exists a collision-free motion from s^ to t' along edges of the Voronoi diagram V(S). PROOF. Suppose the conditions are fulfiled. Then the straight motion from s to s^ does not cause a collision since the robot's distance to its closest obstacle is ever increasing. The same holds for t and t\ Combining these pieces with a safe motion from s^ to t^ yields the desired result. Conversely, let us assume that a path 7t from ^ to r exists along which the robot can move without hitting one of the line segments. The mapping f :t ^^ t' can be extended not only to s but to all points x of the scene (leaving fixed exactly the points of ^(5)). One can show that / is continuous. Consequently, path 7T is mapped by / onto a path n' in V{S) that runs from s' to t'. For each point X onir its corresponding point x' on n' is even farther away from its closest obstacle.
D
This "retraction" approach has first been taken by O'Dunlaing and Yap [208]. The Voronoi diagram of n line segments plus a structure suitable for point location in V{S) can be preprocessed in time O(nlogn) time. Afterwards, for each pair {s, t) of start and target point, the above method can find a safe motion from s to t within time 0(w), if it exists, or report otherwise. If approximating the robot's shape by a disc is not accurate enough, a compact convex set C can be used, with some fixed reference point in its interior. As long as only translational
280
F. Aurenhammer and R. Klein
motions are considered, the retraction approach still works; only the Voronoi diagram of the obstacles must now be based on the convex distance function defined by the convex set C* that results from reflecting C about the reference point; compare Subsection 4.5.2. If the scene consists of polygonal obstacles the same situation occurs as in the post office problem; see Subsection 5.1.1: Even though the number k of obstacles may be small, the complexity of their Voronoi diagram increases in proportion with their total number n of edges. Again, the piecewise-linear approximation of the Voronoi diagram by McAllister et al. [191] comes to the rescue; it is of complexity 0{k) and can be constructed within time 0{k\ogn) for the Euclidean distance, and in time 0{k\ogn\ogm) for a distance function based on a convex m-gon (that is, for solving the translational motion planning problem of a convex robot with m edges). If the robot is also allowed rotational motions, Voronoi diagrams can still be applied. 6'Dunlaing et al. [206,207] have studied the problem of moving a line segment amidst polygonal obstacles. Further results on the use of Voronoi diagrams in motion planning can be found in the surveys [13,14] by Alt and Yap, in Yap [260], and in Canny [53,54]. 6. Concluding remarks and open problems Although this chapter is quite long and, as we believe, reasonably comprehensive, we are aware that we did not cover all aspects of the Voronoi diagram and related topics. Below are some topics that we feel are important and interesting but that have not been treated in detail here. A significant stream of research concerns the stochastic properties of Voronoi diagrams for randomly distributed sites. Motivation stems from their relevance in the natural and social sciences. The interested reader is referred to Chapters 5 and 8 of Okabe et al. [210] for a comprehensive treatment. Also, the survey paper [27] could be consulted for a brief overview. In the present chapter, randomization enters only in the design of efficient construction algorithms. We decided not to include more stochastic aspects because their relevance to computational geometry is less strong. In view of the large scope of applications of Voronoi diagrams, fast construction is an important issue. Parallelization is a tool to reach this goal. We did not discuss parallel methods for constructing Voronoi diagrams in detail; a separate chapter of this book, devoted to parallel computational geometry, will partially cover this gap. Though a host of applications of the Voronoi diagram has been covered, applications in the natural and social sciences have been mentioned only marginally in the chapter. The book by Okabe et al. [210] puts strong emphasis on these applications, which led us, as being no experts in these areas, to refer to this book instead. Finally let us mention, out of many interesting open problems concerning Voronoi diagrams, a few that seem most important to us in view of their practical applications. Among the few algorithmic problems for planar Voronoi diagrams that have not been solved in a satisfactory manner is the computation of the geodesic Voronoi diagram (Subsection 4.4.4). Apart from the instance of simple polygons [212], the only known subquadratic solution is [199]. Is there a simple and practically efficient construction method, with a good theoretical bound, 0{n \ogn)l
Voronoi diagrams
281
The insert & flip algorithms for computing Delaunay triangulations in ?>-space (subsection 4.3.1) in [151,217], and [115] are simple and elegant, but suffer from the fact that intermediate triangulations might be quite large compared to the final result. This cannot happen if the set of sites to be inserted is well distributed, but this requirement need not be met in typical applications like contour modeling. Does there always exist an 'outputsensitive' insertion order not running into the above problem? Despite its importance in practice, the minimum spanning tree in 3-space (Subsection 5.2.1) has eluded efficient construction so far. The existing subquadratic solutions [259,3], are far from easy implementation. A partial answer are the efficient expectedtime and approximation algorithms in [72,250]. Is there a practical and worst-case efficient algorithm for computing exact minimum spanning trees in 3-space?
References [1] M. Abellanas, G. Hernandez, R. Klein, V. Neumann-Lara and J. Urrutia, Voronoi diagrams and containment offamilies of convex sets on the plane, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 71-78. [2] P.K. Agarwal, M. de Berg, J. Matousek and O. Schwarzkopf, Constructing levels in arrangements and higher order Voronoi diagrams, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 67-75. [3] P.K. Agarwal, H. Edelsbrunner, O. Schwarzkopf and E. Welzl, Euclidean minimum spanning trees and bichromatic closest pairs. Discrete Comput. Geom. 6 (5) (1991), 407-422. [4] A. Aggarwal, L.J. Guibas, J. Saxe and PW. Shor, A linear-time algorithm for computing the Voronoi diagram of a convex polygon. Discrete Comput. Geom. 4 (6) (1989), 591-604. [5] A. Aggarwal, M. Hansen and T. Leighton, Solving query-retrieval problems by compacting Voronoi diagrams, Proc. 22nd Annu. ACM Sympos. Theory Comput. (1990), 331-340. [6] A. Aggarwal, H. Imai, N. Katoh and S. Suri, Finding k points with minimum diameter and related problems, J. Algorithms 12 (1991), 38-56. [7] N. Ahuja, Dot pattern processing using Voronoi polygons as neighborhoods, IEEE Trans. Pattern Anal. Mach. Intell. 4 (1982), 336-343. [8] O. Aichholzer, D. Alberts, F. Aurenhammer and B. Gartner, A novel type of skeleton for polygons, J. Universal Comput. Sci. 1 (1995), 752-761. [9] O. Aichholzer and F. Aurenhammer, Straight skeletons for general polygonal figures. Technical Report 432, Inst, for Theor. Comput. Sci., Graz Univ. of Technology, Graz, Austria (1995). [10] O. Aichholzer, R Aurenhammer, S.-W. Cheng, N. Katoh, G. Rote, M. Taschwer and Y,-F. Xu, Triangulations intersect nicely, Discrete Comput. Geom., to appear. [11] S.G. Akl, A note on Euclidean matchings, triangulations and spanning trees, J. Combin. Inform. System Sci. 8 (3) (1983), 169-174. [12] H. Alt and O. Schwarzkopf, The Voronoi diagram of curved objects, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 89-97. [13] H. Alt and C.K. Yap, Algorithmic aspect of motion planning: A tutorial. Part 1, Algorithms Rev. 1 (1) (1990), 43-60. [14] H. Alt and C.K. Yap, Algorithmic aspect of motion planning: A tutorial, Part 2, Algorithms Rev. 1 (2) (1990), 61-77. [15] N.M. Amato and E.A. Ramos, On computing Voronoi diagrams by divide-prune-and-search, Proc. 12th Annu. ACM Sympos. Comput. Geom., to appear. [16] B. Aronov, On the geodesic Voronoi diagram of point sites in a simple polygon, Algorithmica 4 (1989), 109-140. [17] B. Aronov, Personal communication (1996). [18] T. Asano, B. Bhattacharya, J.M. Keil and F. Yao, Clustering algorithms based on minimum and maximum spanning trees, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 252-257.
282
F. Aurenhammer
and R. Klein
[19] P. Ash, E. Bolker, H. Crapo and W. Whiteley, Convex polyhedra, Dirichlet tessellations and spider webs. Shaping Space: A Polyhedral Approach, Ch. 17, M. Senechal and G. Reck, eds, Birkhauser, Boston, MA (1988), 231-250. [20] P.P. Ash and E.D. Bolker, Recognizing Dirichlet tesselations, Geom. Dedicata 19 (1985), 175-206. [21] M.J. Atallah, Some dynamic computational geometry problems, Comput. Math. Appl. 11 (1985), 11711181. [22] F. Aurenhammer, Power diagrams: Properties, algorithms and applications, SIAM J. Comput. 16 (1987), 78-96. [23] F. Aurenhammer, Recognising polytopical cell complexes and constructing projection polyhedra, J. Symbolic Comput. 3 (1987), 249-255. [24] F. Aurenhammer, Improved algorithms for discs and balls using power diagrams, J. Algorithms 9 (1988), 151-161. [25] F. Aurenhammer, Linear combinations from power domains, Geom. Dedicata 28 (1988), 45-52. [26] F. Aurenhammer, A new duality result concerning Voronoi diagrams. Discrete Comput. Geom. 5 (1990), 243-254. [27] F. Aurenhammer, Voronoi diagrams: A survey of a fundamental geometric data structure, ACM Comput. Surv. 23(1991), 345^05. [28] F. Aurenhammer and H. Edelsbrunner, An optimal algorithm for constructing the weighted Voronoi diagram in the plane. Pattern Recogn. 17 (1984), 251-257. [29] F Aurenhammer, F. Hoffmann and B. Aronov, Minkowski-type theorems and least-squares partitioning, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 350-357. [30] F. Aurenhammer and H. Imai, Geometric relations among Voronoi diagrams, Geom. Dedicata 27 (1988), 65-75. [31] F. Aurenhammer and O. Schwarzkopf, A simple on-line randomized incremental algorithm for computing higher order Voronoi diagrams, Intemat. J. Comput. Geom, Appl. 2 (1992), 363-381. [32] D. Avis, B.K. Bhattacharya and H. Imai, Computing the volume of the union of spheres. Visual Comput. 3 (1988), 323-328. [33] R. Benedetti and J.-J. Risler, Real Algebraic and Semi-Algebraic Sets, Actualites mathematiques, Hermann, Paris (1990). [34] J.L. Bentley and T.A. Ottmann, Algorithms for reporting and counting geometric intersections, IEEE Trans. Comput. C-28 (1979), 643-647. [35] J.L. Bentley and M.I. Shamos, Divide-and-conquer in multidimensional space, Proc. 8th Annu. ACM Sympos. Theory Comput. (1976), 220-230. [36] J.L. Bentley, B.W. Weide and A.C. Yao, Optimal expected-time algorithms for closest-point problems, ACM Trans. Math. Softw. 6 (1980), 563-580. [37] M. Bern and D. Eppstein, Mesh generation and optimal triangulation. Computing in Euclidean Geometry, Vol. 1 of Lecture Notes Series on Computing, D.-Z. Du and F. K. Hwang, eds. World Scientific, Singapore (1992), 23-90. [38] M. Bern, D. Eppstein and J. Gilbert, Provably good mesh generation, J. Comput. Systems Sci. 48 (1994), 384-409. [39] J. Bemal, Bibliographic notes on Voronoi diagrams. Technical Report, National Institute of Standards and Technology, Gaithersburg, MD 20899 (1992). [40] B.K. Bhattacharya and G.T. Toussaint, On geometric algorithms that use the furthest-point Voronoi diagram. Computational Geometry, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1985), 43-61. [41] G. Blelloch, G.L. Miller and D. Talmor, Developing a practical projection-based parallel Delaunay algorithm, Proc. 12th Annu. ACM Sympos. Comput. Geom., to appear. [42] J.-D. Boissonnat, A. Cerezo, O. Devillers and M. Teillaud, Output-sensitive construction of the 3-d Delaunay triangulation of constrained sets of points, Proc. 3rd Canad. Conf. Comput. Geom. (1991), 110-113. [43] J.-D. Boissonnat, O. Devillers, R. Schott, M. Teillaud and M. Yvinec, Applications of random sampling to on-line algorithms in computational geometry. Discrete Comput. Geom. 8 (1992), 51-71. [44] J.-D. Boissonnat and B. Geiger, Three dimensional reconstruction of complex shapes based on the Delaunay triangulation. Biomedical Image Processing and Biomedical Visualization, Vol. 1905, R.S. Acharya and D.B. Goldgof, eds, SPIE (1993), 964-975.
Voronoi diagrams
283
[45] J.-D. Boissonnat, M. Sharir, B. Tagansky and M. Yvinec, Voronoi diagrams in higher dimensions under certain polyhedral distance functions, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 79-88. [46] J.-D. Boissonnat and M. Teillaud, On the randomized construction of the Delaunay tree, Theoret. Comput. Sci. 112(1993), 339-354. [47] E. Boros and P.L. Hammer, On clustering problems with connected optima in Euclidean spaces. Technical Report, RUTCOR, Ruters University, New Brunswick, New Jersey (1988). [48] E. Brisson, Representing geometric structures in d dimensions: Topology and order, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 218-227. [49] K.Q. Brown, Voronoi diagrams from convex hulls. Inform. Process. Lett. 9 (1979), 223-228. [50] K.Q. Brown, Geometric Transforms for Fast Geometric Algorithms, Ph.D. thesis, Dept. Comput. Sci., Carnegie-Mellon Univ., Pittsburgh, PA (1980). Report CMU-CS-80-101. [51] C. Burnikel, K. Mehlhom and S. Schirra, How to compute the Voronoi diagram of line segments: Theoretical and experimental results, Proc. 2nd Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 855, Springer-Verlag (1994), 227-239. [52] H. Busemann, The Geometry of Geodesies, Academic Press Inc., New York (1955). [53] J. Canny, A Voronoi method for the piano-movers problem, Proc. IEEE Internal. Conf. Robot. Autom. (1985), 530-535. [54] J. Canny and B.R. Donald, Simplified Voronoi diagrams, Discrete Comput. Geom. 3 (1988), 219-236. [55] V. Capoyleas, G. Rote and G. Woeginger, Geometric clusterings, J. Algorithms 12 (1991), 341-356. [56] T.M. Chan, J. Snoeyink and C.-K. Yap, Output sensitive construction ofpolytopes in four dimensions and clipped Voronoi diagrams in three, Proc, 6th Annu. ACM-SIAM Sympos. Discrete Algorithms (1995), 282-291. [57] B. Chandra, G. Das, G. Narasimhan and J. Soares, New sparseness results on graph spanners, Intemat. J. Comput. Geom. Appl. 5 (1995), 125-144. [58] B. Chazelle, An optimal convex hull algorithm in any fixed dimension. Discrete Comput. Geom. 10 (1993), 377-409. [59] B. Chazelle and H. Edelsbrunner, An improved algorithm for constructing kth-order Voronoi diagrams, IEEE Trans. Comput. C-36 (1987), 1349-1354. [60] S.W. Cheng, M.J. Golin and J.C.F. Tsang, Expected case analysis of ^-skeletons with applications to the construction of minimum-weight triangulations, Proc. 7th Canad. Conf. Comput. Geom. (1995), 279-284. [61] S.-W. Cheng and Y.-F. Xu, Approximating the largest ^-skeleton within a minimum-weight-triangulation, Proc. 12th Annu. ACM Sympos. Comput. Geom., to appear. [62] L.P. Chew, Building Voronoi diagrams for convex polygons in linear expected time, Technical Report PCS-TR90-147, Dept. Math. Comput. Sci., Dartmouth College, Hanover, NH (1986). [63] L.P. Chew, Constrained Delaunay triangulations, Algorithmica 4 (1989), 97-108. [64] L.P. Chew, There are planar graphs almost as good as the complete graph, J. Comput. System Sci. 39 (1989), 205-219. [65] L.P. Chew, Guaranteed-quality mesh generation for curved surfaces, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 274-280. [66] L.P. Chew and R.L. Drysdale, III, Voronoi diagrams based on convex distance functions, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 235-244. [67] L.P. Chew, K. Kedem, M. Sharir, B. Tagansky and E. Welzl, Voronoi diagrams of lines in 3-space under polyhedral convex distance functions, Proc. 6th ACM-SIAM Sympos. Discrete Algorithms (1995), 197204. [68] F. Chin, J. Snoeyink and C.-A. Wang, Finding the medial axis of a simple polygon in linear time, Proc. 6th Annu. Internal. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 1004, Springer-Verlag (1995), 382-391. [69] N. Christofides, Worst-case analysis of a new heuristic for the traveling salesman problem, Sympos. on New Directions and Recent Results in Algorithms and Complexity, J.F. Traub, ed.. Academic Press, New York, NY (1976), 441. [70] P. Cignoni, C. Montani and R. Scopigno, A merge-first divide & conquer algorithm for E Delaunay triangulations. Technical Report, Consiglio Nazionale delle Ricerche, Pisa, Italy (1994). [71] K.L. Clarkson, New applications of random sampling in computational geometry. Discrete Comput. Geom. 2 (1987), 195-222.
284
F. Aurenhammer
and R. Klein
[72] K.L. Clarkson, An algorithm for geometric minimum spanning trees requiring nearly linear expected time, Algorithmica 4 (1989), 461^69. [73] K.L. Clarkson, K. Mehlhom and R. Seidel, Four results on randomized incremental constructions. Cornput. Geom. 3(4) (1993), 185-212. [74] K.L. Clarkson and P.W. Shor, Applications of random sampling in computational geometry, II, Discrete Comput. Geom. 4 (1989), 387^21. [75] R. Cole, Reported by C. 6'Dunlaing (1989). [76] A.G. Corbalan, M. Mazon, T. Recio and F. Santos, On the topological shape of planar Voronoi diagrams, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 109-115. [77] H. Crapo and W. Whiteley, Plane stresses and projected polyhedra. Technical Report, Univ. Montreal, Montreal, PQ( 1986). [78] G. Das and D. Joseph, Which triangulations approximate the complete graph, Proc. International Symposium on Optimal Algorithms, Lecture Notes in Comput. Sci. 401, Springer-Verlag (1989), 168-192. [79] E.F. D'Azevedo and R.B. Simpson, On optimal interpolation triangle incidences, SIAM J. Sci. Statist. Comput. 10 (6) (1989), 1063-1075. [80] M. de Berg, J. Matousek and O. Schwarzkopf, Piecewise linear paths among convex obstacles, Proc. 25th Annu. ACM Sympos. Theory Comput. (1993), 505-514. [81] L. De Floriani, B. Falcidieno, G. Nagy and C. Pienovi, On sorting triangles in a Delaunay tessellation, Algorithmica 6 (1991), 522-532. [82] D. Defays, An efficient algorithm for a complete link method, Comput. J. 20 (1977), 364-366. [83] F. Dehne and R. Klein, A sweepcircle algorithm for Voronoi diagrams, Proc. 13th Intemat. Workshop Graph-Theoret. Concepts Comput. Sci. (1987), 59-70. [84] F. Dehne and R. Klein, "the big sweep": On the power of the wavefront approach to Voronoi diagrams, Proc. Math. Found. Comput. Sci., Lecture Notes in Comput. Sci. 841 (1994), 296-305. [85] F. Dehne and H. Noltemeier, A computational geometry approach to clustering problems, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 245-250. [86] B. Delaunay, Sur la sphere vide. A la memoire de Georges Voronoi, Izv. Akad. Nauk SSSR, Otdelenie Matematicheskih i Estestvennyh Nauk 7 (1934), 793-800. [87] R. Descartes, Principia Philosophiae, Ludovicus Elzevirius, Amsterdam (1644). [88] O. Devillers, Randomization yields simple 0(n log* n) algorithms for difficult Q{n) problems, Intemat. J. Comput. Geom. Appl. 2(1) (1992), 97-111. [89] A.K. Dewdney and J.K. Vranch, A convex partition ofR^ with applications to Crum 's problem andKnuth's post-office problem, Utilitas Math. 12(1977), 193-199. [90] M.T. Dickerson, R.L. Drysdale and J.R. Sack, Simple algorithms for enumerating interpoint distances and finding k nearest neighbors, Internat. J. Comput. Geom. Appl. 2 (3) (1992), 221-239. [91] M.T. Dickerson and D. Eppstein, Algorithms for proximity problems in higher dimensions, Comput. Geom. 5 (1996), 277-291. [92] M.B. Dillencourt, A non-Hamiltonian, nondegenerate Delaunay triangulation. Inform. Process. Lett. 25 (1987), 149-151. [93] M.B. Dillencourt, Toughness and Delaunay triangulations. Discrete Comput. Geom. 5 (1990), 575-601. [94] M.B. Dillencourt, Finding Hamiltonian cycles in Delaunay triangulations is NP-complete, Proc. 4th Canad. Conf. Comput. Geom. (1992), 223-228. [95] P.G.L. Dirichlet, Uber die reduction der positiven quadratischen formen mit drei unbestimmten ganzen zahlen, Reine Angew. Math. 40 (1850), 209-227. [96] H. Djidjev and A. Lingas, On computing the Voronoi diagram for restricted planar figures, Proc. 2nd Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 519, Springer-Verlag (1991), 54-64. [97] D.P. Dobkin, R.L. Drysdale, III and L.J. Guibas, Finding smallest polygons. Computational Geometry, F.P. Preparata, ed., Adv. Comput. Res. 1, JAI Press, London, England (1983), 181-214. [98] D.P. Dobkin, S.J. Friedman and K.J. Supowit, Delaunay graphs are almost as good as complete graphs. Discrete Comput. Geom. 5 (1990), 399^07. [99] D.P. Dobkin and M.J. Laszlo, Primitives for the manipulation of three-dimensional subdivisions, Algorithmica 4 (1989), 3-32. [100] D.P. Dobkin and R.J. Lipton, Multidimensional searching problems, SIAM J. Comput. 5 (1976), 181-186. [101] J.-M. Drappier, Envellopes convexes. Technical Report, Rapport Centre CPAO, ENSTA Palaiseau (1983).
Voronoi diagrams
285
102] R.A. Dwyer, A faster divide-and-conquer algorithm for constructing Delaunay triangulations, Algorithmica2(1987), 137-151. 103] R.A. Dwyer, Higher-dimensional Voronoi diagrams in linear expected time. Discrete Comput. Geom. 6 (1991), 343-367. 104] H. Edelsbrunner, Algorithms in Combinatorial Geometry, EATCS Monographs on Theoretical Computer Science 10, Springer-Verlag, Heidelberg, West Germany (1987). 105] H. Edelsbrunner, An acyclicity theorem for cell complexes in d dimensions, Combinatorica 10 (1990), 251-260. 106] H. Edelsbrunner, The union of halls and its dual shape, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 218-231. 107] H. Edelsbrunner, Weighted a-shapes. Discrete Comput. Geom., to appear. 108] H. Edelsbrunner, L. Guibas and M. Sharir, The upper envelope of piecewise linear functions: Algorithms and applications. Discrete Comput. Geom. 4 (1989), 311-333. 109] H. Edelsbrunner, L.J. Guibas and J. Stolfi, Optimal point location in a monotone subdivision, SIAM J. Comput. 15 (1986), 317-340. 110] H. Edelsbrunner, D.G. Kirkpatrick and R. Seidel, On the shape of a set of points in the plane, IEEE Trans. Inform. Theory IT-29 (1983), 551-559. I l l ] H. Edelsbrunner andE.R Mticke, Three-dimensional alpha shapes, ACM Trans. Graph. 13 (1) (Jan. 1994), 43-72. 112] H. Edelsbrunner, J. O'Rourke and R. Seidel, Constructing arrangements of lines and hyperplanes with applications, SIAM J. Comput. 15 (1986), 341-363. 113] H. Edelsbrunner and R. Seidel, Voronoi diagrams and arrangements. Discrete Comput. Geom. 1 (1986), 25-44. 114] H. Edelsbrunner, R. Seidel and M. Sharir, On the zone theorem for hyperplane arrangements, SIAM J. Comput. 22 (2) (1993), 418-429. 115] H. Edelsbrunner and N.R. Shah, Incremental topological flipping works for regular triangulations, Algorithmica 15 (1996), 223-241. 116] H. Edelsbrunner and W. Shi, An 0(n log^ h) time algorithm for the three-dimensional convex hull problem, SIAM J. Comput. 20 (1991), 259-277. 117] H. Edelsbrunner and T.S. Tan, A quadratic time algorithm for the minmax length triangulation, SIAM J. Comput. 22 (1993), 527-551. 118] H. Edelsbrunner and T.S. Tan, An upper bound for conforming Delaunay triangulations. Discrete Comput. Geom. 10 (2) (1993), 197-213. 119] H. Edelsbrunner, T.S. Tan and R. Waupotitsch, 0(N^\ogN) time algorithm for the minmax angle triangulation, SIAM J. Sci. Statist. Comput. 13 (4) (1992), 994-1008. 120] RE. Ehrlich and H.-C. Im Hof, Dirichlet regions in manifolds without conjugate points. Comment. Math. Helvetici 54 (1979), 642-658. 121] G. Farin, Surfaces over Dirichlet tesselations, Comput. Aided Geom. Design 7 (1990), 281-292. 122] D.A. Field, Implementing Watson's algorithm in three dimensions, Proc. 2nd Annu. ACM Sympos. Comput. Geom. (1986), 246-259. 123] S. Fortune, Numerical stability of algorithms for 2-d Delaunay triangulations and Voronoi diagrams, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 83-92. 124] S. Fortune, Voronoi diagrams and Delaunay triangulations. Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds, Lecture Notes Series on Comput. 1, World Scientific, Singapore (1992), 193-233. 125] S.J. Fortune, A sweepline algorithm for Voronoi diagrams, Algorithmica 2 (1987), 153-174. 126] K.R. Gabriel and R.R. Sokal, A new statistical approach to geographic variation analysis. Systematic Zoology 18 (1969), 259-278. 127] M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W.H. Freeman, New York, NY (1979). 128] B. Geiger, 3Z) Modeling using the Delaunay triangulation, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), VI1-V12. 129] A. Gibbons, Algorithmic Graph Theory, Cambridge University Press, Cambridge (1985). 130] CM. Gold, P.M. Remmele and T. Roos, Voronoi diagrams of line segments made easy, Proc. 7th Canad. Conf. Comput. Geom. (1995), 223-228.
286
F. Aurenhammer
and R. Klein
[131] M. Golin, R. Raman, C. Schwarz and M. Smid, Simple randomized algorithms for closest pair problems, Nordic J. Comput. 2 (1995), 3-27. [132] M.T. Goodrich, C. O'Dunlaing and C. Yap, Computing the Voronoi diagram of a set of line segments in parallel, Algorithmica 9 (1993), 128-141. [133] RJ. Green and R.R. Sibson, Computing Dirichlet tessellations in the plane, Comput. J. 21 (1978), 168-173. [134] L. Guibas, J.S.B. Mitchell and T. Roos, Voronoi diagrams of moving points in the plane, Proc. 17th Internat. Workshop Graph-Theoret. Concepts Comput. Sci., Lecture Notes Comput. Sci. 570, Springer-Verlag (1991), 113-125. [135] L.J. Guibas, D.E. Knuth and M. Sharir, Randomized incremental construction of Delaunay and Voronoi diagrams, Algorithmica 7 (1992), 381^13. [136] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans. Graph. 4 (1985), 74-123. [137] J. A. Hartigan, Clustering Algorithms, Wiley, New York (1975). [138] D. Hartvigsen, Recognizing Voronoi diagrams with linear programming, ORSA J. Comput. 4 (1992), 369374. [139] M. Held, A geometry-based investigation of the tool path generation for zigzag pocket machining. Visual Comput. 7 (5-6) (1991), 296-308. [140] J. Hertz, A. Krogh and R.G. Palmer, Introduction to the Theory of Neural Computation, Addison-Wesley, New York (1991). [141] H. Heusinger and H. Noltemeier, On separable clusterings, J. Algorithms 10 (1989), 212-227. [142] K. Hinrichs, J. Nievergelt and P. Schom, Plane-sweep solves the closest pair problem elegantly. Inform. Process. Lett. 26 (1988), 255-261. [143] N.-F. Huang, The power connecting problem on a radio network. Technical Report, Dept. of Comput. Sci., National Tsing Hua Univ., Hsinchu, Taiwan 300, Republic of China (1991). [144] D.P. Huttenlocher, K. Kedem and M. Sharir, The upper envelope of Voronoi surfaces and its applications. Discrete Comput. Geom. 9 (1993), 267-291. [145] F.K. Hwang, An 0{n logn) algorithm for rectilinear minimal spanning tree, J. ACM 26 (1979), 177-182. [146] C. Icking, R. Klein, N.-M. Le and L. Ma, Convex distance functions in 3-space are different, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 116-123. [147] M. Inaba, N. Katoh and H. Imai, Applications of weighted Voronoi diagrams and randomization to variance-based k-clustering, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 332-339. [148] H. Inagaki, K. Sugihara and N. Sugie, Numerically robust incremental algorithm for constructing threedimensional Voronoi diagrams, Proc. 4th Canad. Conf. Comput. Geom. (1992), 334-339. [149] J.W Jaromczyk, M. Kowaluk and F. Yao, An optimal algorithm for constructing ^-skeletons in the Lpmetrik, SI AM J. Comput., to appear. [150] B. Joe, 2>-dimensional triangulations from local transformations, SIAM J. Sci. Statist. Comput. 10 (4) (1989), 718-741. [151] B. Joe, Construction of three-dimensional Delaunay triangulations using local transformations, Comput. Aided Geom. Design 8 (2) (1991), 123-142. [152] B. Joe, Geompack. A software package for the generation of meshes using geometric algorithms. Adv. Eng. Software and Workstations 13 (5-6) (1991), 325-331. [153] W.A. Johnson and R.F Mehl, Reaction kinetics in processes of nucleation and growth, Trans. Am. Instit. Mining Metall. 135 (1939), 416-458. [154] M. Jiinger, G. Reinelt and D. Zepf, Computing correct Delaunay triangulations. Computing 47 (1) (1991), 43-49. [155] T.C. Kao and D.M. Mount, An algorithm for computing compacted Voronoi diagrams defined by convex distance functions, Proc. 3rd Canad. Conf. Comput. Geom. (1991), 104-109. [156] T.C. Kao and D.M. Mount, Incremental construction and dynamic maintenance of constrained Delaunay triangulations, Proc. 4th Canad. Conf. Comput. Geom. (1992), 170-175. [157] J. Katajainen and M. Koppinen, Constructing Delaunay triangulations by merging buckets in quadtree order, Ann. Soc. Math. Polon. Series IV, Fund. Inform. 11 (3) (1988), 275-288. [158] J.M. Keil, Computing a subgraph of the minimum weight triangulation, Comput. Geom. 4 (1994), 13-26. [159] J.M. Keil and C.A. Gutwin, Classes of graphs which approximate the complete Euclidean graph. Discrete Comput. Geom. 7 (1992), 13-28.
Voronoi diagrams
287
[160] D. Kirkpatrick and J. Snoeyink, Tentative prune-and-search for computing Voronoi vertices, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 133-142. [161] D.G. Kirkpatrick, Efficient computation of continuous skeletons, Proc. 20th Annu. IEEE Sympos. Found. Comput. Sci. (1979), 18-27. [162] D.G. Kirkpatrick, A note on Delaunay and optimal triangulations. Inform. Process. Lett. 10 (1980), 127128. [163] D.G. Kirkpatrick, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1983), 28-35. [164] D.G. Kirkpatrick and J.D. Radke, A framework for computational morphology. Computational Geometry, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1985), 217-248. [165] V. Klee, On the complexity of d-dimensional Voronoi diagrams. Arch. Math. 34 (1980), 75-80. [166] R. Klein, Concrete and Abstract Voronoi Diagrams, Lecture Notes in Comput. Sci. 400, Springer-Verlag (1989). [167] R. Klein and A. Lingas, A linear-time randomized algorithm for the bounded Voronoi diagram of a simple polygon, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 124-132. [168] R. Klein and A. Lingas, Fast skeleton construction, 3rd Annual European Symposium on Algorithms (ESA '95), Lecture Notes in Comput. Sci. 979 (1995), 582-596. [169] R. Klein and A. Lingas, Manhattonian proximity in a simple polygon, Intemat. J. Comput. Geom. Appl. 5 (1995), 53-74. [170] R. Klein, K. Mehlhom and S. Meiser, Randomized incremental construction of abstract Voronoi diagrams, Comput. Geom. 3 (3) (1993), 157-184. [171] R. Klein and D. Wood, Voronoi diagrams based on general metrics in the plane, Proc. 5th Sympos. Theoret. Aspects Comput. Sci., Lecture Notes in Comput. Sci. 294 (1988), 281-291. [172] J.B. Kruskal, Jr., On the shortest spanning subtree of a graph and the traveling salesman problem, Proc. Amer. Math. Soc. 7 (1956), 48-50. [173] D. Krznaric and C. Levcopoulos, The first subquadratic algorithm for complete linkage clustering, Proc. 6th Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 1004, Springer-Verlag (1995), 392^01. [174] T. Lambert, The Delaunay triangulation maximizes the mean inradius, Proc. 6th Canad. Conf. Comput. Geom. (1994), 201-206. [175] T. Lambert, Empty-shape triangulation algorithms, PhD thesis, Dept. Comput. Sci., Univ. of Manitoba, Winnipeg, MB (Aug. 1994). [176] C.L. Lawson, Software for C surface interpolation. Math. Software III, J.R. Rice, ed., Academic Press, New York, NY (1977), 161-194. [177] N.-M. Le, On Voronoi diagrams in the Ip-metric in higher dimensions, Proc. 11th Sympos. Theoret. Aspects Comput. Sci., Lecture Notes in Comput. Sci. 775 (1994), 711-722. [178] N.-M. Le, Randomized incremental construction of simple abstract Voronoi diagrams in 3-space, Proc. 10th International Conference on Fundamentals of Computation Theory (FCT'95), Lecture Notes in Comput. Sci. 965 (1995), 333-342. [179] D.T. Lee, Two-dimensional Voronoi diagrams in the Lp-metric, J. ACM 27 (1980), 604-618. [180] D.T. Lee, Medial axis transformation of a planar shape, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-4 (1982), 363-369. [181] D.T. Lee, On k-nearest neighbor Voronoi diagrams in the plane, IEEE Trans. Comput. C-31 (1982), 478487. [182] D.T. Lee and R.L. Drysdale, III, Generalization of Voronoi diagrams in the plane, SIAM J. Comput. 10 (1981), 73-87. [183] D.T. Lee and A.K. Lin, Generalized Delaunay triangulation for planar graphs, Discrete Comput. Geom. 1(1986), 201-211. [184] D.T. Lee and C.K. Wong, Voronoi diagrams in L\ (Loo) metrics with 2-dimensional storage applications, SIAM J. Comput. 9 (1980), 200-211. [185] C. Levcopoulos and D. Krznaric, Quasi-greedy triangulations approximating the minimum weight triangulation, Proc. 7th ACM-SIAM Sympos. Discrete Algorithms (1996), 392^01. [186] A. Lingas, A linear-time construction of the relative neighborhood graph from the Delaunay triangulation, Comput. Geom. 4 (1994), 199-208.
288
F. Aurenhammer
and R. Klein
[187] J. Matousek, M. Sharir and E. Welzl, A subexponential bound for linear programming, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 1-8. [188] D.W. Matula and R.R. Solcal, Properties of Gabriel graphs relevant to geographic variation research and clustering ofpoints in the plane, Geogr. Anal. 12 (1980), 205-222. [189] A. Maus, Delaunay triangulation and the convex hull ofn points in expected linear time, BIT 24 (1984), 151-163. [190] M.L. Mazon and T. Recio, Voronoi diagrams coming from discrete groups on the plane, Proc. 2nd Canad. Conf. Comput. Geom. (1990), 223-226. [191] M. McAllister, D. Kirkpatrick and J. Snoeyink, A compact piecewise-linear Voronoi diagram for convex sites in the plane. Discrete Comput. Geom. 15 (1996), 73-105. [192] D.H. McLain, Two dimensional interpolation from random data, Comput. J. 19 (1976), 178-181. [193] P. McMullen, The maximal number offaces of a convex polytope, Mathematica 17 (1970), 179-184. [194] N. Megiddo, Linear programming in linear time when the dimension is fixed, J. ACM 31 (1984), 114-127. [195] K. Mehlhom, S. Meiser and C. O'Diinlaing, On the construction of abstract Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 211-224. [196] S. Meiser, Zur Konstruktion abstrakter Voronoidiagramme, PhD thesis, Dept. Comput. Sci., Univ. Saarlandes, Saarbriicken, Germany (1993). [197] K. Menger, Untersuchungen liber allgemeine metrik. Math. Ann. 100 (1928), 75-163. [198] V. Milenkovic, Robust construction of the Voronoi diagram of a polyhedron, Proc. 5th Canad. Conf. Comput. Geom. (1993), 473-478. [199] J.S.B. Mitchell, Shortest paths among obstacles in the plane, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 308-317. [200] J.S.B. Mitchell, D.M. Mount and C.H. Papadimitriou, The discrete geodesic problem, SIAM J. Comput. 16(1987), 647-668. [201] D.M. Mount and A. Saalfeld, Globally-equiangular triangulations of co-circular points in 0{n logn) time, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 143-152. [202] D.E. Muller and P.P. Preparata, Finding the intersection of two convex polyhedra, Theoret. Comput. Sci. 7 (1978), 217-236. [203] K. Mulmuley, Output sensitive construction of levels and Voronoi diagrams in JK^ of order 1 to k, Proc. 22nd Annu. ACM Sympos. Theory Comput. (1990), 322-330. [204] K. Mulmuley, On levels in arrangements and Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 307338. [205] O.R. Musin, Properties of the Delaunay triangulation, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 424-426. [206] C. O'Dunlaing, M. Sharir and C.K. Yap, Generalized Voronoi diagrams for a ladder: I. Topological analysis, Comm. Pure Appl. Math. 39 (1986), 423-483. [207] C. O'Dunlaing, M. Sharir and C.K. Yap, Generalized Voronoi diagrams for a ladder: II. Efficient construction of the diagram, Algorithmica 2 (1987), 27-59. [208] C. O'Dunlaing and C.K. Yap, A "retraction" method for planning the motion of a disk, J. Algorithms 6 (1985), 104-111. [209] T. Ohya, M. Iri and K. Murota, Improvements of the incremental method for the Voronoi diagram with computational comparison of various algorithms, J. Open Res. Soc. Japan 27 (4) (1984), 306-336. [210] A. Okabe, B. Boots and K. Sugihara, Spatial Tessellations: Concepts and Applications of Voronoi Diagrams, Wiley, Chichester, UK (1992). [211] C.H. Papadimitriou, The Euclidean traveling salesman problem is NP-complete, Theoret. Comput. Sci. 4 (1977), 237-244. [212] E. Papadopoulou and D.T. Lee, Efficient computation of the geodesic Voronoi diagram ofpoints in a simple polygon, 3rd Annual European Symposium on Algorithms (ESA '95), Lecture Notes in Comput. Sci. 979 (1995), 238-251. [213] I. Paschinger, Konvexe Polytope und Dirichletsche Zellenkomplexe, PhD thesis, Institut fiir Mathematik, Universitat Salzburg, Salzburg, Austria (1982). [214] PL. Powar, Minimal roughness property of the Delaunay triangulation: A shorter approach, Comput. Aided Geom. Design 9 (1992), 491-494.
Voronoi diagrams
289
[215] F.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag, New York, NY (1985). [216] R.C. Prim, Shortest connection networks and some generalizations. Bell Syst. Tech. J. 36 (1957), 13891401. [217] V.T. Rajan, Optimality of the Delaunay triangulation in R , Proc. 7th Annu. ACM Sympos. Comput. Geom. (1991), 357-363. [218] S. Rajasekaran and S. Ramaswami, Optimal parallel randomized algorithms for the Voronoi diagram of line segments in the plane and related problems, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 57-66. [219] R. Rasch, Abstrakte inverse Voronoidiagramme, PhD thesis, Dept. Comput. Sci., Univ. Saarlandes, Saarbriicken, Germany (1994). [220] S. Rippa, Minimal roughness property of the Delaunay triangulation, Comput. Aided Geom. Design 7 (1990), 489^97. [221] T. Roos, Tighter bounds on Voronoi diagrams of moving points, Proc. 5th Canad. Conf. Comput. Geom. (1993), 358-363. [222] D.J. Rosenkrantz, R.E. Steams and P.M. Lewis, An analysis of several heuristics for the traveling salesman problem, SIAM J. Comput. 6 (1977), 563-581. [223] M. Sakamoto and M. Takagi, Patterns of weighted Voronoi tesselations. Science and Form 3 (1988), 103111. [224] R. Seidel, The complexity of Voronoi diagrams in higher dimensions, Proc. 20th AUerton Conf. Commun. Control Comput. (1982), 94-95. [225] R. Seidel, A method for proving lower bounds for certain geometric problems. Computational Geometry, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1985), 319-334. [226] R. Seidel, Constructing higher-dimensional convex hulls at logarithmic cost per face, Proc. 18th Annu. ACM Sympos. Theory Comput. (1986), 404-413. [227] R. Seidel, On the number of faces in higher-dimensional Voronoi diagrams, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 181-185. [228] R. Seidel, Constrained Delaunay triangulations and Voronoi diagrams. Report 260, IIG-TU, Graz, Austria (1988), 178-191. [229] R. Seidel, Small-dimensional linear programming and convex hulls made easy. Discrete Comput. Geom. 6 (1991), 423-434. [230] R. Seidel, Backwards analysis of randomized geometric algorithms. New Trends in Discrete and Computational Geometry, J. Pach, ed.. Algorithms and Combinatorics 10, Springer-Verlag (1993), 37-68. [231] M.I. Shamos, Computational geometry, PhD thesis, Dept. Comput. Sci., Yale Univ., New Haven, CT (1978). [232] M.I. Shamos and D. Hoey, Closest-point problems, Proc. 16th Annu. IEEE Sympos. Found. Comput. Sci. (1975), 151-162. [233] M. Sharir, Intersection and closest-pair problems for a set of planar discs, SIAM J. Comput. 14 (1985), 448-468. [234] M. Sharir, Almost tight upper bounds for lower envelopes in higher dimensions. Discrete Comput. Geom. 12 (1994), 327-345. [235] R. Sibson, Locally equiangular triangulations, Comput. J. 21 (1978), 243-245. [236] R. Sibson, A vector identity for the Dirichlet tesselation. Math. Proc. Camb. Phil. Soc. 87 (1980), 151-155. [237] S. Skyum, A sweepline algorithm for generalized Delaunay triangulations. Technical Report DAIMI PB373, CS Dept., Aarhus University (1991). [238] S.W. Sloan, A fast algorithm for constructing Delaunay triangulations in the plane. Adv. Eng. Softw. 9 (1) (1987), 34-55. [239] M. Smid, Maintaining the minimal distance of a point set in less than linear time. Algorithms Rev. 2 (1991), 33-44. [240] P. Su and R.L.S. Drysdale, A comparison of sequential Delaunay triangulation algorithms, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 61-70. [241] K. Sugihara, A simple method for avoiding numerical errors and degeneracy in Voronoi diagram construction, lEICE Trans. Fundamentals E75-A (4) (1992), 468^77.
290
F. Aurenhammer
and R. Klein
[242] K. Sugihara and M. Iri, Construction of the Voronoi diagram for 'one million' generators in singleprecision arithmetic, Proc. IEEE 80 (9) (1992), 1471-1484. [243] K. Sugihara, Y. Ooishi and T. Imai, Topology-oriented approach to robustness and its applications to several Voronoi-diagram algorithms, Proc. 2nd Canad. Conf. Comput. Geom. (1990), 36-39. [244] K.J. Supowit, The relative neighborhood graph with an application to minimum spanning trees, J. ACM 30 (1983), 428^48. [245] A. Suzuki and M. Iri, Approximation of a tessellation of the plane by a Voronoi diagram, J. Oper. Res. Soc. Japan 29 (1986), 69-96. [246] T.-S. Tan, Optimal two-dimensional triangulations, PhD thesis, Univ. of lUinois at Urbana-Champaign (1993). [247] M. Tanemura, T. Ogawa and W. Ogita, A new algorithm for three-dimensional Voronoi tesselation, J. Comput. Phys. 51 (1983), 191-207. [248] W.P Thurston, The geometry of dries: Voronoi diagrams, moebius transformations, convex hulls, fortune's algorithm, the cut locus and parametrization of shapes. Technical Report, Princeton University (1986). [249] G.T. Toussaint, The relative neighbourhood graph of a finite planar set. Pattern Recogn. 12 (1980), 261268. [250] P.M. Vaidya, Minimum spanning trees in k-dimensional space, SIAM J. Comput. 17 (1988), 572-582. [251] P.M. Vaidya, A sparse graph almost as good as the complete graph on points in K dimensions. Discrete Comput. Geom. 6 (1991), 369-381. [252] G.F. Voronoi, Deuxieme memoire: recherches sur les paralleloedres primitifs, J. Reine Angew. Math. 136 (1909), 67-181. [253] G.M. Voronoi, Nouvelles applications des parametres continus a la theorie des formes quadratiques. deuxieme Memoire: Recherches sur les parallelloedres primitifs, J. Reine Angew. Math. 134 (1908), 198-287. [254] C.A. Wang, Efficiently updating the constrained Delaunay triangulations, BIT 33 (1993), 238-252. [255] C.A. Wang and L. Schubert, An optimal algorithm for constructing the Delaunay triangulation of a set of line segments, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 223-232. [256] D.F. Watson, Computing the n-dimensional Delaunay tesselation with applications to Voronoi polytopes, Comput. J. 24(2) (1981), 167-172. [257] E. Welzl, Smallest enclosing disks {balls and ellipsoids). New Results and New Trends in Computer Science, H. Maurer, ed.. Lecture Notes in Comput. Sci. 555, Springer-Verlag (1991), 359-370. [258] P. Widmayer, Y.F. Wu and C.K. Wong, On some distance problems infixed orientations, SIAM J. Comput. 16 (1987), 728-746. [259] A.C. Yao, On constructing minimum spanning trees in k-dimensional spaces and related problems, SIAM J. Comput. 11 (1982), 721-736. [260] C.-K. Yap, Algorithmic motion planning. Advances in Robotics 1: Algorithmic and Geometric Aspects of Robotics, J.T. Schwartz and C.-K. Yap, eds, Lawrence Erlbaum Associates, Hillsdale, NJ (1987), 95-143. [261] C.K. Yap, An 0{n\ogn) algorithm for the Voronoi diagram of a set of simple curve segments. Discrete Comput. Geom. 2 (1987), 365-393. [262] B. Zhu and A. Mirzaian, Sorting does not always help in computational geometry, Proc. 3rd Canad. Conf. Comput. Geom. (1991), 239-242.
CHAPTER 6
Mesh Generation Marshall Bern Xerox Palo Alto Research Center, 3333 Coyote Hill Rd., Palo Alto, CA 94304 E-mail: bem @parc.xerox, com
Paul Plassmann* Department of Computer Science and Engineering, The Pennsylvania State University, University Park, PA 16802 E-mail: [email protected]
Contents 1. Introduction 1.1. Types of geometric domains 1.2. Types of meshes 1.3. Organization 2. Numerical methods 2.1. Discrete formulation 2.2. Solution methods 3. Element shape 4. Structured two-dimensional meshes 5. Unstructured two-dimensional meshes 5.1. Delaunay triangulation 5.2. Constrained Delaunay triangulation 5.3. Quadtrees 5.4. Mesh refinement and derefinement 5.5. Mesh improvement 5.6. Theoretical questions 6. Hexahedral meshes 6.1. Multiblock meshes 6.2. Cartesian meshes 6.3. Unstructured hexahedral meshes 7. Tetrahedral meshes 7.1. Delaunay triangulation
293 293 294 295 296 296 298 299 300 303 303 306 308 309 312 313 316 316 317 318 319 320
* Supported by the Mathematical, Information, and Computational Sciences Division subprogram of the Office of Computational and Technology Research, U.S. Department of Energy, under Contract W-31-109-Eng-38.
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved 291
292 12. Advancing front 7.3. Octrees 7.4. Refinement and improvement 8. Conclusions References
M. Bern and P. Plassmann 322 323 324 326 327
Mesh generation
293
1. Introduction A mesh is a discretization of a geometric domain into small simple shapes, such as triangles or quadrilaterals in two dimensions and tetrahedra or hexahedra in three. Meshes find use in many application areas. In geography and cartography, meshes give compact representations of terrain data. In computer graphics, most objects are ultimately reduced to meshes before rendering. Finally, meshes are almost essential in the numerical solution of partial differential equations arising in physical simulation. In this chapter, we concentrate on algorithms for this last application, assuming an audience including both practitioners such as engineers and theoreticians such as computational geometers and numerical analysts. 1.1. Types of geometric domains We divide the possible inputs first according to dimension — two or three. We distinguish four types of planar domains, as shown in Figure 1. For us, a simple polygon includes both boundary and interior. A polygon with holes is a simple polygon minus the interiors of some other simple polygons; its boundary has more than one connected component. A multiple domain is more general still, allowing internal boundaries; in fact, such a domain may be any planar straight-line graph in which the infinite face is bounded by a simple cycle. Multiple domains model objects made from more than one material. Curved domains allow sides that are algebraic curves such as splines. As in the first three cases, collectively known as polygonal domains, curved domains may or may not include holes and internal boundaries. Three-dimensional inputs have analogous types. A simple polyhedron is topologically equivalent to a ball. A general polyhedron may be multiply connected, meaning that it is topologically equivalent to a solid torus or some other higher genus solid; it may also have cavities, meaning that its boundary may have more than one connected component. We do assume, however, that at every point on the boundary of a general polyhedron a sufficiently small sphere encloses one connected piece of the polyhedron's interior and one connected piece of its exterior. Finally, there are multiple polyhedral domains — general polyhedra with internal boundaries — and three-dimensional curved domains, which typically have boundaries defined by spline patches. Construction and modeling of domain geometry lie outside the scope of this chapter, so we shall simply assume that domains are given in some sort of boundary representation, without specifying the exact form of this representation. Computational geometers typically assume exact, combinatorial data structures, such as linked lists for simple polygons and polygons with holes, doubly connected edge lists [103] or quad-edge structures [63] for planar multiple domains, and winged-edge structures [44,62] for polyhedral domains. In practice, complicated domains are designed on computer aided design (CAD) systems. These systems use surface representations designed for visual rendering, and then translate the final design to another format for input to the mesh generator. The Stereolithography Tessellation Language (STL) file format, originally developed for the rapid prototyping of solid models, specifies the boundary as a list of surface polygons (usually triangles) and surface normals. The advantages of the STL input format are that a "watertight" model can be ensured and model tolerance (deviation from the CAD model) can
294
M. Bern and P. Plassmann
S:
K
D
O
K
Fig. 1. Types of two-dimensional inputs: (a) simple polygon, (b) polygon with holes, (c) multiple domain, and (d) curved domain.
be specified by the user. The Initial Graphics Exchange Specification (IGES) format enables a variety of surface representations, including higher-order representations such as B-splines and NURBs. Perhaps due to its greater complexity, or to sloppy CAD systems or users, IGES files often contain incorrect geometry (either gaps or extra material) at surface intersections. An alternative approach to format translation is to directly query the CAD system with, say, point-enclosure queries, and then construct a new representation based on the answers to those queries. This approach is most advantageous when the translation problem is difficult, as it may be in the case of implicit surfaces (level sets of complicated functions) or constructive solid geometry formulas. With either approach, translation or reconstruction by queries, the CAD model must be topologically correct and sufficiently accurate to enable meshing. We expect to see greater integration between solid modeling and meshing in the future. 1.2, Types of meshes A structured mesh is one in which all interior vertices are topologically alike. In graphtheoretic terms, a structured mesh is an induced subgraph of an infinite periodic graph such as a grid. An unstructured mesh is one in which vertices may have arbitrarily varying local neighborhoods. A block-structured or hybrid mesh is formed by a number of small structured meshes combined in an overall unstructured pattern. In general, structured meshes offer simplicity and easy data access, while unstructured meshes offer more convenient mesh adaptivity (refinement/derefinement based on an initial solution) and a better fit to complicated domains. High-quality hybrid meshes enjoy the advantages of both approaches, but hybrid meshing is not yet fully automatic. We shall discuss unstructured mesh generation at greater length than structured or hybrid mesh generation, both because the unstructured approach seems to be gaining ground and because it is more closely connected to computational geometry. The division between structured and unstructured meshes usually extends to the shape of the elements: two-dimensional structured meshes typically use quadrilaterals, while unstructured meshes use triangles. In three dimensions the analogous element shapes are hexahedra, meaning topological cubes, and tetrahedra. There is, however, no essential reason for structured and unstructured meshes to use different element shapes. In fact it is
Mesh
generation
295
SmSi Fig. 2. Types of meshes: (a) structured, (b) unstructured, and (c) block-structured.
Fig. 3. (a) Triangulating quadrilaterals, (b) Subdividing triangles to form quadrilaterals.
possible to subdivide elements in order to convert between triangles and quadrilaterals (Figure 3) and between tetrahedra and hexahedra.
1.3. Organization Section 2 gives a brief survey of numerical methods and their implications for mesh generation. Section 3 discusses the influence of element shape on accuracy and convergence time. Sections 4 and 5 cover structured and unstructured two-dimensional meshes. Section 6 discusses three-dimensional hexahedral mesh generation, including structured, hybrid, and unstructured approaches. Finally, Section 7 describes three-dimensional unstructured tetrahedral mesh generation. We shall explain the basic computational geometry results as they arise within a larger context; however, Section 5 concludes with a separate theoretical discussion, because unstructured planar mesh generation is especially rich in interesting geometric questions. Throughout this article, we emphasize practical issues; an earlier survey by Bern and Eppstein [24] emphasized theoretical results. Although there is inevitably some overlap between these two surveys, we intend them to be complementary.
296
M. Bern and P. Plassmann
Mesh generation has a huge literature and we cannot hope to cover all of it. There are excellent references on numerical methods [34,125], structured mesh generation [35,61, 86,130,131], and unstructured mesh generation [24,60,85,86,131]. There are also several nice Web sites [99,113,117,145] with up-to-date information on mesh generation.
2. Numerical methods Scientific computing seeks accurate discrete models for continuous physical phenomena. We can divide the process into three interdependent steps: problem formulation, mesh generation, and equation solution. In this section, we discuss discretization and solution methods and their impact on mesh generation.
2.1. Discrete formulation There are a number of approaches to the discrete approximation of partial differential equations (PDEs) modeling a physical system. Here we briefly review the standard discretization methods: finite difference, finite element, and finite volume. Although these methods result in linear systems of similar structure, the desired characteristics of meshes for these methods differ. The finite difference method [128] replaces a continuous differential operator with a difference approximation. Consider the partial differential equation Cu = / ,
(1)
where C is some differential operator and w is a function of position and possibly also of time. We seek an approximate solution of (1) on some geometric domain Q. A standard finite difference approach replaces C with a discrete stencil. Writing Uk = u(xk) for the value of u at mesh vertex position Xk, the action of the stencil at xi can be approximated by Cu(Xi) ^
22
^iki^k,
kGndjixi)
where adj(x/) is the set of points adjacent to xi in the mesh and Aik is a set of weights depending only on C and the geometry of the mesh. The right-hand side of (1) can also be discretized, yielding a system of linear equations n
Y,AiuUk = fi
(2)
k=\
to be solved for the unknowns Uk. Because the finite difference stencil gives nonzero weight only to neighboring vertices, this system will be quite sparse.
Mesh generation
297
It is convenient to use the same stencil throughout the mesh; this restriction simphfies not only the software but also the mathematics, because the convergence properties of a particular stencil can be analyzed by Taylor series expansion. A finite difference stencil gives a more accurate approximation of a continuous operator when the edges meeting at vertices are nearly orthogonal. For these reasons, the finite difference method usually relies on structured meshes. Tht finite element method [125] approximates the solution rather than the equation. The essential idea is to replace the continuous function w(x) with the finite-dimensional approximation u{x) = YTk^x ^k(pkM, where the 0/^ are basis functions with local support. These basis functions are typically low-order polynomials, so that the action of the differential operator, C(pk^ is easy to compute. Because the approximation u(x) is defined everywhere on the domain, an analysis of convergence can be made in a continuous norm instead of pointwise as in the finite difference method. The finite element method obtains a discrete approximation by demanding that the differential equations be satisfied for some set of test functions ^/ri (x):
f (CU)ifi= f JQ
fifi.
JQ
An implementation of the finite element method involves the computation of coefficients Aik= f {C(l>k)^i = y\ (iCcPk)^i. -^^ eel J ' where Iik denotes the set of elements for which both the basis function (pk and the test function V^/ are nonzero. The unknowns Uk can now be expressed in terms of the A//^'s by a sparse linear system of equations, of the same overall form as (2). Finite-element methods are typically no more complicated on unstructured meshes than on structured meshes. Furthermore, there is no real advantage to mesh edges meeting orthogonally. For these reasons, unstructured meshes find broad and increasing use in finite element methods. Tht finite volume method is motivated by physical conservation laws. The infinitesimal version of a conservation law is of the form ^ + V.<1> = 0, dt where p is the density and ^ is the flux of the conserved quantity. In order to maintain the same physical conservation law on a discrete level, the finite volume method defines control volumes, and requires that on each control volume ^y d
&t,
.
f "^f J Qy
JdQy
where n is the normal to the surface of the volume. The finite volume method models fluid dynamics problems especially well, because pressure and velocity can be represented at centers and vertices of volumes, respectively.
298
M. Bern and P. Plassmann
Cell-centered control volumes are usually identical to mesh elements, while vertexcentered control volumes form a dual mesh with one volume for each vertex of the original mesh. There are several ways to define vertex-centered control volumes. Two regular grids may be overlaid, staggered by half an element, or in the case of unstructured meshes, the Delaunay triangulation may be used for the mesh, and its dual — the Voronoi diagram — for the control volumes.
2.2. Solution methods The solution of the sparse linear system is usually the most computationally demanding of the three steps. Solution methods include direct factorization and preconditioned iterative methods, methods which can vary dramatically in required storage and computational cost for different problems. Moreover, the discrete formulation and mesh generation steps greatly influence the efficacy of a solution method. For example, if one chooses to use higher-order basis functions in the finite element method, one can use a coarser mesh, and a smaller but denser linear system. Direct factorization methods, such as sparse Cholesky or LU factorization, tend be slower but more robust than iterative methods. Luckily the extra computational cost can be amortized when the factorization is reused to solve for more than one right-hand side. An important issue in direct methods is ordering the vertices to minimize the "fill", the number of intermediate nonzeros. Nested dissection [72] uses graph separators to save an asymptotic factor of 0{n^^^) in the fill. Any planar graph admits separators of size 0(n ^/^); reasonable three-dimensional meshes admit separators of size 0(^2/3) [89]. Iterative methods [17] have proved effective in solving the linear systems arising in physical modeling. Most large problems cannot be effectively solved without the use of preconditioning. A popular preconditioner involves an incomplete factorization. Rather than computing^the exact factors for the matrix A = LU, approximate factors are computed such that A^ LU and the preconditioned system L-^AU-\Uu)
= L-^f
is solved iteratively. Ideally, the incomplete factors should be easy to compute and require a modest amount of storage, and the condition number of the preconditioned system should be much better than the original system. Multigrid methods [140] can achieve the ultimate goal of iterative methods, convergence in 0(1) iterations, for certain classes of problems. These methods use a sequence of meshes, graded from fine to coarse. The iterative solution of the fine linear system is accelerated by solving the coarser systems. The cycle repeatedly projects the current residual from a finer mesh onto the next coarser mesh and interpolates the solution from the coarser mesh onto the finer. One drawback of multigrid is that computing a sequence of meshes may be difficult for complicated geometries. Domain decomposition [122] represents something of a hybrid between iterative and direct approaches. This approach divides the domain into possibly overlapping small domains; it typically solves subproblems on the small domains directly, but iterates to the
Mesh generation
299
global solution in which neighboring subproblem solutions agree. This approach enjoys some of the superior convergence properties of multigrid methods, while imposing less of a burden on the mesh generator. In fact, the domain is often partitioned so that subproblems admit structured meshes. 3. Element shape The shapes of elements in a mesh have a pronounced effect on numerical methods. For purposes of discussion, let us define the aspect ratio of an element to be the ratio of its maximum to its minimum width, where width refers to the distance between parallel supporting hyperplanes. There are many other roughly equivalent definitions of aspect ratio. In general, elements of large aspect ratio are bad. Large aspect ratios lead to poorly conditioned matrices, worsening the speed and accuracy of the linear solver. Speed degrades before accuracy; a triangular mesh with a rather mild sharpest angle (say 10°) can be noticeably slower than a triangular mesh with a minimum angle of 45°. Moreover, even assuming that the solver gives an exact answer, large aspect ratios may give unacceptable interpolation error. Here it is useful to distinguish between two different types of poor aspect ratio. Early results [39] showed convergence as triangular elements shrink, assuming that all angles are bounded away from 0°. Later analysis [6], however, showed convergence assuming only that angles are bounded away from 180°, a weaker condition. The generalization of this result to three dimensions assumes dihedrals bounded away from 0°. Bank and Smith [13] recently proposed a triangle quality measure based on an analysis of interpolation error: the area of a triangle divided by the sum of squared edge lengths. This measure slightly favors sharp triangles over flat triangles. Sometimes, however, elements of large aspect ratio are good! If the solution to the differential equation is anisotropic, meaning that its second derivative varies greatly with direction, then properly aligned high-aspect-ratio elements give a very efficient mesh. The ideal aspect ratio of a triangle is the square root of the ratio of the largest to smallest eigenvalues of the Hessian [106]. For triangular meshes, it does not make much difference whether long skinny elements have large angles as well as small angles, but if the aspect ratio exceeds the ideal then large angles are worse than small [106]. Fluid flow problems, especially full Navier-Stokes simulation (that is, viscosity included), are strongly anisotropic. For example, in aerodynamic simulations ideal aspect ratios may reach 10,000 along the surface of the aircraft. Quadrilateral and hexahedral meshes have an advantage in accuracy over triangular and tetrahedral meshes for controlvolume formulations of these problems, as they allow faces of elements in the boundary layer to be either almost parallel or almost orthogonal to the surface. Simulations with shock fronts — for example, supersonic airflowover a wing — are also strongly anisotropic. In this case, however, the locations and directions for high-aspectratio elements cannot be predicted in advance. The need for adaptivity (remeshing based on an initial solution) now tilts the balance in favor of triangles and tetrahedra [36]. Simpson [121] discusses and surveys the literature on anisotropy. Element shape affects another property of the linear system besides condition number. A triangular mesh with well-shaped elements gives a symmetric M-matrix — positive definite with negative off-diagonal entries — for a finite element formulation of an equation
300
M Bern and P. Plassmann
with a Laplacian operator. M-matrices are exactly those matrices that satisfy a discrete maximum principle; this desirable property rules out oscillation of the numerical method. In this case, "well-shaped" has a precise meaning: the two angles opposite each interior edge of the mesh should sum to at most 180° [18,40]. This requirement implies that no quadrilaterals are "reversed" (Section 5.1), so the triangulation must be the Delaunay or constrained Delaunay triangulation. Depending on the boundary conditions associated with the differential equation, an M-matrix may also require that the single angle opposite a boundary edge should measure at most 90°. This requirement goes beyond Delaunay, but it is not hard to satisfy this requirement for domains without internal boundaries: simply split outwards-facing obtuse angles by dropping perpendiculars to the boundary, flip back to a new Delaunay triangulation, and repeat until there are no reversed quadrilaterals and no outwards-facing obtuse angles. In three dimensions, an unstructured tetrahedral mesh gives an M-matrix if and only if, for each edge e' in the mesh, the sum ^ ^ \e\ coiOe is nonnegative, where the sum is over all edges e that are opposite to e' in tetrahedra of the mesh, and where \e\ denotes the length of e and Oe the dihedral angle at ^ [141]. All such sums will be nonnegative if all dihedrals in the mesh are nonobtuse, but this condition is more restrictive than necessary. Finally, in a finite volume formulation of Poisson's equation, a Delaunay mesh with Voronoi control volumes gives an M-matrix even in three dimensions [88]. The finite volume formulation — but not the finite element formulation — can tolerate Delaunay tetrahedra of large aspect ratio, so long as all control volumes have good aspect ratios [88]. The disparity between the two formulations is surprising, because they give the very same matrix in two dimensions. 4. Structured two-dimensional meshes Structured meshes offer simplicity and efficiency. A structured mesh requires significantly less memory — say a factor of three less — than an unstructured mesh with the same number of elements, because array storage can define neighbor connectivity implicitly. A structured mesh can also save time: to access neighboring cells when computing a finite difference stencil, software simply increments or decrements array indices. Compilers produce quite efficient code for these operations; in particular, they can optimize the code for vector machines. On the other hand, it can be difficult or impossible to compute a structured mesh for a complicated geometric domain. Furthermore, a structured mesh may require many more elements than an unstructured mesh for the same problem, because elements in a structured mesh cannot grade in size as rapidly. These two difficulties can be solved by the hybrid structured/unstructured approach, which decomposes a complicated domain into blocks supporting structured grids. Hybrid approaches, however, are not yet fully automatic, requiring user guidance in the decomposition step. A complicated three-dimensional hybrid mesh (see Section 6.1) can take weeks or even months of work; hence hybrid approaches are typically used only late in the design cycle. Structured mesh generation can be roughly classified into hand-generated and other elementary approaches, algebraic or interpolation methods, and PDE or variational methods [129]. The PDE approach [35,73] solves partial differential equations in order to map
Mesh
generation
301
Fig. 4. The conformal mapping / from the domain i?, defined by a boundary discretization, to a rectangle R. The inverse of the mapping maps a grid on R onto a structured mesh for Q.
the domain ^ onto another domain with a convenient coordinate system. In this section, we discuss an elHptic PDE approach [82] with a connection to the classical topic of conformal mapping. A mapping of a region Q of the complex plane is conformal if it preserves angles; in other words, the angle between any two curves intersecting at a point z € i? is preserved by the mapping. The Riemann mapping theorem states that for any topological disk Q, there exists a conformal mapping / that takes the interior of Q one-to-one onto the interior of any other topological disk (such as the unit disk or square). There is an obvious connection to mesh generation: a conformal mapping of Q onto a square grid induces a structured mesh on ^ with the property that element angles tend towards 90° in the limit of an increasingly fine discretization. Unfortunately, the Riemann mapping theorem only proves the existence of a conformal mapping; it does not give an algorithm. Let us write z = x -\-iy and consider the the complex function f{z) = ^{x,y)-\- ir]{x, y). If / is analytic — as a conformal / will be, assuming f\z) 7^ 0 — then it satisfies the Cauchy-Riemann equations: ^x = ^y and ^y — —r]^. Thus the functions § and rj must each be harmonic and satisfy Laplace's equation, so that V^^ = 0 and V^rj = 0.lf f is conformal, its inverse is as well; therefore, x and y as functions of § and r] are also harmonic and satisfy V^x = 0 and V^y = 0. Consider the regions Q and R in Figure 4, and assume we already have a discretization of the boundary of Q. (Finding a suitable boundary discretization may itself be a nontrivial task.) The obvious algorithm is to solve V^x = 0 and V^y = 0, assuming x and y are given on the boundary of R. However, this approach may not work. One may obtain poorly shaped or even inverted elements as shown in Figure 5(a). The problem is that the solutions X and y may be harmonic, but not harmonic conjugate (i.e., satisfy the Cauchy-Riemann equations). The algorithm can be partially mended [35] by obtaining a better estimate for M, the rectangle height implied by the discretization of the boundary of ^ . If we scale the original coordinates of the rectangle ($, rj) onto a square with coordinates (/x, v) with the mapping /x = § and V == rj/M we obtain the system M^
^iifi
+ Xvv = 0 ,
M y^^ + yvv = 0.
(3)
302
M Bern and P. Plassmann
Fig. 5. The grid on left was obtained by solving (3) with unit aspect ratio, resulting in a folded-over mesh. On the right, a more appropriate aspect ratio has been chosen.
From the first-order Cauchy-Riemann equations we have
M^^{xl + yl)l{xl + yl). Barfield [16] obtained reasonable nonoverlapping meshes by estimating the average value of the right hand side of the above equation and using this value for M. One can think of M as an average aspect ratio for the original domain; if ideal aspect ratio varies significantly over the domain one can also make this number a function of position. This approach can be successful for many physical problems, and can be improved significantly if the generated grid is smoothed as a postprocessing step. This approach can also be extended to three dimensions, where the Riemann mapping theorem no longer holds, by the addition of another "average aspect ratio" term. Although the approach just sketched works quite well for some domains, it does not guarantee the generation of a valid mesh. It is interesting that the inverse problem, solving the harmonic equations (4) Vxx + Vvv =
0
does guarantee a solution with no inverted elements and a nonvanishing Jacobian [49,123]. Solving the problem in this form is more difficult, because it requires a discretization of the domain for which we want to find a grid. However, the system can be inverted to form the nonlinear elliptic system [35] ocx^^i - ipx^iv + yx,n> = 0, ay^^ - 2Py^j,y + yy^^ = 0, where
p = x^Xy + y^yv
y = ^l + yl'
Mesh generation
303
Software designed to solve these systems often includes an additional source term on the right-hand sides of the harmonic system in (4) to control the local point spacing in the domain [129]. The elliptic method just discussed, though motivated by conformal mapping, does not compute true conformal mappings. A true conformal mapping induces a structured mesh with certain advantages; for example, the Laplacian is the limit of the second-order difference on such a grid. True conformal mapping, however, does not seem to be widely used in mesh generation, perhaps because algorithms to compute such mappings are relatively slow, or because they do not allow local control of point spacing. In the case that ^ is a simple polygon, the Schwarz-Christoffel formula offers an explicit form for the conformal mappings from the unit disk D io Q. Such a mapping can in turn be used to find conformal mappings from ^ to a square or rectangle. Let the points in the complex plane defining the polygon (in counterclockwise order) be z i , . . . , Z/i, the interior angles at these points be a i , . . . , a ^ , and define the normalized angles as P/^=ak/7t — 1. Using coi,.. .,(On as the preimages of z\, • - •,Zn on the edge of the disk, the Schwarz-Christoffel formula gives the form of the conformal mapping as f{a,) = A-\-B
f](l-§M)^^df •^^
(5)
k=\
There are several programs available to solve for the unknown cok values: SCPACK by Trefethen [133], the SC Toolbox by Driscoll [47], and CRDT by DriscoU and Vavasis [48]. One difficulty in the numerical solution is "crowding", enormous variation in spacing between the (Dk points. CRDT, the latest and apparently best Schwarz-Christoffel algorithm, overcomes this difficulty by repeatedly remapping so that crowding does not occur near the points being evaluated.
5. Unstructured two-dimensional meshes We have already mentioned the advantages of unstructured meshes: flexibility in fitting complicated domains, rapid grading from small to large elements, and relatively easy refinement and derefinement. Unlike structured mesh generation, unstructured mesh generation has been part of mainstream computational geometry for some years, and there is a large literature on the subject. We consider three principled approaches to unstructured mesh generation in some detail; these approaches use Delaunay triangulation, constrained Delaunay triangulation, and quadtrees. Then we discuss mesh refinement and improvement. In the final section, we describe some geometric problems abstracted from unstructured mesh generation.
5.1. Delaunay triangulation Our first approach to unstructured mesh generation partitions the task into two phases: placement of mesh vertices, followed by triangulation. (Added points are called Steiner
304
M. Bern and P. Plassmann
points to distinguish them from the domain's original vertices.) If the placement phase is smart enough, the triangulation phase can be especially simple, considering only the input vertices and Steiner points and ignoring the input edges. The placement phase typically places vertices along the domain boundary before adding them to the interior. The boundary should be lined with enough Steiner points that the Delaunay triangulation of all vertices will conform to the domain. This requirement inspires a crisp geometric problem, called conforming Delaunay triangulation: given a polygonal domain Q, add Steiner points so that each edge of .^ is a union of edges in the Delaunay triangulation. An algorithm due to Saalfeld [112] lines the edges of Q with a large number of Steiner points, uniformly spaced except near the endpoints. A more efficient solution [96] covers the edges of Q by disks that do not overlap other edges. Edelsbrunner and Tan [52] gave the best theoretical result, an algorithm that uses 0{n^) Steiner points for an ^-vertex multiple domain. They also gave an Q{n^) lower bound example. There are several approaches to placing interior Steiner points. One approach [84] combines the vertices from a number of structured meshes. A second approach [10,95] adds Steiner points in successive layers, working in from the domain boundary as in advancing front mesh generation (Section 7.2). Figure 6 shows an example. A third approach [88, 137] chooses interior points at random according to some distribution, which may be interpolated from a coarse quadtree or "background" triangulation. An independent random sample is likely to produce some badly shaped triangles [26], so the generator should oversample and then filter out points too close to previously chosen points [88]. Finally, there are deterministic methods that achieve essentially the same effect as random sampling with filtering; these methods [29,120] define birth and death rules that depend upon the density of neighboring points. All of these methods can give anisotropy. The first and second approaches, structured submeshes and advancing front, offer local control of element shapes and orientations. These approaches may space points improperly where structured meshes or advancing fronts collide, but this flaw can usually be corrected by filtering points and later smoothing the mesh. The third and fourth approaches trade direct control over element shapes for ease of fitting complicated geometries. Nevertheless, one can achieve anisotropy with these approaches by computing the Delaunay triangulation within a stretched space [29,36,43]. For example, Bossen [29] uses a "background" triangulation to define local affine transformations; Delaunay flips (described below) are then made with respect to transformed circles. Stretched Delaunay triangulations have many more large angles than ordinary Delaunay triangulations, but this should not pose a problem unless the stretching exceeds the desired amount (Section 3). The triangulation phase uses the well-known Delaunay triangulation. The Delaunay triangulation of a point set S = [s\,S2,.. .,Sn} is defined by the empty circle condition: a triangle siSjSk appears in the Delaunay triangulation DT(5) if and only if its circumcircle encloses no other points of S. See Figure 7(a). There is an exception for points in special position: if an empty circle passes through four or more points of 5, we may triangulate these points — complete the triangulation — arbitrarily. So defined, DT(5) is a triangulation of the convex hull of 5. For our purposes, however, we can discard all triangles that fall outside the original domain Q.
Mesh
generation
305
Fig. 6. Delaunay triangulation of points placed by an advancing front (T. Barth).
Fig. 7. (a) Delaunay triangulation. (b) A reversed quadrilateral.
There are a number of practical Delaunay triangulation algorithms [56]. We describe only one, called the edge flipping algorithm, because it is most relevant to our subsequent discussion. Its worst-case running time of O(n^) is suboptimal, but it performs quite well in practice. The edge flipping algorithm starts from any triangulation of S and then locally optimizes each edge. Let e be an internal (non-convex-hull) edge and Qe be the triangulated quadrilateral formed by the triangles sharing e. Quadrilateral Qe is reversed if the two angles without the diagonal sum to more than 180°, or equivalently, if each triangle circumcircle contains the opposite vertex as in Figure 7(b). If Qe is reversed, we "flip" it by exchanging e for the other diagonal. compute an initial triangulation of S place all internal edges onto a queue while the queue is not empty do remove the first edge e if quadrilateral Qe is reversed then flip it and add the outside edges of Qe to the queue endif endwhile An initial triangulation can be computed by a sweep-line algorithm. This algorithm adds the points of S by x-coordinate order. Upon each addition, the algorithm walks around the
306
M. Bern and P. Plassmann ^4.
Fig. 8. A sweep-line algorithm for computing an initial triangulation.
convex hull of the already-added points, starting from the rightmost previous point and adding edges until the slope reverses, as shown in Figure 8. The following theorem [45] guarantees the success of edge flipping: a triangulation in which no quadrilateral is reversed must be a completion of the Delaunay triangulation.
5.2. Constrained Delaunay triangulation There is another way, besides conforming Delaunay triangulation, to extend Delaunay triangulation to polygonal domains. The constrained Delaunay triangulation of a (possibly multiple) domain ^ does not use Steiner points, but instead redefines Delaunay triangulation in order to force the edges of Q into the triangulation. A point p is visible to a point q'mQ li the open line segment pq Hes within Q and does not intersect any edges or vertices of ^ . The constrained Delaunay triangulation CDT(^) contains each triangle not cut by an edge of i?, that has an an empty circumcircle, where empty now means that the circle does not contain any vertices of Q visible to points inside the triangle. The visibility requirement means that external proximities, where ^ wraps around to nearly touch itself, have no effect. Figure 9 provides an example; here vertex v is not visible to any point in the interior of triangle abc. The edge flipping algorithm can be generalized to compute the constrained Delaunay triangulation, only this time we do not allow edges of I? onto the queue. Obtaining an initial triangulation is somewhat more difficult for polygonal domains than for point sets. The textbook by Preparata and Shamos [103] describes an 0(«logn)-time algorithm for computing an initial triangulation. This algorithm first adds edges to Q to subdivide it into easy-to-triangulate "monotone" faces. Ruppert [111], building on work of Chew [38], gave a mesh-generation algorithm based on constrained Delaunay triangulation. (Subsequently, Mitchell [90] sharpened Ruppert's analysis, and Shewchuk [117,118] further refined the algorithm and made an implementation available on the Web.) Ruppert's algorithm computes the constrained Delaunay triangulation at the outset and then adds Steiner points to improve the mesh, thus uniting the two phases of the approach described in the last section. In choosing this approach, the
Mesh
generation
307
Fig. 9. The constrained Delaunay triangulation of a polygon with holes.
Fig. 10. A mesh computed by Ruppert's algorithm (J. Ruppert).
user gives up some control over point placement, but obtains a more efficient mesh with fewer and "rounder" triangles. The first step of Ruppert's mesh generator cuts off all vertices of the domain Q at which the interior angle measures less than 45°. The cutting line at such a vertex v should not introduce a new small feature to ^ ; it is best to cut off an isosceles triangle whose base is about halfway from v to its closest visible neighbor. If v has degree greater than two, as might be the case in a multiple domain, then the bases of the isosceles triangles around v should match up so that no isosceles triangle receives a Steiner point on one of its legs. Next the algorithm computes the constrained Delaunay triangulation of the modified domain. The algorithm then goes through the loop given below. The last line of the loop repairs a constrained Delaunay triangulation after the addition of a new Steiner point c. To accomplish this step, there is no need to recompute the entire triangulation. The removed
308
M. Bern and P. Plassmann
old triangles are exactly those with circumcircles containing c, which can be found by searching outwards from the triangle that contains c, and the new triangles that replace the removed triangles must all be incident to the new vertex c. while there exists a triangle t with an angle smaller than 20° do let c be the center of r's circumcircle if c lies within the diameter semicircle of a boundary edge e then add the midpoint m of ^ else add c endif recompute the constrained Delaunay triangulation endwhile The loop is guaranteed to halt with all angles larger than 20°. At this point, the cutoff isosceles triangles are returned to the domain, and the mesh is complete. Ruppert's algorithm comes with a strong theoretical guarantee: all new angles, that is, angles not present in the input, are greater than 20°, and the total number of triangles in the mesh is at most a constant times the minimum number of triangles in any such no-small-angle mesh. To prove this efficiency result, Ruppert shows that each triangle in the final mesh is within a constant factor of the local feature size at its vertices. The local feature size at point p e Q is defined to be the radius of the smallest circle centered at p that touches two nonadjacent edges of the boundary; this is a spacing function intrinsic to the domain.
5.3. Quadtrees A quadtree mesh generator [8,25,143] starts by enclosing the entire domain ^ inside an axis-aligned square. It splits this root square into four congruent squares, and continues splitting squares recursively until each minimal — or leaf — square intersects ^ in a simple way. Further splits may be dictated by a user-defined spacing function or balance condition. Quadtree squares are then warped and cut to conform to the boundary. A final triangulation step gives an unstructured triangular mesh. We now describe a particular quadtree mesh generator due to Bern, Eppstein, and Gilbert [25]. As first presented, the algorithm assumes that ^ is a polygon with holes; however, the algorithm can be extended to multiple and even to curved domains. In fact, the quadtree approach handles curved domains more gracefully than the Delaunay and constrained Delaunay approaches, because the splitting phase can automatically adapt to the curvature of enclosed boundary pieces. The algorithm of Bern et al. splits squares until each leaf square contains at most one connected component of ^ ' s boundary, with at most one vertex. Mitchell and Vavasis [91] improved the splitting phase by "cloning" squares that intersect Q in more than one connected component, so that each copy contains only a single connected component of Q. The algorithm then splits squares near vertices of Q two more times, so that each vertex lies within a buffer zone of equal size squares. Next the mesh generator imposes a balance condition: no square should be adjacent to one less than one-half its size. This causes more splits to propagate across the quadtree, increasing the total number of leaf squares by a constant factor (at most 8). Squares are
Mesh
generation
309
Fig. 11. A mesh computed by a quadtree-based algorithm (S. Mitchell).
then warped to conform to the domain Q. Various warping rules work; we give just one possibihty. In the following pseudocode, \b\ denotes the side length of square b. for each vertex u of i? do let y be the closest quadtree vertex to v move y iov endfor for each leaf square b still crossed by an edge e do move the vertices of b that are closer than \b\/Aio eio their closest points on e endfor discard faces of the warped quadtree that lie outside Q Finally, the cells of the warped quadtree are triangulated so that all angles are bounded away from 0°. Figure 11 gives a mesh computed by a variant of the quadtree algorithm. This figure shows that cloning ensures appropriate element sizes around holes and "almost holes". Notice that a quadtree-based mesh exhibits preferred directions — horizontal and vertical. If this artifact poses a problem, mesh improvement steps can be used to redistribute element orientations. The quadtree algorithm enjoys the same efficiency guarantee as Ruppert's algorithm. In fact, the quadtree algorithm was the first to be analyzed in this way [25].
5.4. Mesh refinement and derefinement Adaptive mesh refinement places more grid points in areas where the PDF solution error is large. Local error estimates based on an initial solution are known as a posteriori error estimates [7] and can be used to determine which elements should be refined. For elliptic
310
M. Bern and P. Plassmann
problems these estimators asymptotically bound the true error and can be computed locally using only the information on an element [138]. One approach to mesh refinement [71] iteratively inserts extra vertices into the triangulation, typically at edge bisectors or triangle circumcenters as in Section 5.2. New vertices along the boundaries of curved domains should be computed using the curved boundary rather than the current straight edge, thereby giving a truer approximation of the domain as the mesh refines [36]. Iterative vertex insertion may be viewed as a mesh improvement step (Section 5.5), and indeed several generators [29,119,139] have combined insertion/deletion, flipping, and smoothing into a single loop. Iterative vertex insertion gives a finer mesh, but not a nesting or edge conforming, refinement of the original mesh, meaning a mesh that includes the boundaries of the original triangles. Nesting refinements simplify the interpolation step in the multigrid method (Section 2.2). To compute such a refinement, we turn to another approach. This approach splits triangles in need of refinement, by adding the midpoints of sides. The pseudocode below gives the overall approach. solve the differential equation on the initial mesh TQ estimate the error on each triangle while the maximum error on a triangle is larger than the given tolerance do based on error estimates, mark a set of triangles Sk to refine * divide the triangles in Sk, along with adjacent invalid triangles to get T^^i solve the differential equation on T^+i estimate the error on each triangle k = k+\ endwhile There are a number of popular alternatives for step *, in which the current mesh Tk is adaptively refined. In regular refinement [11,12], the midpoints of the sides of a marked triangle are connected, as in Figure 12(b), to form four similar triangles. Unmarked triangles that received two or three midpoints are split in the same way. Unmarked triangles that received only one midpoint are bisected by connecting the midpoint to the opposite vertex as in Figure 12(a). Before the next iteration of •, bisected triangles are glued back together and then marked for refinement; this precaution guarantees that each triangle in Tk^\ will either be similar to a triangle in To or be the bisection of a triangle similar to a triangle in TQ. Thus, regular refinement — regardless of the number of times through the refinement loop — produces a mesh with minimum angle at least half the minimum angle in 7b. Hence the angles in T^+i are bounded away from 0 and n. Rivara [107-109] proposed several alternatives for step • based on triangle bisection. One method refines each marked triangle by cutting from the opposite vertex to the midpoint of the longest edge. Neighboring triangles are now invalid, meaning that one side contains an extra vertex; these triangles are then bisected in the same way. Bisections continue until there are no remaining invalid triangles. Refinement can propagate quite far from marked triangles; however, propagation cannot fall into an infinite loop, because along a propagation path each bisected edge is longer than its predecessor. This approach, like the previous one, produces only a finite number of different triangle shapes — similarity
Mesh
generation
311
Fig. 12. A triangle divided by (a) bisection, and (b) regular refinement.
Fig. 13. The bisection algorithm given in the pseudocode splits invalid children of refined triangles to their subdivision points, rather than to their longest edges.
classes — and the minimum angle is again at least half the smallest angle in TQ. Quite often longest-edge refinement actually improves angles. A second Rivara refinement method is given in the pseudocode below and illustrated in Figure 13. This method does not always bisect the longest edge, so bisections tend to propagate less, yet the method retains the same final angle bound as the first Rivara method. Qi = Sk {Q denotes "marked" triangles to be refined} Ri =0 {R denotes children of refined triangles} while (Q/U/?/) 7^0 do bisect each triangle in Qi across its longest edge bisect each triangle in Rt across its subdivided edge add all invalid children of Qi triangles to Ri^\ add all other invalid triangles to 2/+i /= /+1 endwhile We now discuss the reverse process: coarsening or derefinement of a mesh. This process helps reduce the total number of elements when tracking solutions to time-varying differential equations. Coarsening can also be used to turn a single highly refined mesh into a sequence of meshes for use in the multigrid method [98]. Figure 14 shows a sequence of meshes computed by a coarsening algorithm due to Ollivier-Gooch. The algorithm marks a set of vertices to delete from the fine mesh, eliminates all marked vertices, and then retriangulates the mesh. The resulting mesh is node
312
M. Bern and P. Plassmann
Fig. 14. A sequence of meshes used by the multigrid method for solving the Unear systems arising in modeUng airflow over an airfoil (C. OUivier-Gooch).
conforming, meaning that every vertex of the coarse mesh appears in the fine mesh, but not edge conforming. One difficulty is that the shapes of the triangles degrade as the mesh is coarsened, due to increasing disparity between the interior and boundary point densities. Meshes produced by refinement methods are typically easier to coarsen than are less hierarchical meshes such as Delaunay triangulations. Teng, Talmor, and Miller [87] have recently devised an algorithm using Delaunay triangulations of well-spaced point sets, which produces a sequence of bounded-aspect-ratio, node-conforming meshes of approximately minimum depth.
5.5. Mesh improvement The most common mesh improvement techniques are flipping and smoothing. These techniques have proved to be very powerful in two dimensions, and together they can transform very poor meshes into very good ones, so long as the mesh starts with enough vertices. Flipping exchanges the diagonals of a triangulated quadrilateral as in the edge flipping algorithm for computing Delaunay triangulation (Section 5.1), only the criterion for making the exchange need not be the Delaunay empty circle test. Flipping can be used to regularize vertex degrees, minimize the maximum angle, or improve almost any other quality measure of triangles. For quality measures optimized by the Delaunay triangulation (Section 5.6.1), flipping computes a true global optimum, but for other criteria it computes only a local optimum. Mesh smoothing adjusts the locations of mesh vertices in order to improve element shapes and overall mesh quality [2,3,33,55,100]. In mesh smoothing, the topology of the mesh remains invariant, thus preserving important features such as the nonzero pattern of the linear system. Laplacian smoothing [55,77] is the most commonly used smoothing technique. This method sweeps over the entire mesh several times, repeatedly moving each adjustable vertex to the arithmetic average of the vertices adjacent to it. Variations weight each adjacent vertex by the total area of the elements around it, or use the centroid of the incident elements rather than the centroid of the neighboring vertices [139]. Laplacian smoothing is computationally inexpensive and fairly effective, but it does not guarantee improvement
Mesh
generation
313
Fig. 15. (a) A mesh resulting from bisection refinement without smoothing, (b) The same mesh after local optimization-based smoothing.
in element quality. In fact, Laplacian smoothing can even invert an element, unless the algorithm performs an explicit check before moving a vertex. Another class of smoothing algorithms uses optimization techniques to determine new vertex locations. Both global and local optimization-based smoothing offer guaranteed mesh improvement and validity. Global techniques simultaneously adjust all unconstrained vertices; such an approach involves an optimization problem as large as the number of unconstrained vertices, and consequently, is computationally very expensive [33,100]. Local techniques adjust vertices one by one — or an independent set of vertices in parallel [58] — resulting in a cost more comparable to Laplacian smoothing. Many quality measures, including maximum angle and area divided by sum of squared edge lengths, can be optimized by techniques related to linear programming [2]. Figure 15 shows the results of a local optimization-based smoothing algorithm developed by Freitag et al. [58]. The algorithm was applied to a mesh generated adaptively during the finite element solution of the linear elasticity equations on a two-dimensional rectangular domain with a hole. The mesh on the left was generated using the bisection algorithm for refinement; the edges from the coarse mesh are still evident after many levels of refinement. The mesh on the right was generated by a similar algorithm, only with vertex locations optimized after each refinement step. Overall, the global minimum angle has improved from 11.3°to21.7° and the average minimum element angle from 35.7° to 41.1°.
5.6. Theoretical questions We have mentioned some theoretical results — conforming Delaunay triangulation, nosmall-angle triangulation — in context. In this section, we describe some other theoretical work related to mesh generation.
314
M. Bern and P. Plassmann
5.6.1. Optimal triangulation. Computational geometers have studied a number of problems of the following form: given a planar point set or polygonal domain, find a best triangulation, where "best" is judged according to some specific quality measure such as maximum angle, minimum angle, maximum edge length, or total edge length. If the input is a simple polygon, most optimal triangulation problems are solvable by dynamic programming in time 0(f2^), but if the input is a point set, polygon with holes, or multiple domain, these problems become much harder. The Delaunay triangulation — constrained Delaunay triangulation in the case of polygonal domains — optimizes any quality measure that is improved by flipping a reversed quadrilateral; this statement follows from the theorem that a triangulation without reversed quadrilaterals must be Delaunay. Thus Delaunay triangulation maximizes the minimum angle, along with optimizing a number of more esoteric quality measures, such as maximum circumcircle radius, maximum enclosing circle radius, and "roughness" of a piecewiselinear interpolating surface [105]. As mentioned in Section 5.5, edge flipping can also be used as a general optimization heuristic. For example, edge flipping works reasonably well for minimizing the maximum angle [53], but it does not in general find a global optimum. A more powerful local improvement method called edge insertion [23,53] exactly solves the minmax angle problem, as well as several other minmax optimization problems. Edge insertion starts from an arbitrary triangulation and repeatedly inserts candidate edges. If minimizing the maximum angle is the goal, the candidate edge e subdivides the maximum angle; in general the candidate edge is always incident to a "worst vertex" of a worst triangle. The algorithm then removes the edges that are crossed by e, forming two polygonal holes alongside e. Holes are retriangulated by repeatedly removing ears (triangles with two sides on the boundary, as shown in Figure 16) with maximum angle smaller than the old worst angle Lcab. If retriangulation runs to completion, then the overall triangulation improves and edge be is eliminated as a future candidate. If retriangulation gets stuck, then the overall triangulation is returned to its state before the insertion of e, and e is eliminated as a future candidate. Each candidate insertion takes time 0{n), giving a total running time of 0(«^). compute an initial triangulation with all (2) edge slots unmarked while 3 an unmarked edge e cutting the worst vertex a of worst triangle abc do add e and remove all edges crossed by e try to retriangulate by removing ears better than abc if retriangulation succeeds then mark be else mark e and undo e's insertion endif endwhile Edge insertion can compute the minmax "eccentricity" triangulation or the minmax slope interpolating surface [23] in time 0{n^). By inserting candidate edges in a certain order and saving old partial triangulations, the running time can be improved to 0{n^ log n) for minmax angle [53] and maxmin triangle height. We close with some results for two other optimization criteria: maximum edge length and total length. Edelsbrunner and Tan [51] showed that a triangulation of a point set that minimizes the maximum edge length must contain the edges of a minimum spanning tree.
Mesh generation
315
Fig. 16. Edge insertion retriangulates holes by removing sufficiently good ears. Dotted lines indicate the old triangulation.
The tree divides the input into simple polygons, which can be filled in by dynamic programming, giving an 0(n-^)-time algorithm (improvable to 0(n^)). Whether a triangulation minimizing total edge length — "minimum weight triangulation" — can be solved in polynomial time is still open. The most promising approach [46] incrementally computes a set of edges that must appear in the triangulation. If the required edges form a connected spanning graph, then the triangulation can be completed with dynamic programming as in the minmax problem. 5.6.2. Steiner triangulation. The optimal triangulation problems just discussed have limited applicability to mesh generation, since they address only triangulation and not Steiner point placement. Because exact Steiner triangulation problems appear to be intractable, typical theoretical results on Steiner triangulation prove either an approximation bound such as the guarantees provided by the mesh generators in Sections 5.2 and 5.3, or an order of complexity bound such as Edelsbrunner and Tan's 0{n^) algorithm for conforming Delaunay triangulation. The mesh generators in Sections 5.2 and 5.3 give constant-factor approximation algorithms for what we may call the no-small-angle problem: triangulate a domain Q using a minimum number of triangles, such that all new angles are bounded away from 0°. The provable constants tend to be quite large — in the hundreds — although the actual performance seems to be much better. The number of triangles in a no-small-angle triangulation depends on the geometry of the domain, not just on the number of vertices n; an upper bound is given by the sum of the aspect ratios of triangles in the constrained Delaunay triangulation. We can also consider the no-large-angle problem: triangulate Q using a minimum number of triangles, such that all new angles are bounded away from 180°. The strictest bound on large angles that does not imply a bound on small angles is nonobtuse triangulation: triangulate a domain Q such that the maximum angle measures at most 90°. Moreover, a nonobtuse mesh has some desirable numerical and geometric properties [9,135]. Bern, Mitchell, and Ruppert [27] developed a circle-based algorithm for nonobtuse triangulation
316
M. Bern and P. Plassmann
Fig. 17. Steps in circle-based nonobtuse triangulation.
of polygons with holes; this algorithm gives a triangulation with 0(n) triangles, regardless of the domain geometry. Figure 17 shows the steps of this algorithm: the domain is packed with nonoverlapping disks until each uncovered region has either 3 or 4 sides; radii to tangencies are added in order to split the domain into small polygons; and finally small polygons are triangulated with right triangles, without adding any new subdivision points. It is currently unknown whether multiple domains admit polynomial-size nonobtuse triangulations. Mitchell [93], however, gave an algorithm for triangulating multiple domains using 0{n^ log n) triangles with maximum angle 157.5^. Tan [ 126] improved the maximum angle bound to 132° and the complexity to the optimal O(n^).
6. Hexahedral meshes Mesh generation in three dimensions is not as well developed as in two, for a number of reasons: lack of standard data representations for three-dimensional domains, greater software complexity, and — most relevant to this article — some theoretical difficulties. This section and the next one survey approaches to three-dimensional mesh generation. We have divided this material according to element shape, hexahedral or tetrahedral. This classification is not completely strict, as many hexahedral mesh generators use triangular prisms and tetrahedra in a pinch. Careful implementations of numerical methods can handle degenerate hexahedra such as prisms [66,67]. In this section, we describe three approaches to hexahedral mesh generation that vary in their degree of structure and strictness.
6.1. Multiblock meshes We start with the approach that produces meshes with the most structure (and quite often the highest quality elements). A multiblock mesh contains a number of small structured
Mesh
generation
317
Fig. 18. A multiblock hexahedral mesh of a submarine, showing (a) block structure, and (b) a vertical slice through the mesh (ICEM CFD).
meshes that together form a large unstructured mesh. Typically a user must supply the topology of the unstructured mesh, but the rest of the process is automated. Figure 18 shows a multiblock mesh created by ICEM Hexa, a system developed by ICEM CFD Engineering. In this system the user controls the placement of the block comers, and then the mesh generator projects the implied block edges onto domain curves and surfaces automatically. Due to the need for human interaction, multiblock meshes are not well suited to adaptive meshing, nor to rapidly iterated design and simulation.
6.2. Cartesian meshes We move on to a recently developed "quick and dirty" approach to hexahedral mesh generation. The Cartesian approach offers simple data structures, explicit orthogonality of mesh edges, and robust and straightforward mesh generation. The disadvantage of this approach is that it uses non-hexahedral elements around the domain boundary, which then require special handling. A Cartesian mesh is formed by cutting a rectangular box into eight congruent boxes, each of which is split recursively until each minimal box intersects the domain ^ in a simple way or has reached some small target size. (This construction is essentially the same as an octree, described in Section 7.3.) Requiring neighboring boxes to differ in size by at most a factor of two ensures appropriate mesh grading. Boxes cut by the boundary are classified into a number of patterns by determining which of their vertices lie interior and exterior to Q. Each pattern corresponds to a different type of non-hexahedral element. Boxes adjacent to ones half their own size can similarly be classified as non-hexahedral elements, or alternatively the solution value at their subdivision vertices can be treated as implicit variables using Lagrange multipliers [1]. Recent fluid dynamics simulations have used Cartesian meshes quite successfully in both finite element and finite volume formulations [41,42,144]. The approach can be adapted even to very difficult meshing problems. For example, Berger and Oliger [21] and Berger
318
M Bern and P. Plassmann
Fig. 19. A two-dimensional Cartesian mesh for a biplane wing (W. Coirier).
and Colella [20] have developed adaptive Cartesian-based methods for rotational IBiows and flows with strong shocks.
6.3. Unstructured hexahedral meshes Hexahedral elements retain some advantages over tetrahedral elements even in unstructured meshes. Hexahedra fit man-made objects well, especially objects produced by CAD systems. The edge directions in a box-shaped hexahedron often have physical significance; for example, hexahedra show a clear advantage over tetrahedra for a stress analysis of a beam [19]. The face normals of a box meet at the center of the element; this property can be used to define control volumes for finite volume methods. These advantages are not inherent to hexahedra, but rather are properties of box-shaped elements, which degrade as the element grows less rectangular. Thus it will not suffice to generate an unstructured hexahedral mesh by transforming a tetrahedral mesh. Armstrong et al. [4] are currently developing an unstructured hexahedral mesh generator based on the medial axis transform. The medial axis of a domain is the locus of centers of spheres that touch the boundary in two or more faces. This construction is closely related to the Voronoi diagram of the faces of the domain; Srinivasan et al. [124] have previously applied this construction to two-dimensional unstructured mesh generation. The medial axis is a natural tool for mesh generation, as advancing fronts meet at the medial axis in the limit of small, equal-sized elements. By precomputing this locus, a mesh generator can more gracefully handle the junctures between sections of the mesh. Tautges and Mitchell [127] are developing an all-hexahedral mesh generation algorithm called whisker weaving. Whisker weaving is an advancing front approach that fixes the topology of the mesh before the geometry. It starts from a quadrilateral surface mesh.
Mesh generation
319
which can itself be generated by an advancing-front generator within each face [28]. The algorithm forms the planar dual of the surface mesh, and then finds closed loops in the planar dual around the surface of the polyhedron. Each loop will represent the boundary of a layer of hexahedra in the eventual mesh. A layer of hexahedra can be represented by its dual, called a sheet, which has one vertex per hexahedron and edges between adjacent hexahedra. As the algorithm runs, it fills in sheets from the boundary inwards. This approach to hexahedral meshing raises an interesting theoretical question: which quadrilateral surface meshes can be extended to hexahedral volume meshes? Mitchell [94] and Thurston [132] (see also Eppstein [54]) answered this question in a topological sense by showing that any surface mesh on a simple polyhedron with an even number of quadrilaterals can be extended to a volume mesh formed by (possibly curved) topological cubes. The geometric question remains open.
7. Tetrahedral meshes Tetrahedra have several important advantages over hexahedra: unique linear interpolation from vertices to interior, greater flexibility in fitting complicated domains, and ease of refinement and derefinement. In order to realize the last two of these advantages, tetrahedral meshes are almost always unstructured. Most of the approaches to unstructured triangular mesh generation that we surveyed in Section 5 can be generalized to tetrahedral mesh generation, but not without some new difficulties. Before describing Delaunay, advancing front, and octree mesh generators we discuss three theoretical obstacles to unstructured tetrahedral meshing, ways in which M^ differs from M^. First, not all polyhedral domains can be triangulated without Steiner points. Figure 20(a) gives an example of a non-tetrahedralizable polyhedron, a twisted triangular prism in which each rectangular face has been triangulated so that it bends in towards the interior. None of the top three vertices is visible through the interior to all three of the bottom vertices; hence no tetrahedron formed by the vertices of this polyhedron can include the bottom face. Chazelle [37] gave a quantitative bad example, shown in Figure 20(b). This polyhedron includes ^(n) grooves that nearly meet at a doubly-ruled curved surface; any triangulation of this polyhedron must include Q{n^) Steiner points and Q(n^) tetrahedra. Bad examples such as these appear to rule out the possibility of generalizing constrained Delaunay triangulation to three dimensions. Second, the very same domain may be tetrahedralized with different numbers of tetrahedra. For example, a cube can be triangulated with either five or six tetrahedra. As we shall see below, the generalization of the edge flip to three dimensions exchanges two tetrahedra for three or vice versa. This variability does not usually pose a problem, except in the extreme cases. For example, n points in M? can have a Delaunay triangulation with Q{n^) tetrahedra, even though some other triangulation will have only 0(n). Finally, tetrahedra can be poorly shaped in more ways than triangles. In two dimensions, there are only two types of failure, angles close to 0° and angles close to 180°, and no failures of the first kind implies no failures of the second. In three dimensions, we can classify poorly shaped tetrahedra according to both dihedral and solid angles [22]. There are then
320
M. Bern and P. Plassmann
Fig. 20. (a) Schonhardt's twisted prism cannot be tetrahedralized without Steiner points, (b) Chazelle's polyhedron requires Q{n ) Steiner points.
Needle
Wedge
Fig. 21. The five types of bad tetrahedra.
five types of bad tetrahedra, as shown in Figure 21. A needle permits arbitrarily small solid angles, but not large solid angles and neither large nor small dihedral angles. A wedge permits both small solid and dihedral angles, but neither large solid nor large dihedral angles, and so forth. Notice that a sliver or a cap can have all face angles bounded away from both 0° and 180°, although the tetrahedron itself may have arbitrarily small solid angles and interior volume. An example is the sliver with vertex coordinates (0, 0,0), (0, 1, £), (1,0, e), and (1, 1,0), where ^ ^- 0. Many measures of tetrahedron quality have been proposed [75], most of which have a maximum value for an equilateral tetrahedron and a minimum value for a degenerate tetrahedron. One suitable measure, which forbids all five types of bad tetrahedra, is the minimum solid angle. A weaker measure, which forbids all types except slivers, is the ratio of the minimum edge length to the radius of the circumsphere [88].
7.1. Delaunay triangulation As in two dimensions, point placement followed by Delaunay triangulation is a popular approach to mesh generation, especially in aerodynamics. The same point placement methods
Mesh
generation
321
Fig. 22. In three dimensions, an edge flip exchanges three tetrahedra sharing an edge for two tetrahedra sharing a triangle, or vice versa.
work fairly well: combining structured meshes [68], advancing front [10,78,79], and random scattering with filtering [137]. As in two dimensions, the placement phase must put sufficiently many points on the domain boundary to ensure that the Delaunay triangulation will be conforming. Although the three-dimensional conforming Delaunay triangulation problem is not too hard for most domains of practical interest, we do not know of published solutions. The first two point placement methods suffer from the same liability in three dimensions as in two: points may be improperly spaced at junctures between fronts or patches. All three methods suffer from a new sort of problem: even a well spaced point set may include sliver tetrahedra in its Delaunay triangulation, because a sliver does not have an unusually large circumsphere compared to the lengths of its edges. For this reason, some Delaunay mesh generators [10] include a special postprocessing step that finds and removes slivers. Chew (personal communication) has recently devised an algorithm that removes slivers by adding Steiner points at a random location near their circumcenters. The triangulation phase of mesh generation also becomes somewhat more difficult in three dimensions. The generalization of edge flipping exchanges the two possible triangulations of five points in convex position, as shown in Figure 22. We call a flip a Delaunay flip if, after the flip, the triangulation of the five points satisfies the empty sphere condition — no circumsphere encloses a point. In three dimensions, it is no longer true that any tetrahedralization can be transformed into the Delaunay triangulation by a sequence of Delaunay flips [69], and it is currently unknown whether any tetrahedralization can be transformed into the Delaunay triangulation by arbitrary flips. Nevertheless, there are provably correct, incremental Delaunay triangulation algorithms based on edge flipping [50,70, 104]. There are other practical three-dimensional Delaunay triangulation algorithms as well. Bowyer [30] and Watson [136] gave incremental algorithms with reasonable expected-case performance. Barber [15] implemented a randomized algorithm in arbitrary dimension. This algorithm can be used to compute Delaunay triangulations through a well-known reduction [31] which "lifts" the Delaunay triangulation of points in W^ to the convex hull of points in IR^+^
322
M. Bern and P. Plassmann
Fig. 23. The surface of a tetrahedral mesh computed by an advancing front generator (ANSYS, Inc.).
7.2. Advancing front We have already mentioned an advancing front approach to placing Steiner points for Delaunay triangulation. A pure advancing front mesh generator [77,79,97,101] places the elements themselves, rather than just the Steiner points. This approach gives more direct control of element shapes, especially near the boundary, which is often a region of special interest. Advancing front generators seem to be especially popular in aerodynamics simulations [64,65,79,85,101]. We describe an advancing front algorithm of Lohner and Parikh [79,80] as it contains the essential ideas. Desired element size (and perhaps stretching directions) are defined at the vertices of a coarse "background" tetrahedralization and interpolated to the rest of the domain. The background mesh can also be defined by an octree, the three-dimensional generahzation of a quadtree. To get started, the boundaries of the domain are triangulated; the initial front consists of the boundary faces. The algorithm then iteratively chooses a face of the front and builds a tetrahedron over that face. The algorithm attempts to fill in clefts left by the last layer of tetrahedra before starting the next layer; within a layer, the algorithm chooses small faces first in order to minimize collisions. The fourth vertex of the tetrahedron will be either an already existing vertex or a vertex specially created for the tetrahedron. In the latter case, the algorithm tries to choose a smart location for the new vertex; for example, the new vertex may be placed along a normal to the base face at a distance determined by aspect ratios and length functions ultimately derived from the background triangulation [59]. In either case, cleft or new vertex, the tetrahedron must be tested for collisions before final acceptance. Figure 23 shows the surface of a fairly isotropic tetrahedral mesh computed by an advancing front mesh generator developed by ANSYS, Inc. This generator, like the one just described, places elements directly.
Mesh
generation
323
Fig. 24. The surface of a tetrahedral mesh derived from an octree (M. Yerry and M. Shephard).
Marcum and Weatherill [81] have devised an algorithm somewhere between pure advancing front and advancing-front point placement followed by Delaunay triangulation. Their algorithm starts with a coarse mesh, and then uses advancing front to place additional Steiner points, simply subdividing the coarse tetrahedra to maintain a triangulation. This mesh is then improved first by Delaunay and then by minmax-solid-angle flips. Other researchers agree that applying flips in this order is more effective than using either type of flip alone. 7.3. Octrees An octree is the natural generalization of a quadtree. An initial bounding cube is split into eight congruent cubes, each of which is split recursively until each minimal cube intersects the domain .Q in a simple way. As in two dimensions, a balance condition ensures that no cube is next to one very much smaller than itself; balancing an unbalanced quadtree or octree expands the number of boxes by a constant multiplicative factor. The balance condition need not be explicit, but rather it may be a consequence of an intrinsic local spacing function [134]. Shephard and his collaborators [114-116,142] have developed several octree-based mesh generators for polyhedral domains. Their original generator [142] tetrahedralizes leaf cubes using a collection of predefined patterns. To keep the number of patterns manageable, the generator makes the simplifying assumption that each cube is cut by at most three facets of the input polyhedron. Perucchio et al. [102] give a more sophisticated way to conform to boundaries. Buratynski [32] uses rectangular octrees and a hierarchical set of warping rules. The octree is refined so that each domain edge intersects boxes of only one size. Boxes are warped to domain vertices, then edges, and finally faces. Mitchell and Vavasis [91] generalized the quadtree mesh generator of Bern et al. [25] to three dimensions. The generalization is not straightforward, primarily because vertices of
324
M. Bern and P. Plassmann
Fig. 25. The tetrahedron on the left is bisected to form two new tetrahedra.
polyhedra may have very complicated local neighborhoods. This algorithm is guaranteed to avoid allfivetypes of bad tetrahedra, while producing a mesh with only a constant times the minimum number of tetrahedra in any such bounded-aspect-ratio tetrahedralization. So far this is the only three-dimensional mesh generation algorithm with such a strong theoretical guaranty. Vavasis [134] has recently released a modified version of the algorithm (called QMG for "Quality Mesh Generator"), including a simple geometric modeler and equation solver to boot. The modified algorithm includes a more systematic set of warping rules; in particular, the new warping method for an octree cube cut by a single facet generalizes to any fixed dimension [92].
7.4. Refinement and improvement We discuss improvement before refinement, because less is known on the subject. As we mentioned above, edge flipping generalizes to three dimensions, and flipping first by the Delaunay empty sphere criterion and then by the minmax solid angle criterion seems to be fairly effective. Laplacian smoothing also generalizes, although experimental results [57] indicate that it is no longer as effective as in two dimensions. Optimization-based smoothing [2,57] appears to be more powerful than simple Laplacian smoothing. Freitag and Ollivier-Gooch [57] recommend combining Delaunay flipping with smoothing for maxmin dihedral angle or maxmin dihedral-angle sine. We now move on to refinement and discuss two different refinement algorithms based upon the natural generalization of bisection to three dimensions. To bisect tetrahedron vov\V2V2> across edge V{)V\, we add the triangle foi 1^21^3, where VQ\ is the midpoint of VQV\, as shown in Figure 25. This operation creates two child tetrahedra, uofo 11^21^3 and VQ\V\V2V^, and bisects the faces VQV\V2 and fofi 1^3, which, unless they lie on the domain boundary, are each shared with an adjacent tetrahedron. Two tetrahedra that share a face must agree on how it is to be bisected; otherwise an invalid mesh will be constructed. A single bisection of a tetrahedron can approximately square the minimum solid angle, unlike in two dimensions where the minimum angle of a triangle is decreased by no more than a factor of two. Consider the wedge tetrahedron with vertex coordinates (0,^,0),
Mesh
generation
325
Fig. 26. The first three levels of longest-edge bisection of the canonical tetrahedron. Note that the tetrahedra generated at each level are similar. For the final level of refinement we show only the four tetrahedra obtained from fo^^oi ^2^3- Four similar tetrahedra are obtained from vo\v\V2V2>.
(0,—e, 0),(1,0,^), and (1, 0, — e). Bisection of the longest ^dgt of this tetrahedron creates a new tetrahedron with minimum soHd angle about s^. Rivara and Levin [110] suggested an extension of longest-edge Rivara refinement (Section 5.4) to three dimensions. Notice that splitting the longest edge in a tetrahedron also splits the longest edge on the two subdivided faces, and thus the bisection of shared faces is uniquely defined. (Ties can be broken by vertex labels.) Neighboring invalid tetrahedra, meaning all those sharing the subdivided longest edge, are refined recursively. Rivara and Levin provide experimental evidence suggesting that repeated rounds of longest-edge refinement cannot reduce the minimum solid angle below a fixed threshold, but this guarantee has not been proved. The guarantee would follow if it could be shown that the algorithm generates only a finite number of tetrahedron similarity classes. A bisection algorithm first introduced by Bansch [14] does indeed generate only a finite number of similarity classes. Before describing the algorithm, we sketch the argument of Liu and Joe [74] which motivates the algorithm. The key observation is that there exists an affine transformation that maps any tetrahedron to a canonical tetrahedron for which longest-edge bisection generates only a finite number of similarity classes. Consider the canonical tetrahedron tc with coordinates ( - 1 , 0 , 0 ) , (1,0, 0), (0, 1/V2, 0), and (0, 0,1). In Figure 26 we illustrate the first three levels of longest-edge bisection of tc = V{)V\ V2V^. It can be shown that all the tetrahedra generated at each level of refinement are similar and that the eight tetrahedra generated after three levels of refinement are similar to tc. Refinement in the canonical space induces a refinement in the original space with only a finite number of different similarity classes. A subtlety: the similarity classes in the original space correspond to homothets (identical up to scaling and translation), not similarity classes, in the canonical space. Hence the number of similarity classes turns out to be 36 rather than 8 [5,83]. Bansch [14], Liu and Joe [76], and Arnold et al. [5] give essentially equivalent [71] algorithms for generating the bisection order; we follow Bansch's presentation. Each face in each tetrahedron elects one of its edges to be its refinement edge, so that two conditions hold: the choice for a face is consistent between the two tetrahedra that share it, and exactly
326
M. Bern and P. Plassmann
one edge in each tetrahedron — the global refinement edge — is chosen by pairs of faces of the tetrahedron. These conditions hold initially if each face picks its longest edge and ties are broken in any consistent manner, for example, by vertex or edge label order. In the pseudocode below, a child face is a triangle like vo\V2V\ in Figure 25, and a new face is one like V{)\V2V^. mark the refinement edge of every face in the current mesh let 7b be the set of marked tetrahedra; / = 0 while (7/ ^ 0) do bisect each tetrahedron in 7/ across its global refinement edge pick the old edge in each child face as its refinement edge pick the longest edge in each new face as its refinement edge /= /+1 let Ti be the set of invalid tetrahedra enddo
8. Conclusions We have described the current state of the art in mesh generation for finite element methods. Practical issues in mesh generation are — roughly in order of importance — algorithm robustness, fit with underlying physics, element quality, and mesh efficiency. Unstructured triangular and tetrahedral mesh generation already makes frequent use of data structures and algorithms familiar in computational geometry. We expect this trend to continue. We also expect — and recommend — computational geometers to focus some attention on structured meshes and hexahedral meshes. We close with a short list of open problems of both practical and theoretical interest. It is no coincidence that these problems focus on three-dimensional mesh generation. 1. Is the flip graph for a point set in B? connected? In other words, is it possible to convert any triangulation of a point set (even a point set in convex position) into any other using only flips (Figure 22)? 2. Is there a smoothing algorithm guaranteed to remove slivers? A sliver (Figure 21) is the only type of bad tetrahedron with well spaced vertices and small circumspheres. 3. Is there an algorithm for conforming Delaunay triangulation in R-^? In other words, place vertices on the boundary of a polyhedron, so that the Delaunay triangulation of all vertices, original and new, contains the polyhedron. 4. Is there an algorithm for unstructured tetrahedral mesh generation that guarantees an M-matrix for the finite element formulation of Poisson's equation? 5. Give an algorithm for computing the blocks in a multiblock mesh. Such an algorithm should give a small number of nicely shaped blocks, quadrilaterals in R^ and hexahedra in R^. 6. Can any quadrilateral surface mesh with an even number of quadrilaterals be extended to a hexahedral volume mesh?
Mesh generation
327
Ackonwledgements We would like to thank Lori Freitag, Paul Heckbert, Scott Mitchell, Carl Ollivier-Gooch, Jonathan Shewchuk, and Steve Vavasis for help in preparing this survey.
References [1] M. Aftosmis, J. Melton and M. Berger, Adaptation and surface modeling for Cartesian mesh methods, AIAA Paper 95-1725, 12th AIAA CFD Conf., San Diego, CA (June 1995). [2] N. Amenta, M.W. Bern and D. Eppstein, Optimal point placement for mesh smoothing, Proc. 8th ACMSIAM Symp. Disc. Algorithms (1997), 528-537. [3] E. Amezua, M.V. Hormaza, A. Hernandez and M.B.G. Ajuria, A method of the improvement of 3d solid finite-element meshes. Adv. Eng. Software 22 (1995), 45-53. [4] C.G. Armstrong, D.J. Robinson, R.M. McKeag, T.S. Li and S.J. Bridgett, Medials for meshing and more, Proc. 4th International Meshing Roundtable, Sandia National Laboratories (1995). [5] D.N. Arnold, A. Mukherjee and L. Pouly, Locally adapted tetrahedral meshes using bisection. Manuscript (1997). [6] I. Babuska and A. Aziz, On the angle condition in the finite element method, SIAM J. Numer. Anal. 13 (1976), 214-227. [7] I. Babuska and W.C. Rheinboldt, Error estimates for adaptive finite element computations, SIAM J. Numer. Anal. 15 (1978), 736-754. [8] PL. Baehmann, S.L. Wittchen, M.S. Shephard, K.R. Grice and M.A. Yerry, Robust geometrically-based automatic two-dimensional mesh generation. Internal. J. Numer. Methods Eng. 24 (1987), 1043-1078. [9] B.S. Baker, E. Grosse and C.S. Rafferty, Nonobtuse triangulation ofpolygons. Discrete Comput. Geom. 3 (1988), 147-168. [10] T.J. Baker, Automatic mesh generation for complex three-dimensional regions using a constrained Delaunay triangulation, Eng. Comput. 5 (1989), 161-175. [11] R.E. Bank, PLTMG: A Software Package for Solving Elliptic Partial Differential Equations, Users' Guide 6.0, SIAM Pubhcations, Philadelphia, PA (1990). [12] R.E. Bank, A.H. Sherman and A. Weiser, Refinement algorithms and data structures for regular local mesh refinement. Scientific Computing, R. Stepleman et al., eds, IMACS/North-HoUand Publishing Company, Amsterdam (1983), 3-17. [13] R.E. Bank and R.K. Smith, Mesh smoothing using a posteriori error estimates, SIAM J. Num. Anal., to appear. ftp://math.ucsd.edU/pub/scicomp/reb/ftpfiles/a67.ps.Z. [14] E. Bansch, Local mesh refinement in 2 and 3 dimensions. Impact Comput. Sci. Eng. 3 (1991), 181-191. [15] C.B. Barber, D.P. Dobkin and H.T. Huhdanpaa, The Quickhull algorithm for convex hulls. Submitted to ACM Trans. Math. Software. See http: //www.geom.umn.edu/software/qhull/ (1995). [16] W.D. Barfield, An optimal mesh generator for Lagrangian hydrodynamic calculations in two space dimensions, J. Comput. Phys. 6 (1970), 417^29. [17] R. Barrett, M. Berry, T.F. Chan, J. Demmel, J. Donato, J. Dongarra, V. Eijkhout, R. Pozo, C. Romine and H. Van der Vorst, Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, SIAM, Philadelphia (1994). [18] T.J. Barth, Aspects of unstructured grids and finite-volume solvers for the Euler and Navier-Stokes equations. Technical Report, von Karman Institute for Fluid Dynamics, Lecture Series 1994-05 (1994). [19] S.E. Benzley, E. Perry, K. Merkley, B. Clark and G. Sjaardema, A comparison of all-hexahedral and alltetrahedral finite element meshes for elastic and elasto-platic analysis, Proc. 4th International Meshing Roundtable, Sandia National Laboratories (1995), 179-191. [20] M.J. Berger and P. Colella, Local adaptive mesh refinement for shock hydrodynamics, J. Comput. Phys. 82 (1989), 64-84. [21] M.J. Berger and J. Oliger, Adaptive mesh refinement for hyperbolic partial differential equations, J. Comput. Phys. 53 (1984), 484-512.
328
M. Bern and P. Plassmann
[22] M. Bern, L.R Chew, D. Eppstein and J. Ruppert, Dihedral bounds for mesh generation in high dimensions, Proc. 6th ACM-SIAM Symp. Disc. Algorithms (1995), 189-196. [23] M. Bern, H. Edelsbrunner, D. Eppstein, S. Mitchell and T.-S. Tan, Edge-insertion for optimal triangulations. Discrete Comput. Geom. 10 (1993), 47-65. [24] M. Bern and D. Eppstein, Mesh generation and optimal triangulation. Computing in Euclidean Geometry, 2nd ed., D.-Z. Du and EK. Hwang, eds. World Scientific, Singapore (1995), 47-123. [25] M. Bern, D. Eppstein and J.R. Gilbert, Provably good mesh generation, J. Comput. System Sci. 48 (1994), 384^09. [26] M. Bern, D. Eppstein and F. Yao, The expected extremes in a Delaunay triangulation, Intemat. J. Comput. Geom. Appl. 1 (1991), 79-92. [27] M. Bern, S. Mitchell and J. Ruppert, Linear-size nonobtuse triangulation of polygons. Discrete Comput. Geom. 14 (1995), 411^28. [28] T.D. Blacker, Paving: A new approach to automated quadrilateral mesh generation, Intemat. J. Numer. Methods Eng. 32 (1991), 811-847. [29] F. Bossen, Anisotropic mesh generation with particles. Technical Report CMU-CS-96-134, CarnegieMellon University, School of Computer Science (1996). http: //ltswww.epfl.ch/~bossen/. [30] A. Bowyer, Computing Dirichlet tessellations. Computer J. 24 (1981), 162-166. [31] K.Q. Brown, Voronoi diagrams from convex hulls. Inform. Process. Lett. 9 (1979), 223-228. [32] E.K. Buratynski, A fully automatic three-dimensional mesh generator for complex geometries, Intemat. J. Numer. Methods Eng. 30 (1990), 931-952. [33] S. Canann, M. Stephenson and T. Blacker, Optismoothing: An optimization-driven approach to mesh smoothing. Finite Elements in Analysis and Design 13 (1993), 185-190. [34] G.F. Carey and J.T Oden, Finite Elements: Computational Aspects, Prentice-Hall (1984). [35] J.E. Castillo, Mathematical Aspects of Grid Generation, Society for Industrial and Applied Mathematics, Philadelphia (1991). [36] M.J. Castro-Diaz, F. Hecht and B. Mohammadi, New progress in anisotropic grid adaptation for inviscid and viscid flows simulations, Proc. 4th Intemational Meshing Roundtable, Sandia National Laboratories (1995). [37] B. Chazelle, Convex partitions of polyhedra: A lower bound and worst-case optimal algorithm, SIAM J. Comput. 13 (1984), 488-507. [38] L.R Chew, Guaranteed-quality triangular meshes. Technical Report TR-89-983, Comp. Science Dept., Comell University (1989). [39] RG. Ciarlet, The Finite Element Method for Elliptic Problems, North-Holland (1978). [40] RG. Ciarlet and PA. Raviart, Maximum principle and uniform convergence for the finite element method, Comput. Methods Appl. Mech. Eng. 2 (1973), 17-31. [41] W.J. Coirier, An adaptively-refined, Cartesian cell-based scheme for the Euler and Navier-Stokes equations, NASA Technical Memorandum 106754, NASA (October 1994). [42] W.J. Coirier and K.G. Powell, An accuracy assessment of Cartesian-mesh approaches for the Euler equations, J. Comput. Phys. 117 (1995), 121-131. [43] E.F D'Azevedo and R.B. Simpson, On optimal interpolation triangle incidences, SIAM J. Sci. Stat. Comput. 10 (1989), 1063-1075. [44] L. De Floriani and B. Falcidieno, A hierarchical boundary model for solid object representation, ACM Transactions on Graphics 7 (1988), 42-60. [45] B. Delaunay, Sur la sphere vide, Izv. Akad. Nauk SSSR, VII Seria, Otd. Mat. i Estestv. Nauk 7 (1934), 793-800. [46] M.T. Dickerson and M.H. Montague, A (usually?) connected subgraph of the minimum weight triangulation, Proc. 12th ACM Symp. Comp. Geometry (1996), 204-213. [47] T.A. DriscoU, A Matlab toolbox for Schwarz-Christojfel mapping, ACM Trans. Math. Software, to appear. [48] T.A. DriscoU and S.A. Vavasis, Numerical conformal mapping using cross-ratios and Delaunay triangulation. Available under http: //www.cs.comell.edu/Info/People/vavasis/vavasis.html (1996). [49] A.S. Dvinsky, Adaptive grid generation from harmonic maps. Numerical Grid Generation in Computational Fluid Dynamics '88, S. Sengupta, J. Hauser, PR. Eiseman and J.F. Thompson, eds, Pineridge Press Limited, Swansea, U.K. (1988).
Mesh generation
329
[50] H. Edelsbrunner and N.R. Shah, Incremental topological flipping works for regular triangulations, Proc. 8th ACM Symp. Comp. Geometry (1992), 43-52. [51] H. Edelsbrunner and T.-S. Tan, A quadratic time algorithm for the minmax length triangulation, Proc. 32nd IEEE Symp. Foundations of Comp. Science (1991), 414-^23. [52] H. Edelsbrunner and T.-S. Tan, An upper boundfor conforming Delaunay triangulations, Discrete Comput. Geom. 10 (1993), 197-213. [53] H. Edelsbrunner, T.S. Tan and R. Waupotitsch, A polynomial time algorithm for the minmax angle triangulation, SIAM J. Sci. Stat. Comp. 13 (1992), 994-1008. [54] D. Eppstein, Linear complexity hexahedral mesh generation, Proc. 12th ACM Symp. Comp. Geom. (1996), 58-67. [55] D.A. Field, Laplacian smoothing and Delaunay triangulations, Comm. Appl. Numer. Methods 4 (1988), 709-712. [56] S. Fortune, Voronoi diagrams and Delaunay triangulations. Computing in Euclidean Geometry, 2nd ed., FK. Hwang and D.-Z. Du, eds. World Scientific, Singapore (1995), 225-265. [57] L. Freitag and C. OUivier-Gooch, A comparison of tetrahedral mesh improvement techniques, Proc. 5th International Meshing Roundtable, Sandia National Laboratories (1996), 87-100. http://sass577.endo. sandia.gov:80/9225/Personnel/samitch/roundtable96/. [58] L.A. Freitag, M.T Jones and RE. Plassmann, An efficient parallel algorithm for mesh smoothing, Proc. 4th International Meshing Roundtable, Sandia National Laboratories (1995), 47-58. [59] P.J. Frey, H. Borouchaki and P.-L. George, Delaunay tetrahedralization using an advancing-front approach, Proc. 5th International Meshing Roundtable, Sandia National Laboratories (1996), 31-46. http://www.cs.cmu.edu/~ph. [60] PL. George, Automatic Mesh Generation, Wiley, New York (1991). [61] PL. George, F Hecht and E. Saltel, Fully automatic mesh generator for 3D domains of any shape. Impact of Com. in Sci. andEng. 2 (1990), 187-218. [62] A.S. Glassner, Maintaining winged-edge models, Graphics Gems II, E.J. Arvo, ed.. Academic Press Professional, Boston, MA (1991), 191-201. [63] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans. Graphics 4 (1985), 74-123. [64] O. Hassan, K. Morgan, E.J. Probert and J. Peraire, Mesh generation and adaptivity for the solution of compressible viscous high-speed flows, Intemat. J. Numer. Methods Eng. 38 (1995), 1123-1148. [65] O. Hassan, K. Morgan, E.J. Probert and J. Peraire, Unstructured tetrahedral mesh generation for threedimensional viscous flows, Intemat. J. Numer. Methods Eng. 39 (1996), 549-567. [66] T. J.R. Hughes, The Finite Element Method: Linear Static and Dynamic Finite Element Analysis, PrenticeHall, Inc., Englewood Cliffs, NJ (1987). [67] T.J.R. Hughes and J.E. Akin, Techniques for developing 'special' finite element shape functions with particular reference to singularities, Intemat. J. Numer. Methods Eng. 15 (1980), 733-751. [68] A. Jameson, T.J. Baker and N.P. Weatherill, Calculation ofinviscid transonic flow over a complete aircraft, Proc. AIAA 24th Aerospace Sciences Meeting, Reno (1986). [69] B. Joe, Three-dimensional triangulations from local transformations, SIAM J, Sci. Stat. Comput. 10 (1989), 718-741. [70] B. Joe, Construction of three-dimensional Delaunay triangulations using local transformations, Comput. Aided Geom. Design 8 (1991), 123-142. [71] M.T. Jones and RE. Plassmann, Adaptive reflnement of unstructured finite-element meshes. Finite Elements in Analysis and Design 25 (1-2) (March 1997), 41-60. [72] M.S. Khaira, G.L. Miller and T.J. Sheffler, Nested dissection: A survey and comparison of various nested dissection algorithms. Technical Report CMU-CS-92-106R, School of Computer Science, Camegie Mellon University, Pittsburgh, Pennsylvania (1992). [73] P. Knupp and S. Steinberg, Fundamentals of Grid Generation, CRC Press (1994). [74] A. Liu and B. Joe, On the shape of tetrahedra from bisection. Math. Comput. 63 (207) (1994), 141-154. [75] A. Liu and B. Joe, Relationship between tetrahedron shape measures, BIT 34 (1994), 268-287. [76] A. Liu and B. Joe, Quality local refinement of tetrahedral meshes based on bisection, SIAM J. Sci. Comput. 16 (6) (1995), 1269-1291.
330
M. Bern and P. Plassmann
[77] S.H. Lo, A new mesh generation scheme for arbitrary planar domains, Intemat. J. Numer. Methods Eng. 21 (1985), 1403-1426. [78] S.H. Lo, Volume discretization into tetrahedra, Computers and Structures 39 (1991), 493-511. [79] R. Lohner and P. Parildi, Three-dimensional grid generation via the advancing-front method, Intemat. J. Numer. Methods Fluids 8 (1988), 1135-1149. [80] R. Lohner, Progress in grid generation via the advancing front technique, Eng. Comput. 12 (1996), 186210. [81] D.L. Marcum and N.P. Weatherill, Unstructured grid generation using iterative point insertion and local reconnection, AIAA J. 33 (9) (1995), 1619-1625. [82] C.W. Mastin, Elliptic grid generation and conformal mapping. Mathematical Aspects of Grid Generation, Jose E. Castillo, ed.. Society for Industrial and AppUed Mathematics, Philadelphia (1991), 9-18. [83] J.M. Maubach, The number of similarity classes created by local n-simplicial bisection refinement. Manuscript (1996). [84] D.J. Mavriplis, Unstructured and adaptive mesh generation for high Reynolds number viscous flows. Technical Report 91-25, ICASE, NASA Langley Research Center (1991). [85] D.J. MavripUs, Unstructured mesh generation and adaptivity. Technical Report ICASE 95-26, NASA Langley, Hampton VA (1995). Abstract at http: //techreports.larc.nasa.gov/cgibin/NTRS. [86] D.J. Mavriplis, Mesh generation and adaptivity for complex geometries and flows. Handbook of Computational Fluid Mechanics, R. Peyret, ed.. Academic Press, London (1996). [87] G.L. Miller, D. Talmor and S.-H. Teng, Optimal coarsening of unstructured meshes, Proc. 8th ACM-SIAM Symp. Disc. Algorithms (1997). [88] G.L. Miller, D. Talmor, S.-H. Teng and N. Walkington, A Delaunay based numerical method for three dimensions: Generation, formulation and partition, Proc. 36th IEEE Symp. on Foundations of Comp. Science (1995), 683-692. [89] G.L. Miller, S.-H. Teng and S.A. Vavasis, A unified geometric approach to graph separators, Proc. 32nd IEEE Symp. on Foundations of Comp. Science (1991), 538-547. [90] S.A. Mitchell, Cardinality bounds for triangulations with bounded minimum angle. Sixth Canadian Conference on Computational Geometry (1994). [91] S.A. Mitchell and S. Vavasis, Quality mesh generation in three dimensions, Proc. 8th ACM Symp. Comp. Geom. (1992), 212-221. [92] S.A. Mitchell and S. Vavasis, An aspect ratio bound for triangulating a d-grid cut by a hyperplane, Proc. 12th ACM Symp. Comp. Geom. (1996), 48-57. [93] S.A. Mitchell, Refining a triangulation of a planar straight-line graph to eliminate large angles, Proc. 34th IEEE Symp. on Foundations of Comp. Science (1993), 583-591. [94] S.A. Mitchell, A characterization of the quadrilateral meshes of a surface which admit a compatible hexahedral mesh of the enclosed volume, Proc. 13th Symposium on Theoretical Aspects of Computer Science (STAGS '96), LNCS, Springer-Verlag (1996). [95] J.-D. Miiller, Proven angular bounds and stretched triangulations with the frontal Delaunay method, Proc. 11th AIAA Comp. Fluid Dynamics, Orlando (1993). [96] L.R. Nackman and V. Srinivasan, Point placement for Delaunay triangulation ofpolygonal domains, Proc. 3rd Canadian Conf. Comp. Geometry (1991), 3 7 ^ 0 . [97] Nguyen-Van-Phai, Automatic mesh generation with tetrahedral element, Intemat. J. Numer. Methods Eng. 18 (1982), 273-289. [98] C.F OUivier-Gooch, Multigrid acceleration of an upwind Euler solver on unstructured meshes, AIAA J. 33 (10) (1995), 1822-1827. [99] S. Owen, Meshing research corner, http: //www.ce.cmu.edu /NetworkZ /sowen/www/mesh.html (1995). [100] V.N. Parthasarathy and S. Kodiyalam, A constrained optimization approach to finite element mesh smoothing. Finite Elements in Analysis and Design 9 (1991), 309-320. [101] J. Peraire, J. Peiro, L. Formaggia, K. Morgan and O.C. Zieniewicz, Finite element Euler computations in three dimensions, Intemat. J. Numer. Methods Eng. 26 (1988), 2135-2159. [102] R. Pemcchio, M. Saxena and A. Kela, Automatic mesh generation from solid models based on recursive spatial decomposition, Internat. J. Numer. Methods Eng. 28 (1989), 2469-2502. [103] F.P Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag (1985).
Mesh generation
331
[104] V.T. Rajan, Optimality of the Delaunay triangulation in R^, Proc. 7th ACM Symp. Comp. Geometry (1991), 357-363. [105] S. Rippa, Minimal roughness property of the Delaunay triangulation, Comput. Aided Geom. Design 7 (1990), 489^97. [106] S. Rippa, Long and thin triangles can be good for linear interpolation, SIAM J. Numer. Anal. 29 (1992), 257-270. [107] M.-C. Rivara, Algorithms for refining triangular grids suitable for adaptive and multigrid techniques, Intemat. J. Numer. Methods Eng. 20 (1984), 745-756. [108] M.-C. Rivara, Design and data structure of fully adaptive, multigrid, finite-element software, ACM Trans. Math. Software 10 (3) (1984), 242-264. [109] M.-C. Rivara, Mesh refinement processes based on the generalized bisection ofsimplices, SIAM J. Numer. Anal. 21 (3) (1984), 604-613. [110] M.-C. Rivara and C. Levin, A 3-d refinement algorithm suitable for adaptive and multi-grid techniques, Comm. Appl. Numer. Methods 8 (1992), 281-290. [ I l l ] J. Ruppert, A Delaunay refinement algorithm for quality 2-dimensional mesh generation, J. Algorithms 18 (3) (1995), 548-585. [112] A. Saalfeld, Delaunay edge refinements, Proc. 3rd Canadian Conf. Comp. Geometry (1991), 33-36. [113] R. Schneiders, Finite element mesh generation, http: //www-users.informatik.rwth-aachen.de/ ~roberts/ meshgeneration.html (1995). [114] W.J. Schroeder and M.S. Shephard, A combined octree/Delaunay method for fully automatic 3-D mesh generation, Intemat. J. Numer. Methods Eng. 29 (1990), 37-55. [115] M. Shephard and M. Georges, Automatic three-dimensional mesh generation by the finite octree technique, Intemat. J. Numer. Methods Eng. 32 (1991), 709-749. [116] M.S. Shephard, F. Guerinoni, I.E. Flaherty, R.A. Ludwig and PL. Baehmann, Finite octree mesh generation for automated adaptive three-dimensional flow analysis, Proc. 2nd Int. Conf. Numer. Grid Generation in Computational Fluid Mechanics (1988), 709-718. [117] J.R. Shewchuk, Triangle: A two-dimensional quality mesh generator and Delaunay triangulator, see http: //www.cs.cmu.edu/%7Equake/triangle.html (1995). [118] J.R. Shewchuk, Adaptive precision floating-point arithmetic and fast robust geometric predicates in C, Proc. 12th ACM Symp. Comp. Geometry (1996). [119] K. Shimada, Physically-based mesh generation: Automated triangulation of surfaces and volumes via bubble packing, PhD thesis, ME Dept., MIT (1993). [120] K. Shimada and D.C. Gossard, Computational methods for physically-based FE mesh generation, Proc. IFIP TC5AVG5.3 8th Int. Conference on PROLAMAT, Tokyo (1992). [121] R.B. Simpson, Anisotropic mesh transformations and optimal error control, Appl. Numer. Math. 14 (1-3) (1994), 183-198. [122] B. Smith, P. Bj0rstad and W. Gropp, Domain Decomposition: Parallel Multilevel Algorithms for Elliptic Partial Differential Equations, Cambridge University Press, New York (1996). [123] PW. Smith and S.S. Sritharan, Theory of harmonic grid generation. Complex Variables 10 (1988), 359369. [124] V. Srinivasan, L.R. Nackman, J.-M. Tang and S.N. Meshkat, Automatic mesh generation using the symmetric axis transformation ofpolygonal domains. Technical Report RC 16132, Comp. Science, IBM Research Division, Yorktown Heights, NY (1990). [125] G. Strang and G.J. Fix, An Analysis of the Finite Element Method, Prentice-Hall (1973). [126] T.-S. Tan, An optimal bound for conforming quality triangulations, Proc. 10th ACM Symp. Comp. Geometry (1994), 240-249. [127] T.J. Tautges and S.A. Mitchell, The whisker weaving algorithm for constructing all-hexahedral finite element meshes, Proc. 4th Intemational Meshing Roundtable, Sandia National Laboratories (1995). [128] J.W. Thomas, Numerical Partial Diff^erential Equations: Finite Difference Methods, Springer, New York (1995). [129] J.F. Thompson, Numerical Grid Generation, Elsevier, Amsterdam (1982). [130] J.F. Thompson, Z.U.A. Warsi and C.W. Mastin, Numerical Grid Generation: Foundations and Applications, North-Holland (1985).
332
M. Bern and P. Plassmann
[131] J.F. Thompson and N.P. Weatherill, Aspects of numerical grid generation: Current science and art, Proc. 11th AIAA Applied Aerodynamics Conference (1993), 1029-1070. [132] W. Thurston, Re: Hexahedral decompostion of polyhedra, a posting to sci.math newsgroup, http: //www.ics.uci.edu/~eppstein/junkyard/Thurston-hexahedra (1993). [133] L.N. Trefethen, Numerical computation of the Schwarz—Christojfel transformation, SI AM J. Sci. Statist. Comput. 1 (1980), 82-102. [134] S. Vavasis, QMG: Mesh generation and related software, http: //www.cs.comell.edu/Info/People/vavasis/ qmg-home.html (1995). [135] S.A. Vavasis, Stable finite elements for problems with wild coefficients. Technical Report TR93-1364, Dept. of Comp. Science, Cornell University (1993). [136] D.F. Watson, Computing the n-dimensional Delaunay tessellation with application to Voronoi polytopes. Computer J. 24 (1981), 167-171. [137] N.P. Weatherill and O. Hassan, Efficient three-dimensional Delaunay triangulation with automatic point creation and imposed boundary constraints. Internal. J. Numer. Methods Eng. 37 (1994), 2005-2039. [138] A. Weiser, Local-mesh, local-order, adaptive finite element methods with a posteriori error estimates for elliptic partial differential equations. Technical Report 213, Yale University, New Haven, Connecticut (1981). [139] W. Welch, Serious putty: Topological design for variational curves and surfaces, PhD thesis, CS Dept, Carnegie Mellon University (Dec. 1995). CMU-CS-95-217, ftp: //reports.adm.cs.cmu.edu/usr/anon/1995/ CMU-CS-95-217A.ps, 217B.ps, 217C.ps. [140] J. Xu, Iterative methods by space decomposition and subspace correction, SI AM Review 34 (4) (1992), 581-613. [141] J. Xu and L. Zikatanov, A monotone finite element scheme for convection diffusion equations. Math. Comput., to appear. [142] M.A. Yerry and M.S. Shephard, Automatic three-dimensional mesh generation by the modified-octree technique, Internat. J. Numer. Methods Eng. 20 (1984), 1965-1990. [143] M.A. Yerry and M.S. Shephard, A modified quadtree approach to finite element mesh generation, IEEE Comput. Graphics Appl. 3 (1983), 3 9 ^ 6 . [144] D.P. Young, R.G. Melvin, M.B. Bieterman and J.E. Bussoletti, A locally refined rectangular grid finite element method: Application to computational fluid dynamics and computational physics, J. Comput. Phys. 92(1991), 1-66. [145] R. Young and I. MacPhedran, Internet finite element resources, http: //www.engr.usask.ca/~macphed/ finite/fe_resources/fe_resources.html (1995).
CHAPTER 7
Applications of Computational Geometry to Geographic Information Systems Leila de Floriani, Paola Magillo and Enrico Puppo Dipartimento di Informatica e Scienze delVInformazione - Universita di Genova, Via Dodecaneso, 35 -16146 Genova, Italy E-mail: (deflo, magillo,puppo) @ disi. unige. it
Contents 1. Introduction 2. Map data modeling 2.1. Two-dimensional spatial entities and relations 2.2. Raster and vector models 2.3. Subdivisions as cell complexes 2.4. Topological data structures 2.5. Multiresolution data structures 3. Map data processing 3.1. Spatial queries 3.2. Map overlay 3.3. Geometric problems in map generalization 3.4. Map labeling 3.5. Other analysis issues 4. Terrain data modeling and processing 4.1. Classical terrain models 4.2. Construction and conversion algorithms 4.3. Terrain generalization 4.4. Multiresolution terrain models 5. Terrain analysis 5.1. Visibility 5.2. Topographic features 5.3. Drainage networks 5.4. Path problems 6. Three-dimensional GIS 7. Concluding remarks References
335 336 336 338 339 340 341 342 342 343 347 349 350 351 352 354 356 358 364 364 370 371 372 373 374 377
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
333
This Page Intentionally Left Blank
Applications
of computational
geometry to geographic information systems
335
1. Introduction During the last decade, Geographical Information Systems (GISs) have gained a great impact over a variety of important application fields [171]. According to Goodchild, Kemp, and Poiker [119] "a GIS can be seen as a system of hardware, software and procedures designed to support the capture, management, analysis, modeling and display of spatiallyreferenced data for solving complex planning and management problems." Geographic data are characterized by spatial properties (location, shape, size) and nonspatial properties, called attributes, usually expressed in textual or numerical form. GIS as a discipline involves many different issues, such as hardware and software equipment for data acquisition, data standards, storage and transmission, database management issues (such as integrity and consistency), etc. In this chapter, we consider only issues related to representation and processing of the geometric aspects of geographic data, with a special emphasis on the application of computational geometry techniques. In the past, classical information retrieval methods were adopted to handle geographic data, while the importance of geometric aspects was often underestimated: geometric problems in GIS were solved through ad hoc empirical methods. Such solutions often suffered from lack of foundations, both from a geometric point of view (e.g., the result of an operation defined just as the output of a certain algorithm), and from a computer science perspective (e.g., no complexity analysis), and sometimes had poor practical performances. The needs for a solid theoretical background and for high performances in geometric reasoning have become urgent in GIS. This makes GIS a field of primary importance for application of computational geometry. Representation and manipulation of spatial entities in a geographic information system involve modeling and computational issues. The need to store and process huge data sets yields a demand for data structures and algorithms that achieve a good tradeoff between a high computational efficiency and low storage space. In this chapter, we review classical as well as new problems in geometric modeling and computational geometry arising in GIS. We follow a broad classification of classical geometric data in a GIS into map data and terrain data. Such a classification is not standard in the GIS community, but it is convenient here to identify data characterized by different spatial dimensionality, and different classes of problems. The map data are located on the surface of the Earth and are basically two-dimensional, i.e., they are points, lines, and polygonal regions, which are combined together to form either subdivisions or arrangements, sometimes organized into layers. The terrain data are related with the threedimensional configuration of the surface of the Earth. The geometry of a terrain is modeled as a 2^-dimensional surface, i.e., a surface in a 3D space described by a bivariate function. In addition to these two kinds of classical GIS data, we also cover new research issues in GIS related to the management of fully three-dimensional data. The first part of this chapter is devoted to the map data. The representation of map data involves designing models and data structures capable of encoding geometric structures more general than those studied in the geometric modeling literature, like regions with holes, non-regular structures, isolated points, and line features. Spatial indices also play an important role in the design of efficient methods for geometric queries of map data. Geometric aspects of map data processing involve query operations (e.g., point location, range search); spatial joins (map overlay); and more specific operations based on geometric
336
L. de Floriani et al.
search, such as map generahzation, map labehng, map conflation (i.e., reconcihation of two variants of a map of the same area), computation of optimal paths. Terrain representation and processing are an even richer source for geometric problems. The construction of terrain models involves conversions among raw point and line data, raster grids, triangulated surfaces, and contour line representations. Algorithms for converting among different representations involve several problems in computational geometry, from point location to computation of Voronoi diagrams, Delaunay and other optimal triangulations of points and lines. Terrain analysis and visualization include several geometric operations, such as contour line extraction, computation of drainage networks and topographic features, extraction of models at resolution variable on the domain, computation of paths on a surface. The problems related to terrain visibility which have been extensively studied in computational geometry, are of primary interest in geographic data processing. The rest of this chapter is organized as follows. In Section 2, we deal with map data modeling in GIS. We first define geographic maps mathematically in terms of spatial entities and relations, and then introduce two major map models used in GIS (the raster and the vector model). Since the vector map data are much a stronger source of applications for computational geometry techniques, the attention is focused on this kind of map representations. Computational issues related to map data processing and analysis are treated in Section 3. In Section 4, we consider terrain data modeling and processing. We describe classical terrain models used in GIS and review basic issues in converting the terrain data among the various possible formats. The survey also covers approximate and multiresolution terrain models. In Section 5, we examine some of the most classical terrain analysis problems: visibility problems, extraction of topographic features, computation of drainage networks and determination of optimal paths on a terrain. Issues on a three-dimensional GIS are briefly discussed in Section 6. Finally, Section 7 gives a summary of the chapter, by providing a list of computational geometry techniques and tools that can be useful in GIS, as well as a list of open geometric problems in GIS. This survey is far from being complete. Several problems and geometric structures are just mentioned here and the reference is given to available publications, or to other chapters of this book. In particular, we do not cover parallel algorithms (treated in Chapter 4) and raster representations, since techniques used to manipulate raster data are more typical of digital geometry [165] than of classical Computational Geometry. 2. Map data modeling 2.1. Two-dimensional spatial entities and relations Two-dimensional entities considered in the context of geographic data processing are points, lines, and regions embedded in a two-dimensional space. Datasets covering small portions of the Earth are often projected onto a flat surface and modeled using classical Cartesian coordinates. Several kinds of projections can be used [119]: azimuthal projections using a plane tangent to the Earth in the center of the area to be mapped, conical projections, cylindrical projections using a cylinder tangent to the Earth along the Equator (Mercator projection) or along the line of longitude (Transverse Mercator projection).
Applications
of computational
geometry to geographic information
systems
337
rail
Fig. 1. A toy example of a geographic map.
A more challenging problem is defining a global reference system. Various conventions are used for such a purpose. One approach involves subdividing the Earth surface into zones, each of which is projected separately (the Universal Transverse Mercator uses 60 different zones); other approaches use a spherical coordinate system based on long-lat coordinates, or projection onto an ellipsoid [75,76,182]. However, in the sequel we will always assume the local convention that the map data are embedded in a Euclidean plane. GIS entities are more general than those usually adopted in Computational Geometry. In some cases, lines may not be simple; regions may not be simply connected (i.e., they may contain holes), and may have intQmsil features, i.e., dangling lines (cuts), and isolated points (punctures). Figure 1 shows a toy example of a geographic map. The presence of holes and features may affect the design of data structures and algorithms for processing geographic entities. Most computational methods in GIS deal only with piecewise-linear geometric entities. Although data structures and techniques for representing and manipulating curved entities also exist, they are beyond the scope of this chapter. Spatial relations are defined on pairs of spatial entities, and depend on their relative positions in space. There is a flourishing literature on the definition, classification, evaluation, and study of invariants of spatial relations [42,43,58,85,86,130,155,156,291,292]. In spite of all such work, a homogeneous and complete characterization (e.g., based on an algebraic approach) is still missing. It is not uncommon to find practical contexts and applications for which none of the models proposed in the literature is satisfactory. However, spatial relations are usually classified as follows: • topological relations are characterized in terms of the geometric intersections between boundaries, interiors, and complements of entities: examples are incidence, adjacency, containment, overlapping, etc. (see [42] for a survey); • metric relations are defined in terms of distance between entities: examples are the nearest neighbors and range queries;
338
L. de Floriani et al.
• directional relations are characterized in terms of a relative position of entities with respect to some oriented direction: examples are before, after, right-of, left-of, north, south, etc.; • order relations are defined by properties that induce a partial order on sets of entities. An example is given by containment [157]. Spatial relations play a central role in GISs because many tasks involve the evaluation of spatial relations between a query object and a collection of spatial entities. A broad classification of spatial datasets, which is convenient for both modeling and computational purposes, is as follows: • collections of spatial entities (sometimes organized into distinct layers) that can take any possible relative position on the plane, and intersect arbitrarily; • subdivisions of a compact planar domain into a set of non-overlapping entities. Collections may define arrangements which are more general than those studied in computational geometry, since they can contain irregular entities of any shape and dimension. Similarly, subdivisions are more also general than those used in computational geometry, since they may contain multiply-connected regions with features. Subdivisions are simpler than collections. The combinatorial complexity of a subdivision is linear in the total size of its entities, while the arrangement induced by a collection may have a quadratic complexity. A pair of entities in a collection may assume any possible topological relationship, while possible topological relations in the context of subdivision consist just of adjacency and incidence among its constituent entities, and inclusion of features.
2.2. Raster and vector models There is a long-running debate in the GIS community on whether it is better to represent spatial information based on a vector or on a raster model. Neither model appears to be superior in all tasks. As outlined by Frank [106]: "A traditional view is to differentiate between an entity based view — space is constructed from objects that fill space — and a space oriented view, where each point in space has some properties. This view is philosophically well established...". The vector and raster approaches seem to correspond to these two alternative views of spatial concepts. In a vector model, spatial entities are represented explicitly through their geometry and attributes. Either collections or subdivisions may be represented, and topological relations among entities can be stored explicitly. An explicit representation can support an arbitrarily good level of accuracy. The vector model is obviously entity-based, hence it is well suited to access a spatial database by using spatial entities as search keys. On the other hand, efficient space-oriented access may require sophisticated search structures and techniques. Early representations in vector data modeling, called spaghetti models, are collections of unrelated simple polygonal lines and points. In a spaghetti model, regions are not explicitly encoded, while they are implicitly described by their boundaries. The spaghetti model may encode either a collection or a subdivision, since it is just a collection of entities without any stored relation. The drawback is an almost total lack of support for efficient query processing. More effective data structures are discussed separately in the following subsections.
Applications
of computational
geometry to geographic information systems
339
In a raster model, the domain is regularly subdivided into a large number of atomic regions, similar to the pixels in a digital image. Each pixel carries information about the portion of space it covers. Points are identified with the pixels they lie in, while lines and regions are obtained as aggregations of pixels (digital lines and regions) on the basis of membership attributes. Therefore, spatial entities are not explicitly represented in a raster, while they can be obtained as relations that cluster pixels according to their common attribute. The raster model intrinsically defines a subdivision of the domain, while a collection can be obtained by using multiple members for pixels (i.e., each pixel may belong to more than one entity). The raster representation is obviously space-oriented, and it provides direct access to information about a given location or extent of space. It has the disadvantage of providing an approximate geometry, whose accuracy is dependent on the resolution of the grid, but, on the other hand, its regular structure greatly helps organizing spatial information. Not all operations are supported in both models (e.g., some systems compute buffer zones around vector features by converting to the raster domain and back). In general, raster models are more suitable to support queries by location, while vector models are more suitable to support queries by content [244]. As a consequence, many commercial systems adopt hybrid representations, which permit using either model depending on the specific task and data analyzed. Hybrid models involve the use of algorithms to convert from one model to the other. The techniques used to store, process and analyze data in the raster model, as well as conversion algorithms, are more typical of digital geometry [165], and image processing [220,234] than of classical Computational Geometry. Therefore, in the sequel we will focus on models and methods for vector models. 2.3. Subdivisions as cell complexes The algebraic topology provides a well-established theory on subdivisions of a topological space into cells. In the mathematical literature there are different definitions of cell complexes, none of which is general enough to model regions and features as those manipulated in GISs. However, many models have been developed on the basis of classical cell complexes, and some efforts have been undertaken to extend the classical theory to entities manipulated in a GIS. Simplicial complexes are a special class of cell complexes with good combinatorial properties that make them easy to construct and manipulate. Simplicial complexes have been used in GISs for encoding generic subdivisions by triangulating each region and including all point and line features as vertices and edges [102,291]. Although the approach is theoretically sound and elegant, it may not be practical: geographic data mainly contain large regions with complicate boundaries and features, and fragmentation into triangles causes a relevant increase in storage requirements. A similar approach, with similar drawbacks, consists of using complexes with convex cells, such as trapezoidal decompositions [94]. Regular cell complexes, in which regions are generic, simply-connected polygons without features, correspond to planar subdivisions commonly used in computational geometry. Regular cell complexes are suitable to model maps that do not contain point or linea features.
340
L. de Floriani et al
The most general cell structure provided by the algebraic topology is the CW-complex [183]: its Euclidean realization in two dimensions is a subdivision in which the interior of each region is homeomorphic to an open disk. Such structures admit some features, such as cuts incident into the generalized boundary of a region, and holes incident into such cuts. However, regions must be simply connected: punctures, generic cuts, and "islands" are not admitted. Each region can be fragmented into a minimal number of simply-connected components: such a fragmentation usually yields only a modest increase in storage. Although some efforts have been undertaken to generalize CW-complexes to support GIS data [46, 218,240,292], no substantial progress in the direction of data structures and computational techniques has been made so far. On a different perspective, some authors have proposed approaches based on integer geometry, motivated by robustness issues: points in a map, including endpoints and intersections of lines, are constrained to lie at the nodes of an integer grid. In particular, an algebra based on discrete generalized maps, called realms, has been specified and implemented in [128,129].
2.4. Topological data structures Data structures for encoding both entities and topological relations in a subdivision are usually referred to as topological data structures. The Hterature offers a number of data structures for encoding regular subdivisions of the plane or of a surface, which support an efficient evaluation of spatial relations therein. According to Lienhardt [177] and Brisson [25], the models underlying data structures for cell complexes can be classified into: • explicit-cell representations, where the entities encoded directly correspond to the cells of the complex; • implicit-cell representations, where basic elements of a single type are used, on which element functions act, while cells are implicitly represented. The incidence graph [79] is the prototypical data structure of the former class: nodes correspond to the cells (in two dimensions, vertices, edges, and faces), while arcs linking cells of different dimension correspond to incidence relations. The symmetric structure described in Woo [290] is an implementation of such a graph for the boundary representation of solids. Implicit-cell representations are composed of a set of basic elements (e.g., darts, celltuples, etc.) plus a set of functions acting on such elements (e.g., involutions, switch operators, etc.). Examples of data structures within such a class are the Doubly-Connected Edge List (DCEL) by Preparata and Shamos [221 ], the winged-edge by Baumgart [16], the half-edge structure by Mantyla [187], the vertex-edge and face-edge structures by Weiler [285], and, in a generic dimension d, the cell-tuple structure [25], and the generalized maps [177]. The quad-edge structure [123] can be viewed as a specialization of the celltuple structure in two dimensions (see Chapter 10 for a treatment of data structures for planar subdivisions). Some special structures have been developed in the literature for triangulations and trapezoidal decompositions, which can exploit nice characteristics of such subdivisions. A widely used data structure for triangulations consists of storing, for each triangle, its
Applications
of computational
geometry to geographic information systems
341
three vertices and its three edge-adjacent triangles [172]. A similar data structure, called the quad-view data structure, has been recently proposed in the context of GIS to encode a trapezoidal map [94]. The data structures proposed to encode general subdivisions with features are basically extensions of incidence graphs to non-regular situations. For instance, data structures adopted in [58,136,198] are variations on the DCEL, which is extended to handle holes and features.
2.5. Multiresolution data structures Multiresolution modeling offers interesting capabilities for spatial representation and reasoning in a GIS: from support to map generalization and automated cartography, to efficient browsing over large GISs, to structured solutions in wayfinding and planning. Early approaches were based on a common practice in cartography, i.e., to have a collection of different maps of the same area at different scales, hence encoding information at different levels of detail and accuracy. Such approaches are often referred to in the GIS literature as multiple representations. Some research has also been undertaken, concerning assessment of consistency of different representations [87]. In [274] some hierarchical data structures, called reactive, are proposed, and some others are reviewed for multiresolution representation of lines and maps. The specific purpose of such structures is to allow one to retrieve a more or less detailed/accurate description of the objects. A description of the whole domain at a low level of detail is retrieved from a reactive model through a breadth-first traversal of the first levels of a tree, while a description of a portion of the domain at a high level of detail is retrieved through a depth-first traversal. Examples of such structures are the reactive tree, based on the R-tree; the BLG-tree for line generalization; and the GAP-tree, to support the generalization of area partitionings [275]. More recent approaches have tried to achieve multiresolution on the basis of an integrated data model, which can include information on maps at different levels of resolution together with explicit relations among them. The possibility of developing models that can support a multiresolution representation of maps through hierarchical structures based on trees of cells has been outlined in [107]. Independently, a first hierarchical model that is formally defined on a mathematical basis has been proposed in [19]: such a model is described by a tree of maps at different resolutions, where each map is a refined description of a simple region of its parent node in the tree. In [223], a more complete multiresolution model for maps represented by generalized subdivisions has been proposed, which deals with combinatorial and metric aspects of geographic maps separately, and formally relates all different representations of an entity through the various levels of resolution. The topological structure of a geographic map is completely captured by a purely combinatorial structure called an abstract cell complex. The map generalization, i.e., an operation that relates two consistent maps at different details, is expressed by a continuous mapping between the abstract cell complexes representing the two maps (see also Section 3.3). The appropriate rules permit us to control such functions in order to guarantee that the generalization occurs through gradual changes. The metric aspects concerning changes in accuracy can be controlled separately through
342
L. de Floriani et ah
the concept of line homotopy. The iterative apphcation of simphfication mappings satisfying both topological and metric constraints permits us to define a sequence of generalized maps of the same area. This sequence provides means to organize the various maps, together with the mappings relating them, either in a multi-layered or in a tree structure.
3. Map data processing 3.1. Spatial queries Spatial queries are queries in a spatial database that can be answered on the basis of geometric information only, i.e., the spatial position and extent of the objects involved. A spatial query is defined by a query space S, i.e., either the whole spatial database, or a portion of it obtained through suitable filters; by a query object q that can either belong or not belong to the database; and by a spatial relation J)i. A generic query is thus defined as follows: return all objects s e S that are in relation ^ with q. A classification of spatial queries follows directly from the classification of spatial relations (see Section 2.1). Computational techniques that can be adopted to answer spatial queries depend on the nature of the query space (and on the model which encodes it), on the nature of the query object, and on the nature of the relation. However, a simple exhaustive study of all possibilities shows that most spatial queries can be eventually reduced to few basic problems in computational geometry. In [58] a study is presented on the formalization and solution of topological and metric queries on geographic maps encoded through a cell complex. It is shown that topological queries are solved by map traversal when the query object belongs to the map, while they are always reduced to point location, line intersection, or polygon intersection, when the query object does not belong to the map (see Chapter 10 for a survey). An efficient algorithm has been proposed in [53], which is specific for map traversal in GISs, and provides the basis for the solution of several topological queries on a map. This algorithm traverses a planar subdivision and reports all its regions, without making use of mark bits in the data structure or a stack. Thus, it is especially suitable for a map stored in a read-only GIS database. On the contrary, metric queries are not directly supported by the topological structure of the map and need auxiliary structures — such as spatial indices, or Voronoi diagrams — to be answered efficiently. The use of Voronoi diagrams [ 11 ] for answering spatial queries in GIS has been discussed by Gold and Roos [114-117]. The Voronoi diagram is seen as an intermediate model between the raster and the vector models. As observed by Gold in [116], "the Voronoi model has the complete tiling property of the raster model, but the tiles are based on the proximal region around each object". Both static and dynamic algorithms for constructing a Voronoi diagram of 0-, 1- and 2-dimensional entities in the plane have been developed in the computational geometry literature (see Chapter 5). Gold and Roos
Applications of computational geometry to geographic information systems
343
show that the Voronoi diagram is a persistent, locally modifiable data structure suitable for algorithms like navigation queries, buffer zone generation, polygon labeling, intersection of a map with a line segment, interpolation of a surface at a new point [115,117], etc. Techniques based on spatial indexes are treated in Chapter 17. The interested reader can also refer to the two books by Samet [242,243]. Queries on collections of entities can benefit by less support from relations provided explicitly by data structures. In principle, computational geometry algorithms working on arrangements may give solutions to some such queries, but such algorithms are not applied in practice, perhaps because they are difficult to code and have an intrinsically high computational complexity. Popular techniques for processing collections of entities are based on spatial indexes, which are simple to code and perform well in the average case. In [97] a thorough analysis of the average case complexity in accessing quadtrees is presented. In [8,140,141], several algorithms for spatial queries based on spatial indexes are presented. Refer to Chapter 17 and [243,274] for more details on searching techniques based on spatial indexes. Spatial queries can also be combined with queries related to non-geometric attributes of objects. In this case, a rigorous analysis should take into account both geometric and non-geometric issues. The efficient treatment of such hybrid queries, and the development of suitable integrated models and techniques, as well as of methods for analyzing their performances, are hot open issues that require interdisciplinary research. 3.2. Map overlay It is common practice in GISs to organize information into layers (e.g., land use, hydrography, road network, etc.), and to produce maps by overlaying layers of interest. The overlay process is the basic tool for solving complex spatial queries (the so-called spatial join). In such queries, the input maps are not only overlapped, but also combined on the basis of their attributes (e.g., by using Boolean expressions). Here, we deal only with the geometric aspect of map overlay, where techniques from computational geometry can be applied. Overlay of maps in raster format reduces to combining the attribute values of corresponding pixels and does not involve computational geometry techniques. Conventional transformations are used to align raster grids having different orientations or cell sizes [98]. Here, we focus on the overlay of vector maps. In GIS, there are several cases of overlay, such as overlay between two subdivisions (also called area-to-area overlays), line-to-area overlays, point-to-area overlays. Moreover, both in area-to-area and in line-to-area overlays, input datasets may be collections of possibly intersecting regions and lines. Two maps may be combined to intersect, form a union, or one map may be used to update another; multiple maps may be combined using Boolean expressions. On the other hand, in computational geometry overlay problems have been studied in a much more standard form: • segment intersection problem: find all the intersection points within an arbitrary set of segments; • red-blue intersection problem: find the intersection points of two sets of segments, where no intersections exist within the same set;
344
L. de Floriani et al.
• superimposing plane subdivisions', given two subdivisions U\ and 1^2, compute a subdivision E' whose edges and regions are obtained as the intersection between edges and regions of Ui and ^2Segment intersection algorithms can be used to overlap line maps (e.g., road networks). Red-blue algorithms apply to map layers consisting of general subdivisions with features (see Section 2.4). Some algorithms for plane subdivisions have further restrictions, for instance, to trapezoidal maps [95], to convex regions (e.g., a triangulated map) [207]. In all overlay problems, the number of intersections is /: = Q{n^) in the worst case, where n is the input size. The problem complexity is bounded by 0{n -\-k). A brute force solution consists of computing the intersections between every pair of entities from the two given layers, and works in &{n^). Methods developed in the GIS community mainly consist of heuristic "filters" which try to reduce the number of tested pairs by superimposing a hierarchical spatial index. The filter is based on a decomposition of the plane into blocks, and on distributing the objects to be intersected (the edges and regions of each layer) among the various blocks. Pairs of objects which lie in disjoint blocks of space can be discarded from consideration since they cannot intersect. Then, an exhaustive search for intersections is applied within each block. The filter, however, is not guaranteed to be effective, i.e., some redundant tests are still possible. Nevertheless, these techniques show a good practical behavior. Even if they turn into an exhaustive intersection search in the worst case, their efficiency has been widely experimented in practice. For some methods, a theoretical analysis of the average randomized case is available (e.g., see [93]). Filtering methods can be subdivided into (i) methods decomposing the space into disjoint blocks, eventually splitting objects that cross several blocks; and (ii) methods decomposing the space into possibly overlapping blocks, storing each object in exactly one block. The simplest decomposition scheme based on disjoint blocks is a uniform grid [104, 105]. The resolution of the grid determines the efficiency of the filter. Uniform grids show a poor performance when data are irregularly distributed. Quadtrees [242,243,210] are adaptive grids, based on a recursive partition of an initial square into four sectors. In this way, a different grid resolution can be achieved in each part of the domain according to the local density of data. Many variants of quadtree-like structures have been proposed, depending on the type of data to be stored: either the regions or the edges of a map. Boolean operations are easily done on maps with a superimposed quadtree-like structure. The two input quadtrees are traversed synchronously, by visiting nodes corresponding to the same portion of space at the same time; a quadtree for the result of the Boolean operation is also incrementally built (see [243]). Binary space partitioning (BSP) is a technique bom in the image processing field and lately applied to GIS [273]. Still based on a recursive subdivision of space, it uses a more flexible scheme. At each step, the current block is subdivided into two parts by an arbitrary straight line. The resulting structure can be described as a binary tree whose nodes correspond to convex polygons. BSP-trees support algorithms for performing Boolean operations on objects stored in them [205]. Methods based on overlapping blocks filter candidate pairs by comparing bounding boxes. The bounding box of a two-dimensional entity is the smallest axis-parallel rectangle that completely contains it.
Applications
of computational
geometry to geographic information systems
345
Structures of the R-tree family [127,235,250,17,92] consist of trees with a degree bounded by a predefined constant value, where data objects are stored at the leaves and every internal node represents the bounding box of all the objects stored in its children. The bounding boxes associated with different nodes (even within the same layer) may overlap. A separate R-tree is built for any map layer. The intersections between two layers are computed while descending the trees: at each step, tests on the bounding boxes are performed, and the results of such tests are used to cut off some branches of the trees which are guaranteed to produce no intersection. Intuitively, an "ideal" R-tree should be balanced, its bounding boxes should be as disjoint as possible, and the amount of empty space enclosed in them should be low. In fact, these properties enhance the efficiency of the filter. The numerous existing variants of R-trees are characterized by different criteria used to evaluate the "good quality" of an R-tree, and by different construction strategies. Common criteria try to minimize the area covered by the rectangles [127], or to avoid overlapping rectangles [250], or to aggregate objects based on their spatial proximity [235,92]. Since many R-trees support dynamic insertions and deletions of objects, there is a trade-off between update time and the quality of the tree produced. R*-trees [17] seem to be the most efficient ones in practice. In computational geometry, the purpose has been to find algorithms with a good theoretical complexity [18,32,30,31,41,124,207]. Some of such techniques, especially the plane sweep paradigm (see below) have been integrated in GIS environments [166,167]. The classification of the major existing approaches can be as follows: • an approach based on a segment tree, i.e., a special data structure which hierarchically partitions the plane according to the configuration of input segments [213,31]; • a randomized incremental approach [41,22], which computes all the intersections generated by a generic set of segments by adding the segments one at a time; • a sweep-line approach, which finds the intersections while translating a line through the plane and monitoring the segments intersected by such a line [18,30,32,207]; • an algorithm based on topological sweep, i.e., a sweeping process driven by the topological structure of the input subdivisions [95,124]. The problem of overlapping subdivisions encoded through hierarchical models is faced in [184]. A segment tree is a binary tree whose leaves represent, in the left-to-right order, the vertical strips defined by every pair of consecutive vertical lines drawn through the segment endpoints. Data segments are associated with nodes of the tree in an appropriate way. Then, it is sufficient to test intersections only between segments associated with the same node. Space requirements are reduced by dynamically constructing only a portion of the tree at a time: a single root-to-leaf path [31], or a single level [213]. In incremental algorithms, segment intersections are reported while constructing a trapezoidal decomposition of the plane. The trapezoidal decomposition induced by a set S of segments is obtained by drawing a vertical line through each segment endpoint or intersection point, until another segment of S is encountered in both directions. The efficiency in locating the trapezoids of the current decomposition affected by the insertion of a new segment is obtained by means of special auxiliary data structures which encode the history of the construction [41,22].
346
L. de Floriani et al. Table 1 Major map overlay algorithms. For each algorithm, the worst-case time complexity and the input requirements are indicated. Parameters n and k denote the input and the output size, respectively; the time complexity for incremental algorithms has been computed through a randomized analysis Algorithm
Approach
Input
Time
[22,41] [31,213] [18] [207] [32] [30] [95,124]
Incremental Segment tree Sweep-line Sweep-line Sweep-Une Sweep-line Topological sweep
Segments Red-blue segments Segments Plane subdivisions with convex regions Red-blue segments Segments Plane subdivisions
0{n\ogn+k) 0{n\ogn+k) 0{{n + k)\ogn) 0{n\ogn + k) 0{n\ogn+k) 0{n\o%n + k)
0(n+k)
Sweep-line algorithms are evolutions of the classical sweep-line method of Bentley and Ottman [18] for reporting the intersections in a set of segments. The basic idea is moving a vertical line left-to-right on the plane, and monitoring the segments intersected by such a line. The key observation is that, if two segments intersect, they must appear in consecutive positions along the line at some instant. Specialized sweep-line algorithms have been defined by relaxing the straightness condition of the line and/or the left-to-right order in intersection reporting; also, some algorithms require additional properties on the input segments [31,32,207]. The topological sweeping [95,124] exploits the topological relations among the edges of a plane subdivision in order to advance the sweepline. In practice, the sweep-line is replaced by a cut on the graph induced by the edges of the two input maps and their intersection points, which is progressively moved left-to-right. The algorithms developed in computational geometry are summarized in Table 1. All the above approaches have a computational complexity of 0(n \ogn -J- k), where n is the size of the two maps and k is the output size (for randomized algorithms this is an expected time complexity). The only exception is the topological sweep method which leads to 0(n-\- k) worst-case optimal algorithms. Andrews et al. [7] provide an experimental comparison of computational geometry overlay algorithms and GIS overlay algorithms. The compared approaches are the uniform grid [104,105], the quadtree [242,243], the BSP tree [273] from the GIS literature, and Bentley and Ottman's sweep [18], the trapezoidal sweep [32], and the hereditary segment tree [213] from the computational geometry literature. The results show that filtering heuristics typically perform better because they take advantage of the typical characteristics of GIS data (short segments with a low number of intersections per segment). On large datasets, however, the grid tends to increase running time, and quadtrees and BSP trees may introduce a serious space overhead. Asymptotically efficient computational geometry methods do not perform well on GIS data. An exception is the algorithm by Chan [32], which is competitive with GIS-based approaches, even on large data sets. The segment tree algorithm is the best one on artificial datasets, but the worst one on real GIS data.
Applications
of computational
geometry to geographic information systems
347
3.3. Geometric problems in map generalization The map generalization is known in cartography as a process of selection and representation of details to be shown on a map on a given scale. The map generalization involves different tasks, such as removing objects, simplifying geometry, aggregating several objects into one, etc. In GIS, generalization is more generally intended as a reduction of "information density" in a geographic database while preserving its overall structure and semantics. Generalization is a complex task, both conceptually and computationally. It involves geometric aspects of geographic entities (shape, structure, and detail), as well as nongeometric ones (role and relevance in the map context). In traditional cartography, generalization processes are classified into the following basic operations [232]: • selection decides whether an entity should appear (i.e., be explicitly represented) or not in the simplified map; • aggregation merges different entities into a single one; • collapse reduces the dimensionality of an entity (e.g., a small region collapses to a point, a thin region collapses to a line); • symbolization transforms a geometric entity into a symbol; • simplification reduces the accuracy in representing the shape of an entity; • exaggeration modifies the shape of an entity to highlight features that would become hardly visible on a small scale; • displacement also modifies the shape to set apart entities that would become too close to each other. Selection and aggregation are usually controlled through non-geometric rules. Symbolization is also non-geometric, except for the problem of avoiding overlapping symbols, which is discussed separately in Section 3.4. The remaining operations are primarily geometric, since they affect the shape of entities explicitly represented in the map at reduced resolution. Simplification is by far the most studied problem in the generalization. The best known and used algorithm is probably an early refinement heuristic proposed by Douglas and Peucker for a simple open polygonal chain [72]. Starting from an initial approximating sequence, at each cycle the algorithm inserts the point that maximizes the distance from the current approximation as long as the maximum error gets below a given threshold. A straightforward implementation runs in O(n^) time in the worst case; a sophisticated implementation running in 0(^log*n) time has been proposed recently [139]. The GIS literature is full of other heuristics proposed for the same purpose, which are usually compared empirically (see [192] for a survey and experimental comparisons; [176,214] for more recent examples). A rigorous approach to the problem is due to Imai and Iri [149] who first gave a formalization of line simplification as an optimization problem. Namely, given an input curve and some metric to measure the error in approximating it, they outline two basic problems: (i) minimizing the number of vertices of the output chain for a given threshold error; (ii) minimizing the error of the output chain for a given number of vertices. Imai and Iri give algorithms, and list results by other authors to cover both problems under four different metrics. Other results are also referred to by Guibas et al. [125]. All algorithms have a superquadratic time complexity for generic polygonal chains, but for a special metric, a sub-
348
L. de Floriani et al.
quadratic time complexity can be achieved [147]. Problem (i) can be solved in linear time for the special case in which the input is the image of a piecewise-linear function [148]. An elegant definition of problem (i) is also suggested by Guibas et al. [125]: a homotopy class is obtained by convolving the input line with a disk having a radius equal to the given threshold. The solution is a polygonal chain with minimum links, which is homotopic to the input line into such a region. Linear algorithms for computing homotopy paths inside simple polygons were proposed by Suri [258], Ghosh [113], and Hershberger and Snoeyink [138]. All such algorithms follow a greedy approach. Guibas et al. also study problem (i) as a problem of ordered stabbing [125]. Only disks centered at vertices of the input chain are considered: the solution must be a minimum-link chain stabbing such discs in order. For such a problem, they give an 0{n\ogn) suboptimal greedy algorithm, as well as an optimal quadratic algorithm based on dynamic programming; finally, they give a linear time optimal solution for the special case in which discs in the input are all disjoint. All the algorithms cited above cannot be considered as ultimate solutions to the problem, because they cannot guarantee that the output will be free of self-crossings. A negative result by Guibas at al. [125] shows that the problem of finding a minimum-link simple polygon for a given homotopy type is NP-hard. In the same paper, the problem of line simplification is also studied in the context of a map: given a plane straight-line graph induced by a set of non-crossing polygonal chains, find a minimum-Unk approximation (in the homotopy class of the map, as outlined above for lines). Also, this problem is NP-hard: the difficult part is in positioning vertices that have more than two incident edges. A more general problem of subdivision simplification has been recently faced by Weibel [287] and de Berg et al. [51]. Weibel [287] defines constraints on the simpHfication process based on cartographies principles, classified into metric, topological, semantic (like preservation of class membership) and gestalt principles (constraints used by cartographers). De Berg et al. [51] face the problem of simplification with the main purpose of reducing the complexity of a subdivision. They propose a nearly quadratic algorithm for the following problem: given a polygonal line, a set of feature points, and a real number ^ > 0, compute a simplification that guarantees (i) a maximum error e, (ii) that feature points remain on the same side of the simplified chain as of the original chain, and (iii) that the simplified chain has no self-intersection. Relatively little research has been conducted on merging areal features. The earlier techniques were usually raster-based involving mathematical morphology operators such as dilation and erosion. Collapse problems, like reduction either of a ribbon-shaped area to a center line, or of an areal feature to a point, are faced by using the medial axis transform (see [281] for a survey, and [74,160] for algorithms on medial axis). Jones et al. [154,281] describe the implementation of a few generalization operators based on a triangulated spatial model of a map built on the constrained Delaunay triangulation of the map vertices and edges (see [173,248]). Such operators allow detection of conflicts and their resolution, dimensionality reduction through skeleton generation, boundary simplification and merging of nearby objects. On a more general perspective, Saalfeld [241] has recently suggested that the basic operations of map generalization can be expressed in terms of graph drawing. Although such an approach seems to be promising, so far it is just a challenge launched to experts in graph drawing, while no algorithms based on it have been proposed yet. Another approach to the
Applications of computational geometry to geographic information systems
349
map generalization has been recently proposed by Puppo and Dettori [68,223], which is based on functions defined between cell complexes (describing maps) and continuous under the finite topology. This approach is mainly intended to giving consistency control of operations that affect the topology of the map, and to the definition of multiresolution models. By following the approach of Puppo and Dettori, algorithms for geometric consistency have been recently proposed by Delis and Hadzilacos [67]. To summarize, we remark that while only empirical or manually-assisted solutions to the map generalization are used in practice, only partial solutions to a few theoretical subproblems have been proposed. A unifying framework that can formally incorporate all operations involved in the map generalization is still an open issue.
3.4. Map labeling Map labeling is a problem of critical importance in cartography. It consists of positioning labels on the map under the following constraints: they must be legibly referred to spatial entities; they cannot overlap; they cannot cover relevant features of the map. In manual cartography, this task is estimated to take about 50% of the time to draw a map; hence the importance of finding automatic procedures to place labels. Map labeling is often subdivided into three subproblems, namely, labeling areas (e.g., countries, lakes), labeHng lineal features (e.g., rivers, roads), and labeling points (e.g., cities). According to some authors [70], there exists a hierarchical relationship that permits to solve such problems separately: area features are placed before point features, which in turn come before line features. However, most literature has been devoted to studying point labeling. Informally, point feature labeling is defined as follows: given a set of points spatially located, and a set of labels referred to each point, find the choice of label positions that minimizes the total number of label-label and label-point overlap. Labels are modeled as rectangles of variable size. Most cartographers agree on constraining a label to have the referred point either at one of its four comers, or at one of the midpoints of its four edges. Many solutions to point labeling have been based on greedy techniques with backtracking to escape invalid configurations (see, e.g., [70,152] and references therein). Different heuristics were adopted to speedup algorithms, which, however, have an exponential time complexity in the worst case. Cromley [47] and Zoraster [296] independently proposed an approach based on integer programming and iterative solutions based on relaxation. Christensen et al. [38] give an extensive survey and an empirical analysis of several computational techniques for map labeling. Moreover, they propose an algorithm based on gradient descent and another one based on simulated annealing. Both such algorithms are based on iteration: starting from an arbitrary configuration, they make local improvements. With a gradient descent, the local change that gives the best improvement is performed at each iteration. However, this method can get stuck at local minima without achieving the optimal solution. In the algorithm based on simulated annealing, local minima are avoided through a stochastic approach. At each iteration, local random changes are performed, which are discarded with an increasing probability if they worsen the cost of the configuration. Christensen et al. show how to manage the cost to include not only the number of conflicts, but
350
L. de Floriani et al.
also placement preferences, and possibly deletions of labels in excess to escape from illegal configurations. Formann and Wagner [99] have studied a version of point labeling, where only four positions per label are allowed; they have shown that the problem is NP-complete through reduction to 3-satisfiabiHty. They also propose an optimal algorithm running in 0{n log^ n) time for arbitrary rectangles, and in 0{n \ogn) time for equally-sized squares, when only two possible positions per label are allowed. On this basis, they propose an approximate solution for the case of four possible positions that can be found in 0{n \ogn) time and ensures correct placement of labels whose size is at least 50% of the optimal. They also show that this is the best approximation ratio that can be achieved in polynomial time for this specific problem. Kucera et al. [168] studied the same problem, but developed an exact super polynomial algorithm that can be applied to sets with up to approximately 100 points. Wagner and Wolff [279,280] have noted that in practice the approach of Formann and Wagner hardly ever results in label sizes significantly larger than half the optimum. They study variations of the problem and find a practical way to improve the size of the squares. Recently, Agarwal et al. [4] have been investigating the problem of computing a large non-intersecting subset in a set of rectangles in the plane. An exhaustive bibliography on the map labeling problem can be found at http://www.inf. fu-berlin.de/map-labeling/papers.html. 3.5. Other analysis issues In this subsection, we will deal with other issues that have received some attenfion in both computational geometry, and GIS: namely, map conflation, path planning, and construction of cartograms. The path problem in the context of terrain models will be discussed in Subsection 5.4. Refer also to Chapter 15 for further details. Maps provide approximations of the real locations and extents of geographic objects. The representation of the same object may differ in two maps for small changes in its shape and displacement. Map conflation is an operation aimed at reconciling two variants of the map of the same area, in order to compile a map that would integrate information from both [238]. The dissertation of Saalfeld [241] provides both a mathematical modeling framework, and a collection of algorithms for building a conflation system. Basic issues in this context are plane graph matching, and geometric transformations on planar regions. Plane graph matching does not involve the graph isomorphism: heuristics for feature matching, and neighborhood relations are used. Geometric transformations and final merging of the two maps is performed by using a triangulation of the maps [237]. The computation of optimal paths has been studied in GIS mainly for road networks. In these cases, problems can be modeled in a graph-theoretical setting, and generally do not involve geometric computation. Such methods cannot be applied, for instance, in planning a new road across a region: the road will not, in general, follow the existing edge of the map, but rather it will traverse the interior of the region along a path that did not exist before. Path computation involves geometric calculations and cannot be modeled as a discrete graph theoretic problem (see the work of Mitchell and Suri [197] for a survey).
Applications
of computational
geometry to geographic information systems
351
The Weighted Region Problem consists of finding an optimal path in a planar subdivision, where a non-negative cost is associated with each edge and region. Such a cost is the cost of travelling one unit of length across the region/along the edge, and may be based on soil, vegetation, etc. Costs can also be infinite, and thus model obstacles which cannot be traversed. The problem is relevant both to motion, and to planning situations such as building highways, railways, pipelines, etc. The weighted region problem has been intensively studied by Mitchell. In [196] the algorithm is proposed that finds an approximated shortest weighted cost path from a fixed point in 0(n^ logn), where n is the size of the problem. In recent paper [189], Mata and Mitchell propose the algorithm that can deal with an arbitrary pair of points, and has an improved time complexity (an n^ factor instead of n^). Such an algorithm has been successfully implemented. The 0(n^) algorithm for a special instance of the above problem in which only regions with weights in the set {0, 1, -foo} is described in [112]. In [266] algorithms for the weighted region path problem working on a raster model as well as the implementation of the algorithm of Mitchell and Papadimitriou based on constrained Delaunay triangulation (see [173]) are described and compared. A cartogram is a geographic map that is purposely distorted so its spatial properties represent quantities not directly associated with the position on the globe [71]. Distortions should act as homeomorphisms, i.e., continuity of the map should be preserved. Some automatic methods for generating cartograms have been developed that use iterative techniques for computing differential equations involving force fields [71,263]. Recently, Edelsbrunner and Waupotitsch [82] have proposed a combinatorial algorithm that is based on a sequence of local piecewise linear homeomorphic changes, acting on tiling of the map made of regular triangles.
4. Terrain data modeling and processing Terrain processing requires input, data models, and algorithms different from those needed for 2D data. Terrain processing is also a major source of geometric problems, which stimulate the use of computational geometry, both in applying existing techniques, and in developing new ones. The term Digital Terrain Model (DTM) is used generically to denote a model representing terrain relief on the basis of a finite number of samples [193]. Elevation data are acquired either through sampling technologies (on-site measurements or remote sensing: tacheometers, photogrammetry, SAR, etc.), or through digitization of existing contour maps [215]. Raw data come in the form of elevations at a set of points, either regularly distributed, or scattered on a two-dimensional domain; chains of points may form polygonal lines, approximating either lineal features, or contour lines. On the basis of sampled data, different models can be built: contour maps, rasters, and mathematical surface representations. Mathematical models are either global (i.e., defined through a single function interpolating all data), or local (i.e., piecewise defined on a partition of the domain into patches). Regularly distributed data generally lead to regular square grids, while scattered data generally lead to triangulated irregular networks. Since we are concentrating on models and methods rooted in computational geometry, we will not cover
352
L. de Floriani et al.
raster models and digital geometry techniques to process them, as well as global mathematical models and algebraic techniques. In the rest of this section, we will deal essentially with general problems related with construction and storage of DTMs, while more specific problems regarding their analysis will be described in the next section. The interested reader can also refer to a survey by van Kreveld [270] for more detailed issues about DTMs, and in particular algorithms on TINs, and to a survey by Magillo and Puppo [185] for issues on parallel algorithms for terrain processing. 4.1. Classical terrain models A topographic surface (or terrain) cr is the image of a real bivariate function / defined on a compact and connected domain ^ in the Euclidean plane, i.e., a = {(x, y^ f(x,y)), (x, y) e Q}. Given a real value ^, a set Ca(q) = {(x,y) e Q, f(x,y) = q] is the set of contours of a at height q, and it is formed by a set of simple lines (provided that / has no relative maxima, minima, saddles, or horizontal plateaus at height q). A Digital Terrain Model {DTM) is a model providing information on such a surface on the basis of a finite set of data. Terrain data are measures of elevation at a set of points y — {uo,..., fA^} C A?, plus possibly a set of non-crossing straight-line segments E — {e^,.. ..CM} having their endpoints in W. Data points in V can either be scattered or form a regular grid. Lines in E can possibly form a collection of polygonal chains. Three classes of DTMs are usually considered in the context of GIS [216]: • Polyhedral terrains', a polyhedral terrain is the image of a piecewise-linear function / . A polyhedral terrain model can be described on the basis of a partition of the domain Q into polygonal regions having their vertices in V (and such that the segments of E appear as borders of regions). The image of / over each region is a planar patch. The most commonly used polyhedral terrain models are Triangulated Irregular Networks (TINs), in which all regions are triangles. • Gridded elevation models: a gridded elevation model is defined by a domain partition into regular polygons induced by a regular grid over Q. The most commonly used gridded model is the Regular Square Grid (RSG), in which all regions are squares. Function / is usually a bilinear function interpolating the vertices of the grid. In some cases, an RSG is treated as a raster, and a constant function is used over each region. This is said to be a stepped model, and it is obviously non-continuous across the edges of the grid. • Contour maps: given a sequence Q = [qo,.. .,qh} of real values, a digital contour map of cr is an approximation of the collection of contours Ca,Q = [Ca (qi), / = 0 , . . . , h}. Contours in digital contour maps are often represented as point sequences; a line interpolating points of a contour can be obtained in different ways: from the simplest case of a polygonal chain to spline curves of various orders. Contour maps are easily transposed onto paper and best understood by humans, but are not suitable for performing a complex computer-aided terrain analysis. This is due to the complete lack of information about terrain morphology between two contour lines. An automated terrain analysis is performed on RSGs or TINs. As for maps, some operations are better supported by RGSs, and others by TINs. Advantages and disadvantages of the two models are illustrated in [27,9].
Applications
of computational
geometry to geographic information systems
353
Triangulated Irregular Networks are the most interesting models for application of computational geometry techniques. A TIN is based on a triangulation T of the domain with vertices at the projection on the x-y plane of data points (or of a subset of them) and sometimes including a set of straight-line segments as a subset of the edges of T. The resulting piecewise-linear surface interpolates data elevations at all points and lines whose projections are vertices and edges of the triangulation, respectively. Data structures describing a TIN are those for encoding triangulations in the plane (see Section 2.4). There also exists a flourishing literature on TINs using smooth patches at each triangle, in order to achieve C^ continuity of the resulting surface [206]. Building smooth patches is easy, though expensive because of numerical computation involved, if surface normals are provided (or estimated) at each datum. There are different strategies to define a TIN having its vertices at a given set of data. In general, the connection topology of vertices is required to satisfy some optimality criterion. Optimality criteria can be defined either for the underlying triangulation, or for the surface itself. A measure can be assigned to each triangle of triangulation (e.g., its area, the minimum/maximum/mean size of its edges, or its angles). Then, the key for comparing triangulations can be the sum, or the maximum, or the minimum, or a lexicographically ordered vector of the measures of all triangles. The most commonly used triangulation is the Delaunay triangulation which is optimal according to the following criteria: it maximizes the minimum angle of its triangles [172,221], it minimizes the maximum circumcircle [48], and it minimizes the maximum containing circle [227]. Optimality criteria defined on the approximating surface have also been considered in the context of scattered data interpolation. Triangulations defined by such criteria are referred to as data-dependent triangulations, since the optimization also depends on the z-values of data points, rather than simply on their x-y coordinates. Dyn, Levin, and Rippa [78] consider optimality criteria that can be defined through some cost function of the resulting surface. Examples of optimality criteria are the following: • three-dimensional criteria: criteria like the max-min angle, the min-max angle, or the minimum edge length are considered on triangles and edges of the surface, rather than on their projections on the plane; • nearly C^ criteria: the piecewise-linear surface that is as close as possible to a C^ approximation on the edges of the triangulation is selected; • variational criteria: the unknown surface is assumed as the one minimizing some functional defined over a suitable space of functions. One example of such a functional is the roughness, defined by the Sobolev semi-norm of the function. Surprisingly, the surface with minimum roughness is always given by the Delaunay triangulation of projected points, independently of the z-values of its vertices [230]. When the data set also includes a set of line segments, it is also important that such segments appear as either edges, or chains of edges in the TIN. In this case, either constrained [173,248] or conforming [83,239] triangulations are used. A constrained triangulation T of a set V of points and a set E of straight-line segments is a triangulation of V that contains £" as a subset of its edges. A constrained Delaunay triangulation is a constrained triangulation satisfying a weaker version of the circumcircle property. A conforming triangulation r of a set V of points, and a set E of straight-line segments is a triangulation of V such that every segment of E may be decomposed into a chain of edges of T. In other
354
L. de Floriani et al.
words, the constraint segments are broken into pieces in the conforming triangulation in order to avoid long and thin triangles. See Chapter 5 for details. For the conforming and constrained triangulations, only optimality criteria defined on the underlying triangulation have been considered so far. A survey of Delaunay triangulations (both non-constrained and constrained) for TIN creation is provided in [264].
4.2. Construction and conversion algorithms Raw data can come in the form of a set of points V, and possibly of a set of lines E. In case the points of V are distributed regularly, an RSG is implicitly provided. Since sometimes DTMs are derived from digitizing the existing contour maps, contours may also play the role of raw data. Hence, we have the following possible construction and conversion problems. Note that a clear distinction between conversion and construction techniques cannot be done since sometimes models and raw data are the same (e.g., regular distributed data points and RSGs). 1. RSG from sparse points. There are three possible approaches for constructing an RSG from a set V of scattered points [216]: (a) pointwise methods: the elevation at each grid point p is estimated on the basis of a subset of data that are neighbors of p. There are different criteria to define the neighbors that must be considered, e.g.: the closest k points, for some fixed k\ all the points inside a given circle centered at p, and of some given radius; the neighbors of p in the Voronoi diagram of V U {/7}; etc. The basic geometric structure for all such tasks is the Voronoi diagram of the given data points. If raw data include line segments, then a Voronoi diagram of segments, or a bounded Voronoi diagram [248] can be used. (b) global interpolation methods: a unique interpolating function (usually, a polynomial) is computed, which interpolates elevations at all points of V. The RSG is obtained by sampling such a function at grid nodes. (c) pathwise interpolation methods: the domain is subdivided into a number of patches, which can be either disjoint or partially overlapping, and either of regular or irregular shape. The terrain is approximated first within each patch through a function that depends only on data inside the patch. The elevation at grid nodes inside each patch is estimated by sampling the corresponding function. 2. RSG from TIN. Some systems first compute a TIN from sparse data points (and, possibly, fines), then they convert such a representation into an RSG [284]. This conversion is indeed a special case of patch interpolation methods described above. After computing the TIN, elevations at RSG nodes can be efficiently evaluated by scan-line conversion algorithms that run in linear time [98]. 3. RSG from contours. Early methods performed this conversion as follows: a number of straight lines at given directions (at least a horizontal and a vertical line) are drawn through each node of the grid, and their intersections with the contour lines are computed; terrain profiles along each line are approximated by some function interpolating contours at intersection points; the elevation at the grid node is computed as an average of its approximate elevations along the various profiles. The underlying
Applications
4.
5.
6.
7.
8.
9.
of computational
geometry to geographic information systems
355
geometric problem is to find intersections between the contour map, and the fines through each grid node: red-blue intersection algorithms can be used for this purpose (see Section 3.2). More recent approaches perform this conversion in two steps: contours are first converted into a TIN, then such a TIN is scan-converted to produce the final RSG [216]. Carrara et al. [29] provide an experimental analysis of four different methods for deriving an RSG from contour lines; the results on RSG's accuracy in preserving a coastline are reported in [28]. Eklund and Martensson [88] compare the accuracy of RGSs generated from contour lines and from scattered points. TIN from points. A TIN is obtained from sparse data points by computing the triangulation having vertices at data points. In case raw data also include line segments, the constrained or the conforming triangulation is computed. Thus, the basis for TIN construction are algorithms for building the Delaunay triangulation, the datadependent triangulation [78,230], the constrained Delaunay [173] and the conforming Delaunay triangulation [83,239]. The interested reader is referred to Chapter 5, and to [11] for further details. TIN from RSG. This conversion is usually aimed at data compression: the adaptivity of the TIN to surface characteristics is exploited to produce a model of terrain that can be described on the basis of a reduced subset of elevation data from the input RSG. Hence, RSG to TIN conversion involves approximation. The construction of approximated TINs is treated in detail in Subsection 4.3. TIN from contours. A TIN conforming to a given contour map should be based on a triangulation that conforms to the set of contours. This problem has been studied in the literature both in the context of GIS, and, more generally, in the reconstruction of three-dimensional object models. The constrained Delaunay triangulation, using projections of the contours on the x~ y plane as input constraints, gives a conforming TIN, but it may produce artifacts, due to triangles having all vertices on the same contour line. Many algorithms adopt heuristics to avoid artifacts. In [37], flat triangles are avoided by adding the medial axis of each pair of adjacent contour lines to the dataset before computing the triangulation. Specific algorithms developed for TINs are described in [38,110]. More general algorithms for 3D objects produce a triangulated surface from a sequence of cross-sections, resulting from the intersection of the object with a collection of parallel planes [159,109,111,255]. Contours from points. As for RSG from contours, this conversion is usually done in two steps: an RSG or a TIN is built first from raw data, then contours are extracted from such a model. Contours from RSG. If the RSG is a bilinear model, then all square regions can be processed independently: possible intersections of the four edges of each region with contour lines are found in constant time. Contour segments inside each region are obtained by connecting intersection points at corresponding elevations. In the second step, corresponding contour segments from adjacent regions must be sewn together to form contour lines by a contour following technique. Contours from TIN. Building contours from a TIN is completely similar to constructing contours from a bilinear model. Contour segments for triangular regions
356
L. de Floriani et ah
can be found independently while contour extraction needs contour following. In [13,180,269], efficient structures based on interval trees [269], kd-trees [180], and segment trees [13] are proposed, which permit us to extract contours from a TIN in 0 (log n-\-k)ov 0(>/n + k) time, where n is the size of the TIN, and k is the size of the resulting contour map. The search structure, however, can be a serious storage overhead. Van Kreveld et al. [272] reduce the storage requirements by observing that a contour can be traced directly if one mesh element through which the contour passes is known. They give an algorithm which constructs the so called contour tree, a tree that captures the contour topology of a TIN, or an RGS, in 0(n logn) with less additional storage than a previous algorithm proposed by de Berg and van Kreveld [54]. The problem of efficiently transmitting and compressing a TIN has been recently addressed by Snoeyink and van Kreveld [256] for the case of TINs based on Delaunay triangulations. Given a 2D Delaunay triangulation, they show that one can determine a permutation of the data in 0(n) time such that the Delaunay triangulation can be reconstructed from the permuted data in 0(n) time. More general methods for compressing triangular meshes (not just TINs), which exploit the compactness of triangle strips, have also been proposed by other authors [36,55,89,262].
4.3. Terrain generalization The more data are available, the better a terrain can be represented. Modem acquisition techniques provide huge datasets that permit to represent terrain accurately. However, a high representation accuracy is paid for in terms of high costs for storage and processing. Generalization techniques provide the means to bring such costs into manageable bounds, by trading-off representation costs and accuracy. An approximate terrain model is a model built by using a reduced set of data. The approximation error e is measured with respect to a reference model built on the whole data set: a common choice is the maximum difference between the elevation at a data point, and its interpolated elevation in the model. The accuracy of an approximated representation with respect to the reference model — which has no relation with the accuracy of samples with respect to reality — can be defined as the inverse of the error, namely, \/{\-\- e). An application can optimize the performance by adopting an approximate terrain model whose accuracy is within a required threshold. In some cases, the threshold may be variable through the surface domain. For instance, a higher accuracy may be needed in the proximity of important features, for the purpose of terrain analysis; the accuracy may be decreasing with distance from a given viewpoint, for the purpose of landscape visualization. However, it is easy to transform a generalization problem with a variable threshold into a problem with the constant threshold by performing a simple rescale of the input data through the inverse of the threshold function [194]. The ideal aim of terrain generalization is to achieve an optimal ratio between the accuracy and size of representation. As for line simplification, there are two different optimization criteria: • minimizing the number of vertices of the model for a given accuracy; • maximizing the accuracy for a given number of vertices.
Applications of computational geometry to geographic information systems
357
For the first problem a negative result has been proven by Agarwal and Suri [1]: they consider a polyhedral terrain (for simplicity, a TIN), and show that the problem of approximating it at a given accuracy with another TIN having a minimum number of triangles and vertices at arbitrary positions is NP-hard. It follows that also the second problem is NP-hard. It was conjectured that such problems remain NP-complete even if vertices of the approximate terrain are constrained to lie at original data points. Only for the first problem, there exist algorithms that can achieve a suboptimal solution in polynomial time, while guaranteeing some bounds on its size. A first algorithm proposed by Agarwal and Suri [1] can build an approximate solution in 0(n^) time, having 0(klogk) triangles, where k is the number of triangles in the optimal solution. More recently, a randomized algorithm was proposed by Agarwal and Desikan [6] that can achieve size 0(k^ log^ k) in 0(n^+^ -h k^ log^ k log | ) expected time. Both algorithms build a simplicialpartition, defined as a set of disjoint triangles whose union covers all point data, and such that each triangle is compatible with the required accuracy. Such a set of triangles is completed to form a TIN. Finding a simplicial partition involves sophisticated techniques whose implementation is hardly feasible in practice; however, a simplified implementation of the latter algorithm has given empirical results that are comparable to those obtained with other methods. An algorithm that solves the first problem with a greedy technique has been proposed by Silva et al. [253]. The approximate TIN is built incrementally by iteratively cutting triangles (ears or bites) from hollow polygons that span the domain: at each step the algorithm considers a polygon, and bites from it a triangle of maximal area that is compatible with the required accuracy. It is conjectured in that also this algorithm might guarantee a bound on the size of the solution, but proving this fact is still an open issue. This algorithm works with simple data structures, and requires a small amount of memory. Most other algorithms use iterative methods based on heuristics, which try to select a "good" subset of the input dataset as a set of vertices for the approximate model. Such methods can be used either for the first or for the second problem, depending on the test adopted to stop iteration. Refinement heuristics start from a grid whose vertices are a very small subset of input data. New data points are iteratively inserted as vertices of the model, until the required constraints are satisfied. Simplification heuristics work in the opposite direction, by iteratively discarding points from an initial model built over the whole data set. In this case, points are selected at each iteration in order to cause the least possible increase in the error. Some authors have also adopted techniques that extract morphological features from the initial dataset in order to obtain constraints for the approximate TIN [33, 217,245,257,283] (see also Section 5.2). Approximate RSGs can only be obtained by subsampling the grid, while TINs are much more flexible because of their irregular structure. Many possible approximate models at different accuracies, with different sizes, can be built from a given TIN. In the case of contour maps, there are limited possibilities to vary the resolution by removing lines, while line simplification permits to obtain a wide range of different resolutions, and data sizes. Refinement methods. In [101], Fowler and Little propose a method that starts from an RSG and builds an approximate TIN in two steps. First, point features are selected using the method described in [217], and an initial TIN is built based on the Delaunay triangulation
358
L. de Floriani et ah
of such points. Then, the model is refined by iteratively adding the point corresponding to the maximum approximation error and updating the Delaunay triangulation. A similar algorithm (not involving point features) was also developed by Franklin, and an efficient implementation is available in the public domain [108]. A similar strategy was applied in [257] by using a different method for feature selection, and a data dependent triangulation: the local optimization procedure (edge swapping) applied after each point insertion tries to minimize the error of the current model. However, convergence to a global minimum is not guaranteed. Variants of the same strategy, modified for a number of data dependent triangulations were also applied in [231]. Simplification methods. Lee proposed a simplification technique based on the Delaunay triangulation [174]. A Delaunay TIN is built first over the whole dataset. Then, vertices of the TIN are iteratively dropped, based on a criterion symmetric to the one of Fowler and Little: at each iteration, the point whose deletion causes the least increase in the error is dropped, and the triangulation is updated consequently. Another simplification algorithm based on the hierarchical triangulation scheme of Kirkpatrick [161] has been proposed by de Berg and Dobrindt [50] with the purpose of building a multiresolution model (see Section 4.4). In this case, a maximal set of independent vertices is dropped at each iteration, and holes are filled by a Delaunay triangulation. Variants of the above algorithms have been analyzed and compared by De Floriani et al. [63]. A number of other simplification methods have been proposed for the more general case of free form surfaces. For surveys on such methods, see [135,226]. 4.4. Multiresolution terrain models Approximation algorithms reviewed in the previous section are usually time intensive: the construction of an approximate TIN from a dataset of 1OOK points can take minutes, or even hours, on state-of-the-art workstations, depending on the algorithm used. On the other hand, many applications need to access and process terrain models at different accuracies in a real-time context. For example, in a flight simulator, a terrain must be rendered at a high detail only close to the observer. Since the viewpoint is continuously moving, the required accuracy is changing from frame to frame, while the system cannot wait until a suitable terrain approximation is recomputed each time from scratch. The ability to provide a representation whose accuracy is variable over the domain is often called selective refinement. A so-called LOD {level-of-detail) model is a simple sequence of approximate representations at increasing levels of detail. LOD models are standard technology in graphics languages and packages, such as Openlnventor™ [209,288], and VRML [277], and are used to improve efficiency of the rendering on the basis of distance from the observer. However, such models cannot support selective refinement. In order to overcome such limitations, more sophisticated multiresolution terrain models have been developed in the literature. A multiresolution model must: • perform selective refinement for any given accuracy in short (real) time; • provide always conforming meshes, i.e., avoid cracks due to abrupt transition between different levels of detail within a mesh;
Applications
of computational
geometry to geographic information systems
359
.^^
SIMPLIFICATION
Fig. 2. The sequence local modifications generated during the incremental refinement/simplification of a triangulation.
• have a size not much higher than the size of the model at full resolution. In the following, we describe a general framework, called a Multiresolution Mesh (MM) [62,224]. Multiresolution models proposed in the literature will be reviewed next as instances of such a framework. Existing multiresolution models based on domain decomposition are all obtained from an initial model, which is progressively modified by a generalization algorithm (either by refinement or simplification). In a straightforward approach, a modification simply replaces a whole terrain representation with another one. More general modifications are local, i.e., they affect only a small part of the surface. Figure 2 shows a sequence of triangulated grids generated through incremental refinement/simplification and the sequence of modifications corresponding to the refinement process (including the initial grid). Two successive modifications can be either independent, if they affect disjoint parts of the mesh, or the second modification may depend on the first one, if some of the grid elements introduced by the first one are removed by the second one. Dependency means that the second modification cannot occur if the first one did not occur before. Each local modification can be represented by the set of mesh elements it introduces, which is called a component. Dependency relations define a partial order on the set of components, which can be represented by a DAG (see Figure 3). The collection of such components, plus the partial order, form a Multiresolution Mesh (MM), which is at the heart of any multiresolution model. An MM has several interesting properties that have been investigated in detail in [224]. In particular, any consistent (i.e., dependency-closed) subset of components defines a mesh representing the terrain at a given level of detail: such a mesh is obtained by performing the corresponding local modifications in any temporal sequence consistent with the dependency relation. Moreover, it is also true that any possible mesh made of elements belonging to any component of the MM can be obtained from some consistent subset. Therefore, selective refinement on an MM consists of finding the consistent subset that is most suitable to a given LOD.
360
L. de Floriani et al.
Fig. 3. The MM corresponding to the sequence of local updates in Figure 2.
We generically refer to the capability of an MM to provide a larger or smaller number of consistent subsets (hence, different meshes) as its expressive power. The internal structure of any specific MM determines its expressive power. An MM with few large components with many mutual dependencies will have an expressive power much lower than an MM with many, small components with few mutual dependencies. If an MM is obtained through refinement, any local modification increases resolution (and size) of the mesh locally. In this case the MM is said increasing. Even if an MM is built through simplification, it is possible to reverse modifications composing it, in order to obtain an increasing MM. All multiresolution models proposed in the literature can be interpreted as increasing MMs: in practice, every model is characterized by special rules used for generating the local updates of the MM, by the data structures adopted, by the operations supported, and by the efficiency of accessing algorithms. However, viewing the model as an MM helps understanding its expressive power independently of the specific data structures and algorithms. Multiresolution models can be subdivided in two major classes, according to their structure: • tree-like models are based on nested subdivisions; in order to give an interpretation of such models as MMs, the corresponding tree structure must be suitably translated into a DAG; • evolutionary models directly store the evolution of a mesh through a refinement/simplification process; since such models are based on the concept of local modification, they are all straightforward specializations of the MM. Tree-like models. Early hierarchical models are based on the recursive subdivision of a domain either into four quadrants {quadtree) [242], or into four equilateral triangles {quaternary triangulation) [77,118,120]. The resulting hierarchy is represented by a quaternary
Applications
of computational
geometry to geographic information systems
361
tree. The main drawback with such models is a poor expressive power, due to the impossibility to combine elements from different levels of the tree into a conforming mesh. A surface corresponding to a non-conforming mesh is affected from cracks between elements from different levels. If a quadtree (or a quaternary triangulation) is regarded as a special instance of an MM, it is easy to see that all nodes at each level of the tree must be clustered to form a single component, hence giving a pyramid of full regular grids. The basic problem with these models is that all edges of a region are split when the region is refined. In order to avoid cracks in the surface, the refinement of one region enforces refinement of its neighbors, and so on, propagating through the whole domain. Von Herzen and Barr [278] proposed a method to build conforming meshes from a quadtree that works in two steps: the extracted mesh is locally balanced first, by allowing adjacent elements to differ for no more than one level in the tree; next, each element is triangulated through a fixed pattern that depends on the levels of its neighbors. Lately, other authors have worked on similar concepts: hierarchies of right triangles are based on the recursive split of a right triangle into two, by joining the midpoint of its longest edge to its opposite vertex [73,90,134,178]. The hierarchy is described by a binary tree, and it can be interpreted as an MM by clustering triangles at the same level that are adjacent along their longest edges: components of the MM are either squares or diamonds, each formed by four adjacent triangles, except border components. Because the resulting MM is made of a high number of small components, it has a high expressive power. This model has been used successfully for rendering terrains in flight simulation through selective refinement [73,90,178]. All models based on regular subdivisions can be encoded by extremely compact and efficient data structures, by exploiting their algebraic properties (see [90,134,242] for details). On the other hand, such models can be used only if data points are distributed on a square grid. Other tree-like models have been developed, based on irregular triangulations, which can work on arbitrary datasets, and can achieve a better ratio between size and accuracy of an extracted mesh, because no constraint is imposed on the vertex distribution [61, 246]. A triangle is refined by inserting a non-fixed number of points, either inside it, or on its edges, on the basis of an error-driven refinement criterion. Edges that survive across different levels of the hierarchy permit to combine surface patches from different levels of the tree. Components of an MM corresponding to one such model are obtained by clustering nodes that refine adjacent triangles inserting vertices on their common edges. Each level of the tree is partitioned into a set of components, each bounded by edges that are not refined at that level. In general, a model with many refined edges will lead to an MM with few large components, hence reducing its expressive power. On the other hand, a model with few refined edges may contain many slavery triangles: this gives unpleasant visual effects, and stability problems in numerical computation. In [61], a comprehensive analysis of tree-like models is presented, covering several issues about data structures, neighbor finding, and selective refinement. Evolutionary models. Multiresolution is obtained by recording the evolution of a mesh through a sequence of local modifications (either refinement or simplification). Interpreting
362
L. de Floriani et al.
an evolutionary model as an MM is straightforward: each modification step performed by the algorithm generates a new component. The forerunner of evolutionary models is the Delaunay pyramid proposed in [56]. Such a model is based on a sequence of Delaunay triangulations at increasing resolutions, obtained according to a predefined sequence of decreasing error thresholds. The transition from a triangulation to the next is obtained by iterative refinement [101]. The corresponding MM is obtained by decomposing such global modification into maximal local independent modifications. The expressive power of the model may be low because it does not trace the insertion of single vertices: the MM may have a relatively small number of large components. The model proposed in [50] is also based on a sequence of Delaunay triangulations, but it is built bottom-up: each level is obtained from the previous one by eliminating an independent set of vertices of bounded degree. The corresponding MM is formed by a large number of components, namely one for each decimated vertex; moreover, the height of the DAG is logarithmic in the number of nodes. This property guarantees a good worstcase complexity of geometric search algorithms such as point location. The data structure is a direct implementation of the DAG. The algorithm for selective refinement proposed in [50] achieves output-sensitive optimal time, but it does not guarantee that the desired threshold will be fulfilled everywhere. Evolutionary models based on a totally ordered sequences of local updates, rather than a DAG, can be encoded by very compact data structures. In order to perform selective refinement, the basic idea is to scan the list of updates, performing only those relevant to achieve the required accuracy. Unfortunately, a straight scan is not sufficient, since skipping an update may prevent performing some later update that is necessary to fulfill the accuracy. Therefore, dependencies between updates must be computed on-the-fly, thus involving complex, and computationally expensive algorithms. An extremely compact model based on the Delaunay triangulation is proposed in [162]. In this case, a greedy refinement/decimation through on-line insertion/deletion of single vertices into a Delaunay triangulation is performed. The data structure stores only the simplest mesh, plus the sorted sequence of vertices inserted to refine it, each tagged with the approximation error of triangles incident at such vertex at time of its insertion. A mesh at uniform accuracy can be extracted through an on-line algorithm for Delaunay triangulation that inserts vertices from the sequence until the desired accuracy is obtained. An algorithm for selective refinement is also outlined, which perform complex tests based on the circumcircle criterion to find out vertex dependencies. A similar model, called Progressive Meshes {PM), is proposed in [145], based on a different update strategy. In this case, the basic local modification is vertex split, which expands a vertex to an edge. As for the previous model, the data structure stores only the simplest mesh, and the sequence of vertex splits. The extraction at uniform accuracy is faster than in [162] because no numerical computation is required. In the attempt to obtain efficient algorithms for selective refinement from a PM, more sophisticated data structures encoding also vertex dependencies have been proposed in [146,186,293]. In [293], a progressive mesh is built by collapsing independent sets of edges, following a technique similar to that used in [50].
Applications
of computational
geometry to geographic information systems
363
The Multi-Triangulation (MT) is a straightforward implementation of the MM framework, where every component is a triangulation [62,224]. An explicit data structure encodes all components of an MT as nodes, and maintains all arcs of the DAG describing the MT: every arc (7/, Tj) is labeled by the set of triangles of 7/ covered by Tj. Each leaf of the DAG is connected to an additional drain node, and each new arc is labeled with triangles of its source node that survive in the drain node. Based on this arc labeling, the explicit data structure represents triangles on arcs rather than on nodes of an MT. This data structure supports the extraction of a mesh by collecting all triangles labeling arcs in a given cut of the DAG. An algorithm for selective refinement that finds the minimal triangulation for a given arbitrary threshold was described first in [224], and improved in [63]. The time complexity is linear in the size of the visited consistent subset. Independently, a similar algorithm was proposed in [26], achieving similar results. A dynamic algorithm proposed recently [65] permits to update a mesh extracted from an MT after a small change in the threshold function. Such an algorithm only visits the portion of DAG separating the old and the new solution, respectively. This algorithm is especially efficient for generating gradually changing levels of detail in an interactive environment (e.g., flight simulation). A cheaper, but less efficient implicit data structure for MTs built through refinement/simplification of a Delaunay triangulation has been proposed in [64]. In this case, each component consists of a fan of triangles incident at a vertex, and is represented in the structure by storing just the vertex. Implicit data structures can be defined for MT obtained as progressive meshes, and for the hierarchy of right triangles as well. Although the storage cost is reduced by these structures, empirical results show that the algorithm for selective refinement may run about ten times slower, and also the size of the output mesh may be about twice larger [64]. The HyperTriangulation (HyT) proposed in [40] can be also considered an implementation of an MT, but the data structure is completely different. Based on the observation that the boundary edges of a component T coincide with those of the triangulation covered by r , components in a hypertriangulation are interpreted in a three-dimensional space, where the third dimension corresponds to a resolution axis. Each component forms a "dome" in such a space, resting on the components it covers through its boundary edges. The data structure stores the triangles of the MT, and triangle adjacencies in the complex formed by such domes. Adjacency information supports algorithms based on domain traversal. Such an algorithm is used to perform selective refinement for threshold functions that are monotonically increasing with distance from a given viewpoint. The time complexity in the worst case is 0(n logn) where n is the size of the HyT. Empirical results of the extraction algorithm show a performance of about lOOK triangles per second on state-of-the-art workstations. Methods based on wavelets. In the literature, also other kinds of multiresolution models have been proposed, which follow afunctional approach rather than a geometric one. The basic idea is that a function can be decomposed into a simpler part at low resolution, together with a collection of perturbations, called wavelet coefficients, which define its details at progressively finer levels of resolution.
364
L. de Floriani et ah
Wavelets have been widely used for multiresolution representation and compression of signals and images (see, e.g., [259,260] for a survey), while their applications to surfaces is quite recent (see [181] for a survey, and [122] for an application to terrain surfaces). The discrete computation of wavelets requires a recursive subdivision of the domain into regular shapes, like equilateral triangles, or squares. Therefore, resulting hierarchies correspond to either quaternary triangulations, or quadtrees. The use of tools from numerical analysis is predominant, while computational geometry techniques do not play a relevant role in this context. 5. Terrain analysis Complex analyses of terrain models include [286]: • computation of visibility maps, and solution of visibility-related problems; • terrain generalization, and feature extraction; • computation of watershed, and drainage networks; • realistic visualization; • path planning. Terrain generalization issues have been treated in Section 4.3 for building approximated and multiresolution models. Related issues will also be considered in Section 5.2 on topographic features. Rendering of DTMs and related information includes procedures for orthographic display (contours, hillshading, etc.), perspective display as well as advanced visualization techniques (interactive scene navigation, animation, etc.). Terrain visualization issues are related to viewshed computation problems (see Subsection 5.1). Also, some modeling issues related to effective real-time rendering of a DTM have been discussed in Section 4.4: approximate and variable resolution terrain models directly support compression for efficient rendering, and animation. 5.1. Visibility Visibihty problems are concerned with the computation of visibility information from a viewpoint which can lie outside or inside the domain, or with the use of visibility to solve optimization problems (see also Chapter 19). Examples of visibihty computations are finding the horizon or computing the visible portions of the surface from a given viewpoint; in the latter case, the problem is a special case of the Hidden Surface Removal (HSR) for terrains. Visibility computation algorithms are the basis for solving optimization problems. Examples of optimization problems related to visibility are finding the minimum number of towers of a given height necessary to view an area of the terrain, or finding the minimum path with specified visibility characteristics (e.g., hidden paths, scenic paths). Applications include the location of fire towers, radar sites, radio, TV or telephone transmitters, path planning, navigation and orientation (see [203] for a survey). Visibility computation problems can be classified into: • visibility queries, which consist of determining whether a given entity located on the terrain is visible from a viewpoint, and possibly which portions of it are visible;
Applications of computational geometry to geographic information systems
365
• computation of visibility structures, which provide information about the visibiUty of the terrain itself, i.e., which portions of the terrain are either visible, or invisible from a given viewpoint; knowing suitable visibility structures for a terrain also helps answering visibiHty queries. A visibility query related to a point Q simply requires to determine whether Q is visible or not. For a non-point query object (a line, a region) one may ask for either a Boolean answer (e.g., "visible" means "at least partially visible"), or for a partition of the object into visible and non-visible portions. The basic visibility structure for a terrain is the viewshed which is the collection of the surface portions visible from a viewpoint V. Another visibility structure is the horizon of a viewpoint V, which informally corresponds to the 'distal boundary' of the viewshed. Such reduced information can replace the viewshed in some applications, with the advantage of lower storage costs. More precisely, the horizon determines, the farthest point on the terrain that is visible from V, for every radial direction around V in the x-y plane. The result of visibility computations is affected by interpolation conventions adopted in the underlying terrain model. On TINs, a piecewise linear interpolation over each triangle is the standard choice. On RSGs, different GIS packages may use bilinear functions, or step functions, or other interpolation conventions; a common approach is considering a linear approximation of the edges, while disregarding the interior of the cells. Therefore, results can be different even in different implementations of the same algorithm [96]. The reminder of this subsection contains a survey of visibility algorithms. Algorithms working on TINs receive a special attention since they provide more interesting examples of applications of techniques from computational geometry. Visibility query algorithms. The simplest visibility query problem consists in determining the mutual visibility of two points P and Q on a terrain. In a "brute-force" approach, this reduces to finding either the terrain edges (for a TIN), or grid cells (for an RSG) intersected by the vertical plane passing through segment PQ. For each intersected element (edge or cell) e, a test is performed to decide whether e lies above PQ, and the two points are reported as not visible in case of a positive answer for at least one of such tests. A point visibility query can also be regarded as a special instance of the ray shooting problem on a polyhedral terrain. Given a polyhedral terrain T, a viewpoint V and a view direction (^, of), the ray shooting problem consists of determining the first face of T hit by a ray emanating from V with direction {0,a).A method for answering repeated ray shooting queries from a fixed viewpoint on a terrain has been proposed by Cole and Sharir [45], with a logarithmic query time. They build a balanced binary tree, in which every node stores a partial horizon, computed for a subset of the edges of the terrain. A ray shooting query, represented by a view direction (^, a), reduces to traversing a path on such tree, driven by a height comparison between the given ray and the horizon stored in the currently visited node. The data structure has size 0{na{n) log n), where a(n) is the inverse of Ackermann's function (which is almost a constant). Viewshed algorithms. On RSGs, the viewshed is usually represented in a discrete way, by marking each grid cell as visible or invisible [96]. Extended viewsheds are often considered, i.e., viewsheds enriched with additional information: for example, tagging each
366
L. de Floriani et al.
grid element with the number of viewpoints from which it is visible. Although a discrete viewshed is sometimes considered also for a TIN [175], viewshed computation in this case is usually performed by computing the visible portions of individual triangles. The continuous approach on RSGs is not used for two reasons: the size of the grid, and the complexity of geometric computations involving quadratic interpolating functions. Visibility for an RSG cell can be computed easily by walking from the viewpoint to the given element, along the elements intersected by a line-of-sight, until either visibility is blocked, or the target is reached. This method performs redundant computations, since rays to different cells of the grid may overlap partially, van Kreveld [271 ] proposes a sweep-line approach to compute discrete viewsheds on an RSG in 0{n \ogn) time on a v ^ x V^ grid. Visibility computation on RSGs is conceptually simple, but it becomes computationally intensive due to the size of the grid. Viewshed computation on a TIN is related to the Hidden Surface Removal (HSR) problem in a three-dimensional scene. The general quadratic upper bound to HSR for a polyhedral scene [247] applies also to the special case of a polyhedral terrain, thus giving a worst-case space complexity equal to G(n^) for the viewshed of a TIN with n vertices. The HSR problem for a three-dimensional scene has been extensively studied in the literature [49,158,191,211,247]. Some specific algorithms for polyhedral terrains have been developed [222,229]. Another approach to HSR reduces to computing the upper envelope of a set of disjoint polygons in space [23,69,80]. The upper envelope of a set of polygons in 3D defines a partition of the x-y plane into maximal connected regions, each of which is labeled with a polygon: the polygon n labeling a region R is the polygon with maximum height over R. The visible image of a polyhedral terrain with respect to a viewpoint V is equal to the upper envelope of the set of its faces, whose height is considered with respect to their distance from the viewplane. Computing the viewshed on a TIN reduces to computing the upper envelope of a set of semi-disjoint triangles. The approaches used in existing algorithms for viewshed, HSR, or upper envelope computation can be classified as follows: • an approach in which the faces are processed in front-to-back order from the viewpoint; • a divide-and-conquer approach; • a sweep-line approach; • an on-line approach, which processes faces incrementally in any order; • an approach based on special data structures for answering ray shooting queries. Some algorithms also combine different approaches together. In the following, we provide a brief survey of existing algorithms, according to the above classification; the reviewed algorithms are summarized in Table 2. ThQ front-to-back approach is the most popular method for performing HSR in a scene. A scene is front-to-back sortable with respect to a viewpoint if there exists an ordered sequence of its faces such that no face coming later in the sequence can obscure a face preceding it. Not all scenes are sortable: terrains are always sortable for viewpoints lying outside the domain, while Delaunay-based TINs are guaranteed to be sortable also for internal viewpoints [57]. There are standard techniques for making a generic PTM sortable by splitting some of its faces. Most front-to-back algorithms process faces in increasing distance order from the viewpoint, and maintain at each step the "contour" of the current visible image (i.e., the bound-
Applications
of computational
geometry to geographic information systems
367
Table 2 Major existing algorithms for region visibility computation Algorithm
Approach
Input
Sortable
[80] [158] [222,229] [208,247] [121] [49] [211] [69] [49]
Divide-and-conquer Divide-and-conquer, front-to-back Front-to-back Sweep-line Sweep-line Sweep-line, ray shooting Back-to-front, incremental On-line On-line, ray shooting
Triangles Polygons PTM Polygons Polygons Polygons Triangles Triangles Polygons
No Yes Yes No Yes No Yes No No
ary of the union of the projections of the faces processed so far). When a new face is projected onto the viewplane, its edges are tested for intersections only against the edges of the contour. When the scene is a terrain, the contour is the same as the horizon, restricted to the subset of terrain faces which have been already examined. The algorithms by Reif and Sen [229], and Preparata and Vitter [222] are based on such approach, and run in 0((^ + k) log^ n) time, where n is the size of the terrain model, and k is the size of the computed visible image. The algorithm proposed by Overmars and Sharir in [211] represents a very effective method for computing the visible image of a sortable set of triangles. This algorithm combines the incremental and the divide-and-conquer approaches: triangles are added in backto-front order, in groups, and at each step the visible image of the new set of triangles is merged with the old visible image. The algorithm works in 0(n^/clogn + k), time, where c is the maximum contour size; for a polyhedral terrain, c = 0(na(n)), and thus we have an 0(n^/na(n)logn -f k) complexity. The divide-and-conquer approach includes the worst-case optimal algorithm by Edelsbrunner, Guibas and Sharir [80], which computes the upper envelope of a set of n disjoint triangles in optimal 0{n^) time, and can be used for determining the viewshed on a TIN. The method proposed by Katz, Overmars and Sharir [158] applies a divide-and-conquer strategy in a sortable three-dimensional scene to achieve an output-sensitive complexity. A balanced binary tree is built, whose leaves correspond to the faces (the left-to-right order on the leaves reflects the front-to-back order on the corresponding faces), and every internal node represents the union of the faces stored in its subtree. Then, the visible portion of the object associated with each node are computed during a traversal of the tree; at the end of the traversal, the visible portion of each face are found in the leaves of the tree. The time complexity is output-sensitive and, for a sortable PTM, it is equal to 0{{na{n) + d) logn), where n and d are, respectively, the input and the output size. Sweep-line algorithms first project the whole scene onto the viewplane, and then traverse it by moving a vertical line from left to right. The time complexity is equal to 0((w + k)\ogn), where k is the number of intersection points between terrain edges projected onto the viewplane [121,208,247]. The algorithm by de Berg [49] computes the viewshed
368
L. de Floriani et ah
on a TIN in an output-sensitive way, by combining a sweeping technique with the use of efficient data structure for answering ray shooting queries. On-line incremental algorithms operate on a generic set of polygons or triangles, without any assumption about properties of the scene. An on-line randomized algorithm for computing the upper envelope of a set of triangles in the space (and thus the viewshed of a TIN) has been proposed by Boissonnat and Dobrindt [23]. The expected time complexity is equal to 0{n^ \ogn) for disjoint triangles. Horizon algorithms. The horizon of a viewpoint on a PTM is equal to the upper envelope of the set of segments obtained by projecting the terrain edges onto a viewplane. The upper envelope of a set of segments in the plane (in our case, the viewplane) is a piecewise linear, possibly non-continuous line formed by the collection of points belonging to some of the segments and lying below no other segment in the given set. The size of the upper envelope of p segments in the plane is &{pa{p)) [45]. Thus, the complexity of the horizon of a polyhedral terrain with n vertices is equal to 0{na{n)). Computing the horizon of a viewpoint on a polyhedral terrain reduces to the computation of the upper envelope of a set of possibly intersecting segments in the plane. Upper envelope algorithms have been proposed based either on a divide-and-conquer or on an incremental paradigm. The classical divide-and-conquer scheme [10] runs in 0{pa(p) log p) time. A more sophisticated technique, which apphes special care to split the set of segments into subsets with certain characteristics, achieves an optimal 0(p log p) computational complexity [137]. A simple incremental approach has a complexity of 0(p^a(p)), since adding the i-th segment can cause the modification of each of the ia(i) intervals of the current envelope, while a randomized incremental algorithm proposed in [60] has an expected time complexity of 0(pa(p) log p) for inserting all the given segments in random order. Visibility computation on hierarchical models. Visibility computation problems have been addressed in the context of hierarchical terrain models by De Floriani and Magillo [66]. In this framework, two issues have been considered: the computation of visibility information, related to a terrain representation at a certain resolution level, and the update of such information, as the required resolution changes. Distance-based and sweep-line viewshed algorithms can work on a hierarchical terrain model by performing a traversal of its tree-like structure. Dynamic algorithms can be used to update viewsheds and horizons after local changes in the level of detail of a terrain representation (i.e., replacement of a subset of terrain faces and edges with a finer/coarser description) [69,66]. Visibility-related problems. Examples of interesting application problems on a terrain, which can be solved based on visibility information, are: • problems requiring the placement of observation points on a topographic surface according to certain requirements; • line-of-sight communication problems; • problems regarding the computation of visibility paths on a terrain, with certain properties.
Applications
of computational
geometry to geographic information systems
369
Puppo and Marzano [225] investigate the connection between visibility-related problems in a discrete setting, and classical problems in graph theory: they show that graph algorithms can provide efficient and practical solutions to many visibility-related problems, belonging to all three classes listed above. Viewpoint placement problems require placing several observation points on a terrain in such a way that each point of the terrain (or of a focus area on it) is visible from at least one observation point. Applications include the location of fire towers, artillery observers, and radar sites. For a single observation point, algorithms running in polynomial time are known. If the height of the viewpoint is fixed, an existing solution can be determined in 0(n logn) time, while the point with the lowest elevation, from which the entire terrain is visible, can be determined in 0(n\og^n) time [252], on a polyhedral terrain model with n vertices. Recently Zhu [295] improved the complexity to 0(n log* n). The more general problem of determining the smallest number of observation points, which collectively see the entire terrain is known as the guard allocation problem and it is usually addressed by constraining viewpoints to be placed on the vertices of a polyhedral terrain. The problem has an exponential complexity, and it is equivalent to set-covering. Several heuristic algorithms to minimize the number of viewpoints, with fixed or variable height, are discussed in [175]. In the same paper, also the inverse problems are considered, that is, finding the optimal locations of viewpoints to maximize the visible area, assuming that the number and, possibly, the height of viewpoints as fixed. Bose et al. [24] reduce the guard allocation problem to a graph coloring problem and provide efficient heuristics to place viewpoints located at the vertices or on the edges. Line-of-sight communication problems consist of finding a visibility network connecting two or more sites, such that every two consecutive nodes of the network are mutually visible. Applications are in the location of microwave transmitters for telephone, FM radio, television and digital data networks. Usually, sites are restricted to be at terrain vertices. Finding the minimum number of relay towers necessary for line-of-sight communication between two sites can be formulated as a shortest path search in a graph where nodes are terrain vertices and arcs represent pair of mutually visible vertices, called a visibility graph. The problem of constructing a line-of-sight network between several sites is addressed in [59] by reducing it to the computation of a minimum Steiner tree on the visibility graph; memory requirements are kept low by computing the arcs of the graph on-line. Visibility paths can be defined on a terrain, with application-dependent visibility characteristics. A smuggler's path is the shortest path, connecting two given points, such that no point on the path is visible from a predefined set of viewpoints. Conversely, a path where every point can be seen from all viewpoints is known as a scenic path [203]. Simple solutions can be obtained on a TIN by restricting the viewpoints to be vertices, and the path to pass along edges. The solution (if there exists) can be determined by first computing the vertices which are visible/invisible from all the viewpoints, and then applying a standard shortest path algorithm to the edges connecting them.
370
L. de Floriani et al
5.2. Topographic features Topographic features are special points, lines and regions that have a specific meaning for describing the shape of the terrain: they correspond to local differential properties of the terrain surface. A point of the surface belongs to some characteristic class depending on the structure of the surface in its neighborhood. Point features are peaks, pits 2iXid passes. A peak is a point of relative maximum, a pit is a point of relative minimum, a pass is a saddle point for the surface, i.e., a point where there is a local maximum in one direction and a local minimum in a different direction. Lineal features are ridges and valleys. A ridge is a curve consisting of ridge points: a point lies on a ridge if its neighborhood can be subdivided by a line passing through it, and such that the surface in each half-neighborhood is monotonically decreasing when moving away from the line. A ridge occurs where there is a local maximum in the surface in one direction; a valley occurs where there is a local minimum in one direction. Based on point and lineal features. Wolf [289] proposes the use of weighted surface networks for terrain description. A weighted surface network is a graph whose vertices and edges are point and lineal features, respectively; each edge is weighted with the height difference between its two endpoints. Wolf also suggests a method for contracting such networks, thus providing also a tool for terrain generalization. Areal features are maximal regions on the terrain where the surface is flat, convex or concave. Such features are related to the curvature of the surface along two independent directions. For smooth surfaces they depend on the sign of the second derivative. According to this classification, any point on a terrain can be labeled to belong to one of the above features by applying differential geometry tools. An interesting classification of topographic features can be found in [283]. In the discrete case, algorithms are essentially based on the analysis of the neighborhood of the points in the domain. In the literature, most methods have been developed for RSGs with the stepped model, because the neighborhood of each pixel is directly implied from the grid structure. The interpolation is commonly assumed to be constant on each grid cell, that is actually considered as a pixel in an image. The classical algorithm by Peucker and Douglas [217] classifies each pixel based on the height difference from its eight neighbors in the grid. In [254] the method is improved to find also ridges and valleys wider than one pixel. Methods developed in the image processing literature can also be used [132, 163,169]. Falcidieno and Spagnuolo [91] consider a virtual triangulation of the grid, where each cell is subdivided into four right triangles, and apply a method suitable for TINs (see below). Mc Cormack et al. [190] identify depressions and plateaus by propagating "seeds" consisting of connected regions of pixels with the same elevation, and bounded by pixels with a higher and lower elevation, respectively. Watson et al. [283], and Haralick [132] use RSGs with surface interpolation techniques. In the case of TINs, point and lineal features are vertices and chains of edges in the underlying triangulation, respectively. Areal features are connected collections of triangles defining convex, concave or flat regions. A characterization of features on a TIN can be found in [103]. An algorithm for surface characterization from a TIN, based on the local analysis of the dihedral angle formed by adjacent triangular patches, is proposed in [91].
Applications
of computational
geometry to geographic information systems
371
Each TIN edge is labeled as convex, concave or flat depending on the slopes of its two incident triangles. Then, a triangle can be labeled based on the types of its edges (e.g., a triangle is convex if its three edges are convex), and convex, concave and flat surface regions are computed by aggregating triangles labeled in the same way. A compact representation of a TIN obtained by merging triangles into regions of uniform curvature is proposed as well.
5.3. Drainage networks Terrain drainage characteristics provide information on water resources, flood areas, erosion, and natural resource management. Manual quantification of terrain drainage characteristics is a tedious and time-consuming task. Thus, efforts have been undertaken to compute such characteristics from a terrain model. On a terrain water flows downstream according to gravity and collects into streams, which join and form rivers. The collection of all streams and rivers forms the drainage network of the terrain. A drainage network can be seen as a forest in which the arcs are directed towards the pits. Hence, the computation of a drainage network is strongly related to the computation of point and lineal features of the underlying terrain (see [294] for a survey). If we consider a terrain as a continuous surface, a drainage network can be characterized in terms of differential geometry (see [163,164]). There is no accepted definition of the drainage network on an RSG. As noted by Yu et al. [294], the network is defined as the result of an algorithmic process. As for the case of feature extraction, local methods based on image processing techniques are applied on RSGs [72,276]. Mark [188] proposes a global approach: all the cells are sorted in order of decreasing elevation and, initially, each cell is assigned one unit of fluid. Each cell in order adds its fluid to the lowest of its eight neighbors. At the end, cells receiving more than a certain quantity of fluid are declared to be on the drainage network. In this way, also the accumulation of water flowing in the terrain is modeled. Quantifying the accumulation of water is also useful for identifying drainage basins, i.e., surface regions formed by pixels whose water flow reaches the same pit. The general assumption is that water flows from higher to lower heights. Flat regions and plateaus cause disturbs in water flow computation because the direction of flow is not well defined. Similar problems occur at depressions: in a real terrain, water cannot accumulate infinitely, thus it is necessary to determine the overflow points and directions for a depression. Many algorithms use simple heuristics based on local modification of the flow [150,200,143]. Mc Cormack et al. [190] note that the local modification of a drainage network without knowledge of its overall structure may have unpredictable effects. Therefore, they propose a feature-based approach to computation of drainage networks and basins on an RGS, which identifies inflow and outflow points for each depression and plateau, and defines the flow through the flat region as a line connecting them. On a TIN, a definition of a drainage network, as a collection of all valley edges has been proposed by Frank et al. [103]. This definition has the drawback of possibly producing
372
L. de Floriani et al.
interrupted streams, because the actual location of a stream may not coincide with a triangle edge in the TIN. In addition, there is no concept of flow, so basins cannot be modeled. Yu et al. [294] introduce a broader definition of drainage network on a TIN, which also allows streams to pass through the interior of a triangle. Their definition is based on the following four assumptions: (i) at any point, water follows the steepest descent; (ii) watercourses can merge (thus the drainage network is a forest); (iii) watercourses end only at local minima; (iv) at any point there is a unique direction of steepest descent. The drainage network is defined as the collection of those points on the terrain that receive water from a region whose area exceeds a certain threshold value. They propose an algorithm for computing the network which runs in 0(n + k) time, where n is the size of the TIN and k the size of the drainage network. In [52] it has been proved that the complexity of the drainage network, as defined in [294], in a TIN with n vertices may be 0{rv'). By contrast, the drainage network defined according to Frank et al. [103] has a linear space complexity.
5.4. Path problems In this subsection, we deal with path problems on a terrain model (for path computation on a map see Subsection 3.5). Refer also to Chapter 15. Different optimality criteria for paths can be defined on a terrain [268]: measures of the quality of a path include the Euclidean length, the maximal height along the path, the total height difference, and the maximal slope of the path. Several results appeared in the computational geometry literature on the shortest geodesic path problem. In particular algorithms have been proposed for computing such path on convex [201,251] and on non-convex [34,195] polyhedra. The best result is due to Chen and Han [34] who propose an O(n^) algorithm. Since polyhedral terrains are approximations of real surfaces, simpler and more practical algorithm which find an approximation to the optimal solution are sufficient and more desirable. Approximate algorithms for convex polyhedra are described in [3,35,133,170], and for general polyhedra in [5]. Lanthier et al. [170] consider the problem of computing an approximate shortest path between two points on a TIN when each face has an associated weight. This is an instance of the weighted region problem discussed in Subsection 3.5. They propose practical algorithms based on the placement of Steiner points at edges of a polyhedral terrain, and on shortest paths on graphs. A good feature of such algorithms is that execution time and space requirements can be traded for accuracy, thus such algorithms can be used to build a sequence of shortest paths with increasing accuracy. Experimentally, the complexity of such an approach is 0{n logn), while a worst case analysis leads to O(n^) and 0{rv' \ogn) complexities. A heuristic technique based on discarding the parts of the terrain where the shortest path cannot pass through has been proposed in [15]; this approach, however, applies to regular triangulations, like quaternary ones. In [268] algorithms are presented for the other quality measures discussed at the beginning of this subsection. In [54], algorithms are presented for answering path queries on a TIN in O(logn) time (with a preprocessing time of 0{n\ogn)). Such algorithms support queries like deciding whether there exists a path between two points whose height de-
Applications of computational geometry to geographic information systems
373
creases monotonically, or deciding whether there is a path joining two points and staying below a given height. 6. Three-dimensional GIS Classical GISs deal with just two dimensions: terrains are not true three-dimensional objects, since most part of modeling and reasoning is done in their two-dimensional domain. Adding true three dimensionality to GIS is a more recent research area, in which computational geometry is directly involved. Three-dimensional capabilities in a GIS system are required in cadastral and architectural applications for representation of buildings, and in geosciences and environmental modeling for representing the structure of either earth, or atmosphere (e.g., levels of rocks in geology; air flow, temperature and pressure in metereology). Three-dimensional geographic data can be handled with techniques inherited from 3D geometric modeling and CAD systems (see, e.g., the book by Mantila [187,199]). The shape of man-made objects (buildings, etc.) is usually regular and completely known, and directly modeled with classical CAD techniques. When representing physical phenomena (e.g., in geology), complex structures are known only at a finite set of sampled points, and interpolation must be used in order to recover a complete model of a three-dimensional area. The situation is similar to the case of terrain modeling, in one dimension higher. Jones [153] provides an overview of data models for three-dimensional objects in geology. While a uniform and dense sampling of two-dimensional domains is easily achieved, three-dimensional sampling is usually sparse because of high costs. Thus, a regular threedimensional grid would result in a useless waste of memory. Adaptive regular grids, such as octrees and their variants, are more appropriate. The octree [242] is a three-dimensional generalization of the quadtree. It is based on a recursive partition of a cubic universe into nested cubes of different sizes, which can be unfolded as a tree with degree eight. Each cubic cell is assigned an attribute value (e.g., a type of rock, a pressure value, etc.). Drawbacks of this representation are the necessity of a regular distribution of data points, and the rough approximation of boundaries between zones characterized by different attribute values: this is not admissible when information about the surface separating two different attributes (e.g., the surface between two different types of soil), must be maintained in the 3D model. Irregular tetrahedralizations (i.e., the 3D extensions of triangulations) are also used. They provide an object-centered decomposition and adapt to the distribution of the sampled data. In particular, the Delaunay tetrahedralization extends the empty circle property of the Delaunay triangulation to an empty sphere property. A tetrahedral complex has the advantage of being able to include surface constraints (e.g., the contact surface between two layer of rock), as specific faces, edges, or vertices of the complex. Efficient algorithms to build Delaunay tetrahedralizations of a point set in 3D are available in the computations geometry literature. Such algorithms can be classified into indirect algorithms (which compute the Delaunay tetrahedralization of a given set of points in 3D space by projecting the convex hull of a transformed set of points in 4D), incremental algorithms, based on the progressive insertion of points into an initial tetrahedralization [282,
374
L. de Floriani et al.
151,81], and algorithms which start from a single tetrahedron and progressively add new tetrahedra adjacent to the existing ones [12]. The problem of computing a constrained Delaunay tetrahedralization has been shown to be NP-complete [236]. Heuristic algorithms have been proposed which compute a conforming Delaunay tetrahedralization: the idea is replacing each data segment with a set of points, in such a way that the original segment will be a chain of edges in the output tetrahedraUzation [21]. Although there is no bound to the number of points which must be added to guarantee that all given segments are included in the resulting tetrahedralization, these methods seem good in practice. For details refer also to Chapter 5. The Delaunay tetrahedralization has also been applied to reconstructing the boundary surface of solid objects. Input data for this problem are scattered points and/or segments lying on the object boundary. A common approach starts with the Delaunay tetrahedralization of the whole data, whose domain is the convex hull of the data set, and progressively removes tetrahedra in order to move internal points, or internal segments, on the boundary. The sculpturing method [20,21] deletes tetrahedra iteratively based on heuristic considerations and topological constraints. The alpha-shape approach [84] deletes all tetrahedra which can be "erased" by a sphere of a given radius, under the constraint that the sphere cannot pass through the data point. The radius is chosen through a binary search as the smallest value able to guarantee the consistency of the resulting shape. The alphashape method cannot resolve deep and narrow holes in the surface: such problem can be solved by applying the sculpturing method in a final step [14]. The method proposed by Veltkamp [267] for scattered segments is based on a different geometric structure, called the y-neighborhoodgraph. The y-neighborhood graph is a parametric graph that provides a continuous spectrum of graphs ranging from the empty to the complete graph (and including the Delaunay tetrahedralization as well). A suitable value of the parameter is chosen in order to obtain a feasible approximation of the object shape. A completely different approach is used in [144]: based on the available points, a function in 3D space is defined which pointwise estimates the distance from the unknown surface; then, a conventional algorithm (e.g., marching cubes) is used to extract the isosurface corresponding to the zero value of the function, which provides the final surface approximation.
7. Concluding remarks Computational geometry offers rigorous and powerful tools for solving a variety of geometric problems in GIS. In this survey, we have reviewed issues concerning efficient data structures to store geometric information on geographic data, and algorithms for basic spatial queries, overlay, map generalization, labeling, construction and conversion of terrain models, terrain approximation and multiresolution, visibility, extraction of topographic features, drainage networks, paths, as well as a handful of other specific problems. At the state of the art, computational geometry tools are effective for many such problems, yet GIS practitioners often adopt heuristics that are less rigorous and efficient. This gap between theory and practice used to be justified by the difficulty of coding computational geometry algorithms, and especially because practical performance often did not follow from theoretical efficiency. Indeed, the search for asymptotic efficiency in the
Applications
of computational
geometry to geographic information systems
375
worst case (which hardly occurs) sometimes leads to very involved algorithms that perform poorly on real data configurations. Although in some cases this is still true, recent advances, and research trends in computational geometry show that many theoretically rigorous tools either are, or will become soon, competitive also in practical applications [261]. The following issues have great relevance in making computational geometry effective, and easily available to practitioners. • Randomized algorithms use more realistic models for evaluating the computational complexity, and may provide solutions as easy to program as brute-force approaches, and with provably good performance on real-world data. This class of algorithms is consolidated in computational geometry, and textbooks are already available [202]. Refer also to Chapter 16. • Robustness in numerical computation is of primary importance, since errors due to floating-point arithmetic can compromise not only the accuracy, but even the correctness of results [142]. The problem of robustness has been faced by developing either methods for exact arithmetic [100], or algorithms that guarantee a correct result with finite precision [126], ox adaptive precision [179] in geometric computations. • Computational geometry libraries provide standard implementations of geometric algorithms, together with application programming interfaces that make such tools easily usable by practitioners. Developing and engineering libraries is perhaps the most successful way to export computational geometry technologies to applied fields. For instance, the LEDA library [204] provides a carefully engineered platform for developing discrete and geometric algorithms that is already used in industrial environments; the CGAL library [212] is under development, which can be integrated with LEDA, and offers tools for geometric robustness and specific algorithms for computational geometry; another geometric library under development is GeomLib [2]. From the point of view of researchers in computational geometry, the field of GIS is a highly stimulating arena, and a plentiful source of open problems. Strategic directions reported by the Computational Geometry Working Group [261] clearly indicate a list of hot issues — such as robustness, fine-grain complexity analysis, implementation, experimental evaluation, external-memory algorithms, dynamic and real-time computing, approximation algorithms, and parallel and distributed computing — all of which are relevant, and in some cases vital to GIS applications. The following open issues in GIS offer excellent cues for research. • Realistic map models should be based on decompositions more general than planar subdivisions or CW complexes, in order to capture situations like regions with holes, and point and lineal features. Also, efficient data structures to encode such maps should be developed. • Realistic queries in spatial databases always involve both geometric, and non-geometric aspects. A solution for such queries necessarily involves both geometric algorithms, and information retrieval techniques. A separate treatment of geometric and non-geometric issues often leads to inefficient solutions. An integrated approach to hybrid queries is currently lacking, and not even models for the evaluation of performances in resolving hybrid queries have been proposed yet. • The management of large spatial datasets in external memory is also very important, and related to the previous issue. Most algorithms and data structures in computational ge-
376
•
•
•
•
•
•
•
L. de Floriani et ah
ometry have been studied and developed for the primary storage, while this assumption is hardly realistic for any problem in GIS. Map generalization is an important task that involves many challenging geometric problems, and also requires the integration of geometric and non-geometric information. A comprehensive approach to generalization is still lacking. Serious achievements towards the automation of such task will probably require managing knowledge at a level much beyond the scope of geometry. However, a high benefit would come from an integrated treatment at least of all geometric problems. Compression and progressive transmission of data is relevant, especially in the context of web-aware applications. While for terrains different techniques already exist, either based on geometric compression, or on wavelets, the compression and progressive transmission of maps is a more complex issue, since it involves both geometrical and topological approximation. Multiresolution is currently a topic of great interest. Most of the work in multiresolution modeling of terrains (and, more generally, of surfaces) has been dealing with the problem of selective refinement, while most of the problems related with query processing, and terrain analysis at variable resolution are still an open issue. Facing such problems with a multiresolution approach may be vital to cope with the huge (practically worldwide) terrain databases that are becoming available. In the field of map processing, multiresolution is at an even earlier stage. As we discussed in Section 2.5, there are only a few empirical approaches based on heuristics, and few theoretically oriented works, based either on graph manipulation, or on transformations of cell complexes. The gap between theory and practice is still quite large. Important open problems are related to the design and development of efficient data structures, construction of multiple representations, and algorithms for answering spatial queries in a multiresolution framework, especially concerning spatial join (overlay), visibility, path computation, etc. Many optimization and approximation problems in GIS (e.g., terrain approximation, map labeling, some visibility-related problems) are intractable. Approximated algorithms that can run in reasonable time, and can guarantee bounds on the size of the result are very important to provide practical solutions to such problems. The field of 3D GIS, which is quite recent, offers many other cues of research. Much preliminary work is still needed in order to achieve a level of standardization sufficient at least to establish a common basis for researchers. In 3D, a classification of the different types of data, and of the relevant queries on them has still to be provided. Although both the kind of information and the queries will be often strictly dependent on the specific application (e.g., modeling geological phenomena, or modeling buildings in an architectural environment), a serious analysis from practice to theory may lead to identifying general modehng and computational issues that offer a key to a more integrated approach to spatial information handling. Besides the issues listed above, there are plenty of specific problems that still need to be investigated, such as intersection-free line and map simplification, conflation and rubber sheeting of maps, edge matching and change detection, progressive transmission of maps and terrains, etc.
Applications
of computational
geometry to geographic information systems
377
References [1] P.K. Agarwal and S. Suri, Surface approximation and geometric partitions. Proceedings 5th ACM-SIAM Symposium on Discrete Algorithms (1994), 24-33. [2] P.K. Agarwal, M.T. Goodrich, S.R. Kosaraju, F.P. Preparata, R. Tamassia and J.S. Vitter, Applicable and robust geometric computing (1995), available from http://www.cs.brown.edu/cgc/. [3] P.K. Agarwal, A. Har-Peled, M. Sharir and K.R. Varadarajan, Approximating shortest paths on a convex polytope in three dimensions, J. ACM (1997). [4] P.K. Agarwal, M. van Kreveld and S. Suri, Label placement by maximum independent sets in rectangles. Proceedings 9th Canadian Conference on Computational Geometry (August 1997). [5] P.K. Agarwal and K.R. Varadarajan, Approximating shortest paths on a polyhedron. Proceedings 38th IEEE Symposium on Foundations of Computer Science (1997). [6] P.K. Agarwal and P.K. Desikan, An efficient algorithm for terrain simplification. Proceedings 8th ACMSIAM Symposium on Discrete Algorithms (1997). [7] D.S. Andrews, J. Snoeyink, J. Boritz, T. Chan, G. Denham, J. Harrison and C. Zhu, Further comparison of algorithms for geometric intersection problems. Proceedings 6th International Symposium on Spatial Data Handling (1994), 709-724. [8] W.G. Aref and H. Samet, Uniquely reporting spatial objects: Yet another operation for comparing spatial data structures. Proceedings 5th International Symposium on Spatial Data Handling, Charleston, SC (1992), 178-189. [9] S. Aronoff, Geographic Information Systems: A Management Perspective, WDL Publications, Ottawa (1989). [10] M. Atallah, Dynamic computational geometry. Proceedings 24th IEEE Symposium on Foundations of Computer Science, IEEE Computer Society, Baltimora (1983), 92-99. [11] F. Aurenhammer, Voronoi diagrams —A survey of fundamental geometric data structures, ACM Comput. Surveys 23 (3) (1991), 366-405. [12] D. Avis and B.K. Battacharya, Algorithms for computing d-dimensional Voronoi diagrams and their duals. Advances in Computing Research 1, F.P. Preparata, ed., JAI Press (1983), 159-180. [13] C.L. Bajaj, V. Pascucci and D.R. Schikore, Fast isocontouring for improved interactivity. Proceedings 1996 SPIE Symposium on Volume Visualization, San Francisco (1996), 3 9 ^ 6 . [14] C.L. Bajaj, F. Bernardini, J. Chen and D.R. Schikore, Automatic Reconstruction of 3D CAD Models, Theory and Practice of Geometric Modeling, W. StraBer, R. Klein and R. Rau, eds. Springer-Verlag (1996). [15] R. Barrera and J. Vazques-Gomez, A shortest path algorithm for hierarchical terrain models. Proceedings AUTO-CARTO 9 (1989), 156-163. [16] B. Baumgart, A polyhedral representation for computer vision. Proceedings of the AFIPS National Computer Conference (1975), 589-596. [17] N. Beckmann, H.P. Kriegel, R. Schneider and B. Seeger, The R*-tree: An efficient and robust access method for points and rectangles. Proceedings ACM SIGMOD (1990), 81-90. [18] J.L. Bentley and T.A. Ottman, Algorithms for reporting and counting geometric intersections, IEEE Transactions on Computers 28 (9) (1979), 643-647. [19] M. Bertolotto, L. De Floriani and E. Puppo, Multiresolution topological maps. Advanced Geographic Data Modelling — Spatial Data Modelling and Query Languages for 2D and 3D Applications, M. Molenaar and S. De Hoop, eds. Publication on Geodesy — New Series 40 (1994), 179-190. [20] J.D. Boissonnat, Geometric structures for three-dimensional shape representation, ACM Trans, on Graphics 3 (4) (1984), 266-286. [21] J.D. Boissonnat, O.D. Faugeras and E. Le Bras-Mehlman, Representing stereo data with the Delaunay triangulation, Artif. Intell. 44 (1990), 41-89. [22] J.D. Boissonnat, O. Devillers, R. Schott, M. Tailland and M. Yvinec, Application of random sampling to on-line algorithms in computational geometry. Discrete Comput. Geom. 8 (1992), 51-71. [23] J.D. Boissonnat and K. Dobrindt, On-line construction of the upper envelope of triangles in M^, Proceedings 4th Canadian Conference on Computational Geometry, C.A. Wang, ed.. Memorial, Newfoundland (1992), 311-315. [24] P. Bose, T. Shermer, G. Toussaint and B. Zhu, Guarding polyhedral terrains, Comput. Geom. 7 (3) (1997), 173-185.
378
L. de Floriani et al.
[25] E. Brisson, Representing geometric structures in d dimensions: Topology and order. Discrete Comput. Geom. 9 (4) (1993), 387^26. [26] RJ.C. Brown, A/fl5? algorithm for selective refinement of terrain meshes. Proceedings COMPUGRAPHICS 96, GRASP (December 1996), 70-82. [27] P. A. Burrough, Principles of Geographic Information Systems for Land Resources Assessment, Clarendon Press, Oxford (1986). [28] S.J. Carver and C.F. Brunson, Vector to raster conversion error and feature complexity: An empirical study using simulated data, Intemat. J. Geogr. Inform. Systems 8 (3) (1994), 261-270. [29] A. Carrara, G. Bitelli and R. Carla, Comparison of techniques for generating digital terrain models from contour lines, Intemat. J. Geogr. Inform. Sci. 11 (5), 451-474. [30] B. Chazelle and H. Edelsbrunner, An optimal algorithm for intersecting line segment in the plane, J. ACM 39(1) (1992), 1-54. [31] B, Chazelle, H. Edelsbrunner, L.J. Guibas and M. Sharir, Algorithms for bichromatic line-segment problem and polyhedral terrains, Algorithmica 11, Springer-Verlag, New York (1994), 116-132. [32] T. Chan, A simple trapezoidal sweep algorithm for reporting red/blue segment intersections. Proceedings 6th Canadian Conference on Computational Geometry (1994), 263-268. [33] Z.-T. Chen and J.A. Guevara, Systematic selection of very important points (VIP) from digital terain model for constructing triangular irregular networks. Proceedings AUTO-CARTO 8, Baltimore, MD, USA (1987), 50-56. [34] J. Chen and Y. Han, Shortest paths on a polyhedron. Proceedings 6th ACM Symposium on Computational Geometry (1990), 360-369. [35] J. Choi, J. Sellen and C.K. Yap, Approximate Euclidean shortest path in 3-space, Proceedings 10th ACM Symposium on Computational Geometry (1994), 4 1 ^ 8 . [36] M.M. Chow, Optimized geometry compression for real-time rendering. Proceedings IEEE Visualization '97 (1997), 347-354. [37] J. Christensen, Fitting a triangulation to contour lines. Proceedings AUTOCARTO 8, Baltimore, Maryland (1987), 57-67. [38] J. Christensen, J. Marks and S. Stuart, An empirical study of algorithms for point-feature placement, ACM Trans, on Graphics 14 (3) (1995), 203-232. [39] A. Ciampalini, P. Cignoni, C. Montani and R. Scopigno, Multiresolution decimation based on global error. The Visual Computer 13 (5) (1997), 228-246. [40] P. Cignoni, E. Puppo and R. Scopigno, Representation and visualization of terrain surfaces at variable resolution. The Visual Computer 13 (1997). [41] K.L. Clarkson and P.W. Shor, Application of random sampling in computer geometry. Discrete Comput. Geom. 4 (5) (1989), 387-421. [42] E. Clementini and P. Di Felice, A comparison of methods for representing topological relationships. Inform. Sci. 3 (1995), 149-178. [43] E. Clementini and P. Di Felice, A model for representing topological relationships between complex geometric features in spatial databases. Inform. Sci. 90 ( 1 ^ ) (1996), 121-136. [44] J. Cohen, A. Varshney, D. Manocha, G. Turk, H. Weber, P. Agarwal, F Brooks and W. Wright, Simplification envelopes, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '96) (1996), 119-128. [45] R. Cole and M. Sharir, Visibility problems for polyhedral terrains, J. Symbolic Comput. 17 (1989), 11-30. [46] J.P. Corbett, Topological principles in cartography. Technical Report 48, U.S. Bureau of Census, USA (1979). [47] R.G. Cromley, A spatial allocation analysis of the point annotation problem. Proceedings 2nd International Symposium on Spatial Data Handling, Seattle, WA (July 1986), 38-49. [48] E.F. D'Azavedo and R.B. Simpson, On optimal interpolation triangle incidences, SIAM J. Sci. Statist. Comput. 20 (6) (1989), 1063-1075. [49] M. de Berg, Ray shooting, Depth Orders and Hidden Surface Removal, Lecture Notes in Comput. Sci. 703, Springer-Verlag, New York (1993). [50] M. de Berg and K.T.G. Dobrindt, On the levels of detail in terrains, 11th ACM Symposium on Computational Geometry, Vancouver, BC (Canada), June 5-7 (1995).
Applications
of computational
geometry to geographic information systems
379
[511 M. de Berg, M. van Kreveld and S. Shirra, A new approach to subdivision simplification. Technical Papers, ACSM/ASPRS Annual Convention 4 (AUTO-CARTO 12) (1995), 79-88. [52J M. de Berg, P. Bose, K. Dobrindt, M. van Kreveld, M. Overmars, M. de Groot, T. Roos, J. Snoeyink and S. Yu, The complexity of rivers in triangulated terrains. Proceedings 8th Canadian Conference on Computational Geometry, Ottawa (1996), 325-330. [53] M. de Berg, M. van Kreveld, R. van Oostrum and M. Overmars, Simple traversal of a subdivision without extra storage, Internat. J. Geogr. Inform. Sci. 11 (4) (.Tune 1997), 359-373. [54] M. de Berg and M. van Kreveld, Trekking in the alps without freezing or getting tired, Algorithmica 18, 306-323. [55] M. Deering, Geometry compression. Computer Graphics (SIGGRAPH'95) (1995), 13-20. [56] L. De Floriani, A pyramidal data structure for triangle-based surface description, IEEE Comput. Graphics Appl 8 (March 1989), 67-78. [57] L. De Floriani, B. Falcidieno, G. Nagy and C. Pienovi, On sorting triangles in a Delaunay tesselation, Algonthmica 6 (1991), 522-535. [58] L. De Floriani, P. Marzano and E. Puppo, Spatial queries and data models. Spatial Information Theory — A theoretical basis for GIS, A.U. Frank and I. Campari, eds, Lecture Notes in Comput. Sci. 716, SpringerVerlag (1993), 113-138 [59] L. De Floriani, P. Marzano and E. Puppo, Line-of sight communication on a terrain models, Internat. J. Geogr. Inform. Systems 8 (4) (1994), Taylor & Francis, London, 329-342. [60] L. De Floriani and P. Magillo, Horizon computation on a hierarchical terrain model. The Visual Computer: An International Journal of Computer Graphics 11 (1995), 134-149. [61] L. De Floriani and E. Puppo, Hierarchical triangulation for multiresolution surface description, ACM Trans, on Graphics 14 (4) (1995), 363-411. [62] L. De Floriani, P. Magillo and E. Puppo, A formal approach to multire solution modeling. Geometric Modeling: Theory and Practice, W. StraBer, R. Klein and R. Rau, eds, Springer-Verlag (1996). [63] L. De Floriani, P. Magillo and E. Puppo, Building and traversing a surface at variable resolution. Proceedings IEEE Visualization 97, Phoenix, AZ (USA) (October 1997), 103-110. [64] L. De Floriani, P. Magillo and E. Puppo, Efficient encoding and retrieval of triangle meshes at variable resolution. Technical Report DISI-TR-97-01, Department of Computer and Information Sciences, University of Genova, Genova, Italy (1997). [65] L. De Floriani, P. Magillo and E. Puppo, Efficient implementation of multi-triangulations. Proceedings IEEE Visualization 98, Triangle Park, North Carolina (October 1998), 43-50. [66] L. De Floriani and P. Magillo, Visibility computations on hierarchical triangulated terrain models, Geoinformatica 1 (3) (1997), 219-250. [67] V. Delis and T. Hadzilacos, On the assessment of generalization consistency. Proceedings 5th Symposium on Spatial Databases (SSD97), Berlin (July 1997). [68] G. Dettori and E. Puppo, How generalization interacts with the topological and geometric structure of maps. Proceedings 7th International Symposium on Spatial Data Handling, Delft (The Netherlands) (August 1996). [69] K. Dobrindt and M. Yvinec, Remembering conflicts in history yields dynamic algorithms. Proceedings 4th Annual International Symposium on Applied Computing (ISAAC '93), Lecture Notes in Comput. Sci. 762 (1993), 21-30. [70] J.S. Doerschler and H, Freeman, A rule-based system for dense-map name placement. Communications of the ACM 35 (1) (1992), 68-79. [71] J. A. Dougenik, N.R. Chrisman and D.R. Niemeyer, Ad algorithm to construct continuous area cartograms. Professional Geographer 37 (1985), 75-81. [72] D.H. Douglas and T.K. Peucker, Algorithms for the reduction of the number ofpoints required to represent a digitized line or its caricature. The Canadian Cartographer 10 (2) (1973), 112-122. [73] M. Duchaineau, M. Wolinsky, D.E. Sigeti, M.C. Miller, C. Aldrich and M.B. Mineed-Weinstein, ROAMing terrain: Real-time optimally adapting meshes. Proceedings IEEE Visualization'97 (1997), 81-88. [74] R.O. Duda and RE. Hart, Pattern Classification and Scene Analysis, Wiley, New York (1973). [75] G. Dutton, Geodesic modelling of planetary relief Cartographica 21 (1988), 188-207. [76] G. Dutton, Polyhedral hierarchical tessellation: The shape of GIS to come, Geo Info Systems 2 (1) (1991), 49-55.
380
L. de Floriani et al
[77] G. Dutton, Improving locational specificity of map data — a multiresolution, metadata-driven approach and notation, Intemat. J. Geogr. Inform. Systems 10 (3) (1996), 253-268. [78] N. Dyn, D. Levin and S. Rippa, Data dependent triangulations for piecewise linear interpolation, IMA J. Numer. Anal. 10 (1990), 137-154. [79] H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer-Verlag (1987). [80] H. Edelsbrunner, L.J. Guibas and M. Sharir, The upper envelope of piecewise linear functions: Algorithms and applications. Discrete Comput. Geom. 4 (1989), 311-336. [81] H. Edelsbrunner and N.R. Shah, Incremental topological flipping works for regular triangulations. Proceedings 8th Annual ACM Symposium on Computational Geometry (1992), 43-52. [82] H. Edelsbrunner and R. Waupotitsch, A combinatorial approach to cartograms, Comput. Geom. 7 (1997), 343-360. [83] H. Edelsbrunner and T.S. Tan, An upper bound for conforming Delaunay triangulations. Discrete Comput. Geom. 10(1993), 197-213. [84] H. Edelsbrunner and E.R Mucke, Three-dimensional alpha shapes, ACM Trans, on Graphics 13 (1) (1994), 43-72. [85] M. Egenhofer and R. Franzosa, Point-set topological spatial relations, Intemat. J. Geogr. Inform. Systems 5 (2) (1991), 161-174. [86] M. Egenhofer, E. Clementini and R Di Felice, Topological relations between regions with holes, Intemat. J. Geogr. Inform. Systems 8 (2) (1994), 129-142. [87] M. Egenhofer, E. Clementini and R Di Felice, Evaluating inconsistencies among multiple representations, Proceedings 6th Intemational Symposium on Spatial Data Handling, Edinburgh, Scotland (1994), 901920. [88] L. Eklundh and U. Martensson, Rapide generation of digital elevation models from topographic maps, Intemat. J. Geogr. Inform. Systems 9 (3) (1995), 329-340. [89] F. Evans, S. Skiena and A. Varshney, Optimizing triangle strips for fast rendering. Proceedings IEEE Visualization '96 (1996), 319-326. [90] W. Evans, D. Kirkpatrick and G. Townsend, Right triangular irregular networks. Technical Report 97-09, University of Arizona (1997). [91] B. Falcidieno and M. Spagnuolo, A new method for the characterization of topographic surfaces, Intemat. J. Geogr. Inform. Systems 5 (4) (1991), 397^12. [92] C. Faloutsos and I. Kamel, Hilbert R-tree: An improved R-tree using fractals. Proceedings Intemational Conference on Very Large Data Bases (VLDB) (1994). [93] C. Faloutsos and I. Kamel, Beyond uniformity and independence: Analysis of R-trees using the concept of fractal dimension. Proceedings ACM SIGACT-SIGMOD-SIGART PODS (1994), 4-13. [94] U. Finke and K.H. Hinrichs, The quad view data structure — A representation for planar subdivisions. Advances in Spatial Databases, M.J. Egenhofer and J.R. Herring, eds. Lecture Notes in Comput. Sci. 951, Springer (1995), 2 9 ^ 6 . [95] U. Finke and K.H. Hinrichs, Overlaying simply connected planar subdivisions in linear time, Procceedings 11th Canadian Conference on Computational Geometry (1995), 119-126. [96] P.F Fisher, Algorithm and implementation uncertainty in viewshed analysis, Internat. J. Geogr. Inform. Systems 7 (4) (1993), 331-347. [97] P. Flajolet, G.H. Gonnet, C. Puech and J.M. Robson, Analytic variations on quedtrees, Algorithmica 10 (6) (1993), 473-500. [98] D.J. Foley, A. Van Dam, S.K. Feiner and J.F Hughes, Computer Graphics: Principles and Practice, Addison-Wesley, Reading, MA (1990). [99] M. Formann and F. Wagner, A packing problem with applications to lettering of maps. Proceedings 7th ACM Symposium on Computational Geometry (1991), 281-288. [100] S. Fortune and C. Van Wyk, Efficient exact arithmetic for computational geometry. Proceedings 9th ACM Symposium on Computational Geometry (1993), 163-172. [101] R.F Fowler and J.J. Little, Automatic extraction of irregular digital terrain models. Computer Graphics 13(1979), 199-207. [102] A.U. Frank and W. Kuhn, Cell graph: A provable correct method for the storage of geometry. Proceedings 2nd Symposium on Spatial Data Handhng (SDH'86), Seattle, WA (1986), 411^36.
Applications
of computational
geometry to geographic information systems
381
[103] A.U. Frank, B. Palmer and V.B. Robinson, Formal methods for the accurate definition of some fundamental terms in physical geography. Proceedings 2nd International Symposium on Spatial Data Handling (1986), 585-599. [104] W.R. Franklin, Efficient intersection calculations in large databases. Proceedings International Cartographic Association 14th World Conference, Budapest (1989), A62-A63. [105] W.R. Franklin, M. Kankanhalli and C. Narayanaswami, Geometric computing and the uniform grid data technique. Computer Aided Design 21 (7) (1989), 410-420. [106] A.U. Frank, Spatial concepts, geometric data models, and data structures. Computers and Geosciences 18 (4) (1992), 409-417. [107] A. Frank and S. Timpf, Multiple representations for cartographic objects in a multiscale tree —An intelligent graphical zoom. Computers & Graphics 18 (6) (1994), 823-829. [108] W.R. Franklin, Triangulated irregular network to approximate digital terrain. Technical Report, ECSE Dept., RPI, Troy (NY) (1994). Manuscript and code available on ftp://ftp.cs.rpi.edu/pub/franklin/. [109] H. Fuchs, S.P. Uselton and Z. Zedem, Optimal surface reconstruction from planar contours, Comm. ACM 20 (10) (1977), 693-702. [110] A.B, Garcia, C.G. Niciera, J.B.O. Mere and A.M. Diax, A contour-line based triangulation algorithm. Proceedings 5th International Symposium on Spatial Data Handling (1992), 411^21. [ I l l ] S. Ganapathy and T.G. Dennehy, A new general triangulation method for planar contours. Computer Graphics 16 (3) (1982), 69-75. [112] L. Gewali, A. Meng, J.S.B. Mitchell and S. Ntafos, Path planning in O/l/oo weighted regions with applications. Proceedings 4th Symposium on Computational Geometry (1988), 266-278. [113] S.K. Ghosh, Computing the visibility polygon from a convex set and related problems, J. Algorithms 12 (1991), 75-95. [114] C. Gold, Problems with handling spatial data — the Voronoi approach, CISM J. 45 (1991), 65-80. [115] CM. Gold, An object-based dynamic spatial model, and its application in the development of a userfriendly digitizing system. Proceedings 5th International Symposium on Spatial Data Handling, Charleston, IGU Commission on GIS (1992), 495-504. [116] C. Gold, Dynamic data structures. Advanced Geographic Data Modelling — Spatial Data Modelling and Query Languages for 2D and 3D AppHcations, M. Molenaar and S. De Hoop, eds, Netherlands Geodetic Commission, Publication on Geodesy — New Series 40 (1994), 121-128. [117] C. Gold and T. Roos, Surface modeling with guaranteed consistency — an object-based approach. Proceedings IGIS'94: Geographic Information Systems, J. Nievergelt, T. Roos, H.J. Schack and P. Widmayer, eds. Lecture Notes in Comput. Sci. 884, Springer-Verlag (1994), 70-85. [118] D. Gomez and A. Guzman, A digital model for three-dimensional surface representation, Geoprocessing 1 (1979), 53-70. [119] M.F. Goodchild, K.K. Kemp and T.K. Poiker, NCGIA Core Curriculum, National Center for Geographic Information Analysis, University of California, Santa Barbara, USA (1989), also available at http://www.env.gov.bc.ca/ tclover/giscourse/ToC.html. [120] M.F. Goodchild and Y. Shiren, A hierarchical data structure for global geographic information systems. Computer Vision, Graphics and Image Process. 54 (1992), 3 1 ^ 4 . [121] M.T. Goodrich, A polygonal approach to hidden line and hidden surface elimination. Graphical Models and Image Process. 54 (1) (1992), 1-12. [122] M.H. Gross, O.G. Staadt and R. Gatti, Efficient triangular surface approximation using wavelets and quadtree data structures, IEEE Trans. Visualization and Computer Graphics 2 (2), 130-143. [123] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans, on Graphics 4 (1985), 74-123. [124] L.J. Guibas and R. Seidel, Computing convolutions by reciprocal search. Discrete Comput. Geom. 2 (1987), 175-193. [125] L.J. Guibas, J.E. Hershberger, J.S.B. Mitchell and J.S. Snoeyink, Approximating polygons and subdivisions with minimum-link paths, Intemat. J. Comput. Geom. Appl. 3 (4) (1983), 383-415. [126] L.J. Guibas and D.H. Marimont, Rounding arrangements dynamically. Proceedings 11th ACM Symposium on Computational Geometry (1995), 190-199. [ 127] A. Guttman, R-trees: A dynamic index structure for spatial searching. Proceedings ACM SIGMOD (1984), 47-57.
382
L. de Floriani et al.
[128] R.H. Giiting and M. Schneider, Realms: A foundation for spatial data types in database systems. Proceedings 3rd International Symposium on Large Spatial Databases, Singapore (1993), 14-35. [129] R.H. Giiting, T. Ridder and M. Schneider, Implementation of the ROSE algebra: Efficient algorithms for realm-based spatial data types. Proceedings 4th International Symposium on Large Spatial Databases, Portland, ME, Lecture Notes in Comput. Sci. 951, Springer-Verlag (1995), 216-239. [130] T. Hadzilacos and N. Tryfona, A model for expressing topological integrity constraints in geographic databases. Lecture Notes in Comput. Sci. 639, Springer-Verlag (1992), 252-268. [131] B. Hamman, A data reduction scheme for triangulated surfaces, Comput. Aided Geom. Design 11 (1994), 197-214. [132] R.M. Haralick, Ridges and valleys on digital images. Computer Vision, Graphics and Image Process. 22 (1983), 28-38. [133] S. Har-Peled, M. Sharir and K.R. Varadarajan, Approximate shortest paths on a convex polytope in three dimensions. Proceedings 12th Annu. ACM Sympos. Comput. Geom. (1996), 329-338. [134] D.J. Hebert and H.-J. Kim, Image encoding with triangulation wavelets. Proceedings SPIE 2569 1 (1995), 381-392. [135] P. Heckbert and M. Garland, Survey of polygonal surface simplification algorithms, Siggraph'97 Course Notes (1997). [136] J. Herring, TIGRIS: Topologically integrated GIS, Proceedings AUTO-CARTO 8, ASPRS/ACSM, Baltimore, MD (March 1987), 282-291. [137] J. Hershberger, Finding the upper envelope ofn line segments in 0{n logn) time. Inform. Process. Lett. 33 (1989), 169-174. [138] J. Hershberger and J. Snoeyink, Computing minimum length paths of a given homotopy class, Comput. Geom. 4 (1994), 63-97. [139] J. Hershberger and J. Snoeyink, Cartographic line simplification and polygon CSG formulae in 0(n log* n) time, Proceedings 5th Annual Workshop on Algorithms and Data Structures, Halifax, Nova Scotia, Canada (August 1997). [140] G.R. Hjaltason and H. Samet, Ranking in spatial databases. Advances in Spatial Databases, Lecture Notes in Comput. Sci. 951, Springer-Verlag (1995), 83-95. [141] E.G. Hoel and H. Samet, Efficient processing of spatial queries in line segment database. Advances in Spatial Databases, Lecture Notes in Comput. Sci. 525, Springer-Verlag (1991). [142] CM. Hoffmann, The problems of accuracy and robustness in computational geometry, IEEE Computer 22 (3) (1989), 31-41. [ 143] C. Hoffmann, Geometric and Solid Modeling: An Introduction, The Morgan Kaufmann Series in Computer Graphics and Geometric Modeling, Morgan Kaufmann, San Mateo, California (1989). [144] H. Hoppe, T. DeRose, T. Duchamp, J. McDonald and W. Stuetzle, Surface reconstruction from unorganized points. Proceedings SIGGRAPH '92 Computer Graphics Proceedings, Annual Conference Series, ACM SIGGRAPH (1992), 71-78. [145] H. Hoppe, Progressive meshes, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '96) (1996), 99-108. [146] H. Hoppe, View-dependent refinement of progressive meshes, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '97) (1997). [147] H. Imai and M. Iri, Computational-geometric methodsfiyrpolygonal approximations of a curve, Comput. Vision, Graphics and Image Process. 36 (1986), 3 1 ^ 1 . [148] H. Imai and M. Iri, An optimal algorithm for approximating a piecewise linear function, J. Inform. Process. 9 (3) (1986), 159-162. [149] H. Imai and M. Iri, Polygonal approximation of a curve —formulations and algorithms. Computational Morphology, G.T. Toussaint, ed.. Machine Intelligence and Pattern Recognition 6, North-Holland (1988), 71-86. [150] S.K. Jenson and J.O. Dominique, Extracting topographic structure from digital elevation data for geographic information system analysis, Photogramm. Eng. Remote Sensing 54 (1988), 1593-1600. [151] B. Joe, Construction of three-dimensional Delaunay triangulations using local transformations, Comput. Aided Geom. Design 8 (2) (1991), 123-142. [152] C. Jones, Cartographic name placement with Prolog, IEEE Comput. Graphics Appl. 9 (5) (1989), 36-47.
Applications
of computational
geometry to geographic information systems
383
[153] C.B. Jones, Data structures for three-dimensional spatial information systems in geology, Internat. J. Geogr. Inform. Systems 3(1) (1989), 15-32. [154] C.B. Jones, G.L. Bundy and J.M. Ware, Map generalization with a triangulated data structure, Carthography and Geographic Information Systems 22 (4) (1995), 317-331. [155] J. A. Jorge and D. Vaida, A fuzzy relational path algebra for distances and directions. Proceedings EC AI-96 Workshop on Representation and Processing of Spatial Expressions, Budapest, Hungary (1996). [156] W. Kainz, Spatial relationships — Topology versus order. Proceedings 4th International Symposium on Spatial Data Handling, Zurich, Switzerland (July 1990), 814-819. [. .r/] W. Kainz, M.J. Egenhofer and J. Greasley, Modeling spatial relations and operations with partially ordered sets, Internat. J. Geogr. Inform. Systems 7 (3) (1993), 215-225. [158] M.J. Katz, M.H. Overmars and M. Sharir, Efficient hidden surface removal for objects with small union size. Proceedings 7th ACM Symposium on Computational Geometry, ACM Press, New York (1991), 3 1 40. [159] E. Keppel, Approximating complex surfaces by triangulation of contour lines, IBM J. Research and Development 19 (1) (1975), 2-11. [160] D.G. Kirkpatrick, Efficient computation of continuous skeletons. Proceedings 20th IEEE Symposium on Foundations of Computer Science (1979), 18-27. [161] D.G. Kirkpatrick, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1) (1983), 28-35. [162] R. Klein and W. StraBer, Generation of multiresolution models from CAD data for real time rendering. Theory and Practice of Geometric Modeling, W. StraBer, R. Klein and R. Rau, eds. Springer-Verlag (1996). [163] J.J. Koenderik and A.J. van Doom, Local features of smooth shapes: Ridges and courses. Geometric Methods in Computer Vision II, Vol. 2031, SPIE (1993), 2-13. [164] J.J. Koenderik and A.J. van Doom, Two-plus-one-dimensional differential geometry, Pattern Recogn. Lett. 15 (1994), 439-443. [165] T.Y. Kong and A. Rosenfeld, Digital topology: Introduction and survey, Comput. Vision, Graphics and Image Process. 48 (1989), 357-393. [166] H.P. Kriegel, T. Brinkhoff and R. Schneider, The combination of spatial access methods and Computational Geometry in Geographic Database Systems, Proceedings 2nd Symposium on Spatial Databases (1991), 5-21. [167] H.P. Kriegel, T. Brinkhoff and R. Schneider, An efficient map overlay algorithm based on Spatial Access Methods and Computational Geometry, Proceedings International Workshop on DBMSs for Geographical Apphcations, Capri, Italy (May 1991), 16-17. [168] L. Kucera, M. Melhom, B. Preis and E. Schwarzenecker, Exact algorithms for a geometric packing problem. Proceedings 10th Symposium on Theoret. Aspects of Computer Science, Lecture Notes in Comput. Sci. 665, Springer-Verlag (1993), 317-322. [169] LS. Kweon and T. Kanade, Extracting topological terrain features from elevation maps, Comput. Vision, Graphics and Image Process. 59 (2) (1994), 171-182. [ 170] M. Lanthier, A. Maheshwari and J.R. Sack, Approximating weighted shortest paths on polyhedral surfaces. Proceedings ACM Symposium on Computational Geometry, Nice, France (1997), 274-283. [171] R. Laurini and D. Thompson, Fundamentals of Spatial Information Systems, Academic Press, London (1992). [172] C.L. Lawson, Software for C^ surface interpolation. Mathematical Software III, J.R. Rice, ed.. Academic Press Inc. (1977), 161-164. [173] D.T. Lee and A.K. Lin, Generalized Delaunay triangulation for planar graphs. Discrete Comput. Geom. 1 (1986), 201-217. [174] J. Lee, A drop heuristic conversion method for extracting irregular networks for digital elevation models. Proceedings GIS/LIS '89, Orlando, FL, USA (1989), 30-39. [175] J. Lee, Analyses of visibility sites on topographic surfaces. Internal. J. Geogr. Inform. Systems 5 (1991), 413-429. [176] Z. Li and S. Openshaw, Algorithms for automated line generalization based on a natural principle of objective generalization, Intemat. J. Geogr. Inform. Systems 6 (5) (1992), 373-389. [177] P. Lienhardt, Topological models for boundary representations: a comparison with n-dimensional generalized maps, Comput. Aided Design 23 (1) (1991), 59-82.
384
L. de Floriani et al.
[178] P. Lindstrom, D. KoUer, W. Ribarsky, L.F. Hodges, N. Faust and G.A. Turner, Real-time, continuous level of detail rendering of height fields, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '96), ACM Press, New Orleans, LA, USA (1996), 109-118. [179] G. Liotta, F.P. Preparata and R. Tamassia, Robust proximity queries: An illustration of degree-driven algorithm design. Proceedings 13th ACM Symposium on Computational Geometry (1997), 156-165 [180] Y. Livnat, H.W. Shen and C.R. Johnson, A near optimal isosurface extraction algorithm using the span space, IEEE Trans. Visuahzation and Comput. Graphics 2 (1996), 73-84. [181] M. Lounsbery, T.D. DeRose and J. Warren, Multiresolution analysis of surfaces of arbitrary topological type, ACM Trans, on Graphics 16 (1) (1997), 34-73. [182] H. Lukatela, Hipparchus data structures: Points, lines and regions in spherical Voronoi grid. Proceedings Auto-Carto 9 (1989), 164-170. [183] A.T. Lundell and S. Weingram, The Topology ofCW Complexes, Van Nostrand Reinhold Comp. (1969). [184] P. Magillo and L. De Floriani, Maintaining multiple levels of detail in the overlay of hierarchical subdivisions. Proceedings 8th Canadian Conference on Computational Geometry (1996), 190-195. [185] P. Magillo and E. Puppo, Algorithms for parallel terrain modelling and visualisation. Parallel Processing Algorithms for GIS, Ch. 16, R.G. Healey, S. Dowers B.M. Gittings and M.J. Mineter, eds, Taylor & Francis (1998). [186] A. Maheshwari, P. Morin and J.-R. Sack, Progressive TINs: Algorithms and applications. Proceedings 5th ACM Workshop on Advances in Geographic Information Systems, November 15-16, Las Vegas, Nevada (1997). [187] M. Mantyla, An Introduction to Solid Modeling, Computer Press (1988). [188] D.M, Mark, Topological properties of geographic surfaces: Applications in computer carthography. Proceedings 1st International Advanced Study Symposium on Topological Data Structures for GIS 5, G. Dutton,ed.. Harvard (1994). [189] C.S. Mata and J.S.B. Mitchell, A new algorithm for computing shortest paths in a weighted planar subsivision. Proceedings ACM Symposium on Computational Geometry, Nice, France (June 1997), 264-273. [190] I.E. Mc Cormack, M.N. Gahegan, S.A. Roberts, J. Hogg and B.S. Hoyle, Feature-based derivation of drainage networks, Intemat. J. GIS 7 (3) (1993), 263-279. [191] M. McKenna, Worst case optimal hidden surface removal, ACM Trans. Graphics 6, ACM Press, New York (1987), 19-28. [192] R. McMaster, Automated line generalization, Cartographica 24 (1984), 74-111. [193] C. Miller and R.A. LaFlamme, The digital terrain model — theory and applications, Photogramm. Eng. 24 (3) (1958), 433-442. [ 194] G. Misund, Varioscale TIN based surfaces. Proceedings 7th Int. Symp. on Spatial Data Handling, August 12-16, Delft (NL) (1996), 6.35-6.46. [195] J.S.B. Mitchell, D.M. Mount and CH. Papamitridiou, The discrete geodesic problem, SIAM J. Comput. 16 (1987), 647-668. [196] J.S.B. Mitchell and C.H. Papamitridiou, The weighted region problem: Finding shortest paths through a weighted planar subsivision, J. ACM 38 (1) (January 1991), 18-23. [197] J.S.B. Mitchell and S. Suri, A survey of computational geometry, Handbooks in Operations Research and Management Science, Vol. 7, Ch. 7, M.O. Ball et al., eds, Elsevier Science B.V (1995), 439^58. [198] M. Molenaar, Single valued vector maps — a concept in GIS, Geo-Informationssysteme 2(1) (1989). [199] M.E. Mortenson, Geometric Modeling, Wiley, New York (1985). [200] D.G. Morris and R.G. Heerdegen, Automatically derived catchment boundaries and channel networks and their hydrological applications, Geomorphology 1 (1988), 131-141. [201] D.M. Mount, On finding shortest paths on convex polyhedra. Technical Report 1495, Department of Computer Science, University of Maryland, Baltimore, MD (1985). [202] K. Mulmuley, Computational Geometry: An Introduction through Randomized Algorithms, Prentice Hall (1994). [203] G. Nagy, Terrain visibility, Comput. Graphics 18 (6) (1994). [204] S. Naher, The LEDA user manual. Version 3.1 (Jan. 16, 1995). Available by anonymous ftp from ftp.mpisb.mpg.de in directory /pub/LEDA. [205] B. Naylor, J. Amanatides and W. Thibault, Merging BSP-trees yelds polyhedral set operations, Comput. Graphics (Proceedings SIGGRAPH 1990) 24, F Baskett, ed. (1990), 115-124.
Applications
of computational
geometry to geographic information systems
385
[206] G. Nielson, Scattered data modeling, IEEE Comput. Graphics Appl. 13 (1) (1993), 60-70. [207] J. Nievergelt and F.P. Preparata, Plane sweep algorithms for intersecting geometric figures, Comm. ACM 25 (10) (1982), 739-747. [208] O. Nurmi, A fast line-sweep algorithm for hidden line elimination, BIT 25 (1985), 466-472. [209] Openlnventor Architecture Group, Inventor Mentor: Openlnventor Reference Manual, Addison-Wesley (1994). [210] J. Orenstein, An algorithm for computing the overlay of k-dimensional spaces. Proceedings 2nd Symposium on Advanced in Spatial Databases, Lecture Notes in Comput. Sci. 525, O. Giinter and H.J. Schek, eds (1991), 381^00. [211] M. Overmai's and M. Sharir, A simple output-sensitive algorithm for hidden suiface removal, ACM Trans, on Graphics 11 (1992), 1-11. [212] M.H. Overmars, Designing the computational geometry algorithms library CGAL, Appl. Comput. Geom. (Proc. WACG'96), Lecture Notes in Comput. Sci., Springer-Verlag (1997). [213] L. Palazzi and J. Snoeyink, Counting and reporting red/blue segment intersections. Lecture Notes in Comput. Sci. 709, F. Dehne, J.R. Sack, N. Santoro and S. Whitesides, eds. Springer-Verlag, New York (1993), 530-540. [214] J. Persson and E. Jungert, Generation of multi-resolution maps from run length-encoded data, Intemat. J. Geogr. Inform. Systems 6 (6) (1992), 497-510. [215] G. Petrie and T.J.M. Kennie, eds, Terrain Modelling in Survey and Civil Engineering, Whittles Publishing — Thomas Telford, London (1990), 112-127. [216] G. Petrie, Modelling, interpolation and contouring procedures. Terrain Modelling in Survey and Civil Engineering, G. Petrie and T.J.M. Petrie, eds. Whittles Publishing — Thomas Telford, London (1990), 112-127. [217] T.K. Peucker and D.H. Douglas, Detection of surface-specific points by local parallel processing of discrete terrain elevation data, Comput. Graphics and Image Process. 4 (1975), 375-387. [218] S. Pigot, Generalized singular 3-cell complexes. Proceedings 6th International Symposium on Spatial Data Handling, Edinburgh, Scotland (1994), 89-111. [219] M. Pilouk, K. Tempfli and M. Molenaar, A tetrahedron-based 3D vector data model for geoinformation. Advanced Geographic Data Modelling — Spatial Data Modelling and Query Languages for 2D and 3D Apphcations, M. Molenaar and S. De Hoop, eds, Pubhcation on Geodesy — New Series 40 (1994), 129140. [220] W.K. Pratt, Digital Image Processing, Wiley (1978). [221] F.P Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag, Berlin (1985). [222] F.P. Preparata and J.S. Vitter, A simplified technique for hidden-line elimination in terrains. Proceedings STAGS'92, Paris, A. Finkel and M. Jantzen, eds, Lecture Notes in Comput. Sci. 577, Springer-Verlag, Berlin (1992), 135-144. [223] E. Puppo and G. Dettori, Towards a formal model for multiresolution spatial maps, Advances in Spatial Databases, Lecture Notes in Computer Science 951, M.J. Egenhofer and J.R. Herring, eds, Springer-Verlag (1995), 152-169. [224] E. Puppo, Variable resolution terrain surfaces. Proceedings Canadian Conference on Computational Geometry, Ottawa (Canada) 12-15 August, 1996; appeared in longer version as Variable resolution triangulations, Comput. Geom. 11 ( 3 ^ ) (1998), 219-238. [225] E. Puppo and P. Marzano, Discrete visibility problems and graph algorithms, Intemat. J. Geogr. Inform. Sci. 11 (2) (1997), 139-162. [226] E. Puppo and R. Scopigno, Simplification, LOD, and multire solution — Principles and applications, Eurographics '97 Tutorial (1997). [227] V.T. Rajan, Optimality of the Delaunay triangulation in R^, Discrete Comput. Geom. 12 (1994), 189. [228] J. Raper, ed., Three Dimensional Applications in Geographic Information Systems, Taylor & Francis (1989). [229] J.H. Reif and S. Sen, An efficient output-sensitive hidden-surface removal algorithm and its parallelization. Proceedings 4th ACM Symposium on Computational Geometry, Urbana, ACM Press, New York (1988), 193-200.
386
L. de Floriani et al.
[230] S. Rippa, Minimal roughness property ofDelaunay triangulation, Comput. Aided Geom. Design 7 (1990), 489^97. [231] S. Rippa, Adaptive approximations by piecewise linear polynomials on triangulations of subsets of scattered data, SIAM J. Sci. Statist. Comput. 13 (1) (1992), 1123-1141. [232] A.H. Robinson, R.D. Sale, J.L. Morrison and RC. Muehrcke, Elements of Cartography, 5th ed., Wiley, New Yorlc (1984). [233] J.G. Rolme, B. Wyvill and X. Wu, Fast line scan-conversion, ACM Trans, on Graphics 9 (1990), 376-388. [234] A. Rosenfeld and A. Kak, Digital picture processing. Computer Science and Mathematics, Vol. 1 and 2, 2nd ed.. Academic Press (1982). [235] N. Roussopoulos and D. Leifker, Direct spatial search on pictorial databases using packed R-trees, Proceedings SIGMOD Conference (1985), 17-31. [236] J. Ruppert and R. Seidel, On the difficulty of tetrahedralizing ?>-dimensional non-convex polyhedra. Proceedings 5th ACM Symposium on Computational Geometry (1989), 380-393. [237] A. Saalfeld, Joint triangulations and triangulation maps. Proceedings Third Symposium on Computational Geometry, Waterioo, Canada (June 1987), 195-204. [238] A. Saalfeld, Conflation: Automatic map compilation, Internat. J. Geogr. Inform. Systems 2 (3) (1988), 217-228. [239] A. Saalfeld, Delaunay edge refinements. Proceedings 3rd Canadian Conference on Computational Geometry (1991), 33-36. [240] A. Saalfeld, Comflation: Automated map compilation. Technical Report CAR-TR-670, Center for Automation Research (May 1993). [241] A. Saalfeld, Map generalization as a graph drawing problem. Graph Drawing (Proceedings GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 444-451. [242] H. Samet, The Design and Analysis of Spatial Data Structures, Addison-Wesley, Reading, MA (1990). [243] H. Samet, Applications of Spatial Data Structures, Addison-Wesley, Reading, MA (1990). [244] H. Samet, Object-based and image-based representations of objects by their interiors. Advances in Image Understanding — A Festschrift for Azriel Rosenfeld, K. Bowyer and N. Ahuja, eds, IEEE Computer Society Press, Los Alamitos, CA (1996), 316-332. 1245] L.L. Scarlatos, An automatic critical line detector for digital elevation matrices. Proceedings 1990 ACSMASPRS Annual Convention 2, Denver, CO (1990), 43-52. [246] L.L. Scarlatos and T. Pavlidis, Hierarchical triangulation using cartographic coherence, CVGIP: Graphical Models and Image Processing 54 (2) (1992), 147-161. [247] A. Schmitt, Time and space bounds for hidden line and hidden surface algorithms. Proceedings Eurographics'81, North-Holland, Amsterdam (1981), 43-56. [248] L. Schubert and CA. Wang, An optimal algorithm for constructing the Delaunay triangulation of a set of line segments. Proceedings 3rd ACM Symposium on Computational Geometry, Waterloo (June 1987), 223-232. [249] W.J. Schroeder, J. A. Zarge and W. Lorensen, Decimation of triangle mesh, ACM Comput. Graphics 26 (2) (July 1992), 65-70. [250] T. Sellis, N. Roussopoulos and C. Faloutsos, The R^-tree: A dynamic index for multidimensional objects. Proceedings 13th International Conference on Very Large Data Bases (VLDB) (1987), 507-518. [251] M. Sharir and A. Shorr, On shortest paths on polyhedral spaces, SIAM J. Comput. 15 (1986), 193-215. [252] M. Sharir, The shortest watchtower and related problems for polyhedral terrains. Inform. Process. Lett. 29 (1988), 265-270. [253] C.T. Silva, J.S.B. Mitchell and A.E. Kaufman, Automatic generation of triangular irregular networks using greedy cuts. Proceedings IEEE Visualization '95 (1995), 201-208. [254] A.K. Skidmore, Terrain position as mapped from gridded digital elevation model. Internal. J. Geogr. Inform. Systems 4(1) (1990), 33-49. [255] K.R. Sloan and L.D. Hrechanyk, Surface reconstruction from sparse data. Proceedings Conference on Pattern Recognition and Image Processing (1981), 4 5 ^ 8 . [256] J. Snoeyink and M. van Kreveld, Linear-time reconstruction ofDelaunay triangulations with applications. Proceedings 5th European Symposium on Algorithms (1997). [257] D.A. Southard, Piecewise linear surface models from sampled data. Proceedings Computer Graphics International 91, Boston, MA, 22-28 June (1991).
Applications
of computational
geometry to geographic information systems
387
[258] S. Suri, A linear time algorithm for minimum link paths inside a simple polygon, Comput. Vision, Graphics and Image Process. 35 (1986), 99-110. [259] E.J. StoUnitz, T.D. DeRose and D.H. Salesin, Wavelets for computer graphics: A primer Part /, IEEE Computer Graphics and Applications (May 1995), 76-84. [260] E.J. StoUnitz, T.D. DeRose and D.H. Salesin, Wavelets for computer graphics: A primer Part II, IEEE Computer Graphics and AppUcations (July 1995), 75-85. [261] R. Tamassia, ed.. Strategic directions in computational geometry working group report, ACM Comput. Surveys 28 (4) (1996). [262] G. Taubin and J. Rossignac, Geometric compression through topological surgery, IBM Res. Report RC20340 (Januar>' 1996). [263] W.R. Tobler, A continuous transformation useful for districting, Ann. New York Acad. Sci. 219 (1973), 215-220. [264] V.J.D. Tsai, Delaunay triangulations in TIN creation: An overview and a linear-time algorithm, Intemat. J. GIS 7 (6) (1993), 501-524. [265] G. Turk, Re-tiling polygonal surfaces, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '92) 26 (2) (1992), 55-64. [266] J. van Bemmelen, W. Quak, M. van Heldcen and P. van Oosterom, Vector vs. raster-based algorithms for cross country movement planning. Proceedings AUTO-CARTO 11, Minneapolis (1993), 309-317. [267] R.C. Veltkamp, 3D computational morphology, EUROGRAPHICS '93 (1993), 115-127. [268] M. van Kreveld, On quality paths on polyhedral terrains. Proceedings IGIS'94: Geographic Information Systems, J. Nievergelt, T. Roos, H.J. Schack and P. Widmayer, eds. Lecture Notes in Comput. Sci. 884, Springer-Verlag (1994), 113-122. [269] M. van Kreveld, Efficient methods for isoline extraction from a TIN, Intemat. J. Geogr. Inform. Science 10 (5) (1996), 523-540. [270] M. van Kreveld, Digital elevation models and TIN algorithms. Notes for CISM Advanced School on Algorithmic Foundations of GIS (1996). [271] M. van Kreveld, Variations on sweep algorithms: Efficient computation of extended viewsheds and class intervals. Proceedings Symposium on Spatial Data Handling (1996), 13A.15-13A.27. [272] M. van Kreveld, R. van Oostrum and C. Bajaj, Contour trees and small seed sets for isosurface traversal. Proceedings 13th Annual ACM Symposium on Computational Geometry (1997), 212-219. [273] P. van Oosterom, A modified binary space partition for geographic information systems, Intemat. J. Geogr. Inform. Systems 4 (2) (1990), 133-146. [274] P. van Oosterom, Reactive Data Structures for Geographic Information Systems, Oxford University Press (1993). [275] P. van Oosterom and V. Schaukelaars, The development of an interactive multi-scale GIS, Intemat. J. GIS 9 (5) (1995), 489-507. [276] I. Vincent and P. Soille, Watersheds in digital spaces: An efficient algorithm based on immersion simulations, IEEE Transactions on Pattern Analysis and Machine Intelligence 13 (1991), 583-598. [277] The Virtual Reality Modeling Language Specification — Version 2.0 (August 1996), http://vag.vrml.org/. [278] B. Von Herzen and A.H. Barr, Accurate triangulations of deformed, intersecting surfaces, ACM Computer Graphics Proceedings, Annual Conference Series (SIGGRAPH '87) 21 (4) (July 1987), 103-110. [279] F. Wagner and A. Wolff, An efficient and effective approximation algorithm for the map labeling problem. Proceedings 3rd European Symposium on Algorithms, Lecture Notes in Comput. Sci. 979 (1995), 420433. [280] F. Wagner and A. Wolff, Map labeling heuristics: Provably good and practically useffil. Proceedings 11th Annual ACM Symposium on Computational Geometry (1995), 109-118. [281] J.M. Ware, C.B. Jones and G.L. Bundy, A triangulated spatial model for cartographic generalization of areal objects. Spatial Information Theory, A. Frank and W. Kuhn, eds, Lecture Notes in Comput. Sci. 988, Springer-Verlag (1995), 173-191. [282] D.F. Watson, Computing the n-dimensional Delaunay tessellation with application to Voronoi poly topes. The Comput. J. 24 (1981), 728-746. [283] L.T. Watson, TJ. Laffey and R.M. Haralick, Topographic classification of digital image intensity surfaces using generalized splines and the discrete cosine transformation, Comput. Vision, Graphics and Image Process. 29 (1985), 143-167.
388
L. de Floriani et al.
[284] H. Webb, Creation of digital terrain models using analytical photogrammetry and their use in civil engineering. Terrain Modelling in Survey and Civil Engineering, G. Petrie and T.J.M. Petrie, eds. Whittles Publishing — Thomas Telford, London (1990), 73-84. [285] K. Weiler, Edge-based data structures for solid modeling in a curved-surface environment, IEEE Computer Graphics and Applications 5(1) (January 1985), 2 1 ^ 0 . [286] R. Weibel and M. Hellen, A framework for digital terrain modeling. Proceedings 4th International Conference on Spatial Data Handhng, Zurich (1990), 219-229. [287] R. Weibel, A typology of constraints for line simplification. Proceedings 7th International Symposium on Spatial Data Handling (SDH'96) (1996), 9A.1-9A.14. [288] J. Wemecke, The Inventor Mentor: Programming Object-Oriented 3D Graphics with Open Inventor, Addison-Wesley (1994). [289] G.W Wolf, Metric surface networks. Proceedings 4th International Symposium on Spatial Data Handling, Zurich (1990), 844-846. [290] T.C. Woo, A combinatorial analysis of boundary data structure schemata, IEEE Comput. Graphics Appl. 5 (3) (1985), 19-27. [291] M.F. Worboys, A generic model for planar geographic objects, Intemat. J. Geogr. Inform. Systems 6 (5) (1992), 353-372. [292] M.F. Worboys and P. Bokafos, A canonical model for a class ofareal spatial objects. Advances in Spatial Database (SSD93), D. Abel and B.C. Ooi, eds. Lecture Notes in Comput. Sci., Springer-Verlag (1993), 36-52. [293] J.C. Xia and A. Varshney, Dynamic view-dependent simplification for polygonal models. Proceedings IEEE Visualization '96, R. Yagel and G. Nielson, eds, S. Francisco, CA (1996), 327-334. [294] S. Yu, M. Van and J. Snoeyink, Drainage queries in TINs: From local to global and back again. Proceedings Symposium on Spatial Data Handling (SDH'96) (1996), 13A.1-13A.14. [295] B. Zhu, Computing the shortest watchtower of a polyhedral terrain in 0{n log w) time, Comput. Geom. 8 (1997), 181-193. [296] S. Zoraster, Integer programming applied to the map label placement problem, Cartographica 22 (3) (1986), 16-27.
CHAPTER 8
Making Geometry Visible: An Introduction to the Animation of Geometric Algorithms Alejo Hausner and David R Dobkin* Computer Science Department, Princeton University, Princeton, NJ 08544 USA E-mail: {ah, dpd] @ cs.princeton. edu
Contents 1. Introduction Which would you prefer? Who should read this? It's interactive, not static You've already seen it The need for animation How can algorithm animation help you? It will improve further Chapter overview 2. General systems 2.1. Sorting out sorting 2.2. BALSA and Zeus 2.3. "Descendants" of BALSA 3. Geometry-oriented systems 3.1. Two-dimensional systems 3.2. Beyond two dimensions 4. Visualizations 4.1. Mathematical visualization 4.2. Demonstrations 4.3. Algorithm animations 4.4. Interactive visualizations 5. Design issues relevant to algorithm animation systems 5.1. Scope 5.2. Author and audience 5.3. Expressiveness
391 391 391 391 391 392 392 392 393 393 393 395 397 401 401 402 405 406 406 407 410 413 413 413 414
*This work has been supported in part by NSF Grants CCR-9643913 and CCR-9731535 and by the US Army Research Office under Grant DAAH04-96-1-0181 and by Dimacs, an NSF Science and Technology Center. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V All rights reserved
389
390 5.4. User interaction 6. Techniques 6.1. Abstraction 6.2. A few animation techniques 6.3. Problems specific to 3D 7. Conclusion The future References
A. Hausner and D.P. Dobkin 415 416 416 416 417 419 420 420
Abstract This chapter surveys the field of geometric algorithm animation, which has flourished in the past five years. Algorithm animation uses moving pictures to explain a computer algorithm to students learning programming, to algorithm researchers, and to programmers involved in debugging. We examine systems used to create animations of algorithms, focusing on those that specialize in geometry. We also consider a selection of animations, pointing out some useful techniques, and continue with some consideration of general design issues and specific animation techniques, closing with a look at the future.
An introduction to the animation of geometric algorithms
391
1. Introduction Which would you prefer? Imagine yourself learning a complicated new algorithm that solves a geometric problem. You might read a book or a research paper that explains the algorithm. You probably will have to pore over the algorithm's code, which is a difficult way to learn complicated algorithms ! Even if the author had provided you with simplified pseudocode, you might still need a long time to understand the details of the algorithm. Now suppose an animation of the algorithm is available. Instead of having to imagine what is happening to the algorithm's variables, you see colored shapes which represent the program's data. These shapes move and change as the program runs. A triangle is not presented to you as the coordinates of three points, but is drawn on the screen, changing as the program works on it. As you choose different inputs, the animation will be different. You can slow the animation down, to better understand complicated parts, or speed it up to skip what you already understand, or even run it backwards to recall where things used to be. Which scenario would you prefer, reading about the algorithm or watching it in action? If you prefer the animation, then this chapter is for you. Who should read this? Anyone who explores geometry and computation may find algorithm animation useful. Explorers of geometry can be mathematicians, users or designers of geometric algorithms, or students. All of them need explanatory tools, whether they are learning about the subject or searching for new solutions to a problem. Computer-based geometric visualization and algorithm animation can provide such an aid. Visualization is the creation of images to describe an abstract idea. Computer-generated images have advantages over hand-drawn ones. They are accurate, can be modified with ease, and in the case of three-dimensional geometric objects, they can be examined from any angle. Ifs interactive, not static Algorithm animation visualizes the activity of an algorithm through moving images. As in conventional animation, the movement of images is not real, but is simulated by presenting the viewer with a sequence of still images. Unlike conventional animation, however, in algorithm animation the sequence of images is not fixed. Each image represents the state of the algorithm at some point in time. Since the inputs to an algorithm can vary, its behavior will vary and hence so will the animation of that behavior. You \e already seen it In a way, algorithm animation is as old as Euclid. It is not too far-fetched to say that a constructive geometric proof is a form of animated algorithm. For example, the proof that one
392
A. Hausner and D.P. Dobkin
can construct an equilateral triangle with a given side (Proposition 1) instructs the reader to draw two circles centered at the sides' endpoints and to draw lines to the circles' intersection. The computer in this case is a person armed with compass and straightedge, who is following instructions and reaching a result, so the procedure qualifies as an algorithm.
The need for animation Some explorers of geometry devote their time to designing algorithms that solve geometric problems. Even though their solutions will run on a computer, they often find themselves working "in the dark", needing to visualize not just the objects they are manipulating but also the process by which the algorithm modifies the objects. Geometric algorithms are often more difficult to design, program and debug than other algorithms. This is because the designers often lack the means to see the objects their algorithms are manipulating, and are forced to pore over printouts of point coordinates. Algorithm animation can help.
How can algorithm animation help you ? There are several reasons for animating an algorithm. First, a theoretician who is devising geometric algorithms needs a medium for disseminating his/her ideas. Although research papers satisfy this role, a well-crafted animation on videotape can communicate an idea more quickly than a printed description. If the author makes an interactive animation available on the world-wide web, people can learn the algorithm more easily. Second, a teacher who is presenting an algorithm to students can benefit in the same way. However, the audience in this case will not consist of experts as in the first case, so the animation must be prepared with more care. Third, animating an algorithm can stimulate the designer into finding new variations. In effect, such an animation explains the algorithm to its author! A geometric algorithm may need to handle special or degenerate cases, and animation often helps to identify these cases. Finally, algorithm animation can help with debugging of general programs, although this application turns out to have limited scope.
It will improve further Algorithm animation is a young discipline, and will probably change in the next few years. The changes will come both from improvements in software and hardware. Although animation as a medium can make an algorithm more understandable, it also has some limitations. For example, there are some algorithms that are rather complicated, and are difficult to understand even with a well-crafted video. In an animation where many things are happening simultaneously, the user will want to stop and ask questions, such as "why didn't the scan line advance when that point was processed?". Hypertext documents allow the viewer to ask such questions, but in the past they have portrayed either fixed images or fixed animations, and this limitation has reduced their explanatory powers. There are situations where the user wants to interact with a running algorithm, and also wants
An introduction to the animation of geometric algorithms
393
to see or hear other information about it. There is a great potential for improvement in algorithm animation through web-based programming languages like Java, which present the user with running programs and not just static images. Animation places great demands on computer resources. If a prepared animation is made available over the internet, it will need large amounts of storage space, and more importantly, a very high-speed connection to the net, lest the users spend hours downloading a five-minute movie. On the other hand, if the user does not download the data but rather runs a program that creates an animation in real time, he/she may need a very fast computer, lest a complicated five-minute animation take 30 minutes to run. A similar problem exists if the user requests a three-dimensional scene stored as VRML data. If the scene is complicated, the rendering speed will suffer, and hence, so will the user. Increases in storage, communication bandwidth and processing power will make possible new algorithm animations and geometric visualizations.
Chapter overview Algorithm animation has its roots in educational film and in mathematical visualization. It has also been influenced by recent developments in scientific data visualization, which is at present an extremely diverse and active field. Early efforts in algorithm animation in the late 1970's resulted in an educational film [2] which is still used today. The middle 1980's saw the development of systems [8,20] which allow a user to run algorithms and see animations interactively. Recent efforts have added color and sound [10,13], as well as the use of object-oriented programming [9,1,29,15]. Section 2 provides a survey of systems used to create animations of general algorithms. Excellent overviews of the field [27,36] are available, so here we will concentrate on questions that a designer of similar systems must face. Geometric algorithms present special opportunities and difficulties, and systems to make animations for them have also evolved [29,17,37]. Section 3 gives a survey of these systems. Again, the survey will not be exhaustive but will focus on technique. The past five years have seen the field of algorithm animation flourish. Rather than require the audience to install the animation software on their own computers, researchers have found it convenient to use video tape to record representative sessions. Section 4 surveys these video recordings. The videos selected for discussion use interesting animation techniques. Whether a researcher is creating animations or is planning a system to assist in their creation, he/she must consider some general issues. These are covered in Section 5. Finally, Section 6 presents some techniques which can be used in an algorithm animation to convey ideas more clearly. 2. General systems 2.1. Sorting out sorting The most well-known example of an early algorithm animation is the film "Sorting out Sorting", created by Ronald Baecker [2] and presented at Siggraph' 81. It explains concepts
394
A. Hausner and D.R
Linear insertion '•.••cr-^-^r.^-:
Dobkin
Bubblesort
:,."••:,••:
•:.'•'•••:.]
Straight Selection
..
. . . . . . • . . • - • , • .
••
•••;•••:
. . . . . . . . . . . . . . •
. • • • • • • " . • • ' . '
:'-/-^r.-':.;:^^:V.;
' • • • • ;
•••••••
:
'.;.
•.•;
••ir;.>-.-:-.
.•
^ . < :
• ' • ' i - ' . . -
.'••,'•',•••.•:
'
:.
.•^'••••.•.•r^"-*=^
• • " • ' . • •
i '
1
• ••
""..r":'-
•
.••:•
v-^'.-u-.-.-.^j^'.^•;.:;•.••.•,..
1 •'
'
• • • . • • ' : ' • • • / . ; • • :
'
. : • : • ' = ' : ; ;
••
- •
T . " ' . : : "
.""...•
• ,
..
r T . " •.••• •.
•;
•
••:"1"
'^^ ."•
.'•
••
•
• • • • . ' . •
••.•••
.••
• ' [ • - " •
• • • ^ :
•"•
.' • •
. . ' •
.
•
••
.
•"•
:':••
•:•*•.••••
'
•••.••••.••
• • :
• ' • : •
••••••..•
.;••••'•
•
. \
. . A .
..'
•
'
> V ' ' - : ' " - " . " ^ ' ^ ' . -
!:"• " i l " - ^ " " " " "
' v ' ^ . • ; • • • • > . : : > . : ; • •
•
• . • • " : •
' • \ . : . -
'•'-•
\ \ .
:-': .r*'.'.
^ ^
••"
"••.•• ."'J" ^'.
• •'
.••;'•
.••"
"•.•f\
••"...••.•
'
•
.
r•
, . 5 : - ^ - - \ : - ^ : V v ' -
" - • " • ' ' . ' ! • • • '
".
t . \
C ' . -
•".*,'•
^ : - ' - " • • :•"
••"•
. . • . . • ' . •
'•''
' • " • ' :
'.._,•.•_!( JN V; • ^- ' •• '••'y--.. ••
• J
. • r ' " '
• - . . • . • . . . . . •
. V 1
-y-
. . . . ; ..
i
;•
..
— ••
Shellsort
Quicksort
h----^:>;i;f •;
• . . • ^ ^ • ' : • • • ' • . •
> ' - ^ -
•
,. •
•
'-
^
:
•
•
•
•
/
'
.'
••••y^'{V;;;-'."V-=^'.
.
It.-',•^•.•*•
••
. ' '. • f' V
,'
Heapsort • : . \ •: ,..•.•.'••: '-'• i.\.
• •.;,;-"^''wM^' ;
•:.
: • ^ • • ^ • .
' . .
•-..•-\;.-r-"-.-v.T^;'••:/• • •.
. .
.
Tree Selection
•..,- :)y^.-^
;
-^
Shakersort
:'•:•: • ^ • ; i ; : ; ^ : • v ' • • ' r • * ^
• • ' ^ • . , / ; , - / - : '
•••
.•
Binary Insertion
• ."^
/."•i.-r.•;
• ' ^ ; - v ; ; ; . - . • . ; ; : . ; / . • •
''.'.
• • •
'^ • '_i.'r. • •. •"
•
H•'^^ rN \
.
•
<
-H J .•
.
•
. •
6^!^"'
:
: ;•• • . ^ " - • .
.•'
•
•••.•
••:.'•-••:•'•?•
' ^ ^ ^
"•'W^$'M
Fig. 1. A snapshot from the final race in "Sorting Out Sorting". Quicksort is winning the race.
involved in sorting an array of numbers, illustrating comparisons and swaps. The film ends with a race among nine algorithms, all sorting the same large random array of numbers. It shows the state of the array as a collection of dots in a rectangle; each dot represents a number: x is the array index and y the value. Figure 1 shows a snapshot from the race. In a single screen, nine rectangles with moving dots vividly explain the behavior of nine algorithms. The audience can compare the 0(n^) and 0(n logn) running times of insertion sort and quick-sort. Not surprisingly, quick-sort finishes first. The movements of the dots also convey the method used by each algorithm. The film was very successful, and is still used to teach the concepts behind sorting. Its main contribution was to show that algorithm animation, by using images, can have great explanatory power. The film also demonstrated that tools were needed. The effort involved in its production (three years using custom-written software) stimulated research into making more general-purpose algorithm animation systems.
An introduction to the animation of geometric algorithms
395
2.2. BALSA and Zeus Many current systems have their roots in BALSA [5,8], developed by Marc Brown and others in the middle 1980's. Its influence has been enormous, and by looking at its design one can learn about the problems that any algorithm animation system must solve. BALSA and BALSA-II are general purpose animation systems, which means that in principle they can be used to animate any algorithm. They are primarily used to supplement the teaching of computer programming. Events: BALSA introduced the paradigm of the interesting event. Not all steps in an algorithm need to be visualized. With some thought, one can identify points in an algorithm where significant changes take place, and mark them. For example, in a sorting algorithm, comparisons and swaps are events. The idea of events reappears in all animation systems after BALSA. In order to animate an algorithm, a programmer using BALSA must implement the algorithm in some programming language, and then modify the resulting program by inserting special procedure calls at the places where interesting events happen. Visualizing events: The events must now be visualized. To continue with the above example, an array of numbers being sorted could be visualized as a row of thin rectangles, each with height proportional to the number it represents. A comparison event might be visualized by highlighting two rectangles, and an swap event by making two rectangles change places. BALSA leaves the task of visualization to the programmer, who must write procedures to visualize events. A collection of these procedures is called a renderer, and produces a view of the algorithm. BALSA takes care of calling these procedures at the appropriate time. Figure 2 shows a screen shot from BALSA. Although in principle any algorithm can be animated, BALSA was intended primarily as an educational tool, and that was indeed its main use. Modifying large programs is a laborious task, and hence it is difficult to use BALSA as a debugging tool in largescale software development. Moreover, a novel algorithm requires the programmer to write new procedures to visualize events, and this task often proves difficult. On the other hand, because so much is left up to the programmer, the system is very flexible. Clearly, BALSA illustrates a tradeoff between flexibility and ease of programming. Aids to writing renderers: Algorithm animation can be a laborious task, and for that reason BALSA supplies some facilities to make the task easier. When an algorithm uses several renderers, a modeler stores a single representation for the state of algorithm, preventing the duplication of data. Sometimes a new algorithm resembles a previously-animated one, and an adapter can be written to call procedures in the old algorithm's renderer, thus saving a great deal of programming. Aids to the user: Once an algorithm has been modified, BALSA lets users experiment with it, and watch the resulting animations. Several features make this experimentation easier. BALSA allows the user to simultaneously invoke several algorithms which solve the same problem, in order to learn which one runs fastest. He/she can also run races among
396
A. Hausner and D.R ^
File
Kiiii
^i;^;;
^Au-^U^v^
Dobkin
'W
ilUp
ISP
m
In
MiralfepliH
IHi I
III»IIIIIIQIIII§J^^
: (G?) [ STEP)
[BEilfjl
^[ FF ) [$PEEP...|[SCBtPr„.> einpacking
)^
Fig. 2. A screen from BALSA-II, showing the first-fit binpacking algorithm. The two views show the results of using random or sorted data.
several instances of the same algorithm, with each instance taking a different amount of time to perform a given subtask. For example, the user can vary the times taken by comparisons and exchanges, to learn how they affect the running time of a given sorting algorithm. There are cases where a user wants to test an algorithm with a certain type of data, and it may be unreasonable to ask him/her to enter a large amount of input data satisfying some criterion. BALSA provides a solution though input generators. These are menu-driven procedures with a few parameters, which will generate data for a given algorithm. The user can configure an input generator interactively. An example is a generator which produces a nearly-sorted array of numbers, which can be used with several sorting algorithms to see which one best handles this nearly-degenerate case. Zeus. After completing his work on BALSA, Marc Brown and others developed Zeus [9], an object-oriented algorithm animation system similar to BALSA. Aware of the difficult task of building renderers, Brown added several features to Zeus that make implementation easier. Zume is a custom pre-processor which generates procedure definitions for renderers based on a file of prototype events, and which thus makes it easier to annotate an algorithm with event calls. Another aid to writing renderers is a multi-view editor, which simultaneously displays a graphical image of a view and the textual code which specifies it. The programmer can manipulate either the graphics or the text, and observe the result. This frees the programmer from the need to specify precise positions for graphical elements, for example.
An introduction to the animation of geometric
algorithms
397
Fig. 3. Zeus: an Animation of Selection Sort. In one control panel, the user has set the relative costs of swaps and comparisons, and in another the input generator determines the initial data. Two views show the algorithm state as plots of sticks and dots.
The multi-view editor also introduces an interesting feature: The user can change the behavior of the algorithm while it is executing, simply by manipulating one of the views. For example, consider a Euclidean graph algorithm: the user can move a node in a planar graph to a new location while the algorithm is running, and observe the effect this has on the algorithm's behavior. Figure 3 is a screen image showing Zeus in action.
2.3. "Descendants'' of BALSA AnimA and GeoLab. AnimA shares many features with BALSA. AnimA is a system for algorithm animation, and it is written using the facilities of GeoLab, a system for geometric computation. AnimA [1] runs within GeoLab [28], and both were developed by P.J. Rezende and others in the early 1990's. AnimA is a general purpose algorithm animation system, and implements many of the features of BALSA, such as renderers, adapters, and input generators. The facilities of GeoLab give users flexibility. To run an animation, a user can choose a problem, an algorithm for that problem, and an input generator for the algorithm. He/she can then run the algorithm, and step through the program events, pause or abort. The use of dynamic libraries allows all the components to be chosen at run-time. Figure 4 is a screen image of AnimA in action.
A. Hausner and D.P. Dobkin
398
GeoLab - Version U.3304:{9 ( Properties v"j
( Input Tools 7 J (Algorithnns v)
(ftnimatii~.n ") ^
Q
- \ \ c9 \ @ (zU \ # 0^
n
0
'%B
External input Tools t^ 1 FKliirriii! Fun: lion T(xiK i>
:; -/5S$^\r
I'iput Generators t-
Proxinity Probiens i
Extract Components o
Gaps and Co^'ers o
Fonts t>
TrangLlatlons o
Segments >
Vc4-oroi Diagrams >
Rays f>
^
Cir'^ies I-
Proximity Problems
(Uiairatar (brute forciT;!
Polygons >
Diameter (Preparata & 5hanos)
Movie t>
Closest Pairi.brute force)
Externa Classes (examples) c
Closest Pair (Divide & Conrjue-)
Settlnqs...
Closest Pair lusinn Vxonoi I'ia'irarn)
<;tn*l'ri<-•-....
All N-nrn'-,* Nniqh|-or-, (hrutn for, n) All Nearest Neiglibor; (jsing Voronoi Diagram! Cud dean Minimum Spanning Tree
Test anc Set S
•^
Testanc Set :
Caps and Cuvurs
( S m a l est Enclosing Circle (Shames)^
v;lrdinfi Nun-I
SmnI R'-.t F n r l o i r ^ Cir. In (Toir.'-.rinf) La-gest Empty Ci-cle (P & S^
Antipodal Pairs Convex Hull^ Pointer:
i9
.•tJlswilar'o
V: - 1 R.OC
Trlangiilations
( P e l a j n a y iriangu atloT)
X: 568.00 SlafSh^uu ri)lyj<;-i
Fartnest-Nelqhbor Trianqulat or
Corvex Polygon
Fig. 4. A screen image from AnimA, showing the many algorithms implemented on the system.
AnimA uses GeoLab's facilities for program development, which includes a specialized editor that controls access to source code to make it possible for a group of developers to work on large projects consistently. GeoLab. GeoLab is an environment for programming geometric algorithms, It is objectoriented and dynamically linked. Within GeoLab, each geometric object has two representations: pure form and graphical form. The purely geometric form of a line segment, for example, is the coordinates of its two endpoints. The graphical form of an object describes how the object should be drawn on the computer screen. Since GeoLab is object-oriented, this description is encapsulated and can consist of programs as well as data. A user can execute a program by choosing data interactively and applying a program to the data. A dispatcher takes care of the task of extracting the pure data from the user's choice, sending it to the program, then adding the graphic data to the program's pure output. This feature is used in AnimA. Tango. Tango [30] was developed by John Stasko in the late 1980's, and is a general purpose system for algorithm animation. One of the novel features of Tango is its emphasis on smooth animation. Human audiences find it difficult to keep track of events if they occur suddenly and discontinuously, and can understand gradual changes more easily. Tango provides paf/z transitions [31], which make it easier for the programmer to specify gradual changes that correspond to program events. The programmer can give the path an object will follow as it moves from one place
An introduction to the animation of geometric
algorithms
399
XTANGO
Fig. 5. A snapshot of Tango on X-Windows, running the first-fit bin packing algorithm. An object of size 6 is being tested for fit into the second bin.
to another. He/she can also decide how the object's color will change during the transition, or whether it will fade in or out. Stasko developed an algebra for specifying how to build a transition from several others, by concatenation (which means they happen one after the other), and compositions (which means several transitions happen during the same time period). Recently, Stasko has made his system accessible interactively through the internet [33], for anyone with a web browser and X-windows. Figure 5 shows a screen image from this version of Tango. Movie and Stills. An interesting approach to algorithm animation appears in Movie and Stills [3], programs developed by Bentley and Kernighan. These authors use the Unix textfilter paradigm. In this system, a program is animated by inserting output statements, and not function calls. Each output statement produces a textual description of the changes in the state of the program. This text must be written in a very simple language for describing shapes to be drawn and also identifying program events. In effect, by thus modifying a program, it will itself output a program which, if properly interpreted, results in an animation. One advantage of this approach is language-independence: the original program can be written in any language and run on any machine, since the animation information is communicated through simple ASCII output. Two utilities are provided to interpret a program's output. The first one, Movie, animates the program on a workstation's screen. The user can pause the animation, speed it up
400
A. Hausner and D.P. Dobkin Insertion Sort
Quicksort comp: 1 IIIIIIIMIIillillL
comp: 60
ll'ill^llllililill
lllill;..:Jill.ll
comp: 120
comp: 180 iillii1:llll;ll:lllll
illl|:,..uili:i:i
comp: 240
comp: 630 lllll'
Fig. 6. A race between insertion sort and quick-sort, produced by Stills
or slow it down. The other tool, Stills, is a t r o f f filter which allows frames from the animation to be included in printed documents. Figure 6 shows a race between insertion sort and quicksort, produced by Stills. In a way, this system resembles Tango and others which break the algorithm and animation into separate processes. The difference here is that the process communication occurs through pipes or intermediate files, and is in only one direction. This restriction makes it more difficult to animate programs that require graphical input, since the user interface must be written by the programmer. Nevertheless, the system is very easy to learn and use, and can animate many algorithms satisfactorily. Summary: Animating General Algorithms. There are several concepts that are relevant to all the animation systems presented in this section. First of all, the idea of an interesting event appears in all the systems. Each time an event occurs, it may lead to a change in an image which the user is viewing. This image visualizes the current state of the program. As the program runs, the state changes, and so does the image. In other words, strictly speaking, what is visualized is not an algorithm but rather its data. From the changes in the image, the user is expected to infer the logic of the algorithm. This leads to another issue, which is that not all events can be visualized with equal ease. It may be easy to write a procedure that swaps two rectangles when two numbers in an array are exchanged, but more effort is needed when representing the act of inserting a key into a red-black tree. Because writing renderers can be difficult, systems like BALSA, Tango and AnimA provide facilities for re-using renderers from related algorithms.
An introduction to the animation of geometric algorithms
401
3. Geometry-oriented systems Designers of geometric algorithms face special challenges. While much of their discipline uses visual objects, computers deal with numbers and symbols. As a result, geometric objects in a computer program must be represented in a form which is difficult to translate back into images. Hence computational geometry can benefit from visualization. Another reason for visualizing geometric algorithms is its relative ease. As we saw in the previous section, the most laborious task in writing an animation is writing renderers that portray the program data as images. In the case of geometric algorithms, the program data contains positional information, and hence can be drawn on the computer screen without the need for translation. For these reasons, since about 1990 several systems have evolved that try to satisfy the needs of computational geometers. This section examines them.
3.1. Two-dimensional systems Workbench. By 1990, Epstein, Sack, and others had developed their Workbench for Computational Geometry, which is an environment for developing, implementing, and testing geometric algorithms. One of their goals was to measure the actual cost behavior of published algorithms. They were concerned that many published geometric algorithms had not been implemented, and that the costs of these algorithms were given only in asymptotic form. The authors wrote a library of abstract data types and of elementary (constant-cost) geometric operations. Using this library, they implemented several published geometric algorithms, which addressed the following two-dimensional problems: convex hull, polygon triangulation, visibility, point location and line segment intersection. Geometric algorithms often use complex data structures, whose performance impacts the algorithm's. Hence the authors implemented several search trees (binary, splay, AVL, and finger trees), and tested them independently. They also develop a method for generating random simple polygons. The workbench includes a facility for animation. Each algorithm has a corresponding animation module, which visualizes the events. Animation can affect timing measurements, because events are visualized as they happen, and the rendering time must be omitted from time cost calculations. Since timing is a major goal of the workbench, the authors use a flag to disable rendering as needed, incurring a small constant overhead. In this fashion the same code can be measured or animated. Figure 7 shows a screen dump from the workbench. XYZ Geobench. Peter Schorn's XYZ Geobench [29], created around 1990, provides tools for writing and testing geometric algorithms. It provides a library of geometric abstract data types. The Geobench emphasizes robust computation. For example, a poorly-implemented algorithm for segment intersections may not detect points where more than two segments coincide. To this end, the Geobench provides tools for creating degenerate data which is useful for torture-testing algorithms.
402
A. Hausner and D.R
# riig tm% m^m^mmh u%m% mmmxim
iiiifi«iott»
n
I fitem»int
mm
C""""M
Dobkin
"')
Fig. 7. A snapshot from the Workbench for Computational Geometry, showing a visibihty algorithm on a triangulated polygon.
Geobench is limited to two-dimensional problems, although it has some simple animation facilities. Basically, a programmer wishing to animate an algorithm must visualize the program events directly. This means that for each event, the programmer must write code which draws the geometric changes, pauses to let the user see them, then continues. Nevertheless, interesting animations are possible. Figure 8 shows a sweep-line algorithm for the Voronoi diagram in action.
3.2. Beyond two dimensions For both the Workbench and the Geobench, the emphasis is on the implementation of geometric algorithms, not on glossy renderings. Moreover, their algorithms are restricted to two-dimensional geometry. Two systems choose a different approach, concentrating on the presentation of geometry in three and higher dimensions. Geomview. Geomview [ 17J is a group effort from the Geometry Center of the University of Minnesota. The program is essentially a sophisticated viewer for geometric data. Users can interactively control the appearance of objects, by changing the lighting, shading and material properties of the surface. Phong shading leads to realistic-looking objects. Moreover, three- and four-dimensional objects can be viewed with perspective, orthogonal, hyperbolic and spherical projections.
An introduction to the animation of geometric m
FME! Edit
Objects
Point Slot
w
R B
flrithmeUc
Riimation
403
algorithms LUindoiLPs
OpticUuii^
Rrimfitinn
/r\ -O-..
-^-^
O
•
T^:^'*^
P t m f t ' M w A•w•wf•v•^^lmJ•^^m••••iml^^•••WA^^lm^
CursDH ( 1 6 4 . 0 0 0 0 0 0 , 4::'.O0O':'OO) Time used: 0.133 sees. Momory: 43SCM b y t y s usQd, 33:3'3636 bytas fngg Type: Ho rn og e n V e ct or( P oi nt (re B 1).. 15)
Fig. 8. A snapshot from Geobench, showing a sweepUne algorithm for the Voronoi diagram of points on the plane.
The appearance and display of geometric data can also be controlled through software. Geomview includes an interpreter for a lisp-like command language, through which a program can control all of the system's features. Objects displayed by Geomview can consist of polyhedra, quadrilaterals, meshes, vectors and Bezier patches. The description of an object can either be stored in files, or can be generated by a separate program which sends its output to Geomview through a pipe. Figure 9 shows Geomview in action. This latter feature makes it possible to animate geometric algorithms with Geomview. A programmer needs to modify a program to output descriptions of geometric objects in a Geomview format, and in this way use Geomview as means to visualize the program's behavior. This approach is also the way to animate an algorithm, since Geomview has no built-in methods for animation. An enthusiastic programmer can also use Geomview for interaction with a user, since Geomview can be configured to inform a program if a user selects a geometric object with the mouse. Geomview's versatility is shown in the wonderful movies [VR5], [VR6], [VR7] that have been made with its help. Of course, with all that versatility comes complexity: not only is Geomview a very large piece of software, but also users may take some time to learn its special features. GASP. GASP [37] aims to provide high-quality animations of geometric algorithms with minimal programmer effort. It tries to achieve the high-quality renderings of three-
404
A. Hausner and D.P. Dobkin
Fig. 9. Geomview in action, showing the approximate convex hull of points in convex position.
dimensional objects that Geomview provides, while minimizing the effort needed to create them. The spirit of GASP is to separate geometry from animation. To animate a geometric algorithm, a programmer inserts some function calls which tell GASP which geometric objects have been added or removed. This is usually easy to do, since the coordinates of the geometric objects are already known to the program. Based on the information passed through function calls, telling it of the changes in the scene, GASP then decides how to represent these changes. Changes in a GASP animation are grouped into atomic units. These correspond to transitions in TANGO. Within each atomic unit, there can be several changes to the data. For example, several facets of a polyhedron may be simultaneously removed during one atomic unit. In the spirit of TANGO, the changes are usually smooth. The changes to a scene can be represented in several ways. A new object can fade into place, blink as it appears, or move in from outside the scene. Conversely, removed objects fade out gradually, or move away. There are defaults for all the aspects of how the change is represented, including the type of change, the time it takes, the colors used, etc. These defaults are stored in simple text style files that the programmer can modify as necessary. This use of defaults means that novice programmers can produce simple animations without learning all the details of the system. The system includes a user interface that follows the model of a video tape recorder. The user can view the animation forwards or backwards, at normal or high speed. Advantages of GASP include its ability to represent 3D geometry, high production values and good color facilities. In particular, the range of colors that are attractive and easy to see on a computer monitor is not the same as the colors that are suitable for recording on video tapes. Bearing this difference in mind, the style files in GASP can be set to use colors most suitable for the output medium being used. Another good aspect of GASP is
An introduction to the animation of geometric
algorithms
405
Fig. 10. A snapshot from GASP, showing an object that cannot be taken apart with two hands using only translations.
that it frees the programmer from learning about computer graphics or rendering of threedimensional geometry. Programmers are free to concentrate on geometry. Figure 10 shows a scene from a GASP-generated animation, which was composed in just a few hours. Of course, GASP does have some limitations. The most obvious one is that it is mainly limited to geometry. This means that, if used to animate general algorithms, the programmer must be familiar with geometry. Another drawback lies in the rewind facility which is slow, although this difficulty arises from the implementation and not from a weakness in the design. It should be simple to remedy.
4. Visualizations In any field, skill in the use of tools is acquired not only by studying the tools themselves, but also by studying the products of other skilled workers. Whereas in the previous sections we considered the tools, ie systems which can be used to create animations of algorithms, in this section we focus on the products of these tools, the actual animations. This section will focus mainly on videos published in the Annual Video Review of Computational Geometry, which is the main vehicle for dissemination of techniques in the field. The field of algorithm animation is rich, and still growing. As they seek to explain algorithms, researchers borrow techniques from related disciplines such as scientific and mathematical visualization, and interactive environments. As a result, we find in these videos examples not only of algorithm animation [VRla,c,d,f,g,i,j,2b,c,d,e,h,3a,b,c,g,
406
A. Hausner and D.R Dobkin
4b,d], but also mathematical visualizations [VR3e,4e,4f] and interactive visualizations [VRle,2a,3f,h,4a,c]. In addition to the Video Review, we will also briefly discuss three films from the Geometry Center [VRS], [VR6], [VR7]. This section does not aim at a thorough review of all the videos extant, but rather seeks to present specific animation techniques which are used in some of them. These techniques (i.e. tricks used twice!) turn a video into more than simply "dancing data". Animations may depict how an algorithm processes its data, but they should also explain the reasons for particular actions. 4.1. Mathematical visualization Before considering animations of geometric algorithms, it may help to consider three movies produced at the Geometry Center of the University of Minnesota. They were all produced with Geomview, as well as other software. Not Knot [VR5] introduces the viewer to knot theory, by considering the complement of a knot. Visualizing the complement of the Borromean rings leads to a brief excursion into hyperbolic geometry. Outside In [VR6] visualizes the remarkable theorem which states that a sphere in three-space can be smoothly everted, in other words, turned inside out. The Shape of Space [VR7] visualizes toroidal space. It explains, in more detail, some concepts that were brought up in Not Knot. All three films show that a great deal of effort went into their production. They achieve the difficult task of explaining problems in topology to novices. The production costs of these films are relatively large. For example. Outside In took 2-3 person-years of programming effort, in addition to the time needed to develop general-purpose tools for geometric visualization. Once the tools were developed, production was easier. The last film. The Shape of Space was produced in only four months. Even with proper tools, the need to make the film accessible to novices required additional effort. If a concept taxes the audience's geometric imagination, then its explanation will in turn tax the film-maker's imagination. Figure 11 shows a montage from Outside In. A short video. Animating Proofs [VR4f] uses a couple of techniques to effectively illustrate Pythagoras' Theorem. The narrator reads the proof of the theorem from Euclid's Elements, and whenever a geometric object such as a line or point is mentioned, the corresponding graphical element is highlighted. Through this simple trick of timing, the burden of referring back and forth between proof and diagram is avoided. Another simple trick is used when two triangles are shown to have equal areas. One triangle is smoothly deformed into the other.
4.2. Demonstrations Several of the video segments [VRlb,lh,2f,3d] contain animations of algorithms, but are primarily intended to demonstrate the capabilities of an algorithm animation system. To enable the viewer to concentrate on the capabilities of the system, these demonstrations tend to animate well-known algorithms, e.g. Graham's scan. For this reason, they will not be considered here.
An introduction to the animation of geometric
algorithms
407
Fig. 11. A sphere is smoothly turned inside-out, from the film "Outside In".
4.3. Algorithm animations Optimal Two-Dimensional Triangulations [VRlc] shows a typical use of color. The video animates versions of an algorithm that computes optimal 2-d triangulations. Each triangle is colored according to some measure, such as maximum vertex angle. Optimal triangulations minimize that measure. As the algorithm runs and the triangulation is improved, its overall color approaches the optimal one (see Figure 12). Boolean Formulae for Simple Polygons [VRld] uses color and also multiple views to convey information. The algorithm computes the Boolean formula for a polygon: Given the half-planes determined by each edge of the polygon, the Boolean formula is the combination of OR's and AND's of these halfplanes that defines its interior. For a convex polygon, AND's suffice, but concave polygons require OR's as well. The animation uses multiple views, which simultaneously show the state of the algorithm in different ways. One view shows a tree of partially-satisfied polygons, and another shows the same tree in schematic form (see Figure 13). Through the schematic tree, the user sees at glance how certain types of polygons lead to very unbalanced trees. Another view shows, in text form, the Boolean formula as it is built, and finally there is a view that shows the edges of polygon being processed by algorithm. Each view corresponds to a way of abstracting the information being processed by the algorithm. Like the previous animation. The New Jersey Line-Segment-Saw Massacre [VRlj] uses multiple views to explain an algorithm, this time Chazelle and Edelsbrunner's optimal sweepline algorithm for general line-segment intersections. As the sweepline advances, a separate view shows the red-black tree holding partially-processed segments. The video
408
A. Hausner and D.P. Dobkin
Fig. 12. A still from "Optimal Two-Dimensional Triangulations". The polygonal outline of the USA is being triangulated. Lighter triangles have larger minimum angles.
Fig. 13. A still from "Boolean Formulae for Simple Polygons"
An introduction to the animation of geometric
algorithms
409
Fig. 14. A still from "The New Jersey Line-Segment-Saw Massacre"
is difficult to understand, mostly because the algorithm itself is very complicated. Perhaps many more views would have shown in detail what was going on, but the authors may have feared overloading the viewer's ability to keep track of too many simultaneous changes. The time limitations of the video also preclude the necessary drawn-out explanation. Figure 14 shows a still from the video. Building and Using Polyhedral Hierarchies [VR2b] shows that often multiple views are not needed. It shows a polyhedron being simplified as certain vertices and their incident edges are removed (see Figure 15). Implicitly, a hierarchy of simpler polygons is built, although the viewer does not need a visualization of it to understand it. The video also shows the use of color to encode time information: each changed polygon facet is drawn in a new color, and this trick allows the viewer to see the algorithm's history at a glance. In theory, the systems described above can be used to visualize a new idea, with the visualization appearing simultaneously with the research paper that presents the new concept. In practice, however, most algorithm animations describe ideas which are already well-known. Objects that Cannot be Taken Apart With Two Hands [VR2h] (see Figure 10) is remarkable for appearing at the same time as the discovery it explains. An Animation of a Fixed-Radius All-Nearest Neighbors Algorithm [VR3c] is an excellent video. The algorithm described here solves the following problem: Given a set of points and a distance 5, find groups of points where each member of the group is within 5 of the others. The algorithm uses a scan line to partition points into an adaptive grid, made up of horizontal and vertical slabs of width ^ 5. Occupied grid entries are identified by labelling each point with its grid coordinates, and then sorting the list of labels. Points with the same
A. Hausner and D.P. Dobkin
410
Fig. 15. A still from "Building and Using Polyhedral Hierarchies".
label lie in the same non-empty grid square. Finally, these grid entries are scanned for pairs of points within 5 of each other, and these pairs are reported. The animation is skillfully made. The narration is well-synchronized with the video. For example, labels appear just after they are mentioned. Skill is also evident in the use of multiple views. One view shows the search tree which stores point labels. The sorted list of labels corresponds to bottom level of the tree. The animation first shows this list, then fades in the search tree on top of it (Figure 16). This approach is preferable to showing the insertion of each label, which leads to much confusing extraneous activity. The video closes with a three-dimensional application of the algorithm: finding an isosurface of a molecule. This section is harder to follow, perhaps because elements are not labelled, forcing the viewer to remember the identity of each element.
4.4. Interactive visualizations This section examines a class of systems which are better classified as interactive visualizations than as algorithm animations. The videos selected here demonstrate interactive systems which illustrate an algorithm through its results. By contrast, most algorithm animations show the viewer an algorithm's behavior. With an interactive visualization, the user can change some graphical data interactively, and immediately see the resulting structure produced by the (usually geometric) algorithm under consideration. Visualizing Fortune's Sweepline Algorithm for Planar Voronoi Diagrams [VR2a] does animate that algorithm for building a Voronoi diagram, but primarily it showcases an in-
An introduction to the animation of geometric algorithms
411
r i g . Lu. t\ sun iiuiii ^\n /-viiiiiiciuuii ui u l lAcu-Jxctuius i^ii-i>caicsL i>cigiiuuij> i^iguiiLiini
teractive tool for exploring the properties of Voronoi diagrams. Given a set of points in the plane, the user can turn several structures on and off. These structures are the points themselves, their Voronoi diagram, Delaunay triangulation, or convex hull. The user can also add an arbitrary paraboloid of revolution, project points onto it, add tangent planes, and verify that the paraboloid's lower hull indeed corresponds to the Voronoi diagram. Since this is a video tape, the viewer can't control the system, but must watch a recording of the author's interaction with the system. Nevertheless, the video shows the advantage of giving the user the ability to turn aspects of a visualization on and off. Figure 17 shows Fortune's algorithm in action. Exact Collision Detection for Interactive Environments [VR3f] presents a real-time system that detects collisions between polyhedral objects. If two features like a vertex and an edge are close together, the system displays a line between them, indicating that those two features are being tested for collision. To the user, this produces the illusion of elastic filaments joining adjacent features on neighbouring objects. The video then demonstrates the use of bounding volumes. Two objects are tested for collision only if their bounding volumes intersect. The effectiveness of this acceleration technique is immediately apparent, since the filaments appear only when bounding volumes meet, and their number is greatly reduced (Figure 18). We can see the effect of an algorithmic technique even though we are only shown the product of the algorithm.
412
A. Hausner and D.R
Dobkin
Fig. 17. A still from "Visualizing Fortune's Sweepline Algorithm for Planar Voronoi Diagrams". We can see the sweepline, the parabolic fronts, and the partially constructed Voronoi Diagram.
Fig. 18. A still from "Exact Collision Detection for Interactive Environments". Look carefully, and you will see that only objects whose bounding boxes overlap (the cube and the fingers) trigger distance calculations (the lines from the fingers to the cube face).
An introduction to the animation of geometric algorithms
413
5. Design issues relevant to algorithm animation systems In this section, we consider some issues that must be considered by someone designing a system for algorithm animation. Each of the considerations below affects three classes of people: first, there is the designer of the system itself, second, the programmer who uses the system to create an animation of an algorithm, and finally the user who interacts with the animation (in some cases, one person may fall into more than one category). The design decisions considered in this section affect the facilities available to each type of person, as well as the effort that each one must expend. 5.1. Scope One aspect that must be considered is the range of animations that can be created. These can range from special-purpose to general, and can be: • Single-purpose: Hand-crafted code that illustrates one algorithm or a group of algorithms in detail (examples: [2], [VR2a]). • Specialized: A system that specializes in algorithms from a field of computer science, such as computational geometry (examples: [28,37]). • General-purpose: Systems that can, in principle, animate any algorithm (example: [8]). Obviously, the greater the number of algorithms that can be animated, the more desirable the result. However, with increased flexibility comes increased complexity. A generalpurpose system will often require much more work from the programmer than a specialized system. This occurs because of the gap between abstraction and representation. When an abstract concept such as an algorithm is visualized, methods are needed to convert internal objects into pictures. If the algorithm is restricted to a field where a given data type is used often, then a visualization for them needs to be written only once. On the other hand, a general-purpose animation system must be able to handle all data types, and this gives the implementer of the system two alternatives: 1. Provide the programmer with all possible visualizations 2. Provide tools for building visualizations. The former is of course impossible, while the latter burdens the programmer who would rather concentrate on other things. A good general-purpose system tries to compromise by providing a large set of ready-made pieces of visualizations, together with general tools. Systems that restrict themselves to animating only algorithms in a field like computational geometry, will not be able to represent many other algorithms in other fields easily, but on the other hand will be able to provide an advantage, because the system developer can devote a great deal of effort can be devoted to make pleasing, informative visualizations of frequently-used objects. This makes the programmer's task much easier.
5.2. Author and audience The amount of effort needed to craft an animation, as well as the type of system used, is also affected by the relationship between author and audience. The author will necessarily be a
414
A. Hausner and D.P. Dobkin
programmer, while the audience may or may not. Authors can fall into several categories: 1. A researcher in a field, who wishes to explain his/her new algorithm to colleagues in the field, perhaps at a research conference, and finds a printed description inadequate [37]. 2. A teacher, who must create an animation to explain some fundamental algorithm to students, who in turn will be seeing the algorithm for the first time [8,30]. 3. A programmer, whose debugging needs exceed the capabilities of the usual debugging tools, and wants a visual trace of his/her program's flow of control. Corresponding to these categories, the audience will consist of: 1. A researcher at a conference, who wishes to learn about a colleague's new approach, or needs further understanding of a printed journal article [37]. 2. A student learning an algorithm for the first time [7,30]. 3. A programmer, examining the animation he/she just created. Each situation demands a different kind of animation system, and it is difficult to build a system that satisfies them all. Here are some reasons: If making animations is difficult, then a researcher will probably lack the time to create one, given that he/she must already do the research and also prepare a written description. Thus he/she will likely prefer a simple animation system which can be learned and used with as Httle effort as possible. A teacher will need the flexibility of a general-purpose system, because he/she is communicating with an audience that is unfamiliar with the algorithm being animated. The student learning the algorithm will not be able to ignore irrelevant details, and keeping the animation clear and simple can often require a great deal of work on the programmer's part! For example, one insertion into a balanced tree can lead to a great deal of re-arrangement of the tree, which can confuse an inexperienced viewer. Hence the animation of the tree insertion must be carefully prepared to minimize distracting and irrelevant movement [32]. Thus, a teacher will probably be willing to tolerate a greater deal of learning and programming effort, in exchange for a clearer animation. A programmer developing a large piece of software will, most likely, use animation tools for debugging. Hence he/she will want to change his original program as little as possible. It is not clear if non-intrusive animation of a general program is easy (or even possible). Nevertheless, there are systems that can help to visualize the flow of control within a program in an over-all, module-by-module fashion [16,22].
5.3. Expressiveness A useful system should have as many facilities as possible for expressing the idea behind an animation. Whether these facilities are used effectively or abused depends, of course, on the programmer's discretion. A good system should give the expert programmer control of: • Color. • Sound [10].
An introduction to the animation of geometric algorithms
415
• Time. In some systems [37,30], the programmer can describe the way transitions in the algorithm are presented: they may be sudden or gradual. • Three dimensionality. Most animation systems represent algorithms in a two-dimensional way. The third dimension can be used in many ways, such as [35] - to represent an extra dimension in the data, such as the size of data items or some other attribute of the data, - to illustrate the passage of time, or the algorithm's progress [19], - for aesthetic effect (as in the "USA-Today" graphs), - to represent objects which are inherently three-dimensional [37]. It would seem obvious that more cues available to the reader would translate into greater understanding. However, too much color and sound can also be distracting. Here we must follow Tufte's [38] principle, which is that a graphic's excellence is a measure of its information density. By this he means that a good graph will contain only elements that communicate information, and no extraneous ones. By this principle, the overuse of threedimensionality for two-dimensional objects should be avoided. If the designer of the animation system makes an effort to choose defaults that are clear, attractive and minimize visual clutter, then the novice will be more likely to obtain good results with ease.
5.4. User interaction Algorithm animation is different from ordinary animation, in that the final product is not simply a film which the user watches passively. Because an algorithm has inputs, its animation can be different each time the algorithm runs. Ideally, the final user should be able to interact with an animation. Degrees of interactivity can range along the following scale: 1. None: The system produces stills, [3] or a movie which the viewer must watch passively [2]. 2. Some: The user can stop and start the animation, or change its speed. Most systems support this level of interaction. 3. More: The user can choose the input data for the algorithm being animated [8]. 4. More: The user can pan and zoom to see different parts of the display [8,30]. 5. Fair: The user can rewind the animation, and replay parts which were not understood on previous runs [37]. 6. Good: The user choose data while the algorithm is running, such as selecting a starting node for an all-points shortest path algorithm [7]. 7. Excellent: The user can change the data while the algorithm runs, for example by dragging a data point to a different location and watching the effect of this change [VR2a]. The possibility of this last feature raises many interesting questions. Clearly, the amount of interactivity is related to the type of algorithm being animated, as much as it is to the system being used. Some algorithms are batch-oriented, and it may not be possible or meaningful to change the data they are working on. For example, many sorting algorithms will not work properly if an array element is moved to a different position while the sort is in progress.
416
A. Hausner and D.P. Dobkin
6. Techniques In this section, we present some animation techniques. They could either be built into an animation system, or used by a programmer who is creating an animation. Some of the techniques are applicable to animation in general, while others apply to the visualization and animation of three-dimensional geometry.
6.1. Abstraction There are times when the amount of data produced by a program overwhelms the user. When this happens, an animation confuses more than it educates. If the algorithm is complex, and uses several different data structures and sub-algorithms, the user may get lost in the details and not see the over-all picture. In such cases, the programmer should condense complicated parts of the scene into simpler items, like boxes. This is the approach taken in several videos we have reviewed. Time can also be abstracted, if several phases of an algorithm are omitted and only the final result of several program steps is presented. An ideal system should include facilities that help the programmer implement this sort of abstraction. Ideally, all the detail should be accessible to the user if he/she needs to see it. This is called semantic zooming. Sometimes, of course, it may be desirable to present the viewer with large amounts of information. This occurs when several sorts are simultaneously compared in [2]. Although the screen is filled with information, the means of presentation lets the user's visual system grasp the difference both in running time and behavior of the sorting algorithms. This scene confirms Tufte's [38] principle of high information density.
6.2. A few animation techniques In this section, we draw attention to some methods used to convey meaning in animation. Relatedness: Sometimes it is necessary to associate two or more objects in the user's mind. For example, in a set of points a subset of points may be special in some way. Points may be grouped by: • • • •
displaying them all in the same color, or using the same icon (such as a small triangle) to represent all of them, or using icons of the same size to represent all of them, or connecting them with arcs. This last approach should be avoided if there are many points, to avoid clutter.
Multiple views help the user understand an algorithm's progress, but they can spht the user's attention. Many animation systems feature multiple views. This means that several renderings of the algorithm's state are presented on the same screen. For example, one view may present a picture of a collection of line segments and the sweep-line that marks
An introduction to the animation of geometric algorithms
417
the search for their intersections, while another view may be the search tree that stores the endpoints currently under consideration. As the algorithm runs, both views change. In order to help the user keep track of corresponding elements in the two views, the programmer should associate the elements somehow. This can be done with color, or icons as in the previous paragraph. In some cases, it may be possible to keep one coordinate of corresponding elements the same. In the case of the sweep-line algorithm, this can be done by drawing the search tree on its side: since it is ordered by y coordinate, its nodes can have the same y as the points they store. If the animation is recorded on a fixed medium and has a narrated soundtrack, the actions being described should occur immediately after they are narrated. State: When animating geometric algorithms, it may be necessary to convey more than just the geometric changes. Often program objects have state, which changes as the algorithm runs, and there is a need to convey these changes of state. For example, in Dijkstra's shortest-path algorithm, a node can be one of two states, corresponding to whether or not its distance from the source has been determined. The state of an object can be denoted by color, although this method may require an explanation by the narrator. If the objects are points, they may be represented by icons which change as the state changes. Color: Color is versatile tool. It can be used to match related elements, as described above, but its continuous nature can also be used to represent gradual changes. Gradual change can be time, and time usually represents the algorithm's progress. We can convey history with color. If the color used for drawing is changed at each major step in an algorithm, the color of an object will encode the time it was created. Color can also be used to represent direction in two dimensions. This follows naturally from the Hue component in the HLS color model. If the Saturation is held constant, the fact that two degrees of freedom remain in an RGB triplet means that color can also encode directions in tree dimensions. Color can indicate a numerical values associated with objects. Here, a range of values can be represented by holding the hue constant and varying the saturation, or by varying the hue. In this context, hue variations are more effective when large collections of small objects are portrayed.
6.3. Problems specific to 3D Why is 3D visualization different from 2D? The fundamental difference is that we live inside a three-dimensional world, whereas we can stand completely outside any twodimensional world, such as the world on a sheet of paper. This ability to "step outside" the region of interest is often lost in 3D geometric visualization. Here are some solutions that may be used in crafting 3D geometric animations: Rotation: If you can't see the whole object at once, then turn it continuously so that the viewer can eventually see most of it. Rotation has the side effect of preserving the illusion
418
A. Hausner and D.R Dobkin
that the objects on the flat screen are actually three-dimensional objects viewed through a transparent window. Without continuous rotation, the viewer can lose this sense, and start perceiving polyhedra as strangely-shaped collections of flat polygons. Of course, rotation must not be used carelessly: • Axis: When objects are rotated to make all sides visible, they should not be tumbled at random, changing the axis of rotation frequently. In fact, it is better to change the angle of rotation as little as possible, or not at all, simply rotating the object about, say, the vertical axis. Of course, this restriction goes against the desire to show as much of the object as possible, but is needed to keep the viewer from losing track of where things are. • Discontinuity: Sometimes videos are prepared in several sessions, each of which may correspond to a different phase of the algorithm or to an idea that must be conmiunicated. The animators may pause for a coffee break, and continue their video recording session later. Whatever the reason, if the same scene is being displayed in separate sessions, and the scene is rotating continuously, there may be a sudden jump in the scene's orientation at the point where the animators paused their recording session. To avoid this disorienting break in continuity, the system should save the orientation and rotation speed of the scene each time there is a pause. • Speed: The rotation speed should be chosen carefully: It should be related to to the rate at which the object is changing. If a rapidly-rotating object is experiencing a lot of change with wach program event, the user may feel that there is not enough time to see all the changes. • Goal-oriented: For algorithms such as 3D quick-hull, which act on an opaque object first on one side of it, then somewhere else, it may be impossible to predict in what order the actions will occur. Hence rotation at a fixed rate about a fixed axis may cause many events to occur on the side of the object which the user can't see. In these cases, it can be useful to turn the object as each action occurs, in order to keep the locus of activity facing the user's viewpoint. Transparency: Another way to see more of a 3D object is to make it transparent or translucent (partially transparent). This allows the user to see inside the object, and it can useful if the algorithm deals with nested polyhedra. This approach must be used with care, otherwise there may simply be too much for the user to see. It is better to make selected portions of an object transparent, rather than forcing the user to understand the whole thing at once. Used in this way, transparency is a means to draw the viewer's attention to an important piece of the animation. Navigation: Sometimes the user may need to immerse him/herself in a geometric scene and navigate through it. In such cases, one must make it easy to explore the environment, while keeping the user from getting lost in it. This is a problem faced not just in geometric algorithm animation, but also visualization in general and in virtual reality. Some facilities that can aid the user include: • Local transparency: the user should be able to see through nearby objects, to see the next place he/she wants to go.
An introduction to the animation of geometric algorithms
419
• Local level of detail: since distant objects are small, they need not be rendered in detail. In fact, performance may be improved by not rendering objects beyond a certain distance at all. • Gravity: to prevent disorientation, it is best to keep the user's orientation relatively fixed. If the user looks up or down, there should be an option to return to the standard orientation. Exploration of objects: Very complicated three-dimensional objects may be best understood if the user can interact with them and look at their insides. An ideal interface will allow the user to look inside an object by cutting it open by slicing it along a selected plane or breaking it apart at "natural" boundaries and then separating the pieces to examine them separately.
7. Conclusion We have tried to convey the state of geometric algorithm animation, to inform the prospective algorithm designer the options available, whether he/she is designing a new system or using an existing one to create animations. As mentioned in the introduction, there are some algorithms that are more difficult to animate than others. It may be wise to warn the reader that, in fact, even well-crafted algorithm animations by themselves may not help some people understand an algorithm. Stasko and others have tried to experimentally asses the effectiveness of algorithm animation for instruction. One report [34] describes an experiment where a group of computerscience graduate students were taught a new algorithm in two ways: one group read a research paper describing the algorithm, and the other divided its time between reading the paper and interacting with an animation of the algorithm. All the students were tested on their understanding of the algorithm. Although the group of students exposed to the animation performed better, the difference was very slight, and several of the subjects complained that they needed more explanations of what was happening. Moreover, some in the second group complained that they "knew" how the algorithm worked, but when pressed couldn't explain it. Other studies [23] reported that students exposed to animations retained less understanding after a week's time had elapsed. Some of the most effective animations discussed in Section 4 are those that combine text and images. For example, An Animation of a Fixed-Radius All-Nearest Neighbors Algorithm [VR3c] uses both these modes of expression very effectively. In fact, the second part of this video has no text, and (not coincidentally) is harder to understand. Perhaps the lesson to be learned here is that thinking in images involves a different part of human consciousness from understanding mathematical symbols. A necessary component when presenting abstract ideas remains the use of text. The ideal algorithm explanation may be some sort of interactive combination of text, sound, speech and animation. In other words, a hypertext multimedia system.
420
A. Hausner and D.P. Dobkin
The future The development of HTML has made the world computer web accessible to people with little technical expertise. However, the amount of interactivity on the web is limited because users can only request prepared data, be it as images, animation or text. The interactivity needed for geometric algorithm animation, together with the need for hypertext explanation of the algorithms, may be supplied by carefully crafted animations in Java or some other web-based programming language. The possibility of linking text and animations together presents challenges to animators, programmers and hardware designers. Animators need to conceive new ways of allowing the user to interact not just with the stream of moving pictures, but more importantly with the objects that the pictures portray. Software designers must also be involved in this task. On the hardware side, the demand to download or generate real-time video places large demands on network bandwidth and CPU processing power. An ideal algorithm animation will allow the user to run a program, choose "interesting" data, change the data interactively, and ask about the program's objects and behavior. Existing animation systems present users with a choice of algorithms and data, but do not allow a great deal of interaction or questioning. Real-time interaction requires a great deal of computing power. The user should be able to change the data with some interactive device, and sees the effects of the change "immediately". Of course, nothing is instantaneous, but the illusion of instant response can be provided if the algorithm is run on the changed data at video rates, or 60 times per second. If there is a lot of data, the algorithm will not be able to keep up with the user's changes. As computers improve and get faster, larger data sets and more interesting animations will be accessible to real-time interaction. A user's question may lead to running a related algorithm for comparison, or a component of a larger algorithm. How will the newly-requested algorithm be made available? If it is explained by a prepared animation, large amounts of disk space and communication bandwidth will be required. On the other hand, generating it in real time will place heavy burdens on the CPU. This is especially true if the animation is coded in an interpreted language such as Java. As both hardware and software improve, new animations will become possible. The future has always been difficult to predict, but we can say with confidence that geometric algorithm animation has good prospects.
References [1] R.V. Amorin and P.J. Rezende, Compreensdo de algoritmos atraves de ambientes dedicados a anima cdo, in Portuguese, English title: Algorithm understanding through dedicated animation environments. Technical Report DCC-25/93, State University of Campinas, Brazil (1993). [2] R.M. Baecker, Sorting out sorting (video), Siggraph Video Review 7 (1981). [3] J.L. Bentley and B.W. Kemighan, A system for algorithm animation, Comput. Systems 4 (1) (1991), 5-31. [4] J.L. Bentley and B.W. Kemighan, A system for algorithm animation: Tutorial and user manual. Technical Report 132, AT&T Bell Labs (1991).
An introduction to the animation of geometric algorithms
421
[5] M.H. Brown and R. Sedgewick, A system for algorithm animation, ACM Comput. Graphics 18 (3) (1984), 177-186. [6] M.H. Brown and R. Sedgewick, Techniques for algorithm animation, IEEE Comput. (1985), 28-39. [7] M.H. Brown, Exploring algorithms using Balsa-II, IEEE Comput. (1998), 14-36. [8] M.H. Brown, Algorithm Animation, PhD thesis, Brown University (1988). [9] M.H. Brown, Zeus: A system for algorithm animation and multi-view editing. Proceedings, 1991 IEEE Workshop on Visual Languages, 4-9. [10] M.H. Brown, Color and sound in algorithm animation. Proceedings, 1991 IEEE Workshop on Visual Languages, 10-17. [11] M.H. Brown and M.A. Najork, Algorithm animation using 3D interactive graphics. Technical Report 110a, DEC Systems Research Center (1993). [12] M.H. Brown and M.A. Najork, A library for visualizing combinatorial structures. Technical Report 128a, DEC Systems Research Center (1994). [13] C.J. DiGiano, Visualizing program behavior using non-speech audio, M.S. thesis. University of Toronto (1992). [14] R.A. Duisberg, Animated graphical interfaces, ACM SIG CHI 86 Conference on Human Factors in Computing Systems, 131-136. [15] P. Epstein, J. Kavanagh, A. Knight, J. May, T. Nguyen and J.-R. Sack, A workbench for computational geometry, Algorithmica 11 (1994), 404^28. [16] G. Fowler, D. Kom, E. Koutsofios, S. North and K-P. Vo, Libraries and File System Architecture; Intertool Connections, Practical Reusable Unix Software, Wiley (1995). [17] h t t p : //www. geom.umn. e d u / s o f t w a r e / d o w n l o a d / g e o m v i e w . h t m l [18] E. Helttula, A. Hyrskykari and K.-J. Raiha, Graphical specification of algorithm animations with ALADINN, Hawaii International Conference on System Sciences 22, Vol. 2, 892-901. [19] K. Konstantinides, Algorithm visualization using tree graphs. The Visual Comput. 7 (1991), 220-228. [20] R.L. London and R.A. Duisberg, Animating programs using Smalltalk, IEEE Comput. (1985), 61-71. [21] B.A. Myers, Visual programming, programming by example and program visualization: A taxonomy, ACM SIG CHI 86, Proceedings, Conference on Human Factors in Computing Systems, 59-66. [22] S.C. North and E. Koutsofios, Applications of graph visualization, Graphics Interface '94, 235-245. [23] S. Palmiteer and J. Elkerton, An evaluation of animated demonstrations for learning computer-based tasks. Proceedings of the ACM SIGCHI '91 Conference on Human Factors in Computing Systems, 257-263. [24] M. Petre and B.A. Price, Why computer interfaces are not like paintings: The user as a deliberate reader. Proceedings of East-West HCI 92: The St. Petersburg International Conference on Human-Computer Interaction, Vol. I, 217-224. [25] B.A. Price, A framework for the automatic animation of concurrent programs, M.S thesis, University of Toronto (1990). [26] B.A. Price, I.S. Small and R.M. Baecker, A taxonomy of software visualization. Proceedings of the 25th Hawaii International Conference on System Sciences, Vol. II, 597-606. [27] B.A. Price, R.M. Baecker and I.S. Small, A principled taxonomy of software visualization, J. Visual Languages and Comput. 4 (3) (1993). [28] P.J. Rezende and W.R. Jacometti, Geolab: An environment for development of algorithms in computational geometry. Technical Report DCC-26/93, State University of Campinas, Brazil (1993). [29] P. Schorn, The XYZ GeoBenchfor the experimental evaluation of geometric algorithms. Computational Support for Discrete Mathematics: DIMACS Workshop (March 1992), 137-152. [30] J.T. Stasko, Tango: A framework and system for algorithm animation, IEEE Comput. (September 1990), 27-39. [31] J.T. Stasko, The path-transition paradigm: A practical methodology for adding animation to program interfaces, J. Visual Languages and Comput. 1 (1990), 213-236. [32] J.T. Stasko, Three-dimensional computation visualization. Technical Report GIT-GVU-92-20, Georgia Institute of Technology, Atlanta, GA (1992). [33] h t t p : / / w w w . c c . g a t e c h . e d u / s t a s k o / c g i - b i n / a n i m a t i o n
422
A. Hausner and D.P. Dobkin
[34] J.T. Stasko, A. Badre and C. Lewis, Do algorithm animations assist learning? An empirical study and analysis, INTERCHI '93 Proceedings, Conference on Human Factors in Computing Systems (April 1993), 61-66. [35] J.T. Stasko and C.R. Turner, Tidy animations of tree algorithms, Technical Report GIT-GVU-92-11, Georgia Institute of Technology, Atlanta, GA (1992). [36] A.Y. Tal, Animation and visualization of geometric algorithms, PhD thesis, Princeton University (1995). [37] A.Y. Tal and D.P. Dobkin, Visualization of geometric algorithms, IEEE Trans. Visualization and Comput. Graphics (TVCG) 1(2). [38] Tufte, Edward R., The Visual Display of Quantitative Information, Cheshire, Conn, Graphics Press (1983). [39] G. Whale, DRUIDS: Tools for understanding data structures and algorithms, 1994 IEEE First International Conference on Multi-Media Engineering Education: Proceedings (1994), 403-407.
Videos [VRl] Animation of Geometric Algorithms: A Video Review, Marc H. Brown and John Hershberger, eds. Digital Equipment Corporation's Systems Research Center (DEC SRC) (1992). This video tape contains the following animations: [VRla] Simon Kahan, Real-Time Closest Pairs of Moving Points. [VRlb] Peter Schom, Adrian Briingger and Michele De Lorenzi, The XYZ GeoBench: Animation of Geometric Algorithms. [VRlc] Herbert Edelsbrunner and Roman Waupotitsch, Optimal Two-Dimensional Triangulations. [VRld] John Hershberger and Marc H. Brown, Boolean Formulae for Simple Polygons. [VRle] Chandrajit L. Bajaj, SHASTRA: A Distributed and Collaborative Design Environment. [VRlf] Leonidas Pahos and Mark Phillips, Tetrahedral Break-Up. [VRlg] Joseph Friedman, Compliant Motion in a Simple Polygon. [VRlh] P. Epstein, J. Kavanagh, A. Knight, J. May, T. Nguyen and J.-R. Sack, Workbench for Computational Geometry. [VRli] Marc H. Brown and Harald Rosenberger, Topologicals Sweeping an Arrangement: A Parallel Implementation. [VRlj] Ayellet Tal, Bernard Chazelle and David Dobkin, The New Jersey Line-Segment-Saw Massacre.
[VR2] The Second Annual Video Review of Computational Geometry, Marc H. Brown and John Hershberger, eds, DEC SRC (1993). This video tape contains the following animations: [VR2a] [VR2b] [VR2c] [VR2d] [VR2e] [VR2f] [VR2g]
Seth Teller, Visualizing Fortune's Sweepline Algorithm for Planar Voronoi Diagrams. David Dobkin and Ayellet Tal, Building and Using Polyhedral Hierarchies. Stefan Schirra, Moving a Disc between Polygons. John Hershberger, Compliant Motion in a Simple Polygon. Estarose Wolfson and Micha Sharir, Implementation of a Motion Planning System in Three Dimensions. P.J. de Rezende and W.R. Jacometti, Animation of Geometric Algorithms using GeoLab. Michael Murphy and Steven S. Skiena, Ranger: A Tool for Nearest Neighbor Search in High Dimensions. [VR2h] Jack Snoeyink, Objects That Cannot Be Taken Apart With Two Hands.
An introduction to the animation of geometric algorithms
423
[VR3] The Third Annual Video Review of Computational Geometry, Marc H. Brown and John Hershberger, eds, DEC SRC (1994). This video tape contains the following animations: [VR3a] John Hershberger and Jack Snoeyink, An 0(n log n) Implementation of the Douglas-Peucker Algorithm for Line Simplification. [VR3b] David Dobkin and Dimitrios Gunopulos, Computing the Rectangle Discrepancy. [VR3c] Hans-Peter Lenhof and Michiel Smid, An Animation of a Fixed-Radius All-Nearest Neighbors Algorithm. [VR3d] Ayellet Tal and David R Dobkin, GASP-A System to Facilitate Animating Geometric Algorithms. [VR3e] Adrian Mariano and Linus Upson, Penumbral Shadows. [VR3f] J.D. Cohen, M.C. Lin, D. Manocha and M.K. Ponamgi, Exact Collision Detection for Interactive Environments. [VR3g] Herve Bronnimann, Almost Optimal Polyhedral Separators. [VR3h] A. Varshney, F.P. Brooks, Jr. and W.V. Wright, Interactive Visualization of Weighted Three-dimensional a-Hulls.
[VR4] The Fourth Annual Video Review of Computational Geometry, David Dobkin, eds. Association for Computing Machinery (ACM) (1995). This video tape contains the following animations: [VR4a] Leo Loskowitz and Elisha Sacks, HIPAIR: Interactive Mechanism Analysis and Design Using Configuration Space. [VR4b] Bernard Geiger, 3-D Modeling Using the Delaunay Triangulation. [VR4c] Mahav K. Ponamgi, Ming C. Lin and Dinesh Manocha, Incremental Collision Detection for Polygonal Models. [VR4d] B. Chazelle, D. Dobkin, H. Shouraboura and A. Tal, Convex Surface Decomposition. [VR4e] Fredo Durand and Claude Puech, The Visibility Complex Made Visibly Simple. [VR4f] Steve Glassman and Greg Nelson, An Animation of Euclid's Proposition 47: The Pythagoras Theorem.
Videos from the Geometry
Center
[VR5] David Epstein, CharUe Gunn et al., Not-Knot, distributed by A.K. Peters, Wellesley, MA (1991). [VR6] Silvio Levy, Delle Maxwell and Tamara Munzner, Outside In, distributed by A.K. Peters, Wellesley, MA (1994). [VR7] Stuart Levy, Tamara Munzner, Lori Thomson et al.. The Shape of Space. (To be released.)
This Page Intentionally Left Blank
CHAPTER 9
Spanning Trees and Spanners David Eppstein* Department of Information and Computer Science, University of California, Irvine, CA 92697-3425
Contents 1. Introduction 2. Trees 2.1. Minimum weight spanning trees 2.2. Maximum weight spanning trees 2.3. Low-degree spanning trees 2.4. /r-point spanning trees 2.5. Minimum diameter spanning trees 2.6. Minimum dilation spanning trees 3. Planar graphs 3.1. Minimum weight triangulation 3.2. Low-dilation planar graphs 3.3. Planar dilation and weight 4. General graphs 4.1. Dilation only 4.2. Dilation and weight 4.3. Dilation, weight, and degree References
427 427 428 437 439 440 442 444 444 445 448 451 452 452 453 455 456
* Supported in part by NSF grant CCR-9258355 and by matching funds from Xerox Corp. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved 425
This Page Intentionally Left Blank
Spanning trees and spanners
All
1. Introduction This survey covers topics in geometric network design theory. The problem is easy to state: connect a collection oin sites by a "good" network. For instance, one may wish to connect components of a VLSI circuit by networks of wires, in a way that uses little surface area on the chip, draws little power, and propagates signals quickly. Similar problems come up in other applications such as telecommunications, road network design, and medical imaging [1]. One network design problem, the Traveling Salesman problem, is sufficiently important to have whole books devoted to it [94]. Problems involving some form of geometric minimum or maximum spanning tree also arise in the solution of other geometric problems such as clustering [16], mesh generation [66], and robot motion planning [109]. One can vary the network design problem in many ways. The space from which the sites are drawn is often the Euclidean plane, but other metrics and higher dimensions are possible. One may wish to construct networks of varying classes such as trees, planar graphs, or general graphs. One may restrict the vertices of the network to be at the given sites or instead allow additional Steiner points. One may measure the quality of a network in different ways; typical quality measures include the weight (total length of all edges in a network), diameter (longest network distance between two sites), and dilation (largest ratio of network distance to Euclidean distance). The problem may be static, or various types of dynamic changes to the collection of sites may be possible. Geometric network design problems can generally be solved by translation to a graph problem: simply form a complete geometric graph in which each pair of sites is connected by an edge with length equal to the distance between the pair. We are interested here in solutions which depend intrinsically on the geometry of the problem, and don't immediately reduce a geometric problem to a graph problem. This survey is organized from the specific to the general: we first describe algorithms for finding trees of various types, then algorithms for finding planar graphs, and finally we describe algorithms for finding graphs without restriction to a specific class. Within a class of graphs we organize the topics by the criteria used to measure the quality of a given graph. We only describe problems of designing networks with vertices limited to the initial sites; Steiner tree and Steiner triangulation problems have been extensively surveyed elsewhere [23,25,57].
2. Trees Much of the research on geometric network design problems has involved problems in which the network to be designed is a tree. Such problems include the minimum spanning tree, maximum spanning tree, minimum diameter spanning tree, bounded degree spanning trees (such as the traveling salesman path), and the ^-point minimum spanning tree. VLSI design theory is responsible for several more specialized geometric spanning tree problems, which we do not discuss in detail: Steiner min-max spanning trees [43], minimum skew spanning trees (for routing clock signals) [83,84,127], and minimum area routing of interdigitated power and ground networks [80]. For more discussion of these and other geometric VLSI problems, see Sherwani [123]. Much of the work on these problems
428
D. Eppstein
Fig. 1. The lune of two points, their diameter circle, and a 60° wedge.
provides only heuristics for their solution, so there may be room for more work on exact algorithms. 2.1. Minimum weight spanning trees The most basic and well-studied network design problem is that of finding minimum spanning trees: connect the sites into a tree with minimum total weight. Many graph minimum spanning tree algorithms have been published, with the best taking linear time in either a randomized expected case model [85] or with the assumption of integer edge weights [72]. For deterministic comparison-based algorithms, slightly superlinear bounds are known [73]. Therefore, by constructing a complete geometric graph, one can find a geometric minimum spanning tree in time 0{n^), in any metric space for which distances can be computed quickly. Faster algorithms for most geometric minimum spanning tree problems are based on a simple idea: quickly find a sparse subgraph of the complete geometric graph, that is guaranteed to contain all minimum spanning tree edges. The details of this approach vary depending on the specific problem; for planar problems the Delaunay triangulation is the appropriate graph to use, while for higher dimensional problems a more complicated recursive decomposition works better. Planar MSTs. In the plane, one method of finding a subgraph containing the minimum spanning tree is provided by the following well-known result. Define the lune of two points u and V to be the region interior to the two circles having line segment MI; as radius. 1. Suppose uv is an edge in the minimum spanning tree of a planar point set. Then the lune ofu and v contains no other site.
LEMMA
Let r be a tree containing uv, and let w be some other site in the lune of u and V. Then the lengths of segments wu and wv are both shorter than that of segment uv. The removal of uv from T would partition it into two connected components U (containing u) and V (containing i;). If w; is in U, T — uv -\- vuv would be a tree, and if it; is in V, T — uv-\-uw would be a tree, in either case having smaller weight than T. So if T is to be minimum, there can be no such point w in the lune. D PROOF.
Spanning trees and spanners
429
The set of all edges uv with empty lunes is known as the relative neighborhood graph. The lemma above can be rephrased as stating that the minimum spanning tree is a subgraph of the relative neighborhood graph. Clearly, the lune contains the diameter circle of uv. It also contains the region formed by intersecting a circle centered at u with radius uv, with any 60° wedge having apex at u and containing v. (Both shapes are depicted in Figure 1.) As a consequence we have the following results. LEMMA 2 (Shamos and Hoey [122]). The minimum spanning tree of a point set is a subgraph of the points' Delaunay triangulation. PROOF. An edge is in the Delaunay triangulation if some circle contains the two endpoints and no other site. This holds for the minimum spanning tree edges and their diameter circles. D LEMMA 3 (Yao [132]). Partition the set ofplanar unit vectors into subsets, no one subset containing two vectors at angles 60° or greater to each other. For each site u, and each subset S of the unit vectors, find the nearest other site v such that uv has slope in S. Then the collection of all such pairs (w, v) forms a graph containing the minimum spanning tree of the sites. PROOF. The set of points forming slopes in S from u forms a subset of a 60° wedge, and as we have seen the portion of that wedge closer to u than is f is a subset of the lune of u and V. D
All three of these lemmas can be used to find the minimum spanning tree quickly: THEOREM
1. We can find the minimum spanning tree of a planar point set in time
O(nlogn). PROOF. By any of various methods, one constructs the relative neighborhood graph, Delaunay triangulation, or Yao graph described in Lemma 3 in time 0{n\ogn). Any of the classical graph minimum spanning tree algorithms can then find the minimum spanning tree of these graphs in time 0(n logn) or better. (The first two graphs are planar, so Boruvka's algorithm or a method of Cheriton and Tarjan [36] can be used to find their minimum spanning trees in linear time.) By the lemmas above, the minimum spanning trees of these graphs are exactly the geometric minimum spanning trees of the points. D
A matching Q{n\ogn) bound holds, even in the powerful randomized algebraic decision tree model, due to recent results of Grigoriev et al. [77]. These authors showed an ^{n logn) bound for element distinctness; since any set of non-distinct points must have an edge in the minimum spanning tree, the same bound holds for the MST problem. Similar lower bounds generalize to the problem of constructing approximate minimum spanning trees [47].
430
D. Eppstein
Higher dimensional MSTs. The methods described above, for constructing graphs containing the minimum spanning tree, all generalize to higher dimensions. However Lemma 2 is not so informative, because the Delaunay triangulation may form a complete graph. Lemma 3 is more useful; Yao [132] used it to find minimum spanning trees in time 0(n^~^^) where for any dimension d, Sd is a (very small) constant. Agarwal et al. [2] found a more efficient method for high dimensional minimum spanning trees, via bichromatic nearest neighbors. If we are given two sets of points, one set colored red and the other colored blue, the bichromatic nearest neighbor pair is simply the shortest red-blue edge in the complete geometric graph. It is not hard to show that this edge must belong to the minimum spanning tree, so finding bichromatic nearest neighbors is no harder than computing minimum spanning trees. Agarwal et al. show that it is also no easier; the two problems are equivalent to within a polylogarithmic factor. The intersection of any d halfspaces forms a simplicial cone, with an apex where the d bounding hyperplanes meet. We define a double cone to be the union of two simplicial cones, where the halfspaces defining the second cone are opposite those defining the first cone on the same bounding hyperplanes. Such a double cone naturally defines a pair of point sets, one in each cone. Define the opening angle of a cone to be the maximum angle uvw where v is the apex and u and w are in the cone. The opening angle of a double cone is just that of either of the two cones forming it. LEMMA 4 (Agarwal et al.). There is a constant a such that, if pq is a minimum spanning tree edge, and P and Q are the points in the two sides of a double cone with opening angle at most a, with p e P and q e Q, then pq is the bichromatic nearest neighbor pair of P and Q.
The proof involves using Lemma 3 to show that p and q must be mutual bichromatic nearest neighbors. It then uses geometric properties of cones to show that, if there were a closer pair p^q\ then pp^ and qq' would also have to be smaller than pq, contradicting the property of minimum spanning trees that any two points are connected by a path with the shortest possible maximum edge length. One can then use this result to find a graph containing the minimum spanning tree, by solving a collection of bichromatic closest pair problems defined by a sequence of double cones, such that any edge of the complete geometric graph is guaranteed to be contained by some double cone. LEMMA 5 (Agarwal et al.). Given a set ofn points in R^, we can form a hierarchical collection ofO(n\og^~^ n) bichromatic closest pair problems, so that each point is involved in 0(/^~^) problems of size 0(n/2') (1 ^ / < logn) and so that each MST edge is the solution to one of the closest pair problems. PROOF. For simplicity of exposition we demonstrate the result in the case that J = 2; the higher dimensional versions follow analogously. If pq is a minimum spanning tree edge, and w; is a double wedge having sufficiently small interior angle, with p in one half of w and q in the other, then pq must have the minimum distance over all such pairs defined by the points in w. Therefore if F is a family
Spanning trees and spanners
431
of double wedges with sufficiently small interior angles, such that for each pair of points (p,q) some double wedge w(p,q) in F has p on one side and q on the other, then every MST edge pq is the bichromatic closest pair for wedge w(p,q). Suppose the interior angle required is 27t/k. We can divide the space around each point p into k wedges, each having that interior angle. Suppose edge pq falls inside wedge w. We find a collection of double wedges, with sides parallel to w, that is guaranteed to contain pq. By repeating the construction k times, we are guaranteed to find a double wedge containing each possible edge. For simplicity, assume that the sides of wedge w are horizontal and vertical. In the actual construction, w will have a smaller angle than 7r/2, but the details are similar. First choose a horizontal line with at most n/2 points above it, and at most n/2 points below. We continue recursively with each of these two subsets; therefore if the line does not cross pq, then pq is contained in a closest pair problem generated in one of the two recursive subproblems. At this point we have two sets, above and below the line. We next choose a vertical line, again dividing the point set in half. We continue recursively with the pairs of sets to the left of the line, and to the right of the line. If the line does not cross pq, then pq will be covered by a recursive subproblem. If both lines crossed pq, so that it was not covered by any recursive subproblem, then w(p,q) can be taken to be one of two bichromatic closest pair problems formed by opposite pairs of the quadrants formed by the two lines. The inner recursion (along the vertical lines) gives rise to one subproblem containing p at each level of the recursion, and each level halves the total number of points, so p ends up involved in one problem of each possible size n/2^. The outer recursion generates an inner recursion at each possible size, giving / problems total of each size n/2^. The construction must be repeated for each of the k wedge angles, multiplying the bounds by 0(1). D THEOREM 2 (Agarwal et al.). We can compute the Euclidean minimum spanning tree of a d-dimensional point set in randomized expected time 0((/ilogn)'^/^)/or d = 3, or deterministically in time 0(«^~^/^^^/^^+^^+^) in any dimension, for any fixed constant e. PROOF. We use Lemma 5 to find a collection of bichromatic closest pair problems, which can be solved in the given time bounds. The resulting closest pairs form a graph with 0(nlog^^^^) edges, from which the minimum spanning tree can easily be found in time 0(nlog^^i>). n
Callahan [31] gave an improved reduction from minimum spanning trees to bichromatic closest pairs, based on the well-separated pair decomposition described below. With his results, the minimum spanning tree can be computed with a time slower than that of the bichromatic closest pair by an O(logn) factor. Like the reduction above, this factor disappears for time bounds of the form Q{n^^^). For rectilinear {L\ and Loo) metrics, bichromatic closest pair problems can be solved in linear time after a preprocessing stage in which, for each of a constant number of different axes, we sort the points according to their projections along the axis. Therefore, rectilinear minimum spanning trees can be computed in 0{n \ogn) time in any dimension.
432
D. Eppstein
Fig. 2. A fair split tree.
Approximate MSTs. The method above for high dimensional minimum spanning trees takes close to quadratic time when the dimension is large. We describe now a method for approximating the minimum spanning tree, within any desired accuracy, much more quickly. This method is due to Callahan [31,32], and is based on his technique of wellseparated pair decomposition. Similar minimum spanning tree approximation algorithms with worse tradeoffs between time and approximation quality were previously found by Vaidya [128] and Salowe [116]. As we noted above, Callahan also uses this technique to compute exact minimum spanning trees from bichromatic pairs. We will see more applications of Callahan's method later in the construction of spanners. Callahan's method is to recursively partition the given set of sites by axis-parallel hyperplanes. This produces a binary tree 7, in which each node corresponds to a subset of points contained in some J-dimensional box. For any node i; of 7, corresponding to some set S{v) of points, define R{v) to be the smallest axis-aligned box containing the same point set, and let i{v) denote the length of the longest edge of R{v). Then Callahan calls T a fair split tree if it satisfies the following properties: • For each leaf node vofT, \ S(v) | = 1. • For each internal node v, one can choose the axis-parallel hyperplane separating its children's points to be at distance at least l{v)/3 from the sides of R{v) parallel to it. Figure 2 depicts a fair split tree. Such a tree can be constructed in time 0(nlogn) (for any fixed dimension) via any of several algorithms, for instance using methods for quadtree construction [26]. Callahan now defines a well-separated pair decomposition (for a given parameter s)to be a collection of pairs of nodes of a fair split tree, having the properties that • For any pair of sites (p, q) in the input, there is exactly one pair of nodes (P, Q) in the decomposition for which p is in S{P) and q is in S{Q). • For each pair (P, Q) in the decomposition, there is a length r such that S{P) and S{Q) can be enclosed by two radius-r balls, separated by a distance of at least sr. The connection between this definition, minimum spanning tree edges, and bichromatic pairs, is explained by the following result. LEMMA
6 (Callahan). Let pq be a minimum spanning tree edge, and (P, Q) be a pair of
Spanning trees and spanners
433
nodes in a well-separated decomposition of the input (with s = 2) for which p is in S(P) and q is in S{Q). Then pq must be the bichromatic closest pair connecting S(P) and SiQ). PROOF. This follows from the well-known fact that the minimum spanning tree solves the bottleneck shortest path problem, of connecting two points p and ^ by a path with the shortest possible maximum edge length. If there were a shorter edge p^q^ connecting S(P) and S(Q), one could find a path p-p^-q'-q using shorter edges than pq, contradicting this property of minimum spanning trees. D
As a consequence one can find minimum spanning trees by solving a collection of bichromatic closest pair problems for the pairs of a well-separated pair decomposition, then compute a minimum spanning tree on the resulting graph. However for this approach to be useful, one must bound the complexity of the well separated pair decomposition. Callahan constructs his well separated pair decomposition as follows. The method is recursive, and constructs a collection of pairs of sets covering all edges connecting two point sets, each represented by a node of T. Initially, we call this recursive algorithm once for the two children of each node of T. The recursive algorithm, if presented with wellseparated nodes P and Q of T, simply returns one pair (P, Q). Otherwise, it swaps the two nodes if necessary so that P is the one with the larger bounding box, and calls itself recursively on node pairs (Pi, Q) and (P2, Q) where P/ are the two children of P. Intuitively, each node of T is then involved only in a small number of pairs, corresponding to nodes with similar sized bounding boxes within a similar distance from the node. LEMMA 7 (Callahan). The procedure described above results in a well-separated pair decomposition consisting ofO(n) pairs, and can be performed in time 0(n) given a fair split tree of the input.
This information is not enough to reduce the problem of finding exact minimum spanning trees to that of bichromatic closest pairs; it may be, for instance, that the decomposition involves ^(n) pairs (P, Q) for which \S(P)\ = 1 and \S(Q)\ = ^{n)\ the total size of all subproblems would then be quadratic. (Callahan does use this decomposition in a more complicated way to reduce minimum spanning trees to bichromatic closest pairs). However if we only want an approximate minimum spanning tree, the problem becomes much easier. 3 (Callahan). For any fixed s, one can compute in 0(n logn) time a tree having total length within a factor of{\ -\- e) of the Euclidean minimum spanning tree. THEOREM
PROOF. Compute a well-separated pair decomposition for s = max(2,4/s) and form a graph G by choosing an edge pq for each pair (P, Q) in the decomposition. Note that pq can have length at most r(4 + s) and any other edge connecting the same pair of sets must have length at least rs, so pq approximates the bichromatic closest pair of the sets P and Q within a (1 -h ^) factor. Replacing each edge of the true minimum spanning tree by the corresponding edge in G produces a subgraph 5 of G with weight within (I -^ s) of the minimum spanning tree.
434
D. Eppstein
We now prove by induction on the length of the longest edge in the corresponding minimum spanning tree path that any two sites are connected by a path in S. Specifically, let e = pq he the longest edge in the minimum spanning tree path connecting the sites; then the corresponding edge in G connects two points p^q^ in the same pair (P, Q) of the decomposition. There is a path of edges all shorter than e from one of the two sites to p^ (via the minimum spanning tree to p, then within the cluster to p\ using the fact that ^ > 2 to prove that this last step is shorter than e). By the induction hypothesis, one can find such a path using only edges in S. Similarly there is a path of edges in S all shorter than e from q^ to the other site. Therefore S is connected, and must be a spanning tree. The minimum spanning tree of G must then be shorter than S, so it approximates the true minimum spanning tree of the sites within a (I-\- e) factor. D By choosing more carefully the representative edges from each pair in the decomposition, Callahan achieves a time bound of 0(/i(log n-\-e~^^'^\oge~^))for this approximation algorithm. Incremental and offline MSTs. In some applications one wishes to compute the minimum spanning trees of a sequence of point sets, each differing from the previous one by a small change, such as the insertion or deletion of a point. This can be done using similar ideas to the static algorithms described above, of constructing a sparse graph that contains the geometric minimum spanning tree. Such a graph will also change dynamically, and we use a dynamic graph algorithm to keep track of its minimum spanning tree. As with the static problem, the specific graph we use may be a Yao graph, Delaunay triangulation, or bichromatic closest pair graph, depending on the details of the problem. We start with the simplest dynamic minimum spanning tree problem, in which only insertions are allowed to a planar point set. In this case, the graph of choice is the Yao graph described earlier, in which we compute for each point the nearest neighbor in each of six 60° wedges. LEMMA 8. Given a set S ofn points, and a given 60° wedge of angles, in 0(n \ogn) time we can construct a data structure which can determine in 0(log/i) time the nearest point in S to a query point x, and forming an angle from x within the given wedge. PROOF. We construct a Voronoi diagram for the convex distance function consisting of the Euclidean distance for points within the wedge, and infinite distance otherwise. This diagram can be found in time 0{n \ogn) using any of several algorithms [41,56,104]. We then perform planar point location in this diagram; again, various algorithms are possible [58, 92,99,119]. D
We can then apply the static-to-dynamic transformation for decomposable search problems [21] to this data structure, producing an incremental data structure in which we can insert points to S and answer the same sorts of queries, both in time 0(log^ n). 4. We can maintain the Euclidean minimum spanning tree of a set ofpoints in the plane, subject to point insertions only, in time 0(log^ n) per update. THEOREM
Spanning trees and spanners
435
We maintain a sparse graph G containing the minimum spanning tree. We then use the above data structure to determine for each new point six candidate edges by which it might be connected to the minimum spanning tree, and add these edges to G. Insertions to a dynamic graph minimum spanning tree problem can be handled in logarithmic time each, using a data structure of Sleator and Tarjan [124]. D PROOF.
A more complicated technique based on the same Yao graph idea can be used to handle an offline sequence of both insertions and deletions, in the same time bound [61]. Fully dynamic MSTs. The fully dynamic case, in which we must handle both insertions and deletions online (without knowing the sequence of events in advance) is much harder. A method of Eppstein [62] can be used to maintain the solution to a bichromatic closest pair problem; combining this with the reduction of Lemma 5 and a fully dynamic graph minimum spanning tree algorithm [69] gives a method with amortized running time 0(n^/^log^n + ^i-2/(r6f/2i+i)+e^ p^j, update, where d denotes the dimension of the problem. Recently Henzinger and King [81] further improved this to OCn^/^log'^+^n +ni-2/(r^/2Hi)+6:) Agarwal et al. [3] extended the nearest neighbor searching methods used by these data structures to more general algebraic distance functions in two dimensions, and in particular to planar Lp metrics. In rectilinear metrics, bichromatic closest pairs can be maintained in polylogarithmic time, so the total time per update can be simplified to 0{n^^^ log^^^ n). However these time bounds are too large, and the algorithms too complicated, to be of practical interest. We instead describe in more detail a technique that works well in a certain average case setting defined by Mulmuley [108] and Schwarzkopf [120]. We define a signature of size n to be a set 5 of n input points, together with a string s of length at most In consisting of the two characters " + " and "—". Each " + " represents an insertion, and each "—" represents a deletion. In each prefix of s, there must be at least as many " + " characters as there are "—" characters, corresponding to the fact that one can only delete as many points as one has already inserted. Each signature determines a space of as many as (n!)^ update sequences, as follows. One goes through the string s from left to right, one character at a time, determining one update per character. For each "-h" character, one chooses a point x from S uniformly at random among those points that have not yet been inserted, and inserts it as an update in the dynamic problem. For each "—" character, one chooses a point uniformly at random among those points still part of the problem, and updates the problem by deleting that point. For any signature, we define the expected time for a given algorithm on that signature to be the average time taken by that algorithm among all possible update sequences determined by the signature. The algorithm is not given the signature, only the actual sequence of updates. We then define the expected time of the algorithm on inputs of size n to be the maximum expected time on any signature of size n. In other words, we choose the signature to force the worst case behavior of the algorithm, but once the signature is chosen the algorithm can expect the update sequence to be chosen randomly from all sequences consistent with the signature. Note that this generalizes the concept of a randomized incremental, since the expected case model for such algorithms is generated by signatures containing only the "-h" character. To demonstrate the power of this expected case model, and derive a fact we will need in our minimum spanning tree algorithm, we prove the following result. Compare this
436
D. Eppstein
with the Gin) worst case bound on the amount of change per update in the Delaunay triangulation. LEMMA 9 (Mulmuley). For any signature of size n, the expected number of edges in a dynamic planar Delaunay triangulation that change per update isO{\).
We first consider the change per insertion. Suppose after an insertion at some step / of the algorithm, there are exactly j points remaining. Since the Delaunay triangulation is a planar graph, it will have at most ?>j — 6 edges. Each edge will have just been added to the graph if and only if one of its endpoints was the point just inserted, which will be true with probability 2/j. So the expected number of additional edges per insertion is at most (3j — 6) • 2/j = 0(1). The number of existing edges removed in the insertion is at most proportional to the number of edges added, and can possible be even smaller if the convex hull becomes less complex as a result of the insertion. Thus the total change per insertion is 0(1). The total change per deletion can be analyzed by a similar argument that examines the graph before the deletion, and computes the probability of each edge being removed in the deletion. D
PROOF.
This fact can then be used to show that the Delaunay triangulation can be maintained efficiently. Deletions can be performed in time proportional to the complexity of the change [5]. Insertions can also be performed in this amount of time as long as the point to be inserted can be located within the existing Delaunay triangulation. This point location can be performed using a data structure based on the history of the structure of the Delaunay triangulation, similar to that used by Guibas et al. [78], and which can be shown to have logarithmic expected search time in this expected case model. With some care, this structure can be updated quickly after each deletion. THEOREM 5. The minimum spanning tree of a planar point set can be maintained fully dynamically for any signature of size n in expected time O(logn) per update. PROOF. AS shown by Mulmuley, by Schwarzkopf, and by Devillers et al. [51], we can maintain the Delaunay triangulation in this time bound. Since the Delaunay triangulation is a planar graph, we can find its minimum spanning tree using a data structure of Eppstein etal. [70]. D OPEN PROBLEM 1. Can we maintain the Euclidean minimum spanning tree dynamically in poly logarithmic worst case or amortized time per update?
Kinetic MSTs. Instead of allowing only one point at a time to change arbitrarily, one can also consider an alternative form of dynamism, in which all points move simultaneously but predictably. The simplest form of this problem is one in which a set of n points each have a linear motion (as a function of a parameter which we refer to conventionally as time). One can ask how many times the minimum spanning tree of these moving points changes, ask for an algorithm to compute this sequence of changes, or find the value of the time parameter that optimizes some given function of the MST.
Spanning trees and spanners
437
Note that two linearly moving points have a quadratically varying Euclidean distance, so one can not directly apply known combinatorial bounds or algorithms for graphs with linearly varying edge weights [52,64,71,79]. However, several insights from the graph case carry over to the geometric setting; in particular, for point sets in general position (no three simultaneous equal distances) the MST changes must be in the form of swaps between two equal-length edges. If one draws an arrangement of curves, one curve graphing the weight function of each potential edge in the MST, then these changes only occur at times corresponding to arrangement vertices. Hence there can be O(n^) MST changes total, in any metric with the property that the distance between two moving points is a piecewise algebraic function with bounded degree and a bounded number of breakpoints. It is easy to find point sets for which the MST changes Q{n^) times (simply pass n/2 moving points along a line containing n/2 fixed points). Katoh et al. [86] showed that the Yao graph, and hence the Euclidean MST of a linearly moving point set, can only change 0(/2^2"^"^) times, that the rectilinear MST can change 0{n^^^a{n)) times, and that the rectilinear maximum spanning tree can change 0{n^) times. For Euclidean maximum spanning trees the best bound on the number of changes is currently only 0(n^'^^^) [126]. The 0{n^f^a(n)) bound on rectilinear MST changes follows by partitioning the problem into a sequence of 0{na{n)) sparse graph problems; it therefore follows from the recent breakthrough results of Dey [52] that this bound can be improved to 0{n^^^a{n)). All of these results are largely independent of the dimension. Note that only in the case of rectilinear maximum spanning trees are these bounds tight. OPEN PROBLEM 2. What is the maximum number of changes in the Euclidean minimum spanning tree ofn linearly moving pointsl How quickly can we compute that sequence of changesl
Finally, this problem of moving points can be combined with the dynamic point sets described earlier in kinetic geometry, a framework in which a system of linearly moving points can be updated by inserting, deleting, or changing the motion of points [19]. Basch et al. [20] describe results on proximity problems of moving points in this framework.
2.2. Maximum weight spanning trees For graphs, the maximum spanning tree problem can be transformed to a minimum spanning tree problem and vice versa simply by negating edge weights. But for geometric input, the maximum spanning tree is very different from the minimum spanning tree, and different algorithms are required to construct it. This problem was first considered by Monma et al. [106], and has applications in certain clustering problems [16]. We first examine the edges that can occur in the maximum spanning tree. One might guess, by analogy to the fact that the minimum spanning tree is a subgraph of the Delaunay triangulation, that the maximum spanning tree is a subgraph of the farthest point Delaunay triangulation. Unfortunately this is far from being the case — the farthest point Delaunay triangulation can only connect convex hull vertices, and it is planar whereas the maximum
438
D. Eppstein
spanning tree has many crossings. However we will make use of the farthest point Delaunay triangulation in constructing ih^ farthest neighbor forest, formed by connecting each site to the site farthest away from it. The first fact we need is a standard property of graph minimum or maximum spanning trees. LEMMA 10. The farthest neighbor forest is a subgraph of the maximum spanning tree. LEMMA 11 (Monma et al. [106]). Let each tree of the farthest neighbor forest be twocolored. Then for each such tree, the convex hull vertices of any one color form a contiguous nonempty interval of the convex hull vertices. The trees of the forest can be given a cyclic ordering such that the intervals adjacent to any such interval come from adjacent trees in the ordering.
12 (Monma et al. [106]). Let e = (x,y) be an edge in the maximum spanning tree but not in the farthest neighbor forest, with x in some farthest point neighbor tree T. Then x and y are both convex hull vertices, and y is in a tree adjacent to T in the cyclic ordering of Lemma 11. LEMMA
Putting these pieces of information together, we have the following result. THEOREM 6 (Monma et al. [106]). The maximum spanning tree of a planar point set can be constructed in 0(n \ogn) time by computing the farthest neighbor forest, determining the cyclic ordering of Lemma 11, finding the longest edge between each adjacent pair of trees in the cyclic ordering, and removing the shortest such edge.
The farthest neighbor forest and the longest edge between adjacent trees can be computed easily via point location in the farthest point Voronoi diagram. Eppstein [63] considered the same problem from the average case dynamic viewpoint discussed above. His algorithm performs a similar sequence of steps dynamically: maintaining a dynamic farthest neighbor forest, keeping track of the intervals induced on the convex hull and of the cyclic ordering of the intervals, and recomputing longest edges as necessary between adjacent intervals using a dynamic geometric graph based on the rotating caliper algorithm for static diameter computation. THEOREM 7 (Eppstein). The Euclidean maximum spanning tree can be maintained in expected time 0(log'^ n) per update.
Just as higher dimensional minimum spanning trees are closely related to bichromatic nearest neighbors, higher dimensional maximum spanning trees can be related to bichromatic farthest neighbors. Agarwal et al. [4] used this idea to give a randomized algorithm for the three-dimensional maximum spanning tree with expected time complexity 0(/i^/^log^/^n), almost matching the bound for the corresponding minimum spanning tree problem. The same authors also provide fast approximation algorithms to three- and higher-dimensional maximum spanning tree problems.
Spanning trees and spanners
439
Since the maximum spanning tree involves many edge crossings, it is also natural to consider the problem of finding the maximum planar spanning tree, that is, the maximum weight spanning tree not involving any edge crossings. The exact complexity of this problem appears to be unknov^n, but Alon et al. [7] point out that it can be approximated to within a factor of two simply by choosing a tree with a star topology (in which one hub vertex is connected to all n — 1 others). Choosing the best possible hub can be done in 0(n^) time; Alon et al. show that a constant factor approximation to the maximum noncrossing spanning tree can be found in 0(n) time by choosing a suboptimal hub. OPEN PROBLEM 3. What is the complexity of finding the exact maximum weight noncrossing spanning treel If it is NP-hard, how well can it be approximated in polynomial timel
2.3. Low-degree spanning trees For points in the plane (with the Euclidean metric), any minimum spanning tree has degree at most six, and a perturbation argument shows that there always exists a minimum spanning tree with degree at most five [107]. In general the degree of a minimum spanning tree in any dimension is bounded by the kissing number (maximum number of disjoint unit spheres that can be simultaneously tangent to a given unit sphere) [114]. However it is interesting to consider the construction of trees with even smaller degree bounds. As an extreme example, the traveling salesman path problem asks us to find a spanning tree with degree at most two. As is well known, one can approximate this to within a factor of two by performing an Euler tour of the graph formed by doubling the edges of a minimum spanning tree. Christofides' heuristic [42] reduces the approximation ratio to 3/2 by forming a smaller Eulerian graph, the union of a minimum spanning tree and a matching on its odd degree vertices. These techniques do not take much advantage of the geometry of the problem, and work for any metric space. Very recently, Arora [11,12] has discovered a polynomial time approximation scheme for the planar Traveling Salesman Problem. The basic idea, like that of many recent geometric approximation algorithms, is to use dynamic programming on a structure similar to Callahan's fair split tree. Arora shows that, for any point set, there exists a tour approximating the TSP and a recursive decomposition in which each box is crossed only a small number of times by this approximate tour. One can then find the best possible subtour for each small subset of edges crossing each box, by combining similar information from smaller boxes. The time to approximate the TSP within a factor of 1 + 6: is 0{n log^^^^'^^ n). This approximation strategy generalizes to higher dimensional traveling salesman problems as well, with a time bound of the form 0(n log^^^^/^^ n). For any fixed dimension and fixed value of s this is within a polylogarithmic factor of linear, but with an impractically high exponent in the poly log. One can also consider degree bounds between two and five. KhuUer et al. [90] consider this problem for degree bounds of three and four; they show that one can find constrained spanning trees with length 3/2 and 5/4 times the MST length respectively. They also show
440
D. Eppstein
that in any dimension one can find a degree-three tree with total length at most 5/3 that of the minimum spanning tree. The methods of Khuller et al. are based, like the 2-approximation to the TSP, on modifications to the minimum spanning tree to reduce its degree. For instance, their algorithm for the planar degree-three tree problem roots the minimum spanning tree, then finds for each vertex v the shortest path starting at v and visiting all the (at most four) children of v. The union of these paths is the desired degree-three tree. The exact solution to the planar degree-three spanning tree problem is NP-hard [111] but apparently the complexity of the degree-four problem remains open. O P E N PROBLEM 4. Is it NF-hard to find the minimum weight degree-four spanning tree of a planar point setl
It is also natural to consider maximization versions of these bounded-degree spanning tree problems. Barvinok [18] shows that the adjacency matrix of a complete geometric graph (using a polyhedral approximation to the Euclidean distance function) has "low combinatorial rank" and uses this to approximate the maximum traveling salesman problem within any factor (1 — £) in polynomial time. Little seems to be known about similar bounded-degree maximum spanning tree problems with larger degree bounds. Alon et al. [7] consider the maximum non-crossing traveling salesman problem, and its generalization to the construction of a maximum bounded-degree non-crossing spanning tree. They show that this can be approximated by linking the edges of a heavy non-crossing matching formed by projecting the points onto a line, splitting the points into two sets by their median on this line, and matching points of one set with those of the other. The approximation ratio of this method for the non-crossing traveling salesman problem is l/n — s; this ratio is not worked out explicitly for the other bounded-degree spanning tree problems but remains a constant. The time used by Alon et al. to find this long non-crossing path is 0(n logn). As with the other non-crossing problems considered by Alon et al., the complexity of finding exact solutions apparently remains open.
2.4. k-point spanning trees We next consider the k-minimum spanning tree problem: given n points in the Euclidean plane, find the shortest tree spanning k of the points (Figure 3(a)). Up to constant factors in the approximation ratio, the /:-MST problem is equivalent to the problem of finding a path connecting k points (the /:-TSP problem) or a Steiner tree connecting k points. The choice of Euclidean metric is also not critical. However we will use the A:-MST formulation for simplicity. The /:-MST problem was introduced independently by Zelikovsky and Lozevanu [133], and by Ravi et al. [113]. Many similar ^-point selection problems with other optimization criteria can be solved in polynomial time [50, 68] but the /:-MST problem is NP-complete [113,133] (as are obviously the /:-TSP and /:-Steiner tree variants), so one must resort to some form of approximation. In a sequence of many papers, the approximation ratio was reduced to Oik^^"^) [113], O(logi^) [75,102], 0(log)^/loglogw) [651,0(1) [27], 2V2 [105], and finally 1-f 6: [11]. We describe the 2 ^ 2
Spanning trees and spanners
441
~l
Fig. 3. (a) 6-point minimum spanning tree, (b) Guillotine partition.
approximation algorithm, but the other results use similar methods. In particular, the 1+6: approximation results of Arora can be seen as a more complicated generalization of this method. For related work on non-geometric ^-MST problems see [17,28,37,113,133]. Mitchell [105] first restricts his attention to the rectilinear metric in the plane; the weight of a tree in this metric differs by its Euclidean weight by a factor of at most \/2, so this simplification entails only that factor loss in the overall approximation ratio of his algorithm. With this restriction, one can look for a rectilinear tree in which vertices are connected by paths of horizontal and vertical line segments. Most of the approximation algorithms for the geometric /:-MST problem work by using dynamic programming to construct a suitable recursive partition of the plane, and Mitchell's is no exception. Mitchell applies the concept of a guillotine subdivision, previously used e.g. in VLSI design; this is a recursive partition of the plane into rectangles, in which each rectangle is subdivided by a vertical or horizontal line segment into two smaller rectangles (Figure 3(b)). For a given rectilinear tree, the span of a line segment in the subdivision is the shortest contiguous subsegment containing all the points where the segment intersects the tree. (In other words, this span is a one-dimensional convex hull of the intersection of the line segment with the rectilinear tree.) The key technical result of Mitchell, the proof of which is too complicated to repeat here, is the following: 13 (Mitchell). For any rectilinear graph G, we can find a guillotine subdivision S, such that each edge of G is covered by the spans of segments in S, and such that the weight of these spans is at most twice the weight ofG. LEMMA
Let G be the optimum rectilinear ^-point spanning tree; then the lemma shows that there exists a guillotine subdivision, for which the spans of segments form a connected region of the plane covering at least k points, and with weight at most twice that of G. Conversely, if we construct the minimum weight guillotine subdivision with these properties, we can simply take a minimum spanning subgraph of this region of the plane to produce a rectilinear ^-point spanning tree with the same weight, which will then be twice that of the optimum rectilinear tree. (Actually, in general this process will form a Steiner tree rather
442
D. Eppstein
than a spanning tree. One must instead be more careful, and find a guillotine subdivision for which the minimum spanning subtree of the given k points has minimum total weight.) Thus we have reduced the problem to one of finding an optimum guillotine subdivision. This can be done by dynamic programming: there are 0{n^) combinatorially distinct ways of forming a rectangle containing one or more of the sites. For each of these different rectangles, for each possible number of sites within the rectangle, and for each of the (polynomially many) distinct ways of connecting those sites to the boundary of the rectangle, we find the optimal guillotine partition within that rectangle by combining information from 0{n) pairs of smaller rectangles. The result is a polynomial time algorithm for finding the optimum guillotine partition. 8 (Mitchell). In polynomial time, one can find a spanning tree of a subset ofk out ofn given planar sites, having total weight at most 2 V2 times the optimum.
THEOREM
The complexity of this method, while polynomial, is very high {0{n^^k^) or 0(^2 logn + nk^^)) but can be reduced somewhat (to 0{n^k^) or 0{n \ogn + nk^^)) at the expense of increasing the approximation ratio to a larger constant [105]. Further work remains to be done on reducing the time complexity of this algorithm to a more practical range. In this direction, Eppstein [65] showed that an 0(log/c) approximation could be found in time 0{n\ogn + nkXogk) by combining a similar dynamic programming approach with techniques based on quadtrees. Arora [11,12] showed that the approximation factor could be reduced to 1 + £. He shows that there exists a partition similar to the guillotine partition above, and a tree in which each partition edge is crossed a small number of times, such that the total length of this tree is within this 1 + s factor of optimal. He then uses very similar dynamic programming methods to find such a tree. Arora also reduces the time complexity of this approach to 0{n log^^^/^^ n) which, while still high, is at least within a polylogarithmic factor of linear. 2.5. Minimum diameter spanning trees The previous spanning tree problems have all been based on the weight of the tree constructed. We now consider other criteria for the quality of a tree. The diameter of a tree is just the length of its longest path. Since geometric spanning trees are often used in applications such as VLSI, in which the time to propagate a signal through the tree is proportional to its diameter, it makes sense to look for a spanning tree of minimum diameter. Ho et al. [82] give an algorithm for this problem, based on the following fact: LEMMA 14 (Ho et al.). Any point set has some minimum diameter spanning tree in which there are at most two interior points. PROOF. We start with any minimum diameter spanning tree T, and perform a sequence of diameter-preserving transformations until it is in the above form. Let P be the longest path in the given tree, and number its vertices ui, f2,. •., i^/?. We first form a forest by removing all edges of P from 7, and for each vertex v of P, let Ty denote the tree in this forest containing v. For any other vertex w, let Pu denote the
Spanning trees and spanners
443
Fig. 4. (a) Minimum diameter spanning tree corresponds to cover by two circles, (b) Point set with high diameter minimum spanning tree.
vertex v such that u is in Ty. Then we construct a new tree T' by adding to P an edge from each vertex u to Pu. T' has the same diameter as the original tree, since the distance between any two vertices can not increase except when they are in the same tree Ty, and in that case (by the assumption that P is a diameter path) the distance of each point to v is less than the distance from v to the endpoints of P. Now suppose that P has four or more edges and the length of the path v\-V2-v?> is at most half the length of P. (If not, we can reverse P and consider the three vertices at its other end.) Form a tree T^^ by removing every edge uv2 and reconnecting each such vertex u to V3. This can only decrease the lengths of paths already going through U3 in 7^ so the only pairs of vertices with increased path lengths are those newly connected to V3. But the length of any such path is at most twice the length of the path i'i-i'2-t'3, so the diameter of T^^ is no more than that of T. Each repetition of this transformation decreases the number of edges in P until it is at most three, and preserves the property that each vertex is within one edge of P, so we will eventually reach a tree of the form specified in the lemma. D
9 (Ho et al.). We can find a minimum diameter spanning tree of any point set in time Oirr').
THEOREM
PROOF. We simply try all single interior vertices and pairs of interior vertices. For the latter case, we still need to determine how to assign each remaining point to one of the two interior vertices. If the diameter path of the tree is fi-1^2-1^3-^4, and we know the lengths of v\-V2 and 1^3-i;4, we can perform this assignment by drawing two circles, centered at the two interior vertices, with those lengths as radii (Figure 4(a)); these circles must together cover the whole point set and each point can be assigned to the interior vertex corresponding to the circle covering it. Ho et al. show that, if we sort the points by their distances from V2 and U3, the space of all minimal pairs of covering circles can be searched in linear time. These sorted orders can be precomputed in a total of 0{n log n) time. Q
Ho et al. also consider optimization of combinations of diameter and total weight; they show that it is NP-complete to find a tree satisfying given bounds on these two measures. It is also of interest to combine these criteria with a bound on vertex degree. Of course for
444
D. Eppstein
degree-two trees, minimum diameter and minimum weight are equivalent to the travehng salesman problem. The minimum weight spanning tree itself can have very high diameter (an Q(^/n) factor away from optimal); for instance a point set spaced nearly uniformly in a unit square can have a path of length Q {y/n) as its minimum spanning tree (Figure 4(b)). Conversely an upper bound of 0 ( v ^ ) follows from results on the worst case length of the minimum spanning tree of n points [24,125]. One can achieve a better diameter by relaxing the requirement of minimum weight; as we describe later, for two- and three-dimensional point sets, one can find a subgraph of the complete Euclidean graph with degree three and total weight 0(1) times that of the minimum spanning tree, for which shortest paths in the subgraph have length within 0(1) of the Euclidean distance [44]. A single-source shortest path tree in such a graph is a degree-three tree that has both weight and diameter within a constant of the minimum. Similar problems of constructing spanning trees combining diameter, weight, and bottleneck shortest path bounds were considered by Salowe et al. [118] and Khuller et al. [91]. 2.6. Minimum dilation spanning trees Of the various common geometric network design quality criteria, only dilation (largest ratio of network distance to Euclidean distance) is underrepresented among research on the tree problems. Dilation has been studied for non-geometric tree design problems [30], and as we will see, is very prominent in work on other classes of graphs. The lack of work on tree dilation is likely because there is little to do in terms of worst case bounds: LEMMA
15. Any spanning tree on the vertices of a regular polygon has dilation Q{n).
PROOF. AS with any tree, we can find a vertex v, the removal of which partitions the tree into components the largest of which has at most 2/i/3 vertices. Therefore there is some pair of vertices from different components, adjacent to each other along the boundary of the polygon, and separated from v by at least n/6 polygon edges. The path in this tree D connecting this pair passes through v, and so has dilation Q{n).
Conversely, the minimum spanning tree has dilation 0(«) by its bottleneck shortest path property. However, the minimum spanning tree is not always good in terms of dilation; an example similar to that of Figure 4(b) shows that it can have dilation Q{n) even when dilation O(v^) is possible, it is easy to construct spanning trees with dilation O(v^). OPEN PROBLEM 5. Is it possible to construct the exact minimum dilation geometric spanning tree, or an approximation to it, in polynomial time? Does the minimum dilation spanning tree have any edge crossings! How well is it approximated by the minimum spanning treel
3. Planar graphs We now discuss problems of constructing planar graphs having a given planar point set as vertices. Note that any such problem (in which the graph is required only to be connected)
Spanning trees and spanners
445
requires Qinlogn) time in the randomized algebraic decision tree model, since element distinctness is reducible to sorting, sorting is reducible to convex hulls, and convex hulls can be found in linear time from a connected planar graph spanning the input points [103].
3.1. Minimum weight triangulation The minimum weight triangulation problem asks to find a triangulation (that is, a maximal planar straight-line graph on the given set of vertices) that minimizes the total Euclidean edge length. This problem is not known to be NP-hard, nor is it known to be solvable in polynomial time, and the complexity of minimum weight triangulation is one of the few problems left from Garey and Johnson's original list of open problems [74]. However, a generalized problem with non-Euclidean distances is NP-complete [100]. We describe here two very recent developments in the theory of minimum weight triangulations. First, Levcopoulos and Krznaric [96] have shown that one can find a triangulation with total length approximating the minimum to within a (large) constant factor; no such approximation was previously known. Second, Dickerson and Montague have found a method of finding in polynomial time a subgraph of the exact minimum weight triangulation which, empirically, is usually quite large; enough so that moderate sized instances of the problem can now be solved exactly. It is possible that their method in fact gives a polynomial time algorithm for the problem. MWT approximation. The two best approximations known to the MWT are those of Plaisted and Hong [112] and of Levcopoulos and Krznaric [96]. Although dissimilar in many ways, an important basic idea is shared by both papers. Rather than finding a triangulation directly, they consider the problem of finding a minimum weight partition into convex polygons with vertices at the input points (MC for short). We first sketch Plaisted and Hong's work. Let v be an interior vertex of a planar straightline graph with convex faces (such as the MWT of S). We can find a star of three or four edges forming no reflex angles at v as follows: choose the first star edge arbitrarily, and choose each successive edge to form the maximal non-reflex angle with the previous edge. Conversely, if each interior vertex of a planar straight-line graph has no reflex angles, the graph must have convex faces. Thus motivated, Plaisted and Hong try to build a graph on S with convex faces by piercing together local structures — stars. For each point st in the interior of the convex hull of 5, they find the minimum weight star of three or four edges. This collection of minimum weight stars, together with the convex hull of 5, forms a graph with total edge length less than twice that of MC and therefore of the MWT. Unfortunately, the resulting graph may not be planar. Plaisted and Hong use a complicated case analysis to remove crossings from this graph, ending up with a planar straight-line graph with convex faces having total edge length at most 12 times that of the MWT. The ring heuristic (connecting every other vertex of a convex polygon P to form a polygon P' with [n/2J vertices and a smaller perimeter, and triangulating P' recursively; see Figure 5(a)) can be used to convert this convex partition to a triangulation, at the cost of a logarithmic factor in total length (and hence in the approximation ratio). Olariu et al. [110] showed that this O(logn) bound is tight.
446
D. Eppstein
Fig. 5. (a) Ring heuristic triangulation of a convex polygon, (b) Greedy triangulation can have Q{^) weight than minimum.
larger
We now outline the results of Levcopoulos and Krznaric [96]. Their idea is to start with a proof that the greedy triangulation (in which one considers the possible edges in increasing order by weight, adding an edge to the triangulation exactly when it does not cross any previously added edge) achieves approximation ratio O(v^); an Q{^) lower bound was previously known [95,101] and is depicted in Figure 5(b). Rather than proving this directly, Levcopoulos and Krznaric again work with convex partitions. They define a greedy convex partition GC by constructing stars using only the edges in the greedy triangulation. Unlike the construction of Plaisted and Hong, the result is planar (since it is a subgraph of a planar graph) so no crossings need be removed. The first step of their proof is a lemma that the weight of GC approximates MC within a factor of O(v^). Given any graph G such as MC or GC, define maxG(f) to be the length of the longest edge incident to i; in G; for any planar graph the sum of these quantities is within a constant of the total graph weight. Then if the greedy partition is heavier than the minimum partition by a factor of/:, Levcopoulos and Krznaric choose v to maximize maxGc(i^) — maxMc(^) among all vertices with maxcc {v) = Q{k maxMC i^))- Some simple algebra shows that the weight of GC is 0{n maxGc(i^))- They then use the properties of the greedy triangulation (and the details of their construction of GC from their triangulation) to construct a fan of Q{k) edges resembling that in Figure 5(b), in which the short edge of the fan corresponds roughly with maxA/c(i^) and the long edge corresponds with maxGc(i^)- From this fan one can find a convex chain of Q{k) vertices such that any star at one of these vertices involves an edge of length ^(maxGc(i^)). As a consequence the weight of MC is Q{kmdiXGciv)). Combining these two bounds we see that the weight ratio k of GC to MC is 0(n/k). Therefore k = 0(y/n), and this gives an O(v^) approximation of MC by the greedy convex partition. Levcopoulos and Krznaric then show that for any convex partition C formed by edges of the greedy triangulation, C can be triangulated by adding diagonals of total length 0(\MWT\-\-\C\). Since the overall greedy triangulation we started with, restricted to each cell of C, forms a greedy triangulation of that cell, and since the greedy triangulation forms a constant approximation to the MWT of a convex polygon [97], the result is that the length of the greedy triangulation is 0(\MWT\ + \MC\^/n) = (\MWT\^). To improve this 0(^/n) approximation, Levcopoulos and Krznaric modify the greedy triangulation. Their algorithm MGREEDY adds edges one at a time to a planar straightline graph G, as follows. Let wf be the smallest edge not crossing anything already in G (so
Spanning trees and spanners
441
that the greedy algorithm would next add uvtoG). Then MGREEDY tests the following six conditions: • Some pair of edges uw and wv are already in G, with uwv forming an empty triangle. • Some edge wx crosses uv, with edge vx already in G and vwx forming an empty triangle. • Angle vwu is at least 135°. • \wx\ < l.l|wi;|. • If /7 is the intersection point of lines vx and uw, then \xp\ < 0.5\wp. • There is an edge uy already in G, such that triangle vuy is empty and angle wuy is reflex. If all six conditions hold for some two vertices w and x, then the algorithm adds edge wx to G; otherwise it adds uv. A similar construction of a convex partition and a fan in it now holds in this modified algorithm as it did in the greedy triangulation. However now the fan can only have 0(1) edges before forming a situation in which the six conditions above hold. The result is that the convex partition is a constant factor approximation to the minimum weight convex partition, and the modified greedy triangulation is a constant factor approximation to the minimum weight triangulation. As Levcopoulos and Krznaric show, these approximations can be constructed in time 0(n logn), or even 0(n) if the Delaunay triangulation is already known. OPEN PROBLEM 6. What is the best possible approximation ratio for a polynomial time approximation to the minimum weight triangulation!
Exact MWT construction. Instead of approximating the minimum weight triangulation, a number of authors have attacked the problem of constructing the exact minimum weight triangulation, by finding conditions sufficient to guarantee that certain edges belong to the MWT. If enough MWT edges could be found in this way, so that the resulting subgraph of the MWT connected all the vertices, the remaining regions of the plane could be treated as simple polygons and triangulated in polynomial time by dynamic programming [93]. This approach gained in credibility when Edelsbrunner and Tan [59] used it to solve a closely related problem, the min max weight triangulation. In this problem, the quality of a triangulation is measured by the length of its longest edge; the min max weight triangulation is the one minimizing this quantity. LEMMA 16 (Edelsbrunner and Tan). There exists some min max weight triangulation that contains the edges of the relative neighborhood graph of the sites. COROLLARY
1. The min max weight triangulation can be found in polynomial time.
The dynamic programming idea described above would lead to an 0(n?) time bound, but Edelsbrunner and Tan reduced this to O(n^). Recall that the relative neighborhood graph is defined in terms of a forbidden region characterization: an edge is in the graph if and only if the lune (formed by intersecting the two circles with that edge as radius) contains no other sites. Several authors have proven
448
D. Eppstein
similar forbidden region characterizations for the minimum weight triangulation. Yang et al. [ 131 ] show that if the region formed as the union of the same two radius circles is empty, the edge belongs to the MWT. (In particular, the two closest sites are connected by an edge in the MWT [76].) Keil [88], Yang [130], and Cheng and Xu [38] prove similar results for an alternate union of two circles, for which the given edge is a chord. Aichholzer et al. [6] provided a different type of characterization of minimum weight triangulation edges, which leads to an algorithm capable of finding the MWT for certain very large subsets. They define a light edge to be one that is not crossed by any other edge of smaller weight. It is not the case that all light edges need be part of the MWT, but they show that if the set of all light edges forms a triangulation, that triangulation must be the one minimizing the total edge weight (or any other monotonic functional of edge weights). Aichholzer et al. note that the characterizations of Keil, Yang et al. [88,130,131] all produce edges that must be Hght. The best computational results so far for exact minimum weight triangulation construction have been found by Dickerson and Montague [53,54]. They define a locally minimal triangulation to be one in which for every two adjacent triangles forming a convex quadrilateral, the common side of the triangles is the shortest diagonal of the quadrilateral. Clearly, the minimum weight triangulation is locally minimal; their idea is to identify edges belonging to all locally minimal triangulations. The technique is simply to maintain a set S of edges that might possibly be part of a locally minimal triangulation. Initially S consists all pairs of vertices, then in a sequence of passes Dickerson and Montague remove from S any edge that is not the short diagonal of a quadrilateral (not containing other sites) all sides of which still belong to S. Eventually no more edges can be removed, and the process terminates. They then define another set S' of all those edges remaining in S and not crossed by any other edge in S. LEMMA 17 (Dickerson and Montague). All edges in S' belong to all locally minimal triangulations.
Since only O(n^) edges can be removed from 5, this heuristic runs in polynomial time. In computational experiments, Dickerson and Montague have shown that for moderate sized inputs (between 100 and 200 points), the set of edges in S' is very likely to form a connected subgraph of the minimum weight triangulation. The minimum weight triangulation itself can then be found by dynamic programming. 7. Is the graph found by Dickerson and Montague always connected! Can one test in polynomial time whether a given edge belongs to some locally minimal triangulation! Can one find the exact minimum weight triangulation in polynomial timel OPEN PROBLEM
3.2. Low-dilation planar graphs We next consider the problem of constructing planar networks with low dilation (maximal ratio between graph and geometric distance). Clearly it will not always be possible to find networks with dilation very close to 1; for instance, any planar graph connecting the vertices of a square has dilation \/2.
Spanning trees and spanners
449
Fig. 6. (a) Diamond property: one of two isosceles triangles on edge is empty, (b) Graph violating good polygon property: ratio of diagonal to boundary path is high.
The initial work on this problem has been to show that various previously studied graphs had constant dilation. Chew [39] showed that the rectilinear Delaunay triangulation has dilation at most \/T0- (Note that the dilation here is measured in the Euclidean metric even though the triangulation itself is defined with the rectilinear metric. There is a factor of V2 lost in the translation; the rectilinear Delaunay triangulation has rectilinear dilation \f5.) Chew also pointed out that by placing points around the unit circle, one could find examples for which the Euclidean Delaunay triangulation was made to have dilation as much as n/l. In the joumaL version of his paper [40], Chew added a further result, that the graph obtained by Delaunay triangulation for a convex distance function based on an equilateral triangle has dilation at most 2. Chew's conjecture that the Euclidean Delaunay dilation was constant was proved by Dobkin et al. [55], who showed that the Delaunay triangulation has dilation at most (pn where cp is the golden ratio (1 + V5)/2. Keil and Gutwin [89] further improved this bound to g^^^f .^. ^ 2.42. Das and Joseph [46] then showed that these constant dilation bounds were not unusual; in fact such bounds hold for a wide variety of planar graph construction algorithms, satisfying the following two simple conditions: • Diamond property. There is some angle of < TT, such that for any edge ^ in a graph constructed by the algorithm, one of the two isosceles triangles with ^ as a base and with apex angle a contains no other site. This property gets its name because the two triangles together form a diamond shape, depicted in Figure 6(a). For instance, because of its empty-circle property, the Delaunay triangulation satisfies the diamond property with ot = 7T/2. • Good polygon property. There is some constant d such that for each face / of a graph constructed by the algorithm, and any two sites M, V that are visible to each other across the face, one of the two paths around / from u to v has dilation at most d. Figure 6(b) depicts a graph violating the good polygon property, because two nearby sites have no short boundary path connecting them. The good polygon property is satisfies by any triangulation (with d = 1). Intuitively, if one tries to connect two vertices by a path in a graph that passes near the straight line segment between the two, there are two natural types of obstacle one encounters. The line segment one is following may cross an edge of the graph, or a face of
450
D. Eppstein
Fig. 7. Fractal )6-skeleton with unbounded dilation.
the graph; in either case the path must go around these obstacles. The two properties above imply that neither type of detour can force the dilation of the pair of vertices to be high. THEOREM 10 (Das and Joseph). Any planar graph construction algorithm satisfying the diamond and good polygon properties produces graphs with bounded dilation.
The proof is too complicated to summarize here, but is in some ways similar to the proof of Dobkin et al. [55] that the Delaunay triangulation has bounded dilation. Das and Joseph go on to show that not only Delaunay triangulations but also the greedy and minimum weight triangulations possess these two properties, and hence have bounded dilation. (The bound, while constant, is quite high and could presumably be strengthened.) It seems clear that similar results should also hold for some other triangulation methods developed since their paper, such as the min max edge length triangulation and the min max angle triangulation [60]. Constant dilation of greedy and related triangulations plays a key role in Levcopoulos and Krznaric's recent constant-factor approximation algorithm for the minimum weight triangulation [96], and Drysdale [29] has pointed out that the diamond property of minimum weight triangulation can be very helpful in pruning the edges that could potentially take part in it, and speed up exact solution methods for this triangulation. Another set of natural candidates for bounded dilation are the p-skeletons, formed by including an edge ab when no other site c forms an angle acb larger than some particular bound (depending on the parameter P). When the angle bound is 90° this is the Gabriel graph, a subgraph of the Delaunay triangulation and the relative neighborhood graph, and a supergraph of the minimum spanning tree. Skeletons with larger angle bounds have been used to find sets of edges guaranteed to be part of the minimum weight triangulation [38,88, 130]. As p approaches zero, these skeletons contain more and more edges, until eventually one forms the complete geometric graph; this limiting behavior along with the fact that the definition of yS-skeletons is closely related to Das and Joseph's diamond property hint together that these graphs might have bounded dilation. But Eppstein [67] has recently shown that a fractal construction leads to ^S-skeletons in the form of paths with unbounded dilation, for any fi >0. (Figure 7.) Curiously, there has been little or no published work on using dilation as the direct basis for constructing planar graphs (rather than constructing graphs some other way and mea-
Spanning trees and spanners
451
suring the dilation of the result). Obviously, the minimum dilation planar graph should be a triangulation, since it is never harmful to add diagonals. It seems that it should have useful properties similar to those of the Delaunay triangulation, min max angle triangulation, min max edge length triangulation, minimum weight triangulation, and other optimal triangulations, but this has apparently not been studied. For many optimal triangulation problems, the version of the problem in which one optimally completes the triangulation of a convex or simple polygon can be solved by dynamic programming [93], however even this is not obvious for the minimum dilation triangulation. A solution to this subproblem might have implications in allowing the powerful edge insertion method [22,60] to be applied to the point set version of the problem. OPEN PROBLEM 8. Is it possible to construct in polynomial time the minimum dilation triangulation of a point set, or of a simple polygon!
Clearly there still also remains a wide gap between the best upper and lower bounds (2 and \/2 respectively) on dilation of planar graphs. OPEN PROBLEM
9. What is the worst case dilation of the minimum dilation triangula-
tionl The rectilinear case of Open Problem 9 is solved: Arikati et al. [10] showed that for the L\ (or equivalently Loo) planar metrics there is always a planar 2-spanner, and that some point sets have no better spanner. 3.3. Planar dilation and weight Levcopoulos and Lingas [98] and Das and Joseph [46] brought the total weight of the graph, as well as its dilation, into the equation. Clearly the weight should be measured in terms of the minimum spanning tree, for as Das and Joseph [46] observe, any graph with bounded dilation should at least be connected. Das and Joseph [46] form a planar graph by applying a greedy triangulation algorithm to the polygons remaining between the minimum spanning tree and the convex hull of the sites. They then consider the greedy edges in decreasing order of weight, removing each edge if it is unnecessary to achieve the desired dilation. They then apply their diamond property and good polygon property criteria to bound the dilation of the resulting pruned graph. Because they only prune the greedy edges, the total weight of the spanner they construct is close to three times that of the minimum spanning tree. Althofer et al. [8,9] later generalized this pruning strategy to arbitrary graphs. Given any graph, and any parameter r > 0, their method again considers the edges of the graph in decreasing order by weight, removing each edge if it is not necessary to achieve dilation \-\-t. Obviously the result is a subgraph with dilation 1 -f ^, but they prove further that the total weight of this subgraph is 1 -\-0{n/t) times that of the graph's minimum spanning tree, and that the number of edges is 0(^^~^^^^/^^). For planar graphs these bounds are much better: The weight is 1 + 0 ( 1 / 0 times that of the minimum spanning tree, and the number of edges is n(l + 0 ( 1 / 0 ) -
452
D. Eppstein
Althofer et al. then apply this method to the Delaunay triangulation, which as we have seen is a planar graph with constant dilation that also contains the Euclidean minimum spanning tree. The result is a planar spanner with constant dilation, few edges, and weight arbitrarily close to that of the minimum spanning tree. Levcopoulos and Lingas [98] proved the same result by a similar but more complicated method of pruning the Delaunay triangulation; their pruning method works only for planar graphs, but has the further advantage that it runs in linear time. The same pruning method can be used to trade weight and dilation in the other direction, and find graphs with dilation arbitrarily close to that of the Delaunay triangulation, and weight a large constant times that of the minimum spanning tree.
4. General graphs Most of the work on general geometric network design problems, in which the network to be constructed is not of some restricted class, has been on dilation of sparse graphs, since it is trivial to find a graph with low weight or diameter, or to find a non-sparse graph with low dilation.
4.1. Dilation only As we saw, for planar graphs, the dilation can not approach one. By considering nonplanar graphs, it is possible to find sparse graphs approximating the complete Euclidean graph arbitrarily closely. Specifically, Keil [87] showed that variations of the Yao graph construction (in which one partitions the space around each point into wedges with a given fixed opening angle, and connects the point to the nearest neighbor in each wedge) produce graphs with dilation arbitrarily close to 1, with 0{n) edges, and that can be constructed in time 0{n \ogn). No better time bound is possible in the randomized algebraic decision tree model of computation, since spanners could be used to solve the element distinctness problem [35]. THEOREM 11 (Keil). The Yao graph, formed by wedges of opening angle 0 < 60°, produces graphs with dilation 1 + 0(l/6>). PROOF. TO find a path in this graph from u to v, one at each step determines the wedge containing v and moves along a graph edge to the nearest vertex (w;) in that wedge. The worst case for the algorithm occurs when uv and uw are similar in length but widely separated in angle, in which case the distance to v is reduced by (1 — 0(1/0))uw. For 0 < 60° this reduction must be positive, and repeating the process brings us eventually to V. The total distance traveled is proportional to 1/(1 - 0(1/^)) = 1 + O(l/0) times the total reduction in distance to v, which is exactly the original distance from u to v. D
Althofer et al. [8,9] observed that this result holds in any dimension, and Ruppert and Seidel [115] modify the technique so that orthogonal range searching methods can be used in its construction, improving its running time in high dimensions to 0(n log*^"^ n).
Spanning trees and spanners
453
Callahan [31] improved the dependence between the number of edges and the dilation, as well as the construction time, in this result: THEOREM 12. If one forms a well-separated pair decomposition, and chooses a representative edge from each pair, the resulting graph has 0{n) edges and can be made to have dilation arbitrarily close to one {as a function of the separation parameter of the decomposition). PROOF. We find a short path between two sites u and v by the following recursive process: by the definition of a well-separated pair decomposition, the decomposition includes some pair ([/, V) of sets of sites for which w is in t/ and i; is in V. Find the edge u'W representing the pair {U, V), and form a path by recursively connecting u to u', following edge u'v', and connecting v' to v. If the parameter of separation in the decomposition is s, and the length of wi; is r, the length of u'v' can be at most r{s -\- A)/s, and the length of uu' and vv' can be at most 2r/s. Therefore this recursive algorithm produces a path with length satisfying the recurrence
L{r) ^ r(l + A/s) + 2L{2r/s). If ^ > 4, this solves to 0(r), and for any e > 0 one can choose a sufficiently large s for which the solution to this recurrence i s r ( l + £ ) . D As in his approximation to the Euclidean minimum spanning tree, Callahan further shows that the dependence on e can be reduced by choosing more carefully the representative edge for each pair in the well separated pair decomposition. Similar constructions of sparse spanners with a larger dependence on the dilation were also given by Salowe [116] and Vaidya [129].
4.2. Dilation and weight Note that the small-dilation graphs described above may have very high weight. As we have already seen, it is possible for planar sites to construct small-dilation graphs with weight arbitrarily close to that of the minimum spanning tree. The greedy algorithm of Althofer et al. [8,9] (described in the section on planar graphs) was defined for any graph, and so produces spanners with nontrivial weight bounds in any dimension; but in general the results proved by those authors are far from the constant factor over minimum spanning tree weight that one would hope for. Das et al. [45] showed that applying this greedy algorithm to the complete Euclidean graph in three dimensions again produces a spanner with any given dilation t > \, and total weight 0(1) times that of the minimum spanning tree (where the constant depends on t). Chandra [33] showed that for random point sets in higher dimensions, the weight is again 0(1) times that of the minimum spanning tree. Das and Narasimhan [48] apply this greedy approach to a sparse spanner produced by clustering techniques; the dilation of the result is the product of the dilations from these two steps, which is still typically some constant. This idea speeds
454
D. Eppstein
Fig. 8. Isolation property: a cylinder around each edge is not crossed by any other edge.
up the greedy method to run in time 0{n log^ n), and produces results similar to those of Althofer et al. Chandra et al. [34] showed that, for any graph, one can construct a spanner with dilation 0(log^ n) and weight 0 ( l ) times that of the minimum spanning tree. For geometric graphs in any dimension, they construct spanners with constant dilation and weight O(logn) times that of the minimum spanning tree. They actually give two methods for this second result. One method is simply to apply the greedy algorithm; they show an O(logn) weight factor based on the gap property: the endpoints of any two edges are separated by a distance at least proportional to the smaller of the two edge lengths. The other method combines known sparse (but heavy) spanners with approximations to the traveling salesman path; the algorithm then partitions the path recursively into smaller pieces and combines spanners from representative points on each piece. Arya and Smid [141 modify and speed up the first, greedy, method: instead of adding edges incrementally when necessary to preserve the dilation, and proving that the result satisfies the gap property, they add edges unless the gap property would be violated, and show that the resulting graph has bounded dilation. With this modified greedy method they show that a graph with bounded dilation and weight 0(log/i) times that of the minimum spanning tree can be constructed in time 0{n \og^ n). Finally, Das, Narasimhan, and Salowe [49] extended the results of Das et al. [45], and showed that in any dimension the greedy algorithm produces spanners with both constant dilation and weight a constant times that of the minimum spanning tree. The dilation bound is immediate; the weight bound is reminiscent of the methods of Das and Joseph [46] in that the authors describe a collection of general conditions under which such a bound applies; further their isolation property is very similar to the diamond property of Das and Joseph. • Isolation property. There exists a constant c, such that any edge of length t produced by the given algorithm can be placed within a cylinder of radius and height c • i (Figure 8), such that the axis of the cylinder is a subset of the edge, and the cylinder does not intersect any other edge of the graph. Note that, unlike the diamond property, the cylinders are required to avoid the edges of the graph, and not just the other sites. Also note that in this definition the cylinders around each edge may intersect each other, but one can shrink them by a factor of two to avoid intersections. The exact shape of the cylinders is also unimportant.
Spanning trees and spanners
455
LEMMA 18 (Das et al.). Any geometric graph satisfying the isolation property has weight at most a constant times that of the minimum spanning tree. The proof is based on separating the edges of the graphs into groups of nearly parallel edges, and charging the length in each group to edges in the Steiner minimal tree of the sites. Das et al. also prove similar results for the leapfrog property, a generalization of the isolation property for which they give a more complicated definition. They then show that graphs produced by a version of the greedy algorithm have this property. This then proves that the greedy algorithm produces spanners with weight 0(1) times that of the minimum spanning tree. 4.3. Dilation, weight, and degree Perhaps the ultimate results in high-dimensional spanners combine dilation, weight, and vertex degree. Clearly the degree bound must be at least three, since degree-two graphs may be forced to have very large dilation. Further, for any fixed bound d on the degree, one must have dilation bounded away from one by some function of d, even in the plane, as can be seen by considering the vertices of a regular d + 2-gon. Chandra et al. [34] showed that their version of the greedy method, when applied to polyhedral approximations to the Euclidean graph, produces a spanner with degree bounded by some function of the dilation, dimension, and the particular approximation. Their bound is not stated explicitly but is roughly exponential in the dimension. As we have seen these spanners also have low weight. Salowe [117] produces another bounded-degree spanner algorithm by modifying the Yao graph construction described earlier (which may have unbounded degree). The idea is simply to add edges to the spanner in order by weight, adding an edge (w, v) if there is no other edge (w, w) or (u, w) already added and having an angle close to that of (w, f). Salowe also reports that a similar degree bound applies to the spanner of Ruppert and Seidel [115] but this appears to be erroneous. However it should be possible to keep track of the next edge to be added to the graph at each step of this construction (that is, the shortest edge within a certain range of angles, connecting two points not already incident to edges in that range) by combining Ruppert and Seidel's modified Yao graph orthogonal range searching technique [115] with a method of Eppstein [62] for maintaining bichromatic closest pairs dynamically. The result would be an 0{n log^^^^ n) time algorithm to construct this bounded degree spanner. As we have already seen, Arya and Smid [14] achieved a similar time bound for an alternate bounded degree spanner. Yet another bounded-degree spanner construction is credited by Vaidya [129] to Feder and Nisan. Finally, Arya et al. [13] improved the time bounds of all these methods. The results of Arya et al. include an 0{n \ogn) time algorithm for constructing a spanner with bounded dilation, bounded degree, and weight a constant factor times the minimum spanning tree. They also give an 0{n log n) algorithm for constructing a spanner with bounded dilation on paths of O(logn) edges, bounded degree, and weight 0(log^ n) times that of the minimum spanning tree. (The idea of finding short paths with few edges was also previously considered by Arya, Mount, and Smid [15].) Therefore for any fixed dilation, one can quickly
456
D. Eppstein
find spanners with bounded degree. Further work on the problem has turned this tradeoff around, and asked how small a degree is possible to achieve bounded dilation. Salowe [117] was the first to find degree bounds that did not grow with the dimension of the problem; he showed that in any dimension, there is a degree-four graph with constant dilation. Salowe starts with any one of the bounded degree methods discussed above. Salowe's method for reducing the degree to four is then to cluster points using the nearest neighbor forest, and use these clusters to roughly halve the degree of any spanner construction method. Starting with the initial bounded degree spanner method described above and iterating this degree reduction process produces his result. This paper also contains a convenient classification of the spanner literature in terms of five parameters (dilation, time, number of edges, weight, and degree) and the class of metric space for which the spanners are defined. Salowe's paper does not however include a bound on the total weight of his spanners. Das and Heffeman [44] improved this degree-four bound, by showing that in any dimension, there is a graph with maximum degree three, at most dn edges (for any J > 1), constant dilation (depending on d), and total weight O(logn) times the minimum spanning tree weight. They state that in dimensions two and three the weight can be further reduced to 0(1) times the minimum spanning tree weight. Their technique involves similar nearest-neighbor-forest based clustering methods to those of Salowe, applied somewhat more carefully, and combined with the greedy spanners constructed by Chandra et al. [34]. The weight bound comes from summing the weight of the greedy spanner with that of the nearest neighbor forest (which as a subgraph of the minimum spanning tree has small weight). Combining this with the recent result of Das et al. [49] on constant weight bounds for the greedy spanner construction yields the following result. THEOREM 13 (Das, Heffeman, Narasimhan, and Salowe). For sites in any fixed dimension, and for any constant d ^ \, one can construct in time 0(n logn) a graph with constant dilation, degree three, at most dn edges, and weight a constant factor times that of the minimum spanning tree.
References [1] Active Geometry Group, Johns Hopkins U., Extracting the geometry of the vascular tree. Manuscript, available online at http://blaze.cs.jhu.edu/grad/lundberg/agg/projects/vasc.html. [2] P.K. Agarwal, H. Edelsbrunner, O. Schwarzkopf and E. Welzl, Euclidean minimum spanning trees and bichromatic closest pairs. Discrete Comput. Geom. 6 (1991), 407^22. [3] P.K. Agarwal, A. Efrat and M. Sharir, Vertical decomposition of Shallow levels in 3-dimensional arrangements and its applications, Proc. 11th ACM Symp. Comp. Geom. (1995), 39-50. [4] P.K. Agarwal, J. Matousek and S. Suri, Farthest neighbors, maximum spanning trees and related problems in higher dimensions, Comput. Geom. 1 (1992), 189-201. [5] A. Aggarwal, L.J. Guibas, J. Saxe and P.W. Shor, A linear time algorithm for computing the Voronoi diagram of a convex polygon. Discrete Comput. Geom. 4 (1989), 591-604. [6] O. Aichholzer, F. Aurenhammer, M. Taschwer and G. Rote, Triangulations intersect nicely. Discrete Comput. Geom. 16 (1996), 339-359. [7] N. Alon, S. Rajagopalan and S. Suri, Long non-crossing configurations in the plane. Fund. Inform. 22 (1995), 385-394.
Spanning trees and spanners
457
[8] I. Althofer, G. Das, D. Dobkin and D. Joseph, Generating sparse spanners for weighted graphs, Proc. 2nd Scand. Worksh. Algorithm Theory, Springer LNCS 447 (1990), 26-37. [91 I. Althofer, G. Das, D. Dobkin, D. Joseph and J. Soares, On sparse spanners of weighted graphs. Discrete Comput. Geom. 9 (1993), 81-100. [101 S. Arikati, D.Z. Chen, L.R Chew, G. Das, M. Smid and CD. Zaroliagis, Planar spanners and approximate shortest path queries among obstacles in the plane, Proc. 4th Eur. Symp. Algorithms, Springer LNCS 1136(1996), 514-528. [11] S. Arora, Polynomial time approximation schemes for Euclidean TSP and other geometric problems, Proc. 37th IEEE Symp. Foundations of Comp. Sci. (1996), 2-11. [12] S. Arora, Nearly linear time approximation schemes for Euclidean TSP and other geometric problems. Manuscript (1997). [13] S. Arya, G. Das, D.M. Mount, J.S. Salowe and M. Smid, Euclidean spanners: Short, thin, and lanky, Proc. 27th ACM Symp. Theory of Computing (1995), 489^98. Available onhne at http ://w WW. cs. umd. edu/~ mount/Papers/stoc95. ps. [14] S. Arya and M. Smid, Efficient construction of a bounded degree spanner with low weight, Proc. 2nd Eur. Symp. Algorithms, Springer LNCS 855 (1994), 48-59. [15] S. Arya, D. Mount and M. Smid, Randomized and deterministic algorithms for geometric spanners of small diameter, Proc. 35th IEEE Symp. Foundations of Comp. Sci. (1994), 703-712. Available online at http://www.cs.umd.edu/~mount/Papers/focs94.ps. [16] T. Asano, B. Bhattacharya, M. Keil and F. Yao, Clustering algorithms based on minimum and maximum spanning trees, Proc. 4th ACM Symp. Comp. Geom. (1988), pp. 252-257. [17] B. Awerbuch, Y. Azar, A. Blum and S. Vempala, Improved approximation guarantees for minimum-weight k-trees and prize-collecting salesmen, Proc. 27th ACM Symp. Theory of Computing (1995), 211-1%Z. Available online at http://www-cgi.cs.cmu.edU/afs/cs.cmu.edu/Web/People/avrim/Papers/prizetsp.ps.Z. [18] A.I. Barvinok, Two algorithmic results for the traveling salesman problem. Manuscript (1994). [19] J. Basch, L.J. Guibas and J. Hershberger, Data structures for mobile data, Proc. 8th ACM-SIAM Symp. Discrete Algorithms (1997), lM-156. [20] J. Basch, L.J. Guibas and L. Zhang, Proximity problems on moving points, Proc. 11th ACM Symp. Comput. Geom. (1997), 344-351. [21] J.L. Bentley and J. Saxe, Decomposable searching problems I: Static-to-dynamic transformation, J. Algorithms 1 (1980), 301-358. [22] M. Bern, H. Edelsbrunner, D. Eppstein, S. Mitchell and T.S. Tan, Edge-insertion for optimal triangulations. Discrete Comput. Geom. 10 (1993), 47-65. [23] M. Bern and D. Eppstein, Mesh generation and optimal triangulation. Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds, World Scientific (1992); 2nd ed. (1995), 47-123. [24] M. Bern and D. Eppstein, Worst-case bounds for subadditive geometric graphs, Proc. 9th ACM Symp. Comp. Geom. (1993), 183-188. [25] M. Bern and D. Eppstein, Approximation algorithms for geometric problems. Approximation algorithms for NP-Hard Problems, D. Hochbaum, ed., PWS Pubhshing (1996), 296-345. [26] M. Bern, D. Eppstein and S.-H. Teng, Parallel construction of quadtrees and quality triangulations, Proc. 3rd Worksh. Algorithms and Data Structures, Springer LNCS 709 (1993), 188-199. [27] A. Blum, P. Chalasani and S. Vempala, A constant-factor approximation for the k-MST problem in the plane, Proc. 27th ACM Symp. Theory of Computing (1995), 294-302. Available online at http://wwwcgi.cs.cmu.edu/afs/cs.cmu.edu/Web/People/avrim/Papers/planarktrees.ps.Z. [28] A. Blum, R. Ravi and S. Vempala, A constant-factor approximation algorithm for the k-MST problem, Proc. 28th ACM Symp. Theory of Computing (1996). [29] H. Bronnimann, Computational Geometry Tribune, No. 3, available online at http://www.inria.fr/prisme/ personnel/bronnimann/cgt/cgt3.ps.Z. [30] L. Cai and D. Cornell, Tree spanners, SIAM J. Discrete Math. 8 (1995), 359-388. [31] P.B. Callahan, The Well-Separated Pair Decomposition and its Applications, PhD thesis, Johns Hopkins U. (1995). Available online at ftp://ftp.cs.jhu.edU/pub/callahan/dissertation.ps.Z. [32] P.B. Callahan and S.R. Kosaraju, A decomposition of multidimensional point sets with applications to k-nearest neighbors and n-body potential fields, J. ACM 42 (1995), 67-90.
458
D. Eppstein
[33] B. Chandra, Constructing sparse spanners for most graphs in higher dimensions. Inform. Process. Lett. 51 (1994), 289-294. [34] B. Chandra, G. Das, G. Narasimhan and J. Soares, New sparseness results on graph spanners, Intemat. J. Comput. Geom. Appl. 5 (1995), 125-144. [35] D.Z. Chen, G. Das and M. Smid, Lower bounds for computing geometric spanners and approximate shortest paths, Proc. 8th Canad. Conf. Comput. Geom., Carleton Univ. Press. (1996), 155-160. [36] D. Cheriton and R.E. Tarjan, Finding minimum spanning trees, SIAM J. Comput. 5 (1976), 310-313. [37] S.Y. Cheung and A. Kumar, Efficient quorumcast routing algorithms, Proc. IEEE Conf. Computer Communications, Vol. 2 (1994), 840-847. [38] S. Cheng and Y. Xu, Approaching the largest ^-skeleton within the minimum weight triangulation, Proc. 12th ACM Symp. Comp. Geom. (1996), 196-203. [39] L.P. Chew, There is a planar graph almost as good as the complete graph, Proc. 2nd ACM Symp. Comp. Geom. (1986), 169-177. [40] L.P. Chew, There are planar graphs almost as good as the complete graph, J. Comput. System. Sci. 39 (1989), 205-219. [41] L.P. Chew and R.L. Drysdale, Voronoi diagrams based on convex distance functions, Proc. 1st ACM Symp. Comp. Geom. (1985), 235-244. [42] N. Christofides, Worst-case analysis of a new heuristic for the traveling salesman problem. Report 388, Grad. Sch. Industrial Admin., Carnegie Mellon U. (1975). [43] C. Chiang, M. Sarrafzadeh and C.K. Wong, A powerful global router based on Steiner min-max trees, Proc. IEEE Int. Conf. CAD (1989), 2-5. [44] G. Das and P.J. Heffeman, Constructing degree-3 spanners with other sparseness properties, Proc. 4th Int. Symp. Algorithms and Computation, Springer LNCS 762 (1993), 11-20. [45] G. Das, P.J. Heffeman and G. Narasimhan, Optimally sparse spanners in ^-dimensional Euclidean space, Proc. 9th ACM Symp. Comp. Geom. (1993), 53-62. [46] G. Das and D. Joseph, Which triangulations approximate the complete graph? Proc. Int. Symp. Optimal Algorithms, Springer LNCS 401 (1989), 168-192. [47] G. Das, S. Kapoor and M. Smid, On the complexity of approximating Euclidean traveling salesman tours and minimum spanning trees, Proc. 16th Conf. Found. Software Tech. and Theor. Comput. Sci., Springer LNCS 1180 (1996), 64-75. [48] G. Das and G. Narasimhan, A fast algorithm for constructing sparse Euclidean spanners, Proc. 10th ACM Symp. Comp. Geom. (1994), 132-139. [49] G. Das, G. Narasimhan and J. Salowe, A new way to weigh malnourisheed Euclidean graphs, Proc. 6th ACM-SIAM Symp. Discrete Algorithms (1995), 215-222. [50] A. Datta, H.-P. Lenhof, C. Schwarz and M. Smid, Static and dynamic algorithms for k-point clustering problems, J. Algorithms 19 (1995), 474-503. [51] O. Devillers, S. Meiser and M. Teillaud, Fully dynamic Delaunay triangulation in logarithmic expected time per operation, Comput. Geom. 2 (1992), 55-80. [52] T. Dey, Improved bounds for k-sets and kth levels. Manuscript (1997). [53] M. Dickerson and M. Montague, A (usually?) connected subgraph of the minimum weight triangulation, Proc. 12th ACM Symp. Comp. Geom. (1996), 204-213. Available online at ftp://ams.sunysb. edu/pub/geometry/msi-workshop/95/dickerso.ps.gz. See also http://www.middlebury.edu/~dickerso/ mwtskel.html. [54] M. Dickerson and M. Montague, The exact minimum weight triangulation, Proc. 12th ACM Symp. Comp. Geom. (1996). [55] D.P Dobkin, S.J. Friedman and K.J. Supowit, Delaunay graphs are almost as good as complete graphs. Discrete Comput Geom. 5 (1990), 399-407. [56] R.L. Drysdale, A practical algorithm for computing the Delaunay triangulation for convex distance functions, Proc. 1st ACM-SIAM Symp. Discrete Algorithms (1990), 159-168. [57] D.-Z. Du and F.K. Hwang, The state of the art in Steiner ratio problems. Computing in Euclidean Geometry, D.-Z. Du and RK. Hwang, eds. World Scientific (1992); 2nd ed. (1995), 195-224. [58] H. Edelsbrunner, L.J. Guibas and J. Stolfi, Optimal point location in a monotone subdivision, SIAM J. Comput. 15 (1986), 317-340.
Spanning trees and spanners
459
[59] H. Edelsbrunner and T.S. Tan, A quadratic time algorithm for the minmax length triangulation, Proc. 32nd IEEE Symp. Foundations of Comp. Sci. (1991), 414-^23. [60] H. Edelsbrunner, T.S. Tan and R. Waupotitsch, A polynomial time algorithm for the minmax angle triangulation, SIAM J. Sci. Statist. Comput. 13 (1992), 994^1008. [61] D. Eppstein, Offline algorithms for dynamic minimum spanning tree problems, J. Algorithms 17 (1994), 237-250. [62] D. Eppstein, Dynamic Euclidean minimum spanning trees and extrema of binary functions. Discrete Comput. Geom. 13 (1995), 237-250. [63] D. Eppstein, Average case analysis of dynamic geometric optimization, Comput. Geom. 6 (1996), 45-68. [64] D. Eppstein, Geometric lower bounds for parametric matroid optimization. Discrete Comput. Geom., to appear. [65] D. Eppstein, Faster geometric k-point MST approximation, Comput. Geom. 8 (1997), 231-240. [66] D. Eppstein, Faster circle packing with application to nonobtuse triangulation, Intemat. J. Comput. Geom. Appl. 7 (5) (1997), 485-491. [67] D. Eppstein, Beta-skeletons have unbounded dilation. Tech. Rep. 96-15, UC Irvine, Dept. Inf. & Comp. Sci. (1996). [68] D. Eppstein and J. Erickson, Iterated nearest neighbors and finding minimal polytopes. Discrete Comput. Geom. 11 (1994), 321-350. [69] D. Eppstein, Z. Galil, G.F. Italiano and A. Nissenzweig, Sparsification - A technique for speeding up dynamic graph algorithms, Proc. 33rd IEEE Symp. Foundations of Comp. Sci. (1992), 60-69. [70] D. Eppstein, G.F. Italiano, R. Tamassia, R.E. Tarjan, J. Westbrook and M. Yung, Maintenance of a minimum spanning forest in a dynamic plane graph, J. Algorithms 13 (1992), 33-54. [71] D. Femandez-Baca, G. Slutski and D. Eppstein, Using sparsification for parametric minimum spanning tree problems, Nordic J. Comput. 3 (1996), 352-366. [72] M. Fredman and D.E. Willard, Trans-dichotomous algorithms for minimum spanning trees and shortest paths, Proc. 31st IEEE Symp. Foundations of Comp. Sci. (1990), 719-725. [73] H.N. Gabow, Z. Galil, T. Spencer and R.E. Tarjan, Efficient algorithms for finding minimum spanning trees in undirected and directed graphs, Combinatorica 6 (1986), 109-122. [74] M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W.H. Freeman (1979). [75] N. Garg and D.S. Hochbaum, An 0(log k) approximation for the k minimum spanning tree problem in the plane, Proc. 26th ACM Symp. Theory of Computing (1994), 432^38. [76] P.D. Gilbert, New results in planar triangulations. Report R-850, U. Illinois Coordinated Science Lab. (1979). [77] D. Grigoriev, M. Karpinski, F. Meyer auf der Heide and R. Smolensky, A lower bound for randomized algebraic decision trees, Proc. 28th ACM Symp. Theory of Computing (1996), 612-619. [78] L.J. Guibas, D.E. Knuth and M. Sharir, Randomized incremental construction of Delaunay and Voronoi diagrams, Algorithmica 7 (1992), 381^13. [79] D. Gusfield, Bounds for the parametric spanning tree problem, Proc. Humboldt Conf. Graph Th., Combinatorics and Computing, Utilitas Mathematica (1979), 173-183. [80] S. Haruyama and D. Fussell, A new area-efficient power routing algorithm for VLSI layout, Proc. IEEE Int. Conf. CAD (1987), 3 8 ^ 1 . [81] M.R. Henzinger and V. King, Maintaining minimum spanning trees in dynamic graphs. Tech. Rep. DCS251-IR, Univ. of Victoria, Dept. of Computer Science (1997). [82] J.-M. Ho, D.T. Lee, C.-H. Chang and C.K. Wong, Minimum diameter spanning trees and related problems, SIAM J. Comput. 20 (1991), 987-997. [83] M.A.B. Jackson, A. Srinivasan and E.S. Kuh, Clock routing for high-performance IC's, Proc. 27th ACM/IEEE Design Automation Conf. (1990), 573-579. [84] A. Kahng, J. Cong and G. Robins, High-performance clock routing based on recursive geometric matching, Proc. 28th ACM/IEEE Design Automation Conf. (1991), 322-327. [85] D. Karger, P.N. Klein and R.E. Tarjan, A randomized linear-time algorithm to find minimum spanning trees, J. ACM 42 (1995), 321-328. [86] N. Katoh, T. Tokuyama and K. Iwano, On minimum and maximum spanning trees of linearly moving points. Discrete Comput. Geom. 13 (1995), 161-176.
460
D. Eppstein
[87] J.M. Keil, Approximating the complete Euclidean graph, Proc. 1st Scand. Worksh. Algorithm Theory, Springer LNCS 318 (1988), 208-213. [88] J.M. Keil, Computing a subgraph of the minimum weight triangulation, Comput. Geom. 4 (1994), 13-26. [89] J.M. Keil and C.A. Gutwin, The Delaunay triangulation closely approximates the complete Euclidean graph. Discrete Comput. Geom. 7 (1992), 13-28. [90] S. Khuller, B. Raghavachari and N. Young, Low degree spanning trees of small weight, SIAM J. Comput. 25 (1996), 355-368. [91] S. Khuller, B. Raghavachari and N. Young, Balancing minimum spanning trees and shortest-path trees, Algorithmica 14 (1995), 305-321. [92] D. Kirkpatrick, Optimal search in planar subdivision, SIAM J. Comput. 12 (1983), 28-35. [93] G.T. Klincsek, Minimal triangulations of polygonal domains, Ann. Discrete Math. 9 (1980), 121-123. [94] E. Lawler, J.K. Lenstra, A.H.G. Rinnooy Kan and D.B. Shmoys, The Traveling Salesman Problem: A Guided Tour of Combinatorial Optimization, Wiley (1985). [95] C. Levcopoulos, An Q{y/n) lower bound for non-optimality of the greedy triangulation. Inform. Process. Lett. 25 (1987), 247-251. [96] C. Levcopoulos and D. Krznaric, Quasi-greedy triangulations approximating the minimum weight triangulation, Proc. 7th ACM-SIAM Symp. Discrete Algorithms (1996), 392-401. [97] C. Levcopoulos and A. Lingas, On approximation behavior of the greedy triangulation for convex polygons, Algorithmica 2 (1987), 175-193. [98] C. Levcopoulos and A. Lingas, There are planar graphs almost as good as the complete graphs and as short as minimum spanning trees, Proc. Int. Symp. Optimal Algorithms, Springer LNCS 401 (1989), 9-13. [99] R.J. Lipton and R.E. Tarjan, Applications of a planar separator theorem, SIAM J. Comput. 9 (1980), 615-627. [100] E.L. Lloyd, On triangulations of a set ofpoints in the plane, Proc. 18th IEEE Symp. Foundations of Comp. Sci. (1977), 228-240. [101] G.K. Manacher and A.L. Zobrist, Neither the greedy nor the Delaunay triangulation approximates the optimum. Inform. Process. Lett. 9 (1979), 31-34. [102] C.S. Mata and J.S.B. Mitchell, Approximation algorithms for geometric tour and network design problems, Proc. 11th ACM Symp. Comp. Geom. (1995), 360-369. [103] D. McCallum and D. Avis, A linear algorithm for finding the convex hull of a simple polygon, Inform. Process. Lett. 9 (1979), 201-206. [104] K. Mehlhom, S. Meiser and C. O'Dunlaing, On the construction of abstract Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 211-224. [105] J.S.B. Mitchell, Guillotine subdivisions approximate polygonal subdivisions: A simple new method for the geometric k-MSTproblem, Proc. 7th ACM-SIAM Symp. Discrete Algorithms (1996), 402-408. [106] C. Monma, M. Paterson, S. Suri and F. Yao, Computing Euclidean maximum spanning trees, Algorithmica 5 (1990), 407^19. [107] C. Monma and S. Suri, Transitions in geometric spanning trees. Discrete Comput. Geom. 8 (1992), 265293. [108] K. Mulmuley, Randomized multidimensional search trees: Dynamic sampling, Proc. 7th ACM Symp. Comp. Geom. (1991), 121-131. [109] C. O'Dunlaing and C.K. Yap, A "retraction" method for planning the motion of a disc, J. Algorithms 6 (1985), 104-111. [110] S. Olariu, S. Toida and M. Zubair, On a conjecture by Plaisted and Hong, J. Algorithms 9 (1988), 597-598. [ I l l ] C.H. Papadimitriou and U. V. Vazirani, On two geometric problems related to the traveling salesman problem, J. Algorithms 5 (1984), 231-246. [112] D.A. Plaisted and J. Hong, A heuristic triangulation algorithm, J. Algorithms 8 (1987), 405^37. [113] R. Ravi, R. Sundaram, M.V. Marathe, D.J. Rosenkrantz and S.S. Ravi, Spanning trees short and small, Proc. 5th ACM-SIAM Symp. Discrete Algorithms (1994), 546-555. [114] G. Robins and J.S. Salowe, Low-degree minimum spanning trees. Discrete Comput. Geom. 14 (1995), 151-165. [115] J. Ruppert and R. Seidel, Approximating the d-dimensional complete Euclidean graph, 3rd Canad. Conf. Comp. Geom. (1991), 207-210.
Spanning trees and spanners
461
[116] J.S. Salowe, Constructing multidimensional spanner graphs, Intemat. J. Comput. Geom. Appl. 1 (1991), 99-107. [117] J.S. Salowe, Euclidean spanner graphs with degree four. Discrete Appl. Math. 54 (1994), 55-66. [118] J.S. Salowe, D.S. Richards and D.E. Wrege, Mixed spanning trees: A technique for performance-driven routing, Proc. 3rd Great Lakes Symp. VLSI Design Automation of High Performance VLSI Systems, IEEE (1993), 62-66. [119] N. Samak and R.E. Tarjan, Planar point location using persistent search trees, Comm. ACM 29 (1986), 669-679. [120] O. Schwarzkopf, Dynamic maintenance of geometric structures made easy, Proc. 32nd IEEE Symp. Foundations of Comp. Sci. (1991), 197-206. [121] Sedgewick and J. Vitter, Shortest paths in Euclidean graphs, Algorithmica 1 (1986), 31-48. [122] M.L Shamos and D. Hoey, Closest-point problems, Proc. 16th IEEE Symp. Foundations of Comp. Sci. (1975), 151-162. [123] N. Sherwani, Algorithms for VLSI Physical Design Automation, Kluwer (1993). [124] D.D. Sleator and R.E. Tarjan, A data structure for dynamic trees, J. Comput. System. Sci. 24 (1983), 362-381. [125] J.M. Steel and T.L. Snyder, Worst-case growth rates of some classical problems of combinatorial optimization, SIAM J. Comput. 18 (1989), 278-287. [126] H. Tamaki and T. Tokuyama, How to cut pseudo-parabolas into segments, Proc. 11th ACM Symp. Comput. Geom. (1995), 230-237. [127] R. Tsay, Exact zero skew, Proc. IEEE Int. Conf. CAD (1991), 336-339. [128] P.M. Vaidya, Minimum spanning trees in k-dimensional space, SIAM J. Comput. 17 (1988), 572-582. [129] P.M. Vaidya, A sparse graph almost as good as the complete graph on points in K dimensions. Discrete Comput. Geom. 6 (1991), 369-381. [130] B.-T. Yang, A better subgraph of the minimum weight triangulation. Inform. Process. Lett. 56 (1995), 255-258. [131] B.-T. Yang, Y.-F. Xu and Z.-Y You, A chain decomposition algorithm for the proof of a property on minimum weight triangulations, Proc. Int. Symp. Algorithms and Computation, Springer LNCS 834 (1994), 423-427. [132] A.C. Yao, On constructing minimum spanning trees in k-dimensional space and related problems, SIAM J. Comput. 11 (1982), 721-736. [133] A.A. Zelikovsky and D.D. Lozevanu, Minimal and bounded trees, Proc. Tezele Cong. XVIII Acad. Romano-Americane, Kishinev (1993) 25-26.
This Page Intentionally Left Blank
CHAPTER 10
Geometric Data Structures Michael T. Goodrich* Center for Geometric Computing, Department of Computer Science, Johns Hopkins University, Baltimore, MD 21218 E-mail: [email protected]
Kumar Ramaiyer^ Informix Software, Inc., 1111, Broadway, Suite 2000, Oakland, CA 94607 E-mail: rk@ Informix, com
Contents 1. Introduction 1.1. Problem classification and goals 1.2. Chapter outline 2. Embedded planar graphs 2.1. The Doubly Connected Edge List (DCEL) 2.2. The winged-edge representation 2.3. The quad-edge representation 2.4. Well known PSLGs 3. Planar point location and ray shooting 3.1. The slab method 3.2. The trapezoid method 3.3. The chain method 3.4. Improving the chain method via fractional cascading 4. Dynamic point location 4.1. The inter-laced trees technique 5. Convex hulls and convex polytopes 5.1. J-dimensional representations 5.2. 2-dimensional dynamic maintenance 5.3. 3-dimensional subdivision hierarchies
465 465 466 466 467 468 469 469 471 471 473 474 475 480 481 482 482 483 483
*This research supported by the NSF under Grant CCR-9625289, and by ARC under grant DAAH04-96-1-0013. Author's homepage: h t t p : //www. c s . j h u . e d u / g o o d r i c h / . ^This research supported by the NSF under Grant CCR-9300079, and by ARC under grant DAAH04-96-1-0013. Author's homepage: h t t p : //www. c s . j h u . e d u / g r a d / k u m a r / . HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
463
464
M T. Goodrich and K. Ramaiyer
6. Rectilinear data structures 6.1. k-D trees and quadtrees 6.2. Segment trees 6.3. Range trees 7. General techniques 7.1. Fractional cascading 7.2. Persistence 7.3. Static to dynamic conversions 7.4. Internal-memory to external-memory conversions References
484 484 485 485 485 486 486 486 487 487
Geometric data structures
465
1. Introduction Computational geometry problems often require preprocessing geometric objects into a simple and space-efficient structure so that the operations on the geometric objects can be performed repeatedly in an efficient manner. We refer to this as the "geometric data structuring" approach. This approach has been widely used by several researchers to design very elegant data structures to solve a number of geometry problems [15,22,26,32,36,4345,56,63]. Classic data structures hke lists, trees, and graphs are by themselves not sufficient to represent geometric objects as either they are generally one dimensional in nature or do not capture the rich structural properties of the geometric objects in the domain. For example, in a planar subdivision the clockwise and counter-clockwise orderings of edges around a vertex are often useful for solving many problems involving subdivisions (e.g, see Guibas and Stolfi [41]). Similarly, facial ordering and connectivity information of subdivisions is often needed and requires special representation. If one is given a collection of horizontal segments in M^, for example, one may like to represent the endpoints, and also some representation of the "aboveness" partial order (e.g., see Edesbrunner [34]). Higher dimensional geometric objects define even richer relationships and likewise cannot be easily represented by the classical data structures, and require careful study. Even with this short list of examples one can see that geometric data requires the representation of relationships that cannot be represented using strictly numeric or combinatoric data structures. Indeed, it is the interplay of numeric and combinatoric data that makes the design of efficient geometric data structures an interesting and challenging research domain.
1.1. Problem classification and goals Data structuring problems involving geometric objects vary and are often classified as follows: Static: In this case all the geometric objects in the problem domain are given as part of the input. Online: In this case new geometric objects are allowed to be added to the problem domain, but cannot be deleted. Dynamic: In this most general case new geometric objects are allowed to be added and some existing objects are allowed to be deleted from the problem domain. In addition, data structures used for storing geometric objects should ideally achieve all of the following goals: • • • • •
capture structural information, allow for efficient query processing, allow for efficient updates, optimize the space required, and store objects efficiently so as to minimize the number of I/O accesses, when the input size is very large.
466
M. T. Goodrich and K. Ramaiyer
1.2. Chapter outline In this chapter we review and highUght research on geometric data structures, describing important examples for each of the above problem classifications. In each case we review we sketch how well it achieves the basic goals of geometric data structure design. In the next section, we describe methods for representing embedded straight line graphs, which arise in a number of computational geometry contexts, including the construction and maintenance of fundamental geometric structures, including convex hulls, Voronoi diagrams, Delaunay triangulations, and arrangements. In Section 3, we review several methods for performing an important search operation in such subdivisions — the point location search, and we give a short review of dynamic methods for solving this problem in Section 4. In Section 5, we discuss some methods for representing convexity, and, in Section 6, we describe some data structures for representing data that is rectilinear (i.e., aligned with the coordinate axes). Finally, in Section 7, we discuss some general techniques for designing geometric data structures. Since geometric data structures are fundamental in the design and implementation of geometric computations, there are necessarily a number of interesting geometric data structures that we will not be discussing in this chapter. Fortunately, many of these are covered in other chapters of this Handbook [60]. In particular, a number of spatial and rectilinear structures for higher-dimensional spaces are discussed in Chapter 17. In addition, general techniques for designing randomized geometric data structures are covered in Chapters 13 and 16. Data structures for shortest paths and ray shooting are discussed in Chapters 15 and 12. In addition, the important and related visibility graph structure is discussed in Chapter 22. Other visibility related questions are covered in Chapter 19. An interesting variation of the data structuring problem is covered in Chapters 15 and 20, where one is allowed to answer queries approximately. There are also a host of interesting data structures that are based upon ^-nets and spanning trees with low stabbing numbers, which are topics covered in Chapters 1, 2, and 13. Finally, fundamental to the issue of geometric representations is the issue of numeric stability, which is covered in Chapter 14. We highlight in the following sections various geometric data structures and we also discern some of the general principles behind data structure design for geometric structures.
2. Embedded planar graphs A graph G = (V, £") is said to be embedded in a surface S when it is drawn on S so that no two edges intersect. A graph i^ planar if it can be embedded in the plane; di plane graph has already been embedded in the plane [42], in which case it makes sense to define the set F of faces of G. A planar graph can always be embedded in the plane so that all its edges are straight-line segments [37] and such an embedded graph is called planar straight line graph (PSLG). The planar graphs play an important role in many two-dimensional computational geometry problems, for an embedded planar graph represents a planar subdivision, which is a structure that arises in several useful applications, including include arrangements of lines, Voronoi diagrams, Delaunay triangulations, and general triangulations.
Geometric data
structures
467
A measure of the usefulness of an embedded graph representation is that such a representation should allow for efficient traversal of edges around a vertex (in clockwise and counter-clockwise directions), and it should allow for the efficient access of all edges bounding a face and all the faces incident on a vertex. In addition, it is very important for such a representation to preserve the topology of the embedding of the planar graph, as a given planar graph may have several embeddings. Once the embedding of a planar graph is given in the form of a planar straight line graph, one of the simplest representation is to represent the graph as a collection of simple polygons. This representation is not flexible enough for traversal, however. Representations for embedded planar graphs that do allow for efficient traversals include the doubly connected edge list or DCEL [57], the winged-edge structure [3], and the quad-edge structure [41]. Let us therefore review each of these representations.
2.1. The Doubly Connected Edge List (DCEL) Muller and Preparata [50,57] designed a PSLG representation, which they called the doubly-connected edge hst (or DCEL). The DCEL for a PSLG G = (V, E, F) has a collection of edge nodes. This representation treats each edge as a directed edge; hence, it imposes an orientation on each edge. Each edge node e = (va, vt) is a structure consisting of six fields: • Vo, representing the origin vertex (u^), • Vj, representing the destination vertex {vh), • Fu representing the left face as we traverse on e from VQ to Vj, • Fr, representing the right face as we traverse on e from Vo to Vj, • CCWo, representing the counter-clockwise successor of e around Vo, and • CCWd, representing the counter-clockwise successor of e around V^. The Figure 1 shows the DCEL representation of the edge e\ in the subdivision given. From the DCEL representation in linear time one can easily extract the edges around faces (in clockwise-order) and the edges around a vertex (in counter-clockwise order). To
Vo Vd
Fi
F,
^1
n
^2
fl
fl
^2
^3
^1
fl
/o
^3
V4
^2
h
/o
CCWoCCWd ^2
Fig. 1. A DCEL representation of an embedded planar graph.
^3
468
M.T. Goodrich and K. Ramaiyer
get the other ordering information efficiently, however, one needs to dupHcate the edges of the PSLG with opposite orientations from their original orientations and store a DCEL for this orientation as well. Once edges are duplicated and oriented in the opposite direction, one can access the edges bounding a face in counter-clockwise direction and edges around a vertex in clockwise direction in linear time. The total size of the DCEL representation is 0{\V\^\F\ + \E\).
2.2. The winged-edge representation The winged-edge representation was proposed by Baumgart [3] and is similar to the DCEL. Given a PSLG G = (V, E, F), the winged-edge representation stores an array for the vertices. This array stores for each vertex an arbitrary edge incident on that vertex. The winged-edge representation also stores an array for faces, which stores for each face an arbitrary edge bounding that face. For each edge e = (va, Vb) it stores the following information: • Vo, representing the origin vertex (Va), • Vj, representing the destination vertex (vt,), • F/, representing the left face as seen from Vo to Vd, • Fr, representing the right face as seen from Vo to Vd, • CWo, representing the clockwise successor of e around Vo, • CCWo, representing the counter-clockwise successor of e around Vo, • CWd, representing the clockwise successor of e around Vd, and • CCWd, representing the counter-clockwise successor of e around Vd. Thus four successor edges are stored for each edge. This allows one to do all the accesses we outUned earlier as efficiently as in a (double-orientation) DCEL. Figure 2 shows the winged-edge representation for a PSLG. The total storage needed for the winged-edge is 0 ( | y I + | F | + l^l), but the constant factor is sUghtly better than for a double-orientation DCEL.
VQ Vd F| F, CCWpCCWd CWQ CW^ ^1
V2
/2
/l
V3
V\
/2
/o
V4
V2
/l
/o
•
•
•
.
^2
^3
•
€4
^5
•
•
Fig. 2. A winged-edge representation of an embedded planar graph.
Geometric data
structures
469
Fig. 3. A quad-edge representation of an embedded planar graph. The graph and the representation are shown. The thick edges are the edges of the graph and the gray-dotted edges are the edges of the dual graph.
2.3. The quad-edge representation Guibas and Stolfi [41] proposed the quad-edge representation for the embedded planar graphs. Their structure is isomorphic to the winged-edge structure, but it is given semantics general enough to represent an undirected graph embedded in an arbitrary two-dimensional manifold. Their structure also simultaneously represents the graph-theoretic primal and the dual of a planar graph. Figure 3 shows an example representation. The total space required for the quad-edge structure is 0 ( | y | -f \F\ + l^"!), with the constants being essentially the same is for the winged-edge representation.
2.4. Well known PSLGs As a motivation for the use of these subdivision representation, let us briefly review some of the well-known geometric structures that are special cases of PSLGs. These structures are treated in greater detail in other chapters of this Handbook. Line arrangements. Given a set of lines in the plane, the intersection of lines form a structure that is referred to as the arrangement. This structure is a planar subdivision. This is a very useful structure and has number of applications. Since any two non-parallel lines intersect, if the given set of n lines does not contain any pair of parallel lines, then the number of intersections is 0(n^) and hence the size of arrangement is 0(n^). There are algorithms for computing the arrangement of lines in 0(n^) time, which is of course optimal. Figure 4 shows an example arrangement of lines. The arrangement is a PSLG and can be represented using one of the data structures discussed in the previous section.
470
M. T. Goodrich and K. Ramaiyer
Fig. 4. Arrangements of lines in a plane.
Fig. 5. The Voronoi diagram and Delaunay triangulation of a point set. The thick edges represent the triangulation and the thin edges represent the Voronoi diagram.
Voronoi diagrams and Delaunay triangulations. Given a collection of points and a metric, say L2, one can define a geometric structure called the Voronoi diagram. This is a very useful geometric structure for answering number of useful questions one can ask about a collection of points, including closest pairs and nearest neighbors. The Voronoi diagram for a set of points is a PSLG. Each face in the graph contains an unique point from the given set. Each face is a locus of points in the plane which are closer to the point inside it, than to any other point in the given set. A related structure, the Delaunay triangulation, is the graph-theoretic planar dual of the Voronoi diagram in which the faces and vertices are interchanged while preserving the incidence relationships (which forms a triangulation if the original points are in general position). Figure 5 shows a Voronoi diagram. Both the Delaunay triangulation and the Voronoi diagram have a wide variety of uses; and they are PSLG's. We can therefore use
Geometric data structures
All
one of the above representations (DCEL, quad-edge, or winged-edge) to store Voronoi diagrams and Delaunay triangulations. Interestingly, the quad-edge representation has the added advantage of being able to simultaneously represent both the Voronoi diagram and the Delaunay triangulation of a point set using a single representation. In the next section we study how to perform searches like point location or ray shooting in PSLG structures such as arrangements and Voronoi diagrams.
3. Planar point location and ray shooting The planar point location problem is one of the fundamental computational geometry problems and has several applications. This problem has been studied by several researchers [22,31,32,36,44,45,56,63], and there are a number of efficient solutions. The problem in its widely studied form is stated as follows: Given a planar subdivision in the form of a PSLG (using one of the representations discussed in the previous section), preprocess the subdivision and store it in a data structure so as to answer queries of the form "given a query point p find the face of the subdivision containing p'\ This query is typically answered by performing a vertical ray shooting query from /?, where one determines the first segment(s) in the PSLG hit by vertical rays emanating out of p. The important criteria for judging solutions to the point location problem are the space occupied by the data structure and the query time it allows. The preprocessing time is also an important criterion, but is generally not considered as critical as the others, since it amounts to a one-time cost. Variations of the problem as stated above include methods for special types of subdivision i.e., introducing constraints on the shapes of the faces of the subdivision and the connectivity of the underlying planar graph. Different subdivisions that have been studied over the years include general subdivisions (which may not even be connected), connected subdivisions, monotone and convex subdivisions (where each face is respectively a monotone polygon or convex polygon), and rectilinear subdivisions (where only horizontal and vertical edges are used). We outline below the various data structures used for solving the point location problem.
3.1. The slab method The "slab" method proposed by Dobkin and Lipton [31] is historically the first non-trivial method to solve the point location problem, and it is suitable for the most general types of subdivisions. The idea is very simple. Since general subdivisions can be of an arbitrary nature, their basic idea is to partition the subdivision into a collection of vertical slabs so that each slab contains only triangles and trapezoids. The partition is done as follows: one draws vertical lines through each of the vertices of the subdivision. This partitions the subdivision into 0(n) slabs. The slabs have the property
472
M.T. Goodrich andK.
Ramaiyer
Fig. 6. The slab method: Partitioning the subdivision into vertical slabs consisting of trapezoids.
that none of the edges inside the slab cross each other and the edges either cross the vertical boundaries of the slab or two or more edges meet at a vertex through which the vertical boundary Hne of the slab passes through. Thus, each slab contains a collection of triangles and trapezoids with vertical boundaries. Dobkin and Lipton store this collection of slabs in a data structure to perform point location as follows: the slabs are totally ordered left-to-right by the JC-coordinates of the vertices and hence can be stored using any balanced binary search tree structure. Call this search tree A. The edges within each slab are totally ordered by the "above" relationship, i.e., given a point and the supporting Hne of an edge inside the slab, one can find out whether the point is above or below the edge. ^ This total order relationship (in each slab) can also be stored using a balanced binary search tree. Let us call the collection of search trees for all the slabs as B. The point location is done as follows: given a query point /? = (XQ, yo), we first use the x-coordinate of p, i.e., JCQ to identify the slab in which the point lies by doing a binary search in A. Once the slab is identified, the corresponding binary tree in B storing the trapezoids within the slab is searched by performing "aboveness" comparisons. Summary: Space: Since 0{n) binary search trees (each of size 0(«)) need to be stored in B, the total space requirement is 0(«^). Query Time: To locate a point we need to perform two binary searches, and hence the query time complexity is O(logn). This is the unit-time operation that is used in the complexity measure. This operation can be implemented either by checking the point against the equation of the supporting hne or by checking whether the vertices of the edge e = {v\, V2) and the query point v^, make a "left turn" or "right turn" in the order f 1, 1*2, and 1^3.
Geometric data
structures
Al?>
3.2. The trapezoid method The slab method was improved by Preparata [56] to achieve an 0(log n) query time method with only 0(n logn) space. His method is commonly referred to as the trapezoid method, and is in principle the same as slab method as it also partitions the subdivisions into simple trapezoids. But rather than drawing 0(n) vertical lines, a recursive structure is built. The method for constructing a point location data structure using the trapezoid method is as follows. One inductively assumes one is given a trapezoid r with vertical sides containing the subdivision (initially we can use a bounding rectangle). Identify in r the "spanning" edges i.e., the edges which intersect both the vertical boundaries of r. If there are no spanning edges, then partition r again vertically at the median vertex and recurse on each side. If there are spanning edges, then partition the slab into a number of trapezoids using the spanning edges, i.e., each trapezoid has a spanning edge as its top and bottom boundaries and the vertical boundaries of the slab as its two side boundaries. Then order these trapezoids by the "above" relationship discussed in the previous section and recursively partition each such non-trivial trapezoid. Thus, one recursively partitions the subdivision, first vertically and then using the spanning edges. The vertical cuts are global and can be organized using a single binary search tree. The trapezoids within a container trapezoid r are organized using a biased search tree [4] which has the property that the depth of an item / with weight wi is 0(log W/wi), where W is the sum of the weights of all the items in the tree. Each trapezoid is assigned a weight proportional to the number of vertices within the trapezoid. Hence the resulting structure storing the subdivision is a compound structure in which the primary tree is a balanced binary search tree organizing the vertical cuts and the secondary structure is a
'
1
I
I
I
1 1 1 1
'
1
I
I
I
I I
1 1
till >
1
1
> 1
i ,
I 1 1 1 i 1 1 / , . . . , , . _
1
1
1
1 1 1
Fig. 7. Trapezoid method: The vertical cuts are shown in the tree as triangular nodes and the spanning cuts are shown as circular nodes.
474
M. T. Goodrich and K. Ramaiyer
biased search tree storing the trapezoids. The Figure 7 shows an example subdivision and the resulting data structure. The worst-case depth of a leaf node u in this compound structure is calculated as follows: the depth in the primary structure is O(logn), since vertical cuts are always at median X-coordinates. Suppose the depths in the different levels of secondary structures from the leaf u (weight of w = Wo = 1) to the root are 0(log Wi/Wo),0(log W2/W1),..., 0(log W/Wjt). These values form a telescoping sum that reduces to 0(log W). But the total weight W at the root is 0{n \ogn)\ hence, the worst-case depth of a leaf node in the compound structure is O(logn). Summary: Space: 0{n\ogn) as there are O(logn) levels and in each level, structures of total size 0(M) are stored. Query Time: To locate a point we need to perform alternate binary searches in the primary tree and the second tree. As argued above this is bounded by O(logn).
3.3. The chain method Lee and Preparata [45] introduced an alternative approach. Unlike the slab method and the trapezoid method, which partition the subdivision into trapezoids, their method partitions the subdivision into regions separated by "chains". A chain is a sequence of edges that either forms a cycle or a path such that the end vertices belong to the boundary of the unbounded region. This way the chain, whether it is a cycle or a path, partitions the subdivision into two parts. The method then is to first find a ^'median" chain so as to partition the subdivision into roughly two equal parts. Then recursively one finds chains in each of the subdivision to construct a "balanced tree" of chains. The point location method then proceeds by discriminating the point against the chain at the root to find the partition containing the point and then recurses at the appropriate child in the tree. The important work involved in searching such a data structure is therefore the discrimination of a point against a chain. It is easy to see that discrimination of a point against a general chain is as difficult as point location in a simple polygon and hence is not really any simpler. So Lee and Preparata restricted each chain to be monotone, thus restricting their method to monotone subdivisions (which really is not a big restriction, since we can convert a general subdivision to a monotone subdivision by a vertical decomposition construction). For any monotone chain there exists a straight line such that the line orthogonal to the line intersects the chain at most once, and this property can be exploited for point location. The Figure 8 shows the partition of a subdivision into monotone chains. The edges are shared by different chains, but the data structure stores only one copy of each edge. Lee and Preparata's point location data structure is a compound data structure that has as its primary data structure a binary tree with a separating chain associated with each vertex and the secondary data structure storing the description of each chain. The primary and secondary data structure are both balanced binary search trees, actually. During a point
Geometric data structures
475
Fig. 8. Chain method: Partition of the subdivision into monotone chains (with respect to j-axis).
location discrimination of a point versus a monotone chain is done using the description of the chain in the secondary data structure. The discrimination of point versus monotone chain (say with respect to vertical line) is done in the obvious way. The projection of y-coordinates of the vertices of the chain on the vertical line partition the line into intervals which enables a binary search and the query point is located within one of the intervals (so that the point can then be compared with the straight line supporting the edge corresponding to the interval to find out which side of the chain the point lies in). Thus, each chain discrimination can be done in O(logn) time. Summary: Space: Each edge belongs potentially to more than one chain. But by storing each edge to the highest chain in the primary data structure to which the edge belongs, the space required for the data structure can be made to be 0(f2). Query Time: The discrimination of a point with respect to a monotone chain takes O(logfz), and the depth of the primary data structure is O(logn). Thus, point location takes 0(log^ n) time using the chain method.
3.4. Improving the chain method via fractional cascading Edelsbrunner, Guibas, and Stolfi [36] propose an improvement to the chain method using a technique called fractional cascading. This technique is applicable in any general situation where there are repeated similar searches along the nodes of a path in a directed graph in which the degree of each node is bounded by constant and the set of items searched in each node are drawn from the same universe. Under these conditions one can do better than performing several independent binary searches. The list stored in each node of the graph is augmented with extra elements from the lists in the successors so as to correlate the searches in a node and its successors. We now describe the fractional cascading technique and show how to improve the chain method. In chain method, a sequence (0(logn)) of point-versus-monotone chain discriminations are performed. In each such discrimination, a search is performed using the same query point, but against different chains. Moreover, the set of _y-coordinates of the vertices of the edges against with the comparison is made is a fixed set i.e., the y-coordinates of
476
M. T. Goodrich and K. Ramaiyer
the vertices of the subdivision. Hence the conditions are favorable to apply the fractional cascading technique. In order to be concrete let us therefore review in detail how the fractional cascading technique can be applied in this case. Consider a node u in the primary structure with children i; and w. Let Cu,Cv, and Cw be the chain lists in the nodes w, v, and w respectively before augmentation. The problem is to compute appropriate augmented lists Tu,Ty, and Ty^ Stored in the nodes w, i>, and w respectively. We perform this augmentation bottom up. Assume Ty and T^j are already constructed. For an appropriate constant d {d = 4 works, for example), we select every d-th element from Ty and Tyj, respectively, and copy the elements to the list Cu to form the augmented list Tu. These copied elements are referred to as bridge elements in Tu. Moreover each element / in Tu stores additional pointers as follows: Left Bridge (Pi): Pointer to the closest bridge element (not to the left of /) copied from left child. Right Bridge (Pr)'- Pointer to the closest bridge element (not to the left of /) copied from right child. Proper (Pp): Pointer to the closest element from Cu not to the left of /. Predecessor: Pointer to the predecessor element in Tu. Bridge (P/?): Pointer to the corresponding element in Ty or Tuj (only for elements copied into Cu). The distance between two bridge elements in Tu is at most d. To perform the search, we first do a binary search using the the given query point in the list stored in the root to identify which child to search. Suppose we need to search the left child. We then follow the Left Bridge pointer of the successor element of the query point in the T list of root. From the Left Bridge we follow the Bridge pointer to the T list of the left child. We then use the Predecessor pointers to find the two elements in the T list of left child which encompass the given query point. We select the successor and then use the Proper pointer to identify the element in the C list so as to perform comparisons for branching to next level. The Figure 9 shows an example where the list at a parent node is augmented with elements from the lists in two children. Every fourth element is copied from the child to the parent. For sake of exposition, we use lists of integers. The total number of pointers traversed for crossing one level is J + 3 pointers i.e., one Left Branch pointer, one Bridge pointer, at most d Predecessor pointers, and one Proper pointer. Initial search takes O(logw) time and the subsequence searches together take 0(d\ogn) time. If d is chosen as constant, then the total search time is O(logn). Summary: Space: Edelsbrunner, Guibas, and Stolfi [36] show the total space requirement is 0(n) for an appropriate constant value of d. Query Time: O(logn), as argued above. The preprocessing time is 0(n logn).
Geometric data
3 7 10 12 13 17 25 33 34 35
structures
All
W \ 1 2 5 9 15 18 19 22 28 30 31
Fig. 9. Fractional cascading: Augmentation of list in a parent node with elements from the lists in two children. The left bridge and right bridge pointers for element 20 are shown. Similarly the proper pointer for element 9 is shown. Also the bridge pointers are shown.
Subdivision hierarchies. Historically, the method of Edelsbrunner, Guibas, and Stolfi is not the first to simultaneously achieve O(^) space and an O(logn) query time. Kirkpatrick [44] discovered earlier an elegant method, based upon a technique we call the subdivision hierarchy method, for performing point location. This method is also applicable for searching in higher-dimensional structures and is even amenable to parallelization [2325]. The method requires that the subdivision is triangulated and also that the outer face is a triangle. The triangulation, however, can be done in linear time using Chazelle's method [14] if the original subdivision is connected. The method then proceeds as follows: 1. Identify a maximal independent set in the PSLG representing the subdivision using a greedy heuristic with the condition that the degree of vertices in the independent set is bounded by a constant c. Also the independent set should not include any vertices of the outer face. 2. Remove the vertices of the independent set and the edges attached to them. Retriangulate each of the star polygons which contain the vertices of the independent set. 3. Repeat the process until only the outer face remains. The Figure 10 shows the process of removal of independent set of vertices and retriangulation for an example subdivision. Now the point location data structure is constructed as follows: We have a layered directed acyclic graph in which one layer represents an intermediate triangulation of the subdivision in the above recursive process. We assign one node of the dag to each triangle. After removing the independent set and retriangulating, some of the triangles are destroyed and new triangles are introduced inside each star polygon. We introduce a node for each new triangle and introduce pointers from the node representing the new triangle to all the nodes representing the triangles which are destroyed within the star polygon. In the limiting case we have one node representing the outer face and three nodes representing the
478
M. T. Goodrich and K. Ramaiyer
Fig. 10. A subdivision hierarchy: The figure shows removal of independent set and retriangulation. The independent set vertices selected at a step are shown as hollow circles.
Fig. 11. A subdivision hierarchy: Organizing triangles in a dag for searching. The last three levels of a hierarchy are shown.
three triangles destroyed in the previous step. The resulting data structure thus is a layered dag as shown in the Figure 11. Kirkpatrick shows that in the layered dag: • The degree of each node is constant, and • A fraction of the vertices are removed at each step. Hence the total depth of the dag is O(log^i). This follows from a theorem in graph theory which states that there are "large" independent sets of constant degree vertices in a planar graph, which allows one to find maximal independent sets of size which is a fraction of the current number of vertices. The point location algorithm proceeds by first locating the point inside the outer triangle.
Geometric data structures
479
At any step in the search algorithm one has located the query point in a triangle t on some level in the dag. One then follows the pointers in the dag to search all the triangles in the next level that were destroyed to form t. The query point can be located within the unique triangle from among these candidates in 0(1) time, and this defines the invariant for the next level. Since there are only O(logn) levels in the dag, the point location takes O(logn) time. Summary: Space: The space occupied by the dag is O(^). Query Time : O(logn) as argued above. The preprocessing time is 0{n) given the triangulated subdivision, as it takes only constant time to retriangulate each star polygon. Indeed, using Chazelle's triangulation method [14], the preprocessing for Kirkpatrick's method can be implemented in linear time any time the original subdivision is connected. The sweep method and persistence. There is actually one more well-known method for achieving 0(log^)-time queries and 0(n) space for planar point location. In particular, Samak and Tarjan [63] use the idea of persistence to build such a space-efficient point location data structure. Intuitively, they combine the techniques of the slab method, plane sweeping, and persistence to build a very elegant point location data structure. A similar method was also discovered by Cole [22]. A persistent data structure allows one to perform updates and queries. Updates must be performed on the most recent version of the data structure (in ^o-cdi)lt&partial persistence), but the queries can be done on past versions, i.e., any previous version of the data structure that was modified by updates. Samak and Tarjan [63] modified the slab method as follows: given a subdivision construct slabs by dropping vertical lines through each of the vertices. Now perform a plane sweeping from the left most slab to the right most. The event points for the sweep are the vertices of the subdivision. A search structure is built for the edges within each slab which is maintained during the sweep. The structure changes at each event point with the insertion and deletion of edges. Samak and Tarjan [63] interpreted these changes at the event points as persistent updates. As a result they maintain a single persistent structure during the sweep which is updated at every event point. This persistent stmcture need be only partially persistent as updates occur only on the latest version during the sweep. The point location query is then performed as follows: using the X-coordinate of the query point the appropriate version of the persistent structure (slab) is identified for searching. Then a persistent search is performed on the corresponding "past" version to identify the face. By implementing the sweep using a partially-persistent red-black tree, Samak and Tarjan show how to construct an 0(n) space data stmcture that allows O(logn) time persistent searches and updates. Moreover, they show that each update adds only 0(1) amortized-space to the data structure.
480
M T. Goodrich and K. Ramaiyer
Summary: Space: The space occupied by the persistent structure is 0(n), since there are 0{n) updates and each requires 0(1) amortized space. Query Time: O(logn), as mentioned above.
4. Dynamic point location An important variant of the point location problem is to allow for environments that request incremental updates to the subdivision. In this variant one studies how to best reflect the changes to the subdivision (e.g., deletion and insertion of edges or vertices) in the data structure storing the subdivision. The goal, of course, is to continue to efficiently support point location queries while also also performing updates in an efficient manner. In addition, the space required by the data structure should be kept as small as possible. In this section we review some dynamic data structures used for performing dynamic planar point location, where edges are allowed to be inserted or deleted from a subdivision. The goal here is to efficiently maintain the data structure under the update operations and allow for fast point location queries. The basic problems in performing updates are the following: 1. Propagation of new information or modification of old information efficiently. Suppose one is deleting an edge. If the edge is represented in several nodes of the data structure, then one needs to remove that information from all the nodes. For example in the slab method, if an edge spans multiple slabs, then one needs to remove that information from each of the binary trees storing that edge. A reverse problem occurs when such a long edge is inserted into the subdivision. 2. Restructuring of the data structure to maintain the invariants assumed by the algorithm. For example in the trapezoid method, we have the invariant that each node represents a trapezoid and adjacent nodes are separated by a "spanning edge". Suppose a spanning edge is deleted. Then the two adjacent trapezoids (which are represented as two different nodes) must now be collapsed into a single trapezoid and represented by a single node. Similarly if a new spanning edge is inserted, then the corresponding node must be split into two different nodes. 3. Dynamization of the techniques (fractional cascading, persistence, etc.) used to achieve good space bounds. Preparata and Tamassia [59] present a method for dynamic point location in a convex subdivision. They construct the data structure by dynamizing the structure used in the static trapezoid method. They put a restriction that the vertices lie on a fixed set of A^ horizontal lines, however. The data structure in this case uses space O(NlogN). Still, they achieve an impressive time of 0(logn + log A^) for queries and an update time of 0(\ognlogN). The data structure consists of a primary component that is any balanced binary search tree and the secondary component that is a biased binary search trees [4]. Preparata and Tamassia [58] also dynamized the chain-method for performing point location on a monotone subdivision. They construct a data structure that allows for insertion and deletion of vertices, insertion and deletion of monotone chain of edges, and
Geometric data structures
481
point location queries. The update operation is required to leave the subdivision monotone. They achieve an 0(\o^ n) query time, O(logn) time for inserting or deleting a vertex, and 0(log^ n -\-k) time for inserting or deleting a monotone chain of k edges. The space requirement is 0(n). Chiang and Tamassia [21] later improved the above results for dynamic point location in a monotone subdivision. They further dynamized the trapezoid method to achieve 0(log«) time for queries and 0(log^ n) time for updates. The space required for the data structure is 0{n logn). Their data structure is a compound structure with the primary component being a BB[Qf] tree [10,48,51] and the secondary component being biased binary search trees [4]. Mehlhorn and Naher [49] dynamize fractional cascading to support insertions and deletions in O(loglogn) amortized time and queries in Oilogn + /: log logn), where k is the length of the path traversed. Hence their dynamization adds a 0(log logn) overhead to the static method. Dietz and Raman [27] improve the update time from amortized to worstcase. Cheng and Janardan [18] present methods for dynamic point location for any connected subdivision. They have two schemes. In one scheme, they achieve an 0(log^ n) query time, O(logn) time for insertion and deletion of vertices, and 0{k\og{n + k)) and O(^logn) times for insertion and deletion, respectively, of an arbitrary ^-edge chain inside a region. The space requirement is 0(n). In their other scheme they speedup the insertion and deletion of ^-edge monotone chain to 0(log^n log logn + k), but increase the other bounds slightly. Their general approach is based on the a new search strategy using priority search trees [47] taken together with the technique of dynamization as proposed by Willard and Lueker [46,66] and Overmars [53]. The main idea of this technique is that rather than updating the data structure immediately with each update request they perform only local updates and spread the restructuring over a sequence of future operations. They perform global rebuilding of the entire data structure periodically so that the structure does not go out balance too much. They also make use of BB[Qf] trees. Goodrich and Tamassia [38] present a method for dynamic method for point location in monotone subdivisions. They improve the update times by paying a penalty on the query time. In particular, they achieve O(logn) time for insertion and deletion of vertices, 0(logn -h k) for the insertion and deletion of a monotone chain of k edges, and 0(log^ n) time for queries. The space requirement is 0(n). Their data structure consists of two interlaced spanning trees, each of which is represented using link-cut trees [65]. In order to be concrete about one dynamic point location method, we briefly review their method. 4.1. The inter-laced trees technique Let 5 be a PSLG that is connected and monotone (and will remain that way throughout the update process). Goodrich and Tamassia [38] first construct a spanning tree T for the triangulation with the property that its root-to-leaf paths are monotone with respect to the }^-axis. Then they construct a graph-theoretic dual of the triangulation such that it excludes the edges dual to the monotone spanning tree constructed above. This defines the spanning tree D for the dual graph of 5, and these two trees "inter-lace." Each node of D represents a triangle of S and each edge of D corresponds to a non-tree edge of S, with respect to T (since edges dual to edges of T are ignored while constructing
482
M. T. Goodrich and K. Ramaiyer
D), and hence determines a unique cycle in S. Moreover this cycle partitions S into two regions, one inside the cycle and the other outside the cycle. This property allows one to perform searching the subdivision where we need to do point-versus-cycle discrimination. The main idea behind point location is as follows: since each edge of D represents a cycle of 5, it partitions S into two regions. Given a query point, we can compare it against the edges of the cycle to determine whether it is inside or outside the cycle in 0(logn) time, since T is monotone. Depending on this test, we proceed to an appropriate edge of D, which is either inside or outside the cycle of 5, for further discrimination. To perform such a search efficiently, one needs to balance the tree D. The authors use the link-cut tree data structure [65] to be able to implement a recursive centroid search [13,40] in D to eliminate a constant fraction of the triangular faces with each cycle test. This allows one to perform searches in 0(log^ n) time since the depth of the centroid decomposition tree is O(logn) and in each step one needs to perform an O(logn) -time point-versus-chain discrimination. Summary: Space: The space occupied by the structure is 0{n) (again from fractional cascading method). Query Time: 0(log^ n), as mentioned above. Update Time : The authors show how to use link-cut tree primitives to implement updates in 0(log«) time.
5. Convex hulls and convex polytopes Convex hulls and convex polytopes are fundamental geometric data structures and have been well studied. In this section we discuss the data structure representations of convex hulls and polytopes and also how they are maintained dynamically when the points are inserted and deleted.
5.1. d-dimensional representations Given a collection of points in J-dimension, where J is a fixed constant, there are algorithms (both randomized and deterministic) for computing the convex hull of the points in this collection. Alternately, some of the algorithms exploit the duality between a point and a hyperplane in d dimensions, and compute the intersection of a collection of halfspaces determined by the origin and a set of hyperplanes, which by this duality directly gives the information about the convex hull of the input set of (primal) points. A convex polytope is represented by the information about faces, edges, and vertices and the relationship between them. Each face of the convex polytope is a convex set. The (d — 1)-dimensional faces of a J-dimensional polytope are called facets, its (d — 2)- and lower dimensional faces are called subfacets, its one-dimensional faces are edges, and
Geometric data structures
483
its zero-dimensional faces are vertices. In a convex poly tope arises from a convex hull computation, then each vertex is a point in the input set. A J-dimensional convex polytope is represented generally using an incidence graph [35]. Dobkin and Laszlo [30] define such a representation for 3-dimensional convex poly topes and Brisson [11] extends this to J-dimensional convex polytopes, for fixed J ^ 2. In addition to the above definitions, we refer to the {d — 2)-dimensional face as a ridge. In the incidence graph, f o r — 1 ^ ^ < J — l , a ^-face / and a (/: + l)-face g are incident upon each other if / belongs to the boundary of ^. In this case, / is called a subface of g and g is called the super face of / .
5.2. 2-dimensional dynamic maintenance Let us now consider the problem of maintaining a convex hull of points in the plane when the underlying point set changes. The online problem, where the points are only allowed to be inserted, is easier than the dynamic problem, where one allows deletion of points as well. In the online case the convex hull can only expand in area. If a new point is determined to fall inside the existing convex hull, then one does not need to do any additional work. But if the point falls outside, then one must compute the tangets from the new point to the current convex hull. These tangents are added to the convex hull and the chain of points on the convex hull between the two tangents are deleted. This can be done in amortized O(logn) time, where n is the number of points on the convex hull, as shown by Preparata [55]. When the deletion of points is allowed things get more complicated, since one needs to maintain convexity information about points that are not currently on the convex hull. Overmars and van Leeuwen [54] present an elegant solution to this problem. They maintain the convex hull as an union of two monotone chains — the upper and lower hulls — partitioned at the point with largest and smallest x-coordinate, respectively. Each hull is then maintained as a compound tree structure, where each internal node stores the convex hull of the points in the subtree and the parent node adds the supporting tangent to the convex hull stored at its two children to maintain the convex hull of all the points in its subtree. The insert and delete operations work to modify these lists at the nodes appropriately. They show that the update operations take 0(log^ n) time (where n is the current number of points in the set), while the query operation of asking for the current convex hull involvex just reading the list from the root of the tree. In addition, they show that one can still perform tangent queries in O(logn) time.
5.3. 3-dimensional subdivision hierarchies Representing 3-dimensional convex polytopes is considerably harder. We know of no efficient dynamic schemes, for example. Still, Dobkin and Kirkpatrick [28,29] present an beautiful static data structure for representing 3-dimensional convex polyhedra so as to answer tangent and intersection queries quickly. Their structure is based upon the subdivision hierarchies technique introduced earlier (in Section 3.4). They form a hierarchy by first identifying a relatively large independent set of vertices of at most constant degree
484
M T. Goodrich and K. Ramaiyer
(viewing the edges of the polyhedron as a graph). They then remove these vertices and form the convex hull of those that remain, while forming pointers between the new facets formed and the vertex in the previous level that was deleted to give rise to these new facets. They then recursively repeat this process, terminating this construction when the polyhedron has constant size. Interestingly, they show that this simple approach can be used to answer a number of types of tangent and intersection queries on the original polyhedron in 0(log«) time, where n is the number of vertices.
6. Rectilinear data structures Having reviewed some data structures for maintaining convexity information, let us now consider the organization of geometric objects so as to enable "rectilinear" types of searching. In particular, we briefly review in this section methods that partition and query the space occupied by the underlying geometric objects using axis-parallel hyperplanes. For a more-complete description of these techniques, the reader is referred to the Chapter 17 by Nievergelt and Widmayer of this Handbook.
6.1. k-D trees and quad trees First we consider two rectilinear data structures, namely, the k-D tree [5,8,7] and the quadtree [61,62]. We now briefly describe the two types of partitions used to build these structures. We discuss the partitioning for point sets in J-dimensions. The method can be extended for other types of geometric objects in a straightforward way. In the case of the k-D tree,^ we first compute the median of the point set in one of the dimensions, say DQ and partition the point set into two sets based on the median point, i.e., all points having coordinates less than the median point along Do are placed in one set and the remaining points are placed in the other set. This process is then recursively continued along the other dimensions in the two resulting regions. Once the partitioning is completed along all dimensions, it is repeated starting from Do in the resulting regions. If the number of points in a particular region falls below a certain constant, the process is terminated for that region. These regions with boundaries parallel to the axes are organized in the form of tree with partitioning of a region into two smaller regions along an axis representing the parent-child relationship. In the case of the quad-tree, the bounding box of the point set is partitioned into 2^ regions by using axis-parallel hyperplanes passing through the mid point of each of the sides of the bounding box. The partitioning is continued recursively in each of the resulting regions until the number of points falls below a certain constant. These regions are then organized in the form of a multi-ary tree. The ^-D tree and quad tree occupy linear space and the performance of the search operations depends on the application, but is in general not optimal. The phrase means A:-dimensional or multidimensional binary search tree, but we use d to denote the dimension to be consistent with other sections.
Geometric data structures
485
The search algorithms proceed by intersecting the search volume with the bounding box of the region at the root node and recursively searching the regions in the children nodes whose bounding boxes intersect the search volume.
6.2. Segment trees Given a set of n segments in the plane, a segment tree [6] allows for efficient storage and searching operations on the underlying set. The x-coordinates of the segment endpoints are projected onto the real line so as to partition the line into several intervals (if the endpoints are in general position, there will be 2^ + 1 intervals). These intervals are then organized in the form of a tree structure. The intervals represent the leaf nodes of the tree. Each internal node represents an interval that is the union of all intervals in the leaf nodes in the subtree. We store a "cover list" of segments at each internal node (typically sorted by the "above" relationship). Formally we say a segment covers a node u if it spans interval at u and does not span the interval at the parent of u. One can show that a segment is stored in the cover lists of at most two nodes in each level and also in at most O(logn) different nodes, where n is the number of segments. A query operation, such as finding all the segments stabbed by a vertical query ray, can be answered by searching the cover list at each level and proceeding down the tree. The segment tree requires 0(n logn) space and the vertical ray-intersection query can be answered in 0(logn + k) time, where k is the output size.
6.3. Range trees Range trees allow for efficient storage of point sets for rectangle range searching. Given a set of n points in plane, for example, the 2-dimensional range tree is constructed as a compound tree structure. The primary tree structure is constructed as a balanced binary search tree structure on the x-coordinates of the points. Each node in the primary tree structure represents an interval in the x-axis. We associate with each internal node all the points within its interval and organize those points in the form of a search tree, but ordered using their y-coordinates. To perform a range search, one first searches the primary tree and locates the two intervals in the leaf nodes containing the bounding x-values of the query range. Then we walk up the tree to the least common ancestor of the two leaves and along the path we search the secondary structure stored in the nodes which are siblings (nodes not on the path) for the points which are within the range in the y-axis. The space occupied by the range tree is 0{n logn) since there O(logn) levels each containing 0(n) nodes. The complexity of range search is 0(log^ n + k), where k is the output size. This can be improved to 0(logn + k) by using techniques like fractional cascading.
7. General techniques In this section we briefly outline the some of the transformation and construction techniques used for improving the performance of the searches and updates on a data structure.
486
M. T. Goodrich and K. Ramaiyer
7.1. Fractional cascading As mentioned earlier, fractional cascading [16,17] is a very powerful data structure transformation technique that can improve the query performance of the data structures. We outlined the method in detail in Section 3.4. Given a graph-based data structure consisting of nodes of bounded degree in which search operations proceed along a path in the graph and compare the information stored in each node of the path with the "same" key, one can improve the performance by augmenting the information stored in each node. This will eliminate the need for independent searches in each node and will make the searches dependent. One important restriction is that all the information stored must be from the same universal set.
7.2. Persistence The data structures we study normally are ephemeral in nature, i.e., once the updates are done on the structures the previous information is lost. The persistent data structure maintains information about the past versions. This allows one to perform queries in the past. Such structures are called partially persistent structures. Sometimes one would like to allow for updates in the past versions. This becomes quite complicated as an update to one of the past version creates a new chain of data structures. We refer the reader to an excellent paper by DriscoU et al. [33] for complete details for how to make structures persistent. Such structures are referred to diS fully persistent structures. As showed in Section 3.4, the persistent structures can maintain the information during a plane sweep in a simple way which provides for efficient planar point location algorithm.
7.3. Static to dynamic conversions Bentley and Saxe [64,9] propose general techniques for converting static data structures to be dynamic. They considered a class of problems called decomposable searching problems and presented general techniques for converting static data structures to dynamic. The decomposable searching problems have the property that one can decompose a query about the complete set of objects into queries involving subset of objects and combining the results in a certain way to obtain the solution for the original query. These have applications to problems like membership querying, nearest neighbor querying, fathest point querying, and intersection querying. The transformations to online structures (i.e., ones that allow only insertions) is to maintain a collection of static structures of appropriate size and merge them to build large structures periodically. The size and time at which new structures are built are determined typically based on geometric progressions, such as powers-of-twos or a Fibonacci series. When deletions are allowed they advocate the use of a shadow structure where the deleted elements are maintained. One can then answer queries by searching both the shadow and the actual structures. Overmars [53] introduced another class called order decomposable set problems and he presented general techniques for dynamizations. This is a generalization of the method of
Geometric data structures
487
Overmars and van Leeuwen [54] for dynamic maintenance of convex hull of planar point set. This technique has applications in maintenance of the contour of maximal elements of a two-dimensional point set, maintenance of the intersection of a set of halfspaces in the plane, etc.
7.4. Internal-memory to external-memory conversions When the input data to a given problem is huge, one would like to design algorithms that optimize the number of I/O accesses. Because of the order of magnitude difference in the access times between disks and internal memory, algorithms dealing with large inputs should pay more attention to the organization of the underlying data structure so as to minimize the number of disk accesses. The main task in external memory organization of a data structure involves determining which substructures share the same block or page in the disk. The blocking of the nodes of the internal memory data structure is very crucial and different blocking schemes lead to different space requirement and different I/O performance of the query algorithms. Goodrich et al. [39] present external memory techniques for solving computational geometry problems dealing with large inputs. They presented four general techniques and showed how they can be applied to obtain efficient external memory algorithms for problems, like computing the pairwise intersection of orthogonal segments, constructing the 2-d and 3-d convex hull of points, answering batched range queries on points, point location queries on the planar subdivision, finding all nearest neighbors, etc. There are several other works related to external memory computational geometry. We refer the reader to some of the recent papers on this topic [1,12,19,52,20]. In addition, we highlight a recent paper by Arge [2], where he introduces a general technique, based on a data structure he calls the bujfer tree, for converting certain types of internal memory computations into efficient external memory computations.
References [1] L. Arge, External-storage data structures for plane-sweep algorithms. Technical Report RS-94-16, BRICS, Aarhus Univ., Denmark (1994). [2] L. Arge, The bujfer tree: A new technique for optimal I/O-algorithms, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955 (1995), 334-345. [3] B.G. Baumgart, A polyhedron representation for computer vision, Proc. AFIPS Natl. Comput. Conf., Vol. 44 (1975), 589-596. [4] S.W. Bent, D.D. Sleator and R.E. Tarjan, Biased search trees, SIAM J. Comput. 14 (1985), 545-568. [5] J.L. Bentley, Multidimensional binary search trees used for associative searching, Comm. ACM 18 (9) (1975), 509-517. [6] J.L. Bentley, Solutions to Klee's rectangle problems. Report ??, Carnegie-Mellon Univ., Pittsburgh, PA (1977). [7] J.L. Bentley, Multidimensional binary search trees in database applications, IEEE Trans. Softw. Eng. SE-5 (1979), 333-340. [8] J.L. Bentley, Multidimensional divide-and-conquer, Comm. ACM 23 (4) (1980), 214-229. [9] J.L. Bentley and J.B. Saxe, Decomposable searching problems I: Static-to-dynamic transformation, J. Algorithms 1 (1980), 301-358.
488
M.T. Goodrich andK.
Ramaiyer
[10] N. Blum and K. Mehlhom, On the average number of rebalancing operations in weight-balanced trees, Theoret. Comput. Sci. 11 (1980), 303-320. [11] E. Brisson, Representing geometric structures in d dimensions: Topology and order. Discrete Comput. Geom. 9 (1993), 387-^26. [12] P. Callahan, M.T. Goodrich and K. Ramaiyer, Topology B-trees and their applications, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955, Springer-Verlag (1995), 381-392. [13] B. Chazelle, A theorem on polygon cutting with applications, Proc. 23rd Annu. IEEE Sympos. Found. Comput. Sci. (1982), 339-349. [14] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [15] B. Chazelle, H. Edelsbrunner, M. Grigni, L. Guibas, J. Hershberger, M. Sharir and J. Snoeyink, Ray shooting in polygons using geodesic triangulations, Proc. 18th Intemat. Colloq. Automata Lang. Program., Lecture Notes in Comput. Sci. 510, Springer-Verlag (1991), 661-673. [16] B. Chazelle and L.J. Guibas, Fractional cascading: I. A data structuring technique, Algorithmica 1 (1986), 133-162. [17] B. Chazelle and L.J. Guibas, Fractional cascading: II. Applications, Algorithmica 1 (1986), 163-191. [18] S.W. Cheng and R. Janardan, New results on dynamic planar point location, SIAM J. Comput. 21 (1992), 972-999. [19] Y.-J. Chiang, Experiments on the practical I/O efficiency of geometric algorithms: Distribution sweep vs. plane sweep, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955, SpringerVerlag (1995), 346-357. [20] Y.-J. Chiang, M.T. Goodrich, E.F. Grove, R. Tamassia, D.E. Vengroff and J.S. Vitter, External-memory graph algorithms, Proc. 6th ACM-SIAM Sympos. Discrete Algorithms (1995), 139-149. [21] Y.-J. Chiang and R, Tamassia, Dynamization of the trapezoid method for planar point location in monotone subdivisions, Internat. J. Comput. Geom. Appl. 2 (3) (1992), 311-333. [22] R. Cole, Searching and storing similar lists, J. Algorithms 7 (1986), 202-220. [23] N. Dadoun and D.G. Kirkpatrick, Parallel processing for efficient subdivision search, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 205-214. [24] N. Dadoun and D.G. Kirkpatrick, Cooperative subdivision search algorithms with applications, Proc. 27th AUerton Conf. Commun. Control Comput. (1989), 538-547. [25] N. Dadoun and D.G. Kirkpatrick, Parallel construction of subdivision hierarchies, J. Comput. Syst. Sci. 39 (1989), 153-165. [26] M. de Berg, Ray Shooting, Depth Orders and Hidden Surface Removal, Lecture Notes in Comput. Sci. 703, Springer-Verlag, Berlin, Germany (1993). [27] P.P. Dietz and R. Raman, Persistence, amortization and randomization, Proc. 2nd ACM-SIAM Symp. Discrete Algorithms (1991), 78-88. [28] D.P. Dobkin and D.G. Kirkpatrick, A linear algorithm for determining the separation of convex polyhedra, J. Algorithms 6 (1985), 381-392. [29] D.P. Dobkin and D.G. Kirkpatrick, Determining the separation of preprocessed polyhedra — a unified approach, Proc. 17th Internat. Colloq. Automata Lang. Program., Lecture Notes in Comput. Sci. 443, Springer-Verlag (1990), 400-413. [30] D.P. Dobkin and M.J. Laszlo, Primitives for the manipulation of three-dimensional subdivisions, Algorithmica 4 (1989), 3-32. [31] D.P. Dobkin and R.J. Lipton, The complexity of searching lines in the plane. Technical Report, Dept. Comput. Sci., Yale Univ., New Haven, CT (1976). [32] D.P. Dobkin and R.J. Lipton, Multidimensional searching problems, SIAM J. Comput. 5 (1976), 181-186. [33] J.R. Driscoll, N. Samak, D.D. Sleator and R.E. Tarjan, Making data structures persistent, J. Comput. Syst. Sci. 38(1989), 86-124. [34] H. Edelsbrunner, A new approach to rectangle intersections, Part I, Intemat. J. Comput. Math. 13 (1983), 209-219. [35] H. Edelsbrunner, Algorithms in Combinatorial Geometry, EATCS Monographs on Theoretical Computer Science 10, Springer-Verlag, Heidelberg, West Germany (1987). [36] H. Edelsbrunner, L.J. Guibas and J. Stolfi, Optimal point location in a monotone subdivision, SIAM J. Comput. 15 (1986), 317-340. [37] I. Fary, On straight lines representation of planar graphs. Acta Sci. Math. Szeged. 11 (1948), 229-233.
Geometric data structures
489
[38] M. Goodrich and R. Tamassia, Dynamic trees and dynamic point location, Proc. 23rd Annu. ACM Sympos. Theory Comput. (1991), 523-533. [39] M.T. Goodrich, J.-J. Tsay, D.E. Vengroff and J.S. Vitter, External-memory computational geometry, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (FOCS 93) (1993), 714^723. [40] L.J. Guibas, J. Hershberger, D. Leven, M. Sharir and R.E. Tarjan, Linear-time algorithms for visibility and shortest path problems inside triangulated simple polygons, Algorithmica 2 (1987), 209-233. [41] L.J. Guibas and J. Stolfi, Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams, ACM Trans. Graph. 4 (1985), 74-123. [42] F. Harary, Graph Theory, Addison-Wesley, Reading, MA (1972). [43] J. Hershberger and S. Suri, Offline maintenance of planar configurations, Proc. 2nd ACM-SIAM Sympos. Discrete Algorithms (1991), 32-41. [44] D.G. Kirkpatriclc, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1983), 28-35. [45] D.T. Lee and F.P. Preparata, Location of a point in a planar subdivision and its applications, SIAM J. Comput. 6 (1977), 594-606. [46] G.S. Lueker and D.E. Willard, A data structure for dynamic range searching. Inform. Process. Lett. 15 (1982), 209-213. [47] E.M. McCreight, Priority search trees, SIAM J. Comput. 14 (1985), 257-276. [48] K. Mehlhom, Sorting and Searching, Data Structures and Algorithms, Vol. 1, Springer-Verlag, Heidelberg West Germany (1984). [49] K. Mehlhom and S. Naher, Dynamic fractional cascading, Algorithmica 5 (1990), 215-241. [50] D.E. MuUer and F.P. Preparata, Finding the intersection of two convex polyhedra, Theoret. Comput. Sci. 7 (1978), 217-236. [51] J. Nievergelt and E. Reingold, Binary search trees of bounded balanced, SIAM J. Comput. 2 (1973), 33-43. [52] M.H. Nodine, M.T. Goodrich and J.S. Vitter, Blocking for external graph searching, Proc. 12th Annu. ACM Sympos. Principles Database Syst. (PODS '93) (1993), 222-232. [53] M.H. Overmars, Dynamization of order decomposable set problems, J. Algorithms 2 (1981), 245-260. Corrigendum in 4 (1983), 301. [54] M.H. Overmars and J. van Leeuwen, Maintenance of configurations in the plane, J. Comput. Syst. Sci. 23 (1981), 166-204. [55] F.P. Preparata, An optimal real-time algorithm for planar convex hulls, Comm. ACM 22 (1979), 402-405. [56] F.P. Preparata, A new approach to planar point location, SIAM J. Comput. 10 (1981), 473^82. [57] F.P. Preparata and M.L Shamos, Computational Geometry: An Introduction, Springer-Verlag, New York, NY (1985). [58] F.P. Preparata and R. Tamassia, Fully dynamic point location in a monotone subdivision, SIAM J. Comput. 18(1989), 811-830. [59] F.P. Preparata and R. Tamassia, Dynamic planar point location with optimal query time, Theoret. Comput. Sci. 74 (1990), 95-114. [60] J.-R. Sack and J. Urrutia, eds. Handbook on Computational Geometry, Elsevier Science B.V., Amsterdam, the Netherlands (1999). [61] H. Samet, Applications of Spatial Data Structures, Addison-Wesley, Reading, MA (1990). [62] H. Samet, Applications of Spatial Data Structures: Computer Graphics, Image Processing, and GIS, Addison-Wesley (1990). [63] N. Samak and R.E. Tarjan, Planar point location using persistent search trees, Comm. ACM 29 (1986), 669-679. [64] J.B. Saxe and J.L. Bentley, Transforming static data structures to dynamic structures, Proc. 20th Annu. IEEE Sympos. Found. Comput. Sci. (1979), 148-168. [65] D.D. Sleator and R.E. Tarjan, A data structure for dynamic trees, J. Comput. Syst. Sci. 26 (3) (1983), 362-381. [66] D.E. Willard and G.S. Lueker, Adding range restriction capability to dynamic data structures, J. ACM 32 (1985), 597-617.
This Page Intentionally Left Blank
CHAPTER 11
Polygon Decomposition J. Mark Keil Department of Computer Science, University of Saskatchewan, Saskatoon, SK, Canada, S7N 5A9
Contents 1. Introduction 2. Decomposing general polygons 2.1. Polygon partitioning 2.2. Polygon covering 3. Orthogonal polygons 3.1. Partitioning orthogonal polygons 3.2. Covering orthogonal polygons References
493 496 496 500 502 502 507 513
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
491
This Page Intentionally Left Blank
Polygon decomposition
493
1. Introduction Practitioners frequently use polygons to model objects in applications where geometry is important. In polygon decomposition we represent a polygon as the union of a number of simpler component parts. Polygon decomposition has many theoretical and practical applications and has received attention in several previous surveys [26,68,108,129,134]. Pattern Recognition is one area that uses polygon decomposition as a tool [41,111113,134]. Pattern recognition techniques extract information from an object in order to describe, identify or classify it. An established strategy for recognizing a general polygonal object is to decompose it into simpler components, then identify the components and their interrelationships and use this information to determine the shape of the object [41,112]. Polygon decomposition is also useful in problems arising in VLSI artwork data processing. Layouts are represented as polygons, and one approach to preparation for electronbeam lithography is to decompose these polygon regions into fundamental figures [6,42, 101,103]. Polygon decomposition is also used in the process of dividing the routing region into channels [83]. In computational geometry, algorithms for problems on general polygons are often more complex than those for restricted types of polygons such as convex or star-shaped. The point inclusion problem is one example [115]. For other examples see [4] or [109]. A strategy for solving some of these types of problems on general polygons is to decompose the polygon into simple component parts, solve the problem on each component using a specialized algorithm, and then combine the partial solutions. Other applications of polygon decomposition include data compression [93], database systems [91], image processing [98], and computer graphics [132]. Although much work has been done on decomposing polyhedra in three or higher dimensions [17,10], we will restrict the scope of this survey to that of decomposing polygons in the plane. Triangulation, the partitioning of the interior of a polygon into triangles, is a central problem in computational geometry. Many algorithms for polygons begin by triangulating the polygon. As early as 1978, Garey et al. [45] provided an 0(n log n) time algorithm, but no matching lower bound was known. The importance of the problem led to a significant amount of research [39,133] on algorithms, culminating in Chazelle's linear time algorithm [27]. Although it certainly is an example of a polygon decomposition problem, the triangulation problem has taken on a life of its own and we will consider a systematic study of the triangulation problem, as well as related mesh generation work, to be outside the scope of this survey. For a good survey of mesh generation and optimal triangulation see [17] or Chapter 6. There are a wide variety of types of component subpolygons that are useful for polygon decomposition. These include subpolygons that are convex, star-shaped, spiral or monotone, as well as fixed shapes such as squares, rectangles and trapezoids. Before proceeding further we provide definitions for some of the restricted types of polygons. A point x in a polygon P is visible from a point y in P, if the line segment joining x and y lies entirely inside P. We treat a polygon as a closed set, thus a visibility line may touch the boundary of P. A polygon P is convex if every pair of points in P are visible from each other. A polygon P is star-shaped if there exists at least one point x inside P from which the entire
494
J.M. Keil
(a)
(b)
(c) Fig. 1. (a) A star-shaped polygon, (b) a spiral polygon, and (c) a polygon monotone with respect to the y-axis.
polygon is visible. The entire set of points in P from which P is visible is called the kernel of P. A polygonal chain in a polygon P is a sequence of consecutive vertices of P. A spiral polygon is a polygon whose boundary chain contains precisely one concave subchain.
Polygon
decomposition
495
(a)
(b) Fig. 2. A polygon with 9 vertices and 3 reflex vertices partitioned into convex subpolygons (a) with a Steiner point and (b) without Steiner points.
A polygonal chain is monotone with respect to a line / if the projections of the vertices in the chain on / occur in exactly the same order as the vertices in the chain. A polygon P is monotone if there exists a line / such that the boundary of P can be partitioned into two polygonal chains which are monotone with respect to the line /. See Figure 1. It is also useful to classify the type of polygon that is being decomposed. Polygons may be simply connected or they may contain holes. Holes are nonoverlapping "island" simple polygons, inside the main polygon. Some authors allow for degenerate holes such as line segments or points. The complexity of a decomposition problem usually increases if the
496
JM. Keil
polygon contains holes. A polygon is said to be orthogonal if all of its sides are either horizontal or vertical. Orthogonal polygons are relevant in many applications and in this survey special emphasis is placed on the decomposition of orthogonal polygons. Polygon decompositions are also classified according to how the component parts interrelate. A decomposition is called 2i partition, if the component subpolygons do not overlap except at their boundaries. If generally overlapping pieces are allowed we call the decomposition a cover. Decomposing a polygon into simpler components can be done with or without introducing additional vertices which are commonly called Steiner points. While the use of Steiner points makes subsequent processing of the decomposed polygon more complex, it also often allows the use of fewer component parts. See Figure 2. In a polygon with n vertices, at some A^ of the vertices the interior angle will be reflex (greater than 180°). The number A^ of reflex vertices of a polygon can be much smaller than n and we analyze the complexity of decomposition algorithms with respect to both n and A^. See Figure 2. In most applications we want a decomposition that is minimal in some sense. Some applications seek to decompose the polygon into the minimum number of some type of component. Other applications use a decomposition that minimizes the total length of the internal edges used to form the decomposition (minimum "ink"). Perhaps the earhest minimum "ink" result is due to Klincsek [70]. He uses dynamic programming to find the minimum "ink" triangulation of a polygon. His work was influential in that it inspired subsequent dynamic programming solutions to decomposition problems. As in the example of Figure 6, a minimum edge length decomposition can be quite different from a minimum number decomposition for the same component type. In the next section we will review the work that has been done concerning partitioning and covering general polygons. In Section 3 we turn our attention to orthogonal polygons and consider the work done on decomposing orthogonal polygons.
2. Decomposing general polygons In this section we consider both partitioning and covering problems for general polygons.
2.1. Polygon partitioning When partitioning a polygon into simpler subpolygons, it is the application which determines the type of subpolygon to be used. Syntactic pattern recognition uses convex, spiral and star-shaped decompositions [41,111,113,124,9,134]. VLSI applications use trapezoids [6]. In the rest of this section we will consider each of these types of subpolygons in turn. Convex subpolygons. When the polygon may contain holes, the problem of partitioning a polygon into the minimum number of convex components is NP-hard [80], either allowing or disallowing Steiner points. For polygons without holes much of the work done disallows Steiner points. A 1975 algorithm, due to Feng and Pavlidis [41], runs in O(N^n) time, but
Polygon
decomposition
497
Fig. 3. AnX-pattern.
does not generally yield a minimum decomposition. Schachter's 1978 [124] 0(nN) time partitioning algorithm also cannot guarantee a minimum number of components. For polygons without holes disallowing Steiner points, several approximation algorithms provide results guaranteed to be close to optimum. In 1982 Chazelle [25] provides an 0(^ log n) time algorithm that finds a partition that contains fewer than 4^ times the optimal number of components. Later, Greene [55], and Hertel and Mehlhorn [61] provide 0(n log n) time algorithms that find a partition that contains less than or equal to four times the optimal number of components. Note that, for polygons without degenerate holes, any convex partition that does not contain unnecessary edges will be within four times of the optimal sized partition. This is true as each added edge can eliminate at most two reflex vertices and each reflex vertex requires at most two edges to eliminate it in any convex partition that does not contain unnecessary edges. The year 1983 saw the achievement of algorithms obtaining the optimal number of convex components. When disallowing Steiner points, Greene [55] developed an O(N^n^) time algorithm for partitioning a polygon into the minimum number of convex components. Independently, Keil [64,65] developed an 0(N^n log n) time algorithm for the problem. Recently, Keil and Snoeyink [69] have achieved an 0(n + A^^ mm{N^, n}) time algorithm. Allowing Steiner points makes the problem quite different. There are an infinite number of possible locations for Steiner points. Nevertheless, as early as 1979 Chazelle and Dobkin [24,28,29] developed an 0(n + N^) time algorithm for the problem of partitioning a polygon into the minimum number of convex components. They define an Xy^-pattern to be a particular interconnection of k reflex vertices which removes all the reflex angles at these vertices and creates no new reflex angles. See Figure 3. They achieve their algorithm by further developing this idea and using a dynamic programming framework. Dobkin et al. [37] show how to extend the existing algorithms for decomposing a polygon without holes into convex components to optimally partition a splinegon into convex components (with or without Steiner points). A splinegon is a polygon where edges have been replaced by "well behaved curves" [37]. Partitioning a polygon with holes into convex components remains hard under the minimum edge length criterion. With Steiner points Lingas et al. [83] show the problem is
498
JM. Keil
NP-hard. Disallowing Steiner points, Keil [64] shows the problem is NP-complete. Allowing Steiner points, Levcopoulos and Lingas develop approximation algorithms for the problem [77]. For polygons without holes, they have an 0(n log n) time algorithm that yields a solution of size 0{p log A^), where p is the length of the perimeter of the polygon. For polygons with holes, they have an 0(n log n) time algorithm that produces a convex partition of size 0{{b -\-m) log N), where b is the total length of the boundary of the polygon and the holes and m is the minimum length of its convex partition. No optimal algorithms for the problem are known when Steiner points are allowed. For a convex polygon with point holes, without the use of Steiner points, Plaisted and Hong [114] give a polynomial time algorithm for partitioning into convex subpolygons, such that the total edge length is within 12 times the minimum amount required. For this problem Levcopoulos and Krznaric [76] give a greedy type 0(rt log n) time algorithm that yields a solution that is also within a constant factor of optimal. The year 1983 also saw the achievement of optimal algorithms under the minimum edge length criteria. For polygons without holes, disallowing Steiner points, Keil [64] develops an 0(N^n^ log n) time dynamic programming algorithm for the problem of partitioning a polygon into convex subpolygons while minimizing the total internal edge length. Independently, Greene noticed that his algorithm for the convex minimum number problem [55] can be adapted to yield an O(N^n^) time algorithm for the convex minimum edge length problem. Spiral subpolygons. Recall that a spiral polygon is a simple polygon whose boundary chain contains precisely one concave subchain. Keil [64] shows that the problem of partitioning a polygon with holes into the minimum number of spiral components is NPcomplete, when Steiner points are disallowed. For polygons without holes, again disallowing Steiner points, Feng and Pavlidis [41] provide a polynomial time algorithm for the problem that does not generally yield the minimum number of components. Keil [65] provides an 0(n^ log n) time algorithm to partition a polygon without holes, disallowing Steiner points, into the minimum number of spiral components. He also provides an Oin"^ log n) time algorithm for the same problem under the minimum edge length optimality criterion [64]. No results are known concerning partitioning polygons into spiral components if Steiner points are allowed. Star-shaped subpolygons. Steiner points are disallowed in most of the known results concerning star-shaped partitioning. Again we see the hardness of decomposing a polygon with holes as Keil [64] shows that the problem of partitioning a polygon with holes into the minimum number of star-shaped components is NP-complete. In 1981, for polygons without holes. Avis and Toussaint [9] give an 0(n log n) time algorithm that partitions a polygon into at most n/3 star-shaped components. This algorithm does not generally yield a minimum partition. In 1984 Aggarwal and Chazelle [2] are able to partition a polygon into n/3 components inO(n) time. In order to achieve a partition into the minimum number of star-shaped components, in 1983 Keil employs dynamic programming to develop an 0(n^N^ log n) time algorithm [65]. The idea is to extend the solutions for small subpolygons into solutions for larger subpolygons. In general however, there can be an exponential number of minimum starshaped partitions of a subpolygon. Furthermore, there are situations where no minimum
Polygon decomposition
499
partition of a subpolygon can be extended into a global minimum partition. The solution is to introduce pseudo star-shaped polygons. A pseudo star-shaped subpolygon has the property that there exists a point x in the polygon, but not in the subpolygon, so that every point in the subpolygon can be seen from x. The algorithm proceeds by keeping one star or pseudo star-shaped minimum partition of each of a number of equivalence classes of partitions at each subpolygon. Shapira and Rappoport [126] make use of a form of star-shaped partition in a new method for the computer animation task of shape blending. They seek a partition into the minimum number of star-shaped components, each of whose kernels contains a vertex of the polygon. When such a partition exists, they compute it using a restriction of Keil's algorithm [64]. Since such a partition does not always exist, they also provide a heuristic which allows Steiner points. For the problem of partitioning a polygon into star-shaped components while minimizing the total internal edge length, Keil [64] provides an 0(N^n^ log n) time algorithm. Monotone subpolygons. Recall that a polygon P is monotone if there exists a line, /, such that the boundary of P can be partitioned into two polygonal chains, each of which is monotone with respect to /. For a polygon with holes, disallowing Steiner points, Keil [64] shows that the problem of partitioning a polygon into the minimum number of monotone subpolygons is NP-complete. For a polygon without holes, Keil [64] develops an O(Nn^) time algorithm for the problem. The algorithm relies on the fact that there are only a polynomial number of preferred directions with respect to which a subpolygon can be monotone. If a minimum partition is not important Garey et al. [45] can provide an 0(n log n) time algorithm. If all of the subpolygons in a partition are monotone with respect to the same line then the partition is a decomposition into uniformly monotone components. Liu and Ntafos [89] give algorithms for partitioning a polygon without holes into the minimum number of uniformly monotone subpolygons. They give an 0(nN^ + N'^n log n + N^) time algorithm that does not use Steiner points, and an 0(N^n log n-{- N^) time algorithm that does allow Steiner points. For the problem of partitioning a polygon into monotone components while minimizing the total internal edge length, Keil [64] gives an O(Nn^) time algorithm. Other subpolygons. The problem of partitioning a polygonal region into the minimum number of trapezoids, with two horizontal sides, arises in VLSI artwork processing systems [6]. A triangle with a horizontal side is considered to be a trapezoid with two horizontal sides one of which is degenerate. See Figure 4. In such systems the layout is stored as a set of polygonal regions which should be partitioned into fundamental figures since the aperture of a pattern generator is restricted. Trapezoids have been used as fundamental figures. Asano et al [6] develop an O(n^) time algorithm, based on circle graphs, for the problem when the polygon does not contain holes. If a minimum partition is not important, Chazelle is able to partition a polygon into trapezoids inO(n) time as a by-product of his linear time triangulation algorithm [27]. In the case where the polygon does contain holes, Asano et al. [6] show the problem to be NP-complete, and they provide an 0(n log n) time approximation algorithm that finds a partition containing not more than three times the number of trapezoids in a minimum partition.
500
J.M. Keil
Fig. 4. A partition into trapezoids.
Everett et al. [40] consider the problem of partitioning a polygon into convex quadrilaterals. They use Steiner points, and give an 0{n) time algorithm that is not guaranteed to provide the minimum number of components. Another 0(n) time algorithm for this problem, that limits the number of Steiner points, is given in [117]. It is not always possible to partition a polygon into convex quadrilaterals without adding Steiner points. Lubiw [92] shows that the problem of deciding whether or not a partition without Steiner points is possible is NP-complete. Algorithms for partitioning convex polygons with point holes into quadrilaterals are given in [135,18]. Levcopoulos et al. [82,79] provide some algorithms for partitioning some types of polygons into m-gons under the minimum edge length optimization criterion.
2.2. Polygon covering Much of the work done concerning covering general polygons has involved convex or starshaped components. Convex subpolygons. The problem of covering a polygon with the minimum number of convex subpolygons finds application in syntactic pattern recognition [41,111,113,112, 110]; for example in the recognition of Chinese characters. In 1982 O'Rourke was one of
Polygon decomposition
501
the first to investigate the complexity of this problem. He showed that, although it is difficult to restrict the possible locations of Steiner points [106], the problem is nevertheless decidable [105,104]. For polygons with holes, O'Rourke and Supowit show that the problem is NP-hard [110], with or without Steiner points, and for this problem O'Rourke [107] provides an algorithm which runs in exponential time. Several years later, in sharp contrast to the partitioning situation, Culberson and Reckhow show that even if the polygon does not contain holes, the problem of covering a polygon with the minimum number of convex components remains NP-hard [35]. The difficulty of the problem motivates the consideration of the problem of covering a polygon with a fixed number of convex subpolygons. Shermer [130] provides a linear time algorithm for recognizing polygons that can be covered with two convex subpolygons. Belleville provides a linear time algorithm for recognizing polygons that can be covered with three convex subpolygons [13,14]. A more general type of polygon decomposition allows set difference as well as union as an operator to apply to the components. This additional operator may allow for a smaller number of component pieces. Batchelor [12] investigates a procedural approach to convex sum/difference decompositions. This type of decomposition has been applied to the automatic transformation of sequential programs for efficient execution on parallel computers [95]. Also, Tor and Middleditch [132] give an 0(n^) time algorithm for finding a convex sum/difference decomposition that may not necessarily use the minimum number of components. Star-shaped subpolygons. The problem of covering a polygon with star-shaped subpolygons has often been investigated as the problem of guarding an art gallery [9,108,129]. The region visible from a guard is a star-shaped subpolygon and the polygon models the art gallery. Knowledge of this problem helps with the understanding of visibility problems within polygons. General satisfactory solutions are not known for the minimum star-shaped covering problem. In 1983 for polygons with holes, O'Rourke and Supowit show the problem to be NP-hard [110]. Later Lee and Lin [71] show the problem remains NP-hard, even without holes, if the kernel of each star-shaped subpolygon must contain a vertex. Aggarwal [1] then shows that the unrestricted problem is NP-hard for polygons without holes. More recently other variations of the problem are shown to be NP-hard by Hecker and Herwig [59],andbyNilsson[102]. In 1987 Ghosh [48] develops an 0(n^ log n) time approximation algorithm, that finds a cover within a factor of 0(log n) of optimal, if the kernels of the subpolygons are restricted to contain vertices. His algorithm works whether or not the polygon contains holes. In 1988 Aggarwal et al. [3] consider a restricted problem, for polygons without holes, where subpolygon sides must be contained in either edges, edge extensions or segments of lines passing through two vertices of the polygon. For this restricted problem they develop an 0(n^ log n) time approximation algorithm that produces a cover within a factor of 0(log n) of optimal. They also show that the restricted problem remains NP-hard. Belleville [15] investigates the problem of recognizing polygons that can be covered by two star-shaped subpolygons. He gives an 0(n^) time algorithm for recognizing such polygons.
502
JM. Keil
Shermer [128] contributes to knowledge of related problems by giving bounds on the number of generalized star-shaped components required in a generalized cover. Other subpolygons. Spiral polygons and rectangles are two other types of component subpolygons that have been used to cover a polygon. For polygons with holes, O'Rourke and Supowit [110] show that covering with the minimum number of spiral subpolygons is NP-hard. Levcopoulos and Lingas [78] consider covering acute polygons, whose interior angles are all greater than 90°, by rectangles. They show that for convex polygons, the minimum number of rectangles needed in a cover is 0{n log(r(P))), where r{P) is the ratio of the length of the longest edge of the polygon to the length of the shortest edge of the polygon. Later Levcopoulos [72,75] extends this result and gives an algorithm that covers such an acute polygon with 0{n log n-\-m{P)) rectangles in time 0{n log n-\-m{P)), where m(P) is the number of rectangles in an optimal cover.
3. Orthogonal polygons In this section we turn our attention to the problem of decomposing orthogonal polygons. An orthogonal polygon is a polygon whose edges are either horizontal or vertical. Orthogonal polygons are also referred to as rectilinear polygons. They arise in applications, such as image processing and VLSI design, where a polygon is stored relative to an implicit grid. The set of orthogonal polygons is a subset of the set of all polygons, thus any polynomial time algorithm developed for general polygons will apply to orthogonal polygons, but problems NP-complete for general polygons may become tractable when restricted to orthogonal polygons. There are also natural subpolygons for orthogonal polygons, such as axis aligned rectangles or squares that are less relevant to general polygons. In the next two subsections we treat partitioning and covering problems for orthogonal polygons.
3.1. Partitioning orthogonal polygons Rectangles are the most important type of component to consider in relation to orthogonal polygons. The problem of partitioning orthogonal polygons into axis aligned rectangles has many applications. Image processing is often more efficient when the image in rectangular. For example, Ferrari et al. [42] indicate that the convolving of an image with a point spread function can be made particularly efficient by specifying the nonnegative values of the point spread function over a rectangular domain and specifying that function to be zero outside that domain. They suggest handling a nonrectangular orthogonal image by partitioning it into the minimum number of rectangular subregions. In VLSI design, two variations of the problem arise. The first occurs in optimal automated VLSI mask fabrication [84,101,103]. In mask generation a figure is usually engraved on a piece of glass using a pattern generator. A traditional pattern generator has a rectangular opening, thus the figure must be partitioned into rectangles so that the pattern generator
Polygon
503
decomposition
L
L
n
r
n
r
J
L
J
L
Fig. 5. Horizontal and vertical chords between reflex vertices.
can expose each such rectangle. The entire figure can be viewed as an orthogonal polygon. Since the time required for mask generation depends on the number of rectangles, the problem of partitioning an orthogonal polygon into the minimum number of rectangles becomes relevant. Another VLSI design problem is that of dividing the routing region into channels. Lingas et al. [83] suggest that partitioning the orthogonal routing region into rectangles, while minimizing the total length of the lines used to form the decomposition, will produce large "natural-looking" channels with a minimum of channel to channel interaction. Thus the minimum "ink" criteria is also relevant. Other application areas for the problem of partitioning orthogonal polygons into the minimum number of rectangles include database systems [91] and computer graphics [54]. At this point we should note that the use of Steiner points is inherent in the solution of the problem of partitioning into rectangles. For example for an orthogonal polygon with one reflex vertex, a partition can be formed by adding a horizontal line segment from the reflex vertex to the polygon boundary. In fact a generalization of this idea forms the basis for most partitioning algorithms. The following theorem [88,103,42] expresses this. See Figure 5. THEOREM 1. An orthogonal polygon can be minimally partitioned into N — L — H -\- I rectangles, where N is the number of reflex vertices, H is the number of holes and L is the maximum number of nonintersecting chords that can be drawn either horizontally or vertically between reflex vertices.
504
JM. Keil
The theorem impHes that a key step in the decomposition problem is that of finding the maximum number of independent vertices in the intersection graph of the vertical or horizontal chords between reflex vertices. This problem can in turn be solved by finding a maximum matching in a bipartite graph. In 1979 Lipski et al. [88] exploited this approach to develop an 0{n^/^) time algorithm for partitioning orthogonal polygons with holes. Algorithms for the same problem running within the same time bounds were also developed in [103] and [42]. In the early 1980s the special structure of the bipartite graph involved allowed the development of improved algorithms for the problem running in 0(n^/^ log n) time [62,86,87]. These algorithms have been recently extended by Soltan and Gorpinevich [131] to run in the same time bounds even if the holes degenerate to points. It is open as to whether or not faster algorithms can be developed. The only known lower bound for the problem with holes is Q.{n log n) [84]. If the polygons do not contain holes then faster algorithms are possible. In 1983 Gourley and Green [54] develop an O(n^) time algorithm that partitions an orthogonal polygon without holes into within 3/2 of the minimum number of rectangles. In 1988 Naha and Sahni [101] also develop an algorithm that partitions into less than 3/2 of the minimum number of rectangles, but their algorithm runs in 0(n log n) time. Finally in 1989, Liou et al. [84] produce an 0(n) time algorithm to optimally partition an orthogonal polygon without holes into the minimum number of rectangles. The 0{n) time is achieved assuming that the polygon is first triangulated using Chazelle's linear time triangulation algorithm. Note that the three dimensional version of the problem is NP-complete [36]. Minimizing the total length of the line segments introduced in the partitioning process is the other optimization criterion that arises in the applications. See Figure 6. Lingas et al. [83] were the first to investigate this optimization criteria. They present an 0{n^) time algorithm for the problem of partitioning an orthogonal polygon without holes into rectangles using the minimum amount of ink. If the polygon contains holes they show that the problem becomes NP-complete. In applications holes do occur, thus the search was on for approximation algorithms for the problem. The first algorithm of this type was given by Lingas [81]. In 1983 he presented an O(n^) time algorithm to partition an orthogonal polygon with holes into rectangles such that the amount of "ink" used is within a constant of the minimum amount possible. Unfortunately, the constant for this algorithm is large (41). In 1986 Levcopoulos [74] was able to reduce the constant to five while also producing an algorithm running in only 0{n^) time. In the same year [73] he further reduced the time to 0(/i log n), but at the expense of a large increase in the size of the constant. The restriction of the problem to where the orthogonal polygon becomes a rectangle and the holes become points is also NP-complete [83]. Gonzalez and Zheng [51] show how to adapt any approximation algorithm for the restricted problem to yield an approximation algorithm for the more general problem where the boundary polygon need not be a rectangle. Their method is to use the algorithm given in [83] to partition the boundary orthogonal polygon into rectangles, then each of these rectangles along with the point holes inside it, becomes an instance of the restricted version of the problem. In 1985 Gonzalez and Zheng [51] give an approximation algorithm, running in 0{n^) time that partitions a rectangle with point holes into disjoint rectangles, using no more than 3 + \/3 times the minimum amount of "ink" required. The next year Levcopoulos
Polygon
decomposition
505
(a)
(b) Fig. 6. A partition using (a) the minimum number of rectangles, and (b) the minimum amount of "ink"
[73] improves the time to 0(n log n), while maintaining the same bound. Later Gonzalez and Zheng [53] give an algorithm that runs in 0{n^) time, that produces a solution within 3 times optimal. They use a so called "guillotine" partition to develop an approximation algorithm within 1.75 times optimal [52], but which uses O(n^) time. See Figure 7. A recent paper [49] provides a simpler proof that the "guillotine" partition is within 2 times optimal. If time is more important, Gonzalez et al. [50] give an algorithm that runs in 0{n log n) time, but only finds a solution guaranteed to be within four times optimal. If Steiner points are disallowed, then quadrilaterals rather than rectangles become the natural component type for the decomposition of orthogonal polygons. Kahn, Klawe and Kleitman [63] show that it is always possible to partition an orthogonal polygon into convex quadrilaterals. This is not always possible for arbitrary polygons. This partitioning of a polygon into convex quadrilaterals is referred to as quadrilateralization. Sack and Toussaint develop an 0{n log n) time algorithm for quadrilateralizing an orthogonal polygon [120,122]. They use a two step process. First the orthogonal polygon is partitioned into a specific type of monotone polygon, these are in turn partitioned into quadrilaterals in linear time [121]. Lubiw [92] also provides an 0(n log n) time quadrilateralization algorithm for orthogonal polygons. Arbitrary monotone or star-shaped orthogonal polygons can be quadrilateralized in linear time [122].
n
JM. Keil
506
i 1
1 1 i 1
1
1
1 1
1
1 1 i 1
1 r
1 1 1
A
1
w
^
;
1
''
'
^_J
1
Fig. 7. A guillotine partition.
Let us now turn to the problem of finding the minimum edge length quadrilateralization of an orthogonal polygon. For this problem Keil and Sack [68] give an O(n^) time algorithm. Later Conn and O'Rourke [32] improve this to Oirv' log n) time. There are other known results concerning orthogonal partitioning. Liu and Ntafos [90] show how to partition a monotone orthogonal polygon into star-shaped components. Their algorithm runs in 0{n log n) time, allows Steiner points, and yields a decomposition within four times optimal. Gunther [56] gives a polynomial time algorithm for partitioning an orthogonal polygon into orthogonal polygons with k or fewer vertices. In most cases this algorithm finds a partition that is within a factor of two of optimal. Gyori et al. [58] also have some results on partitioning orthogonal polygons into subpolygons with a fixed number of vertices.
Polygon
507
decomposition
3.2. Covering orthogonal polygons Tools from graph theory are useful when developing algorithms for covering orthogonal polygons. If each edge of an orthogonal polygon is extended to a line, a rectangular grid results. Based on this grid, a graph can be associated with a covering problem as follows. The vertices of the graph are the grid squares that lie within the polygon and two such vertices are adjacent if the associated grid squares can be covered by a subpolygon lying entirely within the polygon. Depending upon the type of subpolygon, there can be a correspondence between covering the graph with the minimum number of cliques and the original polygon covering problem. For example in Figure 8, if the grid squares are joined by edges if they lie in the same rectangle, then the problem of covering the polygon with rectangles corresponds to covering the derived graph with cliques. If such a correspondence exists, then the tractability of both problems depends upon the properties of the derived graph. This graph theory approach underlies several of the algorithms we shall encounter in this section. The types of subpolygons that have been studied include rectangles, squares, orthogonally convex, orthogonally star-shaped and others. Rectangles. The problem of covering an orthogonal polygon with the minimum number of axis aligned rectangles has found application in data compression [91], the storing of graphic images [96], and the manufacture of integrated circuits [23,60]. As early as 1979 Masek [96] showed that if the orthogonal polygon contains holes, then the problem is NP-complete. Later Conn and O'Rourke [31] show that for an orthogonal polygon with holes it is also NP-complete if only the boundary or only the reflex vertices
•
1 1 1 1
_ 1 1
Fig. 8. Each grid region can be associated with the vertex of a graph.
508
JM. Keil
need to be covered. Attention then turned to the case where the polygon does not contain holes. In 1981 Chaiken et al. [23] initiated the above mentioned graph theory approach. They define a graph G with grid squares for vertices and with two vertices adjacent if there is a rectangle, lying entirely within the polygon, that contains both associated grid squares. They show that the cliques of this graph correspond to the rectangles in the polygon whose sides lie on grid lines. The rectangle cover problem then corresponds to the problem of covering the vertices of the graph with the minimum number of cliques. This clique problem is NP-complete in general but polynomially solvable for the class of perfect graphs. Unfortunately, the graph derived from the rectangle problem is not perfect, even if the polygon does not contain holes [23]. In the search for a solvable restriction of the problem attention turned to restricted types of orthogonal polygons. An orthogonal polygon is called horizontally {vertically) convex if its intersection with every horizontal (vertical) line is either empty or a single line segment. For an example see Figure 9. An orthogonal polygon is called orthogonally convex if it is both horizontally and vertically convex. Chaiken et al. [23] have an example showing that even for orthogonally convex polygons the derived graph is not perfect. Thus for the rectangle covering problem the graph approach has not yielded efficient algorithms. Note that the intersection graph of the maximal rectangles in an orthogonal polygon without holes is perfect [127]. To develop a polynomial time algorithm for the special case of covering an orthogonally convex polygon with the minimum number of rectangles, in 1981 Chaiken et al. [23] use an approach that reduces the problem to the same problem on a smaller polygon. Later Liou et al. [85] develop an 0(n) time algorithm for this problem. Brandstadt also contributes a linear algorithm for the restricted case of 2-staircase polygons [19]. In 1984 Franzblau and Kleitman [43] handle the larger class of horizontally convex polygons. They give a polynomial time algorithm for covering this class with the minimum number of rectangles. See also [57]. In 1985 Lubiw [93] was able to provide a polynomial time algorithm for another restricted class of orthogonal polygons. Her algorithm handles orthogonal polygons that do not contain a rectangle that touches the boundary of the polygon only at two opposite comers of the rectangle. In spite of these efforts on special cases the general problem of covering an orthogonal polygon without holes with the minimum number of rectangles remained open for some time. Finally in 1988, Culberson and Reckhow [35] settle the issue by showing the problem to be NP-complete. Later Herman and Das Gupta [16] go further and show that no polynomial time approximation scheme for the problem exists unless P = NP. The difficulty of the problem led Cheng et al. [30], in 1984, to develop a linear approximation algorithm that is guaranteed to find a solution within four times optimal for hole free polygons. Then in 1989 Franzblau develops an 0{n log n) time approximation algorithm that yields a covering containing 0(^ log 9) rectangles, where 0 is the minimum number of rectangles required for a covering [44]. She also shows that an optimal partitioning contains at most 20 -\- H — \ rectangles, where H is the number of holes contained in the polygon.
Polygon
decomposition
509
Fig. 9. A horizontally convex polygon.
Recently, Keil [67] introduces a type of rectangle decomposition which is intermediate between partitioning and covering. This non-piercing covering allows rectangles to overlap, but if two rectangles A and B overlap, then either A — B or B — A must be connected. Keil provides an 0(n log n-\-mn) time algorithm for finding an optimal non-piercing covering of an orthogonal polygon P without holes, where m is the number of edges in the visibility graph of P that are either horizontal, vertical or form the diagonal of an empty rectangle. Squares. Covering polygons with axis aligned squares has application in the construction of data structures used in the storage and processing of digital images. For example, the digital medial axis transform (MAT) [136] is based on representing an image by the union of squares. Simple images may be covered by few squares and may be easily reconstructed from the MAT. Scott and Iyengar [125] define the Translation Invariant Data Structure (TID), as a method for representing images. An image is considered to be a grid of "black" and "white"
510
JM. Keil
pixels, and the TID for a given image consists of a list of maximal squares covering all black regions within the image. In order to reduce the cost of storing and manipulating a TID, the underlying list of squares should be as small as possible. Scott and Iyengar [125] give a heuristic for finding a small covering set of squares as part of their TID construction algorithm. Albertson and O'Keefe [5] investigate a graph associated with the square covering problem. A unit square in the plane whose comers are integer lattice points is called a block. A polygon with integer vertices then contains of set of A^ blocks. Albertson and O'Keefe define a graph, with the blocks as vertices and with such vertices adjacent if the corresponding blocks can be covered by a square lying entirely within the polygon. They show that for polygons without holes this graph is perfect. They further show that the blocks corresponding to a cUque in the graph form a set of blocks entirely contained within a single square lying in the polygon. Aupperle et al. [8] investigate this graph further and show that for polygons without holes the graph is chordal. This allows the use of an algorithm for covering chordal graphs by cliques to serve as an 0(N^-^) time algorithm for the problem of covering an orthogonal polygon without holes with the minimum number of squares. By further exploiting the geometry, Aupperle [7] adapts this approach to produce an 0(A^^^) time algorithm for this problem. The fastest algorithm based on the blocks lying in the polygon runs in O(A^) time and is due to Moitra [97,98]. The number A^ of blocks lying in the polygon could be much larger that n, the number of vertices defining the polygon. Even if the block side is optimized A^ may be Q (n^). In light of this Bar-Yehuda and Ben-Chanoch [11] consider an alternative approach of covering the polygon one square at a time and achieve an 0(n -\- 0) time algorithm for covering an orthogonal polygon without holes, where 0 is the minimum number of squares required in a cover. If the polygon contains holes the square coverage problem becomes NP-complete [8,7]. Orthogonal convex and star-shaped subpolygons. When restricting the polygons to be orthogonal we find it is natural to also restrict the notion of visibility. We consider two notions of orthogonal visibility [33]. Two points of a polygon are said to be r-visible if there exists a rectangle that contains the two points [66]. Using r-visibility leads to the fact that an r-convex polygon is just a rectangle. The decomposition of an orthogonal polygon into rectangles has been discussed in previous subsections. An r-star-shaped polygon, P, is an orthogonal polygon for which there exists a point q of P such that for all other points p of P p is r-visible (i.e. lies in the same rectangle) to q. Recall that an orthogonally convex polygon is an orthogonal polygon that is both horizontally and vertically convex. Two points of an orthogonal polygon are said to be s-visible (staircase visible) if there exists an orthogonally convex subpolygon containing both points. Note that an s-convex polygon is simply an orthogonally convex polygon. An s-starshaped polygon contains a point q, such that for every point /?, in the polygon, there is an orthogonally convex subpolygon containing both p and q. In this subsection we will consider the problems of covering an orthogonal polygon with the minimum number of r-stars, s-stars and orthogonally convex polygons. A classification of orthogonal polygons, due to Reckhow and Culberson [119], based on the types of "dents" encountered, has been useful in the work on these problems [34,33,
Polygon
decomposition
511
Fig. 10. A class 3 polygon containing N, W and S dents.
100,99,116,118,119]. If the boundary of the orthogonal polygon is traversed in the clockwise direction, at each comer either a right 90° (outside comer) or a left 90° (inside corner) tum is made. A dent is an edge of P both of whose endpoints are inside comers. If the polygon is aligned so that north (N) corresponds with the positive y axis, then dents can be classified according to compass directions. For example, an N dent is traversed from west to east in a clockwise traversal of the polygon. An orthogonal polygon can then be classified according to the number and the types of dents it contains. A class k orthogonal polygon contains dents of k different orientations. Class 0 orthogonal polygons are the orthogonally convex polygons. A vertically or horizontally convex polygon (class 2a) is a class 2 orthogonal polygon which has only opposing pairs of dent types (i.e. N and S or E and W). Class 2b orthogonal polygons have two dent orientations that are orthogonal to one another (i.e. W and N, N and E, E and S, or S and W). For an example of a class 3 polygon see Figure 10. The graph theory approach has been important in the development of understanding of these problems. By extending the dent edges across the polygon a partition into 0(n^) basic regions results. These basic regions correspond to vertices in the definition of several relevant graphs. Motwani et al [100,99] define an s-convex visibility graph, using the basic regions as vertices, where two vertices are adjacent in the graph if the corresponding basic regions can be covered by a single orthogonally convex subpolygon. They define an r-star (s-star) visibility graph, again using the basic regions as vertices, where two vertices u and V are adjacent if there is a region w that is r-visible (s-visible) to the regions corresponding to u and i;. Related directed graphs were defined by Culberson and Reckhow [119,33,118, 34]. In 1986 Keil [66] provides the first algorithm for minimally covering with orthogonally convex components. He provides an 0(n^) time algorithm for covering horizontally convex orthogonal polygons. In 1987, for this problem, Reckhow and Culberson [119,34] give an ^ (n^) lower bound on actually listing the vertices of all the subpolygons in the output, but provide an 0(n) time algorithm for finding the minimum number of orthogonally convex polygons in an optimal cover of a horizontally convex orthogonal polygon. Culberson and Reckhow also provide an 0(n^) algorithm for minimally covering class 2b type orthogonal
512
J.M. Keil
polygons, and they give a complex algorithm for handling a larger class. Later for class 3 polygons Reckhow [118] provides an 0{n^) time algorithm. For the problem of covering with orthogonally convex components the relevant convex visibility graph is formed by connecting two grid squares if they can be covered by a single orthogonally convex subpolygon [99,116,118,119]. Motwani et al. [99] prove that a minimum clique cover of this visibility graph corresponds exactly to a minimum cover of the corresponding orthogonal polygon by orthogonal convex polygons. Thus we may solve the polygon covering problem using existing graph clique cover algorithms. The complexity of the available clique cover algorithms depends upon the properties of the convex visibility graph. For class 2 polygons, the convex visibiHty graph is a permutation graph [99,116]. For class 3 polygons, the graph turns out to be weakly triangulated [99,118]. Although these graph classes allow polynomial time clique cover algorithms, the known geometric algorithms are still the most efficient algorithms to solve the problem of covering an orthogonal polygon with the minimum number of orthogonally convex subpolygons. For class 4 polygons (general orthogonal polygons) the convex visibility graph is not perfect [99,116] and the complexity of the general problem of covering orthogonal polygons with the minimum number of orthogonally convex subpolygons remains open. For covering with r-stars, Keil [66] provides an O(n^) time algorithm for optimally covering a horizontally convex orthogonal polygon. This is later improved to 0{n) time in [46]. For general class 2 polygons, class 3 polygons and general orthogonal polygons the problem of covering with the minimum number of r-stars remains open. For covering with s-stars, Culberson and Reckhow [33] provide 0{n^) time algorithms for optimally covering horizontally convex orthogonal polygons and general class 2 polygons. For class 3 and class 4 polygons the development of algorithms has depended upon properties of the s-star visibility graph. Motwani et al. [100] show that for class 3 polygons the derived s-star visibility graph is chordal. They show that a minimum chque cover algorithm for chordal graphs can be used to s-star cover class 3 polygons in Oirv") time. For class 4 polygons they show that the derived s-star graph is weakly triangulated. This then leads to an O(n^) time algorithm for the general s-star covering problem [100]. Other covering subpolygons. There are some other known results related to the covering of orthogonal polygons with subpolygons. Bremner and Shermer [20,21] studied an extension of orthogonal visibility, called (9-visibility, in which two points of the polygon are (9-visible if there is a path between them whose intersection with every line in the set O of orientations is either empty of connected. For orthogonal visibility O = {0°, 90°}. A polygon P is O-convex if every two points of P are O-visible, and C7-star-shaped if there is a point of P from which every other point of P is O-visible. Bremner and Shermer [20,21] were able to characterize classes of orientations for which minimum covers of a (not necessarily orthogonal) polygon by (9-convex or (9-star-shaped components could be found in polynomial time. Regular star-shaped (nonorthogonal) polygons have also been studied as covering subpolygons. Edelsbrunner et al. [38] give an 0{n log n) time algorithm that covers an orthogonal polygon with L§ J + 1 star-shaped subpolygons, where r is the number of reflex vertices in the polygon. This is improved by Sack and Toussaint [123] who give an 0{n) time
Polygon decomposition
513
algorithm for covering an orthogonal polygon with [fj star-shaped components. Carlsson et al. [22] are able to produce an optimal star-shaped cover for histograms in linear time. Gewali and Ntafos [47] consider covering with a variation of r-stars where periscope vision is allowed. They give an O(n^) algorithm for optimally covering a restricted type of orthogonal polygon. A different variation of r-stars is considered by Maire [94]. His stars consist of a union of a vertical and a horizontal rectangle and look like "plus" signs. He defines a type of star graph and shows it is weakly triangulated implying an optimal algorithm for the covering problem. Acknowledgement The author wishes to thank the Natural Sciences and Engineering Research Council of Canada for financial support.
References [1] A. Aggarwal, The Art Gallery Problem: Its Variations, Applications, and Algorithmic Aspects, PhD thesis, Johns Hopkins Univ., Baltimore, MD (1984). [2] A. Aggarwal and B. Chazelle, Efficient algorithm for partitioning a polygon into star-shaped polygons. Report, IBM T.J. Watson Res. Center, Yorktown Heights, NY (1984). [3] A. Aggarwal, S.K. Ghosh and R.K. Shyamasundar, Computational complexity of restricted polygon decompositions. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam (1988), 1-11. [4] A. Aggarwal, L.J. Guibas, J. Saxe and RW. Shor, A linear-time algorithm for computing the Voronoi diagram of a convex polygon. Discrete Comput. Geom. 4 (6) (1989), 591-604. [5] M. Albertson and C.J. O'Keefe, Covering regions by squares, SIAM J. Algebraic Discrete Methods 2 (3) (1981), 240-243. [6] Ta. Asano, Te. Asano and H. Imai, Partitioning a polygonal region into trapezoids, J. ACM 33 (1986), 290-312. [7] L.J. Aupperle, Covering regions by squares, M.Sc. thesis, Dept. Comput. Sci., Univ. Saskatchewan, Saskatoon, Sask. (1987). [8] L.J. Aupperle, H.E. Conn, J.M. Keil and J. O'Rourke, Covering orthogonal polygons with squares, Proc. 26th AUerton Conf. Commun. Control Comput. (October 1988), 97-106. [9] D. Avis and G.T. Toussaint, An efficient algorithm for decomposing a polygon into star-shaped polygons. Pattern Recogn. 13 (1981), 395-398. [10] C. Bajaj and T.K. Dey, Convex decompositions ofpolyhedra and robustness, SIAM J. Comput. 21 (1992), 339-364. [11] R. Bar-Yehuda and E. Ben-Chanoch, A linear time algorithm for covering simple polygons with similar rectangles, Internal. J. Comput. Geom. Appl. 6 (1996), 79-102. [12] B.G. Batchelor, Hierarchical shape description based upon convex hulls of concavities, J. Cybem. 10 (1980), 205-210. [13] P. Belleville, On restricted boundary covers and convex three-covers, Proc. 5th Canad. Conf. Comput. Geom., Waterloo, Canada (1993), 467^72. [14] P. Belleville, A Study of Convex Covers in Two or More Dimensions, PhD thesis, School of Computing Science, Simon Fraser University (1995). [15] P. Belleville, Computing two-covers of simple polygons. Master's thesis. School of Computer Science, McGill University (1991). [16] P. Berman and B. DasGupta, Approximating the rectilinear polygon cover problems, Proc. 4th Canad. Conf. Comput. Geom. (1992), 229-235.
514
JM. Keil
[17] M. Bern and D. Eppstein, Mesh generation and optimal triangulation, Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds. Lecture Notes Series on Comput. 1, World Scientific, Singapore (1992), 23-90. [18] P. Bose and G. Toussaint, Generating quadrangulations ofplanar point sets, Comput. Aided Geom. Design 14 (1997), 763-785. [19] A. Brandstadt, The jump number problem for biconvex graphs and rectangle covers of rectangular regions. Lecture Notes in Comput. Sci. 380 (1989), 68-77. [20] D. Bremner, Point visibility graphs and restricted-orientation polygon covering, M.Sc. thesis, School of Computing Science, Simon Eraser University, Bumaby, BC (April 1993). [21] D. Bremner and T. Shermer, Point visibility graphs and restricted-oriention convex cover. Technical Report CMPT TR 93-07, School of Computing Science, Simon Eraser University (1993). [22] S. Carlsson, B.J. Nilsson and S. Ntafos, Optimum guard covers and m-watchmen routes for restricted polygons, Proc. 2nd Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 519, SpringerVerlag (1991), 367-378. [23] S. Chaiken, D. Kleitman, M. Saks and J. Shearer, Covering regions by rectangles, SI AM J. Algebraic Discrete Methods 2 (1981), 394-410. [24] B. Chazelle, Computational geometry and convexity, PhD thesis, Dept. Comput. Sci., Yale Univ., New Haven, CT (1979). Carnegie-Mellon Univ. Report CS-80-150. [25] B. Chazelle, A theorem on polygon cutting with applications, Proc. 23rd Annu. IEEE Sympos. Found. Comput. Sci. (1982), 339-349. [26] B. Chazelle, Approximation and decomposition of shapes. Advances in Robotics 1: Algorithmic and Geometric Aspects of Robotics, J.T. Schwartz and C.-K. Yap, eds, Lawrence Erlbaum Associates, Hillsdale, NJ(1987), 145-186. [27] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [28] B. Chazelle and D.P. Dobkin, Decomposing a polygon into its convex parts, Proc. 11th Annu. ACM Sympos. Theory Comput. (1979), 38-48. [29] B. Chazelle and D.P. Dobkin, Optimal convex decompositions. Computational Geometry, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1985), 63-133. [30] Y Cheng, S. Iyengar and R. Kashyap, A new method of image compression using irreducible covers of maximal rectangles, IEEE Trans, on Software Eng. 14 (1988), 651-658. [31] H. Conn and J. O'Rourke, Some restricted rectangle covering problems. Technical Report JHU 87-13, Dept. Comput. Sci., Johns Hopkins Univ., Baltimore, MD (1987). [32] H.E. Conn and J. O'Rourke, Minimum weight quadrilaterization in 0(/i log n) time, Proc. 28th AUerton Conf. Commun. Control Comput. (October 1990), 788-797. [33] J. Culberson and R. A. Reckhow, Dent diagrams: A unified approach to polygon covering problems. Technical Report TR 87-14, Dept. of Computing Sci., University of Alberta (1987). [34] J. Culberson and R.A. Reckhow, Orthogonally convex coverings of orthogonal polygons without holes, J. Comput. Syst. Sci. 39 (1989), 166-204. [35] J. Culberson and R.A. Reckhow, Covering polygons is hard, J. Algorithms 17 (1994), 2-44. [36] V.J. Dielissen and A. Kaldewaij, Rectangular partition is polynomial in two dimensions but NP-complete in three. Inform. Process. Lett. 38 (1991), 1-6. [37] D.P. Dobkin, D.L. Souvaine and C.J. Van Wyk, Decomposition and intersection of simple splinegons, Algorithmica 3 (1988), 473^86. [38] H. Edelsbrunner, J. O'Rourke and E. Welzl, Stationing guards in rectilinear art galleries, Comput. Vision Graph. Image Process. 28 (1984), 167-176. [39] H. ElGindy and G.T. Toussaint, On geodesic properties of polygons relevant to linear time triangulation. Visual Comput. 5(1-2) (1989), 68-74. [40] H. Everett, W. Lenhart, M. Overmars, T. Shermer and J. Urrutia, Strictly convex quadrilateralizations of polygons, Proc. 4th Canad. Conf. Comput. Geom. (1992), 77-83. [41] H.Y.F. Feng and T. Pavlidis, Decomposition of polygons into simpler components: Feature generation for syntactic pattern recognition, IEEE Trans. Comput. C-24 (1975), 636-650. [42] L. Ferrari, P. V. Sankar and J. Sklansky, Minimal rectangular partitions of digitized blobs, Comput. Vision Graph., Image Process. 28 (1984), 58-71.
Polygon decomposition
515
[43] D. Franzblau and D. Kleitman, An algorithm for covering polygons with rectangles, Inform. Control 63 (1984), 164-189. [44] D.S. Franzblau, Performance guarantees on a sweep-line heuristic for covering rectilinear polygons with rectangles, SI AM J. Discrete Math. 2 (1989), 307-321. [45] M.R. Garey, D.S. Johnson, F.P. Preparata and R.E. Tarjan, Triangulating a simple polygon. Inform. Process. Lett. 7 (1978), 175-179. [46] L. Gewali, J.M. Keil and S. Ntafos, On covering orthogonal polygons with star shaped polygons. Inform. Sci. 65 (1992), 45-63. [47] L. Gewali and S. Ntafos, Minimum covers for grids and orthogonal polygons by periscope guards, Proc. 2ndCanad. Conf. Comput. Geom. (1990), 358-361. [48] S. K. Ghosh, Approximation algorithms for art gallery problems, Proc. Canadian Inform. Process. Soc. Congress (1987). [49] T. Gonzalez, M. Razzazi, M.-T. Shing and S.-Q. Zheng, On optimal guillotine partitions approximating optimal d-box partitions, Comput. Geom. 4 (1994), 1-12. [50] T. Gonzalez, M. Razzazi and S.-Q. Zheng, An efficient divide-and-conquer approximation algorithm for partitioning into d-boxes, Intemat. J. Comput. Geom. Appl. 3 (1993), 417^28. [51] T. Gonzalez and S.-Q. Zheng, Bounds for partitioning rectilinear polygons, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 281-287. [52] T. Gonzalez and S.-Q. Zheng, Improved bounds for rectangular and guillotine partitions, J. Symbolic Comput. 7 (1989), 591-610. [53] T. Gonzalez and S.-Q. Zheng, Approximation algorithms for partitioning a rectangle with interior points, Algorithmica 5 (1990), 11-42. [54] K.D. Gourley and D.M. Green, A polygon-to-rectangle conversion algorithm, IEEE Comput. Graphics 3 (1983), 31-36. [55] D.H. Greene, The decomposition of polygons into convex parts. Computational Geometry, F.P. Preparata, ed.. Advances in Computing Research, Vol. 1, JAI Press, London, England (1983), 235-259. [56] O. Gunther, Minimum k-partitioning of rectilinear polygons, J. Symbolic Comput. 9 (1990), 457^83. [57] E. Gyori, Covering simply connected regions by rectangles, Combinatorica 5 (1985), 53-55. [58] E. Gyori, F. Hoffmann, K. Kriegel and T. Shermer, Generalized guarding and partitioning for rectilinear polygons, Proc. 6th Canad. Conf. Comput. Geom. (1994), 302-307. [59] H.-D. Hecker and D. Herwig, Some NP-hard polygon cover problems, J. Inform. Process. Cybem. 25 (1989), 101-108. [60] A. Hegedus, Algorithms for covering polygons by rectangles, Comput. Aided Geom. Design 14 (1982), 257-260. [61] S. Hertel and K. Mehlhorn, Fast triangulation of the plane with respect to simple polygons. Inform. Control 64 (1985), 52-76. [62] H. Imai and Ta. Asano, Efficient algorithms for geometric graph search problems, SIAM J. Comput. 15 (1986), 478^94. [63] J. Kahn, M. Klawe and D. Kleitman, Traditional galleries require fewer watchmen, SIAM J. Algebraic Discrete Methods 4 (1983), 194-206. [64] J.M. Keil, Decomposing a polygon into simpler components, PhD thesis, Univ. of Toronto, Toronto, Canada (1983). Report 163/83. [65] J.M. Keil, Decomposing a polygon into simpler components, SIAM J. Comput. 14 (1985), 799-817, [66] J.M. Keil, Minimally covering a horizontally convex orthogonal polygon, Proc. 2nd Annu. ACM Sympos. Comput. Geom. (1986), 43-51. [67] J.M. Keil, Covering orthogonal polygons with non-piercing rectangles, Intemat, J. Comput. Geom. Appl. (1996). [68] J.M. Keil and J,-R, Sack, Minimum decompositions of polygonal objects. Computational Geometry, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1985), 197-216, [69] J.M. Keil and J. Snoeyink, On the time bound for convex decomposition of simple polygons. Proceedings of the Tenth Canadian Conference on Computational Geometry (1998). [70] G.T, Klincsek, Minimal triangulations of polygonal domains. Discrete Math. 9 (1980), 121-123. [71] D.T. Lee and A. Lin, Computational complexity of art gallery problems, IEEE Trans. Inform, Theory 32 (1986), 276-282,
516
JM. Keil
[72] C. Levcopoulos, A fast heuristic for covering polygons by rectangles, Proc. Fundamentals of Comput. Theory, Lecture Notes in Comput. Sci. 199, Springer-Verlag (1985). [73] C. Levcopoulos, Fast heuristics for minimum length rectangular partitions of polygons, Proc. 2nd Annu. ACM Sympos. Comput. Geom. (1986), 100-108. [74] C. Levcopoulos, Minimum length and thickest-first rectangular partitions ofpolygons. Report LITH-IDAR-86-01, Dept. of Computer and Information Sci., Linkoping University, Linkoping, Sweden (1986). [75] C. Levcopoulos, Improved bounds for covering general polygons with rectangles, Proc. Conf. Found. Softw. Tech. Theoret. Comput. Sci., Lecture Notes in Comput. Sci. 287, Springer-Veriag (1987), 95-102. [76] C. Levcopoulos and D. Krznaric, Quasi-greedy triangulations approximating the minimum weight triangulation, Proc. 7nd Annu. ACM-SIAM Symp. on Discrete Algorithms (1996), 392^01. [77] C. Levcopoulos and A. Lingas, Bounds on the length of convex partitions of polygons, Proc. 4th Conf. Found. Softw. Tech. Theoret. Comput. Sci., Lecture Notes in Comput. Sci., Springer-Verlag (1984), 279295. [78] C. Levcopoulos and A. Lingas, Covering polygons with minimum number of rectangles, Proc. 1st Sympos. Theoret. Aspects Comput. Sci., Lecture Notes in Comput. Sci., Springer-Verlag (1984), 63-72. [79] C. Levcopoulos, A. Lingas and J.-R. Sack, Heuristics for optimum binary search trees and minimum weight triangulation problems, Theoret. Comput. Sci. 66 (2) (August 1989), 181-203. [80] A. Lingas, The power of non-rectilinear holes, Proc. 9th Intemat. Colloq. Automata Lang. Program., Lecture Notes in Comput. Sci. 140, Springer-Veriag (1982), 369-383. [81] A. Lingas, Heuristics for minimum edge length rectangular partitions of rectilinear figures, Proc. 6th GI Conf. Theoret. Comput. Sci., Lecture Notes in Comput. Sci. 145, Springer-Veriag (1983), 199-210. [82] A. Lingas, C. Levcopoulos and J.-R. Sack, Algorithms for minimum length partitions of polygons, BIT 27 (1987), 474^79. [83] A. Lingas, R. Pinter, R. Rivest and A. Shamir, Minimum edge length partitioning of rectilinear polygons, Proc. 20th AUerton Conf. Commun. Control Comput. (1982), 53-63. [84] W.T. Liou, J.J.M. Tan and R.C.T. Lee, Minimum partitioning simple rectilinear polygons in 0{n log log n) time, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 344-353. [85] W.T. Liou, C.Y. Tang and R.C.T. Lee, Covering convex rectilinear polygons in linear time, Intemat. J. Comput. Geom. Appl. 1 (2) (1991), 137-185. [86] W. Lipski, Jr., Finding a Manhattan path and related problems, Networks 13 (1983), 399^09. [87] W. Lipski, Jr., An 0{n log n) Manhattan path algorithm. Inform. Process. Lett. 19 (1984), 99-102. [88] W. Lipski, Jr., E. Lodi, F. Luccio, C. Mugnai and L. PagH, On two-dimensional data organization II, Fund. Inform. 2 (1979), 245-260. [89] R. Liu and S. Ntafos, On decomposing polygons into uniformly monotone parts. Inform. Process. Lett. 27 (1988), 85-89. [90] R. Liu and S. Ntafos, On partitioning rectilinear polygons into star-shaped polygons, Algorithmica 6 (1991), 771-800. [91] E. Lodi, F. Luccio, C. Mugnai and L. PagH, On two-dimensional data organization I, Fund. Inform. 2 (1979), 211-226. [92] A. Lubiw, Decomposing polygonal regions into convex quadrilaterals, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 97-106. [93] A. Lubiw, The Boolean basis problem and how to cover some polygons by rectangles, SIAM J. Discrete Math. 3(1990), 98-115. [94] F. Maire, Polyominos and perfect graphs. Inform. Proc. Lett. 50 (1994), 57-61. [95] M. Manjuathaiah and D. Nicole, Accuractely representing the union of convex sections. Manuscript (1995). [96] W.J. Masek, Some NP-complete set covering problems. Manuscript (1979). [97] D. Moitra, Efficient parallel algorithms for covering binary images, PhD thesis, Dept. Comput. Sci., Cornell Univ., Ithaca, NY (1989). Technical Report TR-89-1013. [98] D. Moitra, Finding a minimal cover for binary images: An optimal parallel algorithm, Algorithmica 6 (1991), 624-657. [99] R. Motwani, A. Raghunathan and H. Saran, Perfect graphs and orthogonally convex covers, SIAM J. Discrete Math. 2 (1989), 371-392. [100] R. Motwani, A. Raghunathan and H. Saran, Covering orthogonal polygons with star polygons: The perfect graph approach, J. Comput. Syst. Sci. 40 (1990), 1 9 ^ 8 .
Polygon decomposition
517
[101] S. Nahar and S. Sahni, Fast algorithm for polygon decomposition, IEEE Trans. Computer-Aided Design of Integrated Circuits and Systems 7 (1988), 473^83. [102] B. Nilsson, Guarding art galleries, PhD tliesis, Dept. Comput. Sci., Lund Univ., Lund, Sweden (1994). [103] T. Ohtsuki, Minimum dissection of rectilinear regions. Proceedings of the 1982 IEEE International Symposium on Circuits and Systems, Rome (1982), 1210-1213. [104] J. O'Rourke, The complexity of computing minimum convex covers for polygons, Proc. 20th AUerton Conf. Commun. Control Comput. (1982), 75-84. [105] J. O'Rourke, The decidability of covering by convex polygons. Report JHU-EECS 82-4, Dept. Elect. Engrg. Comput. Sci., Johns Hopkins Univ., Baltimore, MD (1982). [106] J. O'Rourke, Minimum convex cover for polygons: Some counter examples. Report JHU-EE 82-1, Dept. Elect. Engrg. Comput. Sci., Johns Hopkins Univ., Baltimore, MD (1982). [107] J. O'Rourke, Polygon decomposition and switching function minimization, Comput. Graph. Image Process. 18(1982), 382-391. [108] J. O'Rourke, Art Gallery Theorems and Algorithms, Oxford University Press, New York, NY (1987). [109] J. O'Rourke, C.-B. Chien, T. Olson and D. Naddor, A new linear algorithm for intersecting convex polygons, Comput. Graph. Image Process. 19 (1982), 384-391. [110] J. O'Rourke and K.J. Supowit, Some NP-hard polygon decomposition problems, IEEE Trans. Inform. Theory IT-30 (1983), 181-190. [ I l l ] T. Pavlidis, Structural Pattern Recognition, Springer-Verlag, Berlin-Heidelberg (1977). [112] T. Pavlidis, Survey: A review of algorithms for shape analysis, Comput. Graph. Image Process. 7 (1978), 243-258. [113] T. Pavlidis and H.-Y Feng, Shape discrimination. Syntactic Pattern Recognition, K.S. Fu, ed., SpringerVerlag, New York (1977), 125-145. [114] D. Plaisted and J. Hong, A heuristic triangulation algorithm, J. Algorithms 8 (1987), 405^37. [115] F.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag, New York, NY (1985). [116] A. Raghunathan, Polygon decomposition and perfect graphs, PhD thesis. University of California at Berkeley, Berkeley, California (1988). [117] S. Ramaswami, P. Ramos and G. Toussaint, Converting triangulations to quadrangulations, Proc. 7rd Annu. Canadian Conf. on Comput. Geom. (1995), 297-302. [118] R. Reckhow, Covering orthogonal convex polygons with three orientations of dents. Report TR87-17, Department of Computing Sci., Edmonton, Alberta (1987). [119] R.A. Reckhow and J. Culberson, Covering a simple orthogonal polygon with a minimum number of orthogonally convex polygons, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 268-277. [120] J.-R. Sack, An 0(n log n) algorithm for decomposing rectilinear polygons into convex quadrilaterals, Proc. 20th AUerton Conf. Commun. Control Comput. (1982), 64-75. [121] J.-R. Sack, Rectilinear computational geometry, PhD thesis, School Comput. Sci., Carleton Univ., Ottawa, ON (1984). Report SCS-TR-54. [122] J.-R. Sack and G.T. Toussaint, A linear-time algorithm for decomposing rectilinear polygons into convex quadrilaterals, Proc. 19th AUerton Conf. Commun. Control Comput. (1981), 21-30. [123] J.-R. Sack and G.T. Toussaint, Guard placement in rectilinear polygons. Computational Morphology, G.T. Toussaint, ed., North-HoUand, Amsterdam, Netherlands (1988), 153-175. [124] B. Schachter, Decomposition of polygons into convex sets, IEEE Trans. Comput. C-27(ll) (1978), 10781082. [125] D.S. Scott and S.S. Iyengar, Tid - a translation invariant data structure for storing images, Comm. ACM 29 (5) (1986), 418^29. [126] M. Shapira and A. Rappoport, Shape blending using the star-skeleton representation. Manuscript (1994). [127] J. Shearer, A class ofperfect graphs, SIAM J. Algebraic Discrete Methods 3 (3) (1982), 281-284. [128] TC. Shermer, Covering and guarding polygons using l]^-sets, Geometriae Dedicata 37 (1991), 183-203. [129] TC. Shermer, Recent results in art galleries, Proc. IEEE 80 (9) (September 1992), 1384-1399. [130] T.C. Shermer, On recognizing unions of two convex polygons and related problems. Pattern Recognition Lett. 14 (9) (1993), 737-745. [131] V. Soltan and A. Gorpinevich, Minimum dissection of rectilinear polygon with arbitrary holes in to rectangles. Discrete Comput. Geom. 9 (1993), 57-79.
518
JM. Keil
[132] S.B. Tor and A.E. Middleditch, Convex decomposition of simple polygons, ACM Trans. Graph. 3 (1984), 244-265. [133] G. Toussaint, Efficient triangulation of simple polygons. Visual Comput. 7 (1991), 280-295. [134] G.T. Toussaint, Pattern recognition and geometrical complexity, Proc. Fifth Inter. Conf. on Pattern Recognition (1980), 1324-1347. [135] G.T. Toussaint, Quadrangulations of planar sets, Proc. 4th Worlcshop on Algorithms and Data Structures (1995), 218-227. [136] A.Y. Wu, S.K. Bhaskar and A. Rosenfeld, Computation of geometric properties from the medial axis transform in 0(n log n) time, Comput. Vision, Graph. Image Process. 34 (1986), 76-92.
CHAPTER 12
Link Distance Problems Anil Maheshwari*^ Carleton University, School of Computer Science, Ottawa, ON, Canada KIS 5B6 E-mail: maheshwa @ scs. carleton. ca
Jorg-Rudiger Sack* Carleton University, School of Computer Science, Ottawa, ON, Canada KIS 5B6 E-mail: sack®scs.carleton.ca
Hristo N. Djidjev Department of Computer Science, University of Warwick, Coventry, CV4 7AL, England E-mail: hristo @ dcs. Warwick, ac. uk
Contents 1. Introduction 1.1. Motivation and applications 1.2. Notation and definitions 1.3. Organization of this chapter 2. Sequential algorithms for link distance problems 2.1. Simple polygons 2.2. Link paths for polygons with holes 2.3. Rectilinear polygons 2.4. Rectilinear link paths among obstacles 2.5. Robustness issues in link distance computations 3. Parallel algorithms for link distance problems 3.1. Simple polygons 3.2. Rectilinear polygons 4. Applications and extensions 4.1. Movement of robot arms in bounded regions
521 521 522 522 522 523 531 533 536 538 539 540 542 547 547
*This work was supported in part by the Environmental Protection Agency grant R82-5207-01-0. ^Part of this work was done at the Tata Institute of Fundamental Research, Mumbai, India. •^This research was supported in part by NSERC (Natural Sciences and Engineering Research Council of Canada) and Almerco Inc. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
519
520
A. Maheshwari
et al.
4.2. c-oriented paths 4.3. Approximating polygons and subdivisions with minimum hnk paths 4.4. Separation problems 4.5. Bicriteria shortest path problems 4.6. Nested polygon problems 4.7. Central link segment 4.8. Walking in an unknown street 4.9. Miscellaneous References
548 548 549 549 550 552 553 554 555
Link distance problems
521
1. Introduction 1.1. Motivation and applications The study of link distance problems is motivated by applications in several areas in computer science, such as Computer Graphics, Geographical Information Systems, Robotics, Image Processing, Cartography, VLSI, Computer Vision, and Solid Modeling. The link distance, defined with respect to a planar region R, sets the distance between a pair of points {s, t) in R to be the minimum number of line segments needed to construct a path in R that connects s io t. A path connecting s and t of length equal to the link distance between s and t is called a minimum link path. Frequently in these application areas it is important to produce paths of low combinatorial complexity. In the following we list some applications: the details can be found in [7,25,40,55,60,63,68,72,80,83]. We also refer the reader to Section 4. 1. Robotics/Motion Planning: Consider a robot that can move forward and rotate, and that is given the task to navigate in a constrained planar region. Suppose that straightline motion is "free", but rotation is "expensive". One motion planning task is to move the robot collision-free between two specified positions inside the region, such that the total number of turns is minimized. For point robots, the task corresponds to computing a minimum link path. (Chapter 15 of this Handbook [75] mentions how non-point robots can be reduced to the point robots.) 2. Communication Systems Design: In the design of communication systems using microwaves or lights as a communication media, direct communication is possible only if transmitter and receiver are in direct line-of-sight, a condition rarely met. Therefore, special devices, such as repeaters, are installed. Finding a minimum link path between two points inside a polygonal region means minimizing the number of repeaters required for the communication inside that region. (For details, see [72].) 3. Placement of telescoping manipulators: Suppose that an environment for a manipulator with telescoping links is described by a polygonal region. A telescoping link is a link of flexible size. The task here is to determine the minimum number of telescoping links that will allow the manipulator to reach every point in the environment. (For details, see [55].) 4. Curve compression: Minimum link paths are also used for curve compression in solid modeling. A typical problem in solid modeling is to compute the intersection of surfaces. The intersection of two surfaces can be quite complex even if the surfaces themselves are of relative low degree. To avoid the combinatorial explosion inherent in the closed form solution, it is convenient to compute a piecewise linear approximation to the curve of intersections. Natarajan [68] proposes to replace an intersection curve A by its minimum link analog, which is computed inside an e-fattening of A. The related work on approximating simple polygons and polygon maps is discussed in [40,63]. 5. VLSI Layouts: In graph layout and VLSI layout problems, it is desirable to minimize the number of bends. Moreover, in VLSI layout problems, wires typically run along orthogonal axes, and this motivates the study of link path problems in rectilinear settings. (For details, see [83,23].)
522
A. Maheshwari et al
An interesting aspect of the study of link distance problems is that often algorithms are more complex and/or have higher time complexities than those solving the corresponding problems for the Euclidean distance. One of the reasons for this is that in simple polygons the Euclidean path connecting two points is unique whereas this is usually not the case for a minimum link path.
1.2. Notation and definitions We are using standard notation and definitions. We assume that a simple polygon P is given as a clockwise sequence of vertices with their respective coordinates. The symbol P is used to denote the region of the plane enclosed by P, and bd(P) denotes the boundary of P.lf p and q are two points on bd(P), then the clockwise bd(P) from p to q is denoted by bd(p, q). Two points are said to be visible if the line segment joining them does not intersect the exterior of P (but might intersect bd(P)). The visibility polygon from a point X e P consists of all points y e P that are visible from x. A subpolygon of P is said to be a weak visibility polygon from a segment s if every point of the polygon is visible from some point of s. (Note that it is not necessarily the same point on s that sees all points in P.) Let SP{u, v) denote a Euclidean shortest path inside P from a point u to another point V. The shortest path tree of a polygon rooted at a vertex w, denoted hy SPT{u), is a tree containing Euclidean shortest paths from u to all other vertices of P. A Euclidean shortest path between any two vertices of a polygon is a polygonal path whose turning points are vertices of the polygon. If the polygon is simple, there is a unique shortest path between any pair of vertices. For details on shortest path characteristics, see Chapter 15 in this Handbook [75] or [41,56], and [84]. Throughout this chapter we assume that the simple polygons considered are triangulated. If required, an arbitrary simple polygon can be triangulated in linear time using the algorithm of Chazelle [12].
1.3. Organization of this chapter In this chapter, we will survey various link distance problems set in simple polygons, rectilinear polygons, and polygonal regions with holes. Sections 2 and 3 deal with sequential and parallel algorithms for link distance problems in Euclidean and rectilinear metric spaces, respectively. Section 4 deals with various applications and extensions of link distance problems.
2. Sequential algorithms for link distance problems In this section, we survey sequential algorithms for link distance problems in simple polygons (with and without holes), in rectilinear polygons, and among rectilinear obstacles. In Section 2.1, we describe algorithms for computing minimum link paths from a fixed source, for computing the link diameter, the link radius, and the link center, and for answering link
Link distance problems
523
distance and minimum link path queries in a simple polygon. In Section 2.2, we survey the literature on link path problems in polygonal domains in the presence of polygonal obstacles. In Section 2.3, we discuss algorithms for rectilinear link distance problems, including the computation of rectilinear histogram partition, rectilinear link diameter and link center. In Section 2.4, we survey the literature on rectilinear link distance problems in rectilinear domains. Finally, in Section 2.5, we study robustness issues arising in link distance computations. (General robustness issues are discussed in Chapter 14 of this Handbook [75].)
2.1. Simple polygons 2.1.1. Link path problems for a fixed source. Let P be a simple polygon on n-vertices and let 5", a fixed source, be a point inside P. In this section we study the following three problems: • Link Distance Query Problem: Given an arbitrary point t e P, compute di (s,t), i.e., the link distance between s and t. • Minimum Link Path Problem: Given an arbitrary point t, compute a minimum link path between >y and t. • Single-Source Multiple-Destination Minimum Link Path Problem: Compute minimum link paths from s to all vertices i; of P. The problem of finding minimum link paths were first studied by ElGindy [30] and Suri [78]. An 0(n) time algorithm is presented in [78] for the minimum link path problem. Ghosh [35] proposes an alternative linear time algorithm for solving the minimum link path problem. After an initial preprocessing of P, the link distance query problem can be solved in 0(log n) time by the algorithms of ElGindy [30] and Reif and Storer [72]. Their preprocessing step takes i? (n log n) time. Suri [78] presents an optimal 0 (n) algorithm for preprocessing P while maintaining 0(log n) query time. Using the algorithm of ElGindy [30], one can solve the single-source multiple-destination problem in 0(n log n) time, and this solution was further improved by Suri [78] to be linear time. Suri [80,81,78] presents a general technique that can be used to solve a number of link path problems. The technique consists of a partitioning of the polygon, called a window partitioning, into regions of equal link distance from s. Next we survey Suri's algorithm [80,81,78] for computing such a window partition of P. The main idea, in window partitioning of a polygon P with respect to the point 5 G P, is to partition P into regions over which the link distance from s is equal. To achieve this, first compute the visibility polygon from s and call it V(s). Every point in V(s) is reachable from s by one link. Removing V(s) from P leaves the set of points that are at least two links away from s. Of these, the points at link distance two are those visible from some point in V(s). We define a window of the visibility polygon V(s) of P from s as the set of all boundary edges of V(s) that do not belong to the boundary of P. It is easy to see that the set of points of P at link distance two from s consists of exactly those points of P — V(s) that are (weakly) visible from some window edge of V(s). The procedure of computing visibility polygons from window edges is repeated until P is entirely covered (see Figure 1). Such a visibility polygon from a window edge is referred to as a window
524
A. Maheshwari
et al.
(a)
B
(b) Fig. 1. A window partition. The numbers indicate the Unk distance from s to any point inside that region. W{s) is the corresponding window tree.
Link distance problems
525
induced polygon or simply, a window polygon. This procedure divides P into regions of equal link distance from s. The resulting partition of P is called a window partition of P with respect to s. The window tree W(s) denotes the planar dual of the window partition of P with respect to s, i.e., W(s) has a node for each region of the partition and an arc between two nodes whose regions share a window edge (see Figure 1). Before proceeding further, we analyze the complexity of computing a window partition and a window tree. In order to compute a window partition, we need to invoke visibility computations inside P from point s and weak visibility polygon computations from several window edges in P. Several 0(n) time algorithms are known for computing a visibility polygon from a vertex (see ElGindy and Avis [31] and Lee [57]), and for computing a weak visibility polygon from a segment (see Guibas et al. [41]), inside a simple polygon (see Chapter 19 in this Handbook [75]). A brute force approach requires computing a weak visibility polygon from each of the 0(n) window edges (in the worst case). Thus the worst case complexity for this approach is 0(n^). Suri [78] presents a more efficient method for computing all visibility polygons from the window edges. In his approach, only those triangles of the given triangulation, that (at least partially) belong to the visibility polygon are processed. In particular, if e is a window edge, then the visibility polygon of ^, V(e), is computed in 0(ke) time, where ke is the number of triangles of the given triangulation that have nonempty intersection with V(e). His algorithm is a modification of the algorithm of Guibas et al. [41] for computing shortest paths. Using Suri's algorithm, it is easy to see that the window partition is computed in linear time, since each triangle of the given triangulation can intersect at most three regions of the window partition. The algorithm of Suri, while computing visibility information, maintains the adjacency information, and thus the window tree can be computed in additional 0(n) time from the window partition. The above result is summarized in the following theorem. 2.1 (Suri [78]). Let P be a simple polygon on n vertices. Let s be a point in P. The window partition and the window tree of P with respect to s can be computed in optimal time and space @(n). THEOREM
Before we describe the solution to the three problems mentioned in this section, we need the following result on planar point location (see Chapter 10 in this Handbook [75]). A triangulated planar subdivision, containing n triangles, can be preprocessed in linear time by the algorithm of Kirkpatrick [51] to obtain a data structure such that, given a query point t, the unique triangle of the subdivision containing t can be located in O(logn) time. Using the window partition and the window tree data structures, the three problems formulated at the beginning of this section can be solved as follows. Let 5 be a fixed source point inside P. (i) Link distance query: given a query point t e P, determine the link distance between s andt Find the region R{t) containing t in 0(log n) time by applying the planar pointlocation algorithm. Using the window tree data structure, compute the depth of the
526
A. Maheshwari et al
node corresponding to R{t) in additional 0(1) time. Thus, the link distance query between s and t can be answered in O(logn) time. (ii) Minimum link path: find a minimum link path between s and a query point t e P We first solve the link query problem with respect to t. Once we know which region, say R(t), of the window partition contains t, we determine the window edge e of that region and the segment qofe that is visible from t. Using the window tree data structure, the link path between a point of q and s can be computed in 0(kt) time, where kt is the depth of the node corresponding to the region R(t). Hence the link path between s and t can be computed in 0(log n-{-kt) time. (iii) Single-source multiple-destination problem: compute the link paths between s and all vertices of P Compute the window partition from s and additionally, for each vertex v'm P, store a pointer to the window polygon containing v. This implicitly determines the minimum link paths as well. These results are summarized in the following theorem. 2.2 (Suri [81 ]). Let P be a simple polygon on n vertices and s be a point in P. P can be preprocessed in linear time so that: (1) Given a query point t, the link distance between s and t can be computed in 0(log n) time. (2) A minimum link path between s and a query point t can be computed in 0(k + log w) time, where k is the link distance between s and t. (3) Minimum link paths from s to all vertices of P can be constructed in time proportional to the total number of links in all the minimum link paths.
THEOREM
Ghosh [35,36] proposes an alternate algorithm to solve the minimum link path problem. His algorithm is based on the notion of visibility from a convex set of points inside a simple polygon. This is another generalization of point visibility inside simple polygons. Ghosh's approach has been the basis for the parallel link path algorithm of Chandru et al. [10]; it is sketched in Section 3.1. 2.1.2. Link diameter, link radius and link center In this section we survey the literature on Hnk diameter, link radius and link center algorithms. The link diameter of P is defined as the maximum of the link distances between any two points of P. It can be shown that the link diameter is realized by a pair of vertices of P. This leads to a simple O(n^) time algorithm for computing the link diameter by computing the link distances, in linear time, from each vertex to all vertices. Suri [81] presents a simple algorithm to compute an approximate link diameter which differs from the actual Hnk diameter by at most 2. An approximate link diameter is computed by computing the furthest neighbor for each node in the window tree. A furthest neighbor for a node x in a tree is a node y whose tree distance from x is a maximum over all nodes of the tree. Let a and b be two points in P, belonging to the two nodes
Link distance problems
527
w\ and W2, respectively, of the window tree. Let di{a, b) be the Unk distance between a and b and let g{w\, W2) denote the tree distance between w\ and if2- It can be shown that g{w\, W2) — l^dL(a,b)^g(w\, W2) + 3, and this results in an approximation of the link distance. This method can also be used to determine approximately the link distance between any two query points as follows. Locate the nodes of the window tree which contains the query points by performing point location in the regions which correspond to the nodes of the tree and then compute the tree distance between them. THEOREM 2.3 (Suri [81]). An approximate link diameter of a simple polygon can be computed in linear time, and it differs from the exact link diameter by at most two.
The link diameter problem is an example of a number of link distance problems for which it is often much easier and usually more efficient to provide an approximate solution than the exact solution. To compute the exact link diameter takes 0{n logn) time using a fairly complex algorithm developed by Suri [80]. THEOREM 2.4 (Suri [81]). The link diameter of a simple polygon can be computed in 0{n\ogn) time.
It remains an open problem to determine whether the link diameter can be computed more efficiently, or if Q (n log n) time is a lower bound for that problem. Now we turn our attention to the computation of link radius and link center. Suppose that, conceptually, window trees are computed from each point in P. Then, there is at least one point for which the depth of its window tree is a minimum over all depths. This depth is called the link radius of P. It is interesting to note that, while there are direct algorithms to compute the link diameter, the link radius determination is carried out indirectly as will be described below. The relationship between link distance and link radius is studied by Lenhart, Pollack, Sack, Seidel, Sharir, Suri, Toussaint, Whitesides, and Yap [58]: LEMMA 2.1 (Lenhart et al. [58]). The link radius, R and the link diameter, D, of a simple polygon are related as: [ y l ^ / ? ^ [ y l + L
In general, there is not only one point whose window tree depth equals the link radius but an entire region; this region is known as the link center. The link center is connected and has the following convexity property: the link path of shortest Euclidean length between any two points in the link center lies in it (as does the shortest Euclidean path). This is not difficult to see if we look at the construction of the link center and its underlying properties discussed below. After a brief discussion of the motivation, we will first discuss an O(n^) time algorithm to compute link center and link radius and then sketch an 0{n log n) time for these problems. The study of the link center problem is not only algorithmically interesting and used to solve other geometric problems, e.g. to compute the link radius, it is also motivated by the following potential applications. It could be applied to locate a transmitter so that the maximum number of retransmissions needed to reach any point in a polygonal region is minimized. It could also be used to choose the best location of a mobile unit, minimizing
528
A. Maheshwari et al.
the maximum number of turns required to reach any point inside a polygonal region. The link radius gives the maximum number of retransmissions or turns required between any pair of points. To compute the link center, rather than computing window trees from each point in P, it suffices to compute window trees from vertices of P. More precisely, it suffices to compute window partitions from convex vertices, v, of P to a depth of R in the associated window tree. Let us call a polygon arising from computing a window tree for v to depth d the d-neighborhoodpolygon for v. As Lenhart et al. [58] show the link center is the intersection of all /?-neighborhood polygons for convex vertices of P. Based on this fact, they show that the link center can be computed in O(n^) time. Note that their algorithm (and the link center algorithm discussed below) is based on exact knowledge of the link radius. As there are only two choices for the link radius, given the link diameter, the link center algorithm can first be executed with the smaller value. If that fails, it is rerun with the larger value. Here failing means that the computed intersection is empty (the link center is, by definition, non-empty). Therefore, as a sideeffect one obtains an O(n^) algorithm to compute the link radius. THEOREM 2.5 (Lenhart et al. [58]). Link center and link radius of a simple n-vertex polygon can be determined in 0{n^) time.
Next we describe how to reduce the time complexities of the link center and link radius problem from 0{n^)ioO{n log n). Three challenges arise: • The total number of vertices of the /?-neighborhood polygons for all convex vertices may be quadratic in n. • The actual computation of the 0(n) neighborhood polygons must be carried out more efficiently than by computing them individually in 6)(n) time each. • Finally, their intersection must be carried out efficiently. We sketch the approach taken by Djidjev, Lingas and Sack [25]. (An alternate approach has been proposed independently by Ke [49].) Firstly, a region is identified which contains the link center. This region is the 2neighborhood polygon of a particular diagonal which is, in some sense, "central" to P. To define the notion of central diagonal, consider that every diagonal induces two subpolygons in P, and denote by c/, Cr the maximum link distances to any point in the induced subpolygons. The quantities Q , Cr are called covering radii. A diagonal of P is called central if it minimizes (the absolute value of) the difference between c/ and Cr among all diagonals of a given triangulation of P. The following property has been derived for central diagonals: LEMMA 2.2 (Djidjev, Lingas and Sack [25]). In any simple polygon with link radius R a central diagonal exists for which both covering radii, ci and Cr, are at least R — 1. Furthermore, such a diagonal can be found in 0(n log n) time.
Before we describe the method for finding a central diagonal, we motivate this concept. For this, observe that convex vertices that are too close to the link center are irrelevant as
Link distance problems
529
their /?-neighborhood polygons would equal P and they therefore do not contribute to the link center when intersected. "Too close" is quantifiable by using the link distance from the central diagonal which can be computed using Suri's window tree algorithm. We thus assume that irrelevant convex vertices are omitted from further consideration. Now, consider any 7-neighborhood polygon of a (fixed) convex vertex of P, for some 7, 1 < j ^ 7? — 2. In general, this polygon contains several window edges in P and therefore defines an equal number of window polygons. Only one of those window polygons contains the link center as well as the central diagonal. Consequently, given knowledge of the location of a central diagonal, one can identify the unique window polygon which is relevant for the link center computation and ignore all other. A procedure for finding a central diagonal is based on the fact that an edge of the triangulation exists which splits the polygon into two pieces, each containing at least 1/3, but no more than roughly 2/3, of the vertices. By using Suri's linear-time window tree algorithm recursively at most \ogn times the above bound is easily achievable. Having computed the window tree for P from the central diagonal one can perform a post-order traversal of the tree and use the post-order numbering to order the triangles of the triangulation of P. We now use this ordering to compute all 7-neighborhood polygons iteratively, for all relevant convex vertices of P. The reasons for choosing this order include: (1) to eliminate redundant computation, and (2) to make the computation of j neighborhood polygons more efficient when j — 1-neighborhood polygons have already been constructed. We justify these reasons as follows: 1. Assume that, at some stage of the algorithm, several window edges of different (j — 1)-neighborhood polygons are incident to a common reflex vertex and that all induced window polygons are relevant. As the link center is the intersection of Rneighborhood polygons, at most one window polygon (the one that is contained in all others) can finally contribute to the intersection; only the window edge corresponding to that window polygon will be kept. This window edge is easily found as it is angularly extremal. (Note that inside the 2-visibility polygon from the central diagonal two window edges bounding the link center may be incident to a common vertex.) 2. Assume now that, at some stage of the algorithm, a triangle is examined which contains a reflex vertex, say r, of P. When the triangle is examined it induces at most three subpolygons in P: one of which contains the central diagonal; the other(s) have been processed inductively and, in particular, the (j — 1)- neighborhood polygons have been constructed for all contained (relevant) convex vertices. For the reflex vertex r to be incident to one of the j-neighborhood polygons it must see at least one relevant window edge for a (7 — 1)-neighborhood polygon. To compute the corresponding window edge (incident to r) a ray-shooting technique is developed which calculates extremal shots to all window edges of (7 — 1)-neighborhood polygons and then back-extends the angularly extremal shot. The final iteration of the algorithm produces a set of reduced P-neighborhood polygons. These are intersected efficiently to produce the link center. The analysis of the entire fairly complex algorithm reveals that all steps can be carried out in 0{n logn) time, which leads to the following theorem:
530
A. Maheshwari et al.
THEOREM 2.6 (Djidjev et al. [25]). Link center and link radius of a simple n-vertex polygon can be determined in 0(n log n) time.
2.1.3. Arbitrary link distance queries. In this section we discuss upper and lower bounds for the following link distance query problem. Given two query points p, q inside a simple preprocessed polygon P report their link distance. Before we discuss algorithms for this query problem, we present a lower bound for this problem, established by Arkin, Mitchell and Suri [7]. They show that binary search on n sorted real numbers, which has an ^(log n) lower bound, can be reduced to the link distance query problem in 0(1) time as follows. Let 0 < x\ < JC2 < • • • < x« be the real numbers serving as input to the binary search problem. Compute a simple zigzag-shaped polygon on 0(n) vertices, that encloses the points (0,0), (x\, 0), ..., (JC«, 0), but that has a "zigzag" just before each of the points (JC/, 0). Now, if x^ > 0 is an input to the binary search problem, then it is easy to see that the link distance query to the point (0, JCO from (0,0) lets us to compute the index of a point, such that xi ^x^ < x/+i. This leads to the following theorem. THEOREM 2.7 (Arkin et al. [7]). In the algebraic decision model of computation, ^ (logn) comparisons are necessary to compute the link distance between a fixed source point and a query point inside a (preprocessed) simple polygon on n-vertices.
Now to the upper bound. Arkin et al. [7] also present a data structure for answering link path queries. The cost of preprocessing is O(n^) time and space, and link path queries can be answered in 0(log n-\- k) time, where k is the number of links. The data structure can also be used to answer link path queries between a pair of segments in P, between a pair of convex polygons inside P, and between a pair of simple polygons. Moreover, approximation algorithms for all of these problems have been presented, for which the preprocessing requires only O(n^) time and space, and approximate link path queries can be answered within 0(log n-\-k) time. In order to answer link path queries between two query points s and t, first an implicit representation of the shortest path between s and t is computed using the data structure for shortest path queries developed by Guibas and Hershberger [39]. Next, extract the first polygonal vertex, say f, and the last one, say w, on the shortest path. If neither v nor w exists, then the link path between s and r is a single segment and thus its link distance is one. If v = w, then the link distance between s and t is two. Assume now that v ^w. Determine whether there is an inflection edge (or eave) on the shortest path between s and t (see [35]). If there exist an inflection edge, say ab, on the shortest path then the link path between s and t can be computed by knowing the link paths between the end points of the inflection edge and s and t, respectively. Suppose that there is no inflection edge on the shortest path. In this case, the link path between s and t is convex and can be computed using certain bilinear functions (as described in [2,10]). The result is summarized in the following theorem: 2.8 (Arkin et al. [7]). A simple n-vertexpolygon can be preprocessed in O(n^) time and space, so that link path queries between any pair of points, can be answered in 0(log n-\-k) time, where k is the link distance.
THEOREM
Link distance problems
531
Arkin et al. [7] show that approximate Hnk distance queries, with error at most 1, can be answered by using only 0(n^) preprocessing cost. Arkin et al. extend the above data structure to report link distances between two simple polygons contained inside a polygon with n vertices. Preprocessing requires O(n^) time and link distance queries can be answered in 0(k log^ n) time, where k is the total number of vertices of the two contained polygons. Chiang and Tamassia [13] show how to answer link path queries between two convex polygons inside a simple polygon. Their algorithm requires 0(n^) preprocessing time and queries can be answered in 0(log k + log n) time, where k is the total number of vertices of the convex polygons.
2.2. Link paths for polygons with holes So far we have considered link distance problems in simple polygons, i.e., polygons without holes. In this subsection we focus on polygons that may have multiple holes. Formally, a subset of the plane whose boundary is a union of finitely many line segments or half rays will be a called SLpolygon with holes ([66]). In particular, this definition allows unbounded (outer) polygons. Holes, including the outer polygon, if any, are called also obstacles. A link path should not intersect any of the obstacle edges, but is allowed to touch them. The link path problem for polygons with holes has applications in path planning for a point robot, where a collision-free minimum link path has to be computed among obstacles in the plane. Link distance problems for polygons with holes seem more difficult than the same problems for simple polygons, and the algorithms from the previous sections do not immediately generalize. The main difficulty in applying the window partitioning technique is that the visibility polygon from edge, which might have to be computed from any window edge and for any iteration, has a very large worst-case size. Figure 2 illustrates a polygon on n vertices and with 2k = Q{n) identical holes arranged in two rows of k holes each parallel to a window edge e. There are ^ — 1 gaps between holes in the first row and k — \ gaps in the second row. When e illuminates the obstacles, each pair of gaps produces a "ray", and there are {k — 1)^ such rays and Q(k^) intersections. Thus, the size of the visibility polygon from e is i?(/i^). Other properties of simple polygons used in previous algorithms are that (1) the dual graph of a triangulation is a tree and (2) there is a unique path between each pair of vertices in a tree. That fact considerably restricts (and thus speeds up) the search for a shortest link path. For a triangulation of a general polygon with holes, in contrast, there might be multiple paths in the dual graph between a pair of vertices; in fact, the number of paths can be exponential with respect to the size of the polygon. Mitchell, Rote, and Woeginger [66] describe an algorithm for computing a shortest link path between a pair of vertices s and t that does not explicitly compute the entire window and works in almost quadratic worst-case time. The main ideas of their algorithm are the following: (i) At iteration ^, a set Visk of points that are at link distance k from the source s is computed, starting with VisQ = {s}. Vis\ is equal to the visibility polygon from s (as in the simple-polygon algorithm). At the ^-th iteration, for /: > 1, however, only visibility
532
A. Maheshwari
et al.
Fig. 2. Rays originating from a window edge e and passing through one of the gaps.
regions from "relevant" window edges of Visk are considered. Specifically, in case P \ Visk consists of several disconnected subregions (called cells), only the one that contains the target t is processed in the next iterations. For instance, up to Q (ri^) cells of the visibility region might not be adjacent to any obstacle point (point of P), see Figure 2. By this modification, all but 0(/i^) window edges of Visk can be ignored when computing Visk+\. We denote by Rk that relevant extension of Visk. (ii) We need a method for constructing Rk without explicitly computing the edges of Visk, whose number can be Q(n^). A more compact representation of the visibility region from an edge can be computed by adapting the technique of Suri and O'Rourke [79]. Their idea is to represent such a region as a union of O(n^) triangles, where the triangles can be constructed by a rotational line sweep around each obstacle vertex visible from the edge. (iii) Each region Rk can be further simplified by expanding it to its relative convex hull with respect to the obstacles (holes) of P that are not in Rk. The relative convex hull of a subpolygon Q of P with respect to a set S of holes is defined as the minimum-length simple polygon enclosing Q and disjoint from any hole in S. Mitchell et al. [66] prove the following properties of the relative convex hull. LEMMA 2.3. A point from the cell of P \ Rk that contains t is weakly visible from the boundary of Rk if and only if it is weakly visible from the boundary of Rk.
LEMMA 2.4. The total number of edges of all polygons Rk is 0(/i). (iv) To find the cell Ck containing t, the algorithm of Edelsbrunner, Guibas and Sharir [27] can be used. That algorithm finds a single face in an arrangement of s lines, without computing the entire arrangement, in 0{sa{s)\o^s) time, where a{s) is the inverse of the Ackermann function. Mitchell et al. [66] modify their algorithm so that, in addition, obstacle edges that belong to multiple cells Q do not have to be recomputed every time. The entire algorithm works as follows: There are / iterations, where / is the link distance from s to t. We denote by PQ the start vertex s and by P^_i, for /: > 1, a simple-polygon extension of Visk-\ that contains all relevant visibility information needed for the ^-th iteration. Also, at the beginning of iteration k, we have a set of illumination edges on the
Link distance problems
533
boundary of / \ _ i that are at link distance k — \ from s and will be used for computing Visk. The procedure for constructing Pk from Pk-\ consists of the following steps: 1. Compute Visk• Given Pk-\, describe Visk, the visibility polygon from the illumination edges, as a union of triangles by performing a rotational line sweep around obstacle vertices in P\Pk-\. 2. Compute the cell containing t. Apply an adaptation of the algorithm of Edelsbrunner, Guibas and Sharir [27] for finding a single face in an arrangement of lines. Let Q be the cell of P \ Visk containing t. Expand Visk by adding all other cells of P \ Visk except Ck, as well as any of the remaining obstacles only partially visible from the illumination edges. Let Rk be the resulting polygon. 3. Compute Rk. Find the relative convex hull of Rk\0 with respect to the set of obstacles O that are not contained in the interior of Rk. 4. Find Pk. Since Rk is an extension of Visk, the cell of P\Rk containing t will be only a subset of Ck and therefore might not be necessarily connected. Thus we need to find the cell C[ in the complement of Rk containing t. Denote by Pk the complement
ofq. The performance of the algorithm is given in the following theorem: THEOREM 2.9 (Mitchell et al. [66]). A minimum link path between two points in an arbitrary n-vertexpolygon P (with holes) can be computed in time 0(Ea(n) log n) and space 0(E), where E denotes the size of the visibility graph of P and a(n) is the inverse of the Ackermann function.
Note that the worst-case time complexity of the algorithm is 0(n^a(n) log^ n). It is an open problem to design a subquadratic algorithm for this problem. The best known lower bound is 0{n log n) [66]. Mitchell, Rote and Woeginger extend in [66] their algorithm to construct the shortest path tree from a start vertex s in time 0((E + ln)^^^n'^^^l^^^ log^-^^ n-\- E log^ n) and space 0(E), where / denotes the length of a longest link path from ^ to a vertex of P. Note that in the worst case the time bound for the shortest path tree problems is Q{n^^^), which is worse than the worst-case time bound of 0{n^a{n) log^ n) for the single pair problem.
2.3. Rectilinear polygons In this section we study link distance problems set in rectilinear polygons; in this context it is natural to use the rectilinear link distance measure. For the remainder of this section we therefore take link distance to mean rectilinear link distance. A rectilinear polygon^ is one whose edges are all aligned with a pair of orthogonal coordinate axes, which, without loss of generality, we take to be horizontal and vertical. Rectilinear polygons are commonly used as approximations to arbitrary simple polygons; and they arise naturally in domains dominated by Cartesian coordinates, such as raster graphics, VLSI design, robotics, or architecture. A rectilinear polygon is called trapezoided if both its vertical and horizontal ^ Rectilinear polygons have also been called orthogonal polygons, isothetic polygons and rectanguloid polygons in the literature.
534
A. Maheshwari et al
visibility maps are given. Trapezoidation of a rectilinear polygon takes 0{n) time. The following theorem of de Berg [23] is used as the main preprocessing step for the rectilinear link distance problems discussed. The theorem is an analogue to Chazelle's polygonal cutting theorem [11]; it is stated here for the rectilinear setting. THEOREM 2.10 (de Berg [23]). Let P be a simple rectilinear polygon on n vertices, each vertex is assigned a weight in {0, 1}, and let C(P) be the total weight of the vertices. There exists an axis-parallel cut segment lying completely inside P, that cuts P into two polygons, each having weight at most 3/4C(P). Moreover, this segment can be chosen such that it is incident upon at least one vertex and it can be computed in 0(n) time.
The proof given by de Berg [23] is simple, but requires case analysis; it is based on Chazelle's proof. The main idea is to determine first whether or not a vertical cut segment exists that satisfies the statement of the theorem. This is done by sweeping the polygon vertically. If one fails to find such a vertical cut segment, then de Berg shows that a horizontal segment exists that achieves the desired bounds. In the proof, one must address degeneracies, since several vertices can lie on the same horizontal or vertical segment. It turns out that it suffices to consider vertex-edge visible pairs, of which there are only 0(n) in number. The required cut segment can then be computed in linear time. Next, we turn our attention to the problem of answering arbitrary rectilinear link distance queries in a (preprocessed) rectilinear simple polygon. The above theorem is used recursively to subdivide the polygon. If source point, s, and destination point, r, fall into different subpolygons induced by a cut segment, then the Hnk path crosses this cut segment, say c. Suppose that we know the link distances ds and dt and minimum link paths from s to c and from t to c, respectively. Can we paste the two minimum link paths together to get a minimum link path from ^ to r? The answer is: it depends. It depends on how the paths approach c and which portions of c are reachable by Hnk paths of distances ds and dt from s and t, respectively. Suppose that there exists a common point on c that can be reached at distances ds and dt from s and t, respectively and that the paths are either both horizontal or both vertical. Then the paths can be pasted optimally together. If the orientation of the paths do not match, an additional turn is required at c if we perform a paste operation. If there is no common point on c one link path (may not be a minimum link path) would possibly turn, reaching c from 5", take an additional link traveling on c, and possibly turn again to join the path to t. Suboptimal paths may result from these paste operations. Consequently, more information is required about link paths from points to c. As de Berg shows, the set of points on c reachable from some point within a certain link distance form an interval (i.e., form a consecutive set of points on c). As can be seen from the above discussion, we require for each vertex "fast" and "slow" intervals on c which are determined by how, i.e., horizontally or vertically, the cut segment is approached. Fast intervals are at minimum link distance; slow intervals need one more link. If we know the fast and slow intervals for s and t on cut segment c it is trivial to perform the paste operation, in constant time, by analyzing the cases arising from the combination of the two pairs of intervals.
Link distance problems
535
Keeping, for each vertex of P, slow and fast intervals on each cut segment would, however, be too expensive. To address this, de Berg develops the notion of "next-vertex" for each vertex in P, Let v be some vertex of P at a link distance greater than two from a cut segment. Then there exists another vertex v\ such that any point on the cut segment can be reached optimally from v by going through v\ Vertex v^ is called "next-vertex" for v. He shows that "next-vertices" for all vertices v can be computed in linear time. The following theorem summarizes the results for link distance queries between two arbitrary vertices: THEOREM 2.11 (de Berg [23]). A data structure exists such that the rectilinear link distance between two query vertices of a rectilinear polygon P onn vertices can be computed m 0(1) time, and a shortest path can be reported inO{\ -\-k) time, where k is the number of links in the path. The data structure can be constructed in 0{n log n) time.
The above result is extended to arbitrary query points as follows: Using a planar point location algorithm, locate the appropriate subpolygons (namely the corresponding rectangles at the bottom level of recursion) P' and P^' of P containing s and t, respectively. If P' = P", then it is trivial to compute a minimum link path. Otherwise, using a lowest common ancestor computation on the underlying recursion tree, compute the subpolygon corresponding to the lowest common ancestor of tree nodes corresponding to P' and P". For the query points s and t, locate the "next vertex" of s and t. Then, use the above result for answering link path queries between two arbitrary vertices. (We omit technical details on how to locate the "next vertex"; for this see [23].) 2.12 (de Berg [23]). A data structure exists such that the rectilinear link distance between two query points of a rectilinear polygon P onn vertices can be computed in 0(log n) time, and a shortest path can be reported in 0(log n -\-k) time, where k is the number of links in the path. The data structure can be computed in 0(n log n) time and requires 0(n log n) storage. THEOREM
The cost of preprocessing can be reduced to be linear, as shown independently by Lingas, Maheshwari and Sack [59] and by Schuierer [77]. (The algorithm of [59] discussed in Section 3, has been developed to solve this problem optimally in parallel; as a side-effect, it also improves on de Berg's sequential preprocessing.) 2.3.1. Link diameter, link radius and link center Using the above cutting theorem, de Berg [23] presents a simple divide-and-conquer algorithm to compute a rectilinear link diameter of a rectilinear polygon P. Denote the link diameter of P by diam(P). The main steps in the algorithm are: 1. If P is a rectangle then diam(P) = 2. 2. Compute a cut segment e of P, that partitions P into two subpolygons Pi and P2, of roughly equal sizes. 3. Compute the diameters of Pi and P2, recursively. 4. Compute M = ni2ix{dL(v, w)\v e Pi,w e P2}. 5. Let diam(P) = max(diam(Pi), diam(P2), M).
536
A. Maheshwari et al
It is straightforward to see the correctness and complexity of this algorithm provided we know how to compute M. In [23] de Berg shows that M can be computed in linear time as follows: Let e be the cut segment of P, subdividing P into two subpolygons Pi and P2- Let d\ = maxldiiv, e) \ v e P\} and d2 = Tmix{dL(w, e) \ w e P2}. It turns out that M = di-\-d2-\- s, where ^ = +1,0, — 1, depending upon how the link paths from vertices at distance d\ in Pi and from vertices at distance J2 in P2 can be combined together. The result is summarized in the following theorem: THEOREM 2.13 (de Berg [23]). Rectilinear link diameter of a simple rectilinear polygon on n-vertices can be computed in 0(n log n) time.
Nilsson and Schuierer [70] present the first optimal linear time algorithm for solving the rectilinear link diameter problem, by modifying the algorithm of de Berg [23]. They show that it is sufficient to recurse on one of the subpolygons. For the other subpolygon it can be shown that its diameter is either smaller than the link diameter of the polygon, or the diameter of the subpolygon can be computed in linear time explicitly without resorting to recursion. Their result is summarized in the following: 2.14 (Nilsson and Schuierer [70]). The rectilinear link diameter of a simple rectilinear polygon on n-vertices can be computed in linear time.
THEOREM
In [23] de Berg also presents a linear time approximation algorithm for the link diameter problem, where the path reported could be off by at most three links. Nilsson and Schuierer [69] present an optimal linear time algorithm for computing the link center of a simple rectilinear polygon. Unlike in the case of simple polygon, the rectilinear link center may be disconnected. Lemma 2.1 also holds in the rectilinear setting. The main steps in their algorithm are the same as in those of Djidjev et al. [25]. We omit the details and summarize the result in the following: THEOREM 2.15 (Nilsson and Schuierer [69]). The rectilinear link center of a simple rectilinear polygon on n-vertices can be computed in linear time.
2.4. Rectilinear link paths among obstacles In this section, we discuss link path problems among rectilinear obstacles. In this context it is natural to require link paths also to be rectilinear. Such problems can be studied in static and as query versions, i.e., without or with preprocessing. We discuss the case of objects which are given as rectangles followed by a discussion of the case of rectilinear polygons. 2.4.1. Link paths queries among rectangles. De Rezende et al. [24] consider fixed source query problems for the special case of rectangular, axes-parallel obstacles (also called isothetic rectangles). For a given source point s in the plane and a query point t, determine the link distance and report a minimum link path from siot where the path avoids the obstacles. They design a simple algorithm which answers a link distance query in 0(log n)
Link distance problems
537
time and reports the link path in additional time proportional to the number of links on the path, after spending 0{n log n) preprocessing-time. A key observation is that, in this setting, all shortest paths from s are monotone in (at least) one of four rectilinear directions (i.e., —x, + x , —y, or -\-y directions). Moreover, the plane can be subdivided into four connected rectilinear regions (depending on s and the set of obstacles), so that all paths in any of those regions is monotone with respect to a common rectilinear direction. This subdivision can be constructed in 0{n log n) time [24]. Each region induced by the subdivision is further subdivided into 0 ( n ) (possibly semiinfinite) rectangular regions in 0{n log n) time. The distances from s to all vertices of the subdivision are now easily computed by applying fow plane sweeps (one for each of the four rectilinear directions) resulting in 0{n log n) time algorithm. Finally, the partition is preprocessed for point location in 0 ( n log n) time [51]. This completes the discussion of the preprocessing phase. To answer a link distance query to a target point t, first the subregion containing t is determined by planar point location in O(logn) time. Then, in additional 0 ( 1 ) time, the distance to t is computed as a function of the distances between s and t, from one side, and the vertices of the rectangle containing t. When the query asks for the path to be reported, the path can be produced in additional time proportional to its number of links. T H E O R E M 2.16 (De Rezende, Lee and Wu [24]). In 0(n be constructed so that any rectilinear link distance query point t outside rectangular obstacles can can be answered path queries can be answered in 0 ( l o g n-\-k) time, where andt.
log n) time a data structure can from a fixed point s to a query in 0 ( l o g n) time. Minimum link k is the link distance between s
2.4.2. Link paths queries among rectilinear obstacles. Das and Narasimhan [20] study link distance problems between two points s,t in free space defined by a set of rectilinear polygonal obstacles. They achieve the following results, where ^ is a fixed source point and t a query point: T H E O R E M 2.17 (Das and Narasimhan [20]). (1) A minimum link rectilinear path between two points amidst rectilinear polygonal obstacles (of total size 0{n)) can be computed in 0{n log n) time and 0{n) space. (2) In 0(n log n) time and 0(n) space a data structure can be constructed so that a minimum rectilinear link path from a fixed point s to a query point t outside the rectilinear obstacles can be reported in 0(log n -\- k) time, where k is the link distance between s and t. It is not difficult to show that Q (n log n) is a lower bound for the problem of computing a minimum rectilinear link path between two points. To see this bound consider the problem of sorting n distinct integers a/, for 1 < / < n. Construct, for each a/, a square of height and width at that is axes parallel and centered at (0, 0). Now create a small opening, say at the right-hand comer, and double the lines so as to create a polygon from the resulting polygonal chain. A set of rectilinear polygons is created that are nested inside each other, so that at < aj iff the polygon constructed for aj contains that for at. Any minimum link
538
A. Maheshwari et al.
path from (0, 0) to a point (8,0), where B is greater than the largest integer, will visit each polygon in order of increasing values ai and thus sort the input. The upper bounds for the static and the query version of the problem are obtained by a reduction to a graph theoretic problem. The problem is stated as follows: consider a set of n orthogonal line segments: the intersection graph is defined so that each vertex corresponds to a segment and each edge corresponds to a pair of intersecting segments. While this graph can potentially have Q{n^) edges the authors show that a breadth-first search of all vertices (not visiting all edges) of the graph can be performed in 0{n \ogn) time using 0{n) space. This implies that the graph distance from a particular segment can be obtained in the same time. To see now the ideas behind the reduction, construct a generalized "trapezoidation" of the input extending each polygonal edge of the input polygons until it intersects another polygonal edge. This defines an intersection graph. Note now that any rectilinear link path alternates between horizontal and vertical edges. So two subgraphs of the intersection graph are relevant, those defined by using either only the vertical edges as vertices together with their incident edges, or analogously the horizontal edges. Now, to find a minimum rectilinear link distance between two points, one performs two breadth-first searches: first in the vertical and then in the horizontal edge graph. The depth in the depth-first search is used to determine the link distance and, since the path could start either horizontally or vertically, two searches are required. Constructing the actual path is somewhat more involved and requires the addition of pointers to the above breadth-first search. This yields the desired bounds which improves the space bound of 0(n \ogn) derived earlier by Imai and Asano [46] (while keeping the optimal time complexity). Link distance queries from a fixed source point s are obtained by considering s to be a point obstacle and using it in both horizontal and vertical subgraphs of the intersection graph. In each subgraph, the regions induced by the partitions are labeled according to link distance from s. A planar point location algorithm can (like in the rectangular case) be used to achieve the desired query time and preprocessing costs. 2.5. Robustness issues in link distance computations Kahan and Snoeyink study in [47] the bit complexity of link distance problems for a computational model with finite precision arithmetics. They show that if a link path needs to be represented as a polygonal line, then Q{n^ \ogn) bits might be needed to store the exact coordinates of the vertices of that polygonal line (assuming the coordinates of each vertex of the original polygon are O(logn) bit numbers). In the worst-case scenario, a shortest link path might consist of a sequence of alternating vertices from the original polygon and Steiner (non-polygon) points, where for the computation of the k-ih Steiner point the coordinates of the k — 1-st are used {k > 1), leading to an accumulation of the error. Such a shortest link path will have a spiral-like shape as depicted on Figure 3 [47]. In order to handle the problem, Kahan and Snoeyink study link paths of restricted type, in which each Steiner point is an intersection of two lines, each determined by a pair of original polygon vertices. They show in [47] that a link path of that type exists between each pair sjoi points in a simple polygon that is at most twice longer than the shortest link path between s and t. Moreover, such a path can be found in linear time.
Link distance
'
'
I
—
539
problems
1
^
'
—^ A *" ^ ^
' I
I
^ '^ ^ ^
' I
/
Fig. 3. A spiraling shortest link path.
They also consider link paths between s and t whose vertex positions are restricted to points of an A/^ X A/^ grid and describe an algorithm that produces such a path of length 0(log A^) times the link distance between s and t. The time complexity of that algorithm is 0{n -\- /), where / is the length of the constructed path. That study indicates the need or more research in the area of error analysis and robustness for link distance problems. Better approximation factors seem possible for the restricted versions of the link distance problem discussed above. Note also that the lower bound on the bit complexity does not rule out the existence of exact subquadratic algorithms for link distance problems for the limited precision model. For instance, alternative descriptions of shortest link paths are possible, e.g., by the sequence of the polygon vertices in the shortest link path (omitting the Steiner points) or some other combinatorial representation. Another possible line of research is to appropriately adapt the existing link distance RAM algorithms so that the error accumulation problem is taken into account. Furthermore, implementation and experimental work will indicate how well the existing link distance RAM algorithms work on "typical" polygons.
3. Parallel algorithms for link distance problems All parallel algorithms discussed in this section are expressed with respect to the Parallel Random Access Machine (PRAM) Model of computation. More specifically, the results are for the common concurrent read exclusive write (CREW-PRAM) and exclusive read and exclusive write (EREW-PRAM) models of computation. See Karp and Ramachandran [48] for details on PRAM models. We also refer the reader to the Chapters 4 and 18 in this Handbook [75] for a more general discussion of parallel computational geometry. First we present parallel algorithms for minimum link path problems and the link center problem inside simple polygons. Then we survey the literature on parallel algorithms for rectilinear link distance problems.
540
A. Maheshwari et al.
3.1. Simple polygons Two problems set inside simple polygons are addressed in this section: computing a minimum link path and constructing the link center. 3.1.1. Minimum link path algorithms. First we sketch a parallel algorithm of Chandru et al. [10], that requires 0(logn loglogn) time and 0{n) space using 0(n/loglogn) CREWPRAM processors for the minimum link path problem, i.e., to compute a minimum link path between two points s and t inside a simple polygon P on n-vertices. The complexity results are stated with respect to the CREW-PRAM model of computation. The time x processor product of this algorithm is within a polylog factor of the best known sequential algorithm for this problem. The main difficulty in designing a parallel algorithm for this problem is that the sequential algorithms for link path problems use "greedy" constructions as a partial strategy and appear to be inherently sequential in nature (e.g., the computation of the window partition by successively computing the visibility polygons) Furthermore, some graph problems which can be solved sequentially by using the "greedy" construction as a strategy have been shown to be P-complete [6]. We then sketch the main ideas behind the parallel algorithm of Chandru et al. [10] which is based on the sequential method of Ghosh [35]. In order to obtain the effective parallelization, the "greedy construction" of link paths is parallelized. Fractional linear transforms are introduced by Aggarwal et al. [2] to resolve the optimality of greedy solutions to the minimum nested polygon problem. Chandru et al. use these fractional linear transforms to capture the combinatorial structure of the greedy paths, and to set up divide and conquer strategies that emulate the greedy methods. Let SP(s,t) = (s,u\,.. .,Uk,t) be the Euclidean shortest path inside P between s and t (see Figure 4). An edge M/M/-J-I of SP(s, t) is an eave or an inflection edge if M/_I and M/+2 lie on the opposite sides of the line passing through M/ and M/+I . Ghosh [35] shows that there exists a minimum link path between s and / that contains all eaves of SP{s, t). This is done by transforming any link path L between s and t to another link path V that contains all the eaves in SP{s, t) and has at most as many links as L. This observation suggests the following simple strategy to compute a minimum link path: 1. Extend each eave at both ends to the boundary of P. The extensions of eaves decompose P into subpolygons so that the minimum link path restricted to any subpolygon contains no eaves. 2. If the extensions of two consecutive eaves intersect at a point z then z is a turning point of the minimum link path containing the eaves. Otherwise, find a minimum link path connecting the extensions of every pair of consecutive eaves on SP{s,t) to form the minimum link path. Consider one such subpolygon Pij formed by extending two consecutive eaves uiut^i and Uj-\Uj of SP{s, t), where the extensions of the eaves do not intersect. Let fz+i and Vj-i be the extension points of the eaves UiUi-^\ and Uj-\Uj on bd(P) respectively. The boundary of Pij (in clockwise order) consists of bd(vi-\-\, fy-i), the segment Vj-iUj-i, SP(ui-^\,Uj-\) and the segment M/-(-If/^i. The task is to compute a minimum link path Lij between M/+I U/+I and Uj-\Vj-\. Observe that Lij is a convex path. It is easy to see that in order to compute L/y it suffices to consider the region C Vtj c Pij of all points which
Link distance problems Outer Chain
541 Right Limiting Edge
Left Limiting
SP(s,t) Inner chain Fig. 4. Computation of a minimum hnk path between s and t.
have "left" and "right tangents" io SP{uij^\,Uj-\) lying completely inside Pij. This region can be computed using the shortest path trees rooted at w/+i and Uj-i. In the sequential setting, it is now a trivial matter to compute Lij. Let zi be the first turning point of L/y. If f/+i belongs to CVij then zi = u/+i. Otherwise, the next clockwise vertex of w/4-1 in CVij is zi. Draw the right tangent of zi to 5'P(w/+i, wj_i) and extend it to the boundary of CVij meeting it at a point Z2- Similarly, draw the right tangent of Z2 to SP(ui^\,Uj-\) and extend it to the boundary of CVij meeting it at a point Z3, and so on until a point Zr is found on Uj-\Vj-\. This gives the greedy path ziZ2, Z2Z3,..., Zr-iZr between M/+Ii;/+i and Uj-iVj-i.lt can be shown that the greedy path is also a minimum link path. Chandru et al. [10] propose the following scheme to compute the greedy path in parallel. Each of derived subpolygons, CVij, has the following structure: an inner convex chain and two limiting edges, called left and right limiting edges. The objective is to find a greedy (link) path connecting the limiting edges. Observe that the greedy path alternatively touches a vertex of the inner chain and an edge of the outer chain. Call this alternating sequence a link sequence; it captures the combinatorial structure of the greedy path. Assume that we can determine the link sequence for each point on the outer chain. Then the greedy path is easily computed by successively traversing the alternating sequence of vertices and edges. To determine link sequences note that around any point on the outer chain there is an interval (on the outer chain) of points with equal link sequences. Now observe that the link sequence of any two adjacent intervals is almost identical, but for either one of the
542
A. Maheshwari et ah
tangent vertices on the inner chain or one of the edges on the outer chain. Chandru et al. show that with each interval, a unique bilinear function can be associated, such that for any point in the interval, the last turning point of the greedy path can be computed. Moreover, they establish that it is sufficient to maintain a total of n log n such intervals and they can be computed in a divide and conquer fashion. Their result is summarized in the following theorem. THEOREM 3.1 (Chandru et al. [10]). A minimum link path between two points in a simple polygon on n-vertices can be computed in 0(log n log log n) time and 0{n) space using 0{n/\og log n) CREW PRAM processors.
3.1.2. Link center Recall that the link center of a simple polygon P is the set of points x inside P such that the maximum link distance from x to any other point in P is minimized. Ghosh and Maheshwari [33] show that minimum link paths from a point to all vertices of a simple polygon P can be computed in O(log^nloglogn) time using 0(n) processors, and applying this result and the approach of Lenhart et al. [58], the link center of P can be computed in 0(log^n loglogn) time using O(n^) processors. The results are summarized in the following: 3.2 (Ghosh and Maheshwari [33]). Minimum link paths from a given point to all vertices in a simple polygon on n-vertices can be computed in 0(log^ n log log n) time using 0{n) CREW PRAM processors. Moreover, the link center can be computed in 0(log^ n log log n) time using 0(n^) CREW PRAM processors. THEOREM
3.2. Rectilinear polygons As we have seen throughout this survey, a fundamental tool used for solving a number of link distance problems is the window partition developed by Suri and described in Section 2.1. Problems whose solutions are based on that tool include computing link path, link center and central link segment, answering link distance queries, and, outside the area of link distance problems, e.g., constructing bounded Voronoi diagrams [54]. The analogue to the window partition in the context of rectilinear polygons is the rectilinear window partition or histogram partition introduced by Levcopoulos [17] who use it in the design of approximation algorithms for optimal polygon decompositions. For the parallel setting an optimal algorithm exists for computing a histogram partition from any segment inside a rectilinear polygon. The algorithm presented in [59] is discussed in the next subsection. Given the range of applications for the window partition, it is likely that this result will find application for the parallelization of other know sequential algorithms. It has already been used e.g., to compute link diameter, answer rectilinear link distance queries, and to solve other related problems; as discussed in the following subsection. 3.2.1. Rectilinear histogram partition. We discuss the optimal parallel algorithm of Lingas et al. [59] for computing a histogram partition in a trapezoided rectilinear polygon P.
Link distance problems
543
Recall that a polygon is trapezoided if both of its horizontal and vertical visibility maps are provided (see [38] for a parallel algorithm for trapezoidation). By horizontal (or vertical) visibility maps we mean that each edge is extended (possibly to both sides) towards the polygon interior until the boundary of the polygon is reached. In the histogram partitioning of a rectilinear polygon P, we partition P with respect to a diagonal d in P into regions of equal link distance from d (see Figure 5). To familiarize the reader with histogram partitions, we describe a sequential method for its construction (analogous to the window tree construction). First compute the rectilinear visibility polygon from J in P, which is a histogram with base d denoted by H{d). The histogram H{d) is the set of points which can be reached from d by one link. Remove the histogram H{d) from P and this partitions P into several subpolygons. Link distance two from d is realized from those points of P — H{d) which are visible from some boundary edge of H(d). So, for each boundary edge of H(d), which is not an edge of bd(P), i.e., for each window edge, compute the histogram in P — H(d). This procedure of partitioning P into histograms is repeated until P is completely covered and a partition of P into histograms is obtained. The above procedure for computing a histogram partition looks inherently sequential. A parallel algorithm must therefore use a different idea. We sketch the idea and omit most of the slightly involved technical issues arising due to the parallelization. Assume we are given a histogram partition of a rectilinear polygon P from some diagonal d. This induces a set of Steiner points arising from the intersection of window edges and edges of P. For ease of discussion, let us add those Steiner points to the vertex set of P. Assume further that all distances to vertices from diagonal d are available. (Recall that the link distance between a line segment d and a point /? in P, is defined as the minimum among all link distances between p and x, where x ed.) The diagonal d splits the polygon into two subpolygons. Pi and P2. We restrict the discussion to one of the two subpolygons, say to Pi. While all window edges are extensions of edges of Pi to the boundary of Pi, not all such extensions are window edges for d. All extensions are available through the visibility maps. We need to identify those extensions that are part of the histogram, i.e., that are window edges, and construct the window edges in parallel, i.e., match each vertex to the corresponding Steiner point. Finally, we will have to construct the histogram partition as a planar subdivision and we will need to know the link distance for each region of the subdivision. Let Pi = ai,.. .,b\, where a\, b\ are the endpoints of d. Note that we keep the added Steiner points as vertices of Pi. Traverse Pi (clockwise) starting at ai and suppose that we are encountering a window edge w. Two facts can be stated: 1. The clockwise traversal of Pi, starting at the first endpoint of w to the second, traverses the entire subpolygon defined by M;. If the window partition is computed recursively it can be augmented by w to obtain a window partition for the entire subpolygon. 2. Observe that when a subpolygon is entered through a window edge, the link distance of the next vertex increases by one and when it is exited, the link distance of the previous vertex decreases by one. Based on these facts we perform a labeling of the vertices by brackets as follows:
544
A. Maheshwari
et ah
Fig. 5. Histogram partition of a rectilinear polygon from a diagonal d. The numbers denote the rectilinear link distance from d. The well formed bracket sequence determining the histogram partition of the subpolygon above d is: (((())(())())(((())))).
(1) Assign an open bracket to the first endpoint of d and a close bracket to the second endpoint. (2) Assign an open bracket to a vertex pi if the link distance of pi^\ is greater than to Pi-
(3) Assign a close bracket to a vertex pi if the link distance of pi-\ is greater than to pi. Note that vertices for which the link distance to the predecessor (or successor) is equal are not assigned a bracket. An example of a well formed bracket sequence determining a window partition is given in Figure 5. We can now state the key lemma whose correctness follows by induction: LEMMA 3.1 (Lingas et al. [59]). Let P be a rectilinear polygon and d a diagonal of P. Then a clockwise traversal of each of the two subpolygons induced by d combined with the above labeling produces a well formed bracket sequence. Moreover, a matching bracket pair corresponds to the base of a histogram of P from d and vice versa. This correspondence allows us to compute histogram partitions by using the matching parenthesis algorithm of [8] or [18].
Link distance problems
545
3.3 (Lingas et al. [59]). A histogram {or window) partition of an n-vertex trapezoided rectilinear polygon with respect to a diagonal can be computed in optimal 0(log n) time using 0{n/\og n) EREW PRAM processors. THEOREM
What remains is to compute the Hnk distance from d to all vertices. The algorithm to compute the link distance to each vertex of P from d is fairly complex. It uses several tools which have been developed in parallel computing, such as the lowest common ancestor computation, tree traversals and tree contraction methods. The main idea of the algorithm is as follows: Define two types of (rectilinear) diagonals in P, called minimal and maximal diagonals. A minimal diagonal is one which does not contain any other diagonal, and a maximal diagonal is one which is not contained in any other diagonal (see Figure 6). Let d be a minimal horizontal diagonal that splits the input polygon into two subpolygons. Consider the bottom subpolygon, say Pi. We wish to compute the link distances from d to all vertices of Pi. First compute the link distances from d to all maximal horizontal diagonals of Pi as follows. Compute the dual of the horizontal trapezoidation, which is a tree T, and root T at the trapezoid incident to d. Using a lowest common ancestor computation, for each maximal diagonal w, compute the furthest ancestor f{u) in T that is (rectilinearly) visible to it. Construct another tree T' on maximal diagonals, where for each maximal diagonal M, its parent is f{u) if it is defined, otherwise, the parent of u h d.\nT', let the distance of any maximal diagonal u to the root be J(w). For each maximal diagonal u in T define its link distance md(u) to the root diagonal d as follows: If /(w) is defined then md(u) := 2d(f(u)) — 1, otherwise set md(u) = 1. Now the distance from each maximal horizontal diagonal to d is known. The link distance from any vertex v to d can be computed by an argument based upon that information and whether a minimum link path from V to d will be obtained by starting vertically or horizontally from a vertex v. The result is summarized in the following: THEOREM 3.4 (Lingas et al. [59]). Let d be a (horizontal/vertical) diagonal of a trapezoided rectilinear polygon P. The link distances from d to all vertices of P can be computed in optimal 0(log n) time using 0{n/\og n) EREW PRAM processors.
3.2.2. Applications of histogram partitions. Using the histogram partition of the polygon, a number of problems have already been solved. We list the main results. First we discuss the single-source multiple destination problem (defined in Section 2) i.e., the problem of computing the link distances from a point to all vertices of a rectilinear polygon P. From a given point p in P we first shoot in the four rectilinear directions towards the boundary of P thereby computing the horizontal and vertical chord containing p. As per Theorem 3.4 we compute the link distances for the horizontal and the vertical chord containing p to all vertices of P. If a user is satisfied with an approximation of the link distances from p we are done. Otherwise, observe that the correct distance from p to a vertex v can differ by at most one from the value obtained for v to one of the chords. The determination of the exact value is harder. We need to compute the intervals for i; on the chord(s). Given that information and the corresponding value for the link distance, the problem is solved.
546
A. Maheshwari et al. Dual Tree T
Maxinaal
Diagon
Minimal Diagonal Fig. 6. Computation of rectilinear link distance from d.
3.5 (Lingas et al. [59]). Let p be a point {or a rectilinear line segment) in a trapezoided rectilinear polygon P. The link distance from p to all vertices of P can be computed in optimal O(logAz) time using 0(n/\ogn) EREW PRAM processors.
THEOREM
In Section 2.3 we described de Berg's algorithm [23] for solving the problem of computing the link distance and a minimum link path between two arbitrary query points inside a rectilinear polygon P. The following parallel result is based on de Berg's sequential approach however, the processor-time product of the parallel algorithm represents an improvement over de Berg's complexity by a factor of 0(\ogn). THEOREM 3.6 (Lingas et al. [59]). A data structure which supports rectilinear link distance queries in an n-vertex trapezoided rectilinear polygon can be constructed in 0(log n) time using 0{n/\og n) processors on the EREW PRAM. Using this data structure a single processor can answer link distance queries between two points in 0(log n) time.
For computing the rectilinear link diameter of a rectilinear polygon, de Berg [23] presents an 0{n log n) sequential algorithm (see Section 2.3). His algorithm can be parallelized in a straightforward manner. Due to the recursive nature of the algorithm, the resulting parallel time complexity is 0(log^ n). By observing that in de Berg's recurrences it is sufficient to recur on one of the subpolygons, Nilsson and Schuierer [69] are able to obtain a linear time algorithm for the rectilinear link diameter problem. Unfortunately, a straightforward parallelization of this algorithm does not lead to an improvement in the
Link distance problems
547
parallel running time. To obtain an algorithm with optimal processor-time product, Lingas et al. [59] provide a generic technique where a subset of the subproblems arising in the recursion are presolved to speed-up the recursive calls. This led to the following theorem: THEOREM 3.7 (Lingas et al. [59]). The rectilinear link diameter of an n-vertex simple rectilinear polygon can be computed in 0(log* n log n) time using 0(n/log* n log n) CREWPRAM processors. A minimum link path connecting two vertices of P realizing the diameter can be found in 0(log n) time using 0{n/\og n) processors on an EREW-PRAM.
The rectilinear link radius, central diagonal and link center (recall Section 2.1.2) can be computed efficiently in parallel by parallelizing each of the steps in the sequential algorithm of Nilsson and Schuierer [69]. The results are summarized in the following: THEOREM 3.8 (Lingas et al. [59]). A central diagonal, the rectilinear link center and link radius of an n-vertex simple rectilinear polygon can be computed in 0(log* n log n) time using 0(n/log* n log n) processors on the CREW PRAM.
3.2.3. Minimum link path between two points. McDonald and Peters [62] present a parallel algorithm for computing a minimum rectilinear link path joining two points inside a simple trapezoided rectilinear polygon. Furthermore, they show that this path is also of minimum length measured in the Li-norm. Their algorithm runs in 0(log n) time using 0(n/log n) EREW PRAM processors. Their algorithm proceeds by first finding a rectilinear path connecting the source and target points and then locally improving it to produce an optimal path. Local improvements are done on the basis of five different transformations. Maheshwari and Sack [61] propose a conceptually simpler algorithm for the above problem. Their algorithm proceeds by first trimming the polygon, using the dual of trapezoidation, to determine a subpolygon containing a minimum link path. The subpolygon is monotone (i.e., has a staircase appearance). A simple and efficient greedy algorithm is then used to compute minimum link paths in this subpolygon. Furthermore, also their path is shortest in the L \ -norm.
4. Applications and extensions In this section we study several problems that involve the link metric, and investigate problems that have motivated the study of link distance problems.
4.1. Movement of robot arms in bounded regions Hopcroft et al. [44] consider the problem of motion of planar linkages from the point of view of complexity. A linkage is defined as a collection of rigid rods called links. The endpoints of various links are connected by joints, each joint connecting two or more links. The links rotate freely about the joints. Hopcroft et al.'s main result is to show that the problem of deciding whether a planar linkage in some initial configuration can be moved
548
A. Maheshwari et al.
so that a designated joint reaches a given point in the plane is PS PACE-hard. Reif [74,73] studies a similar problem in 3-dimensional space and shows that the reachability problem is PS PACE-hard even for a particular hinged, tree-like linkage required to move in a nonconvex region. Hopcroft et al. [45] study the following problem: A carpenter's ruler consists of a sequence of n links L\, ...,Ln, that are hinged together at their endpoints. These links may rotate freely about their joints and are allowed to cross. By providing a reduction from set partition problem, they show that the following problem is NP-complete. Given positive integers nj\,.. .Jn, and k, can a carpenter's ruler with lengths /i , . . . , / „ be folded, so that each pair of consecutive links forms either an angle of 0° or 180°, and so that its folded length is at most kl They show that a ruler with lengths l\, ...Jn, can always be folded into a length of at most 2m, where m — max{//, 1 ^ / ^ n}. In two dimensions, where the arms have unrestricted movements, they show that the set of points that the last arm An can reach is a disc of radius r centered at AQ, i.e., the first link, provided that no link has a length, // greater than r — //, where r is the sum of the lengths of all links. They provide polynomial time solutions for moving the arm from its initial position to a final position under the restriction that the end point of the arm reaches a specified point within the circle. 4.2. c-oriented paths Adegeest et al. [1] consider problems on paths composed of a minimum number of line segments parallel to a fixed set of c orientations that avoid a set of obstacles in the plane. Notice that the rectilinear link distance problems are special cases where c = 2 and the orientations are orthogonal to each other. They preprocess a set of obstacles with disjoint interiors, consisting of n line segments, and a starting point 5. The resulting data structure is of size 0(cn) and allows: (1) minimum link distance queries from s to query points t to be answered in 0(c\ogn) time, and (2) a corresponding minimum link path to be reported in additional 0(k) time. The data structure can be computed in 0(c^n log n) time and space. The algorithm proceeds by computing all points that are reachable using one link from s, two links from s, and so on. However, this has to be done carefully since any of these regions reachable by the same number of links could possibly have quadratic complexity.
4.3. Approximating polygons and subdivisions with minimum link paths Guibas, Hershberger, Mitchell, and Snoeyink [40] consider the problem of simplifying a polygon or a polygonal subdivision. Their approach is to fatten the given object, by convolving the object with a disk, and then compute an approximation in the fattened region. The minimum-link subdivision problem is stated as follows: Given a subdivision 5 in a polygonal region P, compute a subdivision S' homeomorphic to 5* in P that is composed of the minimum number of line segments. Guibas et al. [40] show that the decision version of this problem is NP-Hard. This is achieved by providing a reduction of an instance of the planar maximum 2-SAT problem. They also establish that the problem of finding a minimum-link simple polygon of a given homotopy type is NP-Hard, by providing a reduction from maximum-2SAT.
Link distance problems
549
They consider the problem of finding a minimum Hnk simple curve enclosing all holes inside a simple polygon P. They provide an approximation algorithm that runs in linear time and reports a simple closed curve enclosing all holes that has at most 0(h) segments more than the minimum link curve of the same homotopy class, where h is the number of holes (see Guibas et al. [40] for precise definitions). Consider the following problem: Compute a polygonal chain consisting of a minimum number of line segments, that visits a given ordered sequence of n disjoint convex objects 0\, O2, •.., On, in order. Egyed and Wenger [29] consider the problem of stabbing disjoint convex objects in order with a line and Guibas et al. [40] provide a simple algorithm that computes the longest possible prefix Oi, O 2 , . . . , 6>/ in 0(/) time and space. Guibas et al. discuss several variations of this problem. They provide algorithms for computing a stabbing line for a sequence of possibly intersecting unit disks or translates of constant size convex polygons. They stucs stabbing problems for an ordered sequence of objects by a polygonal chain.
4.4. Separation problems Given a set of disjoint polygons P\,..., Pk.in the plane, and an integer parameter m, it is A/^P-complete to decide if the Pi s can be separated by a polygonal family consisting of m edges, so that there exist polygons R\,..., Rk, with pairwise-disjoint boundaries such that Pi ^ Pi and XII ^H ^^ (s^^ [19]). A separating family R is called 2inf(n)-approximation if the ratio between the number of facets in R and the number of facets in a minimum separating family is bounded by f(n). Edelsbrunner, Robison and Shen [28] present an approximation algorithm for pairwise disjoint convex polygons. Das provide approximate solutions for several problems in the rectilinear metric setting. Mitchell and Suri [67] consider the problem of separation of polyhedral objects. They design an 0{n log n) time algorithm for constructing a 7-approximation of the minimum separating family for a set of disjoint polygons in two dimensions, where n is the number of edges in the input family of polygons. The algorithm proceeds by computing a triangulation of free space, and then the dual graph of the triangulation is simplified, by first removing the triangles corresponding to degree 1 vertices, and then collapsing all vertices of degree 2. This results in a 3-regular planar graph with k + 1-faces, 2k — 2 vertices and 3^ — 3 arcs. Now the free space is split into polygonal region, one for each edge of the graph, which is further simplified using a minimum link path computation. We note that there is a large body of literature on variants of separation problems. In the linear separability problem, the question is to determine whether two sets of points can be separated by a hyperplane in J-dimensions. A solution is obtained by reducing the linear separability problem to a linear programming problem. It is A/^P-complete to decide whether the planar two point set is separable by k lines (Meggiddo [64]). 4.5. Bicriteria shortest path problems Arkin et al. [7] present an algorithm to obtain a path inside a simple polygon that is at most \/2 times the length of the shortest path and has at most twice the number of links as the
550
A. Maheshwari et al
minimum link path. They first compute a minimum Hnk path between s and t and then transform it to get a desired path. In a polygonal chain {u, v, w} define the turning angle at V to be the absolute value of the angle from the directed line wf to the directed line vw. The following observations on the turning angles are useful. If the turning angle at each bend in the minimum link path is less than 90 degrees, then it can be shown that its total length is at most Vl times the shortest path. For the bends, where the turning angle is greater than 90 degrees, add an extra link so that the turning angle is smaller than 90 degrees. This construction can at most double the number of links, but makes the total length at most ^/2 times the optimal. Mitchell et al. [65] study the problem of finding a shortest polygonal path from s to t within a simple polygon P, subject to the restriction that the path can have at most k links. They present an algorithm that runs in 0(n^k^ \og{NK/s^^^)) time and produces a A:-link path that is {\ -\- s) times the length of the shortest /:-link path, for any error tolerance 6: > 0, where A^ is the largest integer coordinate among the n vertices of P. The algorithm uses a combination of dynamic programming and a form of binary search. The polygon P is split into subpolygons using extension of eaves as in Ghosh [35], and in each of the subpolygons a convex path is computed for different values of the number of Unks. They also address the problem of approximating a shortest A:-link path in polygons with holes. They propose an approximation algorithm that runs in 0{kE^) time and returns a path that has at most 2k links and whose length is at most that of shortest /c-link path, where E is the number of edges in the visibility graph.
4.6. Nested polygon problems In general terms, this class of problems is motivated by simplifying the complexity of describing certain object configurations through providing approximations, especially by minimizing their combinatorial complexity. The problem considered here is that of finding a polygon K nested between two given polygons P and Q, where Q C K c P, that has a minimum number of vertices. We discuss the problem instances in which the polygons P and Q are convex, arbitrary simple and rectilinear; we also mention the parallel setting. (See Edelsbrunner and Preparata for the related problem in the point set [26].) Aggarwal et al. [2] consider the problem instance where both P and Q are convex. Their algorithm runs in 0(n log k) time, where n is the total number of vertices of input polygons P and 2 , and k is the number of vertices of the output polygon K. Observe that if K is a minimal nested polygon, then it will be convex. Define a supporting line segment in the region P — Q to be a line segment with both of its end points on the boundary of P and the segment is tangential to Q. Define a supporting polygon AT^ = ( u i , . . . , f/) to be a polygon formed by supporting segments f/ i^z+i, 1 < / < /, except for perhaps the last segment. Observe that K' will be either a minimal nested polygon or will have at most one more vertex than the minimal nested polygon, since any minimal nested polygon will have a vertex in the region bounded by the supporting line segment and the polygon P (excluding the side containing Q). The polygon K' can be computed in linear time by following a simple greedy algorithm: start from a point v\ on the boundary of P and draw a tangent to Q and then walk along this tangent until boundary of P is reached at the point V2. Now repeat
Link distance problems
551
the same steps from V2 and so on, until you wrap around Q and reach v\. Observe that any minimal nested polygon K^ can be transformed to another minimal nested polygon K formed only of supporting line segments (except possibly one) and Aggarwal et al. compute such a minimum nested polygon K. They first compute an approximate polygon K^ as discussed above, which could have one more vertex than optimal, and its last link may not be a supporting line segment (if it is, then K' is an optimal one). They slide the polygon K^ to see whether the last link could ever vanish. The sliding process is discretized by keeping track of the change in the combinatorial structure of the contact points of K^ with respect to P and Q (namely the tangential vertex of Q and supporting edges of P) when K^ is slid. Aggarwal et al. show that this combinatorial structure can be maintained by using certain bilinear functions in 0(nlogk) time. (These functions were already discussed in the data structure for answering arbitrary link queries and in the parallel algorithm for computing a minimum link path.) Aggarwal et al. compute the fix-point of these functions to determine whether the last link of the greedy polygon will ever collapse. Their result is summarized in the following theorem. THEOREM 4.1 (Aggarwal et al. [2]). A minimum polygon nested between two convex polygons can be computed in 0(n log k) time, where n is the total number of vertices of the input polygons and k is the number of vertices in the minimum nested polygon.
A natural question arises: What happens when P and Q are non-convex? Suri and O'Rourke [82] present an 0(pq) time algorithm, where p and q are the number of vertices of polygons P and Q, respectively. Wang and Chan [85] propose an 0((p -h q) log(p -\-q)) time algorithm for solving that problem. Using the notion of complete visibility, Ghosh [35] describes an algorithm that runs in 0((p -\- q) log(p -{- q)) time. Furthermore, Ghosh shows that the minimum nested polygon will be convex if and only if the boundary of P does not intersect the convex hull of Q. Using the relative convex hull of Q with respect to P, it can be determined in linear time whether the nested polygon K is convex or nonconvex. Ghosh and Maheshwari [32] establish that if K is nonconvex, then it can be computed in linear time, since a "starting point" of the polygon K can be easily determined. It is counter intuitive that the convex case turns out to be more computationally complex than the nonconvex case. The reason for this is that it is hard to find the "starting point" in the convex case. Chandru et al. [10] develop parallel algorithms for computing minimum nested polygons, and their algorithms run in O(lognloglogn) time using 0(n) CREW PRAM processors. DasGupta and Veni Madhavan [22] present approximate algorithms for computing nested polygons for special classes of polygons. Bhadury et al. [9] study the nested polygon problem in the context of art gallery problems. They present several polynomial time algorithms for these problems by reducing them to a circle covering problem, and then solving them by formulating them as integer linear programs with the circular ones property. Nested polygon problems in the rectilinear settings are solved by Maheshwari and Sack [61]. Given two rectilinear polygons P and Q, where Q C P, compute a rectilinear polygon K, where Q C K C P and K has the minimum number of vertices. They [61] also provide optimal sequential and parallel algorithms for this problem.
552
A. Maheshwari et al.
4.7. Central link segment We next discuss a problem related to the notion of visibility of a polygon from a segment. Recall that a polygon is called visible (or weakly visible) from a line segment ^ in a polygon P if each point in P can be seen from some point on 5". As Sack and Suri [76] show the problem of deciding whether there exists a polygonal edge e so that a simple polygon P is visible from e takes linear time; all edges from which a given input polygon is visible can be reported in the same time. The problems of whether a segment exist segment from which P is visible, and if the answer is positive, finding a shortest segment, can be accomplished in 0{n) time by the algorithm of Das and Narasimhan [21]. Generalizing the notion of segment visibility, a polygon is defined to be k-visible from some segment ^ in P if the link distance from each point p in P to some point on s (depending on p) is at most k. This implies that the number of mirrors required to illuminate any point p from the (segment) light source s is at most k — \. The k-visibility problem is to find the minimum value A:* for which a given polygon P is ^*-visible from some segment in P and to determine such a segment s of minimum length. This problem can be formulated as a link distance problem as follows. The covering eccentricity of a given segment ^ in P is defined as c(s, P) = msLxmindLiv, w), veP wes where diiv, w) is the link distance between v and w. A central link segment of P is defined as a segment in P with minimum covering eccentricity among all segments in P. The covering radius Re of P is the covering eccentricity of any central link segment. Therefore, an algorithm for finding a shortest central link segment and the covering radius of a polygon solves the ^-visibility problem. The central link segment problem for a simple polygon was studied by Ke [50], who gave an inconect solution to the problem, and by Aleksandrov et al. [3]. The algorithm [3] runs in 0(n log n) time and is based on ideas of the algorithm from [25], for computing the link center. Here we sketch the main ideas of this approach. We assume that P is an AI-vertex simple polygon. Recall that the link center and the link radius of P can be found in 0(n log n) time (see Section 2.1.2). The following relation between the link radius R and the covering radius Re of P is easy to verify: LEMMA 4.1. The covering radius Re of P equals either R — \ or R. On the other hand, if Re = P, then any segment intersecting the link center is a central link segment and any point inside the link center is a shortest central link segment. Thus, except for the determination problem, that is whether Re equals R or not, the interesting case arises when Re equals P — 1. We assume hereafter that Re = R—l.lf that assumption happens to be incorrect, our algorithm will output an empty set of segments with eccentricity P — 1 and in that case the algorithm for finding the link center will also solve the problem of finding a shortest central link segment. We have the following characterization of a central link segment:
Link distance problems
553
4.2. A segment 5** is a central link segment with covering radius R — I iff s"" intersects the R — 1-neighborhood polygons for all vertices of P.
LEMMA
Recall that the link center algorithm computes "relevant" portions of the ^-neighborhood polygons for the vertices of P, for ^ = 1,...,/? — 1, in total 0(n log n) time. Lemma 4.2 implies that in order to find a shortest central link segment of P, it is sufficient to construct a shortest segment intersecting the relevant portions of the P — 1 -neighborhood polygons of the vertices of P. This can be reduced to the problem of intersecting 0(n) subpolygons of P each determined by a diagonal of P. Let V denote the set of those subpolygons. Next, the properties of a central diagonal defined in Section 2.1.2 are used to further reduce the above problem (of finding a shortest link segment intersecting all subpolygons of P ) to the problem of finding shortest segments joining 0(n) pairs of convex polygonal chains inside P. Any of those segments will be a central link segment. Intuitively, any of the above pairs of chains will consist of a chain entirely to the "left" of the central diagonal and a chain entirely to the "right" of it. The algorithm for finding the shortest segments for all pairs is fairly complicated technically, since any of the G(n) chains may have size 0(n), although the union of all chains is of size 0(n) only. (The reason is that any segment may belong to multiple chains.) The above algorithm uses the algorithm of Kirkpatrick and Snoeyink [52] which, given an X-shaped polygon X consisting of four outward convex chains X\, X2, X3, X4 listed in clockwise order, finds a shortest segment inside X with endpoints on X\ and X3 in O(logn) time (assuming the representation of X\, X2, X3, and X4 allows binary search). Finally, the shortest central link segment of P is determined as the shortest segments among all candidates found for the individual pairs. We have the following result: THEOREM 4.2 (Aleksandrov et al. [3]). A shortest central link segment of any simple nvertex polygon can be found in 0(n log n) time.
4.8. Walking in an unknown street So far in this chapter we have presented link path algorithms under the assumption that the object space (a polygon or a polygon with holes) is known in advance. In the field of robotics, a robot may move without complete knowledge of its operating environment and take steps only on the basis of local information provided by sensors attached to it. Therefore it is natural to study path problems in unknown environments. We assume that the robot has an on-board vision system, it is placed at a starting point s, and it is searching for a target point t. Furthermore, it is assumed that the robot recognizes t as soon as it sees it. The objective is to design efficient on-line algorithms which a robot can use to search for the target. Recently, in computational geometry, several researchers have studied online path problems under the Euclidean metric, for example see [53]. The efficiency of an on-line link path algorithm is stated in terms of its competitive ratio and it is stated to be the ratio of the number of links computed by the online algorithm to the minimum link length path. Ghosh and Saluja [34] study the online computation of a minimum link path between two specified points inside a simple polygon. It is easy to construct examples to show that
554
A. Maheshwari et al.
for arbitrary n-vertex simple polygons, no online algorithm can achieve a competitive ratio better than n/4. Therefore, Ghosh and Saluja [34] consider this problem for a special class of polygons, called street polygons, first introduced by Klein [53]. A simple polygon P with two distinguished vertices, s and t, is said to be street polygon, if the clockwise and counterclockwise boundary of P from 5- to r are mutually weakly visible. They [34] show that they can achieve an optimal competitive ratio of 2 — 1/m, where m is the link distance between s and t. If the street is rectilinear and the robot moves in rectilinear directions, then they can achieve an optimal competitive ratio of 1 + 1/m.
4.9. Miscellaneous Among the variations considered for link distance problems we mention first the problem of computing a minimum link length watchman tour. Given a polygonal art gallery and a series of distinguished points in a gallery determine the link length of a minimum link length path for a watchman visiting all the points. (For an inspiring treatment of art gallery problems we refer the reader to O'Rourke's book [71] on that subject.) The problem for arbitrary polygonal galleries is A/^P-complete (Kranakis et al. attribute the result to Clote), since the edge embedding on a grid problem [15] can be reduced to it. Restricted versions of the problem have thus been considered. Kranakis et al. [16] consider the problem of a complete J-dimensional grid-like gallery. They give lower and matching upper bounds of 2^z — 1 for the 2-dimensional complete grid of size n, and they establish bounds for ddimensional grids, for J > 2. The lower bounds presented in the latter case have recently been improved to (1 -h 1/2J) * n^~', for allJ > 2 (see [14]). A somewhat related question is studied by Gyori et al. [42]. They solve in particular a generalized guard problem set in a rectilinear polygon P. They define the notion of a T/t-guard as a tree of diameter k completely contained in P. The guard G is said to cover a point A: if X is visible from some point on G. Gyori et al. discuss generalized guard problems estabhshing upper and lower bounds on the number of guards required to cover any rectilinear polygon with/without holes by T^-guards. Relating to the topics of this chapter, they state that the bounds for 72/:-guards using normal visibility can be interpreted as bounds on point guards with {k -\- l)-link visibility. (Recall that two points are /-link visible to each other if their link distance is /.) Alsuwaiyel and Lee [4] show that the problem of computing a minimum link path n inside a simple polygon on n vertices such that the interior of the polygon is weakly visible from 7Z is A/^P-Hard. They provide an approximation algorithm that runs in 0{n^\ogn) time. The resulting path may have at most three times more links than an optimal path. Alsuwaiyel and Lee [5] give an approximation algorithm to compute a watchman route (tour), that runs in time 0{n^) and produces a route (tour) having at most four times more links than an optimal watchman route (tour). A watchman route is a route such that the entire polygon (with holes) is weakly visible from the route. They show that the performance ratio can be improved to 3.5 by increasing the running time to 0(n-^). For computing bounded curvature paths inside a simple polygon, Ghosh et al. [37] use link path computations. Finally, Hershberger and Snoeyink [43] consider the problem of computing minimum length paths of a given homotopy class.
Link distance problems
555
Acknowledgements We thank the referees also L.G. Aleksandrov and P. Morin for providing valuable input into this document.
References [1] J. Adegeest, M. Overmars and J. Snoeyink, Minimum-link c-oriented paths: Single-source queries, Intemat. J. Comput. Geom. Appl. 4 (1) (1994), 39-51. [2] A. Aggarwal, H. Booth, J. O'Rourke, S. Suri and C.K. Yap, Finding minimal convex nested polygons. Inform. Comput. 83 (1) (October 1989), 98-110. [3] L. Aleksandrov, H. Djidjev and J.-R. Sack, An 0(n log n) algorithm for finding a shortest central link segment, Internat. J. Comput. Geom. Appl. (1999), accepted for publication. [4] M.H. Alsuwaiyel and D.T. Lee, Minimal link visibility paths inside a simple polygon, Comput. Geom. Theory Appl. 3 (1) (1993), 1-25. [5] M.H. Alsuwaiyel and D.T. Lee, Finding an approximate minimum-link visibility path inside a simple polygon. Inform. Process. Lett. 55 (2) (1995), 75-79. [6] R. Anderson and E. Mayr, Parallelism and greedy algorithms. Report 1003, Dept. Comput. Sci., Standford Univ., USA (1984). [7] E.M. Arkin, J.S.B. Mitchell and S. Suri, Logarithmic-time link path queries in a simple polygon, Intemat. J. Comput. Geom. Appl. 5 (4) (1995), 369-395. [8] O. Berkman, B. Schieber and U. Vishkin, Some doubly logarithmic optimal parallel algorithms based on finding all nearest smaller values. Technical Report UMIACS-TR-88-79, University of Maryland (1988). [9] J. Bhadury, V. Chandru, A. Maheshwari and R. Chandrasekran, Art gallery problems for convex nested polygons, INFORMS J. Comput. 9 (1) (1997), 100-110. [10] V. Chandru, S.K. Ghosh, A. Maheshwari, V.T. Rajan and S. Saluja, NC-algorithms for minimum link path and related problems, J. Algorithms 19 (1995), 173-203. [11] B. Chazelle, A theorem on polygonal cutting with application, Proc. 23rd Annual IEEE Sympium on Foundations of Computer Science (1982), 339-349. [12] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [13] Y.-J. Chiang and R.T. Tamassia, Optimal shortest path and minimum-link path queries between two convex polygons inside a simple polygonal obstacle, Intemat. J. Comput. Geom. Appl. (1995). [14] M.J. Collins and B.M.E. Moret, Improved lower bounds for the link length of rectilinear spanning paths in grids. Manuscript (1998). [15] F. Gavril, Some NP-complete problems on graphs, Proc. 11th Conf. on Information Sciences and Systems, Johns Hopkins University, Baltimore, MD (1977), 91-95. [16] E. Kranakis, D. Krizanc and L. Meertens, Link length of rectilinear watchman tours in grids, Ars Combinatoria 38 (1994), 177. [17] C. Levcopoulos, On approximation behavior of the greedy triangulation, PhD thesis, No. 74, Linkoping Studies in Science and Technology, Linkoping University, Sweden (1986). [18] C. Levcopoulos and O. Petersson, Matching parenthesis in parallel. Discrete Appl. Math. (1992). [19] G. Das, Approximation schemes in computational geometry, PhD thesis, University of Wisconsin (1990). [20] G. Das and G. Narasimhan, Geometric searching and link distances, Proc. 2nd Workshop Algorithms Data Stmct., Lecture Notes in Comput. Sci. 519, Springer-Verlag (1991), 261-272. [21] G. Das and G. Narasimhan, Optimal linear-time algorithm for the shortest illuminating line segment in a polygon, Proc. 10th ACM Symp. Comp. Geom. (1994), 259-266. [22] B. Dasgupta and C.E. Veni Madhavan, An approximate algorithm for the minimal vertex nested polygon problem. Inform. Process. Lett. 33 (1989), 35-44. [23] M. de Berg, On rectilinear link distance, Comput. Geom. 1(1)(1991), 13-34. [24] P.J. de Rezende, D.T. Lee and Y.F Wu, Rectilinear shortest paths in the presence of rectangular barriers. Discrete Comput. Geom. 4 (1989), 41-53.
556
A. Maheshwari
et al.
[25] H.N. Djidjev, A. Lingas and J.-R. Sack, An 0(n log n) algorithm for computing the link center of a simple polygon. Discrete Comput. Geom. 8 (1992), 131-152. [26] H. Edelsbrunner and F.P. Preparata, Minimum polygonal separation. Inform. Comput. 77 (1988), IX^-lil. [27] H. Edelsbrunner, L.J. Guibas and M. Sharir, The complexity of many faces in arrangements of lines and of segments. Discrete Comput. Geom. 5 (1990), 197-216. [28] H. Edelsbrunner, A.D. Robison and X. Shen, Covering convex sets with non-overlapping polygons. Discrete Math. 81 (1990), 153-164. [29] P. Egyed and R. Wenger, Ordered stabbing ofpairwise disjoint convex sets in linear time. Discrete Appl. Math. 32 (1991), 133-140. [30] H. ElGindy, Hierarchical decomposition of polygons with applications, PhD thesis. School of Computer Science, McGill Univ., Montreal, Canada (1985). [31] H. ElGindy and D. Avis, A linear algorithm for computing the visibility polygon from a point, J. Algorithms 2 (2) (1981), 186-197. [32] S .K. Ghosh and A. Maheshwari, An optimal algorithm for computing a minimum nested nonconvex polygon. Inform. Process. Lett. 36 (1990), 277-280. [33] S.K. Ghosh and A. Maheshwari, Parallel algorithms for all minimum link paths and link center problems, Proc. 3rd Scand. Workshop Algorithm Theory, Lecture Notes in Comput. Sci. 621, Springer-Verlag (1992), 106-117. [34] S.K. Ghosh and S. Saluja, Optimal on-line algorithms for walking with minimum number of turns in unknown streets, Comput Geom. 8 (5) (1997), 241-266. [35] S.K. Ghosh, Computing the visibility polygon from a convex set and related problems, J. Algorithms 12 (1991), 75-95. [36] S.K. Ghosh, A note on computing the visibility polygon from a convex chain, J. Algorithms 21 (1996), 657-662. [37] S.K. Ghosh, J.-D. Boissonnat and S. Lazard, A linear time algorithm for computing a convex path of bounded curvature in a simple polygon. Technical Report TCS-97/1, Tata Institute of Fundamental Research, TCS, TIER, Homi Bhabha Road, Mumbai-400 005, India (1997). [38] M.T. Goodrich, Planar separators and parallel polygon triangulation, Proc. 24th Annu. ACM Symp. Theory Comput. (1992), 507-516. [39] L.J. Guibas and J. Hershberger, Optimal shortest path queries in a simple polygon, J. Comput. Syst. Sci. 39 (1989), 126-152. [40] L.J. Guibas, J.E. Hershberger, J.S.B. Mitchell and J. S. Snoeyink, Approximating polygons and subdivisions with minimum link paths, Intemat. J. Comput. Geom. Appl. 3 (4) (1993), 383^15. [41] L.J. Guibas, J. Hershberger, D. Leven, M. Sharir and R.E. Tarjan, Linear-time algorithms for visibility and shortest path problems inside a triangulated simple polygon, Algorithmica 2 (1987), 209-233. [42] E. Gyori, F. Hoffmann, K. Kriegel and T. Shermer, Generalized guarding and partitioning for rectilinear polygons, CGTA 6 (1996), 21-44. [43] J. Hershberger and J. Snoeyink, Computing minimum length paths of a given homotopy class, CGTA 4 (1994), 63-98. [44] J.E. Hopcroft, D.A. Joseph and S.H. Whitesides, Movement problems for 2-dimensional linkages, SIAM J. Comput. 13 (1984), 610-629. [45] J.E. Hopcroft, D.A. Joseph and S.H. Whitesides, On the movement of robot arms in 2-dimensional bounded regions, SIAM J. Comput. 14 (1985), 315-333. [46] H. Imai and T. Asano, Efficient algorithms for geometric graph search problems, SIAM J. Comput. 15 (2) (1986), 478-494. [47] S. Kahan and J. Snoeyink, On the bit complexity of minimum link paths: Superquadratic algorithms for problems solvable in linear time, Proc. 12th Symp. Comp. Geom. (1996), 151-158. [48] R.M. Karp and V. Ramachandran, Parallel algorithms for shared memory machines. Handbook of Theoretical Computer Science, J. van Leeuwen, ed., Elsevier/The MIT Press, Amsterdam (1990), 869-941. [49] Y. Ke, An efficient algorithm for link distance problems inside a simple polygon, Proc. 5th ACM Symp. on Comp. Geom. (1989), 69-78. [50] Y. Ke, Polygon visibility algorithms for weak visibility and link distance problems, PhD thesis, Johns Hopkins University (1989). [51] D.G. Kirkpatrick, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1983), 28-35.
Link distance problems
557
[52] D.G. Kirkpatrick and J. Snoeyink, Computing constrained shortest segments: Butterfly wingspans in logarithmic time, Proc. 5th Canadian Conf. on Comp. Geom. (1993), 163-168. [53] R. Klein, Walking an unknown street with bounded detour, Comput. Geom. 1 (1992), 325-351. [54] R. Klein and A. Lingas, Manhattonian proximity in a simple polygon, Intemat. J. Comput. Geom. Appl. 5 (1995), 53-74. [55] K. Kolarov and B. Roth, On the number of links and placement of telescoping manipulators in an environment with obstacles, Proc. International Conference on Advanced Robotics (1991). [56] D.T. Lee and F.P. Preparata, Euclidean shortest paths in the presence of rectilinear barriers. Networks 14 (1984), 393^10. [57] D.T. Lee, Visibility of a simple polygon. Computer Vision, Graphics and Image Process. 22 (1983), 207-221. [58] W. Lenhart, R. Pollack, J.-R. Sack, R. Seidel, M. Sharir, S. Suri, G.T. Toussaint, S. Whitesides and C.K. Yap, Computing the link center of a simple polygon. Discrete Comput. Geom. 3 (1988), 281-293. [59] A. Lingas, A. Maheshwari and J.-R. Sack, Optimal parallel algorithms for rectilinear link-distance problems, Algorithmica 14 (1995), 261-289. [60] A. Maheshwari, Parallel algorithms for minimum link path and related problems, PhD thesis, Tata Institute of Fundamental Research, Bombay, India (1993). [61] A. Maheshwari and J.-R. Sack, Simple optimal algorithms for rectilinear link path and polygon separation problems. Parallel Process. Lett. 9 (1) (1999). [62] K.M. McDonald and J.G. Peters, Smallest paths in simple rectilinear polygons, IEEE Trans. ComputerAided Design 11 (1992), 864-875. [63] R.B. McMaster, Automated line generalization, Cartographica 26 (1987), 74-111. [64] N. Megiddo, Linear time algorithm for linear programming in R and related problems, SIAM J. Comput. 12 (1983), 759-776. [65] J.S.B. Mitchell, C. Piatko and E.M. Arkin, Computing a shortest k-linkpath in a polygon, Proc. 33rd Annu. IEEE Symp. Found. Comput. Sci. (1992), 573-582. [66] J.S.B. Mitchell, G. Rote and G. Woginger, Minimum-link paths among obstacles in the plane, Algorithmica 8(1992),431-:^59. [67] J.S.B. Mitchell and S. Suri, Separation and approximation of polyhedral objects, Comput. Geom. 5 (1995), 95-114. [68] B. Natarajan, On comparing and compressing piece-wise linear curves. Report, Hewlett Packward (1991). [69] B.J. Nilsson and S. Schuierer, An optimal algorithm for the rectilinear link center of a rectilinear polygon, Comput. Geom. 6 (1996), 169-194. [70] B.J. Nilsson and S. Schuierer, Computing the rectilinear link diameter of a polygon. Computational Geometry — Methods, Algorithms and Applications: Proc. Intemat. Workshop Comput. Geom. CG '91, Lecture Notes in Comput. Sci. 553, Springer-Verlag (1991), 203-215. [71] J. O'Rourke, Art Gallery Theorems and Algorithms, The Int. Serieson Monomgraphs on Computer Science, Oxford University Press (1987). [72] J. Reif and J. A. Storer, Minimizing turns for discrete movement in the interior of a polygon, IEEE J. Robotics and Automation 3 (1987), 182-193. [73] J.H. Reif, Complexity of the mover's problem and generalizations, Proc. 20th Annu. IEEE Symp. Found. Comput. Sci. (1979), 421-427. [74] J.H. Reif, Complexity of the generalized movers problem, J. Hopcroft, J. Schwartz and M. Sharir, eds, Planning, Geometry and Complexity of Robot Motion, Ablex Pub. Corp., Norwood, NJ (1987), 267-281. [75] J.-R. Sack and J. Urrutia (eds). Handbook on Computational Geometry, Elsevier Science B.V., Amsterdam, the Netherlands (1999). [76] J.-R. Sack and S. Suri, An optimal algorithm for detecting weak visibility of a polygon, IEEE Transactions on Computers 39 (10) (1990), 1213-1219. [77] S. Schuierer, An optimal data structure for shortest rectilinear path queries in a simple rectilinear polygon, Intemat. J. Comput. Geom. Appl. 6 (1996), 205-226. [78] S. Suri, A linear time algorithm for minimum link paths inside a simple polygon, Comput. Vision Graph. Image Process. 35 (1986), 99-110. [79] S. Suri and J. O'Rourke, Worst-case optimal algorithms for constructing visibility polygons with holes, Proc. 2nd ACM Symp. on Comp. Geom. (1986), 14-23.
558
A. Maheshwari
et al.
[80] S. Suri, Minimum link paths in polygons and related problems, PhD thesis, Dept. Comput. Sci., Johns Hopkins Univ., Baltimore, MD (1987). [81] S. Suri, On some link distance problems in a simple polygon, IEEE Trans. Robot. Autom. 6 (1990), 108113. [82] S. Suri and J. O'Rourke, Finding minimal nested polygons, Proc. 23rd AUerton Conf. Commun. Control Comput. (1985), 470-479. [83] R.T. Tamassia, On embedding a graph in the grid with minimum number of bends, SIAM J. Comput. (1986). [84] G.T. Toussaint, Shortest path solves edge-to-edge visibility in a polygon. Pattern Recognition Lett. 4 (1986), 165-170. [85] C.A, Wang and E.P.F. Chan, Finding the minimum visible vertex distance between two non-intersecting simple polygons, Proc. 2nd ACM Symp. Comp. Geom. (1986), 34-42.
CHAPTER 13
Derandomization in Computational Geometry Jiff Matousek* Department of Applied Mathematics, Charles University, Malostranske nam. 25, 118 00 Praha 1, Czech Republic
Contents 1. 2. 3. 4.
Randomized algorithms and derandomization Basic types of randomized algorithms in computational geometry General derandomization techniques Deterministic sampling in range spaces 4.1. g-nets and ^-approximations 4.2. A deterministic algorithm for ^-approximations 4.3. £-approximations via geometric partitions 4.4. Higher moment bounds and seminets 5. Derandomization of basic computational geometry algorithms 5.1. Cuttings 5.2. Convex hull, diameter, and other problems Appendix: The parametric search technique References
561 562 566 570 570 573 576 578 581 581 586 589 590
Abstract We survey techniques for replacing randomized algorithms in computational geometry by deterministic ones with a similar asymptotic running time.
* Supported by grants GACR 0194 and GAUK 193,194. Part of this survey was written during a visit at ETH Zurich. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
559
This Page Intentionally Left Blank
Derandomization in computational geometry
561
1. Randomized algorithms and derandomization
A rapid growth of knowledge about randomized algorithms stimulates research in derandomization, that is, replacing randomized algorithms by deterministic ones with as small decrease of efficiency as possible. Related to the problem of derandomization is the question of reducing the amount of random bits needed by a randomized algorithm while retaining its efficiency; the derandomization can be viewed as an ultimate case. Randomized algorithms are also related to probabilistic proofs and constructions in combinatorics (which came first historically), whose development has similarly been accompanied by the effort to replace them by explicit, non-random constructions whenever possible. Derandomization of algorithms can be seen as a part of an effort to map the power of randomness and explain its role. Another, more practical motivation is that contemporary computers include no equipment for generating truly random bits. The random bits are simulated by pseudo-random generators; these can produce long sequences of bits which satisfy various statistical criteria of randomness, but the real randomness in the computation is in fact restricted to the initial setting of the generator. It is thus important to gain theoretical results on limiting the amount of randomness in the algorithm. In the sequel, the word 'derandomization' will usually be used in a narrower sense, where the deterministic algorithm arises by closely imitating the randomized one, by adding special subroutines that replace the random resources in a manner sufficient for that particular algorithm. Although it is difficult to strictly distinguish when a deterministic algorithm imitates the randomized one and when it becomes a brand new algorithm, in most specific cases the distinction appears quite clearly. One typical feature of derandomized algorithms is that they can hardly be understood without appealing to their underlying randomized counterpart; taken alone as deterministic algorithms they would appear completely mysterious. Derandomization turns out to be a surprisingly powerful methodology for designing deterministic algorithms. For such a basic problem as computing the convex hull oin points in a fixed dimension J , the only known worst-case optimal deterministic algorithm arises by a (quite complicated) derandomization of a simple randomized algorithm (Chazelle [33]). Bibliography and remarks. Excellent books on probabilistic methods in combinatorics are Spencer [117] and Alon and Spencer [14]; the latter one has a lot of material concerning explicit constructions and derandomization. The present survey was submitted for publication in the end of 1995. Some small updates and additions were made in June 1997, but certainly not as thorough as the progress in the field would perhaps deserve. Many of the cited papers first appeared in conference proceedings and, sometimes many years later, in a journal. Where available, we refer to the journal version (presumably more polished and containing fewer mistakes), although the chronology of the results may be considerably distorted by this.
562
/. Matousek
lines of S lines
oiH\S
I{S)
Fig. 1. Randomized divide-and-conquer for the intersection of half planes.
2. Basic types of randomized algorithms in computational geometry The derandomization in computational geometry can be declared relatively successful compared to other fields; for most randomized algorithms one can produce deterministic ones with only a small loss in asymptotic efficiency, and the open problems usually concern further relatively small improvements. The main reason for this is probably that the space dimension is assumed to be fixed and the constants of proportionality in the asymptotic notation are ignored. These constants grow considerably by derandomization, and currently most of the derandomized algorithms seem unsuitable for a practical use, especially if the dimension is not quite small. Before we start discussing derandomization, let us recall two basic paradigms for designing randomized algorithms in computational geometry: the randomized divide-andconquer and the randomized incremental construction. Our presentation is sketchy and is illustrated on a very simple artificial example, so simple that both approaches are a clear overkill for solving the problem. We assume that the reader can learn more about randomized geometric algorithms from other sources (for instance, in Chapter 16). We consider the following problem: 2.1. Given a set H of n lines in the plane, compute the intersection 1(H) of the halfplanes determined by the lines of H and containing the origin. PROBLEM
Randomized divide-and-conquer For this paradigm, we choose a random sample S C H of r lines, where r is a suitable parameter; in a simple version, it is a large constant. We construct the intersection polygon I{S) by some straightforward method, say in time O(r^). Then we triangulate the polygon 7(5) by connecting each of its vertices to the origin; see Figure 1. Let T{S) denote the set of the triangles of the resulting triangulation. For each triangle A e T(S), we compute the list H^ of lines of H intersecting A. The portion of 1(H) within each A is equal to the portion of I (HA) within A. We may thus construct each I(HA) recursively by the same method, clip it by A and finally glue these pieces together. The recursion stops when the current set of lines is small (smaller than r^, say); then we may construct the intersection by some inefficient direct method.
Derandomization in computational geometry
563
What can be said about the running time of this algorithm? We may assume that the construction of 7(5) and T{S) takes time O(r^). If we test every hne against each triangle, the computation of the lists HA needs 0{nr) time. This time is also amply sufficient for gluing the polygon I{H) together from the portions of the recursively computed polygons HHA).
Let riA denote the size of HA ; the key question is how large are the HA 'S. It turns out that one gains the right feeling about the problem by assuming that each «^ is roughly Cn/r, where C > 1 is some absolute constant independent of r. If we assume e.g., UA ^ 2n/r for each Z\, we get the recursion T{n) < 0(r^ +nr) + r T{2n/r), where T{n) denotes the running time for n lines. Together with the initial condition T{n) — 0{l) iov n ^r^ this yields a bound oiT{n) = 0{n^^^), where 5 > 0 is a constant which tends to 0 as r increases (but the multiplicative constant increases with r). Indeed, the total size of subproblems doubles with each level of the recursion. Hence the total work done at the bottom of the recursion (which turns out to dominate the overall work) will be n 2^, where i ^ log^ n is the depth of the recursion, so n 2^ ^ n^+^/^^^2^^ and we have 5^1/log2r. Unfortunately we cannot assume that UA^Cn/r fox each A. First of all, the n^'s are determined by the random choice of S, and some choices apparently give much worse values. One could still hope that the bounds are true at least with probability 1/2, say, but even this need not be the case. Valid bounds are the following: • (''Pointwise" bound.) For a randomly chosen 5, the following holds with high probability: For all zl G T( 5), (1) with an absolute constant C (independent of r). • {"Higher moments" hound.) For any constant c > 1 there exists a constant C = C{c) (independent of r) such that the expectation
^c{^yE[\riS)\].
E
(2)
AeT(S)
(In our case clearly E [|T(5)|] < r.) The higher moments estimate says that as far as the cth degree average is concerned, the quantities nA behave as if they were 0(n/r). The bound T{n) = 0(n^'^^) for the worst-case expected running time can be established using either of these two estimates, only the dependence of 5 on r is better for the second one. The difference appears more significantly in other algorithms of this type, where we don't want to choose r just a constant but rather a suitable power of n, say n^^^^. Then the pointwise (or "trianglewise") bound (1) brings in an extra poly logarithmic factor with
564
J. Matousek
each level of recursion, while (2) only a multiplicative constant. Why should a larger value of r help? With larger r, the problem is subdivided into a larger number of subproblems of appropriately smaller size, and thus the depth of the recursion is smaller, sometimes only constant. Since each level of recursion brings a multiplicative "excess" factor into the running time bound, this means that a smaller extra factor accumulates. Using a larger r usually requires that various auxiliary computations are done in a more clever way, however. In our simple example, we cannot increase r to «^/^^, since then the nr term (coming from a straightforward computation of the lists //^) would already become too large. But if we could compute these lists more cleverly, we could afford to increase r and would get a faster algorithm. In an algorithm of this type for a more general problem, we usually deal with some collection H of hyperplanes or more general surfaces. In the divide step, we choose a random sample S C H of size r and we partition all relevant regions of the arrangement of S into some simple cells like triangles, simplices, trapezoids etc.; the important feature is that each such cell A can be described by a constant-bounded number of parameters. We let T(S) denote the set of the resulting cells. Each A e T(S) defines one subproblem, dealing with the set HA of surfaces intersecting A. These subproblems are solved independently and from their solutions a global solution for H is recovered. This scheme of course cannot include all subtleties in specific applications. This scheme of algorithm with a constant r usually gives complexity at least by an n^ factor off from optimal, but it is extremely robust and it has been efficiently derandomized. Playing with larger values of r usually brings improvements (up to optimal algorithms sometimes), but the derandomization becomes more delicate. Let us now move to the second paradigm. Randomized incremental construction. To solve Problem 2.1 with this approach, we insert the lines one by one in a random order and maintain the current intersection. We start with the whole plane as the current polygon and with every inserted line we cut off an appropriate portion so that when we finish we have the desired intersection. How do we find which portion should be cut off for the newly inserted line? One seemingly sloppy but in fact quite efficient method is the maintenance of so-called conflict lists. (This method is also easy to generalize for more complicated problems.) Let Sr denote the set of the first r already inserted lines; together with the polygon I{Sr) we also maintain the triangulation T{Sr) (defined as above) and for each A e T(Sr), we store the set H^ of lines intersecting it; it is called the conflict list of A in this context. Finally we maintain the list of intersected triangles for every line not yet inserted. When inserting the (r -h l)st line we thus know the triangles it intersects and we remove these from the current triangulation (if no triangle is intersected we do nothing); see Figure 2. In order to complete the triangulation T(Sr-\-\) of the new polygon, it suffices to add 3 new triangles, see Figure 2. The conflict lists of these new triangles are found by inspecting the conflict lists of the deleted triangles, and then also the conflict lists of lines are updated accordingly. The total update time is proportional to the sum of conflict list sizes for the deleted triangles. Since each triangle must be created before it can be deleted, the total running time is proportional to the sum of sizes of the conflict lists of all triangles ever created.
Derandomization
--^^^^ ^ ^ ^ ^ ^
in computational
y
geometry
565
newly inserted line
Fig. 2. Retriangulating after the insertion of the 5th hne.
The initial intuition for analyzing this quantity is similar to that for the previous paradigm. Namely, the first r inserted lines form a random sample Sr and we expect that each A e T(Sr) has a conflict list of size about Cn/r. Therefore, the 3 newly created triangles should contribute about 0(n/r) to the running time, and the total should be n
Using the bound (1), we get only a weaker result 0(n log^ n). A more sophisticated analysis not relying on this bound shows that the expected contribution of the rth step of the algorithm is indeed only 0(n/r) and thus we get an optimal algorithm in this way. Let us sketch a general scheme of a geometric randomized incremental algorithm. We are given a set H of some objects (hyperplanes, surfaces, but perhaps also points for the case of computing a Voronoi diagram). Our goal is to compute a certain geometric partition T(H) of space induced by these objects. In order for the analysis to work properly, one needs (similarly as in the divide-and-conquer scheme) that the cells in this partition have a constant description complexity. If the desired partition does not have this property we define a suitable refinement first and work with this refinement. The algorithm inserts the objects in a random order, maintaining the partition T(Sr) for the set Sr of the already inserted objects. In order to perform the updates quickly, it usually maintains some auxiliary information, such as the conflict lists of the cells of T{Sr). The randomized incremental construction has also a vast potential for generalization, and if applicable, it usually gives better and simpler algorithms than the divide-and-conquer approach, mainly because there is no error accumulation phenomenon present. It is much more difficult to derandomize, and only few special results are known. An intuitive explanation for this difference is as follows: The basic form of the divide-and-conquer approach described above requires only a small random sample, for which we can at least easily verify that it has the required properties. On the other hand, the randomized incremental method needs a whole random permutation, and there does not seem to be any easy method of checking whether a given permutation is good other than actually running the considered incremental algorithm with that permutation. Or, put another way, the divide-and-conquer approach creates subproblems and then operates locally on each of them (until a final merging phase, which is usually easy and involves no randomization anymore), while the
566
J. Matousek
incremental method always remains on a global level. It seems that in many cases the most useful strategy for derandomization is to merge the local and global approaches: one uses a randomized algorithm of the divide-and-conquer type, but complemented with some global mechanism to prevent the accumulation of excess factors (more concrete examples will be discussed later). Bibliography and remarks. A survey on randomized algorithms is Karp [66]; a recent book is Motwani and Raghavan [70]. Randomized algorithms in computational geometry (mainly incremental ones) are treated extensively in Mulmuley [99]; other good sources are Guibas and Sharir [60], Seidel [116], Agarwal [5], Clarkson [39]. As was mentioned above, most algorithms in computational geometry are designed under the assumption that the space dimension is a (small) constant. One problem where the dependence of the running time on the dimension has been studied intensively is the linear programming problem, and here the inadequacy of the current derandomization methods for coping with large dimension stands out clearly: Randomized algorithms of the incremental type with a subexponential dependence on the dimension were found' (Kalai [65], Matousek et al. [75]), but the best known deterministic algorithms remain exponential. The randomized geometric divide-and-conquer strategy appears in the pioneering works of both Clarkson (e.g., [37]) and of Haussler and Welzl [63]. It has been elaborated in numerous subsequent works, mainly concerning computations with arrangements of lines, segments etc., see e.g., Agarwal and Sharir [13], Clarkson et al. [25], Chazelle et al. [28]. The bounds of type (1) appeared in Clarkson [36] and Haussler and Welzl [63]. The observation that one can get rid of the log r factor by using the bounds on higher moments is heavily used in Clarkson [37]. A technically different approach which effectively brings similar results as an application of a bound of type (2) is due to Chazelle and Friedman [31 ]. A more detailed exposition of the randomized geometric divide-and-conquer paradigm with examples can be found in Agarwal's survey paper [5]. A randomized incremental construction is used in Chew's early paper [35], together with an elegant technique nowadays called backwards analysis. Clarkson and Shor [45] give several simple optimal randomized incremental algorithms for problems considered very difficult at that time. Mulmuley [76-78] solves numerous other problems by algorithms of this type; his analysis is relatively complicated (using probabilistic games). The methodology of backwards analysis was elaborated by Seidel [94,95] and it allowed him to give very simple proofs e.g., for Mulmuley's algorithms.
3. General derandomization techniques Before explaining the specific methods developed for computational geometry algorithms, let us briefly summarize the general approaches to derandomization. The method of conditional probabilities. This is perhaps the most significant general derandomization method (implicitly used by Erdos and Selfridge [56], formulated and popularized by Spencer [97], and further enriched by Raghavan [86]). It is so well known and nicely explained in many places that we allow ourselves to be very brief. These algorithms work in the infinite precision computation model common in computational geometry, in contrast to known (weakly) polynomial algorithms for linear programming in the bit model.
Derandomization in computational geometry
567
To be specific, consider the probability space f2 of ^-component 0/1 vectors, where the entries of a random vector are set to 1 with probability p, the choices being independent for distinct entries. Let 0 : ^ -> M be some function (that is, a random variable on ^ ) , and suppose that our goal is to find a specific vector X e f2 such that
•.= E[0{X)\xi
=v\,...,Xk
= Vk].
Here E denotes the conditional expectation operator; in words, Fk(v\,... ,Vk) is the expected value of 0(X) when the components x\ through Xk have been fixed to the values v\,.. .,Vk, respectively, and the remaining n — k components are chosen independently at random. So, in particular, Fo() is the expectation of 0 for a random Z, and Fn(v\,..,,Vn)
=
0{vi,...,Vn).
The algorithm for finding a vector X with 0(X) < E[0] fixes the components of X one by one. We inductively assume that the entries x\,.. .,Xk have already been fixed to specific values vi,.. .,Vk respectively. To determine Xy^+i, we compute the two conditional expectations EQ = Fk+i {v\,.. .,Vk, 0), E\ = Fk+\ (f 1 , . . . , fyt, 1) and we fix Xk+\ to 0 if EQ^E\ and to 1 otherwise. The correctness of the method is based on the inequality Fk{v\,...,
Vk) ^ min [Fk+\ ( u i , . . . , i;^, 0), F^+i (i;i,..., Uy^, 1)),
(3)
which guarantees that the current conditional expectation never increases and thus that the final conditional expectation Fn{v\,... ,Vn) = 0{v\,.. .,Vn) does not exceed E[0] as desired. The inequality (3) in turn follows from a basic property of conditional expectation, which in our case can be expressed as Fye(i;i,..., Vk) = {l- p) Fk+x(ui,...,
uy^, 0) + ;? Fk+\{vi,...,
i;^, 1).
The potential problem with this method lies in evaluating the required conditional expectations. This may often be hopelessly difficult to do exactly. As observed by Raghavan, instead of exact conditional expectations we can in fact use any sequence of functions Fo(), Fi(i;i), F2{vi, V2),..., F„(i;i,..., 1;^) as long as they satisfy (3), Fo() < E [ 0 ] , and Fn{v\, ...,Vn) ^ 0(vi,.. .,Vn) for any V{,.. .,Vn (if we can afford to exceed the expectation C times, then the last bound can only hold up to a factor of C). Sometimes one succeeds in choosing such functions which are much easier to evaluate than the actual conditional expectations. This modification is called the method ofpessimistic estimators. By a direct application of this method in computational geometry, one can derandomize most algorithms. The running time usually remains polynomial, but without further techniques it increases significantly compared to the randomized case, and so the resulting algorithm is often superseded by a quite naive deterministic algorithm.
568
/. Matousek
Small probability spaces. The method of conditional probabiHties can be viewed as a binary search in the original probability space. Another approach for derandomization replaces the probability space by a smaller one, which can either be searched exhaustively or in combination with the method of conditional probabilities. An extreme case of this second approach is an explicit (and efficient) construction of a single "quasi-random" object, for instance of a graph that enjoys many of the typical properties of a random graph (the most often used such graphs are expanders). Such an object is then used in the algorithm instead of an object generated randomly. This approach is quite common in other fields, and there are also few works applying it in computational geometry, although other methods seem more convenient there. Another powerful set of tools is subsumed under the heading {approximately) k-wise independent distributions. Let Z = ( x i , . . . , JC„) be the vector of random bits used by a considered randomized algorithm; for simplicity let us assume that the probabilities of 0 and 1 are equal. True random bits should be mutually independent, but often it suffices for the algorithm to have them k-wise independent. This means that for any i\,i2, -"Jk, 1 ^ /i
(4)
(any k positions in X behave as k truly random independent bits). While a full (/i-wise) independence requires a probability space consisting of all the 2" possible «-component 0/1 vectors, for the /:-wise independence with k <^n it may suffice to pick X at random from a much smaller set Q of n-bit vectors. For example, if we pick a 3-bit vector at random among the vectors 001,010,100, and 111, any two positions in this random vector are independent. It turns out that if A: is a constant, roughly n^/^ vectors suffice and are also necessary. The construction of such probability spaces is nontrivial although not too complicated. Hence, if the analysis of some algorithm can be made to work assuming /:-wise independence for a constant k only, we can derandomize such algorithm by simply executing it for each of the roughly n^/^ vectors in the smaller probability space. For at least one vector it must execute satisfactorily. Hence the algorithm has been derandomized with running time increased 0(n^/^) times. This may look not particularly impressive, but there is an important advantage over the method of conditional probabilities: While the latter one requires a sequential search, the former one can be parallelized easily, simply by executing the randomized algorithm for all vectors from the small probability space in parallel. Hence this method of derandomization essentially preserves any parallelism present in the randomized algorithm. Some algorithms require a larger degree of independence, say k = \ogn or k = log^n. Then searching all the vectors in a /:-wise independent probability space does not yield a polynomial algorithm anymore. In such case, one can sometimes combine the /:-wise independence method with a binary search in the probability space. Another important observation is that one often need not insist on satisfying (4) exactly, but can allow an absolute error of 6: for a suitable ^ > 0 (say e = 2~^/100). In such case, we speak of (e, k)independence. Compared to the exact /:-wise independence, the size of the probability space can be significantly reduced. There are relatively simple algebraic constructions of
Derandomization in computational geometry
569
n-hii random (e, ^)-independent vectors on probability spaces of size roughly k^ log^ n/e'^. These results belong among the most powerful tools for derandomization. For instance, if ^ = 0 ( 1 ) and \/s = O(logn) suffices to make the algorithm work, then it can be derandomized with a polylogarithmic overhead only by running it on all points of the small probability space. How to use ^-wise independence instead of full independence in algorithm analysis? For instance, suppose that the running time T = T(X) can be expressed as a sum of several terms of the form / ( x / , , . . . , jc/^), where / is some function depending on at most k of the n variables xi. Then the expected running time E[T] remains is the same when X is chosen from the fully independent distribution ("usual" random bits) and when X is chosen from any ^-wise independent distribution. There are various more sophisticated ways of applying /:-wise independence; let us mention one more useful tool — a ''weak Chernoff inequality''. Recall that if S = x\ -\ \-Xn is the sum of n independent 0/1 random variables, then the probability of S deviating from its expected value E[S] can be bounded by P r o b ( | ^ - E [ 5 ] | >fl) <2^-^^'/'^.
(5)
If we only assume that the x/ 's are /c-wise independent, we have a tail estimate decreasing as a /:-th power (instead of decreasing exponentially as for the full independence):
Prob(|5-Em|>a)
(6)
C an absolute constant. Another interesting approach is to produce a small probability space tailored for a given randomized algorithm. The idea is to look what constraints are put by the analysis on the joint distribution of the random bits vector X, and then compute a small probability space satisfying these constraints. A potential advantage is that the algorithm may actually make use of much fewer constraints than are imposed by k-wise independence. The computation of a suitable space can be difficult, but for many practically important types of constraints it can be done in polynomial time by linear programming or by other methods. Bibliography and remarks. Construction of "quasi-random" objects, mainly graphs, is discussed in Alon and Spencer [14]. This subject is very wide and has many often unexpected connections; another long survey would be needed to cover just the basics. A recent work in this area is Wigderson and Zuckerman [102], where also more references can be found. Explicit quasi-random graph (expanders) were applied in geometric algorithms by Ajtai and Megiddo [10] and by Katz and Sharir [72,73]. Small ^-wise independent probability spaces were constructed by Joffe [64]; an asymptotically optimal size was achieved by Alon et al. [2] (see also [68]). Constructions of (exactly) ^-wise independent probability spaces are also covered in [14]. A nice survey of applications of 2-wise independence is Luby and Wigderson [77]. Bounded independence was used for derandomization e.g., in Karp and Wigderson [74]. A combination of bounded independence with a search in the Raghavan-Spencer spirit appears in Luby [76] for 2wise independence. The possibility of handling (log/i)-wise independence or even sometimes (log^^"^^«)-wise independence in this way was discovered by Berger and Rompel
570
/. Matousek
[22] and independently by Motwani et al. [69]. The idea of allowing an approximate independence only and thus reducing the space size is due to Naor and Naor [83]; simplified and elaborated constructions of approximately independent probability spaces of 0/1 vectors were given by Alon et al. [6]. For constructions for more general distributions than uniform 0/1 vectors see e.g., Even et al. [55] (in general, random variables x\,... ,Xn are called kwise independent if Prob(x/j G A j , . . . , jc/^ G A^) = 0 / = i Prob(x/. ^ Aj) for any i\, ...J^, 1 ^ /] < • • • < /^ ^ n, and any A ] , . . . , A^, Aj a measurable subset of the range of the variable jc/ ). More general forms of the Chemoff inequality (5) are discussed e.g., in Alon and Spencer [14]. Inequality (6) was proved by Rompel [91] (it holds for any k-wise independent random variables x\, ...,Xn with values in [0,1]); see also Schmidt et al. [99]. Generating sample spaces tailored for a given algorithm was started by Koller and Megiddo [69] and further developed by Karger and Koller [67]. Our bibliography is by no means complete here; the reader may consult some of the recent papers mentioned here for references to other important works in this area. The /:-wise independence methods were applied by Berger et al. [23] and later by Goodrich [58,59], by Amato et al. [8], and by Mahajan et al. [71] for parallelization of derandomized geometric algorithms. Mulmuley [80] extends earlier work of Karloff and Raghavan [71] on limiting random resources using bounded independence distributions and demonstrates that a polylogarithmic number of random bits is sufficient for guaranteeing a good expected performance of many randomized incremental algorithms.
4. Deterministic sampling in range spaces In this section we discuss methods developed for derandomizing algorithms of the divideand-conquer type. There were essentially two abstract frameworks for such randomized algorithms proposed in the literature: the range spaces of Haussler and Welzl [63] and the framework of Clarkson, see [46]. We will mainly consider the first framework.
4.1. 6-nets and
e-approximations
We begin by considerations leading to a proof of the bound (1), n^ ^ C(n/r) logr. This bound says that if we draw a sample 5 of r lines out of n at random, certain specific triangles (dependent on S) will only be intersected by 0((n/r) logr) lines. The first step in the Haussler-Welzl proof is to observe that the relevant triangles are not properly intersected by any line of S. Then this condition is strengthened by requiring that any triangle which is not properly intersected by a line of S is only intersected by that few lines of H. The next very fruitful step is to abstract oneself from the specific geometric situations and formulate the problem in terms of set systems. In our case, we have / / as a ground set, and we consider all subsets of H of the form ///\, where A is some triangle and HA are the lines of H properly intersecting it; this defines a set system (//, 7Z). The property of S we want to establish now becomes that with high probability, any set in IZ of size at least C(n/r) logr contains an element of the sample S. With this motivating example, we can proceed to the general framework. One considers a ground set X and a system IZ of its subsets. (The pair E = (X,1Z) is sometimes called a
Derandomization in computational geometry
571
range space in this context; the sets of IZ are called the ranges of U.) One may consider infinite set systems, such as the set of all points in the plane with all triangles as ranges, or finite ones, such as the set of all subsets of a finite point set X in the plane definable as intersections of X with some triangle. In general, if 7 is a subset of X, we denote by 7Z\Y the set system induced by IZ on Y, \.t. {R D Y\ R elZ} (let us emphasize that although many sets of 71 may intersect Y in the same subset, this intersection only appears once in A subset S ^X is called an e-netfor {X, IZ) provided that 5 Pi /? 7^ 0 for every RelZ with |/^|/|X| > 6: (in this definition, ^ G [0,1) is a real number, and we assume that X is finite), i.e. S intersects all "large" ranges. For an efficient geometric divide-and-conquer, we are interested in finding small 6--nets: For proving a bound of type (1), we want to show that a random sample of a suitable size forms an 6'-net with high probability, for derandomization we would like to compute ^-nets by an efficient deterministic algorithm. In the sequel, it will sometimes be more convenient to write \/r fox s, with r > 1. We cannot expect the existence of small ^-nets for an arbitrary set system. A property guaranteeing small 6:-nets and satisfied by many natural geometric set systems is a bounded VC-dimension; a related concept is a. polynomially bounded shatter function. For a set system (X, IZ) and a natural number m ^ |X|, let 7T^{m) denote the maximum possible number of sets in a set system of the form 7^|^, for an m-point subset A c X. To understand this concept, the reader is invited to check that if Z = M^ is the plane and Ti is the system of all (closed) halfplanes, then 7ty^(m) < Cm^ for an absolute constant C and for all m. Shatter functions of set systems arising in computational geometry are usually polynomially bounded, and this implies the existence of small 6:-nets, as we will see below. First we introduce one more concept, the Vapnik-Chervonenkis dimension (or VCdimension for short). The VC-dimension of (X, IZ) can be defined as sup{J; Tt-jzid) = 2^}. In other words, it is the maximum d such that there exists a J-element shattered subset A c X, i.e. a subset such that each B (^ A can be expressed as 5 = A Pi /^ for some R elZ. It turns out that the shatter function of a set system of VC-dimension d is bounded by Co) "^ (T) "^ ^ G ) ' ^^^ ^^^ estimate is tight in the worst case (hence the shatter function of any set system is either exponential or polynomially bounded). Conversely, if the shatter function is bounded by a fixed polynomial, then the VC-dimension is bounded by a constant, but there are many natural geometric set systems of VC-dimension d whose shatter function has a considerably smaller order of magnitude than m^ (for instance, the set system defined by halfplanes in the plane has VC-dimension 3, while the shatter function is quadratic). With these definitions, a basic theorem on existence of 6:-nets can be stated as follows. THEOREM 4.1. For any d ^ 1 there exists a C(d) such that for any r > 1 and for any set system (X, IZ) with X finite and of VC-dimension at most d there exists a (l/r)-net of size at most C(d)rlogr. In fact, a random sample S C. X of this size is a (l/r)-net with a positive probability (even with probability whose complement to 1 is exponentially small in r). This size is in general best possible up to the value ofC(d).
This implies, among others, the bound (1) stated in Section 2. As the theorem says, the log r factor in general cannot be removed from the bound. A challenging and probably very
572
J. Matousek
difficult open problem is whether some improvement in the (l/r)-net size is possible for set systems defined geometrically, such as the one defined by triangles in the plane. A related notion to the e-net is an £-approximation. A subset A c X is an £approximation for (X,1Z), provided that \AnR\ \A\
\R\ <e \X\
for every set R elZ. Clearly, an e-approximation is also an e-net, but not conversely. It can be shown that for a set system of VC-dimension bounded by a constant d, a random sample A of size Cr^ logr with a suitable constant C = C(d) is a. (l/r)-approximationfor (X, IZ) with high probability. The size of the (l/r)-approximation obtained in this way is thus roughly quadratic compared to a (l/r)-net. For the basic derandomization, one needs ^-nets more often than e-approximations. The ^-approximations, however, have some pleasant properties of algebraic nature not shared by 6:-nets which make them more suitable for deterministic computing, and e-nets are essentially computed via e-approximations. On the other hand, e-approximations may be useful in themselves, not only as an auxiliary device for computing 6:-nets. In general one can say that performing some geometric construction for a (l/r)-approximation amounts to performing the construction approximately for the original point set. Let us illustrate it on a well-known geometric notion — the ham-sandwich cut (more examples come in the next sections). Let P\,..., Pd be d finite sets in M^. A hyperplane h is said to bisect Pi if each of the open halfspaces defined by h contains at most LI ^/1/2 J points of Pi. A ham-sandwich cut for P i , . . . , P^ is a hyperplane simultaneously bisecting all the P/ 's. It is well-known that a ham-sandwich cut always exists, but no reasonably efficient algorithm for finding it is known in higher dimensions. Let Ai be an ^-approximation for P/ with respect to halfspaces,^ with e > 0 being a small constant (thus also the size of A/ can be bounded by a constant). We can find a ham-sandwich cut h for the A/'s by some brute force method; since the A/'s have a constant-bounded size this is a maybe complicated but constant-time operation. By the definition of £-approximation, we get that h is also an ^-approximate ham-sandwich cut for the P/, which means that each P/ is divided in ratio between \/2 — e and \/2-j- e. For applications of ham-sandwich cuts, such approximate cuts often suffice, and these can be constructed in linear time (this time is sufficient for finding the A/; see below). Bibliography and remarks. Range spaces and ^-nets were introduced by Haussler and Welzl [63]. They were inspired by a previous work by Vapnik and Chervonenkis [100], which contains the concept of VC-dimension and e-approximation (under different names) and also a proof of existence for (l/r)-approximations of size 0(r^ logr) for afixedVC-dimension. The upper bound in Theorem 4.1 was proved by Haussler and Welzl, by a modification of the Vapnik-Chervonenkis method. The best value of C(J) is ^ + o(l); this was shown by Komlos et al. [70] as well as the lower bound. While the O(rlogr) size for (l/r)-nets is optimal in general, the O(r^logr) bound for (1/r)-approximations is not. It was shown by Matousek et al. [81] that if the shatter function is bounded by O(m^) for a fixed J, then there exist (1/r)-approximations of size To be quite precise we should say "for the set system (P/, 7^), where the sets in IZ are subsets of P/ defined by halfspaces". In the sequel we will mostly use the abbreviated form.
Derandomization in computational geometry Q(j'^-^/{d+l)^Q^^yl-\/{d+\)y^ a similar bound is given there in terms of the so-called dual shatter function. Here also a close relation of £-approximations to the notion of discrepancy is observed, which is a classical object of study in combinatorics, see e.g., [14,18]. There are few geometric situations where the existence of (l/r)-nets of size 0(r) has been established (improving the general 0(r logr) bound), most notably for halfspaces in M^ [74]. This has a nice algorithmic application in a polytope approximation problem; see Bronniman and Goodrich [21]. The VC-dimension and £:-nets are frequently used also in otherfields,in particular in statistics (this is where they come from, after all) and in learning theory. The applicability of £-approximation to approximate ham-sandwich cuts is noted in Lo et al. [75]; a similar trick can be used also for centerpoints (see e.g., [54] for definition, and Clarkson et al. [30] for an interesting randomized algorithm forfindingapproximate centerpoints). 4.2. A deterministic algorithm for s-approximations We consider the deterministic computation of a (l/r)-net for a set system of a constantbounded VC-dimension, such as the set system defined by triangles on an n-point set in the plane. If the set system were given to us by listing the elements of each set, then already the input size would be quite large compared to the size of the underlying geometric problem (e.g., triangles may define about n^ subsets of an n-point set in the plane). In order to get efficient algorithms for computing 6:-nets etc., we need to assume some more compact representation. A suitable way is to assume the existence of a subsystem oracle for (X, IZ). This is an algorithm (depending on the specific geometric application) that, given any subset 7 c X, lists all sets of 7^| y. Note that the maximum number of such sets is bounded by 7r7^(|F|). We say that the subsystem oracle is of dimension at most d if it lists all sets in time 0(|7|)^+^ (the " + 1 " in the exponent accounts for the fact that each output set is given by a list of elements of size up to \Y\). For geometric applications, the construction of the oracle is usually easy and most often it amounts to constructing some arrangement of hyperplanes or surfaces. A basic result on deterministic computation of (l/r)-nets and (l/r)-approximations is as follows: 4.2. Let (Z, IZ) be a set system with a subsystem oracle of dimension d, d a constant. Given any r > 1, one can compute a {\ / r)-approximation of size 0(r^ logr) and a (l/r)-netofsize 0 ( r logr) in time 0(nr^), c = c(d) a constant, n = \X\. THEOREM
In particular, if r is a constant, both the (l/r)-net and the (l/r)-approximation can be computed in time 0 ( | Z | ) . This in itself suffices for derandomizing a large number of geometric algorithms (where constant-size samples are used) in a quite straightforward manner. Most of the other divide-and-conquer algorithms can be modified to use constantsize samples with some decrease in efficiency, typically ofn^. Finally, for many problems where one finds mainly randomized incremental algorithms in the literature, it is not too difficult to design divide-and-conquer type solutions, again with a somewhat worse efficiency. We describe the basic ingredients of an algorithm for deterministic computation of eapproximations.
573
574
/. Matousek
Polynomial-time sampling. As a first ingredient, we need a polynomial time algorithm for the following problem: Given an w-element set F, a system IZ of subsets of F, and a parameter r, we want to compute a (l/r)-approximation of size s = O(r^logr). This is much weaker than Theorem 4.2, since we only want time polynomial in r and n, with possibly large exponents. (1Z may be given by the list of its sets here.) As we know (by a result of Vapnik and Chervonenkis), a 5-element random subset of F is a (l/r)-approximation with a positive probability. This gives a straightforward randomized algorithm for our problem, which can be derandomized by the method of conditional probabilities. This yields the required polynomial time algorithm. A merge-reduce scheme. The algorithm for Theorem 4.2 is based on the above described polynomial-time sampling subroutine and on the following two easy observations: OBSERVATION 4.3. Let X i , . . . , Xm ^ X be disjoint subsets of equal cardinality and let Ai be an e-approximation of cardinality s for (X/,7^|;^.), / = 1,2, ...,m. Then AiU • • • (JAm is an e-approximation for the subsystem induced bylZonXiL)-" (JXm.
OBSERVATION 4.4. Let A be an s-approximation for {X.IZ) and let A' be a 8approximationfor (A, 7^1^). Then A' is an {a + 8)-approximationfor (Z, IZ). The algorithm starts by partitioning the point set X into small pieces of equal size (arbitrarily), and then it alternates between steps of two types — merging and reduction. On the beginning of the /th step, we have a partition 77/ of X into pieces of equal size, and for each such piece P we have an £/-approximation of size si for (P,lZ\p). If the /th step is a merging step, we group the pieces of the partition 77/_i into groups by gi pieces each (gi a suitable parameter), and we merge the pieces in each group into a single new piece. (The simplest sequential version has gi =2.) The ^/-approximation for the merged piece is obtained by simply merging the 6:/_i-approximations for the pieces being merged; we thus get Si = giSi-\, and by Observation 4.3 we may take Si =£i-i. If the /th step is a reduction step, we leave the partition of X unchanged (i.e. 77/ = 77/_i), but we replace each £/_i-approximation A for a piece P in 77/_i by a smaller ^/-approximation A^ To this end, we use polynomial-time sampling to obtain a 5/approximation A^ of size si for the set system (A, 7^|^), with 5/ chosen suitably. By Observation 4.4, such an A' is also an £/-approximation for the piece P, with si = £/_i + <5/. As we can see, this algorithm has a number of parameters which must be adjusted suitably to make everything work. Roughly, one should keep the sizes of the current ei approximations, Si, sufficiently small — not much larger than the final size of the desired (l/r)-approximation; then all the polynomial-time samplings together can be done in 0(nr^^^^^) time. Details and variants can be found in [64,43,58,98]. Bibliography and remarks. A deterministic algorithm for computing £-nets and sapproximations as in Theorem 4.2 was given by Matousek [64]. Predecessors of this work are [78], Agarwal [4], Chazelle and Friedman [31,79]. Chazelle and Matousek [43] present a cleaner exposition of the algorithm and give an explicit dependence of the constants on the dimension d. Srivastav [98] gives a somewhat more efficient implementation of the polynomial sampling subroutine.
Derandomization in computational geometry
575
Bronnimann et al. [20] modify the algorithm to work with so-called sensitive sapproximations instead of e-approximations. A subset A c X is a sensitive s-approximation for (X, 7^) if \R\
\RnA\
\x\
\A\
for every set R elZ (this definition may appear somewhat technical but it arises naturally by looking at what properties can one expect from a random sample). For a constant-bounded dimension set system, one can show the existence of a sensitive (1/r)-approximation of a similar size as for a (l/r)-approximation, that is, O(r^logr). A sensitive £-approximation is at once an £-approximation and an e^-net; this leads to a somewhat more efficient computation of £-nets. The parameters of the resulting algorithm, with dependence on d made explicit, are as follows: A (sensitive) (l/r)-approximation of size 0(dr^log(dr)) can be computed in time 0(d)^^r^^ log^(dr)\X\, and a (l/r)-net of size 0(dr\og(dr)) can be computed in time 0(J)^^r^log^(Jr)|Z|. A parallel implementation of the algorithm of [84] with a polylogarithmic running time was outlined in [43]. More efficient parallel versions were developed by Goodrich, by Srivastav [118], and by Mahajan et al. [91]. Goodrich [58] gave algorithms for the Exclusive Read, Exclusive Write (EREW) PRAM model that compute a (1/r)-approximation of size in time 0(log^ n/logr), resp. of size 0(n^r^) in time O(logn), both with 0(nr'^^^^^) work. For a parallel implementation of polynomial-time sampling, a A:-wise independent random choice of the subset is used instead of full independence (k a constant). Then the tail estimate (6) is applied instead of the Chemoff tail estimate, and the size of the sample is taken slightly larger — ^2+5 rj^Q merge-reduce scheme is also adjusted somewhat differently from [64]. Mahajan et al. [91] combine techniques of Nissan [102] and of Karger and Koller [67] to improve the parallel version of the polynomial-time sampling step; they can achieve 0(r^ logr) size of the (1/r)-approximation in NC, while the previous approaches only gave size 0(r^+^). Goodrich [59] considers very fast parallel algorithms (with (log log w)^^"^^ time) in the Concurrent Read, Concurrent Write (CRCW) PRAM model. In this case, polynomial-time sampling is based on ^-wise independent sample again, but it presents new difficulties, since e.g., one cannot check exactly whether a given sample is a (1/r)-approximation. The following weakening of an £-approximation is introduced: a set A c X is a 8-relative s-approximation for(Z,7^),if \R\
\RnA\
\X\
\A\
^ 8
\- s
\X\
for all R £ IZ. Using this tool, [59] shows that a (l/r)-net of size 0(rl+^) and a (1/4)relative (1/r)-approximation of size 0(r + ) can be computed in 0((loglogw) ) time using Q^^^const^ work (this disregards the time needed for the subsystem oracle, whose implementation with a comparable speed may be quite nontrivial). The use of the linear-time construction of ^-nets with a constant s for derandomizing divide-and-conquer type algorithms is often quite routine and in many works it is just a small remark.
576
/. Matousek
Fig. 3. Constructing (l/r)-approximations via partitions with low crossing number.
4.3. 6-approximations via geometric partitions We describe an alternative way for computing e-approximations in geometrically defined set systems. These £:-approximations are larger than the ones guaranteed by Theorem 4.2 but can be computed much faster. Let P be an n-point set in M^ and let /7 = (Fi, P2, • • •, ^m) be a partition of P into disjoint sets (called classes of 77). For simplicity let us assume that n is divisible by m and that all the classes P/ have equal cardinality, and also that the set P is in general position. For a hyperplane h, let us say that h crosses Pi if it intersects the convex hull of P/. We let the crossing number of the partition 77 be the maximum number of its classes which can be simultaneously crossed by a hyperplane. Our main device here are partitions with crossing number substantially smaller than m. Suppose that we have a partition 77 with crossing number K <^m. Let us form an mpoint set A c P by selecting one point from each class (it does not matter which one). We claim that such an A is an ^-approximation for P with respect to simplices, where s = (d -^ l)/c/m. To see this, consider a simplex a, and call a class P, homogeneous if its convex hull lies completely outside a or completely inside a. Clearly the number of points of the homogeneous classes inside a is precisely reflected by the number of their representatives in A inside a; an error may arise for classes that are not homogeneous (see Figure 3). The number of such classes is at most K(d + 1 ) , since a non-homogeneous class must be crossed by at least one of the J + 1 hyperplanes bounding the simplex a. Therefore the error with which \A (1 a\/\A\ approximates |P fl cr|/|P| is at most K(d -j- \)/m as claimed. Partitions with small crossing numbers are of great interest in another area of computational geometry, so-called range searching problems. One of the products of the research in that area is the following result: THEOREM 4.5. Let P be an n-point set in M^ {d > 2), let s be an integer parameter, 2 ^ s < n, and set r = n/s. There exists a partition 77 = (Pi, P 2 , . . . , Pm) of P whose classes satisfy ^ ^ |P/| < 2^ (thus m = 0(r)) and whose crossing number is 0(r^~^/^). This bound is asymptotically tight in the worst case. If s > n^ for any positive constant
Derandomization in computational geometry
577
5, then such a partition can be computed deterministically in O(nlogr) time. For smaller values of s an 0{n^^^) algorithm exists, for an arbitrarily small constant e > 0. This result does not give exactly equal-size classes, but this is only a minor technical problem and one can use such partitions for computing e-approximations similarly as indicated above. Here we get e ^ r^~^/^/r = r~^^^\m other words, if we want a ( 1 / 0 approximation, we need to choose r ^t^, and this is also the size of the resulting approximation. Hence we have COROLLARY 4.6. Given an n-point set P
This result can be combined with Theorem 4.2 to reduce the size of the (l/r)-approximation. Namely, we first compute a (l/2r)-approximation A\ using Corollary 4.6, and then we compute a (l/2r)-approximation A2 for A\ using Theorem 4.2. This A2 is easily seen to be a (l/r)-approximationfor the original set P, and it has size 0(r^ logr) only. Linearization. Can Corollary 4.6 help if we want to compute an £-approximation for other set systems than those defined by simplices on point sets in E^? No general result of this type encompassing all set systems of bounded VC-dimension is known, but the above result can be applied in many other geometric situations. As a basic and well-known example (see [54]), let us consider the set system defined by circular disks in the plane. A disk C = C(a, Z?, r) c M^ with center (a, b) and radius r is described by the inequality {x — a)^ -{- {y — b)^ ^ r^. We define a mapping (^ : M^ -^ M^ hy (p{x, y) = {x, y, x^ -{- y'^). This mapping maps the plane onto the unit paraboloid z = x'^-\-y^. The property of this mapping important for us is that for any disk C(a,b,r) cM?, there exists a halfspace H = H(a,b,r) in B? such that the points of the plane mapped into the halfspace H by cp are exactly those of the disk C, or C = (p~^(H). It is easily seen that a suitable halfspace H is {(x, j , z) G R^; lax + 2by — z -\- r^ — a^ — b^ ^ 0}. Geometrically this means that the image of any circle can be cut off from the unit paraboloid by a halfspace. Given a point set P C M^, consider its image (p{P) C M^ and let 5 C <^(P) be an e-net for the point set (^(P) with respect to halfspaces. By the above, the preimage <^~^ (5) is an 6:-net for P with respect to disks. On the abstract level, what happens is that (p embeds the set system {X, IZ) of our interest (in our case the one with disk ranges in the plane) into a set system defined by halfspaces in higher dimension, in such a way that each R elZis a preimage of a halfspace. Such a mapping (p is called a linearization of (X,1Z). It turns out that for any set system of the form (W^, 1Z), where each R elZis defined by a single polynomial inequality of degree at most D, there exists a linearization into some E^. In fact, there is a very easy construction of such a linearization (not necessarily yielding the smallest possible dimension of the image space) — the idea is to replace each monomial in the defining inequality by one new coordinate in the higher dimensional space into which we are embedding. Sets defined by a conjunction of several polynomial inequalities can
578
J. Matousek
similarly be embedded into set systems defined by intersections of several halfspaces in a higher dimension. This implies that 6:-nets and ^-approximations for set systems with sets defined by a constant number of bounded degree inequalities can be computed using the techniques for simplices. Bibliography and remarks. Literature on geometric range searching is extensive; recent survey papers are Agarwal and Erickson [3] and Matousek [85]. The original idea for producing geometric partitions is due to Willard [121]. Theorem 4.5 was proved by Matousek [61] by generalizing the ideas of Chazelle and Welzl [49]. Interestingly, the 5 = 2 case has a version for general set systems, while for s = n/0{\) a similar result cannot be expected to hold in such a general setting, as an example by Alon et al. [9] shows. Partitions with crossing number only slightly worse than in Theorem 4.5 can be computed in parallel quickly and this gives also a fast parallel algorithm for £-approximations (Goodrich [58]). The observation that geometric partitions can produce e-approximations in geometric situations quickly is also in [61], together with some applications; more applications can be found in Chazelle and Matousek [42], Matousek and Schwarzkopf [93], and Amato et al. [7,8]. The linearization produced by assigning a new coordinate to each monomial is well known in algebraic geometry (the so-called Veronese map, see e.g., [62]). It has been used by Yao and Yao [123] to show that various geometrically defined set systems can be embedded into the set systems defined by simplices on point sets in some R^; see also [11] for more information. Linearization has been used for derandomization in an essenfial way in [93,7,8]. 4.4. Higher moment bounds and seminets First we give three examples for a future reference. Example A. Let X be a set of lines in the plane. For any subset S C.X, define T{S) as the set of all trapezoids in the vertical decomposition of the arrangement"^ of S. Example B. Let X be a set of line segments in the plane. For any subset S C.X, define T{S) as the set of all trapezoids in the vertical decomposition of the cell containing the origin of coordinates in the arrangement of S. Example C. Let X and S be as in Example A. Decompose a cell of the arrangement of S vertically if it has an even number of edges and horizontally if it has an odd number of edges; let T{S) be the set of trapezoids in the resulting decomposition. Configuration spaces. Now we present an abstract framework, which is somewhat more complicated than range spaces but allows one to prove higher moment bounds of type (2). Formally, a configuration space^ can be defined as a 4-tuple (X, T, D, / ) . Here X is a ^ The vertical decomposition is obtained by extending a vertical segment from each vertex of the arrangement in both directions until it hits another line of S. '^ The terminology and axiomatics is far from being stabilized in the literature. We took the name "configuration space" from [79] but the axiomatics we present is essentially one from [12]. Similar objects are also called multihypergraphs with bounded vertex dependency [31], T-generated set systems [7], or in some papers they remain nameless.
Derandomization in computational geometry
579
B Fig. 4. T{S) in Examples A-C.
finite set whose elements are called the objects (we put n = |Z|). T is a mapping assigning to each 5 c X a set T(5); the elements of T{S) are usually called regions. In applications, X is typically a set of hyperplanes or surfaces in some W^ and T{S) is some kind of decomposition of the arrangement (or its part) of objects from S into "simple" cells. Let Reg = U^cx ^(^) t)e the set of all regions occurring in decompositions for subsets of X. D is a mapping assigning to each region A e Reg a set D(A) c X. The set D{A) is called the defining set (or the set of triggers) of A. Finally / is another map assigning to each region A e Reg a set 1(A) C X, called the objects incident to A (or stoppers or objects killing A). Examples A, B, C readily supply configuration spaces. In all of them, X and T have been described (so Reg is a set of trapezoids), I {A) is the set of objects of X intersecting the interior of A, and D{A) is the set of lines or segments defining the trapezoid A in a suitable geometric sense: e.g., for Example A, D{A) typically consists of the two lines containing the top and bottom sides of Z\, and two more lines incident to the two vertices of the arrangement from which the vertical sides of A emanate. (A problem occurs if e.g., the lines in Example A are not in general position; then a trapezoid may have several minimal defining sets. This can be resolved by formally taking an appropriate number of copies of such a trapezoid, one for each minimal defining set.) There are several axioms we may put on a configuration space. We list them first and then comment on them. 0. The number d = max{|D(Z\)|; A e Reg], called the dimension of the configuration space, is a constant. Moreover, for any 5 c X with l^l < J, the number of regions in T{S) is bounded by a constant, C. 1. For any A e T(S), D(A) c 5 and 5 H 1(A) = 0. 2. If Z\ G T(S) and S' is a subset of S with D(A) c S\ then A e T(S'). 2\ If D(A) c S and 1(A) 0 5 = 0, then A e T(S). 3. For r G {0, 1 , . . . , fi}, let f(r) be the expected number of regions in T(S) for S being a random r-element subset of X. We require that / is nondecreasing and that it never grows too fast, say f(2r) ^ C i / ( r ) for some constant Ci. Axioms 0 and 1 are very natural and they are always imposed. Axiom 3 is a little technical but it is naturally satisfied in most applications. The axioms to look at more carefully
580
/. Matousek
are 2 and 2'. Axiom 2^ essentially says that the decomposition is defined locally, i.e. A occurs iff all its defining objects occur and none of the incident ones does. The weaker Axiom 2, a kind of monotonicity requirement, is perhaps best remembered as follows: If A occurs for some S, we cannot destroy it by removing objects from S unless we remove some of the defining objects of A. The reader is invited to check that in Example A Axiom 2' (thus also 2) holds, in B Axiom 2 holds but 2' doesn't, and in the rather artificial Example C none of 2, 2' holds. Sampling in configuration spaces. For any configuration space as above, we may consider a set system J on Z given by T = {I{A)\ A G Reg}. It is not difficult to check that under Axioms 0, 1, and 2, the shatter function TTJ is polynomially bounded (and thus the VC-dimension is finite). Hence the 6:-net Theorem 4.1 implies that for a random r-element sample 5 C X we have, with high probability, | / ( ^ ) | < const, (n/r) logr for all A e T(S). There may be some regions A in T(S) for which | / (^) | exceeds n/r substantially, but typically they are few. The following theorem expresses this quantitatively in two ways. 4.7. Let {X, T, D, I) be a configuration space satisfying Axioms 0, 1,2, and 3, and let S be an r-element random subset ofX. (i) Let t be a parameter, \ ^t ^ r/d, and let Tt{S) stand for the set of all regions in T(S) with \I(A)\^ t(n/r). Then
THEOREM
E[\%(S)\]^0{2-^)E[\nS)\]. (ii) For any constant c, E
J2 AGT{S)
\l(A)n=0{(n/rr)E[\T(S)\]. -•
Results of this type have been applied in a number of randomized algorithms (both incremental and divide-and-conquer), and for derandomization it is important to compute suitable samples S deterministically. Following the terminology of Amato et al. [7], let us call a set 5 c Z a (\/r)-seminet of order c for the considered configuration space if
J2
\l(A)\'^Co(n/rrf(r),
AeT(S)
where c, Co are positive constants^ and f{r) is as in Axiom 3 (or, if the expectation E[|T(5')|] is difficult to determine, f(r) may be a suitable upper bound on this expectation). Hence Theorem 4.7(ii) can be re-stated by saying that an r-element random sample is a (l/r)-seminet of any fixed order c (with a suitable Co = Co(c)) with high probability. Under the stronger Axiom 2^ a (l/r)-seminet for a given configuration space can be computed in time polynomial in n and r (that is, if the mappings T, D and / are polynomially computable). A straightforward appHcation of the method of conditional probabihties Hence, to be quite precise, we should say something hke "(l/r)-seminet of order c with factor CQ"
Derandomization in computational geometry
581
works here. On the other hand, currently it is not clear if a polynomial-time derandomization is possible under Axiom 2 only. To make the computation (in the situation when Axiom 2' holds) faster, one may use the following observation: if A is a (l/r)-approximation for the set system X induced by the considered configuration space and 5 c A is a (l/r)-seminet of order c for the configuration space induced by A (in an obvious sense), then 5" is a ( l / r ) - s e m i n e t of order c for the original configuration space (with a somewhat worse Co). Hence, a ( l / r ) - s e m i n e t can be computed in time 7 A ( « , r) + r^^"^^ where r ^ ( n , r) is time needed to compute a (l/r)-approximation for (Z, X) of size polynomial in r. This trick with ^-approximation we used here is also useful in other situations; we could call it sampling from an e-approximation. A general scheme is the following: Given a set X of objects, we want to compute a sample S with some properties more complicated than, say, being an ^-net, so that no fast deterministic algorithm is available directly. We compute an ^-approximation A for some appropriate set system on X with a suitable s quickly and compute a good sample S with respect to A; we can use a slow method (e.g., conditional probabilities in raw form) since A is small. Then, for many properties of the sample, S will be also good for X, perhaps only with slightly worse constants. Bibliography and remarks. The described framework goes back to Clarkson [37] (a journal version is [46]), who essentially proved Theorem 4.7(ii) under Axiom 2' instead of 2. Theorem 4.7(i) under Axiom 2' is due to Chazelle and Friedman [31]. Theorem 4.7(ii) in our formulation goes back to Chazelle et al. [26] who formulate their results in a "dynamic" form, as a time bound for a randomized incremental algorithm (see also De Berg et al. [50]); part (i) appears in Agarwal et al. [12]. The idea of sampling from an 6:-approximation is implicit in [79], and it has been used in several other papers ([42,93,7,8]). The notion of a (l/r)-seminet was introduced by Amato et al. [7], inspired by a paper of Chazelle [33]. As was observed by Ramos [108], the problem with computing a (l/r)-seminet in polynomial time under Axiom 2 (without "locality") can be often circumvented in specific applications. For instance, for computing a single face in an arrangement of segments (this is one of the problems considered in [8], where the derandomization described in the proceedings version of that paper doesn't quite work), one need not work with T{S) as in Example B above. Instead, the computation can be done with T'{S), defined as the set of all trapezoids of T(5) that intersect the face in the arrangement of X containing in the origin. For this new T\ the "locality" Axiom 2^ holds. This may seem a strange remedy since the face in the arrangement of X is what we ultimately want to compute, but here sampling from an £•-approximation comes to rescue — we sample in the situation when X is a suitable (l/r)-approximation to the original set of segments.
5. Derandomization of basic computational geometry algorithms 5.1.
Cuttings
Let us return to the geometric divide-and-conquer, and suppose that we deal with a collection Hofn hyperplanes in M^. Similarly to our introductory example in Section 2, we want to partition the problem involving H into smaller subproblems, but suppose that this
582
J. Matousek
time we are interested in the whole arrangement of H (not only in its cell containing the origin as in Problem 2.1). The basic strategy dictates that we choose a random sample 5 C H of a suitably selected size r and partition the cells of the arrangement of S into some constant complexity subcells. In this situation, a suitable way is for instance the so-called bottom-vertex (or canonical) triangulation.^ This yields a partition T{S) consisting of O(r^) simplices. Each simplex A eT{S) defines one subproblem, in which only the hyperplanes of H^ appear. The set system with H as a point set and with sets defined by simplices has a bounded VC-dimension, and thus by Theorem 4.1, a random sample S is an ^-net with high probability, where e = const, log r / r . This in turn implies that the bound (1) holds; we are thus subdividing into O(r^) subproblems of size 0((n/r) logr) each. The efficiency of the resulting algorithm depends on the number of levels of recursion and on the factor we lose at each level; we thus want to obtain small subproblems using as few simplices as possible. What result can we expect at best? The arrangement of H has ^ n^ vertices, while a simplex A intersected by nA = \HA\ hyperplanes may only contain ~ «^ vertices,^ hence for a partition with O(r^) simplices, the average nA has to be at least of the order n/r. We thus see that the construction using e-nets is not bad; it turns out, however, that one can do a little better and match the lower bound up to a constant factor. One way is to prove a bound of type (2), and deal with analysis of the certain advantages. First we state the desired property of the partition as a definition. A cutting is a finite set of closed simplices^ covering M^. In known constructions the simplices have disjoint interiors. Let / / be a set of n hyperplanes in R^ and £ > 0 a parameter. A cutting S is called an s-cutting for H provided that \HA\ ^ sn for every A e E, that is, the interior of no simplex of S is intersected by more than en hyperplanes of H. The above considerations can be restated by saying that a (l/r)-cutting for H must have Q{r^) simplices, and that 0((r logr)^) simplices can actually be achieved. The promised stronger result is THEOREM 5.1. For any collection Hofn hyperplanes in R^ and a parameter r, 1 < r ^ n, a (I/r)-cutting consisting ofO(r^) simplices exists, and it can be computed deterministically in 0(nr^~^) time, together with the list of hyperplanes intersecting each simplex of the cutting. The algorithm can be implemented in parallel on an EREW PRAM, with 0(\ogn) running time and 0(nr^^~^) work. For certain fixed a = a(d) > 0 and r < n^, a (I/r)-cutting of size 0(r^^) can be computed in 0(n logr) time.
We have already remarked that the O(r^) size is asymptotically optimal. The (sequential) running time 0(nr^~^) is also optimal in the following sense: if we want also the For a convex polygon, a bottom vertex triangulation means drawing all diagonals incident to the bottom vertex (the one with lexicographically smallest coordinate vector). For convex polytopes of higher dimension, it is defined inductively, by first bottom-vertex triangulating all lower-dimensional faces and then lifting each simplex in these triangulations towards the bottommost vertex of the polytope. There may be also some vertices on simplex boundaries, but it turns out that these can't play an important role. Here a simplex means an intersection ofd + 1 halfspaces, hence also "simplices" going to infinity are allowed.
Derandomization in computational geometry
583
lists HA to be output, then already the output size is of order nr^~^, as the lower bound argument shows. Cuttings via seminets. One way of constructing a (l/r)-cutting of size O(r^) is as follows: Take a random subset S c. H of size r, and let T{S) be the bottom-vertex triangulation of its arrangement. Consider a simplex A G T{S), and put tA = |//z\|(r/n) (the excess of Z\, i.e. how many times does \HA\ exceed the "right" value n/r). If r/\ < 1, leave A untouched; otherwise construct some (1/^^)-cutting SA for the collection HA of hyperplanes. Intersect all simplices of SA with the simplex A. Discard all intersections that are empty, and triangulate the intersections that are not simplices. Denote by SA the resulting collection of simplices. The promised (l/r)-cutting is the union of all EA over Ae S. Using the ^-net argument as above, we can guarantee that the size of each EA is 0{t^ log^ tA) = 0{t^^ ). Then we get that the total number of simplices in E is bounded by
and the expectation of this sum is O(r^) by Theorem 4.7(ii) (here it is important that the triangulation T{S) is not arbitrary but the bottom-vertex one — from this the validity of Axiom 2' can be derived). This provides a simple 0(nr^~^) randomized algorithm, which can be derandomized in polynomial time. Using sampling from an e-approximation, one can get an 0{nr^~^) deterministic algorithm by this approach if r is not too large, namely if r < n^~^ for some fixed 5 > 0 (see [64]). The part of Theorem 5.1 with O(nlogr) time for r
584
/. Matousek
facet to another, and the combinatorial complexity of their arrangement within A is only 0(m^~^); essentially we are dealing with a (d — 1)-dimensional problem (these considerations make no claim at exactness). The requirement that HA defines no vertices inside A is too strong (and computationally difficult even to check). Rather we distinguish two cases in the refinement procedure: (i) (''Rich " simplex) \V{HA.A)\^^
(:)•
where (5 > 0 is a suitable small constant, considerably smaller than l/ro- Then we compute a (l/ro)-cutting EA of size Cr^ log^ ro for HA by the e-net method and form the collection EA as in the basic refinement method, (ii) {''Poor'* simplex) \V{HA,A)\
<8
0
Then we choose a random sample SA C HA of size Cro log ro and we triangulate the portion of its arrangement within A, forming a collection EA- We check two conditions:
(a)
\EA\^r^/2.md
(b) each simplex of EA is intersected by at most m/ro hyperplanes of HA. We repeat the random choice of SA until both these conditions are satisfied. There are several things to be clarified. First, why should a random sample SA in the "poor" case satisfy (a) and (b) with a positive probability? As for (b), this follows from the general ^-net theorem. Concerning (a), one observes that for a vertex v e V(HA, A), the probability that it becomes a vertex of V(SA, A) is approximately \SA\^/tn^ and thus E[|V(5^, Zl)|] « 1 M ^ 5 ( ^ ^ <5(Crologro)''. Geometric considerations show that the number of simplices formed by triangulating the arrangement of SA within A is proportional to \SA\^~^ + \V(SA. ^ ) | ; SO if we set 8 small enough then the expected number of these simplices will be smaller than, say, TQ/4 and so (a) holds with probability at least 1/2. If we apply this procedure and keep refining the cutting, we obtain a tree-like hierarchy of simplices. We want to bound the total number of simplices produced. The basic intuition is that the poor simplices have few children, and the rich simplices may have many children but they must distribute their wealth among them and so not too many of their children may become rich. More precisely, suppose that we stop building the tree at the level where the simplices are intersected by at most n/r hyperplanes, thus forming a (l/r)-cutting. Let us consider a rich simplex A intersected by m hyperplanes. Such A has at most j = llog^^^(mr/n)} levels of refinement below it. We charge the simplex A plus all poor simplices for which A is the nearest rich ancestor to the vertices contained in A, whose number is Q{m^). The number of poor simplices charged in this way is at
Derandomization in computational geometry
585
most r ^ / 2 -h {r^/2)^ -\ h {r^/2y = 0{{mr/nY/V), thus a single vertex inside A is charged 0 ( ( r / n ) ^ / 2 ^ ) by A and its poor successors. From this we find that the total charge made to any single vertex in the arrangement is 0 ( ( r / n ) ^ ) , hence the overall number of all simplicesis O ( r ^ ) . For a derandomization of this method one needs to distinguish the poor and rich cases and find the samples SA deterministically. Both these problems can be resolved using eapproximations. The following result of independent interest is used: L E M M A 5.2. Let H be a collection ofn hyperplanes intersecting a d-dimensional A, and let A be an s-approximation for H with respect to segments. Then \V{H.A)\ \H\d
\V{A.A)\ \A\-
simplex
^e.
The strategy for finding SA is a sampling from an ^-approximation: First we find Az\, a (1/0-approximation for HA with respect to simplices, where Ms a constant, f ^ 1/5. We count the vertices of V{AA, A), and by Lemma 5.2 this tells us (with relative error \/t, which is insignificant) if we deal with the rich case or the poor case. In the poor case, we choose SA as a sample/r6>m A^^; we require the condition (a) plus the condition (bO SA is a (l/2ro)-net for A A (with respect to simplices). It is easy to see that such an SA will also satisfy (b). The existence of such SA follows as before by a probabilistic proof, and a particular SA can be found by trying all possibilities (remember that \AA\=0{\)). Alternatively we may compute it in time polynomial in | A ^ | by the method of conditional probabilities. Bibliography and remarks. The ideas leading to the construction of cuttings via e-nets appeared in the early works of Clarkson [37] and Haussler and Welzl [63]. The bottom-vertex triangulation is from Clarkson [37]. The existence of asymptotically optimal cuttings was first established by Chazelle and Friedman [31] by the method with seminets; derandomization of their method was elaborated in [79,64]. In the plane, a deterministic construction of a (1/r)cutting of size O(r^) was independently found by Matousek [78], with O(nr^logr) running time. This running time was improved by Agarwal [4] to 0(nr(logr)^), for a constant CD < 3.3. This paper contains the idea of using vertices as an accounting device. An 0{nr^~^) sequential deterministic algorithm for computing a (l/r)-cutting was given by Chazelle [32] by the indicated method (including Lemma 5.2). The parallelization is due to Amato et al. [7]. Chazelle's construction has the advantage of providing a hierarchy of coarser cuttings, which for example gives an optimal data structure for point location in the cutting for free. It also gave a new existence proof for the asymptotically optimal cuttings. Various generalizations of cuttings were used to solve other problems. One direction of generalization is to decompose not the whole arrangement, but only some portion of it, for instance one cell (this is what we did in the algorithm for Problem 2.1). A {^-shallow s-cutting for a collection H of n hyperplanes in M.^ is a collection S of simplices which completely cover the cell of the arrangement of H containing the origin (and perhaps something more), such that no A e S is intersected by more than sn hyperplanes of H. Existence of 0-shallow (1/r)-cuttings of size 0(r^^^'^^) for any H and r is established in [82] by the method of [31], and a deterministic algorithm is given for constructing them in 0(nr^^^'^^~^) time, but
586
/. Matousek
only for r 0. For even dimension d, one can do better using the vertex-accounting mechanism (see [7]), but in odd dimension such an approach fails: the reason is (roughly) that the maximum complexity of the intersection of n halfspaces in dimensions d (d odd) and J — 1 has the same order of magnitude, and hence 'boundary effects' can be too large. Ramos [109] observed that by combining the methods of Bronniman et al. [20] and of Matousek and Schwarzkopf [92], one can get an 0(nr^^^^^~^) deterministic algorithm for computing 0-shallow (1/r)-cuttings in the full range of r's. Another direction of generalization is to consider other surfaces than hyperplanes. In this case also the simplices of the cutting must be replaced by some more general (curved) cells. Here the situation is much less satisfactory than for hyperplanes because it is not known how to decompose cells in arrangements of surfaces into constant-complexity subcells in an optimal or near-optimal way; see Chazelle et al. [27] for current best results and Sharir and Agarwal [112] for more background information. Improvement in this would bring asymptotic improvements in many algorithms in computational geometry. An abstract treatment of cuttings is pursued in Agarwal and Matousek [11].
5.2. Convex hull, diameter, and other problems Convex hulls. In order to go into derandomization of sequential algorithms for computing the convex hull of n points in M^, one must have quite strict requirements on the asymptotic complexity of the algorithm. We recall that a worst-case lower bound for this problem is Q{n\ogn + n^^^/^^). Optimal deterministic algorithms have been long known for all even dimensions and also for dimension 3, and for odd dimensions there is a deterministic algorithm with 0(«L^/^J logn) running time, so the main challenge was to get rid of the \ogn factor for odd dimensions d ^ 5. This was achieved by Chazelle in a tour deforce of derandomization [33]. Chazelle's algorithm is fairly complicated, so we can only indicate the main ingredients. First of all, one does not really derandomize the strictly incremental approach; rather new points are inserted in 0(log/i) batches, each batch having about the same number of points as all the previous batches together. The derandomization is done by the method of conditional probabilities, which is used to figure out the objects to be inserted in the next batch (otherwise one follows the randomized counterpart). The conditional expectations must be suitably approximated, and the largest part of the analysis of the algorithm aims at showing that the error made by this approximation does not destroy the properties of the randomized algorithm. The required quantities are computed using ^-approximations, and Lemma 5.2 is used heavily for estimating the errors. The derandomization technique developed for convex hulls does not seem to be immediately applicable to other problems solved by randomized incremental constructions. The other problems have a still larger degree of inherent "nonlocality" compared to the convex hull computation, and approximating the required conditional expectations is thus harder. More opportunities for derandomization of convex hull algorithms remained in the realm of parallel algorithms and for output-sensitive algorithms in R^, and here indeed the best known deterministic algorithm were obtained in this way (see Remarks and bibliography).
Derandomization in computational geometry
587
Diameter in M^. Given an n-point set P C M^, the problem is to determine diam (P), the diameter of P. Clarkson and Shor [46] gave a simple optimal 0{n\ogn) randomized algorithm; obtaining a comparably efficient deterministic algorithm seems surprisingly difficult. The current record for deterministic running time is Oinlo^n), and algorithms approaching this bound are all quite complicated. All efficient algorithms for computing diameter in M^ use as a subroutine an algorithm for computing the intersection of n balls of equal radius in E^. The connection between these two problems is quite simple: The diameter of the set P is at most r iff the intersection I{P,r) of balls of radius r centered at the points of P contains all points of P\ hence if we can compute I(P,r) and decide membership of points in it quickly, we can compare the (unknown) value of diam (P) with any given number r. Known deterministic algorithms use this comparison method plus the so-called parametric search to find the diameter (the parametric search technique is briefly outlined in the Appendix). Convex hull algorithms can often be adapted to compute the intersection of equal-radius balls, since this is rather similar to computing the intersection of halfspaces, which is a dual version of convex hull computation (however, the problems are not quite the same and additional technical complications may arise). For computing the diameter via parametric search, the ball intersection algorithms has to be implemented in parallel (in a very weak computational model), so that one has to mimic some parallel convex hull algorithm, and all such (fast) 3-dimensional algorithms are fairly complicated. Linear programming. The linear programming problem considered in computational geometry is usually formulated as follows: Given n halfspaces in M^, compute a point of their intersection maximizing a given linear function. For any fixed d, this problem can be solved inO(n) time; the first such algorithm (a deterministic one) was given by Megiddo [88]. Since then, the dependence of the constant of proportionality on d has been improved several times, from the original 2^ in Megiddo's paper. As was mentioned in Section 2, randomized algorithms are far ahead of deterministic ones in this respect (with roughly exp(V^) for randomized algorithms and exp(0(Jlog J)) for deterministic ones). The best deterministic algorithms were obtained by derandomization. Two basic approaches have been used. One, derived from Megiddo's original algorithm, is built by induction on the dimension. In dimension d, it searches for the position of the optimum by testing its position relative to suitably chosen hyperplanes; an oracle for such tests is implemented using linear programming in dimension d — I. After testing a constant number of hyperplanes, the position of the optimum is determined sufficiently precisely so that a constant fraction of the constraints can be thrown away (a prune-and-search method). The most efficient methods for such a search are based on computation of suitable 6:-nets. The second approach is by derandomizing an algorithm of Clarkson [40]. Segment arrangements. Given n segments in the plane with a total of k intersections, we want to compute their arrangement. The optimal running time for this problem is 0(nlogn + k), which is easy to achieve by a randomized incremental construction but surprisingly difficult deterministically. After the first optimal deterministic solution by Chazelle and Edelsbrunner [24] (which did not use derandomization), there remained the problems to give an 0(n) space algorithm and to give an efficient parallel version. Both
588
/. Matousek
these goals were achieved by Amato et al. [8] by designing a divide-and-conquer type algorithm and derandomizing it. The basic approach is to take a sample of r = n" segments, compute the vertical decomposition of their arrangement, and recurse in each trapezoid. This in itself (choosing the sample as a suitable e-seminet) leads to an 0(n log^^^^^n + k) running time, since each of the log log n levels of recursion costs a constant factor. The next idea is to control this blowup by the vertex-accounting mechanism (described in Section 5.1); the most dehcate case is when k is small, say k ^ log^«, since then "boundary effects" might create too many subproblems. Amato et al. add two more ingredients to the algorithm: If a subproblem becomes very small (having fewer than log^ n segments), they solve it directly by the above mentioned 0(n log'^^"^^^ + k) algorithm, and if the current subproblem has very few intersections, they slice it into very many subproblems along a suitable collection of nonintersecting segments. This allows them to keep the total size of all current subproblems bounded by 0(n + k/ logn) and leads to an optimal algorithm; we refer to [8] for details (a way to fix a problematic derandomization in that paper was noted by Ramos [108]; see remarks to Section 4.4). Bibliography and remarks. The problems considered in this section all have a rich history which we do not try to cover here. We only mention results obtained by derandomization and directly related randomized algorithms. Convex hulls. The first worst-case optimal algorithm in all dimensions is a randomized incremental construction due to Clarkson and Shor [46]. A similar (but not identical) algorithm was optimally derandomized by Chazelle [33]. The method is simplified both conceptually and technically in [20]. For ^ = 3, an optimal output-sensitive deterministic convex hull algorithm (of complexity 0(n \ogh),h being the number of facets of the hull) was obtained by Chazelle and Matou§ek [42], by derandomizing a divide-and-conquer type algorithm of Clarkson and Shor [46]. Finding an optimal output-sensitive algorithm in dimensions d ^ 4, randomized or deterministic, remains a challenging open problem (a long-time record in this direction is Seidel's 0(n^ + h logn) deterministic algorithm [113]). In the parallel domain, Goodrich [58] obtained an OQog^n) time work-optimal deterministic convex hull algorithm for dimension 3 by derandomization; a simpler version with the same performance is given by Amato et al. [7], who also provide an 0(log^ n) time, 0(n logh) work output-sensitive algorithm, and for for even dimensions d ^ 4 they describe an O(logn) time, 0(n ^^1^^) work deterministic algorithm (based on a shallow cutting construction and vertex accounting; see remarks to Section 5.1). (All algorithms in this paragraph are in the EREW PRAM model.) Diameter in E . The first derandomization of the Clarkson-Shor 3-dimensional diameter algorithm is due to Chazelle et al. [29] and has 0(n^~^^) running time for any fixed 8 > 0. This was improved by Matousek and Schwarzkopf [93] to 0(n\og^^^^^n), by Ramos [107] to 0(n log^ n), by Amato et al. [7] to^ 0(n \og^ n), andfinallyby Ramos [110] to the current best time 0(n log^ n). Among these, the Ramos' 0(n log^ n) algorithm is the most elementary one. Parametric search is an ingenious algorithmic technique; roughly speaking, under certain favorable circumstances it allows one to convert decision algorithms into search algorithms. It was formulated by Megiddo [87]. A technical improvement, which sometimes reduces the running time by a logarithmic factor, was suggested by Cole [44] (see also Cole et al. [48], 9 Bronnimann et al. [20] who claimed the 0(n log-^ n) bound earlier have an error in the diameter computation part; this could probably be fixed, but the algorithm is more complicated than the one of [7].
Derandomization in computational geometry
589
Cohen and Megiddo [41], Norton et al. [104] for a higher-dimensional generalization). Parametric search is usually not considered a derandomization technique, but sometimes it helps considerably in constructing deterministic algorithms. Linear programming. A straightforward derandomization using e-nets is applied to Clarkson's algorithm [40] by Chazelle and Matousek [43], which surprisingly yields a linear time deterministic algorithm with the best known dependence on the dimension. This algorithm is also applicable for other problems similar to linear programming, extending previous results of Dyer [52]. Agarwal et al. [16] give another derandomized linear programming algorithm with a similar efficiency but based on Megiddo's original approach; this algorithm is applicable on yet another class of search and optimization problems. Their technique of searching can also speed up some applications of multidimensional parametric search. A very fast parallel deterministic implementation on CRCW PRAM was first found by Ajtai and Megiddo [10] using expanders; their algorithm has 0((loglogn)'^) running time with 0(n(loglogn)^) work. Goodrich [59] applies their ideas, ideas of Dyer [53], and a fast parallel computation of s-nets to give algorithms with 0(n) work and 0((loglogn)'^+^) running time on a CRCW PRAM, resp. 0(logn(loglogw)^-^) time on an EREW PRAM (previously, [53] gave an EREW PRAM algorithm with the same running time and slightly worse work). Segment arrangements and generalizations. Optimal randomized algorithms for constructing a segment arrangement, with 0{n\ogn + k) expected running time, were discovered by Clarkson and Shor [45] and by Mulmuley [76]. Amato et al. [8] give an 0(log^ n) time, workoptimal EREW PRAM version of their algorithm. Another deterministic algorithm with 0{n) space and optimal time was found also by Balaban [17]; this one doesn't seem to parallelize easily. [8] can also compute a single face in an arrangement of n segments in 0(n a^(n) \ogn) deterministic time (compared to the best known 0{na{n)\ogn) randomized algorithm of Chazelle et al. [26]). They use similar methods to construct a point location structure for an arrangement of n id — 1)-dimensional possibly intersecting simplices in R*^, J ^ 3, with O(logn) query time and 0{n^~~^ log^^'^^^n + k) deterministic preprocessing time and storage, where k is the complexity of the arrangement; this is based on derandomizing Pellegrini's work [105]. Deterministic computation of the lower envelope of n bounded-degree univariate algebraic functions has been studied by Ramos [110] and used as a subroutine in his 3-dimensional diameter algorithm.
Appendix: The parametric search technique Parametric search is a general strategy for algorithm design. Roughly speaking, it produces algorithms for searching from algorithms for verification, under suitable assumptions. Let us consider a problem in which the goal is to find a particular real number, ^*, which depends on some input objects. We consider these input objects fixed. Suppose that we have two algorithms at our disposal: First, an algorithm O, which for a given number t decides among the possibilities t < t"^, t = t'^ and ? > f* (although it does not explicitly know f*, only the input objects); let us call such an algorithm O the oracle. Second, an algorithm G (called the generic algorithm), whose computation depends on the input objects and on a real parameter t, and for which it is guaranteed that its computation for f = r* differs from the computation for any other /^ / r *. We can use algorithm O also in the role of G, but often it is possible to employ a simpler algorithm for G. Under certain quite weak assumptions about algorithm G, the parametric search produces an algorithm for finding f*.
590
/. Matousek
The main idea is to simulate the computation of algorithm G for the (yet unknown) parameter value ^ = f *. The computation of G of course depends on t, but we assume that all the required information about t is obtained by testing the signs of polynomials of small (constant bounded) degree in t. The coefficients in each such polynomial may depend on the input objects of the algorithm and on the outcomes of the previous tests, but not directly on t. The sign of a particular polynomial can be tested also in the unknown f *: We find the roots t\, ...Jk of the polynomial /?, we locate r* among them using the algorithm O and we derive the sign of /7(^*) from it. In this way we can simulate the computation of the algorithm G at f*. If we record all tests involving t made by algorithm G during its computation, we can then find the (unique) value f * giving appropriate results in all these tests, thereby solving the search problem. In this version we need several calls to the oracle for every test performed by algorithm G. The second idea is to do many tests at once whenever possible. If algorithm G executes a group of mutually independent tests with polynomials p\(t),..., pm(t) (meaning that the polynomial pi does not depend on the outcome of the test involving another polynomial Pj), we can answer all of them by 0(log«) calls of the oracle: We compute the roots of all the polynomials p\,..., pm and we locate the position of t* among them by binary search. Parametric search will thus be particularly efficient for algorithms G implemented in parallel, with a small number of parallel steps, since the tests in one parallel step are necessarily independent in the above mentioned sense. Parametric search was formulated by Megiddo [87], the idea of simulating an algorithm at a generic value appears in [57,61,86]. A technical improvement, which sometimes reduces the running time by a logarithmic factor, was suggested by Cole [44]. A generalization of parametric search to higher dimension, where the parameter Ms a point in R^ and the oracle can test the position of f * with respect to a given hyperplane, appears in [48, 41,104,83]. Currently is parametric search a quite popular technique also in computational geometry; from numerous recent works we select more or less randomly [47,1,15,29]. Algorithms based on parametric search, although theorefically elegant, appear quite complicated for implementation. In many specific problems, parametric search can be replaced by a randomized algorithm (see [51,80,34]) or by other techniques (e.g., [19,72]) with a similar efficiency.
Acknowledgment I am grateful to Bernard Chazelle, to Edgar Ramos, and to two anonymous referees for very useful comments to earlier versions of this paper.
References [1] RK. Agarwal, B. Aronov, M. Sharir and S. Suri, Selecting distances in the plane, Algorithmica 9 (1993), 495-514. [2] N. Alon, L. Babai and A. Itai, A fast and simple randomized algorithm for the maximal independent set problem, J. Algorithms 7 (1986), 567-583.
Derandomization
in computational
geometry
591
[3] P.K. Agarwal and J. Erickson, Geometric range searching and its relatives. Advances in Discr. and Cornput. Geom., B. Chazelle, E. Goodman and R. Pollack, eds, Amer. Math. Soc, Providence (1998). [4] P.K. Agarwal, Partitioning arrangements of lines: I. An efficient deterministic algorithm. Discrete Comput. Geom. 5 (1990), 449^83. [5] P.K. Agarwal, Geometric partitioning and its applications. Computational Geometry: Papers from the DIMACS Special Year, J.E. Goodman, R. Pollack and W. Steiger, eds, Amer. Math. Soc. (1991). [6] N. Alon, O. Goldreich, J. Hastad and R. Peralta, Simple construction of almost k-wise independent random variables. Random Struct. Algorithms 3 (1992), 289-304. [7] N.M. Amato, M.T. Goodrich and E. A. Ramos, Parallel algorithms for higher-dimensional convex hulls, Proc. 35th Annu. IEEE Sympos. Found. Comput. Sci. (1994), 683-694. [8] N.M. Amato, M.T. Goodrich and E. A. Ramos, Computing faces in segment and simplex arrangements, Proc. 27th Annu. ACM Sympos. Theory Comput. (1995), 672-682. [9] N. Alon, D. Haussler and E. Welzl, Partitioning and geometric embedding of range spaces of finite VapnikChervonenkis dimension, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 331-340. [10] M. Ajtai and N. Megiddo, A deterministic poly (log log n)-time n-processor algorithm for linear programming infixed dimensions, Proc. 24th Annu. ACM Sympos. Theory Comput. (1992), 327-338. [11] P.K. Agarwal and J. Matousek, On range searching with semialgebraic sets. Discrete Comput, Geom. 11 (1994), 393-418. [12] P.K. Agarwal, J. Matousek and O. Schwarzkopf, Computing many faces in arrangements of lines and segments, SIAM J. Comput. 27 (1998), 491-505. [13] P.K. Agarwal and M. Sharir, Red-blue intersection detection algorithms, with applications to motion planning and collision detection, SIAM J. Comput. 19 (2) (1990), 297-321. [14] N. Alon and J. Spencer, The Probabilistic Method, Wiley, New York, NY (1993). [15] P.K. Agarwal, M, Sharir and S. Toledo, Applications of parametric searching in geometric optimization, Proc. 3rd ACM-SIAM Sympos. Discrete Algorithms (1992), 72-82. [16] P.K. Agarwal, M. Sharir and S. Toledo, An efficient multidimensional searching technique and its applications. Tech. Report CS-1993-20, Department Computer Science, Duke University (1993), [17] I. Balaban, An optimal algorithm for finding segment intersections, Proc, 11th ACM Sympos, Comput, Geom. (1995), 211-219. [18] J. Beck and W. Chen, Irregularities of Distribution, Cambridge University Press (1987). [19] H. Bronnimann and B. Chazelle, Optimal slope selection via cuttings, Comput. Geom. 10 (1998), 23-29. [20] H. Bronnimann, B. Chazelle and J. Matousek, Product range spaces, sensitive sampling, and derandomization, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (1993), 400^09. Revised version is to appear in SIAM J. Comput. [21] H. Bronnimann and M. Goodrich, Almost optimal set covers infinite VC-dimension, Discrete Comput. Geom. 14 (1995), 463-484. [22] B. Berger and J. Rompel, Simulating {\ognY-wise independence in NC, J. ACM 38(4) (1991), 1028-1046, [23] B, Berger, J, Rompel and P,W. Shor, Efficient NC algorithms for set cover with applications to learning and geometry, J. Comput. Syst. Sci. 49 (1994), 454-477. [24] B. Chazelle and H. Edelsbrunner, An optimal algorithm for intersecting line segments in the plane, J, ACM 39 (1992), 1-54, [25] K, Clarkson, H, Edelsbrunner, L, Guibas, M, Sharir and E, Welzl, Combinatorial complexity bounds for arrangements of curves and spheres. Discrete Comput, Geom, 5 (1990), 99-160, [26] B, Chazelle, H, Edelsbrunner, L. Guibas, M. Sharir and J. Snoeyink, Computing a face in an arrangement of line segments and related problems, SIAM J. Comput. 22 (1993), 1286-1302. [27] B. Chazelle, H. Edelsbrunner, L. Guibas and M. Sharir, A singly-exponential stratification scheme for real semi-algebraic varieties and its applications, Proc. 16th Intemat. Colloq. Automata Lang. Program., Lecture Notes Comput, Sci, 372, Springer-Verlag (1989), 179-192, [28] B, Chazelle, H. Edelsbrunner, L.J, Guibas and M. Sharir, Lines in space: Combinatorics, algorithms, and applications, Proc. 21st Annu, ACM Sympos. Theory Comput. (1989), 382-393. [29] B. Chazelle, H. Edelsbrunner, L. Guibas and M. Sharir, Diameter, width, closest line pair and parametric searching. Discrete Comput. Geom. 10 (1993), 183-196. [30] K.L. Clarkson, D. Eppstein, G.L. Miller, C. Sturtivant and S.-H. Teng, Approximating center points with iterated Radon points, Intemat. J. Comput. Geom. Appl. 6 (1996), 357-377.
592
J. Matousek
[31] B. Chazelle and J. Friedman, A deterministic view of random sampling and its use in geometry, Combinatorica 10 (3) (1990), 229-249. [32] B. Chazelle, Cutting hyperplanes for divide-and-conquer. Discrete Comput. Geom. 9 (2) (1993), 145-158. [33] B. Chazelle, An optimal convex hull algorithm in any fixed dimension. Discrete Comput. Geom. 10 (1993), 377^09. [34] T.M. Chan, Fixed-dimensional linear programming queries made easy, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 284-290. [35] L.P. Chew, Building Voronoi diagrams for convex polygons in linear expected time. Technical Report PCS-TR90-147, Dept. Math. Comput. Sci., Dartmouth College, Hanover, NH (1986). [36] K.L. Clarkson, New applications of random sampling in computational geometry. Discrete Comput. Geom. 2 (1987), 195-222. [37] K.L. Clarkson, Applications of random sampling in computational geometry, II, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 1-11. [38] K.L. Clarkson, A randomized algorithm for closest-point queries, SIAM J. Comput. 17 (1988), 830-847. [39] K.L. Clarkson, Randomized geometric algorithms. Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds, Lecture Notes Series on Computing, Vol. 1, World Scientific, Singapore (1992), 117-162. [40] K.L. Clarkson, Las Vegas algorithms for linear and integer programming, J. ACM 42 (1995), 488^99. [41] E. Cohen and N. Megiddo, Strongly polynomial-time and NC algorithms for detecting cycles in dynamic graphs, J. ACM 40 (1993), 791-832. [42] B. Chazelle and J. Matousek, Derandomizing an output-sensitive convex hull algorithm in three dimensions, Comput. Geom. 5 (1994), 27-32. [43] B. Chazelle and J. Matousek, On linear-time deterministic algorithms for optimization problems infixed dimension, J. Algorithms 21 (1996), 116-132. [44] R. Cole, Slowing down sorting networks to obtain faster sorting algorithms, J. ACM 34 (1987), 200-208. [45] K.L. Clarkson and P.W. Shor, Algorithms for diametral pairs and convex hulls that are optimal, randomized, and incremental, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 12-17. [46] K.L. Clarkson and P.W. Shor, Applications of random sampling in computational geometry, II, Discrete Comput. Geom. 4 (1989), 387^21. [47] R. Cole, J. Salowe, W. Steiger and E. Szemeredi, An optimal-time algorithm for slope selection, SIAM J. Comput. 18 (1989), 792-810. [48] R. Cole, M. Sharir and C. Yap, On k-hulls and related problems, SIAM J. Comput. 16 (1) (1987), 61-67. [49] B. Chazelle and E. Welzl, Quasi-optimal range searching in spaces of finite VC-dimension, Discrete Comput. Geom. 4 (1989), 467^89. [50] M. de Berg, K. Dobrindt and O. Schwarzkopf, On lazy randomized incremental construction. Discrete Comput. Geom. 14 (1995), 261-286. [51] M.B. Dillencourt, D.M. Mount and N.S. Netanyahu, A randomized algorithm for slope selection. Internal. J. Comput. Geom. Appl. 2 (1992), 1-27. [52] M.E. Dyer, A class of convex programs with applications to computational geometry, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 9-15. [53] M. Dyer, A parallel algorithm for linear programming in fixed dimension, Proc. 11th ACM Symp. on Comput. Geom. (1995), 345-349. [54] H. Edelsbrunner, Algorithms in Combinatorial Geometry, EATCS Monographs on Theoretical Computer Science, Vol. 10, Springer-Verlag, Heidelberg, West Germany (1987). [55] G. Even, O. Goldreich, M. Luby, N. Nisan and B. Velikovic, Approximations of general independent distributions, Proc. 24th ACM Symp. on Theory of Computing (1992), 10-16. [56] R Erdos and J.L. Selfridge, On a combinatorial game, J. Comb. Theory Ser. A 14 (1973), 298-301. [57] M. Eisner and D. Severance, Mathematical techniques for efficient record segmentation in large shared database, J. ACM 23 (1976), 619-635. [58] M.T. Goodrich, Geometric partitioning made easier, even in parallel, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 73-82. [59] M. Goodrich, Fixed-dimensional parallel linear programming via relative €-approximations, Proc. 7th Annual ACM-SIAM Sympos. on Discrete Algorithms (1996), 132-141.
Derandomization
in computational
geometry
593
[60] L. Guibas and M. Shark, Combinatorics and algorithms of arrangements. New Trends in Discrete and Computational Geometry, J. Pach, ed., Algorithms and Combinatorics, Vol. 10, Springer-Verlag (1993), 9-36. [61] D. Gusfield, Parametric combinatorial computing and a problem ofprogram module distribution, J. ACM 30 (1983), 551-563. [62] J. Harris, Algebraic Geometry (A First Course), Springer-Verlag, Berlin (1992). [63] D. Haussler and E. Welzl, Epsilon-nets and simplex range queries. Discrete Comput. Geom. 2 (1987), 127-151. [64] A. Joffe, On a set of almost deterministic k-independent random variables, Ann. Probab. 2 (1974), 161162. [65] G. Kalai, A subexponential randomized simplex algorithm, Proc. 24th Annu. ACM Sympos. Theory Comput. (1992), 475^82. [66] R. Karp, An introduction to randomized algorithms. Discrete Appl. Math. 34 (1991), 165-201. [67] D. Karger and D. KoUer, (De)randomized construction of small sample spaces in J\fC, J. Comput. Syst. Sci. 55 (1997), 402-413. [68] H. Karloff and Y. Mansour, On construction ofk-wise independent random variables, Combinatorica 17 (1997), 91-107. [69] D. KoUer and N. Megiddo, Constructin small sample spaces satisfying given constraints, SIAM J. Discrete Math. 7 (1994), 260-274. [70] J. Komlos, J. Pach and G. Woeginger, Almost tight bounds for €-nets. Discrete Comput. Geom. 7 (1992), 163-173. [71] H. Karloff and P. Raghavan, Randomized algorithms and pseudorandom numbers, J. ACM 40 (3) (1993), 454-476. [72] M.J. Katz and M. Sharir, An expander-based approach to geometric optimization, SIAM J. Comput. 26 (1997), 1384-1408. [73] M.J. Katz and M. Sharir, Optimal slope selection via expanders. Inform. Process. Lett. 47 (1993), 115122. [74] R. Karp and M. Wigderson, A fast parallel algorithm for the maximum independent set problem, J. ACM 32 (1985), 762-773. [75] C.-Y. Lo, J. Matousek and W.L. Steiger, Algorithms for ham-sandwich cuts. Discrete Comput. Geom. 11 (1994), 433. [76] M. Luby, Removing randomness in parallel computation without processor penalty, J. Comput. Syst. Sci. 47 (1993), 250-286. [77] M. Luby and A. Wigderson, Pairwise independence and derandomization. Tech. Report UCB/ CSD95-880, Univ. of California at Berkeley (1995), Available electronically at h t t p : / / w w w . i c s i . b e r k e l e y . e d u / ' ^ l u b y / p a i r _ s u r . html. [78] J. Matousek, Construction ofe-nets. Discrete Comput. Geom. 5 (1990), 427^48. [79] J. Matousek, Cutting hyperplane arrangements. Discrete Comput. Geom. 6 (1991), 385^06. [80] J. Matousek, Randomized optimal algorithm for slope selection. Inform. Process. Lett. 39 (1991), 183187. [81] J. Matousek, Efficient partition trees. Discrete Comput. Geom. 8 (1992), 315-334. [82] J. Matousek, Reporting points in half spaces, Comput. Geom. 2 (3) (1992), 169-186. [83] J. Matousek, Linear optimization queries, J. Algorithms 14 (1993), AZl-AA^. [84] J. Matousek, Approximations and optimal geometric divide-and-conquer, J. Comput. and Syst. Sci. 50 (1995), 203-208. [85] J. Matousek, Geometric range searching, ACM Comput. Surveys 26 (1995), 4 2 1 ^ 6 1 . [86] N. Megiddo, Combinatorial optimization with rational objective functions. Math. Oper. Res. 4 (1979), 414-^24. [87] N. Megiddo, Applying parallel computation algorithms in the design of serial algorithms, J. ACM 30 (1983), 852-865. [88] N. Megiddo, Linear programming in linear time when the dimension is fixed, J. ACM 31 (1984), 114-127. [89] R. Motwani, J. Naor, and M. Naor, The probabilistic method yields deterministic parallel algorithms, J. Comput. Syst. Sci. 49 (1994), 478-516. [90] R. Motwani and P. Raghavan, Randomized Algorithms, Cambridge University Press (1995).
594
/. Matousek
[91] S. Mahajan, E.A. Ramos and K.V. Subrahmanyam, Solving some discrepancy problems in NC, Proc. Conf. Foundat. Softw. Technology and Theoret. Comput. Sci. (1997). [92] J. Matousek and O. Schwarzkopf, On ray shooting in convex polytopes. Discrete Comput. Geom. 10 (2) (1993), 215-232. [93] J. Matousek and O. Schwarzkopf, A deterministic algorithm for the three-dimensional diameter problem, Comput. Geom. 6 (1996), 253-262. [94] J. Matousek, R. Seidel and E. Welzl, How to net a lot with little: Small ^-nets for disks and half spaces, Proc. 6th Annu. ACM Sympos. Comput. Geom. (1990), 16-22. [95] J. Matousek, M. Sharir, and E. Welzl, A subexponential bound for linear programming, Algoritmica 16 (1996), 498-516. [96] K. Mulmuley, A fast planar partition algorithm, I, J. Symbolic Comput. 10 (1990), 253-280. [97] K. Mulmuley, A fast planar partition algorithm, II, J. ACM 38 (1991), 74^103. [98] K. Mulmuley, On levels in arrangements and Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 307338. [99] K. Mulmuley, Computational Geometry: An Introduction Through Randomized Algorithms, Prentice-Hall, Englewood Cliffs, NJ (1994). [100] K. Mulmuley, Randomized geometric algorithms and pseudo-random generators, Algorithmica 16 (1996), 450-463. [101] J. Matousek, E. Welzl and L. Wemisch, Discrepancy and e-approximations for bounded VC-dimension, Combinatorica 13 (1993), 455-466. [102] N. Nissan, Pseudorandom generators for space-bounded computation, Combinatorica 12 (1992), 449461. [103] J. Naor and M. Naor, Small-bias probability spaces: Efficient construction and applications, SIAM J. Comput. 22 (1993), 838-856. [104] C.H. Norton, S.A. Plotkin and E. Tardos, Using separation algorithms infixed dimensions, J. Algorithms 13 (1992), 79-98. [105] M. Pellegrini, On point location and motion planning among simplices, SIAM J. Comput. 25 (1996), 1061-1081. [106] P. Raghavan, Probabilistic construction of deterministic algorithms: Approximating packing integer programs, J. Comput. Syst. Sci. 37 (1988), 130-143. [107] E. Ramos, An algorithm for intersecting equal radius balls in R^, Tech. Report UIUCDS-R-94-1851, Dept. of Computer Science, Univ. of lUinois at Urbana-Champaign (1994). [108] E. Ramos, Private communication (1996). [109] E. Ramos, Unpubhshed note, Max-Planck Institut fiir Informatik, Saarbrucken (1997). [110] E. Ramos, Construction ofl-d lower envelopes and applications, Proc. 13th Ann. ACM Sympos. Comput. Geom. (1997). [ I l l ] J.T. Rompel, Techniques for computing with low-independence randomness, PhD thesis, Dept. of EECS, M.I.T. (1990). [112] M. Sharir and PK. Agarwal, Davenport-Schinzel Sequences and Their Geometric Applications, Cambridge University Press, Cambridge (1995). [113] R. Seidel, Constructing higher-dimensional convex hulls at logarithmic cost per face, Proc. 18th Annu. ACM Sympos. Theory Comput. (1986), 404^13. [114] R. Seidel, A simple and fast incremental randomized algorithm for computing trapezoidal decompositions andfor triangulating polygons, Comput. Geom. 1 (1991), 51-64. [115] R. Seidel, Small-dimensional linear programming and convex hulls made easy. Discrete Comput. Geom. 6 (1991), 423-^34. [116] R. Seidel, Backwards analysis of randomized geometric algorithms. New Trends in Discrete and Computational Geometry, J. Pach, ed.. Algorithms and Combinatorics, Vol. 10, Springer-Verlag (1993), 37-68. [117] J. Spencer, Ten Lectures on the Probabilistic Method, CBMS-NSF, SIAM (1987). [118] A. Srivastav, Derandomized algorithms in combinatorial optimization, Habilitation-Thesis, Institut fiir Informatik, Freie Universitat Berlin (1995). [119] J. Schmidt, A. Siegel and A. Srinivasan, Chemoff-Hoejfending bounds for applications with limited independence, SIAM J. Discrete Math. 8 (1995), 223-250.
Derandomization
in computational
geometry
595
[120] V.N. Vapnik and A.Ya. Chervonenkis, On the uniform convergence of relative frequencies of events to their probabilities. Theory Probab. Appl. 16 (1971), 264-280. [121] D.E. Willard, Polygon retrieval SIAM J. Comput. 11 (1982), 149-165. [122] A. Wigderson and D. Zuckerman, Expanders that beat the eigenvalue bound: Explicit construction and applications, Proc. 25th ACM Symposium on Theory of Computing (1993), 245-251. [123] A.C. Yao and F.F. Yao, A general approach to D-dimensional geometric queries, Proc. 17th Annu. ACM Sympos. Theory Comput. (1985), 163-168.
This Page Intentionally Left Blank
CHAPTER 14
Robustness and Precision Issues in Geometric Computation* Stefan Schirra Max-Planck-Institut fiir Informatik, Saarbrilcken, Germany
Contents 1. Introduction 1.1. Precision, correctness, and robustness 1.2. Attacks on the precision problem 2. Geometric computation 2.1. Geometric predicates 2.2. Arithmetic expressions in geometric predicates 2.3. Geometric computation with floating-point numbers 2.4. Heuristic epsilons 3. Exact geometric computation 3.1. Exact integer and rational arithmetic 3.2. Adaptive evaluation 3.3. Interval arithmetic 3.4. Exact sign of determinant 3.5. Certified epsilons 4. Geometric computation with imprecision 4.1. Representation and model approach 4.2. Epsilon geometry 4.3. Topology-oriented approach 4.4. Axiomatic approach 4.5. Tolerance-based approach 4.6. Further and more specific approaches 5. Related issues 5.1. Degeneracy 5.2. Inaccurate data 5.3. Rounding 5.4. Robustness in geometric algorithms libraries 6. Conclusion References .
599 599 601 601 602 602 603 605 606 607 610 612 612 613 615 616 618 619 620 620 622 623 623 624 625 625 626 627
*Work on this survey was partially supported by the ESPRIT IV Long Term Research Project No. 21957 (CGAL). HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
597
This Page Intentionally Left Blank
Robustness and precision issues in geometric computation
599
1. Introduction We give a survey^ on techniques that have been proposed and successfully used to attack robustness problems in the implementation of geometric algorithms. Our attention is directed to precision^, more precisely, on how to deal with the notorious problems that imprecise geometric calculations can cause in the implementation of geometric algorithms. Precision problems can make implementing geometric algorithms very unpleasant [36,37, 49,50,94], if no appropriate techniques are used to deal with imprecision.
1.1. Precision, correctness, and robustness Geometric algorithms are usually designed and proven to be correct in a computational model that assumes exact computation over the real numbers. In implementations of geometric algorithms, exact real arithmetic is mostly replaced by the fast finite precision floating-point arithmetic provided by the hardware of a computer system. For some problems and restricted sets of input data, this approach works well, but in many implementations the effects of squeezing the infinite set of real numbers into the finite set of floatingpoint numbers can cause catastrophic errors in practice. Due to rounding errors many implementations of geometric algorithms crash, loop forever, or in the best case, simply compute wrong results for some of the inputs for which they are supposed to work. Figure 1 gives an example. The conditionals in a program are most critical because they determine the flow of control. If in every test the same decision is made as if all computations would have been done over the reals, the algorithm is always in a state equivalent to that of its theoretical counterpart. In this case, the combinatorial part of the geometric output of the algorithm will be correct. Numerical data, however, computed by the algorithm might still be imprecise. In a branching step of a geometric algorithm, numerical values are compared. Without loss of generality we can assume that one of the values is zero, i.e. that the branching is on the sign of the value of an arithmetic expression. In the theoretical model of computation a real-valued expression is evaluated correctly for all real input data, but in practice only an approximation is computed. Thus a wrong sign might be computed and hence the algorithm might branch incorrectly. Such a wrong decision has been made in the computation of the "triangulation" shown in Figure 1. An incorrect result is one possible consequence of an incorrect decision. Program crashing is the other possibility. Decisions made in branching steps are usually not independent. Mutually contradicting decisions violating basic laws of geometry may take the algorithm to a state which could never be reached with correct decisions. Since the algorithm was not designed for such states, it crashes. Therefore s e g m e n t a t i o n f a u l t s and b u s e r r o r s are more likely than incorrect results. This survey is based on Precision and Robustness in Geometric Computations, Chapter 9 of Algorithmic Foundations of Geographic Information Systems, Lecture Notes in Comput. Sci. 1340, Springer-Verlag (1997). ^ The terms precision and accuracy are often used interchangeably. We mainly adopt the terminology used in [63]. Accuracy refers to the relationship between reality and the data representing it. Precision refers to the level of detail with which (numerical) data is represented.
600
S. Schirra
Fig. 1. Incorrect Delaunay triangulation. The error was caused by precision problems, see [130] for more details. The correct Delaunay triangulation is given in Figure 2. Courtesy ofJ.R. Shewchuk [130,132].
Fig. 2. Correct Delaunay triangulation. Courtesy ofJ.R. Shewchuk [130,132].
In general, robustness is a measure of the ability to recover from error conditions, e.g., tolerance of failures of internal components or errors in input data. Often an implementation of an algorithm is considered to be robust if it produces the correct result for some perturbation of the input. It is called stable if the perturbation is small. This terminology has been adopted from numerical analysis where backward error analysis is used to get bounds on the sizes of the perturbations. Geometric computation, however, goes beyond numerical computation. Since geometric problems involve not only numerical but also combinatorial data it is not always clear what perturbation of the input, especially of the combinatorial part, means. Perturbation of the input is justified by the fact that in many geometric problems the numerical data are real world data obtained by measuring and hence known to be inaccurate.
Robustness and precision issues in geometric computation
601
1.2. Attacks on the precision problem There are two obvious approaches for solving the precision problem. The first is to change the model of computation: design algorithms that can deal with imprecise computation. For a small number of basic problems this approach has been applied successfully but a general theory of how to design algorithms with imprecise primitives or how to adopt algorithms designed for exact computation with real numbers is still a distant goal [67]. The second approach is exact computation: compute with a precision that is sufficient to keep the theoretical correctness of an algorithm designed for real arithmetic alive. This is basically possible, at least theoretically, in almost all cases arising in practical geometric computing. The second approach is promising, because it allows exact implementations of numerous geometric algorithms developed for real arithmetic without modifications of these algorithms. However, exact computation slows down the computation and the overhead in running time can be tremendous, especially in cascaded computations, where the output of one computation is used as input by the next.
2. Geometric computation A geometric problem can be seen as a mapping from a set of permitted input data, consisting of a combinatorial and a numerical part, to a set of valid output data, again consisting of a combinatorial and a numerical part. A geometric algorithm solves a problem if it computes the output specified by the problem mapping for a given input. For some geometric problems the numerical data of the output are a subset of the data of the input. Those geometric problems are called selective. In other geometric problems new geometric objects are created which involve new numerical data that have to be computed from the input data. Such problems are called constructive. Geometric problems might have various facets, even basic geometric problems appear in different variants. We use two classical geometric problems for illustration, convex hull and intersection of line segments in two dimensions. In the two-dimensional convex hull problem the input is a set of points. The numerical part might consist of the coordinates of the input points; the combinatorial part is simply the assignment of the coordinate values to the points in the plane. The output might be the convex hull of the set of points, i.e., the smallest convex polygon containing all the input points. The combinatorial part of the output might be the sorted cyclic sequence of the points on the convex hull in counterclockwise order. The point coordinates form the numerical part of the output. In a variant of the problem only the extreme points among the input points have to be computed, where a point is called extreme if its deletion from the input set would change the convex hull. Note that the problem is selective according to our definition even if a convex polygon and hence a new geometric object is constructed. In the line segment intersection problem the intersections among a set of line segments are computed. The numerical input data are the coordinates of the segment endpoints, the combinatorial part of the input just pairs them together. The combinatorial part of the output might be a combinatorial embedding of a graph whose vertices are the endpoints of the segments and the points of intersection between the segments. Edges connect two
602
S. Schirra
vertices if they belong to the same Hne segment / and no other vertex Hes between them on /. Combinatorial embedding means that the set of edges incident to a vertex are given in cyclic order. The numerical part is formed by the coordinates of the points assigned to the vertices in the graph. Since the intersection points are in general not part of the input, the problem is constructive. A variant might ask only for all pairs of segments that have a point in common. This version is selective. 2.1. Geometric predicates Geometric primitives are the basic operations in geometric algorithms. There is a fairly small set of such basic operations that cover most of the computations in computational geometry algorithms. Geometric primitives subsume predicates and constructions of basic geometric objects, like line segments or circles. Geometric predicates test properties of basic geometric objects. They are used in conditional tests that direct the control flow in geometric algorithms. Well-known examples are: testing whether two line segments intersect, testing whether a sequence of points defines a right turn, or testing whether a point is inside or on the circle defined by three other points. Geometric predicates involve the comparison of numbers which are given by arithmetic expressions. The operands of the expressions are numerical data of the geometric objects that are tested and constants, usually integers. Expressions differ by the operations used, but many geometric predicates involve arithmetic expressions over +, —, * only, or can at least be reformulated in such a way. 2.2. Arithmetic expressions in geometric predicates One can think of an arithmetic expression as a labeled binary tree. Each inner node is labeled with a binary or unary operation. It has pointers to trees defining its operands. The pointers are ordered corresponding to the order of the operands. The leaves are labeled with constants or variables which are placeholders for numerical input values. Such a representation is called an expression tree. The numerical data that form the operands in an expression evaluated in a geometric predicate in the execution of a a geometric algorithm might be again defined by previously evaluated expressions. Tracing these expressions backwards we finally get expressions on numerical input data whose values for concrete problem instances have to be compared in the predicates. Since intermediate results are used in several places in an expression we get a directed acyclic graph (dag) rather than a tree. Without loss of generality we may assume that the comparison of numerical values in predicates is a comparison of the value of some arithmetic expression with zero. The depth of an expression tree is the length of the longest root-to-leaf path in the tree. For many geometric problems the depth of the expressions appearing in the predicates is bounded by some constant [151]. Expressions over input variables involving operations +, —, * only are called polynomial, because they define multivariate polynomials in the variables. If all constants in the expression are integral, a polynomial expression is called integral. The degree of a polynomial expression is the total degree of the resulting multivariate polynomial.
Robustness and precision issues in geometric computation
603
In [19,91] the notion of the degree of an expression is extended to expressions involving square roots. An expression involving operations + , — , • , / only is called rational. 2.3. Geometric computation with floating-point numbers Floating-point numbers are the standard substitution for real numbers in scientific computation. In some programming languages the floating-point number type is even called r e a l [81]. Since most geometric computations are executed with floating-point arithmetic, it is worth taking a closer look at floating-point computation. Goldberg [62] gives an excellent overview. A finite-precision floating-point system has a base B, a fixed mantissa length / (also called significant length or precision), and an exponent range [Cmin — ^max]±do.did2'--di-\
*B^,
0 ^di < B, represents the number ±(do -h Ji • B-^ + ^2 • B~^ + • • • -h J/-iB-^+^) . B^ A representation of a floating-point number is called normalized iff JQ 7^ 0. For example, the rational number 1/2 has representations 0.500 * 10^ or 5.000 * 10~^ in a floating-point system with base 10 and mantissa length 4 and normalized representation 1.00 * 2~^ in a floating-point system with base 2 and mantissa length 3. Since an infinite set of numbers is represented by finitely many floating-point numbers, rounding errors occur. A real number is called representable if it is zero or its absolute value is in the interval [B^^^i" ^ gemax+i j L^^ ^ 13^ some real number and fr be a floating-point representation for r. Then |r — /^ | is called absolute error and |r — /^ |/|r | is called relative error. The relative error of rounding a representable real toward the nearest floating-point number in a floating-point system with base B and mantissa length / is bounded by y • B"~^ which is called machine epsilon. Calculations can underflow or overflow, i.e., leave the range of representable numbers. Fortunately, the times where the results of floating-point computations could drastically differ from one machine to another, depending on the precision of the floating-point machinery, seem to be coming to an end. The IEEE standard 754 for binary floating-point computation [133] is becoming widely accepted by hardware-manufacturers. The IEEE standard 754 requires that the results of +,—,-, / and r are exactly rounded, i.e., the result is the exact result rounded according to the chosen rounding mode. The default rounding mode is round to nearest. Ties in round to nearest are broken such that the least significant bit becomes 0. Besides rounding toward nearest, rounding toward zero, rounding toward 00, and rounding toward —00 are rounding modes that have to be supported according to IEEE standard 754. The standard makes reasoning about correctness of a floating-point computation machine-independent. The result of the basic operations will be the same on different machines if both support IEEE standard and the same precision is used. Thereby code becomes portable.
604
S, Schirra
The IEEE standard 754 specifies floating-point computation in single, single extended, double, and double extended precision. Single precision is specified for a 32 bit word, double precision for two consecutive 32 bit words. In single precision the mantissa length is / = 24 and the exponent range is [—126.. 127]. Double precision has mantissa length / = 53 and exponent range [—1022.. 1023]. Hence the relative errors are bounded by 2~^^ and 2~^^. The single and double precision formats usually correspond to the number types f l o a t and d o u b l e in C+ + . Floating-point numbers are represented in normalized representation. Since the zeroth bit is always 1 in normalized representation with base 2, it is not stored. There are exceptions to this rule. Denormalized numbers are added to let the floating-point numbers underflow nicely and preserve the property ''x — y = 0 iff x = y'\ Zero and the denormalized numbers are represented with exponent Cmin — 1 • Besides these floating-point numbers there are special quantities +oo, —oo and NaN (Not a Number) to handle exceptional situations. For example —1.0/0.0 = —oo, NaN is the result of ^ / ^ , and oc is the result of overflow in positive range. Due to the unavoidable rounding errors, floating-point arithmetic is inherently imprecise. Basic laws of arithmetic like associativity and distributivity are not satisfied by floatingpoint arithmetic. Section 13.2 in [108] gives some examples. Since the standard (almost) fixes the layout of bits for mantissa and exponent in the representation of floating-point numbers, bit-operations can be used to extract information. Naively applied floating-point arithmetic can set axioms of geometry out of order. A classical example is Ramshaw's braided lines (see Figure 3 and [108,109]). Rewriting an expression to get a numerically more stable evaluation order can already help a lot: Goldberg [62] gives the following example due to Kahan. Consider a triangle with sides of length a^b^c respectively. The area of a such a triangle is ^s{s — a){s — b){s — c), where s = {a -\-b -\- c)/2. For a = 9.0, b = c = 4.53 the correct value of 5 in a floatingpoint system with base 10, mantissa length 3 and exact rounding is 9.03 while the computed value s is 9.05. The area is 2.34, the computed area, however, is 3.04, an error of nearly 30%. Using the expression y/(a + (b-\-c)) -(c-(a-
b)) • {c + {a-b))
• {a +
{b-c))/A
one gets 2.35, an error of less than 1%. For a less needle-like triangle with a = 6.9, b = 3.68, and c = 3.48 the improvement is not so drastic. Using the first expression, the result computed by a floating-point system with base 10, mantissa length 3 and exact rounding is 3.36. The second expression gives 3.3. The exact area is approximately 3.11. One can show that the relative error of the second expression is at most 11 times machine epsilon [62]. Rewriting also helps with the braided lines. If the abscissae are computed as (4.3/8.3) • x and (1.4/2.7) • x, there is no braiding anymore. The lines still do have more than one point in common, but besides the crossing at the origin there are no further crossings anymore.
Robustness and precision issues in geometric
605
computation
—
4.3x/83
„.,J
J
.38 .37 -
J" _J
\ Axil J
I .89
Fig. 3. Evaluation of the line equations y = A3 • x/8.3 and y = IA • x/2.1 in a floating-point system with base 10 and mantissa length 2 and rounding to nearest suggests that the lines have several intersection points besides the true intersection point at the origin.
As the examples above show, the way a numerical value is computed influences its precision. Summation of floating-point numbers is another classical example for such effects. Rearranging the summands can help to reduce imprecision due to extinction. 2.4. Heuristic epsilons A widely used method to deal with numerical inaccuracies is based on the rule of thumb If something is close to zero it is zero. Some trigger-value ^magic is added to a conditional test where a numerical value is compared to zero. If the absolute value of the computed approximation is smaller than emagic it is treated as zero. Adding such epsilons is popular folklore. What should the ^magic be? In practice, ^magic is usually chosen as some fixed tiny constant and hence not sensitive to the actual sizes of the operands in a concrete expression. Furthermore, the same epsilon is often taken for all comparisons, no matter which expression or which predicate is being evaluated. Usually, no proof is given that the chosen 6:inagic makes sense, ^magic is guessed and adjusted by trial and error until the current value works for the considered inputs, i.e., until no catastrophic errors occur anymore. Yap [150] suggests calling this procedure epsilon-tweaking. Adding epsilon is justified by the following reasoning: If something is so close to zero, then a small modification of the input, i.e., a perturbation of the numerical data by a small
606
S. Schirra
Fig. 4. A locally straight line.
amount, would lead to value zero in the evaluated expression. There are, however, severe problems with that reasoning. The size of the perturbation causes a problem. The justification for adding epsilons assumes that the perturbation of the (numerical) input is small. Even if such a small perturbation exists for each predicate, the existence of a global small perturbation of the input data is not guaranteed. Figure 4 shows a polyline, where every three consecutive vertices are colinear under the "close to zero is zero" rule. In each case, a fairly small perturbation of the points exists that makes them colinear. There is, however, no small perturbation that makes the whole polyline straight. The example indicates that colinearity is not transitive. Generally, equality is not transitive under epsilon-tweaking. This might be the most serious problem with this approach. Another problem is that different tests might require different perturbations, e.g., predicate Pi might require a larger value for input variable JC56 while test P2 requires a smaller value, such that both expressions evaluate to zero. There might be no perturbation of the input data that leads to the decisions made by the "close to zero is zero" rule. Finally, a result computed with "close to zero is zero" is not the exact result for the input data but only for a perturbation of it. For some geometric problems this might cause trouble, since the computed output and the exact output can be combinatorially very different [22].
3. Exact geometric computation An obvious approach to the precision problem is to compute "exactly". In this approach the computation model over the reals is mimicked in order to preserve the theoretical correctness proof. Exact computation means to ensure that all decisions made by the algorithm are correct decisions for the actual input, not only for some perturbation of it. As we shall see, it does not mean that in all calculations exact representations for all numerical values have to be computed. Approximations that are sufficiently close to the exact value can often be used to guarantee the correctness of a decision. Empirically it turns out to be true for most of the decisions made by a geometric algorithm that approximations are sufficient. Only degenerate and nearly degenerate situations cause problems. That is why most implementations based on floating-point numbers work very well for the majority of the considered problem instances and fail only occasionally. This is made possible by the fact that the numerical input data for geometric algorithms are hardly arbitrary real numbers. In almost all cases the numerical input data are rationals given as floating-point numbers or even integers. If an implementation of an algorithm does all branchings the same way as its theoretical counterpart, the control flow in the implementation corresponds to the control flow of the algorithm proved to be correct under the assumption of exact computation over the reals.
Robustness and precision issues in geometric computation
607
and hence the vaHdity of the combinatorial part of the computed output follows. Thus, for selective geometric problems, it is sufficient to guarantee correct decisions, since all numerical data are already part of the input. For constructive geometric problems, new numerical data have to be computed "exactly". A representation of a real number r should be called exact only if it allows one to compute an approximation of r to whatever precision, i.e. no information has been lost. According to Yap [150] a representation of a subset of the reals is exact if it allows the exact comparison of any two real numbers in that representation. This reflects the necessity for correct comparisons in branchings steps in the exact geometric computation approach. Examples of exact representations are the representation of rationals by numerator and denominator, where both are arbitrary precision integers, and the representation of algebraic numbers by an integral polynomial P having root a and an interval that isolates a from the other roots of P. Further examples are symbolic and implicit representations. For example, rather than compute the coordinates of an intersection point of line segments explicitly, one can represent them implicitly by maintaining the intersecting segments. Another similar example is the representation of a number by an expression dag, which reflects the computation history. Allowing symbolic or implicit representation can be seen as turning a constructive geometric problem into a selective one. As suggested in the discussion above, there are different flavors of exact geometric computation. In the last decade, much progress has been made in improving the efficiency of exact geometric computation (see also [151] and [150] for an overview).
3.1. Exact integer and rational arithmetic A number of geometric predicates in basic geometric problems include only integral expressions in their tests. Thus, if all numerical input data are integers, the evaluation of these predicates involves integers only. With the integer arithmetic provided by the hardware only overflow may occur, but no rounding errors. The problem with overflow in integral computation is abolished if arbitrary precision integer arithmetic is used. There are several software packages for arbitrary or multiple precision integers, e.g., BigNum [129], GNU MP [65], LiDIA [90], or the number type i n t e g e r in LEDA [95,96]. Fortune and van Wyk [57,58] report on experiments with such packages. Since the integral input data are usually bounded in size, e.g., by the maximal representable i n t , there is not really a need for arbitrary precision integers. Multiple precision integer arithmetic with a fixed precision adjusted to the maximum possible integer size in the input and the degree of the integral polynomial expression arising in the computation is adequate. If the input integers have binary representation with at most b-bits, then an integer arithmetic for integers with db + logm + 0(1) bits suffices to evaluate an integral polynomial expression with m monomials of degree at most d, where we assume that the coefficients of the monomials are bounded by a constant. If v is the number of numerical input data involved in a polynomial expression, then m is bounded by (f + 1)*^. The degree of polynomial expressions in geometric predicates has recently gained attention as an additional measure of algorithmic complexity in the design of geometric algorithms. Liotta et al. [91] investigate the degree involved in some proximity problems in 2-
608
S. Schirra
and 3-dimensional space, Boissonnat and Preparata [15] investigate the degree involved in line segment intersection. Many predicates include only expressions involving operations + , — , • , / . In most of the problems discussed in textbooks on computational geometry [16,31,40,85,88,92,107, 112,117] all predicates are of this type. Such problems are called rational [151]. A rational number can be exactly stored as a pair of arbitrary precision integers representing numerator and denominator respectively. Let us call this exact rational arithmetic. The intermediate values computed in rational problems are often solutions to systems of linear equations Uke the coordinates of the intersection point of two straight lines. Division can be avoided in rational predicates, e.g., exact rational arithmetic postpones division. With exact rational arithmetic, numerator and denominator of the result of the evaluation of a rational expression are integral polynomial expressions in the numerators and denominators of the rational operands. A sign test for a rational expression can be done by two sign tests for integral polynomial expressions. Hence rational expressions in conditional tests in geometric predicates can be replaced by tests involving integral polynomial expressions. Homogeneous coordinates known from projective geometry and computer graphics can be used to avoid division, too. In homogeneous representation, a point in J-dimensional affine space with Cartesian coordinates (JCQ, JCi,..., jc^_i) is represented by a vector {hxQ, hx\,..., hxd-\, hxd) such that JC, = hxi/hxd for all 0 ^ / ^ ^ — 1. Note that the homogeneous representation of a point is not unique; multiplication of the homogeneous representation vector with any X^O gives a representation of the same point. The homogenizing coordinate hxd is a common denominator of the coordinates. For example, homogeneous representation allows division-free representation of the intersection point of two straight lines given bya'X-\-b'Y — c = 0 and d-X-\-e-Y -\- f = 0. The intersection point can be represented by homogeneous coordinates {b-f — c-e.a-f — c-d^a-e — b-d). A test including rational expressions in Cartesian coordinates transforms into a test including only polynomial expressions in homogeneous coordinates after multiplication with an appropriate product of homogenizing coordinates. Since all monomials appearing in the resulting expressions have the same degree in the homogeneous coordinates, the resulting polynomial is a homogeneous polynomial. For example, the test "a • JCQ + ^ • xi +c = 0?", which tests whether point (xo, xi) is on the line given by the equation a'X-\-b'Y -\-c = 0, transforms into "a • hxo -\-b - hx\ + c • hx2 = 0?". Many geometric predicates that do not obviously involve only integral polynomial expressions can be rewritten so that they do. Above, we have illustrated this for rational problems. Even sign tests for expressions involving square roots can be turned into a sequence of sign tests of polynomial expressions by repeated squaring [21,91]. Therefore, multiple or arbitrary precision integer arithmetic is a powerful tool for exact geometric computation, but such integer arithmetic has to be supplied by software and is therefore much slower than the hardware-supported integer arithmetic. The actual cost of an operation on arbitrary precision integers depends on the size of the operands, more precisely on the length of their binary representation. If expressions of large depth are involved in the geometric calculations the size of the operands can increase drastically. In the literature huge slow down factors are reported if floating-point arithmetic is simply replaced by exact
Robustness and precision issues in geometric computation
609
rational arithmetic. Karasick, Lieber, and Nackman [84] report slow-down factors of about 10000. While in most rational problems the depth of the involved rational expressions is a small constant, there are problems where the size of the numbers has a linear dependence on the problem size. An example is computing minimum link paths inside simple polygons [82]. Numerator and denominator of the knick-points on a minimum link path can have superquadratic bitlength with respect to the number of polygon vertices [82]. This is by the way a good example of how strange the assumption of constant time arithmetic operations in theory may be in practice. Fortune and van Wyk [57,58] noticed that in geometric computations the sizes of the integers are small to medium compared to those arising in computer algebra and number theory. Multiple precision integer packages are mainly used in these areas and hence tuned for good performance with larger integers. Consequently Fortune and van Wyk developed LN [56], a system that generates efficient code for integer arithmetic with fairly "little" numbers. LN takes an expression and a bound on the size of the integral operands as input. The generated code is very efficient if all operands are of the same order of magnitude as the bound. For much smaller operands the generated code is clearly not optimal. LN can be used to trim integer arithmetic in an implementation of a geometric algorithm for special applications. On the other hand, LN is not useful for generating general code. Chang and Milenkovic report on the use of LN in [27]. For integral polynomial expressions, modular arithmetic [2,86] is an alternative to arbitrary precision integer arithmetic. Let /?o, Pi, • • •, py^-i be a set of integers that are pairwise relatively prime and let p be the product of the pt. By the Chinese remainder theorem there is a one-to-one correspondence between the integers r with —LfJ ^ ^ < Ffl and the ktuples (ro, r i , . . . , rk-\) with — [^ J ^ri < [^"1. By the integer analog of the Lagrangian interpolation formula for polynomials [2], we have k-i
r = 2_^riSiqi modp, i=0
where r/ = r mod pt, qt = p/ Pi, and st = qf mod pi. Note that si exists because of the relative primality and can be computed with an extended Euclidean gcd algorithm [86]. To evaluate an expression, a set of relatively prime integers is chosen such that the product of the primes is at least twice the absolute value of the integral value of the expression. Then the expression is evaluated modulo each pt. Finally Chinese remaindering is used to reconstruct the value of the expression. Modular arithmetic is frequently used in number theory, but not much is known about its application to exact geometric computation. Fortune and van Wyk [57,58] compared modular arithmetic with multiple precision integers provided by software packages for a few basic geometric problems without observing much of a difference in the performance. Recently, however, Bronnimann et al. reported on promising results concerning the use of modular arithmetic in combination with single precision floating-point arithmetic for sign evaluation of determinants [17] and Emiris reported on the use of modular arithmetic in the computation of general dimensional convex hulls [42].
610
5. Schirra
Modular arithmetic is particularly useful if intermediate results can be very large, but the final result is known to be relatively small. The drawback is that a good bound on the size of the final result must be known in order to choose sufficiently many relatively prime integers, but not too many.
3.2. Adaptive evaluation Replacing exact arithmetic, on which the correctness of a geometric algorithm is based, by imprecise finite-precision arithmetic usually works in practice for many of the given input data and fails only occasionally. Thus always computing exact values would put a burden on the algorithm that is rarely really needed. Adaptive evaluation is guided by the rule Why compute something that is never used, so why compute numbers to high precision, before you know that this precision is actually needed. The simplest form of adaptive evaluation is di floating-point filter. The idea of floatingpoint filters is to filter out those computations where floating-point computation gives the correct result. This technique has been successfully used in exact geometric computation [34,57,58,84,93,94]. Floating-point filters make use of the fast hardware-supported floating-point arithmetic. A filter simply takes a bound on the error of the floating-point computation and compares the absolute value of the computed numerical value to the error bound. If the error bound is smaller, the computed approximation and the exact value have the same sign. Only if it is not certified by the error bound that the floating-point evaluation has led to a correct decision, the expression considered in the branching step is reevaluated, for instance, with exact arithmetic. Error bounds can be computed a priori if specific information on the input data is available, e.g., if all input data are integers from a bounded range, for instance, the range of integers representable in a computer word. Such so-called static filters require only little additional effort at run time, just one additional test per branching, plus the refined reevaluation in the worst case. Dynamic filters compute an error bound on the fly parallel to the evaluation in floating-point arithmetic. Since they take the actual values of the operands into account and not only bounds derived from the bounds on the input data, the estimates for the error involved in the floating-point computation can be much tighter than in a static filter. In the error computation one can put emphasis on speed or on precision. The former makes arithmetic operations more efficient while the latter lets more floating-point computations pass a test. Semi-dynamic filters partially precompute the error bound a priori. Mehlhom and Naher [93] use such semi-dynamic filters in their implementation of the Bentley-Ottmann plane sweep algorithm [13] for computing the intersections among a set of line segments in the plane. Note the difference between static filters and heuristic epsilons. In both cases approximations to a numerical values are compared to some small values. If the computed approximation is larger than the error bound or ^magic, respectively, the behavior is identical. The
Robustness and precision issues in geometric computation
611
program continues based on the (in the former case verified) assumption that the computed floating-point value has the correct sign. If, however, the computed approximate value is too small, the behavior is completely different. Epsilon-tweaking assumes that the actual value is zero, which might be wrong, while a floating-point filter invokes a more expensive computation finally leading to a correct decision. Using only error bounds, a floating-point filter rarely works for expressions whose value is actually zero, because both the computed approximation and the error bound have to be zero to certify sign zero. To detect sign zero, one can use "certified epsilons" described in Section 3.5, or use a special procedure to test an expression for zero, e.g. [14], or one might use exact arithmetic. If a filter fails, a refined filter can be used. A refined filter might compute a tighter error bound or use a floating-point arithmetic with larger mantissa and thereby get better approximations and smaller error bounds. This step can be iterated. Composition of more and more refined filters leads to an adaptive evaluation scheme. Such schemes are called adaptive, because they adapt the used precision to the size of the value of the expression to be evaluated. For orientation predicates and encircle tests in two- and three-dimensional space Shewchuk [130,131] presents such an adaptive evaluation scheme. It uses an exact-^ representation of values resulting from expressions over floating-point numbers involving only additions, subtractions, and multiplications as a symbolic sum of floating-point numbers. Computation with numbers in this representation, called expanded doubles in [130], is based on the interesting results of Priest [118,119] and Dekker [33] on extending the precision of floating-point computation. An adapted combination of these techniques allows one to reuse values computed in previous filtering steps in later filtering steps. For integral expressions scalar products delivering exactly rounded results can be used in floating-point filters to get best possible floating-point approximations. Ottmann et al. [113] first used exactly rounding scalar products to solve precision problems in geometric computation. Number representations supporting recomputation with higher precision are very useful for adaptive evaluation. The LEA^ system [12] provides "lazy evaluation" for rational computation. In this system, numbers are represented by intervals and expression dags that reflect their creation history. Initially only a low precision representation is calculated using interval arithmetic, cf. Section 3.3. Only if decisions can't be made with the current precision, repeatedly representations with increased precision are computed by redoing the computation along the expression dag with refined intervals for the operands. If the interval representation can't be refined anymore with floating-point evaluation, exact rational arithmetic is used to solve the decision problem. Another approach based on expression dags is described by Yap and Dube [39,150,151]. In this approach the precision used to evaluate the operands is not systematically increased, but the increase is demanded by the intended increase in the precision of the result. The data type r e a l in LEDA [23] stores the creation history in expression dags, too, and uses floating-point approximations and errors bounds as first approximations. The strategy of ^ If neither underflow nor overflow occurs. "^ LEA [12] should not to be confused with LEDA [95,96].
612
S. Schirra
repeatedly increasing the precision is similar to [39,150,151 ]. In both approaches softwarebased multiple precision floating-point arithmetic with a mantissa length that can be arbitrarily chosen and an unbounded exponent is used to compute representations with higher precision. Furthermore, both approaches include square root operations besides + , — , • , / . The r e a l s now provide k-\h root operations as well [96].
3.3. Interval arithmetic Approximation and error bound define an interval that contains the exact value. Interval arithmetic [3,104,105] is another method to get an interval with this property. In interval arithmetic real numbers are represented by intervals, whose endpoints are floating-point numbers. The interval representing the result of an operation is computed by floating-point operations on the endpoints of the intervals representing the operands. For example, the lower endpoint of the interval representing the result of an addition is the sum of the lower endpoints of the intervals of the summands. Since this floating-point addition might be inexact, either the rounding mode is changed to rounding toward — oo before addition or a correction term is subtracted. For interval arithmetic, rounding modes toward oc and toward —oc are very useful. See, for example, [106,137] for applications of interval methods to geometric computing. The combination of exact rational arithmetic with interval arithmetic based on fast floating-point computation has been pioneered by Karasick, Lieber and Nackman [84] to geometric computing. A refinement of standard interval arithmetic is the so-called affine arithmetic proposed by Comba and Stolfi [30]. While standard interval arithmetic assumes that the unknown values of operands and subexpressions can vary independently, affine arithmetic keeps track of first-order dependencies and takes these into account. Thereby error explosion can often be avoided and tighter bounds on the computed quantities can be achieved. An extreme example is computing x —x where for x some interval [jc./o, x.hi] is given. Standard interval arithmetic would compute the interval [x.lo — x.hi, x.hi — x./o], while affine arithmetic gives the true range [0,0].
3.4. Exact sign of determinant Many geometric primitives can be formulated as sign computations of determinants. The classical example of such a primitive is the orientation test, which in two-dimensional space determines whether a given sequence of three points is a clockwise or a counterclockwise turn or whether they are colinear. Another example is the encircle test used in the construction of Voronoi diagrams of points. Recently some effort has been focused on exact sign determination. Clarkson [29] gives an algorithm to evaluate the sign of a determinant of a d x d matrix with integer entries using floating-point arithmetic. His algorithm is a variant of the modified Graham-Schmidt orthogonalization. In his variant, scaling is used to improve the conditioning of the matrix. Since only positive scaling factors are used, the sign of the determinant does not change. Clarkson shows that only b + 0(d) bits are required, if all entries are Z^-bit integers. Hence,
Robustness and precision issues in geometric computation
613
for small dimensional matrices his algorithm can be used to evaluate the sign of the determinant with fast hardware floating-point arithmetic. Avnaim et al. [5] consider determinants of small matrices with integer entries, too. They present algorithms to compute the sign of 2 x 2 and 3 x 3 matrices with ^-bit integer entries using precision b and b -\-\ only, respectively. Bronnimann and Yvinec [18] extend the method of [5] to J x J matrices and present a variant of Clarkson's method. The new version of Clarkson's method allows for a simplified analysis. Furthermore, Shewchuk's work on adaptive evaluation [131] is focused on predicates evaluated by sign of determinant computation. We already mentioned the use of modular arithmetic combined with floating-point arithmetic to compute the sign of determinants of integer matrices [17].
3.5. Certified epsilons While the order of two different numbers can be found by computing sufficiently close approximations, it is not so straightforward to determine whether two numbers are equal or, equivalently, whether the value of an expression is zero. From a theoretical point of view arithmetic expressions arising in geometric predicates are expressions over the reals. Hence the value of an expression can in general get arbitrarily close to zero if the variable operands are replaced by arbitrary real numbers. In practice the numerical input data originate from a finite, discrete subset of the reals, namely a finite subset of the integers or a finite set of floating-point numbers, i.e., a finite subset of the rational numbers. The finiteness of such input excludes arbitrarily small absolute non-zero values for expressions of bounded depth. There is a gap between zero and other values that a parameterized expression can take on. A separation bound for an arithmetic expression £ is a lower bound on the size of this gap. Besides the finiteness of the number of possible numerical inputs, the coarseness of the input data can generate a gap between zero and other values taken on. A straightforward example is integral expressions. If all operands are integers the number 1 is clearly a separation bound. Once a separation bound is available it is clear how to decide whether the value of an expression is zero or not. Representations with repeatedly increased precision are computed until either the error bound on the current approximation is less than the absolute value of the approximation or their sum is less than the separation bound. In the phrasing of interval arithmetic, it means to refine the interval until neither zero nor the separation bound nor its negative are contained in the interval. How can we get separation bounds without computing the exact value or an approximation and an error bound? Most geometric computations are on linear objects and involve only basic arithmetic operations over the rational numbers. In distance computations and operations on nonlinear objects like circles and parabolas, square root operations are used as well. For the rational numerical input data arising in practice, expressions over the operations + , — , • , / , / " take on only algebraic values. Let E be an expression involving square roots. Furthermore we assume that all operands are integers. We use a{E) to denote the algebraic value of expression E. Computer algebra provides bounds for the size of the roots of polynomials with integral coefficients. These bounds involve quantities used to describe the complexity of an integral polynomial, e.g..
614
S. Schirra Table 1 Automatic computation of separation bounds for expressions involving square roots based on the measure of a polynomial
Integers
M(E) \n\
desJE) 1
Ei-\-E2
2'^^SiE0deg{E2)M(^E^^deg(E2)M(E2)'^'^^^^^
deg{Ex)
Ex - E2
2d^S^E\)deg{E2)M{Ex)'^'S^^2)M{E2)'^'^^^^^
deg{Ex) - deg{E2)
• deg{E2)
Ex . E2
M(£I)^^^^^2)M(£2)'^^^^^'^
deg(Ei)-deg(E2)
Ex/E2 4E[
M(£I)^^^(^2)M(£:2)'^''^^^'^ M{E\)
deg(Ei)deg(E2) 2deg{Ex)
degree, maximum coefficient size, or less well-known quantities like height or measure of a polynomial. Once an integral polynomial with root a{E) is known the root bounds from computer algebra give us separation bounds. In general, however, we don't have a polynomial having root a{E) at hand. Fortunately, all we need to apply the root bounds are bounds on the quantities involved in the root bounds. Upper bounds on these quantities for some polynomial having root «(£) can be derived automatically from an expression E. Recursive formulas leading to separation bounds for an expression involving square root operations are given in [ 151 ]. The formulas deliver a bound on the maximum absolute value of the coefficients of an integral polynomial having root a{E). By a result of Cauchy, this gives a separation bound. In [151], this bound is called height-degree bound. Mignotte discusses identification of algebraic numbers given by expressions involving square roots in [97]. The measure of a polynomial [98] can also be used for automatic computation of a root bound. Table 1 gives the rules for (over)estimating measure and degree of an integral polynomial having root Of(£). WehaveaCf") = 0 o r \ot{E)\ ^ M(£')~^This bound, called degree-measure bound, is never worse than the height-degree bound. In [24] Canny considers isolated solutions of systems of polynomial equations in several variables with integral coefficients. He gives bounds on the absolute values of the non-zero components of an isolated solution vector. The bound depends on the number of variables, the maximum total degree d of the multivariate integral polynomials in the system and their maximum coefficient size c. Canny shows that the absolute value of a component of an isolated solution of a system of n integral polynomial equations in n variables is either zero or at least (3dc)~"^ [24,25]. Although Canny solves a much more general problem, his bounds can be used to get fairly good separation bounds for expressions involving square roots, cf. [20]. Bumikel et al. [20] have shown that
a(E) ^
{uiEf""'''''''liE)y\
where k(E) is the number of (distinct) square root operations in E and the quantities u(E) and 1(E) are defined as given in Table 2. Note that M(^) and 1(E) are simply the numerator and denominator of an expression obtained by replacing in E all — by + and all integers by their absolute value. If E is division-free and a (E) is non-zero, then a (E) > u (E) ^ ~^ It is shown in [20] that this bound is never worse than the degree-measure bound and the polynomial system bound for division-free expressions.
Robustness and precision issues in geometric computation
615
Table 2 Recursive formulas for quantities u{E) and 1{E) of an arithmetic expression involving square roots
Integers Ex +E2 Ex -E2 Ex £2 Ex/E2
Mm
iiEi_
\n\
u{Ex)-l{E2) uiEx)-l(E2) u(Ex)-u(E2) u{Ex)-l{E2)
1
+ l{Ex)-u{E2) + l(Ex)-u(E2)
l{Ex)-liE2) l(Ex)-l(E2) l{Ex)-l{E2) l(Ex)-u(E2)
The bound given in [20] as well as the bound given in [151] involve square root operations. Hence they are not easily computable. In practice one computes ceilings of the results to get integers [151] or maintains integer bounds logarithmically [20,23]. The number type r e a l [23,96] in LEDA and the Real/Expr-package [38,114] provide exact computation (in C++) for expressions with operations +, —, •, / and f and initially integral operands, using techniques described above. In particular, the recent version of the r e a l s in LEDA [96] uses the bounds given in [20]. Note the difference between separation bounds and ^magicS in epsilon tweaking. In epsilon-tweaking a test for zero is replaced by the test ''\E\ < 6^magic?"- ^Vith Separation bounds it becomes "l^"! < sep(E) — £'error?" where sep(E) is a separation bound and £^error is a bound on the error accumulated in the evaluation of E. The difference is that the latter term is self-adjusting, it is based on an error bound, and justified; it is guaranteed that the result is zero, if the condition is satisfied. While 6:magic is always positive, it might happen that the accumulated error is so large that sep(E) — £^error is negative. Last but not least, the conclusion is different if the test is not satisfied. Epsilon-tweaking concludes that the number is non-zero if it is larger than ^magic while the use of separation bounds allows for this conclusion only if l^"! ^ £^error-
4. Geometric computation with imprecision In this section we look at the design and implementation of geometric algorithms with imprecision calculations. With potentially imprecise computations we cannot hope to always get the exact result. But even if the result is not the exact result for the considered problem instance, it still can be meaningful. An algorithm that computes the exact result for a very similar problem instance can be sufficient for an application, since the input data might be known not to be accurate either. This observation motivates the definition of robustness given in Section 1.1 and below in Section 4.1. In addition to the existence of a perturbation of the input data, for which the computed result is correct, Fortune's definition of robustness and stability [51] requires that the implementation of an algorithm would compute the exact result, if all computations were precise. His definition reflects the attempt to save the (theoretical) correctness proof. It implies that all degenerate cases have to be handled. In contrast to this, Sugihara [140] avoids handling degenerate cases at all, see also Section 4.3.
616
S. Schirra
Even if a degeneracy is detected it is treated like a non-degeneracy by changing the sign from zero to positive or negative. The justification for this approach is again inaccuracy of the input data. The output of an algorithm might be useful although it is not a correct output for any perturbation of the input. In some situations it might be feasible to allow perturbation of the output as well. For example, for some applications it might be sufficient that the output of a two-dimensional convex hull algorithm is a nearly convex polygon while other applications require convexity. Sometimes requirements are relaxed to allow "more general" perturbations of the input data. Robustness and stability are then defined with respect to the weaker problem formulation, cf. Section 4.1. For example. Fortune's and Milenkovic's fine arrangement algorithm [55] computes a combinatorial arrangement that is reahzable by pseudolines but not necessarily by straight lines. Shewchuk [130] suggests calling an algorithm quasi-robust if it computes useful information but not a correct output for any perturbation of the input. For many implementations of geometric primitives it is easy to show that the computed result is correct for some perturbation of the input. The major problem in the implementation with imprecise predicates is their combination. The basic predicates evaluated in an execution of an algorithm operate on the same set of data and and hence might be dependent. Furthermore, the results of dependent geometric predicates might be mutually exclusive, i.e., there might be no small perturbation leading to correctness for all predicates. Hence an algorithm might get into an inconsistent state, a state that could not be reached from any input with correct evaluation. That is where a relaxation of the problem helps. An illegal state can be a legal state for a similar problem with weaker restrictions, e.g., a state illegal for an algorithm computing an arrangement of straight lines can be legal for arrangements of pseudolines. Avoiding inconsistencies among the decisions is a primary goal in achieving robustness in implementations with imprecise predicates. Consistency is a non-issue if an algorithm never evaluates a basic predicate whose outcome is implied by the results of previous evaluations of basic predicates. Such an algorithm is called parsimonious [51,87]. In general it can be very hard to achieve consistency with previous decisions by detecting whether the outcome of a predicate can be deduced from previously evaluated predicates. A well known illustration for this fact is Pappus theorem, cf. Figure 5. Indeed, checking whether the outcome of an orientation test is implied by previous tests on the given set of points is as hard as the existential theory of the reals [51,67]. The following sections present some design principles for robustness under computation with imprecision.
4.1. Representation and model approach The representation and model view formalizes the "compute the correct solution for a related input" idea. It distinguishes real mathematical objects, the models, and their computer representations. A geometric problem V defines a mapping between models, while a computer program A leads to a mapping between representations. For instance, subtraction maps a pair of real numbers to a real number while its counterpart on a computer maps a
Robustness and precision issues in geometric
computation
617
Fig. 5. Pappus theorem is an example where the result of some orientation tests for points in the plane is determined by the result of other orientation tests. Colinearity of the points on the top line and the bottom line implies colinearity of the three intersection points in the middle.
pair of computer representations of the mathematical object real number, namely floatingpoint numbers, to a representation, a floating-point number. For the ideal one-to-one correspondence between representations and models a computer algorithm is correct if the model corresponding to the computed output representation is the solution to the problem for the model corresponding to the input representation. As with real numbers and floating-point numbers, the correspondence between mathematical models and computer representations is normally not one-to-one because of the finite nature of computer representations. To take this approximation behavior into account correctness is replaced by robustness as follows: A computer algorithm A : Irep -> Orep for a geometric problem V '.X -> O h called robust, if for every computer representation Xrep in the set of inputs Xrep, there is a model x in X corresponding to Xrep, such that V{x) is among the models in O corresponding to the computed output A(xrep), see Figure 6. The obvious way to prove robustness of a computer algorithm in the sense above is to show that there is always a model for which the computer algorithm takes the correct decisions. But this is often a highly non-trivial task.
V
A ^rep
~m- O
»»•»-
(_/
rep
Fig. 6. A geometric problem is defined on models, while a computer algorithm works on representations.
Of course, this definition of robustness depends to a large extent on the interpretation of "correspondence" between representations and models for the input and the output part.
618
S. Schirra
Generous definitions of correspondence in the output part make it easier to prove "robustness" of an algorithm. Following Shewchuk's suggestion, algorithms with a fairly generous interpretation of robustness should rather be called quasi-robust, because the output they compute might be less useful than expected. Hoffmann, Hopcroft, and Karasick introduced the "representation and model" formalization in [74], our exposition follows Stewart [136]. Hoffmann, Hopcroft, and Karasick gave an algorithm for intersection of polygons and proved its robustness. However, the underlying correspondence between computer representations and models of polygons was fairly loose. The edges of a model need not be close to the edges of the representation. Furthermore, both simple and non-simple polygons could model a representation. Thus for simple polygons the computed intersection polygon(s) need not be simple. In [77] Hopcroft and Kahn consider robust intersection of a convex polyhedron with a halfspace. Again, the computed output can be arbitrarily far away from the real intersection polyhedron. Milenkovic's hidden variable method [99] fits into the representation and model scheme as well. In the hidden variable method the representation provides a structure with certain topological properties (plus finite precision approximations of the numerical values). A corresponding model provides the hidden (infinite precision) numerical data and has the same topological structure as the representation. In [99], Milenkovic applies the hidden variable method to the computation of line arrangements. An arrangement representation in Orep consists of combinatorial data describing the topology of the arrangement and approximate representations for the vertices of the arrangement. A model has the same topology as the corresponding representation, but may have different vertex locations. Since the computed topology might not be realizable by straight lines, the lines in a model need not be straight, but they must have certain monotonicity properties and be close to the straight lines inXrepIn [136] Stewart proposes local robustness as an alternative for problems for which robustness (in the representation and model sense) is inherently difficult to achieve. Local robustness no longer requires that an algorithm is robust with respect to all problem instances. An algorithm is called locally robust for a set of features, if it is robust for all inputs consisting of exactly those features. Stewart claims, that appropriate feature sets can be chosen such that algorithms which are locally robust algorithms with respect to these feature sets are very unlikely to fail in practice. He presents locally robust algorithms for polyhedral intersection and polyhedral arrangements.
4.2. Epsilon geometry An interesting theoretical framework for the investigation of imprecision in geometric computation is epsilon geometry introduced by Guibas, Salesin, and Stolfi [69]. Instead of a Boolean value, an epsilon predicate returns a real number that gives some information "how much" the input satisfies the predicate. Epsilon geometry assumes that the size of a perturbation can be measured by a non-negative real number and that only the identity has size zero. If an input does not satisfy a predicate, the "truth value" of an epsilon predicate is the size of the smallest perturbation producing a perturbed input that satisfies the predicate. If
Robustness and precision issues in geometric computation
619
the input satisfies a predicate, the "truth value" is the non-positive number Q if the predicate is still satisfied after applying any perturbations of size at most —Q. In [69] epsilon predicates are combined with interval arithmetic. Imprecise evaluations of epsilon predicates compute a lower and an upper bound on the "truth value" of an epsilon predicate. Guibas, Salesin, and Stolfi compose basic epsilon predicates to less simple predicates. Unfortunately epsilon geometry has been applied successfully only to a few basic geometric primitives [69] and the computation of planar convex hulls [70]. Reasoning in the epsilon geometry framework seems to be difficult.
4.3. Topology-oriented approach In order to avoid inconsistent decisions the topology-oriented approach places higher priority on topological and combinatorial data than on numerical values. Whenever numerical computations would lead to decisions violating topology, the decision is replaced by a topology-conforming decision. Usually, violation of topology is not tested directly, but a set of rules is given and it is shown that following these rules ensures the desired topological properties. This approach guarantees topologically consistent output, i.e. valid combinatorial data of the output, but the computed numerical values of the output might not be corresponding to the combinatorial data. For instance, in [144] the computed graph structure representing the Voronoi diagram will always be planar, but the computed coordinates of the vertices might not give a planar embedding. Typically topology-oriented approaches do not treat degeneracies explicitly. They assume sign computations not to produce sign zero. If the numerical value computed in a sign computation is zero, it is replaced by a positive or a negative value, whatever is consistent with the current topology. The topology-oriented approach can lead to amazingly robust algorithms. The algorithms never crash or loop for ever and they compute output having essential combinatorial properties. For instance, the Voronoi diagram algorithm presented in [144] produces some planar graph even if in all decision steps involving sign computations the sign is chosen at random! Of course, "closeness" of the computed output to the correct solution is not guaranteed in this case. Usually it is argued that the computed output comes closer to the correct one if higher precision is used, and, furthermore, that it is the correct one, if the precision is sufficiently high and there are no degeneracies. Sugihara et al. used the topological-oriented approach in several algorithms for computing Voronoi diagrams [79,111,144-146], polyhedral modeling problems [141-143], and 3-dimensional convex hull [103]. Results on computation with imprecision are usually not unequivocally classifiable under the set of design principles described in Sections 4.1 to 4.5. For example, Milenkovic's hidden variable method can be seen as an topology-oriented approach, too, because the topological structure of the output representation has to be respected by every model corresponding to this representation. Thereby, topology gets priority over numerical data, which is characteristic for the topology-oriented approach as well.
620
S. Schirra
4.4. Axiomatic approach In [122,123] Schom proposes what he calls the axiomatic approach. The idea is to investigate which properties of primitive operations are essential for a correctness proof of an algorithm and to find algorithm invariants that are based on these properties only. One of the algorithms considered in [122] is computing a closest pair of a set of points S by plane sweep [72]. Instead of a closest pair, the distance 8$ of a closest pair is computed. In his implementation Schom uses distance functions d{p, q), dx(p, q), dy(p, q), and dy(p,q) on points p = (Px, Py) and q = (q^^^qy) in the plane. In an exact implementation these functions would compute J(px — ^x)^ + (Py — ^y)^, Px — qx, Py — qy, and qy — Py, respectively. Schom lists properties for these functions that are essential for a correctness proof: First, they must have some monotonicity properties, dx must be monotone with respect to the x-coordinate of its first argument, i.e., [px ^ p'^^ dx(p, q) ^ dx(p\q)] holds, and inverse monotone in the jc-coordinate of its second argument, i.e. i^x ^qx=> ^x(p, q) ^ dx{p, q')] holds. Similarly, [qy ^q'y^ dy(p, q) ^ dy{p, q')] and V^y ^ ^y ^ d'yip^^) ^ dy{p,q')] must hold for dy and dy, respectively. Second, dx, dy, and d' must be "bounded by d'\ more precisely, [px ^ qx => d(p,q) ^ dx(p,q)], [py ^qy=> d(p, q) ^ dy{p, q)\ and [py ^qy=> d(p, q) ^ dy(p, q)] must hold. Finally, d must be symmetric, i.e., d(p,q) = d(q, p). These properties, called axioms in [122], are sufficient to prove that for the 8 computed by Schom's plane sweep implementation 8 = min d(s, t) sjeS
holds. No matter what d, dx, dy, and dy are, as long as they satisfy all axioms, T^^s,tesd(s, t) is computed by the sweep. In particular, if exact distance functions are used, the correct distance of a closest pair would be computed. Schom uses floating-point implementations of the distance functions d, dx, dy, and d' He shows that they have the desired properties and that they guarantee a relative error of at most S^prec in the computed approximation for 5^, where ^prec is machine epsilon. Further geometric problems to which the axiomatic approach is applied in [122,123] to achieve robustness are: finding pairs of intersecting line segments and computing the winding number of a point with respect to a not necessarily simple polygon. The latter involves point in polygon testing as a special case.
4.5. Tolerance-based approach This approach associates tolerances to geometric objects in order to represent uncertainties. This is a generalization of the representation of a numerical value by an approximation and an error bound or an interval. Tolerance-based approaches can be seen as a special variant of the representation and model design principle. The tolerances associated with geometric objects restrict the correspondence between representation and model. A model can correspond to a representation only if it satisfies the tolerance constraints associated to the representation.
Robustness and precision issues in geometric
computation
621
Fig. 7. Coincidence inconsistency of points with tolerance regions. If points are considered to be coincident if there tolerance regions overlap, then p\ and P2 are coincident and so are p2 and 773, but p\ and />3 are not.
Fig. 8. Processing points with tolerance regions requires backtracking if points p2 and p-^ are merged after p\ has been processed.
A goal in processing geometric data with a tolerance-based approach is to keep the data in a consistent state in order to ensure the existence of a model. For example, points with associated tolerance regions should have a coincidence relation that is reflexive and transitive, see Figure 7. If inconsistencies arise, the tolerance regions have to be adjusted, either by shrinking them through recomputation of the relevant data with higher precision, or by splitting or merging objects and their tolerance regions. Tolerance-based approaches usually maintain additional neighborhood information on the location of the objects to enable consistency checking. In the example given in Figure 8 one has to detect that after merging points p2 and p^ into one point with an enlarged tolerance region an inconsistency with p\ arises. Pullar [120] discusses consequences of using tolerance circles to point coincidence and point clustering problems. Segal [125] uses a tolerance-based approach in the boundary evaluation in constructive solid geometry. Fang and Briiderlin [48] consider polyhedral modeling as well. They present two versions, a more strict version called the linear model where the models corresponding to a representation must be linear as well, and the less strict curve model that allows for curved models as well and hence requires less efforts to ensure consistency.
622
S. Schirra
4.6. Further and more specific approaches
For modeling polygonal regions in the plane Milenkovic [99] uses a technique called data normalization to modify the input such that it can be processed with imprecise arithmetic, more precisely such that all finite precision operations on the normalized data give the correct result. The permitted modification operations are vertex shifting (given a polygon P and a vertex v, move all vertices of P with distance less than a certain e onto v) and edge cracking (given a segment s = AB and a set V of points, each point with distance at most a certain e io s, replace s = AB by di polyline from A io B whose vertex set is VU{A,5}). For some basic geometric problems there are stable, robust, or quasi-robust computer algorithms. In Table 3 we group results on robustness with imprecise computation in a problem-oriented way.
Table 3 Some robustness results for basic geometric problems with imprecise computation. Note that exact methods are not listed here Convex Hull: 2-dimensional 3-dimensional d-dimensional
[28] [59] [70] [80] [89] [103] [9,10]
Operations on Polygonal Objects: Hne arrangements intersection of polygons intersection of polyhedra 2-d modeling 3-d modeling polyhedral decomposition point location hne segment intersection triangulation
[55] [99] [100] [74] [75] [77] [136] [142] [48] [99] [101] [83] [ 125] [ 127] [ 135] [ 141 ] [ 143] [6,7] [126] [11] [49] [ 122] [ 134] [66] [ 100] [ 113] [ 122] [ 139] [51 ]
Delaunay and Voronoi Diagrams: points in 2-d points in 3-d
[53] [78] [79] [111] [140] [144,145] [146] [35] [79]
The techniques used in the algorithms cited in this section and the reasoning processes used to prove robustness are fairly problem specific and it seems unlikely that they can be easily transferred to other geometric problems.
Robustness and precision issues in geometric computation
623
5. Related issues In this section we first look at some issues that are closely related to precision and robustness: degeneracies, inaccurate data, and rounding. Finally, we briefly address precision and robustness in computational geometry libraries.
5.1. Degeneracy Degeneracy is closely related to precision and robustness, since precision problems are caused by degenerate and nearly degenerate configurations in the input. Typical cases of degeneracy are four cocircular points, three colinear points, or two points with the same ordinate. Theoretical papers on computational geometry often assume the input in general position and leave the "straightforward" handling of special cases to the reader. This might make the presentation of an algorithm more readable, but it can put a huge burden on the implementor, because the handling of degeneracies is often less straightforward than claimed. In Section 2 we viewed a geometric problem as a mapping from a set of permitted input data, consisting of a combinatorial and a numerical part, to a set of valid output data, consisting of a combinatorial and a numerical part. We now assume that the combinatorial part of the input is trivial, i.e. just a sequencing of data or so, such that we can view a geometric problem P as a function from W^ to Cout x ^"^^ where n,m, and d are integers and Cout is some discrete space, modeling the combinatorial part of the output, e.g., a planar graph or a face incidence lattice. A problem instance x e M^^, which for concreteness we view as n points in J-dimensional space, is called degenerate if V is discontinuous at x. For example, if J = 2 and V{x) is the Voronoi diagram of x, i.e., a straight-line planar graph together with coordinates for its vertices, then x is degenerate iff x contains four cocircular points defining a vertex of the diagram. An instance x is called degenerate with respect to some algorithm A if the computation of A on input x contains a sign test with outcome zero. Clearly^, if A solves V and x is a degenerate problem instance then x is also degenerate for A. Symbolic perturbation schemes introduced to computational geometry by Edelsbrunner and Mucke [41], refined by Emiris and Canny [44,43] and Emiris, Canny, and Seidel [45] and extended by Yap [147,148], have been proposed to abolish the handling of degeneracies, see also [128]. With these schemes, the input is perturbed symbolically, e.g., Emiris and Canny [43] propose to replace the j-th coordinate xtj of the /-th input point by Xij -\- 8 • i^, where £ is a positive infinitesimal, and the computation is carried out on the perturbed input. All intermediate results are now polynomials in e. It can be shown that the Emiris and Canny scheme removes many geometric degeneracies, e.g., colinearity of three points, at only a constant factor increase in running time. The same statement holds for the other perturbation schemes, although with a larger constant of proportionality. Exact computation is a prerequisite for applying these techniques [151]. This assumes all functions evaluated in sign tests to be continuous functions of the inputs.
624
S. Schirra
The handling of degeneracies and the use of symbolic perturbation schemes are a point of controversy in the computational geometry literature, see [22,124,128]. Symbolic perturbation is a fairly general technique that abolishes the handling of degenerate cases and it can be very useful [45]. However, for degenerate input x, not V{x), but the limit of V{x{s)) for e ^- 0 is computed. This may or may not be sufficient. The complexity of the postprocessing required to retrieve the answer V{x) for a degenerate input x from the answer V{x{e)) to the perturbed input x{e) can be significant. Bumikel et al. claim in [22] that for many geometric problems algorithms handling degeneracies directly are only moderately more complex than algorithms assuming non-degenerate inputs. Furthermore, they show that perturbation schemes may incur a significant loss in efficiency, since the computed output for the symbolically perturbed input may be significantly larger than the actual solution. Bumikel et al. use line segment intersection and convex hull (in arbitrary dimensions) as examples. Halperin and Shelton [71] combine a (non-symbolic) perturbation scheme with floatingpoint arithmetic to compute an arrangement of circles on a sphere, where the circles on the sphere result from intersection of the sphere with other spheres. They use their algorithm in molecular modeling. Since the given sphere locations are not accurate anyway in the molecular modeling application, perturbation doesn't harm. Sometimes, the term robustness is also used with respect to degeneracies. Dey et al. [35] define robustness as the ability of a geometric algorithm to deal with degeneracies and "inaccuracies" during various numerical computations. The definition of robustness in [122] is similar.
5.2. Inaccurate data In practice, many geometric data is known to be inaccurate, for instance geometric data obtained by measuring real world data. Since imprecise arithmetic also introduces uncertainty, processing geometric objects computed with imprecise computation and processing of real world data known to be potentially inaccurate are highly related issues. Treating inaccurate data as exact data works with exact geometric computation as long as the input data are consistent. If not, we are in a situation similar to computation with imprecision. An algorithm might get into states it was not supposed to get in and which it therefore cannot handle. This similarity has led researchers to advocate imprecise computation and to attack both inconsistencies arising from imprecise computation and inconsistencies due to inaccurate data uniformly. In this approach, however, it is not clear whether errors in the output are caused by precision problems during computation or inaccuracies in the data. Source errors and processing errors become indistinguishable. Exact computation, on the other hand, only assures that inconsistencies are due to faulty data. But knowing that an error was caused by a source error does not at all tell you how to proceed. Tolerance-based approaches discussed in Section 4.5 are a natural choice to deal with inaccurate data. As with computation with imprecision, a lot of research on modeling and handling uncertainty in geometric data is still needed.
Robustness and precision issues in geometric computation
625
Fig. 9. Snap-rounding line segments.
5.3. Rounding The complexity, e.g., the bit-length of integers, of numerical data in the output of algorithms for constructive geometric problems is usually higher than that of the input data. Thus cascading geometric computations can result in expensive arithmetic operations. If the cost caused by increased precision resulting from cascaded computation is not tolerable, precision must be decreased by rounding the geometric output data. The goal in rounding is not to deviate too much from the original data both with respect to geometry and topology while reducing the precision. Rounding geometric objects is related to simultaneous approximation of reals by rationals [138]. However, rounding geometric data is more complicated than rounding numbers and can be very difficult [102], because combinatorial and numerical data have to be kept consistent. An intensively studied example is rounding an arrangement of line segments. Greene and Yao [66] were the first to investigate rounding line segments consistently to a regular grid. Note that simply rounding each segment endpoint to its nearest grid point can introduce new intersections and hence significantly violate the original topology. Greene and Yao break line segments into polylines such that all endpoints lie on the grid and the topology is largely preserved. Largely means, incidences not present in the original arrangement might arise, but it can be shown that no additional crossings are generated. Currently the most promising approach is ''snap-rounding", also called ''hot-pixel" rounding, usually attributed to Greene and Hobby. A pixel in the regular grid is called hot if it contains an endpoint of an original line segment or an intersection point of the original segments. In the rounding process all line segments intersecting a hot pixel are snapped to the pixel center, cf. Figure 9. Snap-rounding is used in [64,68,73]. Rounding can be done as a postprocessing step after exact computation, but it can also be seen as part of the problem and be incorporated into the algorithmic solution, as e.g. in [64] and [68].
5.4. Robustness in geometric algorithms libraries Library components should come with a precise description what they compute and for which inputs they are guaranteed to work. Correctness means that a component behaves
626
S. Schirra
according to such a specification. Exactness should not be confused with correctness in the sense of rehability. There is nothing wrong with approximation algorithms or approximate solutions as long as they do what they profess to do. Correctness can have unlike appearances: An algorithm handhng only non-degenerate cases can be correct in the above sense. Also, an algorithm that guarantees to compute the exact result only if the numerical input data are integral and smaller than some given bound can be correct as well as an algorithm that computes an approximation to the exact result with a guaranteed error bound. Correctness in the sense of reliability is a must for (re)usability and hence for a geometric algorithms library. Among the library and workbench efforts in computational geometry [4,32,61,46,96, 110] the XYZ-Geobench and LEDA deserve special attention concerning precision and robustness. In XYZ-Geobench [110,121] the axiomatic approach to robustness, described in Section 4.4, is used. In LEDA [95,96] arbitrary precision integer arithmetic is combined with the floating-point filter technique to yield efficient exact components for rational problems. Recently, in Europe and the US, new library projects called CGAL (Computational Geometry Algorithms Library) [26,47,115] and GeomLib [1,8] have been started. The goal of both projects is to enhance the technology transfer from theory to practice in geometric computing by providing reliable, reusable implementations of geometric algorithms.
6. Conclusion Over the past decade much progress has been made on the precision and robust problem, but no satisfactory general-purpose solution has been found. If exact predicates or exact number types are available, exact geometric computation is the more convenient approach. Algorithms designed for the real RAM model [117] can be implemented in a straightforward way; a redesign to deal with imprecision is not necessary. Moreover, exact computation is a prerequisite for the use of symbolic perturbation schemes. However, even with adaptive evaluation, exact geometric computation has its costs. Concerning efficiency, practitioners often ask for the impossible. Reliable algorithms based on exact geometric computation are requested to be competitive in performance to algorithms that sometimes crash or exhibit otherwise unexpected behavior. It should be clear, however, that one has to pay for the detection of degenerate and nearly degenerate situations in order to get reliability. Exact geometric computation is not a panacea; it has limits. For cascaded computations with large depth, i.e. computations where the result of an arithmetic operation is an operand in another arithmetic operation many times in a row, the increase on required precision with the depth of computation makes exact geometric computation less suited. In this case, rounding intermediate results becomes important. Next, there are applications where speed is much more an issue than accuracy. As long as the computed outputs are useful, a fast robust algorithm dealing with imprecise computation will be more appropriate. Unfortunately, implementation with imprecision is much less straightforward. There is no general, widely applicable theory on how to deal with imprecision. Related surveys on the problem of precision and robustness in geometric computation are given by Fortune [52], Hoffmann [76], and Yap [149]. Yap [150] and Yap and Dube
Robustness and precision issues in geometric computation
627
[151] address exact geometric computation. Franklin [60] especially discusses cartographic errors caused by precision problems. Dobkin and Silver [36] illustrate the effect of cascading geometric computation on the numerical accuracy of the computed result. Furthermore, robustness and precision issues were discussed at the ACM Workshop on Applied Computational Geometry at FCRC'96 in Philadelphia, see [54,67,116].
Acknowledgment The author would like to thank Christoph Bumikel, Kurt Mehlhom, Greg Perkins, and Michael Seel for their comments on earlier versions of this survey.
References [1] P.K. Agarwal, M.T. Goodrich, S.R. Kosaraju, F.R Preparata, R. Tamassia and J.S. Vitter, Applicable and robust geometric computing (1995). See h t t p : / /www. c s . b r o w n . e d u / c g c / . [2] A. V. Aho, J.E. Hopcroft and J.D. UUman, The Design and Analysis of Computer Algorithms, AddisonWesley (1974). [3] G. Alefeld and J. Herzberger, Introduction to Interval Computation, Academic Press, New York (1983). [4] F. Avnaim, C+ + GAL: A C++ Library for Geometric Algorithms, INRIA Sophia-Antipolis (1994). [5] F. Avnaim, J.-D. Boissonnat, O. Devillers, F. Preparata and M. Yvinec, Evaluating signs of determinants using single-precision arithmetic, Algorithmica 17 (1997), 111-132. [6] C.L. Bajaj and T.K. Dey, Robust decompositions ofpolyhedra, Proc. 9th FSTTCS, Lecture Notes in Comput. Sci. 405, Springer-Verlag (1989), 267-279. [7] C.L. Bajaj and T.K. Dey, Convex decomposition ofpolyhedra and robustness, SIAM J. Comput. 21 (1992), 339-364. [8] J.E. Baker, R.Tamassia and L. Vismara, GeomLih: Algorithm engineering for a geometric computing library (1997). (Preliminary report.) [9] C.B. Barber, Computational geometry with imprecise data and arithmetic, PhD thesis. Technical Report CS-TR-377-92, Princeton University (1992). [10] C.B. Barber, D.P Dobkin and H. Huhdanpaa, The Quickhull algorithm for convex hulls, ACM Trans. Math. Software 22 (4) (Dec. 1996), 469-483. [11] C.B. Barber and M. Hirsch, A robust algorithm for point in polyhedron, Proc. 5th Canad. Conf. Comput. Geom. (1993), 479^84. [12] M. Benouamer, P. Jaillon, D. Michelucci and J.-M. Moreau, A lazy solution to imprecision in computational geometry, Proc. 5th Canad. Conf. Comput. Geom. (1993), 13-1^. [13] J.L. Bentley and T.A. Ottmann, Algorithms for reporting and counting geometric intersections, IEEE Trans. Comput. C-28 (1979), 643-647. [14] J. Blomer, Computing sums of radicals in polynomial time, Proc. 32nd Annu. IEEE Sympos. Found. Comput. Sci. (1991), 670-677. [15] J.-D. Boissonnat and F. Preparata, Robust plane sweep for intersecting segments. Technical Report 3270, INRIA, Sophia-Antipolis, France (September 1997). [16] J.-D. Boissonnat and M. Yvinec, Algorithmic Geometry, Cambridge University Press, Cambridge, UK (1997). [17] H. Bronnimann, I.Z. Emiris, V.Y Pan and S. Pion, Computing exact geometric predicates using modular arithmetic with single precision, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 174-182. [18] H. Bronnimann and M. Yvinec, Efficient exact evaluation of signs of determinants, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 166-173. [19] C. Bumikel, Exact computation ofVoronoi diagrams and line segment intersections, PhD thesis, Universitat des Saarlandes (March 1996).
628
S. Schirra
[20] C. Bumikel, R. Fleischer, K. Mehlhom and S. Schirra, A strong and easily computable separation hound for arithmetic expressions involving square roots, Proc. of the 8th ACM-SIAM Symp. on Discrete Algorithms (1997), 702-709. [21] C. Bumikel, K. Mehlhom and S. Schirra, How to compute the Voronoi diagram of line segments: Theoretical and experimental results, Proc. 2nd Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 855, Springer-Verlag (1994), 227-239. [22] C. Bumikel, K. Mehlhom and S. Schirra, On degeneracy in geometric computations, Proc. 5th ACMSIAM Sympos. Discrete Algorithms (1994), 16-23. [23] C. Bumikel, K. Mehlhom and S. Schirra, The LEDA class r e a l number. Technical Report MPI-I-96-1001, Max-Planck-Institut fur Informatik (1996). [24] J.F. Canny, The Complexity of Robot Motion Planning, ACM Doctoral Dissertation Award 1987. MIT Press (1987). PhD thesis. [25] J.F. Canny, Generalised characteristic polynomials, J. Symbolic Comput. 9 (1990), 241-250. [26] CGALproject. See h t t p : / /www . c s . u u . n l / C G A L /. [27] J. Chang and V. Milenkovic, An experiment using LNfor exact geometric computations, Proc. 5th Canad. Conf. Comput. Geom. (1993), 67-72. [28] W. Chen, K. Wada and K. Kawaguchi, Parallel robust algorithms for constructing strongly convex hulls, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 133-140. [29] K.L. Clarkson, Safe and effective determinant evaluation, Proc. 33rd Annu. IEEE Sympos. Found. Comput. Sci. (1992), 387-395. [30] J.L.D. Comba and J. Stolfi, Affine arithmetic and its applications to computer graphics (1993). Presented at SIBGRAPr93, Recife (Brazil), October 20-22. [31] M. de Berg, M. van Kreveld, M. Overmars and O. Schwarzkopf, Computational Geometry, SpringerVerlag(1997). [32] P. de Rezende and W. Jacometti, Geolab: An environment for development of algorithms in computational geometry, Proc. 5th Canad. Conf. Comput. Geom., Waterloo, Canada (1993), 175-180. [33] T.J. Dekker, A floating-point technique for extending the available precision, Numer. Math. 18 (1971), 224-242. [34] O. Devillers and F. P. Preparata, A probabilistic analysis of the power of arithmetic filters. Technical Report CS-96-27, Center for Geometric Computing, Dept. Computer Science, Brown Univ. (1996). [35] T.K. Dey, K. Sugihara and C.L. Bajaj, Delaunay triangulations in three dimensions with finite precision arithmetic, Comput. Aided Geom. Design 9 (1992), 457^70. [36] D.P Dobkin and D. Silver, Applied computational geometry: Towards robust solutions of basic problems, J. Comput. Syst. Sci. 40 (1989), 70-87. [37] D. Douglas, It makes me so CROSS, Introductory Readings in Geographic Information Systems, D.J. Peuquet and D.F. Marble, eds, Taylor & Francis, London (1990), 303-307. [38] T. Dube, K. Ouchi and C. K. Yap, Tutorial for R e a l / E x p r Package (1996). [39] T. Dube and C.K. Yap, A basis for implementing exact computational geometry. Extended abstract (1993). [40] H. Edelsbmnner, Algorithms in Combinatorial Geometry, Springer-Verlag (1986). [41] H. Edelsbmnner and E. Mticke, Simulation of simplicity: A technique to cope with degenerate cases in geometric algorithms, ACM Trans, on Graphics 9 (1990), 66-104. [42] I. Emiris, A complete implementation for computing general dimensional convex hulls, Research Report 2551, INRIA, Sophia-Antipolis, France (1996). [43] I. Emiris and J. Canny, An efficient approach to removing geometric degeneracies, Proc. of the 8th ACM Symp. on Comput. Geom. (1992), 74-82. [44] I. Emiris and J. Canny, A general approach to removing degeneracies, SIAM J. Comput. 24 (1995), 650664. [45] I.Z. Emiris, J.F. Canny and R. Seidel, Efficient perturbations for handling geometric degeneracies, Algorithmica 19 (1-2) (September 1997), 219-242. [46] P. Epstein, J. Kavanagh, A. Knight, J. May, T. Nguyen and J.-R. Sack, A workbench for computational geometry, Algorithmica 11 (1994), 404-^28. [47] A. Fabri, G.-J. Giezeman, L. Kettner, S. Schirra and S. Schonherr, The CGAL kernel: A basis for geometric computation. Applied Computational Geometry: Towards Geometric Engineering (WACG96), M.C. Lin and D. Manocha, eds. Springer LNCS 1148 (1996), 191-202.
Robustness and precision issues in geometric computation
629
[48] S. Fang and B. Briiderlin, Robustness in geometric modeling — tolerance-based methods. Computational Geometry — Methods, Algorithms and Applications: Proc. Intemat. Workshop Comput. Geom. CG '91, Lecture Notes in Comput. Sci. 553, Springer-Verlag (1991), 85-101. [49] A.R. Forrest, Computational geometry in practice. Fundamental Algorithms for Computer Graphics, R.A. Eamshaw, ed., NATO AST, Vol. F17, Springer-Verlag (1985), 707-724. [50] A.R. Forrest, Computational geometry and software engineering: Towards a geometric computing environment. Techniques for Computer Graphics, D.F. Rogers and R.A. Eamshaw, eds. Springer-Verlag (1987), 23-37. [51] S. Fortune, Stable maintenance of point set triangulations in two dimensions, Proc. 30th Annu. IEEE Sympos. Found. Comput. Sci. (1989), 494-505. [52] S. Fortune, Progress in computational geometry. Directions in Geometric Computing, R. Martin, ed.. Information Geometers Ltd. (1993), 81-128. [53] S. Fortune, Numerical stability of algorithms for 2-d Delaunay triangulations, Intemat. J. Comput. Geom. Appl. 5(1) (1995), 193-213. [54] S. Fortune, Robustness issues in geometric algorithms. Applied Computational Geometry: Towards Geometric Engineering (WACG96), M.C. Lin and D. Manocha, eds. Springer LNCS 1148 (1996), 9-14. [55] S. Fortune and V. Milenkovic, Numerical stability of algorithms for line arrangements, Proc. 7th Annu. ACM Sympos. Comput. Geom. (1991), 334-341. [56] S. Fortune and C.J. van Wyk, LN user manual (1993). [57] S. Fortune and C.J. van Wyk, Efficient exact arithmetic for computational geometry, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 163-172. [58] S. Fortune and C.J. van Wyk, Static analysis yields efficient exact integer arithmetic for computational geometry, ACM Trans. Graph. 15 (3) (July 1996), 223-248. [59] P.G. Franciosa, C. Gaibisso, G. Gambosi and M. Talamo, A convex hull algorithm for points with approximately known positions, Intemat. J. Comput. Geom. Appl. 4 (2) (1994), 153-163. [60] W.R. Franklin, Cartographic errors symptomatic of underlying algebra problems, Proc. Intemat. Sympos. Spatial Data Handling, Vol. 1, 20-24 August (1984), 190-208. [61] G.-J. Giezeman, PlaGeo, a Library for Planar Geometry and SpaGeo, a Library for Spatial Geometry, Utrecht University (1994). [62] D. Goldberg, What every computer scientist should know about floating-point arithmetic, ACM Comput. Surv. 32 (1) (March 1991), 5 ^ 8 . [63] M.F. Goodchild, Issues of quality and uncertainty. Advances in Cartography, J.C. MuUer, ed., Elsevier Applied Science, London (1991), 113-139. [64] M. Goodrich, L. Guibas, J. Hershberger and P. Tanenbaum, Snap rounding line segments efficiently in two and three dimensions, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 284-293. [65] T. Granlund, GNU MP, The GNU Multiple Precision Arithmetic Library, 1.Q2 edition (June 1996). [66] D.H. Greene and F.F. Yao, Finite-resolution computational geometry, Proc. 27th Annu. IEEE Sympos. Found. Comput. Sci. (1986), 143-152. [67] L. Guibas, Implementing geometric algorithms robustly, AppUed Computational Geometry: Towards Geometric Engineering (WACG96), M.C. Lin and D. Manocha, eds. Springer LNCS 1148 (1996), 15-22. [68] L. Guibas and D. Marimont, Rounding arrangements dynamically, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 190-199. [69] L. Guibas, D. Salesin and J. Stolfi, Epsilon geometry: Building robust algorithms from imprecise computations, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 208-217. [70] L. Guibas, D. Salesin and J. Stolfi, Constructing strongly convex approximate hulls with inaccurate primitives, Proc. 1st Annu. SIGAL Intemat. Sympos. Algorithms, Lecture Notes in Comput. Sci. 450, SpringerVerlag (1990), 261-270. [71] D. Halperin and C. Shelton, A perturbation scheme for spherical arrangements with application to molecular modeling, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 183-192. [72] K. Hinrichs, J. Nievergelt and P. Schom, An all-round sweep algorithm for 2-dimensional nearest-neighbor problems. Acta Informatica 29 (1992), 383-394. [73] J.D. Hobby, Practical line segment intersection with finite precision output. Technical Report 93/2-27, Bell Laboratories (Lucent Technologies) (1993).
630
S. Schirra
[74] CM. Hoffmann, J.E. Hopcroft and M. Karasick, Towards implementing robust geometric computations, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 106-117. [75] CM. Hoffmann, J.E. Hopcroft and M.T. Karasiclc, Robust set operations on polyhedral solids, IEEE Comput. Graph. Appl. 9 (6) (November 1989), 50-59. [76] CM. Hoffmann, The problem of accuracy and robustness in geometric computation, IEEE Computer (March 1989), 3 1 ^ 1 . [77] J.E. Hopcroft and P.J. Kahn, A paradigm for robust geometric algorithms, Algorithmica 7 (1992), 339380. [78] H. Inagaki and K. Sugihara, Numerically robust algorithm for constructing constrained Delaunay triangulation, Proc. 6th Canad. Conf. Comput. Geom. (1994), 171-176. [79] H. Inagaki, K. Sugihara and N. Sugie, Numerically robust incremental algorithm for constructing threedimensional Voronoi diagrams, Proc. 4th Canad. Conf. Comput. Geom. (1992), 334-339. [80] J.W. Jaromczyk and G.W. Wasilkowski, Computing convex hull in a floating point arithmetic, Comput. Geom. 4 (1994), 283-292. [81] K. Jensen and N. Wirth, PASCAL- User Manual and Report. Revised for the ISO Pascal Standard, 3rd edn. Springer-Verlag (1985). [82] S. Kahan and J. Snoeyink, On the bit complexity of minimum link paths: Superquadratic algorithms for problems solvable in linear time, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 151-158. [83] M. Karasick, On the representation and manipulation of rigid solids, PhD thesis, Dept. Comput. Sci., McGill Univ., Montreal (1989). [84] M. Karasick, D, Lieber and L.R. Nackman, Efficient Delaunay triangulations using rational arithmetic, ACM Trans. Graph. 10 (1991), 71-91. [85] R. Klein, Algorithmische Geometric, Addison-Wesley (1997) (in German). [86] D.E. Knuth, The Art of Computer Programming. Vol. 2: Seminumerical Algorithms, 2nd edn, AddisonWesley(1981). [87] D.E. Knuth, Axioms and Hulls, Lecture Notes in Comput. Sci. 606, Springer-Verlag, Heidelberg, Germany (1992). [88] M.J. Laszlo, Computational Geometry and Computer Graphics in C+ + , Prentice-Hall, Upper Saddle River, NJ( 1996). [89] Z. Li and V. Milenkovic, Constructing strongly convex hulls using exact or rounded arithmetic, Algorithmica 8 (1992), 345-364. [90] LiDIA-Group, Fachbereich Informatik Institut ftir Theoretische Informatik TH Darmstadt, LiDIA Manual A library for computational number theory, 1.3 edition (April 1997). [91] G, Liotta, F. Preparata and R. Tamassia, Robust proximity queries: An illustration of degree-driven algorithm design, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 156-165. [92] K. Mehlhom, Data Structures and Algorithms 3: Multi-dimensional Searching and Computational Geometry, Springer-Veriag (1984). [93] K. Mehlhom and S. Naher, Implementation of a sweep line algorithm for the straight line segment intersection problem, Report MPI-I-94-160, Max-Planck-Institut Inform., Saarbriicken, Germany (1994). [94] K. Mehlhom and S. Naher, The implementation of geometric algorithms, Proc. 13th World Computer Congress IFIP94, Vol. 1 (1994), 223-231. [95] K. Mehlhom and S. Naher, LEDA, a platform for combinatorial and geometric computing, Comm. ACM 38 (1995), 96-102. [96] K. Mehlhom, S. Naher and C Uhrig, The LEDA User manual, 3.5 edition (1997). See http://www.mpi-sb.mpg.de/LEDA/leda.html. [97] M. Mignotte, Identification of algebraic numbers, J. Algorithms 3 (1982), 197-204. [98] M. Mignotte, Mathematics for Computer Algebra, Springer-Verlag (1992). [99] V. Milenkovic, Verifiable implementations of geometric algorithms using finite precision arithmetic, Artif. Intell. 37(1988), 377^01. [100] V. Milenkovic, Double precision geometry: A general technique for calculating line and segment intersections using rounded arithmetic, Proc. 30th Annu. IEEE Sympos. Found. Comput. Sci. (1989), 500-505. [101] V. Milenkovic, Robust polygon modeling, Comput. Aided Design 25 (9) (1993). (Special issue on Uncertainties in Geometric Design.)
Robustness and precision issues in geometric computation
631
102] V. Milenkovic and L.R. Nackman, Finding compact coordinate representations for polygons and polyhedra, Proc. 6th Annu. ACM Sympos. Comput. Geom. (1990), 244-252. 103] T. Minakawa and K. Sugihara, Topology oriented vs. exact arithmetic - experience in implementing the three-dimensional convex hull algorithm, ISAAC97 (1997). 104] R.E. Moore, Interval Analysis, Prentice-Hall, Englewood Cliffs, NJ (1966). 105] R.E. Moore, Methods and Applications of Interval Analysis, SIAM, Philadelphia (1979). 106] S.P. Mudur and PA. Koparkar, Interval methods for processing geometric objects, IEEE Comput. Graph. Appl. 4 (2) (1984), 7-17. 107] K. Mulmuley, Computational Geometry: An Introduction through Randomized Algorithms, Prentice-Hall, Englewood Cliffs, NJ (1994). 108] J. Nievergelt and K.H. Hinrichs, Algorithms and Data Structures: With Applications to Graphics and Geometry, Prentice-Hall, Englewood Cliffs, NJ (1993). 109] J. Nievergelt and P. Schom, Das Rdtsel der verzopften Geraden, Informatik Spektrum 11 (1988), 163-165. (in German). 110] J. Nievergelt, P. Schom, M. de Lorenzi, C. Ammann and A. Brtingger, XYZ: Software for geometric computation. Technical Report 163, Institut fur Theorische Informatik, ETH, Zurich, Switzerland (1991). I l l ] Y. Oishi and K. Sugihara, Topology oriented divide and conquer algorithm for Voronoi diagrams. Graph. Models Image Process. 57 (4) (1995), 303-314. 112] J. O'Rourke, Computational Geometry in C, Cambridge University Press, Cambridge (1994). 113] T. Ottmann, G. Thiemt and C. Ullrich, Numerical stability of geometric algorithms, Proc. of the 3rd ACM Symp. on Computational Geometry (1987), 119-125. 114] K. Ouchi, Real/Expr: Implementation of exact computation, Master thesis, Courant Institute, New York University (1997). 115] M. Overmars, Designing the computational geometry algorithms library CGAL, Applied Computational Geometry: Towards Geometric Engineering (WACG96), M.C. Lin and D. Manocha, eds. Springer LNCS 1148(1996), 53-58. 116] F. Preparata, Robustness in geometric algorithms. Applied Computational Geometry: Towards Geometric Engineering (WACG96), M.C. Lin and D. Manocha, eds. Springer LNCS 1148 (1996), 23-24. 117] F. Preparata and M.I. Shamos, Computational Geometry, Springer-Verlag (1985). 118] D.M. Priest, Algorithms for arbitrary precision floating point arithmetic, 10th Symposium on Computer Arithmetic, IEEE Computer Society Press (1991), 132-143. 119] D.M. Priest, On properties of floating-point arithmetic: Numerical stability and the cost of accurate computations, PhD thesis. Department of Mathematics, University of California at Berkeley (1992). 120] D. PuUar, Consequences of using a tolerance paradigm in spatial overlay, Proc. of Auto-Carto 11 (1993), 288-296. 121] P. Schorn, An object-oriented workbench for experimental geometric computation, Proc. 2nd Canad. Conf. Comput. Geom. (1990), 172-175. 122] P. Schorn, Robust Algorithms in a Program Library for Geometric Computation, Informatik-Dissertationen ETH Zurich, Vol. 32, Verlag der Fachvereine, Zurich (1991). 123] P. Schom, An axiomatic approach to robust geometric programs, J. Symbolic Comput. 16 (1993), 155165. 124] P. Schorn, Degeneracy in geometric computation and the perturbation approach, Comput. J. 37 (1) (1994), 35-42. 125] M.G. Segal, Using tolerances to guarantee valid polyhedral modeling results, Comput. Graph. 24 (4) (August 1990), 105-114. 126] M.G. Segal and C.H. Sequin, Partitioning polyhedral objects into nonintersecting parts, IEEE Comput. Graph. Appl. 8 (1) (January 1988), 53-67. 127] M.G. Segal and C.H. Sequin, Consistent calculations for solids modelling, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 29-38. 128] R. Seidel, The nature and meaning of perturbations in geometric computations, STACS94 (1994). 129] B. Serpette, J. Vuillemin and J.C. Herve, BigNum, a portable and efficient package for arbitrary-precision arithmetic. Technical Report 2, Digital Paris Research Laboratory (1989). [130] J.R. Shewchuk, Adaptive precision floating-point arithmetic and fast robust geometric predicates. Technical Report CMU-CS-96-140, School of Computer Science, Carnegie Mellon University (1996).
632
S. Schirra
[131] J.R. Shewchuk, Robust adaptive floating-point geometric predicates, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 141-150. [132] J.R. Shewchuk, Triangle: Engineering a 2D quality mesh generator and Delaunay triangulator. Applied Computational Geometry: Towards Geometric Engineering (WACG96), M.C. Lin and D. Manocha, eds. Springer LNCS 1148 (1996), 203-222. [133] IEEE Standard, 754-1985 for binary floating-point arithmetic, SIGPLAN 22 (1987), 9-25. [134] A.J. Stewart, Robust point location in approximate polygons, Proc. 3rd Canad. Conf. Comput. Geom. (1991), 179-182. [135] A.J. Stewart, The theory and practice of robust geometric computation, or, how to build robust solid modelers, PhD thesis, Dept. Comput. Sci., Cornell Univ., Ithaca, NY (August 1991). Technical Report TR 911229. [136] A.J. Stewart, Local robustness and its application to polyhedral intersection, Intemat. J. Comput. Geom. Appl. 4(1) (1994), 87-118. [137] K.G. Suffem and E.D. Fackerell, Interval methods in computer graphics, Comput. Graphics 15 (3) (1991), 331-340. [138] K. Sugihara, On finite-precision representations of geometric objects, J. Comput. Syst. Sci. 39 (1989), 236-247. [139] K. Sugihara, An intersection algorithm based on Delaunay triangulation, IEEE Comput. Graph. Appl. 12 (2) (March 1992), 59-67. [140] K. Sugihara, A simple method for avoiding numerical errors and degeneracy in Voronoi diagram construction, lEICE Trans. Fundamentals E75-A (4) (April 1992), 468^77. [141] K. Sugihara, Topologically consistent algorithms related to convex polyhedra, Proc. 3rd Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 650, Springer-Verlag (1992), 209-218. [142] K. Sugihara, A robust and consistent algorithm for intersecting convex polyhedra, Comput. Graph. Forum 13 (3) (1994), 45-54. Proc. EUROGRAPHICS '94. [143] K. Sugihara and M. Iri, A solid modelling system free from topological inconsistency, J. Inform. Process. 12 (4) (1989), 380-393. [144] K. Sugihara and M. Iri, Construction of the Voronoi diagram for 'one million' generators in singleprecision arithmetic, Proc. IEEE 80 (9) (September 1992), 1471-1484. [145] K. Sugihara and M. Iri, A robust topology-oriented incremental algorithm for Voronoi diagrams, Intemat. J. Comput. Geom. Appl. 4 (1994), 179-228. [146] K. Sugihara, Y. Goishi and T. Imai, Topology-oriented approach to robustness and its applications to several Voronoi-diagram algorithms, Proc. 2nd Canad. Conf. Comput. Geom. (1990), 36-39. [147] C.K. Yap, A geometric consistency theorem for a symbolic perturbation scheme, Proc. of the 4th ACM Symp. on Computational Geometry (1988), 134-141. [148] C.K. Yap, Symbolic treatment of geometric degeneracies, J. Symbohc Comput. 10 (1990), 349-370. [149] C.K. Yap, Robust geometric computation, CRC Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC Press (1997), 653-668. [150] C.K. Yap, Towards exact geometric computation, Comput. Geom. 7(1-2) (1997), 3-23. Preliminary version appeared in Proc. of the 5th Canad. Conf. on Comp. Geom. (1993), 405^19. [151] C.K. Yap and T. Dube, The exact computation paradigm. Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds, Lecture Notes Series on Comput., Vol. 1, World Scientific, Singapore (1995), 452^92.
CHAPTER 15
Geometric Shortest Paths and Network Optimization Joseph S.B. Mitchell* Department of Applied Mathematics and Statistics, State University of New York, Stony Brook, NY 11794-3600 E-mail: jsbm @ ams. sunysb. edu; http://www. ams. sunysb. edu/~jsbm/
Contents 1. Introduction 1.1. Shortest paths in graphs 1.2. Approximation algorithms 1.3. Geometric preliminaries 2. Geodesic paths in a simple polygon 2.1. Special structure: Linear-time algorithms 2.2. Other geodesic distance problems 3. Geodesic paths in a polygonal domain 3.1. Searching the visibility graph 3.2. Continuous Dijkstra method 3.3. Approximation algorithms 3.4. Two-point queries 3.5. Other geodesic distance problems 4. Shortest paths in other metrics 4.1. L\ metric 4.2. Link distance 4.3. The weighted region metric 4.4. Minimum-time paths: Kinodynamic motion planning 4.5. Curvature-constrained shortest paths 4.6. Optimal motion of non-point robots 4.7. Multiple criteria optimal paths 4.8. Other optimal path problems 5. On-line algorithms and navigation without maps 6. Shortest paths in higher dimensions 6.1. Complexity 6.2, Special cases
635 636 637 637 639 639 642 643 644 645 646 646 647 648 648 649 650 652 653 655 656 658 659 665 666 667
*This research was largely conducted while the author was a Fulbright Research Scholar at Tel Aviv University, The author is also partially supported by NSF grant CCR-9504192, and by grants from Boeing Computer Services, Bridgeport Machines, Hughes Aircraft, and Sun Microsystems.
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
633
634
J.S.B. Mitchell
6.3. Approximation algorithms 6.4. Other metrics 7. Other network optimization problems 7.1. Optimal spanning trees 7.2. Traveling salesperson problem 7.3. Approximation schemes 7.4. TSP variants and related geometric problems References
668 671 671 672 676 678 679 686
Geometric shortest paths and network optimization
635
1. Introduction A natural and well-studied problem in algorithmic graph theory and network optimization is that of computing a "shortest path" between two nodes, s and r, in a graph whose edges have "weights" associated with them, and we consider the "length" of a path to be the sum of the weights of the edges that comprise it. Efficient algorithms are well known for this problem, as briefly summarized below. The shortest path problem takes on a new dimension when considered in a geometric domain. In contrast to graphs, where the encoding of edges is explicit, a geometric instance of a shortest path problem is usually specified by giving geometric objects that implicitly encode the graph and its edge weights. Our goal in devising efficient geometric algorithms is generally to avoid explicit construction of the entire underlying graph, since the full induced graph may be very large (even exponential in the input size, or infinite). Computing an optimal path in a geometric domain is a fundamental problem in computational geometry, having many applications in robotics, geographic information systems (GIS) (see [135]), wire routing, etc. The most basic form of the problem is: Given a collection of obstacles, find a Euclidean shortest obstacle-avoiding path between two given points. A much broader collection of problems is defined by considering the several parameters that define the problem, including the objective function: How do we measure the "length" of a path? Options include the Euclidean length, Lp length, "link distance", etc. constraints on the path: Are we simply to get from point s to point t, or must we also visit other points or other regions along a path or cycle? input geometry: What types of "obstacles" or other entities are specified in the input map? dimension of the problem: Are we in 2-space, 3-space, or higher dimensions? type of moving object: Are we moving a single point along the path, or is the robot specified by some more complex geometry? single shot vs. repetitive mode queries: Do we want to build an effective data structure for efficient queries? static vs. dynamic environments: Do we allow obstacles to be inserted or deleted, or do we allow obstacles to be moving along known trajectories? exact vs. approximate algorithms: Are we content with an answer that is guaranteed to be within some small factor of optimal? known vs. unknown map: Is the complete geometry of the map known in advance, or is it discovered on-line, using some kind of sensor? In this survey chapter, we discuss several forms of the geometric shortest path problem, primarily for a single point moving in a 2- or 3-dimensional space. We assume that the map of the environment is known, except in Section 5, where we discuss on-line path planning problems.
636
J.S.B. Mitchell
We also discuss other geometric network optimization problems, including minimum spanning trees, Steiner trees, and the traveling salesperson problem. Many versions of these problems are known to be NP-hard; thus, much of our attention is devoted to approximation algorithms. We focus mostly on sequential algorithms in this survey, listing only a few results on parallel algorithms. See the surveys by Atallah and Chen [45], Goodrich [179], and by Reif and Sen [335] for more extensive lists of results on parallel algorithms in geometry. We will freely use the "big-Oh" notation for upper bounds on time and space requirements. We also use "big-Omega" notation for lower bounds. (See [124] for definitions.) We use "0(- • •)" to indicate an upper bound in which we suppress polylogarithmic factors. Many of the results discussed in this survey are also reported, in a more tabular form, in a survey chapter [288] of the recently released CRC Handbook, edited by Goodman and O'Rourke [178]. Finally, we make a disclaimer that our survey concentrates primarily on theoretical results. Some of these results may well imply practical algorithms that may be implementable and useful; however, in many cases, the algorithms are too complex or have too large of a constant buried in the big-Oh notation to be of practical significance. We hope that a future survey will address the important choices and issues facing practitioners in the implementation of geometric shortest path and network optimization algorithms. One of the major issues facing an implementer of any geometric algorithm is, of course, robustness', see the survey by Schirra [352] — Chapter 14 in this Handbook.
1.1. Shortest paths in graphs Shortest paths in graphs and networks are well studied; see, e.g., Ahuja, Magnanti, and Orlin [10]. Here, we mention the case in which all edge weights are non-negative, as this is the most relevant for geometric instances. Then, a standard algorithm given by Dijkstra [139] allows one to compute a tree of shortest paths from any one source node to all other nodes of the graph. Early implementations of Dijkstra's algorithm required time 0(i;^) or 0(^logi;), where v denotes the number of vertices and e the number of edges. Using Fibonacci heaps, Fredman and Tarjan [161] gave an 0{e + v log v) time implementation, and argued that this is optimal in a comparison-based model of computation. Exploiting planarity, Henzinger, Klein, and Rao [198] have obtained a linear-time algorithm for computing all shortest paths from a single source in planar graphs having nonnegative edge weights. There has been some recent progress too in devising new algorithms that differ from Dijkstra's algorithm in that they do not necessarily visit nodes in increasing order of distance from the source node. Thorup [374] has in fact obtained an optimal 0(^)-time algorithm for computing a tree of shortest paths in a graph having integer edge weights; see his paper, as well as the recent article of Raman [327], for a survey of other recent results that led up to this one.
Geometric shortest paths and network optimization
637
1.2. Approximation algorithms Several of the problems we will discuss in this survey are "provably hard" (e.g., NP-hard), meaning that no polynomial-time algorithm is known to exist to solve it. An increasingly popular approach to "solving" NP-hard optimization problems is to obtain provably-good approximation algorithms, which are guaranteed, in polynomial time, to produce an answer that is close to optimal — say, whose objective function value at most some factor c > 1 times optimal, for a minimization problem. Such an approximation algorithm is then called a c-approximation algorithm. (For a maximization problem, a c-approximation algorithm produces a solution whose objective function value is at least (1/c) times optimal.) A polynomial time approximation scheme (PTAS) is a method that allows one to compute a (1 + e)-approximation to the optimal (minimum), in time that is polynomial in n, for any fixed ^ > 0. (In general, the dependence on e may be exponential in (1/6:).) The recent book edited by Hochbaum ([210]) contains several articles surveying the state of knowledge on approximation algorithms for NP-hard problems. In particular, the survey of Bern and Eppstein [65] gives an excellent overview of the subject of approximating NP-hard geometric optimization problems. Approximation algorithms can also be quite useful for problems that are not necessarily NP-hard. First, an approximation algorithm may be considerably simpler and easier to implement than an algorithm that solves the problem to optimality. Further, the running time (both worst-case and average-case) for the approximation algorithm may be much better than the best known for the exact solution, even when the exact algorithm has polynomial running time. Further, approximation algorithms are known for some problems whose complexity status is still open, such as the MAX TSP in the plane and the minimum-weight triangulation problem; see Section 7.
1.3. Geometric preliminaries Throughout the survey, we will have need of some basic terminology, which we outline in this section. First, a path is a continuous image of an interval. A polygonal s-t path is a path from point s to point t consisting of a finite number of line segments {edges, or links) joining a sequence of points {vertices). The length of an s-t path is a nonnegative number associated with the path, measuring its total cost according to some prescribed metric. Unless otherwise specified, the length will be the Euclidean length of the path. A shortest path is then a path of minimum length among all paths that are feasible (satisfying all imposed constraints). We often refer to a shortest path also as an "optimal path" or a "geodesic path". (The word "geodesic" is sometimes used differently, to refer to paths that are "locally optimal", as defined below.) The shortest-path problem induces a metric, the shortest path metric, in which the distance between two points s and t is given by the length of a shortest s-t path; in many geometric contexts, this metric is also referred to as geodesic distance.
638
J.S.B. Mitchell
A simple polygon, P, having n vertices, is a closed, simply-connected region whose boundary is a union of n (straight) line segments (edges), whose endpoints are the vertices of P. A polygonal domain, P, having n vertices and h holes, is a closed, multiplyconnected region whose boundary is a union of n Une segments, forming h + 1 closed (polygonal) cycles. (A simple polygon is a polygonal domain with h = 0.) A triangulation of P is a decomposition of P into triangles such that any two triangles either intersect in a common vertex, a common edge, or not at all. A triangulation of a simple polygon P can be computed in 0(n) time [92]; a polygonal domain can be triangulated in time 0{n \ogn) [326] or 0{n + h log'"^^ h) [55] time. (See the chapter of Bern and Plassman [67] in this handbook, or the survey by Bern [64] for more information on triangulations.) We will use the term obstacle to refer to any region of space whose interior is forbidden to paths. The complement of the set of obstacles is the free space. If the free space is a polygonal domain P, the obstacles are the /i -f 1 connected components of the complement of P (h holes, plus tht face at infinity). A path that cannot be improved by making a small change to it that preserves its combinatorial structure (e.g., the ordered sequence of triangles visited, for some triangulation of a polygonal domain P) is called a locally shortest or locally optimal path. It is also known as a taut-string path in the case of a shortest obstacle-avoiding path. The visibility graph, y G ( P ) , is a graph whose nodes are the vertices of P and whose edges join pairs of nodes for which the corresponding segment lies inside P. An example is shown in Figure 2. Given a source point, s, a shortest path tree, SPT(5', P), is a spanning tree of s and the vertices of P such that the (unique) path in the tree between s and any vertex of P is a shortest path in P. A single-source query is a type of shortest path problem in which a source point, s, is fixed, and for each query (goal) point, t, one requests the length of a shortest path from the source point s to t. The query may also require the retrieval of an actual instance of a shortest s-t path; in general, this can be reported in additional time 0(k), where k is the complexity of the output (e.g., number of edges). One method of handling the single-source query problem is to construct a shortest path map, SPM(5'), which is a decomposition of free space into regions (cells) according to the "combinatorial structure" of shortest paths from a fixed source point s to points in the regions. Specifically, for shortest paths in a polygonal domain, SPM(5') is a decomposition of P into cells such that for all points t interior to a cell, the sequence of obstacle vertices along an s-t path is fixed. In particular, the last obstacle vertex along a shortest s-t path is the root of the cell containing t. Each cell is star-shaped with respect to its root, which lies on the boundary of the cell, meaning that the root can "see" all points within the cell. Typically, we will store with each vertex, v,of P the geodesic distance, d(s,v), from stov, as well as a pointer to the predecessor of v, which is the vertex (possibly s) preceding u in a shortest path from s to v. (The predecessor pointers provide an encoding of the SPT(^, P).) Note that v will appear on the boundary of the star-shaped cell rooted at its predecessor. The boundaries of cells consist of portions of obstacle edges, extension segments (extensions of visibility graph edges incident on the root), and bisector curves. The bisector curves are, in general, hyperbolic arcs that are the locus of points p that are (geodesically) equidistant
Geometric shortest paths and network optimization
639
from two roots, u and v: they satisfy d{s, u) + d2(u, p) = d(s, v) + d2(v, p), where d2(', •) denotes EucHdean distance. (Extension segments can be considered to be degenerate cases of bisector curves.) In Figure 1, the root of the cell containing t is labeled r. If SPM(^) is preprocessed for point location (see the chapter by Goodrich [180] in this handbook), then single-source queries can be answered efficiently by locating the query point t within the decomposition: If t lies in the cell rooted at r, the geodesic distance to t is given by d(s, t) = d(s, r) + d2ir, t). A shortest s-t path can then be output in time 0{k), where k is the number of vertices along the path, by simply following predecessor pointers back from r to s. In a two-point query problem, we are asked to construct a data structure that allows us to answer efficiently a query that specifies two points, s and t, and requests the length of a shortest path between them. In all cases discussed here, an actual instance of a shortest path can be reported in additional time 0(/c), where k is the complexity of the output (e.g., number of edges). A geodesic Voronoi diagram (VD) is a Voronoi diagram for a set of sites, in which the underlying metric is the geodesic distance. See the chapter of Aurenhammer and Klein [46] in this handbook for details about Voronoi diagrams. The geodesic center of P is a. point within P that minimizes the maximum of the shortest-path lengths to any other point in P. The geodesic diameter of P is the maximum of the lengths of the shortest paths joining pairs of vertices of P. Finally, we remark that in most of the algorithmic results reported here, the model of computation assumed has been the real RAM, which assumes that exact operations on real numbers can be done in constant time per operation. We acknowledge that this model is not, in general, realistic. At a couple places in the survey, we will point to results involving bit complexity models.
2. Geodesic paths in a simple polygon We begin by considering the most basic geometric shortest-path problem, that of finding a shortest s-t path inside a simple polygon, P (having no "holes"). The complement of P serves as an "obstacle" through which the path is not allowed to travel.
2.1. Special structure: Linear-time algorithms In this case, simple local optimality arguments, based on the triangle inequality, yield: 1. There is a unique shortest s-t path in a simple polygon P; consequently, SPT(s, P) is unique.
PROPOSITION
We now sketch an 0(n) time algorithm for computing a shortest s-t path within a simple polygon P. We begin with a triangulation of P (0(n) time; [92]), whose dual graph is a tree. The sleeve is comprised of the triangles that correspond to the (unique) path in the dual that joins the triangle containing s to that containing t. By considering the effect of adding
640
J.S.B. Mitchell
Fig. 1. A shortest path map with respect to source point s within a polygonal domain with h = ?>. The heavy dashed path indicates the shortest s-t path, which reaches t via the root r of its cell. Bisector curves are shown in narrow solid curves; extension segments are shown thin and dashed.
Fig. 2. The visibility graph VG{P)\ Edges of VG(P) are of two types — (1) the heavy dark boundary edges of P, and (2) the edges that intersect the interior of P, shown with thin dashed segments. A shortest s-t path is highlighted.
Geometric shortest paths and network optimization
641
Fig. 3. Computing a shortest path in a simple polygon: Splitting a funnel.
the triangles in order along the sleeve, [90,253] have shown how to obtain an 0(n)-time algorithm for collapsing the sleeve into a shortest path. At a generic step of the algorithm, the sleeve has been collapsed to a structure called a "funnel" (with "base" ab and "root" r) consisting of the shortest path from ^ to a vertex r, and two (concave) shortest paths joining r to the endpoints of the segment ab that bounds the triangle abc that is about to be considered (see Figure 3). In adding triangle abc, we "split" the funnel in two according to the taut-string path from r to c, which will, in general, include a segment, uc, joining c to some (vertex) point of tangency, M, along one of the two concave chains of the funnel. After the split, we keep that funnel (with base ac or be) that contains the s-t taut-string path. The work needed to search for u can easily be charged off to those vertices that are discarded from further consideration. The end result is that a shortest s-t path is found in time 0(n), which is worst-case optimal. In order to answer single-source query problems, we are interested in also computing the shortest path map in P. SPM(5') has a particularly simple structure, as the boundaries between cells in the map are simply (line segment) chords of P obtained by extending appropriate edges of the visibility graph VG{P). Guibas et al. [186] have shown how it can be computed in time 0(n), by using somewhat more sophisticated data structures to do funnel splitting efficiently (since, in this case, we cannot discard one side of each split funnel). Then, after storing the SPM(5') in an appropriate 0(n)-size point location data structure (see, e.g., [180]), single-source queries can be answered in 0(log/2) time. Hershberger and Snoeyink [203] have substantially simplified the original algorithm of [186]. The above result can be strengthened even further to the case of two-point queries. Guibas and Hershberger [185] have shown how a simple polygon can be preprocessed in time 0(n), into a data structure of size 0(n), to support shortest-path queries between any two points sjeP.ln time O(logn) the length of the shortest path can be reported, and in additional time 0{k), the shortest path can be reported, where k is the number of vertices
642
J.S.B. Mitchell
in the output path. The method has been simpUfied with a new data structure introduced by Hershberger[200]. 2 ([185,200]). For a simple polygon P having n vertices, there is a data structure of size 0(n) that can be built in time 0(n) so that the length of the shortest path between any two points s,t e P can be reported in time 0(log«), and the shortest path itself can be reported in additional time proportional to its number of vertices.
THEOREM
We should emphasize that the above methods all rely on starting with a triangulation of the simple polygon. Given the complexity of linear-time triangulations of polygons, we pose the following open problem: OPEN PROBLEM 1. Can one devise a simple 0(n) time algorithm for computing the shortest path between two points in a simple polygon, without resorting to a {complicated) linear-time triangulation algorithm!
In the dynamic version of the shortest path problem, one allows the polygon P to change, with the addition or deletion of edges and vertices. If the changes are always made in such a way that the set of all edges yields a connected planar subdivision of the plane into simple polygons (i.e., no "islands" are created), then one can maintain a data structure of size 0(/i) that supports two-point query time of 0(log^ n) (plus 0(k) if the path is to be reported), and update time of 0(log^ n) for each addition/deletion of an edge/vertex [183]. (The result of [183] improves the first results on the dynamic problem, obtained by Chiang, Preparata, and Tamassia [109,110], who gave a data structure achieving 0(\og^n) query and update bounds, using 0(n\ogn) space. The same data structure also gives the best known dynamic point location solution for connected maps, with optimal O(logn) query time.) We turn briefly to some results on parallel algorithms. ElGindy and Goodrich [148] gave a parallel algorithm to compute a shortest path in a simple polygon in time 0(\ogn), using 0(n) processors (in the CREW PRAM model). Goodrich, Shauck, and Guha [181,182] show how, with 0(n/ logn) processors and O(logn) time, one can compute a data structure that supports 0(\ogn) (sequential) time shortest-path queries between pairs of points in a simple polygon. They also give an 0(logn)-time algorithm using 0(n) processors to compute a shortest path tree. Hershberger [201] builds on the results of [181,182] and gives an algorithm for shortest path trees requiring only 0(\ogn) time and 0(n/logn) processors (CREW); he also obtains optimal parallel algorithms for related visibility and geodesic distance problems.
2.2. Other geodesic distance problems The geodesic Voronoi diagram of k sites inside P can be constructed in time 0((n -\k) \og{n + k)), using 0{n) space [320]; this improves an earlier result of Aronov [32] that required time 0((n + k) log(n + k) logn). The furthest-site Voronoi diagram for geodesic distance can also be computed in time 0{in -\-k) \og{n + A:)), and space 0(n + A:), using
Geometric shortest paths and network optimization
643
an algorithm of Aronov, Fortune, and Wilfong [33]. Given that shortest paths in simple polygons require only linear time, it is natural to ask if the superlinear portion of the complexities of these algorithms can be moved to the "^" term; the only lower bound known is Q{n^k\ogk). OPEN PROBLEM 2. Can the geodesic Voronoi diagram {closest-site or furthest-site) for k sites within a simple polygon P be computed in time 0{n-{-k \ogk)l
The geodesic diameter of a simple polygon can be computed in time 0{n), using the method of "matrix searching" in the geodesic distance, as developed by Hershberger and Suri [209]. This algorithm improves an earlier 0{n logn)-time solution given by Suri [366, 185]. Matrix searching also provides a powerful tool for obtaining linear-time solutions to other geodesic distance problems, such as all nearest neighbors and all furthest neighbors. The geodesic center of a simple polygon P can be computed in time 0{n log^ n) [325] (see also [42]); however, it is believed that this bound can be improved. OPEN PROBLEM
3. Can the geodesic center of a simple polygon be computed in 0{n)
timel Shortest paths within simple polygons give a wealth of structural information about the polygon. In particular, they have been used to give an output-sensitive algorithm for constructing the visibility graph of a simple polygon ([199]) and can be used for constructing a geodesic triangulation of a simple polygon, which allows for efficient ray-shooting (see [93,207]). They also form a crucial step in solving link distance problems (Section 4.2).
3. Geodesic paths in a polygonal domain In contrast to the situation in simple polygons, where there is a unique taut-string path between any two points, in a general polygonal domain P, there can be an exponential number of taut-string (locally optimal) simple paths between two points. A special case of the shortest path problem in polygonal domains is that in which the "homotopy type" of the desired path is specified, e.g., by giving the sequence (possibly with repetitions) of the N visited triangles, in some triangulation of P. In this case, Hershberger and Snoeyink [203] have shown how to compute a shortest path of the given homotopy type in time 0(N), using a generalization of the linear-time methods in simple polygons. This problem is of interest in applications to VLSI routing problems; see [123, 163,256]. To compute a shortest path in general polygonal domains, with no constraints on the homotopy type, we must efficiently search over all possible "threadings" of paths. We discuss two methods below that have been used to do so: searching the visibility graph (see Figure 2), and performing a "continuous Dijkstra" search of the domain.
644
J.S.B. Mitchell
3.1. Searching the visibility graph Since we can make "point" holes in P at 5 and t, we can assume, without loss of generality, that s and t are vertices of P. Using simple local optimality arguments, it is easy to show: PROPOSITION 3. Any locally optimal s-t path in a polygonal domain P must lie on the visibility graph VG{P)\ it consists of a union of straight line segments joining pairs of visible vertices.
Early algorithms to construct the visibihty graph required time 0{rp-\ogn) [252], and were based on a radial sweep about each vertex of P. The time complexity came from the use of n independent radial sortings of the vertices. Later improvements by Welzl [385] and by Asano et al. [38] gave a time bound O(n^). These methods were based on the use of point-line duality, which allowed the n sortings to be done more efficiently, in 0{n^) time overall, by constructing the arrangement of the n lines that are dual to the vertices of P. But, given that the number. Eye, of edges in the visibility graph may be much smaller than its worst-case quadratic size (in particular. Eye may be only linear in n), researchers pursued "output-sensitive" algorithms to compute it in time that is a function of EyC' Hershberger [199] studied the special case of visibility graphs in simple polygons, obtaining an 0(£'vG)-time and 0(n)-space algorithm to compute the visibility graph of a simple polygon. Overmars and Welzl [313] obtained a relatively simple 0{EyG^ogn)time method, requiring 0{n) space. Then, Ghosh and Mount [173] obtained an algorithm with worst-case optimal running time, 0{EyG + n log^z), using OiEyc) working storage space. More recently, Pocchiola and Vegter [324] and Riviere [345] have given algorithms to compute the visibility graph in optimal time ( 0 ( £ ' V G + n\ogn)) and optimal space (0(n)). Once we have computed the graph VG{P), whose edges are weighted by their Euclidean lengths, we can use Dijkstra's algorithm' to construct a tree of shortest paths from s to all vertices of P, in time 0{EyG + n \ogn) [161,142]. Thus, Euclidean shortest paths among obstacles in the plane can be computed in time 0{EyG-\-n\ogn). This bound is worst-case quadratic in n, since Eye ^ (2)^ r»ote too that domains exist with Eye = ^(n^). If our goal is to obtain the shortest path map, then, given the tree of shortest paths from s, we can compute SPMC^y) in time 0(n \ogn) [282]. Another method based on visibility graphs leads to an algorithm whose running time is only linear in n, while being quadratic in the number, /i, of holes in P. Kapoor, Maheshwari, and Mitchell [238] have given an 0(n -h /i^ logn)-time, 0(n)-space algorithm, using visibility graph techniques developed by Rohnert [347,346] for convex obstacles, and visibility "corridor" structure developed by Kapoor and Maheshwari [237]. There has been an effort for many years to characterize which graphs correspond to visibility graphs of some geometric domain. For example, it is an interesting open problem to characterize the class of graphs that can be realized as the visibility graph of a simple ' In practice, it may be faster to apply the A* heuristic search algorithm (e.g., see Pearl [322]), using the straightline Euclidean distance as heuristic function, /i() (which is a lower bound, so it implies an "admissible" algorithm).
Geometric shortest paths and network optimization
645
polygon; see, e.g., Abello and Kumar [1], Ghosh [172], and O'Rourke and Streinu [312] for some recent results and some pointers to related work. For further information on visibility, visibility graphs, and their use in shortest path problems, we refer the reader to the survey of Alt and Welzl [20], the survey (on visibility) by O'Rourke [310], and the Chapter 19 on visibility by Asano, Ghosh, and Shermer [41] in this Handbook. 3.2. Continuous Dijkstra method Instead of searching the visibility graph (which may have quadratic size), an alternative paradigm for shortest-path problems is to construct the (linear-size) shortest path map directly. The continuous Dijkstra method [278-280,282,283,291,292] was developed for this purpose. Building on the success of the method in solving (in nearly linear time) the shortest-path problem for the L\ metric (see Section 4.1), Mitchell [284,286] developed a version of the continuous Dijkstra method applicable to the Euclidean shortest-path problem, obtaining the first subquadratic (0(n^/^+^)) time bound. Subsequently, this result was improved by Hershberger and Suri [205,206], who achieve a nearly optimal algorithm based also on the continuous Dijkstra method. They give an 0{n logn) time and 0{n logn) space algorithm, coming close to the lower bounds of Q{n-\-h log/i) time and 0{n) space. The continuous Dijkstra paradigm involves simulating the effect of a "wavefront" propagating out from the source point, s. The wavefront at distance S from s is the set of all points of P that are at geodesic distance 8 from 5. It consists of a set of curve pieces, called wavelets, which are arcs of circles, centered at obstacle vertices that have already been reached. At certain critical "events," the structure of the wavefront changes due to one of the following possibilities: (1) (2) (3) (4)
a wavelet disappears (due to the "closure" of a cell of the SPM); or a wavelet collides with an obstacle vertex; or a wavelet collides with another wavelet; or a wavelet collides with an obstacle edge at a point interior to that edge.
It is not difficult to see from the fact that SPM(^) has linear size that the total number of such events is 0{n). The challenge in applying this propagation scheme is in devising an efficient method to know what events are going to occur and in being able to process each event as it occurs (updating the combinatorial structure of the wavefront). One approach, used in [284,286], is to track a "pseudo-wavefront," which is allowed to run over itself, and "clip" only when a wavelet collides with a vertex that has already been labeled due to an earlier event. Detection of when a wavelet collides with a vertex is accomplished with range searching techniques, at a cost of 0(^^-^+^) per query. This leads to an overall running time of 0(n-^/^+^), for any fixed 6: > 0, using 0{n) space. An alternative approach, used in [205,206], simplifies the problem by first decomposing the domain P using a "conforming subdivision," which allows one to propagate an "approximate wavefront" on a cell-by-cell basis. A key property of a conforming subdivision is that for any edge (of length L) of the subdivision, there are only a constant number of (constant-sized) cells within geodesic distance L of it.
646
J.S.B. Mitchell
While the algorithm of [206] is optimal worst-case time when there are a large number of obstacles (e.g., h = Q{n)), it fails to be optimal in its space complexity {0{n\ogn)) and in its complexity as a function of n and h. One of the most intriguing open problems here is to obtain an (optimal) algorithm whose running time asymptotically matches the lower bound ofQ{n-^h log h), while using only 0{n) space. Currently, the only algorithm known that is linear in n is also quadratic in h [238]. OPEN PROBLEM 4. Can one solve the Euclidean shortest-path problem in 0{n + h \ogh) time and 0(n) spacel
3.3. Approximation algorithms Efficient methods to approximate the Euclidean shortest path, in time O(nlogn), have existed for some time. Clarkson [120] gave an algorithm that spent 0{{n\ogn)/e) time to build a data structure of size 0(n), after which a (1 -h 6:)-approximate shortest path query could be answered in time 0{n logn -h n/e). (These bounds rely also on an observation in [94].) Using a related approach, based on approximating Euclidean distance with fixed orientation distances (see Section 4.1), Mitchell [279,283] gave a method requiring 0{(n logn)/v^) time and 0{n/yfe) space to give an approximate Euclidean shortest path. Chen, Das, and Smid [96] have shown an Q{n \ogn) lower bound, in the algebraic computation tree model, on the time required to compute a (1 -h £)-approximate shortest path; they also give Q{n \ogn) lower bounds on computing various types of "r-spanners," which are graphs that, for every pair of points, contain a path whose length is at most t times the interpoint distance (Euclidean, geodesic, etc.); see the survey on spanners in this handbook by Eppstein [151], as well as [80,107,350].
3.4. Two-point queries Two-point queries in a polygonal domain are much more challenging than the case of simple polygons, where optimal algorithms are known. One approach, observed by Chen, Daescu, and Klenk [95], is to proceed as follows. Using O(n^) space, we can store the shortest path map, SPM(i;, P), rooted at all n vertices. Then, for any s and r, we can use the visibility complex of Pocchiiola and Vegter [323] to compute the set of ks vertices visible to s and kt vertices visible to f, in time 0{K\ogn), where K = min{ks, kt} (using a standard "lock step" computation of the visibility from the two points). Then, assuming that K = ks, we simply locate t in each of the ks SPM's rooted at the vertices visible from s. This permits two-point queries to be answered in time 0 ( ^ logn), which is ^(n \ogn) in the worst case, making this method no better than starting the computation from scratch. However, this approach may be effective in cases in which K may be expected to be small. A recent study by Chiang and Mitchell [108] has yielded more efficient query times, with various tradeoffs between preprocessing time and space. They use a visibility-based approach to achieve query time 0(logn + h) using 0(n^) preprocessing time and space.
Geometric shortest paths and network optimization
647
They also achieve optimal query time, O(logn), using high polynomial space (roughly n^^), and they achieve slightly sublinear query time, using 0(n^'^^) space. These results utilize an "equivalence decomposition" of the domain P, so that for all points z within a cell of the decomposition, the shortest path maps with respect to z are topologically equivalent. Then, for given query points s and t, one locates s within the decomposition, and then uses the resulting SPM, along with a parametric point location data structure, to locate t within the SPM with respect to s. Unfortunately, the complexity of the decomposition can be quite high; there can be ^(n^) topologically distinct shortest path maps with respect to points within P. Unfortunately, the upper bound is still considerably higher than this; obtaining tight bounds remains an interesting open question. Approximations have also been useful in attacking the two-point query problem. As observed in [94], the method of Clarkson [120] can be used to construct a data structure of size O(n^), in 0(n^logn) time, so that two-point (1 + 6:)-optimal queries can be answered in time O(logn), for any fixed e > 0. Chen [94] was the first to obtain nearly linear-spsice data structures for approximate shortest path queries; these were obtained, though, at the cost of a higher approximation factor. He obtains a (6 + 6^)-approximation, using 0(r?l^I log^/^ n) time to build a data structure of size 0(n logn), after which queries can be answered in time O(logn). (Within this time bound, the approximate length is reported; in additional time proportional to the number of vertices, a path can be reported that achieves the length bound.) These results have been improved recently by Arikati et al. [21], who give a family of results, based on planar spanners (see [151]), with tradeoffs among the approximation factor and the preprocessing time, storage space, and query time. One such result obtains a (3\/2 + 6:)-approximation using 0(r?l^ j log^^^ n) time to build a data structure of size 0{n logn), after which queries are performed in time O(logn). For other results, and for bounds that apply to other metrics {Lp metrics), we refer the reader to the paper. OPEN PROBLEM 5. How efficiently, and using what size data structure, can one preprocess a polygonal domain for exact two-point queries? Can exact two-point queries be done in sublinear query time using subquadratic storage? Can O(I)-approximate twopoint queries be done in polylogarithmic time, using nearly linear storagel
3.5. Other geodesic distance problems The geodesic Voronoi diagram of k sites inside P can be constructed in time 0((n -1k) \og{n + k)), using the continuous Dijkstra method, simply starting with multiple source points [206]. While the geodesic center/diameter problem has been carefully examined for the case of simple polygons (Section 2), we are unaware of results (other than brute force) for polygonal domains: OPEN PROBLEM 6. How efficiently can one compute a geodesic center/diameter for a polygonal domain!
648
J.S.B. Mitchell
4. Shortest paths in other metrics So far, we have considered only shortest path problems in the Euclidean metric. We turn now to other possible objective functions for measuring the length of a path.
4.1. L\ metric The Lp metric defines the distance between q = (q^^qy) and r = (rx,ry) by dp(q, r) = [|^x —^x\^ -^\^y — fy\^V^^' The Lp length of a polygonal path is the sum of the Lp lengths of each edge of the path. Special cases of the Lp metric include the L\ metric (Manhattan metric) and the Loo metric {dooiq, r) = niax{|^jc — fxlA^y — ^yl))A polygonal path with each edge parallel to a coordinate axis is called a rectilinear (or isothetic) path. (For a rectilinear path, the L\ and L2 lengths are identical.) A natural generahzation of the notion of a rectilinear path is that of C-oriented paths, having each edge parallel to one of a set C of c = |C| fixed orientations. (See Widmayer, Wu, and Wong [386], who initiated the study of fixed orientation metrics in computational geometry.) As with Euclidean shortest paths, algorithms for computing shortest paths in the L\ metric fall into two general categories: searching a sparse "path preserving graph" (analogous to a visibility graph), or applying the continuous Dijkstra paradigm or tracking a wavefront. Clarkson, Kapoor, and Vaidya [122] showed how to construct a sparse graph, having 0{n\ogn) nodes and O(nlogn) edges, that is path preserving in that it is guaranteed to contain a shortest path between any two vertices. Applying Dijkstra's algorithm then gives an 0{n \o^n) time {0{n \ogn) space) algorithm for L\ shortest paths. (Alternatively, one gets 0{n\o^^^n) time and OinXog'^^n) space.) Using observations in [98,99] the timespace tradeoff has been improved to yield somewhat improved bounds of 0(nlog^/^n) time and 0{n \ogn) space. The continuous Dijkstra paradigm has also been applied to the L \ shortest path problem, resulting in the computation of the SPM(^) in time 0(/i logn), using 0{n) space [279,283]. The special property of the L \ metric that is exploited in this algorithm is the fact that the wavefront in this case is piecewise-linear, with "wavelets" that are line segments of slope di 1, so that the first vertex hit by a wavelet can be determined efficiently using rectangular range searching techniques (e.g., see [91]). Two-point query problems have also been studied for the L \ geodesic metric. In a simple rectilinear polygon, Lingas, Maheshwari, and Sack [259] and Schuierer [353] give optimal algorithms, achieving O(logn) query time (0(1) for vertex-to-vertex queries), using 0{n) preprocessing time and space; an optimal path can be reported in additional 0{k) time, where k is the number of links. (A previous algorithm of de Berg [131] achieved optimal query time using O(nlogn) space and preprocessing.) Their methods are based upon a histogram decomposition of the polygon and yield a path that is "smallest" — simultaneously optimal in both the L\ and rectilinear link metric (see also [158,274], as well as Section 4.7). They also yield an 0{n) algorithm for computing the L\ geodesic diameter and furthest neighbors for all vertices. Further, the algorithm of Lingas, Maheshwari, and
Geometric shortest paths and network optimization
649
Sack [259] is actually based on an optimal parallel (EREW PRAM) algorithm that preprocesses a polygon (with a given trapezoidization) in time 0(log/t), using 0(n/\ogn) processors. Two-point queries in a polygonal domain, under the L i metric, have been studied by Chen, Klenk, and Tu [98,99], who have shown how a polygonal domain can be preprocessed, using 0{n^\o^n) time and 0{n^\ogn) space, so that two-point queries can be answered in time 0(log^ n). The special case in which obstacles are disjoint axis-aligned rectangles has been studied by Atallah and Chen [44,43] and by ElGindy and Mitra [149]; 0(\ogn) query time is achievable, using 0{n^) preprocessing time and space, or O(v^) query time is achievable, using 0{Tr'f^) preprocessing time and space. In fact, they give parallel algorithms: with 0(n^/logn) CREW processors, a data structure of size 0{n^) can be built that permits two-point queries to be answered in time 0(\o^n) on a single processor ([43]). Mitra and Bhattacharya [298] and Chen and Klenk [97] have obtained approximation in the special case of disjoint rectangular obstacles; [97] describe a method achieving O(logn) query time for a 3-approximate query, using 0{n\ogn) space and 0{n log^ n) preprocessing time. (If the query points are both obstacle vertices, then the query time is only 0(1).) Arikati et al. [21] have recently obtained approximation results for two-point queries in polygonal domains, as we mentioned already in the Euclidean case. Their results apply also to L^ metrics, where they obtain various tradeoffs between space and time resources, to achieve approximation factors that are c + e, 2c -f e, or 3c + e, where c = 2*^^~^^/^ (so c = 1 for the L\ metric). Methods for finding L\ shortest paths often generalize to the case of C-oriented paths, in which c = |C| fixed directions are given. Shortest C-oriented paths can be computed in time 0{cn logn) [279,283]. Two-point queries can be answered in query time 0(c^ log^ n), after 0(c^n^ log^ n) time and space preprocessing [95]. Since the Euclidean metric is approximated to within accuracy 0(l/c^) if we use c equally spaced orientations, this results in an algorithm to compute, in time 0 ( ( n / ^ ) l o g n ) , a path guaranteed to have length within a factor (1 + e) of the Euchdean shortest path length [279,283]. Clarkson [120] gave an alternative approximation algorithm based also on discretizing directions that computes an e-optimal (Euclidean) shortest path in time 0(n/£ + nlogn), after spending 0((n/6) logn) time to build a data structure of size 0(n/6).
4.2. Link distance The link distance within P from 5 to n s the minimum number of edges in an s-t path in P. If the paths are restricted to be rectilinear or C-oriented, then we speak of the rectilinear link distance or C-oriented link distance. A min-link s-t path is a polygonal path from s to t that achieves the link distance. In many problems, the link distance provides a more natural measure of path complexity than the Euclidean length. The link distance also has applications to curve simplification [187,222,295]. Since this handbook contains a chapter by Maheshwari, Sack, and Djidjev [271] devoted entirely to the subject of link distance, we refer the reader to that survey for further information.
650
JS.B. Mitchell
4.3. The weighted region metric In the "weighted region problem", we are given a piecewise-constant function, f '.W?' ^^ 9^, that is defined by assigning a nonnegative weight to each face of a given triangulation in the plane. The weighted length of an s-t path n is the path integral, /^ /(jc, y) da, of the weight function along n. The weighted region metric associated with / defines the distance df{s, t) to be the infimum over all s-t paths n of the weighted length of jr. The weighted region problem (WRP) asks for an s-t path of minimum weighted length. The WRP is a natural generalization of the shortest-path problem in a polygonal domain: Consider a weight function that assigns weight 1 to F and weight oo (or a sufficiently large constant) to the obstacles (the complement of P). The WRP models the minimumtime path problem for a point robot moving in a terrain of varied types (e.g., grassland, brushland, blacktop, bodies of water, etc.), where each type of terrain has an assigned weight equal to the reciprocal of the maximum speed of traversal for the robot. We usually assume that / is specified by a triangulation having n vertices, with each face assigned an integer weight a G { 0 , 1 , . . . , W, +00}. (We can allow edges of the triangulation to have a weight that is possibly distinct from that of the triangular facets on either side of it; in this way, "linear features" such as "roads" can be modeled.) Using an algorithm based on the continuous Dijkstra method, Mitchell and Papadimitriou [292] show how to find a path whose weighted length is guaranteed to be within a factor of (1 + 6:) of optimal, where e > 0 is any user-specified degree of precision. The time complexity of their algorithm is 0{E • 5), where E is the number of "events" in the continuous Dijkstra algorithm, and S is the complexity of performing a numerical search to solve the following subproblem: Find a (1 + £)-shortest path from s io t that goes through a given sequence of k edges of the triangulation. It is shown that E = Oin"^) and that there are examples where E can actually achieve this upper bound. The numerical search can be done using a form of binary search that exploits the local optimality condition: An optimal path bends according to "Snell's Law of Refraction" when crossing a region boundary. (The earliest reference we have found to the use of Snell's Law in optimal route planning applications is to the work of Warntz [384].) This leads to a bound ofS = 0(k^ loginNW/e)) on the time needed to perform a search on a A:-edge sequence, where N is the largest integer coordinate of any vertex of the triangulation. Since one can show that k = O(w^), this yields an overall time bound of O(^i^L), where L = \og(nNW/e) can be thought of as the bit complexity of the problem instance. Various special cases of the weighted region problem admit faster and simpler algorithms. In the case that region weights are restricted to {0, 1, 00] (while edges may have arbitrary (nonnegative) weights), then an 0(n^)-time algorithm can be based on constructing a path-preserving graph similar to a visibility graph, as shown by Gewali et al. [169]. This also leads to an efficient method for performing lexicographic optimization, in which one prioritizes various types of regions according to which is most important for path length minimization. Lee, Yang, and Chen [254] consider the case in which the plane has weight 1, while each of a set of pairwise-disjoint rectilinear polygonal "obstacles" has a weight greater than 1, indicating that it is more costly to travel through it than to go around it. They apply the techniques of [122], searching a path-preserving graph, to obtain an algorithm for minimum-cost rectilinear paths that takes time 0(nlog^n) (with space 0(nlogn)) or
Geometric shortest paths and network optimization
651
0(n log-^/^ n) (with 0{n log^/^ n) space). A path-preserving graph approach can also be appHed to the more general case of rectilinear paths in an arbitrarily weighted rectilinear subdivision, to yield efficient algorithms for single-source and two-point queries. Specifically, Chen, Klenk, and Tu [98] give an 0(nlog^/^n)-time algorithm to construct a data structure of size 0{n logn), permitting 0(logn)-time single-source queries to be answered; for two-point queries, they use 0(n^ log^ n) space and preprocessing time, and answer queries in time O(log^n). In recent experimental investigations, Mata and Mitchell [273] and Lanthier, Maheshwari, and Sack [247], have shown the practicality of solving the WRP using very simple methods based on searching a discrete graph which is assured of containing an approximately optimal path. One graph is based on discretizing the edges of the subdivision, placing evenly-spaced new (Steiner) vertices along each edge, with separation at most weighted length 5. The vertices on the boundary of each (convex) facet are interconnected (possibly implicitly) with a complete graph. Searching the resulting graph for a shortest path results in an approximate shortest path; the error is at most KS, where K is the number of segments in the path. Another option (in [273]) is to construct a "pathnet" graph, based on tracing k evenly-spaced "refraction rays" (that obey Snell's Law) out of each original vertex, and linking that vertex to one vertex (or "critical entry point") within each of the k refraction cones defined by the rays. As k increases, the pathnet more closely approximates a complete set of optimal paths connecting pairs of vertices. The experimental studies suggest that these methods are practical and are readily implementable, and that the observed dependence of the approximation factor on the algorithm parameters (5 or A:) is better in practice that the worst-case bounds may suggest. Further, the graphs that are searched can be precomputed and stored, allowing reasonably efficient solutions to two-point queries. The reported path can also be postprocessed with a local optimality procedure that results in a solution even closer to optimal. Using a slightly different discrete graph than the edge subdivision graph of [247,273], Aleksandrov et al. [11] give alternative time bounds that depend on other parameters related to the "fatness" of the triangular facets of a weighted polyhedral surface. They place Steiner points along edges in a geometric progression, as Papadimitriou [317] has done for approximating shortest paths in three dimensions (Section 6.3). This allows one to compute a (1 + £)-approximate shortest path from s io t in time 0{MnlogMn + nM^) (and space O(nM^)), where M = 0 ( ^ ^ ^ log ^ ) , X is the length of a longest edge, h is the minimum altitude of a triangular facet, 6 is the smallest angle of any triangular facet, W is the maximum (resp., minimum) weight of a facet, and 0 < ^ < ^ + ^ - (See also Section 6.3, where the same method is mentioned in the unweighted case.) Note that, while the dependence on e and on geometric precision parameters is substantially worse than in the algorithm of Mitchell and Papadimitriou [292], the worst-case dependence on n is much better. (If, as in [292], the coordinates have integral values at most N, then sin 0 = 0(1/N^) and h = 0(l/N), making the time bound roughly 0 ( ^ ^ ^).) An improved variant of their result ([12]) searches a reduced subgraph, allowing them to remove the additive term nM^ in the complexity, resulting in time bound 0{Mn log Mn) (roughly 0 ( ^ ^^))' Several other papers have also addressed practical and effective (possibly heuristic) methods for the WRP; see the work by Alexander and Rowe [13-15] and a recent pair
652
J.S.B. Mitchell
of papers by Kindl, Shing, and Rowe [239,240], which report practical experience with a simulated annealing approach to the WRP. Johansson [229] has implemented a version of the edge subdivision method (also investigated by [247,273]) and studied its use in fluid flow computations for injection molding. Papadakis and Perakis [315,314] have generalized the WRP to the case of time-varying maps, where both the weights and the region boundaries may change over time; they obtain generalized local optimality conditions for this case and propose a search algorithm to find good paths.
4.4. Minimum-time paths: Kinodynamic motion planning Our discussion so far has focussed on path planning problems with holonomic constraints — those that are completely specified in terms of the robot's configuration, which is described by a A:-vector, if the robot has k degrees of freedom. In non-holonomic motion planning, the constraints on the robot are specified in terms of a non-integrable equation involving also the derivatives of the configuration parameters. For example, non-holonomic constraints may specify bounds on the robot's velocity, acceleration, or the curvature of its path. See Latombe [248] and Li and Canny [258] for more a more detailed discussion of non-holonomic constraints and motion planning. The kinodynamic motion planning problem (also known as the minimum-time path problem) is a non-holonomic motion planning problem in which the objective is to compute a trajectory (a time-parameterized path, (JC(0, >'(^))) within a domain P that minimizes the total time necessary to move from an initial configuration (position and initial velocity) to a goal configuration (position and velocity), subject to bounds on the allowed acceleration and velocity along the path. The problem formulation is intended to model the fact that real mobile robots have a bounded acceleration vector and a maximum speed. In its general form, it is a difficult optimal control problem; optimal paths will be complicated curves given by solutions to differential equations. The bounds on acceleration and velocity are most often given by upper bounds on the Loo norm (the "decoupled case") or the L2 norm (the "coupled case"). Exact solutions to the kinodynamic motion planning problem are known in one dimension (O'Dunlaing [306]) and in two dimensions (Canny, Rege, and Reif [82]). The algorithm of [82] is for the decoupled case (Loo bounds on velocity and acceleration); it requires exponential time and polynomial space. Their method is based on characterizing a set of "canonical solutions" (related to "bang-bang" controls) that are guaranteed to include an optimal solution path. This leads to an expression in the first-order theory of the reals, which can then be solved exactly in exponential time. It remains open, however, whether or not a polynomial-time algorithm exists in two dimensions. For three or more dimensions, the problem is at least NP-hard, as implied by the lower bounds of Canny and Reif [83]. Approximation methods have been developed by Donald et al. [141], who have given a polynomial-time algorithm that produces a trajectory requiring time at most (1+6:) times optimal, for the decoupled case. Their approach is to discretize (uniformly) the fourdimensional phase space that represents position and velocity, with special care to ensure that the size of the grid is bounded by a polynomial in \/s and n. They prove that shortest
Geometric shortest paths and network optimization
653
paths in the induced grid graph are guaranteed to be close to optimal. The running time of their algorithm has been improved by Donald and Xavier [140]. Approximation algorithms for the coupled case have been given independently by Donald and Xavier [140] and by Reif and Tate [340]. By using a non-uniform discretization of J-dimensional configuration space, Reif and Wang [337] have obtained an approximation algorithm with a time complexity that improves that of [140], reducing the dependency on £ from 0((l/6:)^^~^) to 0((lA)4^-2).
4.5. Curvature-constrained shortest paths Related to the kinodynamic motion planning problem is the problem of finding shortest paths subject to a bound on their curvature. The curvature-constrained shortest-path problem is to compute a shortest obstacle-avoiding smooth (C^) path joining point s, with prescribed orientation, to point t, with prescribed orientation, such that for every subinterval of the path, the average curvature is at most 1. (The average curvature of a path p : I -^ ?il^ in the interval [u\,U2]^ I is defined to ho \\pXu\) — p\u2)\\/\ui — U2\, where the parameter u denotes arc length.) Placing a bound on the curvature can be thought of as a means of handling an upper bound on the acceleration vector of a point robot (e.g., an idealized aircraft) whose speed is constant, or can be thought of as the constraint imposed when modeling a car-like mobile robot having a minimum turning radius. The complexity of solving the general problem in a polygonal domain has been open until very recently; Reif and Wang [338] have shown that it is NP-hard in a polygonal domain having n vertices, each having coordinates specified by n^^^^ bits. Since the general problem is difficult to solve exactly, algorithms for restricted versions of the problem, as well as approximation algorithms, have been the topic of recent investigations. Early investigations into the problem were by Dubins [145], who characterized shortest curvature constrained paths in the absence of obstacles: a shortest path consists of a sequence of at most three segments, each of which is a straight line segment ("S") or an arc of a unit radius circle ("C"), with the allowable sequences being CCC, CSC, or a subsequence of one of these two. Reeds and Shepp [333] extended this result, obtaining a characterization of shortest paths in the case in which the robot is allowed to move in reverse, as well as forward. Boissonnat, Cerezo, and Leblond [76] give an alternative method of obtaining characterizations in both cases, based on optimal control theory. (See also [368].) Approximation algorithms for a shortest "e-robust" path were given by Jacobs and Canny [227,228]. (See also Barraquand and Latomb [56].) Here, "e-robust" roughly means that small perturbations of certain points along the path do not cause the path to penetrate an obstacle. They place points that discretize the boundaries of the polygonal obstacles and connect these points by paths ("jumps") of standard shapes (circular arcs and straight 3
2
segments); the resulting algorithm takes time 0 ( ( ^ ) l o g n + TI)' where 8 is the spacing of the discretization points on the boundary; 8 controls the robustness of the path as well as the degree of approximation. They also give an alternative quadtree-based algorithm, having complexity 0(n^ logn -h (|)^). Wang and Agarwal [383] give time bounds that do not depend on the length parameter 8: they give (1) an 0((^)^ log n)-time algorithm that
654
J.S.B. Mitchell
produces a feasible path (not necessarily 6:-robust) that is at most {l-\-e) times the length of a shortest 6:-robust path; and (2) an 0((|)^-^ logn)-time algorithm that produces a feasible path that is (e/2)-robust, with length at most (1 + e) times the length of a shortest 6:-robust path. For the special case in which the obstacles are "moderate" (have differentiable boundary curves, with radius of curvature at least 1), Agarwal, Raghavan, and Tamaki [8] give an algorithm requiring time 0(/i^logn) to compute exactly a shortest curvature-constrained path from a starting configuration (position-orientation pair) to a goal location (no orientation specified), and an algorithm requiring time 0{n^ \ogn -h ^) for computing an approximate shortest path (having length at most e greater than optimal) between two configurations. Boissonnat and Lazard [78] obtain exact algorithms between two configurations for moderate obstacles whose boundaries consist of unit-radius circular arcs and straight segments. If the boundary arcs (straight or curved) are each of length at least some constant, then their algorithm requires time 0(«^log/2); otherwise, the complexity is 0{n^\ogn). (Their algorithm remains polynomial even if the obstacles are not pairwise disjoint.) Sellen [357] uses a simple discretization of the unit square to search, in 0(6:"^) time, for a path among a set of constant-complexity obstacles that is "e-approximate" (which roughly means that it is within factor (1 -f e) of being shortest, while maintaining an sclearance from obstacles and obeying an approximate (up to e) curvature constraint). He also provides a decision procedure to determine the existence of a curvature-constrained path, in time polynomial in the reciprocal of a parameter that measures the difference between the radius of curvature in the constraint and the supremum of all radii for which a constrained path exists. For the special case of curvature-constrained paths inside a convex polygon having n vertices, Agarwal et al. [4] use a careful characterization of the structure of shortest paths to obtain an algorithm with running time 0{n log^ n). Their result may be an important first step towards the solution of the more general problem inside a simple polygon: OPEN PROBLEM 7. How efficiently can one compute a curvature-constrained shortest path in a simple polygon?
Boissonnat et al. [77] examine curvature-constrained motion in a convex polygon (with m vertices), having a single simple polygonal hole (with n vertices). They compute, in time 0(m + n), a cycle surrounding the hole having the minimum possible curvature. Wilfong [387,388] considers the case in which the robot is to follow a given network of lanes, specified by a set of m line segments in free space, among a set of obstacles (having a total of n vertices). The robot is allowed to turn from one segment to another along a circular arc, of radius ^ rmin, if the two lanes intersect and the robot does not collide with the obstacles. In Wilfong [387], a polynomial-time (0(m^(n^ -\- logm))) algorithm is given for preprocessing, after which, in O(m^) time, one can report a path (if one exists) having a minimum number of turns. (See also Mirtich and Canny [277].) Wilfong [388] shows that the problem of finding a minimum-length curvature-constrained path on a set of lanes is NP-complete; however, he also gives a dynamic programming algorithm to compute a shortest path (in time 0(m^n^)) for a given (feasible) sequence of turns (e.g., to optimize, locally, the path produced by the algorithm in [387]).
Geometric shortest paths and network optimization
655
Fortune and Wilfong [160] give an exponential-time algorithm for determining if a curvature-constrained path exists between two configurations, assuming the robot is not allowed to reverse; their algorithm solves this reachability question in time and space 20(poiy(n,m))^ where n is the number of vertices in the polygonal obstacles, and m is the total number of bits required to specify the vertices. Sellen [356] shows that the existence of a curvature-constrained path can be decided in time that is polynomial in J~.|^ and W~ ^, where dmm is the smallest distance between obstacle features and W = |7? — /?^|//? is the "relative width" of the problem, relating the maximal curvature, R~^, with the critical curvature, R~\ which is the infimum over the curvatures R~^ for which a curvatureconstrained path (with constraint R~^) exists. Sellen also shows how to approximate the critical curvature R~^ to within any relative error ^ > 0, and to produce a corresponding path; the algorithm is polynomial in n and Rc/s. If the robot following the path is allowed to reverse direction, then Laumond [249] has shown that it is always possible to obtain a curvature-constrained path from ^ to Mf the s and t lie in the same open, path-connected component of free space. Further, when allowing reversals, Laumond et al. [250] give an algorithm that determines a path (if one exists), producing a path having a local optimality property. Desaulniers [138] shows that, in the presence of reversals, in may be that no shortest path exists, even when there is a feasible path. Svestka and Overmars [369] also study problems of planning routes for car-like robots, using a "probabilistic learning paradigm." All of the discussion so far has been for paths in a two-dimensional environment. For three-dimensional spaces, Sussmann [367] gives a characterization of curvatureconstrained shortest paths. Polynomial-time approximation algorithms for three and higher dimensions are given by Reif and Wang [337], by applying their discretization techniques developed for the kinodynamic motion planning problem. Another interesting open area of research on curvature-constrained optimal paths is to consider network optimization problems in the curvature-constrained model. For example, we may desire a traveling salesperson tour (cycle) of minimum length, subject to the curvature constraint (see Section 7.2): OPEN PROBLEM 8. What is the complexity of the curvature-constrained TSP for points in the unit squarel What is the best approximation algorithm that can be given for the probleml
4.6. Optimal motion of non-point robots So far, we have considered only the problem of optimally moving si point robot. If the robot is modeled as a circle, or as a nonrotating polygon, then many of the results carry over by simply applying the standard configuration space approach in motion planning: "shrink" the robot to a (reference) point, and "grow" the obstacles (using a Minkowski sum) so that the complement of the grown obstacles model the region of the plane for which there is no collision with an obstacle if the robot has its reference point placed there. Chew [106] has examined the specific case of a circular robot; Hershberger and Guibas [202] have
656
J.S.B. Mitchell
considered more general convex robots, obtaining essentially quadratic-time algorithms for optimal paths under translation. Optimal motion of rotating non-circular robots is a much harder problem. Even the simplest case of moving a (unit) line segment (a ladder) in the plane is highly nontrivial. One notion of "optimal" motion requires that we minimize the average distance traveled by a set of k fixed points, evenly distributed along the ladder. This "J^-distance" in fact defines a metric (for k^2). The special case of A: = 2 is the well-known Ulam'sproblem, for which optimal motions have been fully characterized, in the absence of obstacles, by Ickingetal. [217]. The case of /: = oo is an especially interesting case, requiring that we compute a minimum work motion of a ladder; however, no results are known yet for this problem. (The work measures the integral (over A. € [0,1]) of the path length, L(A), for each infinitesimal subsegment of length dX.) O'Rourke [308] has studied a restricted case of the ^oo-optimal motion problem. 9. Characterize the doo-optimal (minimum-work) motion for a ladder that is allowed to translate and rotate in the plane. What if it is restricted to move within a polygonal domain! OPEN PROBLEM
While d\ does not define a metric, several cases of d\ -motion, and its generalization of measuring the distance traveled by any fixed "focus" F on the ladder, have been studied. In particular, if F is restricted to move on the visibility graph of a polygonal environment, Papadimitriou and Silverberg [318] (see also Sharir [360]) have obtained polynomial-time algorithms. Without restrictions, minimizing the d\ -distance, for any F not at an endpoint of the ladder, is NP-hard, but there exists an approximation algorithm; see Asano, Kirkpatrick, and Yap [40]. OPEN PROBLEM 10. Does minimizing the d\-distance of a ladder endpoint remain NPhardl Also, is it NF-hard to obtain a di-optimal motion of a ladder in a polygonal domain!
Chen and lerardi [101] have studied a velocity-constrained version of the problem of moving a ladder, such that no point of the ladder is allowed to have its speed exceed a given bound, and the objective is to minimize the time required to move the ladder from one configuration to another. For the case of no obstacles, they give a complete characterization of the optimal motion and give an explicit construction. See also the related work of Reister and Pin [343], who study time-optimal motion of mobile robots having independently controlled wheels.
4.7. Multiple criteria optimal paths The standard shortest-path problem asks for paths that minimize some one objective (length) function. Frequently, however, an application requires us to find paths to minimize two or more objectives; the resulting problem is a bicriteria (or multi-criteria) shortestpath problem. A path is called efficient or Pareto optimal if no other path has a better value for one criterion without having a worse value for the other criterion.
Geometric shortest paths and network optimization
657
For example, in mobile robotics applications, we may wish to find a path that simultaneously is short in (Euclidean) length and has few turns. Note that a minimum-link path may be far from optimal with respect to Euclidean length; similarly, a shortest Euclidean length path may have thousands of links, while there exists a path joining start and goal that has only 2 links. Multi-criteria optimization problems tend to be difficult. Even the bicriteria path problem in a graph is NP-hard [165]: Does there exist a path from s io t whose length is less than L and whose weight is less than Wl Pseudo-polynomial time algorithms are known, such as the algorithm of Hansen [191], who finds all Pareto-optimal paths in a graph, in time polynomial in the number of paths and n. Experimental studies suggest that the average number of Pareto-optimal paths remains very small in practice, although in theory this number may be exponential. Various heuristics have also been devised; e.g., see Handler and Zang [190] and Henig [197]. In geometric problems, various optimality criteria are of interest, including any pair from the following list: Euclidean (L2) length, rectilinear (Li) length, other Lp metrics, link distance, total turn, etc. NP-hardness lower bounds are known for several versions, including: [30] (1) Find a path in a polygonal domain whose L2 length is at most L, and whose "total turn" is at most 7; (2) Find a path in a polygonal domain whose Lp length is at most Xp and whose Lq length is at most Xq {p^q)\ and (3) Given a subdivision of the plane into red and blue polygonal regions, find a path whose length within blue regions is at most B and whose length within red regions is at most R. One problem of particular interest is to compute a Euclidean shortest path within a polygonal domain, constrained to have at most k links. No exact solution is currently known for this problem. Part of the difficulty is that a minimum-link path will not, in general, lie on the visibility graph (or any simple discrete graph). Furthermore, the computation of the turn points of such an optimal path appear to require the solution to high-degree polynomials. OPEN PROBLEM 11. For a polygonal domain {with holes) what is the complexity of computing a shortest k-linkpath between two given points?
For a given k (k ^ di, where di is the s-t link distance), one can compute a path in a simple polygon P whose length is guaranteed to be within a factor (1 + 6:) of the length of a shortest /:-link path, for any tolerance s > 0. The algorithm runs in time 0(n^k^ log {Nk/e^'^)), polynomial in n and k, and logarithmic in \/s and the largest integer coordinate N of any vertex of P [294]. Within the same time bound, one can compute an ^-optimal path under any (single) combined objective, f(L,G), where L and G denote link distance and Euclidean length, and / is an increasing function in G for each L. Aside from the problem of computing a shortest ^-link path, one may ask if there always exists Sin s-t path that is simultaneously close to Euclidean shortest and minimum-link? In a simple polygon, such a path always exists and can be computed efficiently (in time 0(n)): There is an s-t path whose link length is within a factor of 2 of the link distance from s to t, while also having Euclidean length within a factor of A/2 of the Euclidean shortest-path length [31]. A corresponding result is not possible for polygons with holes. However, in
658
JS.B. Mitchell
0(kEyQ) time, one can compute a path in a polygonal domain having at most 2k links and length at most that of a shortest A:-link path [294]. In a rectilinear polygonal domain, some of these bicriteria path problems become easier, since there is a path-preserving graph (grid). In particular, efficient algorithms are known for the bicriteria path problem that combines rectilinear link distance and L i length. Yang, Lee, and Wong [390] and Chen, Daescu, and Klenk [95] give efficient algorithms for computing a shortest ^-link rectilinear path, a minimum-link shortest rectilinear path, or any combined objective that uses a monotonic function of rectilinear link length and Li length in a rectilinear polygonal domain. Single-source queries can be answered in time O(logn), after 0(n log^^^ n) preprocessing time to construct a data structure of size 0(n logn) [95]; two-point queries can be answered in time O(log^n), using 0(n^\og^n) preprocessing time and space [95]. (See also the survey article of Lee, Yang, and Wong [255] on the subject of rectilinear path problems.) A related problem is studied by de Berg et al. [133, 134], who give efficient algorithms in two or more dimensions for computing optimal paths among a set of axis-parallel (possibly crossing) line segment obstacles according to a "combined metric," defined to be a linear combination of rectilinear link distance and L\ path length: In the plane, using O(n^) preprocessing time and 0(n logn) space, a data structure for a fixed source point can be computed, so that path length queries to a goal point can be answered in time 0{\ogn). (Note, however, that optimal paths in this metric are not equivalent to the Pareto-optimal solution paths.) It would be interesting to study the complexity of the problem in a more general setting: OPEN PROBLEM 12. How efficiently can one compute a (general) polygonal path in a polygonal domain, under a combined metric cost function that takes into account Euclidean length, the number of turns, and possibly the amount of turningl
4.8. Other optimal path problems We briefly mention some various other optimal path problems: (1) In the sailor's problem, the goal is to compute a minimum-cost path, where the cost of motion is direction-dependent, and there is a cost L per turn (in a polygonal path). For L = 0, Sellen [355] gives an algorithm for computing optimal paths in a polygonal domain, in time O(n^) times a bit complexity term. Sellen also considers the case in which L > 0, obtaining a (1 + ^)-approximation algorithm that requires time polynomial in n and If a. See also the study by Rowe [349] on anisotropic weighted regions. (2) In the maximum concealment path problem, the goal is to determine a path within a polygonal domain P that minimizes the length during which the robot is exposed to a given set of v "enemy" observers. This problem is a special case of the weighted region problem, in which weights are 0 (for travel in concealed free space), 1 (for travel in exposed free space), or oo (for travel through obstacles). Gewali et al. [169] use visibility graph methods, based on the local optimahty conditions, to obtain polynomial-time algorithms for this problem. In a simple polygon, their time bound is 0(i;^(i; + n)^)\ in a polygonal domain, the bound becomes 0(i;^w^).
Geometric shortest paths and network optimization
659
(3) In the minimum total turn problem, the goal is to compute a polygonal s-t path that minimizes the sum of the absolute values of the turn angles at its vertices. This problem is solved in polynomial time {0{EyG logn) time, 0{EyG) space) by reducing it to a shortest path problem in an augmentation of a visibility graph [30]. (See also Section 7.4, on angular-metric traveling salesperson problems.) (4) In iho^ fuel-consuming problem, one is given a set of n point sites in the plane and the goal is to find a "cheap" polygonal path from one site to another, with the vertices of the path being restricted to the set of point sites. The cost of a path, though, is not measured in terms of its Euclidean length, but in terms of a more general cost function, l(p,q), which assigns a nonnegative cost to a flight from ptoq. Naturally, one can compute a minimumcost path in time 0(n^) simply by searching the complete graph for a shortest path. However, it turns out that more efficient algorithms that exploit geometry are possible, if we assume that /(•, •) has some simple properties: its description is of size 0(1) and l(p, q) can be evaluated in 0(1) time, and l(p, q) < l(p, q') if and only if d2{p, q) < d2(p, q') (where d2{-, •) denotes Euclidean distance). Efrat and Har-Peled [147] show that a cheapest route can be computed in time 0(n^-^+^), for any fixed s > 0). Further, they show that if the cost function grows with at least a quadratic rate as a function of Euclidean distance (i.e., l(p, q) = (d2(p, q))^ • f(d2(p, q)), where /(•) is a positive, nondecreasing function), then it suffices to search the Gabriel graph (a subgraph of the Delaunay triangulation) of the point sites; thus, cheapest routes can be found in time 0(n logn) in this case. (5) In the problem of shortest paths in an arrangement, one is given a set of n lines in the plane, and points s and t on the lines, and must compute a shortest s-t path that is contained within the union of the lines. Since the arrangements can be computed in time O(n^) (see the chapter on arrangements by Agarwal and Sharir [2]), and shortest paths in planar graphs can be computed in linear time ([198]), the problem is trivially solved in time O(w^). It is an intriguing open question if there exists a subquadratic-time algorithm. There has been partial progress towards addressing this question: Bose et al. [79] give a 2-approximation algorithm that requires 0{n logn) time, and Eppstein and Hart [152] give an algorithm for computing an exact shortest path in time 0{n-\- k^), where k is the number of different line orientations. (6) In the asteroid avoidance problem, one is given a set of obstacles, each moving along a fixed (known) trajectory, and the problem is to find a minimum-time obstacle-avoiding path for a point robot that is subject to a velocity bound. This problem was first studied by Reif and Sharir [336], who show that the general problem is PSPACE-hard in three dimensions and that the two-dimensional problem can be solved in exponential time in the case of pure translational motion. Canny and Reif [83] prove that the two-dimensional problem is NP-hard, even for convex translating obstacles, moving with fixed velocity, that do not collide. (Effectively, the fact that the obstacles are moving lifts the dimension of the problem from two to three, making it substantially more difficult; see Section 6.) Canny [81] has given a PSPACE algorithm to solve the asteroid avoidance problem. 5. On-line algorithms and navigation without maps In all of the optimal path problems we have discussed so far, we have assumed that we know in advance the exact layout of the environment in which the robot moves; i.e., we assume
660
J.S.B. Mitchell
we are given a perfect map. In many situations, the robot does not have prior information about the obstacles in the environment; e.g., the robot may be placed in a completely new environment, or it may roam on a factory floor or an office building where there are frequent changes in the positions of obstacles. In such cases, we may have perfect information about the robot's current location, as well as the location of the goal, but we acquire information about the environment on-line, as the robot encounters or senses obstacles. Common assumptions about the sensory capabilities of the robot include (1) a tactile robot, in which the robot learns of the boundary of an obstacle only as it encounters it, and moves along it; or a (2) vision-based robot, in which the robot learns of obstacles only as it is able to see them. (It is common to assume that the robot has 360-degree vision, allowing it to look in all directions; however, this assumption may be relaxed as well.) For a visionbased robot, there are also different assumptions that can be made about the nature of the sensor: (a) it may be that it knows only about that portion of the obstacle boundaries that it has seen; or (b) it may be that it has recognition capabilities, so that as soon as it sees any part of the boundary of an obstacle, it is able to determine the shape, size, and position of the obstacle, thereby learning the entire obstacle boundary. Our goal is to obtain a navigation strategy that controls the motion of the robot, while utilizing sensory input, in order to minimize some notion of length (e.g., Euclidean length) of the path of the robot, which is to get from a start point, 5, to a goal (target) location, t (which may be a point, a line, a region, etc.). The environment is assumed to be a polygonal domain, P, that is unknown to us. Often, there is very special structure assumed about the obstacles that constitute the holes of P, Some of the first work that obtained worst-case bounds on the length of a path produced by a navigation strategy was that of Lumelsky and Stepanov [268,269]. They give navigation strategies for a tactile robot moving among a set of arbitrary obstacles. The robot is assumed to know, at any given time, its own position, the position of the goal, and whether or not it is in contact with an obstacle; it is assumed to have only a small constant-size memory for recording other information that is learned along the way. One simple strategy ("BUGl"), attempts to head towards the goal until an obstacle is encountered; then, the robot follows the boundary of the obstacle, all the way around the perimeter, keeping track of the point p that is closest to the goal; finally, the robot returns to point p (by following the boundary) and heads again towards the goal. This strategy finds a path whose length is at most d2{s, t) -\-\L, where L is the sum of the perimeters of the obstacles that intersect a disk of radius diis, t) centered at t. Within their model, they also prove a lower bound, showing that no strategy can guarantee a path length better than d2{s, t) -\- L — e, fox any ^ > 0. A second strategy ("BUG2") attempts to stay on the straight segment ~st, at the cost of possibly visiting obstacles more than once. BUG2 is shown to produce a path of length at most d2{s, t) -j- ^ - ^ ^ , where ni is the number of times Ji crosses the /th obstacle, and Li is the perimeter of the /th obstacle. For convex obstacles, BUG2 is essentially optimal in their model. See also [130] for some further work on an extension of the LumelskyStepanov model. Other papers on maze traversal strategies include [75,328], as well as the surveys of Lumelsky [265-267]. While the Lumelsky-Stepanov result gives a worst-case additive error bound on the robot's path length, it does not give a bound on the ratio between the robot's path length and the (true) shortest path length, d{s,t', P), in P An order to evaluate the effectiveness
Geometric shortest paths and network optimization
661
of a navigation strategy, a, in an on-line setting, it is now common to use the notion of a competitive ratio, p(n), where n = d2(s,t) here denotes the EucHdean distance between s and t, and the ratio p(n) is defined by where da(s, t; P) is the length of the s-t path produced by strategy or in P, and we assume that a unit diameter circle can be inscribed in each obstacle. In other words, our goal is to minimize the ratio between the length of the path obtained using the strategy to the length of a shortest path (with perfect information); the competitive ratio p(n) is the maximum value of this ratio, over all environments having a given start-to-goal distance n. The competitive ratio, in this context, has been studied first by Papadimitriou and Yannakakis [319], and independently by Eades, Lin, and Wormald [146]. In particular, [319] show that if the obstacles are all axis-aligned squares, and the robot is equipped with a vision sensor, then one can achieve a competitive ratio of p(n) = ^y^ -f o(l), for all n. (The bound is 5/3 if 5* and t are points having the same x- or j-coordinate.) If the obstacles are in fact aligned unit squares, they prove that p(n) is at least 3/2, while supplying a strategy that achieves p(n) = 3/2 -h o(l), for all n. (It is now known that a ratio of p(n) = 3/2 is possible for square obstacles, even if they have different sizes and are not axis-aligned; see the citation of Chan and Lam [87] below.) Further, by an adversary argument, they show that, for arbitrary (e.g., "thin") aligned rectangular obstacles,^ there is no strategy with a bounded competitive ratio, for a robot with line-of-sight vision. In fact, in [146, 319], it is shown that if the goal region t is an infinite vertical line ("wall"), at distance n from s, and the obstacles are aligned rectangles, then p(n) = Q{^). Blum, Raghavan, and Schieber [74] provide a "sweep algorithm" for this wall problem that shows a matching upper bound of p{n) = 0(->/n), both for a vision-based robot and for a tactile robot (utilizing a "doubling" search procedure, suggested by Baeza-Yates, Culberson, and Rawlins [49]). If the obstacles are aligned rectangles having aspect ratio at most / and longest side at most g (and shortest side at least 1), then Mei and Igarashi [275] give an "adjusted bias heuristic" that achieves competitive ratio 1 + | / + o(l), if / = o(v^) and fg = o(n), assuming s and t have a common x- or >'-coordinate (the competitive ratio is slightly higher otherwise). (See also [276].) Blum et al. [74] also study the "room problem", in which P consists of an n-by-n (aligned) square room, with aligned rectangular holes (obstacles). For the room problem, they give an algorithm achieving p(n) = 0(2^^^^^"). Bar-Eli et al. [54] have improved upon this result, establishing a tight bound of p(n) = O(logn), for deterministic algorithms. The wall and room problems can be combined, resulting in a competitive ratio of p(n) = 0(-s/n) for point-to-point navigation among aligned rectangular obstacles. While, for deterministic algorithms, we have the tight bound p(n) = 0 (V^) for the competitive ratio in both the wall and point-to-point versions of the problem, it has been shown by Berman et al. [62] that randomized strategies are "powerful", in that one can obtain a competitive ratio of 0(/2^/^log/i) for the wall and point-to-point navigation problems among aligned rectangular obstacles. For randomized strategies, we define p(n) to be the ^ Note that if the obstacles (holes of P) are rectangles or squares, they are disjoint, but allowed to touch; however, the robot can "squeeze" between two touching obstacles. Thus, we cannot synthesize nonconvex obstacles by putting together rectangular obstacles. Also, unless otherwise stated (e.g., in the "room problem") we are assuming that P is the infinite plane, with holes that are the obstacles; i.e., there is no outer boundary of P.
662
J.S.B. Mitchell
supremum of the ratio of the expected path length to d(s, t; P), assuming that P is selected by an oblivious adversary, with knowledge of the strategy, but not of the coin tosses made during a walk using the strategy. Berman and Karpinski [63] obtained a randomized strategy for general convex obstacles with competitive ratio 0(n^^^). Blum and Chalasani [71] have shown that if the robot is to make multiple trips from s to r, it can make effective use of information gained on each trip, allowing it to improve its performance as it learns more about the environment. In particular, they show a strategy in which, for every i ^ n, the ith trip of the robot is a path of length 0(y/n/i) times d(s,t; P). Their results apply to the wall problem, as well as the point-to-point problem, in the presence of aligned rectangular obstacles. They also provide a lower bound, for deterministic strategies, of ^(y/n/k) on the cumulative k-trip competitive ratio (which measures the ratio of the total length of all k trips, over k times d{sj\ P)). If the obstacles are arbitrary nonaligned rectangles, then the competitive ratio for the room problem goes up: Blum et al. [74] show that p{n) = Q{^)\ they also give (nontight) upper bounds that either assume an excluded range of orientations of the rectangles, or allow a randomized algorithm. If the nonaligned rectangles have aspect ratio at most r, then a strategy of Chan and Lam [87] obtains a competitive ratio of (^ + 1), which is shown to be tight. In particular, in the case of nonaligned squares (r = 1), Chan and Lam's result implies a competitive ratio of 3/2, improving the earlier bound of Papadimitriou and Yannakakis [319]. An asymptotic competitive ratio of 3/2 has been obtained by Bezdek [69] for the case of nonaligned cubes in three dimensions; this result in fact implies the two-dimensional result for squares. For even more general environments P, Blum et al. provide some results in special cases of convex obstacles, as well as general polygonal domains ("mazes"), where the competitive ratio is ^(|V|), where V is the set of vertices of P. A simple "L-shaped" maze example shows that even a randomized algorithm cannot achieve a competitive ratio better than (| V| — 10)/6. Blum et al. also consider the three-dimensional version of the wall problem, obtaining a lower bound of C2 {n^^^) for the competitive ratio, and matching upper bounds in special cases (obstacles that are generalized cylinders, in the wall problem, or aligned boxes, in the point-to-point problem). Berman et al. [62] show that randomization can, again, help, allowing a strategy with competitive ratio 0{n^^^~^') for the point-to-point and wall problems. The on-line version of the weighted region problem (Section 4.3) has been studied by Reif and Wang [341], who consider an environment in which the axis-aligned rectangular "obstacles" are penetrable, with each having a weight (cost per unit distance) greater than one (the background has weight one). Using a modified sweeping strategy of Blum et al. [74], they show that a competitive ratio of O(v^) is achievable in the wall problem with penetrable obstacles (and this is tight). See their paper for generaUzations to "recursive" weighted environments, in which penetrable obstacles may include other penetrable obstacles of higher weight. In the search version of the on-line problem, our objective is to search for an entity at some unknown target location in an unknown environment, minimizing the total distance traveled from the starting point, until the visually identifiable target is first seen; see [49, 234,243].
Geometric shortest paths and network optimization
663
While for general simple polygons P, no constant competitive ratio is possible when searching for a target t, Klein [242] has shown that if one is navigating in a special type of simple polygon, called an s-t street (for s and t on the polygon boundary), then there is a strategy for searching for a path from s to t that achieves a competitive ratio of l + | 7 r ^ 5 . 7 1 . (Points s and t split the boundary of P into two subchains; P is an 5-f street if each point on one subchain is visible from some point on the opposite subchain.) Here, both P and the coordinates of t are unknown to the robot; the robot is equipped with a vision sensor, and we assume that the goal t is visually identifiable. Streets (as well as "star-shaped polygons"; see below) enjoy the special property that in the tree of shortest paths from s, left-turning paths and right-turning paths are grouped. Klein's strategy is based on the idea of minimizing the "local absolute detour," while moving from one point known to be on the shortest s-t path to another such point. Klein's analysis was improved by Icking [215], who proved a bound of n/2 + y 1 + n^/A ^ 4.44 on the competitive ratio. Kleinberg [243] gives a simpler strategy and analysis, achieving a competitive ratio of .61, and shows further that it achieves an optimal ratio of \/2 in the case of rectilinear streets. Lopez-Ortiz and Schuierer [261] present a strategy, similar to Klein's, having a substantially simpler analysis, resulting in a ratio of TT + 1 ^ 4 . 1 4 ; they show that a hybrid strategy based on this one achieves a ratio of ^VTT^ + 47r -}- 8 ^ 2.76. LopezOrtiz and Schuierer [260] have given a further improved strategy, using ideas similar to Kleinberg's (but with a substantially more complex analysis), achieving competitive ratio y i + (l+7r/4)^ ^ 2.05. Lopez-Ortiz and Schuierer [263] have given an extension of the original approach of Klein, to "continuous local absolute detour," that results in a competitive ratio of 2.03; further, by combining this approach with their earlier method ([260]), Lopez-Ortiz and Schuierer obtain a hybrid strategy achieving competitive ratio of L73. Most recently, Semrau [358] has developed a strategy that results in a competitive ratio of 7r/2 ^ 1.57, which is getting very close to the theoretical lower bound of \f2. OPEN PROBLEM
13. Is there a strategy achieving a competitive ratio of ^/l in streets!
The results on searching in streets discussed above have assumed that the robot does not know the location of the target t. For such problems, it is easy to show that V2 is a lower bound on the competitive ratio (see Klein [243]). However, Lopez-Ortiz and Schuierer [260] have shown a V2 lower bound on the competitive ratio for deterministic strategies, even if the coordinates of the target are known to the robot and the street is rectilinear. Thus, for rectilinear streets, knowledge of the target location does not assist the robot. Lopez-Ortiz and Schuierer [264] give a strategy with a constant competitive ratio (12.72) that finds a path to a target point in an unknown star-shaped polygon,^ even if the coordinates of the target point are unknown, and it is not necessarily on the polygon's boundary. They also prove a lower bound of 9 on any strategy that must find a path in an unknown starshaped polygon to a target point whose coordinates are not specified. Star-shaped polygons, like streets, enjoy the property that the left-turning and right-turning paths in the shortest path tree rooted at s are grouped. Note too that a star-shaped polygon can be made into A polygon is star-shaped if there exists a point within it from which all other points of the polygon are visible.
664
J.S.B. Mitchell
an s-t street, for any vertex s, by adding, if necessary, a vertex t such that the diagonal st intersects the kernel."* Some results are also known for more general polygons than streets or star-shaped polygons. Datta and Icking [129] introduced the notion of a "generalized street;" for rectilinear generalized streets they give an algorithm with competitive ratio of \/82 ^ 9.06 (or 9, in the L\ metric) and prove a lower bound of 9 on the competitive ratio of any strategy, assuming the target t is not known to the robot. (A simple polygon P is a generalized street (^-street) with respect to two points s and t on its boundary if for any point p on the boundary of P, there exists a horizontal chord, whose endpoints are on different subchains of the boundary, such that p is weakly visible to the chord. The class of generalized streets strictly contains the class of streets.) Lopez-Ortiz and Schuierer [260] show a lower bound of 9 even in the case that the coordinates of the target are known. Datta, Hipke, and Schuierer [128] define even more generalized notions of rectilinear streets ("HV-streets" and "^-^-streets"), for which they prove bounds in the L\ metric: 14.5 is an upper and lower bound on the competitive ratio for HV-streets, while 19.97 is an upper bound for ^-^-streets. (See also Schuierer [354] for lower bounds on the competitive ratio in 0-Qstreets.) Lopez-Ortiz and Schuierer [262] give a competitive strategy (with ratio 80) in arbitrarily oriented (nonrectilinear) ^-streets. Kleinberg [243] considers searching in general rectilinear simple polygons, obtaining a strategy with competitive ratio 0(m), where m is the number of essential cuts, which may be much smaller than the number of vertices. Streets have also been studied with respect to searching in link distance, instead of L2 or L\ length. Ghosh and Saluja [174] give a deterministic strategy for searching for an s-t path in a street, using at most 2m — 1 links, where m is the link distance from ^ to ^ Further, they show that this bound is best possible for deterministic strategies in general streets. For rectilinear streets, a rectilinear link distance of m + 1 is achievable, and this is best possible; here, m is the rectilinear link distance from siot. Ghosh and Saluja observe that in general (non-street) simple polygons, no competitive ratio better than n/A is possible, where n is the number of vertices. On-line path problems arise also for objectives other than that of finding a path from a start 5 to a target point t. Icking and Klein [216] have given a competitive strategy for the problem of searching for the kernel of an unknown star-shaped polygon; the goal is for the robot to get to some point of the kernel. (A vision-equipped robot can recognize when it reaches a point in the kernel.) The competitive ratio is based on the distance from s to the point of the kernel that is closest to s. Icking and Klein [216] obtain a ratio of 5.48 (which they have subsequently improved slightly); they also prove a lower bound of V2 (which was subsequently increased to 1.48 by [264]). The best current bound is that of Shin et al. [362], who obtain a competitive ratio of 1 + 2 ^ 2 ^ 3.829. Lopez-Ortiz and Schuierer [264] give a constant competitive ratio (of 46.35) for the on-line recognition of a star-shaped polygon, in which the robot must execute a path until it can prove or disprove the star-shapedness of P. They also show a lower bound of 9 on the competitive ratio of any such strategy. In the explore (or mapping) version of the problem, our objective is to execute a path such that the robot can map out the entire space, by seeing every point of free space; see The kernel of a polygon P is the locus of points within P from which every point of P is visible. If the kernel is non-empty, then the polygon is star-shaped.
Geometric shortest paths and network optimization
665
[136,243]. (See also Section 7.4 on the "watchman route problem," which is the off-line version of the problem, to compute a shortest route that sees the entire space when the map is given.) In particular, Deng, Kameda, and Papadimitriou [136] have shown that no competitive strategy exists, in general, if there are an unbounded number of obstacles; however, if the number of obstacles is bounded, they obtain a competitive strategy with a constant competitive ratio (0(k), where k is the number of obstacles). In particular, if P is a simple rectihnear polygon, there is a 2-competitive deterministic algorithm [136, 137], and a 5/4-competitive randomized algorithm [243] for the exploration problem. For general simple polygons, the competitive ratio of [136] is proved to be constant, but is only estimated to be in the thousands. A bound of 133 was later given by Hoffman et al. [211], and has recently been improved to (18\/2 + 1) < 26.5 by the same set of authors [212]. Kalyanasundaram and Pruhs [231] study the search and explore problems for a visionequipped robot among a set of k disjoint convex obstacles having average aspect ratio^ a. They obtain tight bounds on the competitive ratio for both problems: ^(min{^, V ^ } ) . (In the mapping problem of [231], the robot is required to see all of the boundary of the work space, but not necessarily all of its interior; this is in contrast with the mapping problem of [136].) They also show that the natural greedy "nearest neighbor" heuristic for the search problem can be quite bad, showing an Q{2^) lower bound on the competitive ratio for that strategy. In the visual traveling salesperson problem (visual TSP), the robot's objective is to visit and traverse the boundary of every obstacle; this formulation is meant to model the fact that a robot (equipped with a vision sensor) may have to get close to an object in order to map it completely. For the visual TSP, Kalyanasundaram and Pruhs [232] give a 19-competitive algorithm, based on applying their 18-competitive algorithm for the "online TSP" in planar graphs to a type of "relative neighborhood graph" in the presence of obstacles. (See also [233].) For other related work, without theoretical guarantees on the competitive ratio, but useful in autonomous vehicle navigation, we refer the reader to the book edited by Iyengar and Elfes [225], as well as [226,281,293,329,330]. Mitchell [281] has considered a model, based on a special case of the weighted region problem (Section 4.3), in which the robot gathers information, which it accumulates in a map, and at each step applies the best possible local strategy, assuming travel within known free space has a cost-per-unit-distance of 1, while travel in unexplored terrain has cost a > 1 per unit distance. For a recent survey of on-line searching and navigation algorithms, see Berman [61].
6. Shortest paths in higher dimensions We turn our attention now to the problem of computing shortest paths in higher dimensional geometric spaces. Most of the discussion will focus on three-dimensional spaces, since most effort has been devoted to this case. We begin with a few definitions. A polyhedral domain is a connected subset, P, of 9^^ whose boundary consists of a union of a finite number of triangles. (The definition is readily extended to d dimensions, where the boundary must consist of a union of "simplices.") The complement of P consists of ^ Here, the aspect ratio of a convex body is the ratio of the radius of the smallest circumscribing circle to the radius of a largest inscribed circle.
666
J.S.B. Mitchell
connected (polyhedral) components, which are the obstacles. A polyhedral domain is orthohedral if each boundary facet is orthogonal to one of the coordinate axes. A polyhedral domain P is a (convex) polytope if it is the convex hull of its vertices. A polyhedral surface is a connected union of a finite number of polygonal faces, with any two polygons intersecting in a common edge, a common vertex, or not at all, and each edge belonging to exactly two polygons. Throughout this section, n will denote the number of edges in a polyhedral domain or surface. Without loss of generality, we can assume that all faces of a polyhedral surface are triangles, since a polygon triangulation algorithm can be applied to decompose each polygonal face into triangles, introducing a total of 0(n) additional edges and faces.
6.1. Complexity In three or more dimensions, most shortest-path problems are very difficult. The problem is difficult even in the most basic Euclidean shortest-path problem in a three-dimensional polyhedral domain P, and even if the obstacles are convex, or the domain P is simply connected. There are two sources of complexity, as we now discuss. One difficulty arises from algebraic considerations. In general, the structure of a shortest path in a polyhedral domain need not lie on any kind of discrete graph. Shortest paths in a polyhedral domain will be polygonal, with bend points that generally lie interior to obstacle edges, obeying a simple "unfolding" property: The path must enter and leave at the same angle to the edge. It follows that any locally optimal subpath joining two consecutive obstacle vertices can be "unfolded" at each edge along its edge sequence, thereby obtaining a straight segment. (The edge sequence of a path is the ordered list of obstacle edges that are intersected by it.) Given an edge sequence, this local optimality property uniquely identifies a shortest path through that edge sequence. However, to compare the lengths of two paths, each one shortest with respect to two (different) edge sequences, requires exponentially many bits, since the algebraic numbers that describe the optimal path lengths may have exponential degree [51,52]. A second difficulty arises from combinatorial considerations. The number of combinatorially distinct (i.e., having distinct edge sequences) shortest paths between two points may be exponential. Canny and Reif [83] have used this fact to prove that the shortest-path problem is NP-hard, even if the obstacles are simply a set of parallel triangles. While this result is strong evidence that we will not be able to solve the problem exactly in polynomial time, it does not rule out the possibility that we could construct a shortest path map in time proportional to its combinatorial size, which may be exponential in general, but far smaller in many practical cases. OPEN PROBLEM 14. Can one compute a shortest path map for a polyhedral domain in output-sensitive timel
Sharir and Schorr [361] gave a doubly exponential time (2^ " ) exact algorithm, based on reducing to an algebraic decision problem in the theory of real closed fields. This result was improved by Reif and Storer [339], who give a singly exponential time algorithm
Geometric shortest paths and network optimization
667
(requiring 2" time and /^^(log^) space), based on the same theory, but using a more efficient reduction. Finally, Canny [81] has given a PSPACE algorithm, which applies not only to the shortest path problem in three dimensions, but also to the two-dimensional asteroid avoidance problem (see Section 4.8). Given the difficulty of solving the general problem exactly, it is natural to consider approximation algorithms for the general case, or to consider special cases in which we can obtain polynomial bounds.
6.2. Special cases If the polyhedral domain P has only a small number, k, of convex obstacles, a shortest path can be found in rP^^"^ time, as shown by Sharir [359]. If the obstacles are known to be "vertical buildings" having only k different heights, then shortest paths can be found in time O (^ ^^ ~ ^) [ 170]; however, it is not known if this version of the problem is NP-hard if k is allowed to be large. Both of these special cases have worst-case exponential algorithms; is there some nontrivial case of disjoint obstacles in three dimensions that is not hard to solve exactly? We have noted that Canny and Reif's hardness proof applies even to simple (convex) triangular "plates" that lie in parallel planes; however, their construction seems to rely on some edges of the triangles not being axis-parallel. This suggests an interesting question: OPEN PROBLEM 15. What is the complexity of the Euclidean shortest-path problem in 3spacefor obstacles that are disjoint aligned boxesl What about for disjoint {unit) sphere si
If we require paths to stay on a polyhedral surface (i.e., the domain P is essentially 2-dimensional), then the unfolding property of optimal paths can be exploited to yield polynomial-time algorithms. This was first used by Sharir and Schorr [361] to obtain an 0(n^ logn)-time algorithm for convex surfaces. Mitchell, Mount, and Papadimitriou [291] obtained an 0(n^ log n)-time algorithm for general polyhedral surfaces, by developing a continuous Dijkstra method of propagating a shortest path map over the surface, taking advantage of the local optimality (unfolding) property. Chen and Han [100] have improved the time bound even further, obtaining an algorithm requiring 0(n^) time and O(^) space. (The algorithm of [100] relies on the nonoverlapping property of the "star unfolding", as shown by Aronov and O'Rourke [34]; see below.) These algorithms not only construct a shortest path map with respect to a single source, but can be used to construct a geodesic Voronoi diagram for multiple source points within the same time bound (where n now includes the number of source points). One of the most interesting open problems in this area is to break the quadratic time barrier, even for the case of convex poly topes: 16. Can one compute shortest paths on the surface of a convex polytope in 9^^ in sub quadratic timel In 0{n logn) timel
OPEN PROBLEM
Note added in proof: Kapoor [236] has announced a recent advance on this problem.
668
J.S.B. Mitchell
Several facts are known about the set of edge sequences corresponding to shortest paths on the surface of a convex polytope P in 9fl-^. In particular, Mount [300] has shown that the worst-case number of distinct edge sequences that correspond to a shortest path between some pair of points is 0{n^). Further, Agarwal et al. [3] have shown that the exact set of such sequences can be computed in time 0(n^P(n) logn), where P(n) = o(log* n). (A simpler O(n^) algorithm can compute a small superset of the sequences [3].) The number of maximal edge sequences for shortest paths is @(n^), as shown by Schevon and O'Rourke [351]. Some of these results depend on a careful study of the "star unfolding" with respect to a point p on the boundary, dP, of P. The star unfolding is the (nonoverlapping [34]) cell complex obtained by subtracting from dP the shortest paths from p to vertices of P, and then "flattening" the resulting boundary. Agarwal et al [3] have also shown that two-point queries can be answered in time 0((v^/m^/^)logn), after spending 0(n^m^+^) preprocessing time and storage, for any choice of 1 ^ m ^ n^, and 5 > 0. (If one query point always lies on an edge of the polytope, the algorithm can be improved to use 0(n^m^^^) preprocessing time and storage and guarantee 0((n/m)^/^logn) query time, for any choice of I ^m ^n.) Further, the geodesic diameter is obtained in time O(n^logn), improving an earlier 0(«^^log«) bound of O'Rourke and Schevon [311]. Chiang and Mitchell [108] show how two-point queries can be answered efficiently (even in optimal 0(log/i) time) on nonconvex polyhedral surfaces; however, the preprocessing and space complexities are even higher than in the convex case. Performing efficient two-point queries while using only a small polynomial amount of storage remains an open problem: OPEN PROBLEM 17. How efficiently, and using what size data structure, can onepreprocess a polyhedral surface for exact two-point queriesl Can exact two-point queries be done in sublinear query time using subquadratic storage! What if the surface is convexl
In the special case of terrain surfaces (polyhedral surfaces having at most one intersection point with any line parallel to the z-axis), de Berg and van Kreveld [132] have studied various optimal path problems, including some bicriteria versions, with constraints imposed on the maximum allowed altitude. They build a "height-level map," in time 0(nlogn), stored implicitly using 0(n) space, which enables O(logn) time queries to compute a shortest s-t path that stays below a given elevation z, or an s-t path having a minimum total ascent.
6.3. Approximation algorithms Papadimitriou [317] was the first to study the general problem from the point of view of approximations. He gave a fully polynomial approximation scheme that produces a path guaranteed to be no longer than (I -\- s) times the length of a shortest path. His algorithm requires time 0(n^(L + \og(n/e))^/s^), where L is the number of bits necessary to represent the value of an integer coordinate of a vertex of P. Clarkson [120] gives an alternative method, requiring roughly 0(n^\og^^^^ n/s^) time (the exact expression includes also a precision parameter that depends on the geometry of P).
Geometric shortest paths and network optimization
669
Choi, Sellen, and Yap [115,114] have re-examined closely the analysis of Papadimitriou and have addressed some inconsistencies found in the original algorithm. To this end, it is important to distinguish between the bit framework and the algebraic framework of studying the complexity of the problem. Almost all shortest path algorithms (and most computational geometry algorithms) assume an algebraic model of computation, in which the time complexity is measured in terms of the number of algebraic operations performed on real numbers. It is assumed that these operations are performed exactly. In the bit framework, though, time complexity is measured in terms of the number of Boolean operations on bits, assuming the input is encoded with binary strings. Given the nature of current computer hardware, it is likely that the bit framework more accurately models actual computation times. Choi, Sellen, and Yap [115] give upper bounds on the bit complexity of the approximate shortest-path problem. They have also introduced the important notion of "precisionsensitivity" in algorithms, where the goal is to write the complexity in terms of an implicit parameter, 5, that measures the implicit precision of the input instance [114]. For example, in the shortest-path problem, they define 8 = (d2 — d*)/d'^ to be the relative difference between the length J* of an optimal path, and the length, d2, of the second-shortest, locally optimal path; i.e., J2 > ^* is the length of a shortest path that uses an edge sequence distinct from any optimal edge sequence, but is closest in length to J* among all such locally optimal paths. Provided that the optimal edge sequence is in some sense nondegenerate, one obtains an approximation algorithm that is polynomial in 1/8 and the other parameters of the input, with only linear dependence on 1/6:. Recently, Har-Peled [194] has shown how to compute an approximate shortest path map in polyhedral domains. In particular, he shows that, for a given source point s, and real parameter 0 < ^ < 1, a subdivision of dl^ of size can be constructed in time roughly Oin'^/s^), so that for any point t edi^ a. (1 -\- £)-approximation of the length of a shortest s-t path can be reported in time 0(log(n/£)). His technique is to sprinkle a carefully selected set S of discrete points within P and to record with each point of S a "weight" that corresponds to the approximate shortest path distance from s to it; the approximate shortest path map is then given by the additive-weight Voronoi diagram of S. In addition to approximation results for shortest paths in polyhedral domains, there have been a number of results on approximating shortest paths on polyhedral surfaces. Hershberger and Suri [208] obtain a 2-approximation for a shortest s~t path on a convex poly tope in time 0(n), using a relatively simple algorithm that considers the shortest path on the surface of the polytope's bounding box, between an appropriate pair of points. An extension to the algorithm allows one to compute a 2.38(1 + £)-approximate shortest path tree, SPT(^), in 0(n logn) time. The method also results in a 2^-approximation algorithm for shortest paths in a polyhedral domain consisting of k convex poly topes. Agarwal et al. [6] extend the method of [208] by surrounding the input (convex) polytope with a tighter-fitting constant-size (depending on s) bounding polytope, which approximately preserves shortest path distances. The result is that in time 0(nlog(l/6:) -|- l/s^) one can compute a (1 -h ^)-approximate shortest s-t path, for any 0 < ^ ^ 1. (The approximate length of a shortest path can be reported in time 0(n -h 1/6:^).) Har-Peled [193,192] improves this result, obtaining results for the approximate two-point query version: He gives an 0(n)-time algorithm to preprocess a convex polytope so that a two-point query
670
J.S.B. Mitchell
can be answered in time 0((log«)/^^/^ + \/s^), yielding the (1 -f- ^)-approximate shortest path distance, as well as a path having 0(1/^^/^) segments that avoids the interior of the input polytope. He also gives an 0{n + l/£^)-time algorithm to compute an approximate diameter of the polytope's surface, obtaining a pair of points on the surface whose shortest path distance is least (1 — e) times the diameter. Varadarajan and Agarwal [382] have considered the problem of approximating shortest paths on general (nonconvex) polyhedral surfaces. They have obtained the first subquadratic-time algorithms for provably good approximating paths, computing a 13approximation in 0{n^^^\og^^^ n) time, or a 15-approximation in 0{n^^^\o^/^ n) time. Their method is based on a partitioning of the surface into 0(n/r) patches, each having at most r faces, using a planar separator theorem. (The parameter r is chosen to be ^1/3 iog'/3 ^ Qj. „2/5 log^/^ w.) Then, on the boundary of each patch, a carefully selected set of points ("portals") is selected, and these are interconnected with a graph that approximates shortest paths within each patch. Finally, Dijkstra's algorithm is used to search for a shortest path in the resulting graph, which is proven to contain an approximately shortest path. 18. Can one compute a {\-{- e)-approximate shortest path on a nonconvex polyhedral surface {or even on a terrain) in subquadratic timel Can one compute an 0(1)-approximate shortest path in close to linear timel
OPEN PROBLEM
Har-Peled [194] has shown how to compute an approximate shortest path map on polyhedral surfaces, using techniques mentioned above. Given a source point and a parameter 0 < £ < 1, he constructs a subdivision of the surface of size 0{{n/e)\og{\/e)), so that a (1 + ^)-approximate shortest path query to any point t can be answered in time 0{\og{n/e)), by locating / within the subdivision. The preprocessing time is 0{n^\ogn + {n/£)\og{\/s)\og{n/s)) for general surfaces, and 0((«/^'^)log(l/^) + (nle^l^) log(l/^) logn) for convex polytopes. Finally, we mention some investigations on practical methods for computing nearly shortest paths on surfaces. By using the same methods that have been applied to the weighted region problem (Section 4.3) in subdivisions, Lanthier, Maheshwari, and Sack [247] and Mata and Mitchell [273] have shown that very simple algorithms based on searching a discrete graph (an "edge subdivision graph", or a "pathnet") produce paths that are remarkably close to optimal, and approach optimal as a parameter (5, or Xjk) approaches zero. The discrete graph can be constructed in advance, to assist in speeding two-point queries. Further, the path obtained can be postprocessed with a local optimality procedure that pulls the path "taut" within the sleeve of facets that it crosses, resulting in a solution even closer to optimal. Using a slightly different discrete graph than the edge subdivision graph of [247,273], Aleksandrov et al. [11] give alternative time bounds that depend on other parameters related to the "fatness" of the triangular facets of a polyhedral surface. They place Steiner points along edges in a geometric progression, as in Papadimitriou [317]. This allows one to compute a (1 + ^)-approximate shortest path from s \,o t in time 0(Mn logMn + nM'^) (and space 0(«M^)), where M = 0{j^ log ^ ) , X is the length of a longest edge, h is the minimum altitude of a triangular facet, 0 is the smallest angle of any triangular facet, and 0 < 6: < 2/3. By searching a sparser subgraph, they have recently ([12]) improved the time bound to 0(Mn log Mn).
Geometric shortest paths and network optimization
671
6.4. Other metrics Link distance in a polyhedral domain in dl^ can be approximated (within factor 2) in polynomial time, by searching a weak visibility graph whose nodes correspond to simplices in a simplicial decomposition of the domain. The complexity of computing the exact link distance is open. OPEN PROBLEM
19. How efficiently can link distance be computed in polyhedral do-
mains in 3-space! For the case of orthohedral domains, and rectilinear (L i) shortest paths, the shortest-path problem in "^^ becomes relatively easy to solve in polynomial time, since the "grid graph" induced by the facets of the domain serves as a path preserving graph that we can search for an optimal path. In dl^, we can do better than to use the 0(n^) grid graph induced by O(^) facets, as shown by Clarkson, Kapoor, and Vaidya [122]; an 0(n^log^^) size subgraph suffices for the case of n (possibly overlapping) axis-parallel boxes, allowing shortest paths to be found using Dijkstra's algorithm in time 0(n^log^ n). More generally, for a set of obstacles given by n axis-aligned (not necessarily disjoint) boxes in dl^, de Berg et al. [133, 134] show that one can compute a data structure of size 0((nlogn)^~^), in 0(n^logn) preprocessing time, that supports fixed-source link distance queries in 0(log^~^ n) time. Further, this result applies, within the same complexities, to the case of a combined metric, in which path cost is measured as a linear combination of L \ length and the rectilinear link distance (see also Section 4.7). In the case of axis-parallel disjoint box obstacles in 9i^, Choi and Yap [116] have shown that rectilinear shortest paths can be computed in time 0{n^\ogn). Also, for this same problem in higher dimensions, a recent structural result of Choi and Yap [118,117] may help in devising very efficient algorithms: There always exists a coordinate direction such that every shortest path from ^ to f is monotone in this direction. 7. Other network optimization problems Until now, we have been considering problems of computing a shortest path from one point to another (or from one point to all others). We consider now some other network optimization problems, in which the objective is to compute a shortest path, cycle, tree, or other graph, subject to various types of constraints. We focus primarily on two classes of problems: those of finding minimum-cost trees or tours that span some or all elements of a set 5. We discuss the resulting "minimum spanning tree" and "traveling salesperson" problems in the next subsections, and then give more details of a general method of obtaining approximations to these problems. The subject of spanning trees and spanners is surveyed extensively in the Chapter 9 by Eppstein [151] in this Handbook. Other well-studied network optimization problems that we do not attempt to survey here include minimum cost matching (which has polynomial-time exact and approximate solutions; see [36,379,380,389]) and minimum weight triangulation {MWT) (whose complexity status is still open, although constant-factor approximation algorithms exist for
672
J.S.B. Mitchell
both the Steiner and non-Steiner versions; see Bern and Eppstein [65] and Levcopoulos and Krznaric [257]). We also refer the reader to the article of Smith and Winter [365], which surveys a large class of topological network design problems. Kalyanasundaram and Pruhs [233] survey on-line versions of standard network optimization problems.
7.1. Optimal spanning trees Minimum spanning trees. A minimum spanning tree (MST) of a set of n points 5 is a tree of minimum total length whose nodes are the set S of n points, and whose edges are line segments joining pairs of points. The (Euclidean) minimum spanning tree problem can be solved to optimahty in the plane in time 0(n logn), by appealing to the fact that the MST is a subgraph of the (0(n)size) Delaunay diagram; after computation of the Delaunay diagram, results of Cheriton and Tarjan [105] can be applied to find the MST in only 0(n) additional time. PROPOSITION
4. An edge in a Euclidean MST is Delaunay.
The above proposition remains valid in 9i^, for J ^ 3; however, the result does not lead directly to a subquadratic-time algorithm for MST in higher dimensions, since there can be Q{n^) Delaunay edges, even in "^^. However, geometry can be exploited to avoid examining the full set of (2) = Q{n^) weighted edges in the complete graph. Yao [391] was the first to compute an MST in D^i^ in subquadratic time. His general method yields a time bound of O(n^~"^(logn)'~"^0, where a j is a constant depending on the dimension d. His algorithm is based on partitioning the space around each point p into sufficiently small cones so that there is at most one MST edge incident on p per cone, with this edge linking p to its nearest neighbor within that cone. In Yao [391], ofj = 2~^^+^\ but this has improved as better data structures for nearest-neighbors have been developed. Agarwal et al. [5] give a randomized algorithm whose expected running time has OfJ = r^|\-^^^ — y, for any fixed y > 0. In three dimensions, their algorithm requires 0{n^^^\og^^^ n) expected time. (See also Agarwal, Matousek, and Suri [7], who study maximum spanning trees (Section 7.1); a variant of their somewhat simpler randomized algorithm applies also to minimum spanning trees.) These algorithms exploit the close relationship between the problem of computing an MST and that of computing a bichromatic closest pair of points between n red points and m blue points. Letting Td(n,m) denote the complexity of solving the bichromatic closest pair problem, Agarwal et al. [5] show that the Euclidean MST can be computed in time 0(Td(n, n) log^ n) (if Td{n, n) = o(n^^^)), or in time 0(Td{n,«)), if Td(n, n) is superiinear. Since they give a randomized algorithm for the bichromatic closest pair, with expected time 0((/2m)'~'/^'^^/^^'^'^"^^), their result implies that the MST can be computed in expected time Q(Jl^-^/(\^/'^^+^)+^)^ Callahan and Kosaraju [80] show a bound of 0(Td(n, n) log«), while Krznaric, Levcopoulos, and Nilsson [245], as well as Kapoor [235], obtain 0(Td(n, n)). These bounds hold for any Lp metric (p ^ 1); 0(Td(n, n)) is optimal in the algebraic computation tree model. For some Lp metrics, more efficient algorithms are known. Agarwal et al. [5] give a deterministic algorithm requiring 0(n log^ n) time for any metric having a polyhedral unit
Geometric shortest paths and network optimization
673
ball (e.g., L\ and L^)\ see also Gabow, Bentley, and Tarjan [162]. In three dimensions, there is now an optimal O(nlogn) time algorithm for the MST in the L\ or Loo nietric, due to Krznaric, Levcopoulos, andNilsson [245] (improving an earlier 0{n\ogn\og\ogn) bound of [162]). Clarkson [121] and Vaidya [378] have given algorithms that are particularly efficient for points that are independently and uniformly distributed in a unit cube in 9^^. Their algorithms have expected time 0{na{cn, n)), where c is a constant depending on dimension, and a is the very slowly growing inverse Ackermann function. Several results are also known about approximation algorithms for the MST. Clarkson [119] gives an 0(n(}ogn + ^ log5)) time (0(nlog(5) space) algorithm for a (1 + 6:)approximate Euclidean MST in 9^^; he also gives results in higher dimensions for the L\ metric {0{n(a{m,n) + log'^~^(^)log5)) time, 0{n(\og{\) + log5)) space). Here, m = 0(n), and 5 is a parameter that depends on the data: it is the ratio between the maximum and the minimum distance between pairs of points. Vaidya [377] gives a (1 + e)approximation for any Lp metric, requiring time 0(n(logn)^~^^s~^^~^''), which he later improves to 0(s~^nlogn) time [378]. Callahan and Kosaraju give an approximation, based on their "well-separated pair decomposition," for the Euclidean MST that requires time 0(n logn + (e""^/^ log ^)n). Das, Kapoor, and Smid [127] have studied the problem of r-approximating the Euclidean MST, for large values of r: For 4 < r < n, and for any J ^ 1, they prove a lower bound of ^ (n log(n/r)), in the algebraic tree model of computation, and prove that this is tight by exhibiting an algorithm having the same asymptotic time complexity. If the (non-algebraic) floor function and random access operations are permitted, then they obtain a 3V^^^"^'^^-approximation algorithm requiring 0(n) time. For this more powerful model, Bern et al. [68] compute a (1 + £)-approximate MST in the plane in time
0((l/s)nloglogn)
(time 0(n + ^^^g^) in m').
The best lower bound for the (exact) MST problem is currently ^(n logn), in any fixed dimension J ^ 1, in the algebraic tree model of computation for a general input of unordered points. In contrast, the seemingly related all-nearest-neighbors problem can be solved in time 0(2^n logn), using the algorithm of Vaidya [381]. The all-nearest-neighbors problem is to compute the nearest neighbor for each of the n input points; given the MST, it is readily solved in 0(n) time, since the MST must include an edge linking each point to one of its nearest neighbors. 20. Does there exist a near-linear time algorithm for Euclidean MST (or bichromatic nearest neighbors) in ^^, for J ^ 3? OPEN PROBLEM
Maximum spanning trees. If instead of finding a minimum spanning tree, the objective is changed to ask for a maximum-length spanning tree on a set of points, the problem changes its nature. (Applications are given in [39].) While in graphs the same algorithms that find minimum spanning trees also can be used for computing maximum spanning trees, by negating edge lengths, the geometric version of the problem changes because it is not obvious how to find a small subgraph of the complete graph that is guaranteed to contain the maximum spanning tree. The natural generalization of the MST result might be to expect that the maximum spanning tree must appear as a subgraph of the (linear-size)
674
J.S.B.
Mitchell
furthest-point Delaunay diagram (see the chapter on Voronoi diagrams, by Aurenhammer and Klein [46]). However, this is not true in general, since the only points that are vertices of the furthest-point Delaunay diagram are the points on the convex hull; further, even if the input point set is in convex position, the maximum spanning tree need not lie on the furthest-point Delaunay diagram (see [296]). A different approach is taken by Monma et al. [299], who provide an optimal 0(n\ogn)-iime algorithm for computing a maximum spanning tree of n points in the plane. They start with computing, in 0(n logn) time, the furthest neighbor graph, joining each point to its furthest neighbor; the resulting graph is a forest, whose connected components are called clusters. They then show that the clusters can be cyclically ordered around their convex hull, allowing a maximum spanning tree to be computed by adding a longest edge between adjacent clusters. (If the input points are already in convex position, the algorithm requires only 0(n) time.) Subquadratic-time algorithms for higher dimensions are also known, based on efficient methods to compute bichromatic farthest neighbors. [7] give randomized algorithms with expected time 0(«4/3 iog7/3 „) in m^^ and 0(^2-^^) in ^^ (d ^ 4), where a^ = pj/2]+i+^. for any fixed y > 0. They also give a simpler (deterministic) approximation algorithm, giving a tree at least (I — e) times optimal, that requires 0(e^^~^^^^n log^ n) time. Minimum Steiner spanning trees. A minimum Steiner spanning tree (or simply Steiner tree) of 5 is a tree of minimum total length whose nodes are a superset of the given set S. Those nodes that are not points of S are generally called Steiner points. It turns out that allowing the flexibility of adding Steiner points in order to obtain a potentially shorter spanning tree makes the problem much more difficult. In fact, the Steiner tree problem is known to be NP-hard [164], even for points in the Euclidean plane. The Steiner tree problem is in sharp contrast with the MST problem, which can be solved exactly in low-degree polynomial time. It is natural, therefore, to study how closely the MST solution approximates the Steiner tree. The supremum, over all point sets, of the ratio between the length of the MST and the length of the Steiner tree is known as the Steiner ratio;^ it has been studied extensively in the last several years. A simple example (the three comers of an equilateral triangle) shows that the Euclidean Steiner ratio in the plane can be as high as 2/V3. Gilbert and Pollak [175] conjectured that this ratio can in fact never be greater than 2 / \ / 3 . This conjecture was finally confirmed by a proof due to Du and Hwang [143]. (For the L\ metric, the Steiner ratio in the plane is 3/2, and this is tight [214].) Approximation algorithms have also been obtained for the Steiner tree problem. First, because of the Steiner ratio, the MST algorithms already give a 2/\/3-approximation for the Euclidean Steiner tree problem in the plane. However, in a series of results, starting with important work by Zelikovsky [392], improved approximation algorithms were obtained, for both graph versions and geometric versions of the problem. In the Euclidean plane, the approximation factor has been improved to just over 1.1 by Zelikovsky's "relative greedy" algorithm [393]. We refer the reader Bern and Eppstein [65] and Du and Hwang [144], for excellent surveys on these problems and the recent results. Finally, though, a PTAS was Many authors have defined the Steiner ratio to be the reciprocal of what we call the Steiner ratio. We follow the notation of Bern and Eppstein [65].
Geometric shortest paths and network optimization
675
discovered by Arora [35] and Mitchell [289]. This result serves to separate the geometric versions of the problem from the "metric" version (in an arbitrary graph whose edge lengths satisfy the triangle inequality), since the metric version is known to be MAXSNPhard (meaning that no PTAS exists, unless P = NP), even if all edge lengths are 1 or 2 [66]. A problem that arises in some applications in VLSI is that of computing a minimumlength rectilinear Steiner tree within a rectilinear polygon P, for a set of n sites on the boundary of the polygon. If P is rectilinear convex (any horizontal/vertical line intersects it in a connected set), having k vertices, Richards and Salowe [344] solve this problem exactly in time 0(k^n). For the same problem, Cheng, Lim, and Wu [103] give an O(n^) algorithm, and Cheng and Tang [104] give an 0(J
676
J.S.B. Mitchell
Arkin et al. [22] obtained an 0 ( ^ log A:)-approximation algorithm, where K is the maximum number of elements in a group; their algorithm is based on repeated applications of approximations to the /:-MST problem (Section 7.1). Slavik [363] provides a 2Kapproximation algorithm, using an algorithm based on linear programming relaxations. (His approximation factor becomes 3 ^ / 2 for the one-of-a-set TSP problem (Section 7.4), matching the Christofides factor of 3/2 when each group has size one; see Section 7.2.) An outstanding open question is to determine if a constant-factor approximation algorithm exists for geometric instances of the problem; the hardness result for obtaining an o(log/:)-approximation does not apply to point sites in the plane. OPEN PROBLEM 21. IS there an 0{\)-approximation algorithm for the group Steiner problem on a set of points in the Euclidean planel
If the groups of points are in fact connected sets (e.g., polygons) in the plane, then an O(log^)-approximation algorithm is given by Mata and Mitchell [272]. The special case in which the groups are intervals that lie on two parallel lines has a polynomial-time algorithm bylhler[220]. The group Steiner problem is closely related to the one-of-a-set traveling salesperson problem (TSP), and the TSP with neighborhoods, which are discussed below in Section 7.4. k-Minimum spanning trees. A k-minimum spanning tree {k-MST) is a minimum-length tree that spans some subset oi k ^n points of S. The fact that the particular subset of k points is not specified, but must be selected by the algorithm, makes the problem much more difficult than the usual MST problem (the case k = n). In fact, the problem is NPhard, even for points in the Euclidean plane; see [159,332]. A series of approximation results have been obtained for this problem. Ravi et al. [332] give an approximation algorithm with ratio 0{k^^^), which was improved to a factor of 0(\ogk) by Garg and Hochbaum [167] and Mata and Mitchell [272]. Eppstein [150] has improved the approximation ratio to 0(log k/ log log n), and has given general techniques to improve the running times (as a function of /i) of existing algorithms; further, he shows that the exact A:-MST problem can be solved in time 2^^^'"S^^n + 0(nlog«), which is simply 0{n\ogn) for fixed k. Blum et al. [73] obtained the first 0(l)-approximation; this was greatly simplified with the 2V2-approximation of Mitchell [285,290]. Ultimately, a PTAS was given by Arora [35] and Mitchell [289]. More details will be given below. In general graphs having nonnegative edge weights, the current best approximation algorithm is a 3-approximation by Garg [166], which applies also to the "rooted" case (in which the tree is required to include a given node); this has been improved to a 2.5-approximation, by Arya and Ramesh [37], if the tree is not "rooted."
7.2. Traveling salesperson problem In the traveling salesperson problem (TSP), we are given a set S of n points ("sites") and are asked to find a shortest cycle ("tour") that visits every point of S. (There is a variant of the problem in which one wants a shortest path that visits S.) The TSP is a classical
Geometric shortest paths and network optimization
677
problem in combinatorial optimization, and has been studied extensively in many forms, including geometric instances; see [60,251,342,230]. The problem is NP-hard, as shown by Papadimitriou [316], even for points in the Euclidean plane. The TSP has a simple approximation algorithm based on "doubling" the minimum spanning tree. Since an optimal tour spans all of the sites (and is converted into a spanning tree by deleting any one edge), it must be at least as long as the minimum spanning tree; thus, by doubling the spanning tree (and shortcutting in order to obtain a tour visiting each site exactly once), we obtain a tour that is at most twice the length of the optimal TSP tour. This 2-approximation algorithm has been improved to yield a factor of 1.5 by Christofides; instead of doubling the minimum spanning tree, this method augments the tree with a minimum-weight matching on the set of odd-degree vertices in the tree. Since the resulting graph, after augmentation, is connected and has even degree, it has an Euler cycle, which is taken as the approximating tour. The approximation factor is 1.5 since a minimum-weight matching is at most 0.5 times the length of an optimal TSP tour. For general metric spaces, the 1.5-approximation factor remains the best that is known. Until very recently, this was also the best known factor for geometric instances of the TSP. However, there are now polynomial-time approximation schemes for geometric versions of the TSP; more details are given below. Das, Kapoor, and Smid [127] have studied the problem of r-approximating the Euclidean TSP, for large values of r: For 8 < r < n, and for any J > 1, they prove a lower bound of Q (n log(n/r)), in the algebraic tree model of computation, and prove that this is tight by exhibiting a matching asymptotic upper bound. (If the floor function and random access operations are permitted, then they obtain a 6VJn^~^/^-approximation algorithm requiring 0(n) time. In this more powerful model, Bern et al. [68] compute a (2 -\- s)approximate TSP in the plane in time 0((1/s)n log log n).) An important class of heuristics for the TSP are insertion methods, in which sites are added one by one to an existing tour: At the /th stage, site vt is inserted by deleting that edge (u, w) of Ti^\ (the tour constructed on sites {ui,..., f/_i}) which minimizes d(u, Vi) -h d(vi, w) — d(u, w), and replacing it with the edges (u, vi) and (f/, w). (The initial tour T\ is a self-loop of length zero through site vi.) Various insertion methods are possible based on the choice of ordering of the sites for insertion. In a landmark paper, Rosenkrantz, Stearns, and Lewis [348] show that an arbitrary order of insertion of the sites gives a (flogn] + 1)-approximation of the TSP, in arbitrary metric spaces. Further, they showed that nearest insertion and cheapest insertion lead to a 2-approximation. It remained open for some time whether or not an insertion order exists that does not achieve a constant-factor approximation. Independently, Azar [48] and Bafna, Kalyanasundaram, and Pruhs [50] showed that indeed an insertion order exists that has worst-case factor ^ (log n/log log w), even for instances in the Euclidean plane. Furthermore, Azar shows that the worst-case factor for random insertion (add the sites in random order) is Q (log log n/ log log log n), also for points in the Euclidean plane. One of the best insertion methods in practice {^furthest insertion, in which the site furthest from the existing tour is added at each stage; for this method, a 2.43 lower bound is known on the approximation factor for points in the plane (see Hurkens [213]).
678
J.S.B. Mitchell
7.3. Approximation schemes
We now briefly survey some recent progress on approximation algorithms for geometric network optimization, which has led to polynomial-time approximation schemes (PTAS's) for several of these problems, including the TSP, Steiner tree, and /:-MST problems. Many of these results are in a current state of flux, being simplified and improved. In order to keep abreast of latest developments, we encourage the reader to refer to web pages (and personal email) with the authors. In early 1996, Arora [35] and Mitchell [289] gave PTAS's for a class of geometric optimization problems in the plane, which included the TSP, Steiner tree, and /:-MST. Both of these methods were based on methods of approximating an optimal solution with one that comes from a special class of networks, and then applying dynamic programming to optimize over that class of networks. Both methods led to algorithms with running times ^0{\/e)^ to obtain a (1 -h e)-approximation. The method of Mitchell [289] was based on exactly the same method as he used in earlier work ([285]) to obtain a very simple 2approximation for the rectilinear ^-MST; the only change necessary was to observe that if one replaced the " 1 " by an "m" in the definition of "guillotine subdivision", then the approximation factor became (1 + 1/m) instead o f ( H - l / l ) = 2. The method was also based on earlier work on "division trees" introduced by Blum, Chalasani, and Vempala [73,290], and the guillotine rectangular subdivision methods of Mata and Mitchefl [272]. During the last year, there have been several improvements to the original PTAS results. Mitchell [287] has reduced the running time of his method to 0(/i^^'^), using a relatively minor modification to the earlier method. Arora [36] has obtained a randomized algorithm, based on a clever use of quadtrees and an improved new structure theorem, with expected running time that is nearly linear: 0(n log^^^^^^n). Further, Arora's method applies to higher dimensional versions of the problem, with an expected running time in ^^ of 0(n(logn)^^^^^^' ). The randomized algorithms can be derandomized at the cost of an extra factor of n^ in the running times. In a very recent improvement to these results, Rao and Smith [331] obtain an 0(nlogn) time deterministic algorithm for any fixed s and any fixed dimension d. They introduce a remarkable generalization of the notion of ^-spanners — the "f-banyan" — which approximates to within factor t the interconnection cost (allowing Steiner points) for subsets of sites of any cardinality (not just 2 sites, as in the case of r-spanners). They prove that for any fixed ^ > 0 and d ^ I, there exists a (1 + £)-banyan having 0(n) vertices and 0(n) edges, computable in 0(n logn) time. Trevisan [375] has shown that approximation schemes in JK^ must have time bounds that are doubly exponential in J; he proves that it is NP-hard to obtain a (1 + £)-approximation mm^^^''^''\forsome6>0. We should remark that, while these results are of considerable theoretical interest, it is not yet known if they hold any practical implications. The "constants" hidden in the big-Oh notation are quite large (exponential) as functions of (1/^) and d.
Geometric shortest paths and network optimization
679
7.4. TSP variants and related geometric problems k-TSP, quota-driven TSP. The ^-TSP, like the ^-MST, takes as input an additional integer parameter, k, and requires that one compute a minimum-length tour that visits some subset of k sites. Optionally, a site is specified as a root that is required to be visited. For the graph version of the /:-TSP, with edge weights obeying triangle inequality, Garg's method [166] for the ^-MST yields a 3-approximation for both the rooted and unrooted version; the improvement of Arya and Ramesh [37] does not apply to the /:-TSP. A related problem is the quota-driven salesperson problem, in which each site has an associated integral value, w;/, and a salesperson has a given integer quota, R. The objective is to find a shortest possible cycle having the sum of the values for the sites visited is at least R. A ^-TSP approximation algorithm gives also applies to this problem, since each site can be replicated wi times; the running time is then polynomial in n and R. Another related problem is the prize-collecting salesperson problem, as studied by Balas [53] (see also [70]). It differs from the quota-driven salesperson problem, in that, in addition to "values" Wi, there are non-negative penalties associated with each site, and the objective function is now to minimize the sum of the distances traveled plus the sum of the penalties on the points not visited, subject to satisfying the quota R. As discussed in [47], an approximation algorithm follows from concatenating a cycle obtained for the quota-driven salesperson, with the 2-approximation cycle given by the algorithm of Goemans and Williamson [176] (which considers the effect of penalties, but does not use the quota constraint). Orienteering problem In the orienteering problem (also known as the "bank robber" problem, or the "generalized TSP"), the traveling salesperson is allowed to travel at most a distance B, and has the objective to maximize the number of sites that he can visit, subject to the distance constraint. We can distinguish between the "rooted" and "unrooted" versions of the problem, depending on whether or not there is a specified site where the traveler starts. This resource-constrained optimization problem is, in a sense, dual to the problem of minimizing the length of a cycle, subject to meeting a quota on the number of sites visited (the ^-TSP) or the sum of the values of the sites visited (the quota-driven salesperson problem). For the unrooted orienteering problem, Awerbuch et al. [47] give a method for obtaining a 2c-approximation algorithm, where c is the approximation factor for the ^-TSP. For geometric instances, this, together with PTAS results, implies a (2 -f e)-approximation algorithm for the unrooted case. The first results on the rooted case have recently been given by Arkin et al. [28], who obtain a 2-approximation for both the rooted and unrooted cases, for geometric instances of the problem. Their methods rely on recent results on m-guillotine subdivisions. (It remains an open question whether or not the rooted orienteering problem has any approximation algorithm in general graphs.) MAX TSP The MAX TSP changes the objective in the ordinary TSP from that of minimizing to that of maximizing the length of a tour that visits every point of S. For the MAX TSP in graphs, the problem is easily seen (from Hamiltonian cycle) to be NP-complete, even if edge lengths obey the triangle inequality; however, a 5/7-approximation algorithm has recently been obtained [195,244].
680
J.S.B. Mitchell
For geometric instances of the MAX TSP, Alon et al. [17] provide a constant-factor approximation algorithm for MAX TSP, as well as the problem of computing a longest noncrossing tour. Barvinok [58] has obtained a PTAS for the MAX TSP, computing a tour whose length is guaranteed to be at least (l — s) times optimal, for any fixed ^ > 0; his algorithm applies in any fixed dimension d, for Lp metrics, and more general metrics too. Most recently, Barvinok et al. [57] have resolved the complexity of the MAX TSP for geometric instances of the problem in metrics defined by a convex polytope, in any fixed dimension d; they provide a polynomial-time algorithm to solve the problem exactly in time 0(n^~^\ogn), where / is the number of facets defining the polytope. For example, for the L\ or LQO metric in the plane, their algorithm requires 0(n^ \ogn) time. Their approach is to reduce the problem to solving a set of maximum weight Z?-matching problems (which are actually transportation problems) on an appropriate (bipartite) graph. This remarkable result is one of the rare cases in which a TSP problem can be solved exactly in polynomial time. The complexity of the Euclidean MAX TSP has been open. Very recently, Fekete [155] was able to prove that the Euclidean MAX TSP is NP-hardness in dimension three or greater. The complexity remains open in the Euclidean plane: 22. What is the complexity of the MAX TSP in the Euclidean planel What if the tour is required to be noncrossing!
OPEN PROBLEM
We should remark, though, that there is an issue about the model of computation here since, for both the TSP and MAX TSP, we do not know if the problem lies in NP for the Euclidean metric. In particular, for sites having rational coordinates, in order to compare the length of a tour to a given rational number, we must evaluate a sum of n square roots to sufficient precision; the best known bound on the number of bits of precision in order to guarantee a correct answer is exponential in w. It may be that the Euclidean MAX TSP can be solved in polynomial time if we assume that arithmetic operations (including square roots and comparisons) can be done in constant time, but the algorithm may require exponential time on a standard Turing machine. Bottleneck and maximum scatter TSP. In the bottleneck TSP, the goal is to obtain a tour minimizing the length of the longest edge in the tour. In graphs, the problem is NPcomplete [251]. If the edge lengths do not satisfy the triangle inequality, then no constant factor approximation algorithm can exist, unless P = NP. If the edge lengths do satisfy the triangle inequality, then Parker and Rardin [321] have given a 2-approximation algorithm and shown that this is best possible (unless P = NP). For the geometric version of the problem, it is easy to show that the problem is NP-hard, from the fact that Hamiltonian cycle in grid graphs is hard [251]. In the maximum scatter TSP, the goal is to obtain a tour maximizing the length of the shortest edge in the tour. (Such problems arise, e.g., in sequencing rivet operations.) Arkin et al. [23] have studied the problem in graphs, showing that the problem is NPcomplete, that the general problem has no polynomial-time constant-factor approximation algorithm (unless P = NP), and that if edge lengths obey the triangle inequality there is a 2-approximation (a tour whose shortest edge has length at least one half that of optimal), which is best possible. However, it is not yet known if the geometric version of the problem is hard. Also, while the factor 2-approximation algorithms are best possible in graphs
Geometric shortest paths and network optimization
681
whose edge lengths obey the triangle inequality, the current approximation algorithm results for bottleneck TSP and maximum scatter TSP do not exploit geometric structure, which may lead to an improved factor: OPEN PROBLEM 23. What is the complexity of the maximum scatter TSP for points in the planel Can one obtain approximation factors better than 2 for geometric instances of bottleneck TSP or maximum scatter TSPl
Minimum latency problem. In the minimum latency problem (MLT), also known as the deliveryman problem and the traveling repairman problem, the goal is to find a tour on S that minimizes the sum of the "latencies" of all points, where the latency of a point p is the length of the tour from a given starting point to the point p. (Thus, the latency of a point measures how long a job at that point must wait before being served by the repairman/deliveryman that is traveling along the tour.) For the problem in graphs, Blum et al. [72] have given a 128-approximation algorithm; this has been improved by Goemans and Kleinberg [177], who obtain a factor of 29. By a direct application of Theorem 2 of [72], which states that a c-approximation for the /c-MST implies an 8c-approximation for the MLP, we see that recent PTAS results on the geometric /:-MST imply an (8 + 6:)approximation for geometric instances of MLP. It is an interesting open problem to improve on this factor: OPEN PROBLEM 24. Is there a PTAS for the minimum latency problem on a set of points in the Euclidean planel
Area optimization problems. In the min-area TSP (resp., max-area TSP), the goal is to determine a cycle on a given set S of points such that the cycle defines a simple polygon of minimum (resp., maximum) area. Fekete [154] (in part together with Pulleyblank [156]) has studied these problems extensively. He has shown that both the min-area and max-area TSP problems are NP-complete. For the max-area TSP, Fekete gives a (1/2)-approximation algorithm, showing how, in O(nlogn) time, one can obtain a cycle surrounding area that is at least half that of the convex hull of S. Further, he shows that it is NP-complete to decide if one can obtain a simple polygon whose area is more than (2/3 -\- s) times that of the convex hull. For the min-area TSP, Fekete conjectures that no polynomial-time approximation algorithm exists (unless P = NP); he bases this conjecture on evidence suggested by a potentially related result of his: The min-area disjoint triangle matching problem (to determine a minimum-area set of disjoint triangles on 3n points) has no approximation algorithm (unless P = NP). OPEN PROBLEM
25. Is there a polynomial-time approximation algorithm for the min-
area TSPl Angular-metric TSP and angle-restricted tours. In the angular-metric TSP, the goal is to determine a cycle on a given set S of points such that the sum of the direction changes at each vertex (point of S) is minimized. Aggarwal et al. [9] have proven that this problem is NP-complete.
682
J.S.B. Mitchell
In the angle-restricted tour (ART) problem, one is given a set A of allowable angles and asks if a tour exists on the set S such that every angle between consecutive edges of the tour lies in the set A; such a tour is called an A-tour. (This problem is related to that of generating a simple polygon, given a sequence of angles; see Culberson and Rawlins [125].) Fekete [153] and Fekete and Woeginger [157] have studied the class of ART problems, showing that (1) if |5| 7^ 4 and A = [0, n], then an A-tour always exists for any finite 5; (2) if A = {—rr/l, 7r/2}, then, based on results of O'Rourke [309], there exists a polynomial-time algorithm to detect if 5 admits an A-tour; (3) if A = {—n/2, n/l, TV}, {—7r/2, n] or {n, n/l], then it is NP-complete to decide if S admits an A-tour; and (4) if A = (—7r/2,7r/2) (the "acute" case) or A = (—7t, —njl) U (7r/2,7t\ (the "obtuse" case), there are arbitrarily large points sets S that do not admit an A-tour (an "acute tour" or an "obtuse tour"). Their work suggests a number of open questions, including: OPEN PROBLEM 26. What is the computational complexity of deciding whether a point set has an acute {or obtuse) tourl
TSP with neighborhoods. In the TSP with neighborhoods, the goal is to find a shortest tour that visits at least one point in each of a set of k (possibly overlapping) neighborhoods. The neighborhoods may be connected sets (e.g., disks or polygons), or possibly disconnected sets (e.g., pairs of discrete points, or sets of disjoint polygons). Since it is a generalization of TSP, the problem is clearly NP-hard. When the neighborhoods are connected and "well behaved" (e.g., disks, or having roughly equal-length and parallel diameter segments), Arkin and Hassin [26] have obtained 0(1)-approximation algorithms, with running time 0{n -h k\ogk), where n is the total complexity of the k neighborhoods. Further, they prove a form of "combination lemma" that allows one to consider unions of sets of well-behaved neighborhoods; the resulting approximation factor is given by the sum of the approximation factors obtained for each class individually. For the general case of connected polygonal neighborhoods, Mata and Mitchell [272] obtained an O(log/:)-approximation algorithm, based on "guillotine rectangular subdivisions," with time bound 0{n^). Gudmundsson and Levcopoulos [184] have recently obtained a faster method, which, for any fixed ^ > 0, is guaranteed to perform at least one of the following two tasks (although one does not know in advance which one will be accomplished): (1) it outputs in time 0{n -f k log/:) a tour with length at most 0(\ogk) times optimal; or (2) it outputs a tour with length at most (1 + £) times optimal, in time 0{n^) (if 6: < 3) or 0{n^\ogn) (if s > 3). However, no polynomial-time method guaranteeing a constant factor approximation is known for general neighborhoods. If the neighborhoods are disconnected, then the problem seems to be even more difficult. The problem then is called the "one-of-a-set TSP" or the "group TSP," referring to the fact that the tour is required only to visit one point from each set (group). It has also been called the errand scheduling problem (see Slavik [364]), since it models the problem of finding the best order in which to perform a set of errands, each of which can be performed at some subset of the nodes of an edge-weighted graph. The one-of-a-set TSP in graphs generalizes both the set cover problem and the TSP. It is a special case of the "traveling purchaser problem" [307], in which a traveler is required to purchase each item on a shopping list, by visiting an appropriate subset of sites, in hopes of minimizing the
Geometric shortest paths and network optimization
683
total cost of travel plus the amount paid for the items; each site has a given inventory of items, and the prices of items vary from site to site. Polylogarithmic approximation algorithms follow from the results known on the closely related "group Steiner tree" problem (Section 7.1). Further, since the problem generalizes set cover, we cannot hope for a better approximation ratio than 6)(log/:) in general graphs ([270]). However, for sets of points in the plane, no reduction from set cover is known; it is possible that there is a constantfactor approximation algorithm for general discrete sets of points in the plane. We note that a constant-factor approximation algorithm for the group Steiner tree problem implies a constant-factor approximation for the one-of-a-set TSP (just by doubling the Steiner tree to obtain a tour). OPEN PROBLEM 27. Does the TSP with (connected) neighborhoods problem have a polynomial-time O(I)-approximation algorithm! What if the neighborhoods are not connected sets {e.g., if the neighborhoods are discrete sets of points)!
Lawnmowing and milling. In the lawnmowing problem, the goal is to find a shortest cycle (or path) for the motion of a disk (representing a "lawnmower") such that every point of a given (possibly disconnected) region R is covered by the disk at some position of the disk. It is easy to see that the problem is NP-hard, in general; R may be a set of n well separated points, making the problem that of a TSP with disjoint circular neighborhoods. However, Arkin, Fekete, and Mitchell [24,25] have shown that the problem is NP-hard, even if R is simply connected (e.g., a simple polygon). Their proof also applies to the milling problem, which adds the constraint that the cutter stay within R, in a. multiplyconnected region. What is not yet known, though, is if the milling problem is hard when R is simply connected: OPEN PROBLEM
28. Is the milling problem NF-hardfor a region R that is simply con-
nected! A recent result that is potentially related to this question is that of Umans and Lenhart [376], who have shown that one can determine Hamiltonicity of a "solid grid graph" (a grid graph induced by the points that lie inside a simply connected region) in polynomial time. Approximation algorithms for the lawnmowing problem allow one to get within a constant factor of optimal [24,25,224]; the best current factor is (3 -h ^), based on the algorithm of Arkin, Fekete, and Mitchell [25], together with recent PTAS results for TSP They also give a 2.5-approximation algorithm for the milling problem; the approximation factor becomes 11/5 if /? is a rectilinear simple polygon. The model of the milling problem as discussed above is oversimplified. In practice, there are several other issues in the milling process to consider; these are discussed in detail in the book of Held [196], who introduced computational geometry techniques to the pocket machining problem. (See also the survey by Guyder [188] and two recent special issues (March'94 and November'94) of the journal CAD devoted to machining.) It is important in practice to avoid re-milling a region where the cutter has already been, as this can damage the finished surface; the model of [24,25] allows for re-milling. The most common strategies used in practice are based on contour-parallel ("window-pane") milling, in which the
684
J.S.B. Mitchell
cutter follows the boundary of the region and spirals inward, and zig-zag ("axis-parallel," "staircase") milling, in which the cutter sweeps out strips parallel to the coordinate axis. It both of these methods, if one is to avoid re-milling portions of the pocket, the cutting tool must be retracted and moved (rapidly) to a new location, where it can then resume cutting. In the case of zig-zag milling, Arkin, Held, and Smith [27] have considered the problem of finding tool paths that minimize the number of tool retractions. They prove that the problem is NP-hard in general, but give constant-factor approximation algorithms that are shown experimentally to perform well in practice. Watchman route problem. In the watchman route (path) problem, the goal is to find a shortest possible cycle (path) within a polygonal domain P, such that every point of P is seen by some point of the cycle. This problem is seen to be closely related to the TSP with neighborhoods, since it can be thought of as a shortest-path/cycle problem in which we have the constraint that the path/cycle must visit the visibility region associated with each point of the domain. The watchman route problem was first investigated by Chin and Ntafos [111,113], who give an 0(n)-time algorithm if P is a rectilinear simple polygon, and an 0(n'^)-time algorithm if P is a simple polygon and we are given an anchor ("door") point, /?, on the boundary of P, through which the cycle is required to go. Their algorithms are based on identifying a set of essential cuts, which are directed line segment chords (extensions of selected polygon edges) that any watchman route must visit, in the order that they appear about the polygon. Further, a locally shortest watchman route that visits an essential cut without crossing it must do so either at a point where the cut intersects another cut, or at a point where the route "reflects" on the cut, with equal incidence and reflection angles. Given a subsequence of "active" essential cuts, where reflection is to occur, the polygon can be "unrolled," resulting in a shortest path problem in a simple polygon, which is readily solved in hnear time (Section 2). These facts allow Chin and Ntafos to devise an incremental "adjustment" algorithm for searching for the combinatorial type of a shortest watchman route, anchored at p. The complexity for this anchored version of the problem has been improved to 0{n^) [373] and then to 0(n^) [370], using a divide-and-conquer strategy. The requirement that there be an anchor point was removed by Carlsson, Jonsson, and Nilsson [85] (see the updated and corrected version in [301]), resulting in an 0(n^)-time algorithm for an unrestricted ("floating") shortest watchman cycle. (We should point out that there are some recent investigations ([189,372]) into omit errors (and how to correct them) in the "adjustment" algorithms used in some of the watchman route algorithms.) In the case of a polygonal domain P with holes, the problem is easily seen to be NP-hard (from Euclidean TSP) [111]. Mata and Mitchell [272] obtain an O(log«)-approximation algorithm, for a version that considers "rectilinear visibility," using dynamic programming on a class of guillotine rectangular subdivisions. In light of the recent PTAS results for TSP, based on guillotine subdivisions and their generalizations, it is interesting to ask if improved approximation results can now be improved: OPEN PROBLEM 29. Does the watchman route problem in a polygonal domain have a polynomial-time 0{\)-approximation algorithml Is there a PTASl
Geometric shortest paths and network optimization
685
For the watchman path problem in a simple polygon, Carlsson and Jonsson [84] have obtained the first polynomial-time (0(n^^)) algorithm. The problem turns out to be considerably more difficult than the cycle version, since one must determine the order in which the path visits essential cuts. An interesting problem that is solved as part of this work is the shortest postman path problem, in which the goal is to find a shortest path that visits all vertices of P; [84] give an 0(n^) algorithm. The robber route problem [303] requires that the watchman see only a specified subset of the edges of P, while avoiding to be seen from a set of point "threats" within P\ see also Gewali et al. [169]. There have been several other results on generalizations and variations of the watchman route problem, including watchman routes in "weak visibility" polygons [246], in "spiral" polygons [302], external to a simple polygon [305], external to two convex polygons [171], under limited visibility distance [304], and for multiple watchmen [86,297, 301] (in restricted simple polygons). Also, minimum-link watchman tours have been studied. In simple polygons, Alsuwaiyel and Lee [18,19] show that the problem is NP-hard and give an 0(1)-approximation algorithm. In polygonal domains, Arkin, Mitchell, and Piatko [29] show the problem to be NP-hard (even for convex obstacles) and give an O (log n)-approximation algorithm. We know of no results yet, though, for approximating watchman routes in three dimensions: OPEN PROBLEM 30. Give an efficient approximation algorithm for watchman routes in polyhedral domains in 3-space.
Zookeeper's problem. The zookeeper's problem is to find a shortest cycle in a simple polygon P (the zoo), through a given vertex v (the zookeeper's chair), such that the cycle visits every one of a set of k disjoint convex polygons {cages), each sharing an edge with P, without entering any of the cages. This problem is a special case of the TSP with neighborhoods problem, constrained within a simple polygon. The simple polygon constraint helps to simplify the problem; it implies that an optimal cycle must visit the cages in the same order that they appear on the boundary of P (otherwise, the cycle would self-intersect and could be shortened). This observation, together with the reflection principle, allowed Chin and Ntafos [112] to solve the problem with a procedure that searches for the combinatorial type (sequence of cage edges) of an optimal cycle by incremental updates, at each stage computing a shortest path in a 2-manifold that results from "unfolding" a sequence of cage edges (according to the reflection principle). By showing that there are only Oin) updates, and each can be done in time 0(n), they achieve an 0(n^)-time algorithm. Hershberger and Snoeyink [204] have shown how each update can be done in time O(log^n), resulting in overall time O(nlog^n), using the structure of hourglasses in simple polygons, and the shortest path query data structures of [185,200] OPEN PROBLEM
31. Can the zookeeperproblem be solved in time 0(n)l
The related safari route problem, introduced by Ntafos [304], requires that the cycle visit all of the cages, but it allows travel through a "cage." If the cages are not attached to
686
J.S.B. Mitchell
the boundary of a simple polygon P, then we get the (NP-hard) TSP with neighborhoods. However, for cages that are attached to P, Ntafos [304] obtains an Oikri^) algorithm. Tan and Hirata [371] improve the time bound to O(n^), while removing the constraint that the cycle pass through a given point v on the boundary of P. Aquarium keeper's problem. The aquarium keeper's problem is to find a shortest cycle in a simple polygon P (the aquarium), such that the cycle touches every edge of P. Thus, the aquarium keeper's problem is a special case of the zookeeper's problem (and thus of the TSP with neighborhoods) in which there is a "cage" erected on every edge of P, and each cage consists simply of the edge itself. This extra structure allows an 0(«)-time solution, as shown by Czyzowicz et al. [126], since there is no issue of obtaining the combinatorial type of the path. Carlsson and Jonsson [84] solve the path version of the problem in time O(w^); there is added complexity in searching for a shortest path, since we do not know the order in which a path must visit the edges of P.
Acknowledgements I want thank several people who have contributed suggestions that have improved this survey: Pankaj Agarwal, Yi-Jen Chiang, Sariel Har-Peled, Christian Icking, Doug lerardi, Andrei lones, Peter Johansson, Rolf Klein, Kevin Klenk, Sylvain Lazard, Bengt Nilsson, Joe O'Rourke, Jorg Sack, Sven Schuierer, JUrgen Sellen, Chee Yap, and Sergey Zhukov.
References [1] J. Abello and K. Kumar, Visibility graphs and oriented matroids. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 147-158. [2] P.K. Agarwal and M. Sharir, Arrangements and their applications. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Publishers B.V., North-Holland, Amsterdam (1999), 49119. This Handbook, Chapter 2. [3] P.K. Agarwal, B. Aronov, J. O'Rourke and C.A. Schevon, Star unfolding of a polytope with applications, SIAM J. Comput. 26 (1987), 1689-1713. [4] P.K. Agarwal, T. Biedl, S. Lazard, S. Robbins, S. Suri and S. Whitesides, Curvature-constrained shortest paths in a convex polygon, Proc. 14th Annu. ACM Sympos. Comput. Geom. (1998), 392-401. [5] RK. Agarwal, H. Edelsbrunner, O. Schwarzkopf and E. Welzl, Euclidean minimum spanning trees and bichromatic closest pairs. Discrete Comput. Geom. 6 (5) (1991), 407-422. [6] P.K. Agarwal, S. Har-Peled, M. Sharir and K.R. Varadarajan, Approximate shortest paths on a convex polytope in three dimensions, J. ACM 44 (1997), 567-584. [7] P.K. Agarwal, J. Matousek and S. Suri, Farthest neighbors, maximum spanning trees and related problems in higher dimensions, Comput. Geom. 1 (4) (1992), 189-201. [8] P.K. Agarwal, P. Raghavan and H. Tamaki, Motion planning for a steering-constrained robot through moderate obstacles, Proc. 27th Annu. ACM Sympos. Theory Comput. (1995), 343-352. [9] A. Aggarwal, D. Coppersmith, S. Khanna, R. Motwani and B. Schieber, The angular-metric traveling salesman problem. Proceedings of the Eighth Annual ACM-SIAM Symposium on Discrete Algorithms (Jan. 1997), 221-229. [10] R.K. Ahuja, T.L. Magnanti and J.B. Orlin, Network Flows: Theory, Algorithms and Applications, PrenticeHall, Englewood Cliffs, NJ (1993).
Geometric shortest paths and network optimization
687
[11] L. Aleksandrov, M. Lanthier, A. Maheshwari and J.-R. Sack, An s-approximation algorithm for weighted shortest path queries on polyhedral surfaces. Abstracts 14th European Workshop Comput. Geom. (1998), 19-21. [12] L. Aleksandrov, M. Lanthier, A. Maheshwari and J.-R. Sack, An s-approximation algorithm for weighted shortest paths on polyhedral surfaces, Proc. 6th Scand. Workshop Algorithm Theory, Lecture Notes in Comput. Sci., Springer-Verlag (1998). [13] R. Alexander, Construction of Optimal-Path Maps for Homogeneous-Cost-Region Path-Planning Problems, PhD thesis, Computer Science, U.S. Naval Postgraduate School, Monterey, CA (1989). [14] R. Alexander and N. Rowe, Geometrical principles for path planning by optimal-path-map construction for linear and polygonal homogeneous-region terrain. Technical Report, Computer Science, U.S. Naval Postgraduate School, Monterey, CA (1989). [15] R. Alexander and N. Rowe, Path planning by optimal-path-map construction for homogeneous-cost twodimensional regions, Proc. lEEEIntemat. Conf. Robot. Autom. (1990). [16] N. Alon and Y. Azar, On-line Steiner trees in the Euclidean plane. Discrete Comput. Geom. 10 (1993), 113-121. [17] N. Alon, S. Rajagopalan and S. Suri, Long non-crossing configurations in the plane, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 257-263. [18] M.H. Alsuwaiyel and D.T. Lee, Minimal link visibility paths inside a simple polygon, Comput. Geom. 3 (1) (1993), 1-25. [19] M.H. Alsuwaiyel and D.T. Lee, Finding an approximate minimum-link visibility path inside a simple polygon. Inform. Process. Lett. 55 (2) (1995), 75-79. [20] H. Alt and E. Welzl, Visibility graphs and obstacle-avoiding shortest paths, Z. Open Res. 32 (1988), 145164. [21] S.R. Arikati, D.Z. Chen, L.R Chew, G. Das, M.H.M. Smid and C D . ZaroHagis, Planar spanners and approximate shortest path queries among obstacles in the plane. Algorithms—ESA '96, Fourth Annual European Symposium, J. Diaz and M. Serna, eds. Lecture Notes in Comput. Sci. 1136, Springer-Verlag, Barselona, Spain (Sept. 1996), 514-528. [22] E.M. Arkin, Y.-J. Chiang, J.S.B. Mitchell and S.S. Skiena, A note on the group steiner problem. Manuscript, University at Stony Brook (1997). [23] E.M. Arkin, Y.-J. Chiang, J.S.B. Mitchell, S.S. Skiena and T. Yang, On the maximum scatter TSP, Proc. 8th ACM-SIAM Sympos. Discrete Algorithms (1997), 211-220. [24] E.M. Arkin, S.R Fekete and J.S.B. Mitchell, The lawnmower problem, Proc. 5th Canad. Conf. Comput. Geom. (1993), 461-466. [25] E.M. Arkin, S.R Fekete and J.S.B. Mitchell, Approximation algorithms for lawn mowing and milling. Technical Report, Mathematisches Institut, Universitat zu Koln (1997). To appear, Comput. Geom. [26] E.M. Arkin and R. Hassin, Approximation algorithms for the geometric covering salesman problem. Discrete Appl. Math. 55 (1994), 197-218. [27] E.M. Arkin, M. Held and C.L. Smith, Optimization problems related to zigzag pocket machining, Proc. 7th ACM-SIAM Sympos. Discrete Algorithms (1996), 419-428. [28] E.M. Arkin, J.S.B. Mitchell and G. Narasimhan, Resource-constrained geometric network optimization, Proc. 14th Annu. ACM Sympos. Comput. Geom. (1998), 307-316. [29] E.M. Arkin, J.S.B. Mitchell and C. Piatko, Minimum-link watchman tours. Report, University at Stony Brook (1994). [30] E.M. Arkin, J.S.B. Mitchell and CD. Piatko, Bicriteria shortest path problems in the plane, Proc. 3rd Canad. Conf. Comput. Geom. (1991), 153-156. [31] E.M. Arkin, J.S.B. Mitchell and S. Suri, Logarithmic-time link path queries in a simple polygon. Internal. J. Comput. Geom. Appl. 5 (4) (1995), 369-395. [32] B. Aronov, On the geodesic Voronoi diagram of point sites in a simple polygon, Algorithmica 4 (1989), 109-140. [33] B. Aronov, S.J. Fortune and G. Wilfong, Furthest-site geodesic Voronoi diagram. Discrete Comput. Geom. 9 (1993), 217-255. [34] B. Aronov and J. O'Rourke, Nonoverlap of the star unfolding, Discrete Comput. Geom. 8 (1992), 219250.
688
J.S.B. Mitchell
[35] S. Arora, Polynomial time approximation schemes for Euclidean TSP and other geometric problems, Proc. 37th Annu. IEEE Sympos. Found. Comput. Sci. (1996), 2-11. [36] S. Arora, Nearly linear time approximation schemes for Euclidean TSP and other geometric problems, Proc. 38th Annu. IEEE Sympos. Found. Comput. Sci. (1997), 554-563. [37] S. Arya and H. Ramesh, A 2.5 factor approximation algorithm for the k-MST problem. Inform. Process. Lett. 65 (3) (1998), 117-118. [38] T. Asano, L.J, Guibas, J. Hershberger and H. Imai, Visibility of disjoint polygons, Algorithmica 1 (1986), 49-63. [39] T. Asano, B. Bhattacharya, J.M. Keil and F. Yao, Clustering algorithms based on minimum and maximum spanning trees, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 252-257. [40] T. Asano, D. Kirkpatrick and C.K. Yap, d\-optimal motion for a rod, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 252-263. [41] T. Asano, S.K. Ghosh and T.C. Shermer, Visibility in the plane. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Publishers B.V., North-Holland, Amsterdam (1999), 829876. This Handbook, Chapter 19. [42] T. Asano and G. Toussaint, Computing the geodesic center of a simple polygon. Discrete Algorithms and Complexity, Perspectives in Computing, D.S. Johnson, ed.. Academic Press (1987), 65-79. [43] M. Atallah and D. Chen, On parallel rectilinear obstacle-avoiding paths, Comput. Geom. 3 (1993), 307313. [44] M.J. Atallah and D.Z. Chen, Parallel rectilinear shortest paths with rectangular obstacles, Comput. Geom. 1(1991), 79-113. [45] M.J. Atallah and D.Z. Chen, Deterministic parallel computational geometry. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Pubhshers B.V., North-Holland, Amsterdam (1999), 155-200. This Handbook, Chapter 4. [46] F. Aurenhammer and R. Klein, Voronoi diagrams. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Publishers B.V., North-Holland, Amsterdam (1999), 201-290. This Handbook, Chapter 5. [47] B. Awerbuch, Y. Azar, A. Blum and S. Vempala, Improved approximation guarantees for minimum-weight k-trees and prize-collecting salesman, Proc. 27th Annu. ACM Sympos. Theory Comput. (STOC 95) (1995), 277-283. [48] Y Azar, Lower bounds for insertion methods for TSP, Combinatorics, Probability and Computing 3 (1994), 285-292. [49] R. Baeza-Yates, J. Culberson and G. Rawlins, Searching in the plane. Inform. Comput. 106 (1993), 234252. [50] V. Bafna, B. Kalyanasundaram and K. Pruhs, Not all insertion methods yield constant approximate tours in the Euclidean plane, Theoret. Comput. Sci. 125 (1994), 345-353. [51] C. Bajaj, The algebraic complexity of shortest paths in polyhedral spaces, Proc. 23rd Allerton Conf. Commun. Control Comput. (1985), 510-517. [52] C. Bajaj, The algebraic degree of geometric optimization problems. Discrete Comput. Geom. 3 (1988), 177-191. [53] E. Balas, The prize collecting traveling salesman problem. Networks 19 (1989), 621-636. [54] E. Bar-EU, P. Berman, A. Fiat and P Yan, Online navigation in a room, J. Algorithms 17 (1994), 319-341. [55] R. Bar-Yehuda and B. Chazelle, Triangulating disjoint Jordan chains, Intemat. J. Comput. Geom. Appl. 4 (4) (1994), 475^81. [56] J. Barraquand and J.-C. Latombe, Nonholonomic multi-body mobile robots: Controllability and motion planning in the presence of obstacles, Algorithmica 10 (1993), 121-155. [57] A. Barvinok, D.S. Johnson, G.J. Woeginger and R. Woodroofe, The maximun traveling salesman problem under polyhedral norms, Proc. Sixth Conference on Integer Programming and Combinatorial Optimization, Lecture Notes in Comput. Aci. 1412, Springer-Verlag (1998), 195-201. [58] A.I. Barvinok, Two algorithmic results for the TSP, Math. Oper. Res. 21 (1996), 65-84. [59] C D . Bateman, C.S. Helvig, G. Robins and A. Zelikovsky, Provably good routing tree construction with multi-port terminals, Proc. ACM/SIGDA International Symposium on Physical Design (Apr. 1997). [60] J.L. Bentley, Fast algorithms for geometric traveling salesman problems, ORSA J. Comput. 4 (4) (1992), 387^11.
Geometric shortest paths and network optimization
689
[61] P. Berman, On-line searching and navigation. Competitive Analysis of Algorithms, A. Fiat and G. Woeginger, eds, Springer-Verlag (1998). [62] P. Berman, A. Blum, A. Fiat, H. Karloff, A. Rosen and M. Saks, Randomized robot navigation algorithms, Proc. 7th ACM-SIAM Sympos. Discrete Algorithms (1996), 75-84. [63] P. Berman and M. Karpinski, Randomized navigation to a wall through convex obstacles. Technical Report 85118-CS, Bonn University (1994). [64] M. Bern, Triangulations, Handbook of Discrete and Computational Geometry, Chapter 22, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 413-428. [65] M. Bern and D. Eppstein, Approximation algorithms for geometric problems. Approximation Algorithms for NP-Hard Problems, D.S. Hochbaum, ed., PWS Pubhshing Company, Boston, MA (1997), 296-345. ISBN 0-534-94968-1. [66] M. Bern and P. Plassman, The Steiner problem with edge lengths 1 and 2, Inform. Process. Lett. 32 (1989), 171-176. [67] M. Bern and P. Plassmann, Mesh generation. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Pubhshers B.V., North-Holland, Amsterdam (1999), 291-332. This Handbook, Chapter 6. [68] M.W. Bern, H.J. Karloff, P. Raghavan and B. Schieber, Fast geometric approximation techniques and geometric embedding problems, Theoret. Comput. Sci. 106 (2) (Dec. 1992), 265-281. [69] A. Bezdek, On optimal route planning evading cubes in the three space, Beitrage zur Algebra und Geometric, to appear. [70] D. Bienstock, M.X. Goemans, D. Simchi-Levi and D. Williamson, A note on the prize collecting traveling salesman problem. Math. Prog. 59 (1993), 413^20. [71] A. Blum and P. Chalasani, An ondine algorithm for improving performance in navigation, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (1993), 2-11. [72] A. Blum, P. Chalasani, D. Coppersmith, B. PuUeyblank, P. Raghavan and M. Sudan, The minimum latency problem, Proc. 26th Annu. ACM Sympos. Theory Comput. (STOC 94) (1994), 163-171. [73] A. Blum, P. Chalasani and S. Vempala, A constant-factor approximation for the k-MST problem in the plane, Proc. 27th Annu. ACM Sympos. Theory Comput. (1995), 294-302. [74] A. Blum, P. Raghavan and B. Schieber, Navigating in unfamiliar geometric terrain, SI AM J. Comput. 26 (l)(Feb. 1997), 110-137. [75] M. Blum and D. Kozen, On the power of the compass (or, why mazes are easier to search than graphs), Proc. 19th Annu. IEEE Sympos. Found. Comput. Sci. (1978), 132-142. [76] J.-D. Boissonnat, A.Cerezo and J. Leblond, Shortest paths of bounded curvature in the plane. Internal. J. Intell. Syst. 10 (1994), 1-16. [77] J.-D. Boissonnat, J. Czyzowicz, O. Devillers, J.-M. Robert and M, Yvinec, Convex tours of bounded curvature, Proc. 2nd Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 855, Springer-Verlag (1994), 254-265. [78] J.-D. Boissonnat and S. Lazard, A polynomial-time algorithm for computing a shortest path of bounded curvature amidst moderate obstacles, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 242-251. [79] P. Bose, W. Evans, D. Kirkpatrick, M. McAllister and J. Snoeyink, Approximating shortest paths in arrangements of lines, Proc. 8th Canad. Conf. Comput. Geom., Carleton University Press, Ottawa, Canada (1996), 143-148. [80] P.B. Callahan and S.R. Kosaraju, Faster algorithms for some geometric graph problems in higher dimensions, Proc. 4th ACM-SIAM Sympos. Discrete Algorithms (1993), 291-300. [81] J. Canny, Some algebraic and geometric configurations in PSPACE, Proc. 20th Annu. ACM Sympos. Theory Comput. (1988), 460-467. [82] J. Canny, A. Rege and J. Reif, An exact algorithm for kinodynamic planning in the plane. Discrete Comput. Geom. 6 (1991), 461-484. [83] J. Canny and J.H. Reif, New lower bound techniques for robot motion planning problems, Proc. 28th Annu. IEEE Sympos. Found. Comput. Sci. (1987), 49-60. [84] S. Carlsson and H. Jonsson, Computing a shortest watchman path in a simple polygon in polynomial-time, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955, Springer-Verlag (1995), 122-134.
690
J.S.B. Mitchell
[85] S. Carlsson, H. Jonsson and BJ. Nilsson, Finding the shortest watchman route in a simple polygon, Proc. 4th Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 762, Springer-Verlag (1993), 58-67. [86] S. Carlsson, B.J. Nilsson and S. Ntafos, Optimum guard covers and m-watchmen routes for restricted polygons, Intemat. J. Comput. Geom. Appl. 3 (1993), 85-105. [87] K.F. Chan and T.W. Lam, An on-line algorithm for navigating in unknown environment, Intemat. J. Comput. Geom. Appl. 3 (1993), 227-244. [88] M. Charikar, C. Chekuri, T. Cheung, Z. Dai, A. Goel, S. Guha and M. Li, Approximation algorithms for directed Steiner problems, Proc. 9th ACM-SIAM Sympos. Discrete Algorithms (1998). [89] M. Charikar, C. Chekuri, A. Goel and S. Guha, Rounding via tree: Deterministic approximation algorithms for group Steiner trees and k-median, Proc. 30th Annu. ACM Sympos. Theory Comput. (1998). [90] B. Chazelle, A theorem on polygon cutting with applications, Proc. 23rd Annu. IEEE Sympos. Found. Comput. Sci. (1982), 339-349. [91] B. Chazelle, An algorithm for segment-dragging and its implementation, Algorithmica 3 (1988), 205-221. [92] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [93] B. Chazelle, H. Edelsbmnner, M. Grigni, L.J. Guibas, J. Hershberger, M. Sharir and J. Snoeyink, Ray shooting in polygons using geodesic triangulations, Proc. 18th Intemat. CoUoq. Automata Lang. Program., Lecture Notes in Comput. Sci. 510, Springer-Verlag (1991), 661-673. [94] D.Z. Chen, On the all-pairs Euclidean short path problem, Proc. 6th ACM-SIAM Sympos. Discrete Algorithms (1995), 292-301. [95] D.Z. Chen, O. Daescu and K.S. Klenk, On geometric path query problems, Proc. 5th Workshop Algorithms Data Stmct., Lecture Notes in Comput. Sci. 1272, Springer-Veriag (1997), 248-257. [96] D.Z. Chen, G. Das and M. Smid, Lower bounds for computing geometric spanners and approximate shortest paths, Proc. 8th Canad. Conf. Comput. Geom. (1996), 155-160. [97] D.Z. Chen and K. S. Klenk, Rectilinear short path queries among rectangular obstacles. Inform. Process. Lett. 57 (1996), 313-319. [98] D.Z. Chen, K.S. Klenk and H.-Y.T. Tu, Shortest path queries among weighted obstacles in the rectilinear plane, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 370-379. [99] D.Z. Chen, K.S. Klenk and H.-Y.T. Tu, Shortest path queries among weighted obstacles in the rectilinear plane. Manuscript, Dept. Comput. Sci., Purdue Univ., West Lafayette, IN (1996). [100] J. Chen and Y. Han, Shortest paths on a polyhedron, Proc. 6th Annu. ACM Sympos. Comput. Geom. (1990), 360-369. [101] Y.-B. Chen and D. lerardi. Time-optimal trajectories of a rod in the plane subject to velocity constraints, Algorithmica 18 (2) (June 1997), 165-197. [102] S.-W. Cheng, The Steiner tree problem for terminals on the boundary of a rectilinear polygon, Proc. of the DIM ACS Workshop on Network Design: Connectivity and Facilities Location (Apr. 1997). [103] S.-W. Cheng, A. Lim and C.-T. Wu, Optimal rectilinear Steiner tree for extremal point sets, Proc. 4th Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 762, Springer-Verlag (1993), 523-532. [104] S.-W. Cheng and C.-K. Tang, A fast algorithm for computing optimal rectilinear Steiner trees for extremal point sets, Proc. 6th Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 1004, Springer-Verlag (1995), 322-331. [105] D. Cheriton and R.E. Tarjan, Finding minimum spanning trees, SIAM J. Comput. 5 (1976), 724-742. [106] L.P. Chew, Planning the shortest path for a disc in 0{n^\ogn) time, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 214-220. [107] L.P. Chew, There are planar graphs almost as good as the complete graph, J. Comput. Syst. Sci. 39 (1989), 205-219. [108] Y.-J. Chiang and J.S.B. Mitchell, Two-point Euclidean shortest path queries in the plane, Proc. 10th ACMSIAM Sympos. Discrete Algorithms (1999), 215-224. [109] Y.-J. Chiang, F.P. Preparata and R. Tamassia, A unified approach to dynamic point location, ray shooting, shortest paths in planar maps, Proc. 4th ACM-SIAM Sympos. Discrete Algorithms (1993), 44-53. [110] Y.-J. Chiang, F.P. Preparata and R. Tamassia, A unified approach to dynamic point location, ray shooting, shortest paths in planar maps, SIAM J. Comput. 25 (1996), 207-233. [111] W Chin and S. Ntafos, Optimum watchman routes, Inform. Process. Lett. 28 (1988), 3 9 ^ 4 .
Geometric shortest paths and network optimization
691
[112] W.-R Chin and S. Ntafos, Optimum zookeeper routes, Congr. Numer. 58 (1987), 257-266. Combinatorics, Graph Theory and Computing. Proc. 20th South-East Conf., Boca Raton. [113] W.-P. Chin and S. Ntafos, Watchman routes in simple polygons. Discrete Comput. Geom. 6 (1) (1991), 9-31. [114] J. Choi, J. Sellen and C.-K. Yap, Precision-sensitive Euclidean shortest path in 3-space, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 350-359. [115] J. Choi, J. Sellen and C.-K. Yap, Approximate Euclidean shortest paths in 3-space, Internat. J. Comput. Geom. Appl. 7 (4) (Aug. 1997), 271-295. [116] J. Choi and C.-K. Yap, Rectilinear geodesies in 3-space, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 380-389. [117] J. Choi and C.-K. Yap, Monotonicity of rectilinear geodesies in d-space, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 339-348. [118] J. Choi, Geodesic problems in high dimensions, PhD thesis, Courant Institute, New York University, New York (June 1995). [119] K.L. Clarkson, Fast expected time and approximation algorithms for geometric minimum spanning trees, Proc. 16th Annu. ACM Sympos. Theory Comput. (1984), 342-348. [120] K.L. Clarkson, Approximation algorithms for shortest path motion planning, Proc. 19th Annu. ACM Sympos. Theory Comput. (1987), 56-65. [121] K.L. Clarkson, An algorithm for geometric minimum spanning trees requiring nearly linear expected time, Algorithmica 4 (1989), 461^69. [122] K.L. Clarkson, S. Kapoor and P.M. Vaidya, Rectilinear shortest paths through polygonal obstacles in 0{n{\ogn)^) time, Proc. 3rd Annu. ACM Sympos. Comput. Geom. (1987), 251-257. [123] R. Cole and A. Siegel, River routing every which way, but loose, Proc. 25th Annu. IEEE Sympos. Found. Comput. Sci. (1984), 65-73. [124] T.H. Cormen, C.E. Leiserson and R.L. Rivest, Introduction to Algorithms, MIT Press, Cambridge, MA (1990). [125] J. Culberson and G.J.E. Rawlins, Turtlegons: Generating simple polygons from sequences of angles, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 305-310. [126] J. Czyzowicz, P. Egyed, H. Everett, D. Rappaport, T. Shermer, D. Souvaine, G. Toussaint and J. Urrutia, The aquarium keeper's problem, Proc. 2nd ACM-SIAM Sympos. Discrete Algorithms (1991), 459^64. [127] G. Das, S. Kapoor and M. Smid, On the complexity of approximating Euclidean traveling salesman tours and minimum spanning trees, Algorithmica 19 (1997), 441^60. [128] A. Datta, C.A. Hipke and S. Schuierer, Competitive searching in polygons — Beyond generalised streets, Proc. 6th Annu. Internal. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 1004, SpringerVerlag (1995), 32-41. [129] A. Datta and C. Icking, Competitive searching in a generalized street, Proc. 10th Annu. ACM Sympos. Comput. Geom. (1994), 175-182. [130] A. Datta and K. Krithivasan, Path planning with local information, Proc. Conf. Found. Softw. Tech. Theoret. Comput. Sci., Lecture Notes in Comput. Sci. 338, Springer-Verlag, New Dehli, India (Dec. 1988), 108-121. [131] M. de Berg, On rectilinear link distance, Comput. Geom. 1 (1) (July 1991), 13-34. [132] M. de Berg and M. van Kreveld, Trekking in the alps without freezing or getting tired, Algorithmica 18 (1997), 306-323. [133] M. de Berg, M. van Kreveld and B.J. Nilsson, Shortest path queries in rectilinear worlds of higher dimension, Proc. 7th Annu. ACM Sympos. Comput. Geom. (1991), 51-60. [134] M. de Berg, M. van Kreveld, B.J. Nilsson and M.H. Overmars, Shortest path queries in rectilinear worlds. Internal. J. Comput. Geom. Appl. 2 (3) (1992), 287-309. [135] L. De Floriani and E. Puppo, Applications of computational geometry to geographic information systems. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Publishers B.V., North-Holland, Amsterdam (1999), 333-388. This Handbook, Chapter 7. [136] X. Deng, T. Kameda and C. Papadimitriou, How to learn an unknown environment, Proc. 32nd Annu. IEEE Sympos. Found. Comput. Sci. (1991), 298-303. [137] X. Deng, T. Kameda and C.H. Papadimitriou, How to learn an unknown environment I: The rectilinear case. Technical Report CS-93-04, Department of Computer Science, York University, Canada (1993).
692
J.S.B. Mitchell
[138] G. Desaulniers, On shortest paths for a car-like robot maneuvering around obstacles, Les Cahiers du GERAD G-94-35, Ecole des Hautes Etudes Commerciales, Montreal, Canada (1994). 139] E.W. Dijkstra, A note on two problems in connexion with graphs, Numer. Math. 1 (1959), 269-271. 140] B.R. Donald and P. Xavier, Provably good approximation algorithms for optimal kinodynamic planning for Cartesian robots and open chain manipulators, Algorithmica 14 (6) (1995), 480-530. 141] B.R. Donald, P. Xavier, J. Canny and J. Reif, Kinodynamic motion planning, J. ACM 40 (5) (Nov. 1993), 1048-1066. 142] J.R. DriscoU, H.N. Gabow, R. Shrairaman and R.E. Tarjan, Relaxed heaps: An alternative to Fibonacci heaps with applications to parallel computation, Commun. ACM 31 (1988), 1343-1354. 143] D.-Z. Du and F.K. Hwang, A proof of Gilbert-Pollak's conjecture on the Steiner ratio, Algorithmica 7 (1992), 121-135. 144] D.-Z. Du and F.K. Hwang, The state of art on Steiner ratio problems. Computing in Euchdean Geometry, D.-Z. Du and F.K. Hwang, eds. Lecture Notes Series on Computing, Vol. 1, World Scientific, Singapore (1992), 163-191. 145] L.E. Dubins, On curves of minimal length with a constraint on average curvature and with prescribed initial and terminal positions and tangents, Amer. J. Math. 79 (1957), 497-516. 146] P. Fades, X. Lin and N.C. Wormald, Performance guarantees for motion planning with temporal uncertainty. Austral. Comput. J. 25 (1) (1993), 21-28. 147] A. Efrat and S. Har-Peled, Fly cheaply: On the minimum fuel-consumption problem, Proc. 14th Annu. ACM Sympos. Comput. Geom. (1998), 143-145. 148] H. ElGindy and M.T. Goodrich, Parallel algorithms for shortest path problems in polygons. Visual Comput. 3 (1988), 371-378. 149] H. ElGindy and P. Mitra, Orthogonal shortest route queries among axis parallel rectangular obstacles, Intemat. J. Comput. Geom. Appl. 4 (1994), 3-24. 150] D. Eppstein, Faster geometric k-point MST approximation, Comput. Geom. 8 (5) (Oct. 1997), 231-240. 151] D. Eppstein, Spanning trees and spanners. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Publishers B.V., North-Holland, Amsterdam (1999), 425-^61. This Handbook, Chapter 9. 152] D. Eppstein and D. Hart, Shortest paths in an arrangement with k line orientations, Proc. 10th ACM-SIAM Sympos. Discrete Algorithms (1999), 310-316. 153] S.P Fekete, Geometry and the travelling salesman problem, PhD thesis. Department of Combinatorics and Optimization, University of Waterloo, Waterloo, ON (1992). 154] S.P. Fekete, Area optimization of simple polygons. Technical Report 97-256, Mathematisches Institut, Universitat zu Koln (1997). To appear. Discrete Comput. Geom. 155] S.P. Fekete, Finding maximum length tours under Euclidean metrics. Technical Report 98-317, Mathematisches Institut, Universitat zu Koln (1998). 156] S.P. Fekete and W.R. PuUeyblank, Area optimization of simple polygons, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 173-182. 157] S.P. Fekete and G.J. Woeginger, Angle-restricted tours in the plane, Comput. Geom. 8 (4) (1997), 195-218. 158] A. Ferreira and J.G. Peters, Finding smallest paths in rectilinear polygons on a hypercube multiprocessor, Proc. 3rd Canad. Conf. Comput. Geom. (1991), 162-165. 159] M. Fischetti, H.W. Hamacher, K. J0msten and F. Maffioli, Weighted k-cardinality trees: Complexity and polyhedral structure. Networks 24 (1994), 11-21. 160] S. Fortune and G. Wilfong, Planning constrained motion. Annals of Math, and AI 3 (1991), 21-82. 161] M. Fredman and R.E. Tarjan, Fibonacci heaps and their uses in improved network optimization problems, J. ACM 34 (1987), 596-615. 162] H.N. Gabow, J.L. Bentley and R.E. Tarjan, Scaling and related techniques for geometry problems, Proc. 16th Annu. ACM Sympos. Theory Comput. (1984), 135-143. 163] S. Gao, M. Jerrum, M. Kaufmann, K. Mehlhorn, W. RiiUing and C. Storb, On continuous homotopic one layer routing, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 392^02. 164] M.R. Garey, R.L. Graham and D.S. Johnson, The complexity of computing Steiner minimal trees, SIAM J. Appl. Math. 32 (1977), 835-859. 165] M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, WH. Freeman, New York, NY (1979).
Geometric shortest paths and network optimization
693
[166] N. Garg, A 3-approximation for the minimum tree spanning k vertices, Proc. 37th Annu. Sympos. Found. of Comput. Sci. (1996), 302-309. [167] N. Garg and D.S. Hochbaum, An O(log^) approximation algorithm for the k minimum spanning tree problem in the plane, Proc. 26th Annu. ACM Sympos. Theory Comput. (1994), 432^38. [168] N. Garg, G. Konjevod and R. Ravi, A polylogarithmic approximation algorithm for the group Steiner problem, Proc. 9th ACM-SIAM Sympos. Discrete Algorithms (1998). [169] L.P. GewaU, A. Meng, J.S.B. Mitchell and S. Ntafos, Path planning in O/l/oo weighted regions with applications, ORSA J. Comput. 2 (3) (1990), 253-272. [170] L.P. Gewali, S. Ntafos and I.G. ToUis, Path planning in the presence of vertical obstacles. Technical Report, Computer Science, University of Texas at Dallas (1989). [171] L.P. Gewali and S. Ntafos, Watchman routes in the presence of a pair of convex polygons, Proc. 7th Canad. Conf. Comput. Geom. (1995), 127-132. [172] S.K. Ghosh, On recognizing and characterizing visibility graphs of simple polygons. Discrete Comput. Geom. 17 (1997), 143-162. [173] S.K. Ghosh and D.M. Mount, An output-sensitive algorithm for computing visibility graphs, SIAM J. Comput. 20 (1991), 888-910. [174] S.K. Ghosh and S. Saluja, Optimal on-line algorithms for walking with minimum number of turns in unknown streets, Comput. Geom. 8 (5) (Oct. 1997), 241-266. [175] E.N. Gilbert and H.O. PoUak, Steiner minimal trees, SIAM J. Appl. Math. 16 (1) (1968), 1-29. [176] M. Goemans and D. Williamson, General approximation technique for constrained forest problems, Proc. 3rd ACM-SIAM Sympos. Discrete Algorithms (SODA '92) (1992), 307-315. [177] M.X. Goemans and J.M. Kleinberg, An improved approximation ratio for the minimum latency problem, Proc. 7th ACM-SIAM Sympos. Discrete Algorithms (SODA '96) (1996), 152-158. [178] J.E. Goodman and J.O'Rourke, eds. Handbook of Discrete and Computational Geometry, CRC Press LLC, Boca Raton, FL (1997). [179] M.T. Goodrich, Parallel algorithms in geometry. Handbook of Discrete and Computational Geometry, Chapter 36, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, FL (1997), 669-682. [180] M.T. Goodrich and K. Ramaiyer, Geometric data structures. Handbook of Computational Geometry, J,-R. Sack and J. Urrutia, eds, Elsevier Science PubHshers B.V., North-Holland, Amsterdam (1999), 463^89. This Handbook, Chapter 10. [181] M.T. Goodrich, S. Shauck and S. Guha, Parallel methods for visibility and shortest path problems in simple polygons, Algorithmica 8 (1992), 461-486. [182] M.T. Goodrich, S. Shauck and S. Guha, Addendum to "parallel methods for visibility and shortest path problems in simple polygons", Algorithmica 9 (1993), 515-516. [183] M.T. Goodrich and R. Tamassia, Dynamic ray shooting and shortest paths via balanced geodesic triangulations, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 318-327. [184] J. Gudmundsson and C. Levcopoulos, A fast approximation algorithm for TSP with neighborhoods. Technical Report LU-CS-TR:97-195, Dept. of Comp. Sci., Lund University (1997). [185] L.J. Guibas and J. Hershberger, Optimal shortest path queries in a simple polygon, J. Comput. Syst. Sci. 39 (1989), 126-152. [186] L.J. Guibas, J. Hershberger, D. Leven, M. Sharir and R.E. Tarjan, Linear-time algorithms for visibility and shortest path problems inside triangulated simple polygons, Algorithmica 2 (1987), 209-233. [187] L.J. Guibas, J.E. Hershberger, J.S.B. Mitchell and J.S. Snoeyink, Approximating polygons and subdivisions with minimum link paths, Intemat. J. Comput. Geom. Appl. 3 (4) (Dec. 1993), 383-415. [188] M.K. Guyder, Automating the optimization of 2 ^ -axis milling, Proc. Computer Applications in Production and Engineering, F. Kimura and A. Rolstadas, eds, North-Holland (Oct. 1989) (supplement). [189] M. Hammar and B.J. Nilsson, Concerning the time bounds of existing shortest watchman route algorithms, Proc. 11th International Symposium on Fundamentals of Computation Theory, Lecture Notes in Comput. Sci. 1279, Springer-Verlag, Krakow, Poland (1-3 September 1997), 210-221. [ 190] G. Y. Handler and I. Zang, A dual algorithm for the constrained shortest path problem. Networks 10 (1980), 293-310. [191] P. Hansen, Bicriterion path problems. Multiple Criteria Decision Making: Theory and Applications, G. Fandel and T. Gal, eds. Lecture Notes in Economics and Mathematical Systems 177, Springer, Heidelberg (1980), 109-127.
694
J.S.B. Mitchell
[192] S. Har-Peled, Approximate shortest paths and geodesic diameters on convex poly topes in three dimensions. Discrete Comput. Geom., to appear. [193] S. Har-Peled, Approximate shortest paths and geodesic diameters on convex polytopes in three dimensions, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 359-365. [194] S. Har-Peled, Constructing approximate shortest path maps in three dimensions, Proc. 14th Annu. ACM Sympos. Comput. Geom. (1998), 383-391. [195] R. Hassin and S. Rubinstein, An approximation algorithm for the maximum traveling salesman problem. Inform. Process. Lett. 67 (1998), 125-130. [196] M. Held, On the Computational Geometry of Pocket Machining, Lecture Notes in Comput. Sci. 500, Springer-Verlag (June 1991). [197] M. Henig, The shortest path problem with two objective functions, European J. Oper. Res. 25 (1985), 281-291. [198] M.R. Henzinger, P. Klein and S. Rao, Faster shortest-path algorithms for planar graphs, J. Comput. Syst. Sci. 55(1997), 3-23. [199] J. Hershberger, Finding the visibility graph of a simple polygon in time proportional to its size, Algorithmica4(1989), 141-155. [200] J. Hershberger, A new data structure for shortest path queries in a simple polygon. Inform. Process. Lett. 38 (1991), 231-235. [201] J. Hershberger, Optimal parallel algorithms for triangulated simple polygons, Proc. 8th Annu. ACM Sympos. Comput. Geom. (1992), 33-42. [202] J. Hershberger and L.J. Guibas, An O(n^) shortest path algorithm for a non-rotating convex body, J. Algorithms 9 (1988), 18^6. [203] J. Hershberger and J. Snoeyink, Computing minimum length paths of a given homotopy class, Comput. Geom. 4 (1994), 63-98. [204] J. Hershberger and J. Snoeyink, An efficient solution to the zookeeper's problem, Proc. 6th Canad. Conf. Comput. Geom. (1994), 104-109. [205] J. Hershberger and S. Suri, Efficient computation of Euclidean shortest paths in the plane, Proc. 34th Annu. IEEE Sympos. Found. Comput. Sci. (1993), 508-517. [206] J. Hershberger and S. Suri, An optimal algorithm for Euclidean shortest paths in the plane. Manuscript, Washington University (1995). [207] J. Hershberger and S. Suri, A pedestrian approach to ray shooting: Shoot a ray, take a walk, J. Algorithms 18 (1995), 403-431. [208] J. Hershberger and S. Suri, Practical methods for approximating shortest paths on a convex polytope in m^, Proc. 6th ACM-SIAM Sympos. Discrete Algorithms (1995), 447-456. [209] J. Hershberger and S. Suri, Matrix searching with the shortest path metric, SI AM J. Comput. 26 (6) (Dec. 1997), 1612-1634. [210] D. Hochbaum, ed.. Approximation Problems for NP-Complete Problems, PWS Publishing Company, Boston, MA (1997). [211] F. Hoffmann, C. Icking, R. Klein and K. Kriegel, A competitive strategy for learning a polygon, Proc. 8th ACM-SIAM Sympos. Discrete Algorithms (1997), 166-174. [212] F. Hoffmann, C. Icking, R. Klein and K. Kriegel, The polygon exploration problem: A new strategy and a new analysis technique, Proc. 1998 Workshop on the Algorithmic Foundations of Robotics (1998). [213] C. Hurkens, Nasty TSP instances for farthest insertion, Proc. 2nd IPCO Conference Integer Programming and Combinatorial Optimization (1992). [214] F.K. Hwang, On Steiner minimal trees with rectilinear distance, SIAM J. Appl. Math. 30 (1) (1976), 104114. [215] C. Icking, Motion and visibility in simple polygons, PhD thesis, FemUniversitat Hagen (1994). [216] C. Icking and R. Klein, Searching for the kernel of a polygon: A competitive strategy, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 258-266. [217] C. Icking, G. Rote, E. Welzl and C. Yap, Shortest paths for line segments, Algorithmica 10 (1993), 182200. [218] E. Ihler, Bounds on the quality of approximate solutions to the group Steiner problem, Graph-Theoret. Concepts Comput. Sci.: Proc. Internal. Workshop, Lecture Notes in Comput. Sci. 484, Springer-Verlag, Berlin, Germany (1991), 109-118.
Geometric shortest paths and network optimization
695
[219] E. Ihler, The complexity of approximating the class Steiner tree problem. Graph Theoretic Concepts in Computer Science: Proc. Intemat. Workshop WG '91, Lecture Notes in Comput. Sci. 570, Springer-Verlag, Berlin, Germany (1992), 85-96. [220] E. Ihler, The rectilinear Steiner tree problem for intervals on two parallel lines. Math. Program. Ser. B 63 (1994), 281-296. [221] E. Ihler, G. Reich and P. Widmayer, On shortest networks for classes ofpoints in the plane, Proc. Computational Geometry: Methods, Algorithms and Applications, Lecture Notes in Comput. Sci. 553, SpringerVerlag(1991), 103-111. [222] H. Imai and M. Iri, Polygonal approximations of a curve-formulations and algorithms. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1988), 71-86. [223] M. Imase and B.M. Waxman, Dynamic Steiner tree problem, SIAM J. Discrete Math. 4 (1991), 369-384. [224] K. Iwano, P. Raghavan and H. Tamaki, The traveling cameraman problem, with applications to automatic optical inspection, Proc. 5th Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 834, Springer-Verlag (1994), 29-37. [225] S.S. Iyengar and A. Elfes, eds. Autonomous Mobile Robots: Perception, Mapping and Navigation, IEEE Computer Society Press, Los Alamitos, CA (1991). [226] S.S. Iyengar, C.C. Jorgensen, S.V.N. Rao and C.R. Weisbin, Robot navigation algorithms using learned spatial graphs, Robotica 4 (1986), 93-100. [227] P. Jacobs and J. Canny, Planning smooth paths for mobile robots, Proc. IEEE Internal. Conf. Robot. Autom. (1989), 2-7. [228] P. Jacobs and J. Canny, Planning smooth paths for mobile robots, Nonholonomic Motion Planning, Z. Li and J.F. Canny, eds, Kluwer Academic Pubhshers, Norwell, MA (1992), 271-342. [229] P. Johansson, On a weighted distance model for injection moulding, Linkoping Studies in Science and Technology, Thesis No. 604 LiU-TEK-LIC-1997:05, Division of Applied Mathematics, Linkoping University, Linkoping, Sweden (Feb. 1997). [230] M. Jiinger, G. Reinelt and G. Rinaldi, The traveling salesman problem. Network Models, Handbook of Operations Research/Management Science, M.O. Ball, T.L. Magnanti, C.L. Monma and G.L. Nemhauser, eds, Elsevier Science, Amsterdam (1995), 225-230. [231] B. Kalyanasundaram and K. Pruhs, A competitive analysis of algorithms for searching unknown scenes, Comput. Geom. 3 (1993), 139-155. [232] B. Kalyanasundaram and K. Pruhs, Constructing competitive tours from local information, Theoret. Comput. Sci. 130 (1994), 125-138. [233] B. Kalyanasundaram and K. Pruhs, Online network optimization problems. Competitive Analysis of Algorithms, A. Fiat and G. Woeginger, eds. Springer-Verlag (1998). [234] M.-Y. Kao, J.H. Reif and S.R. Tate, Searching in an unknown environment: An optimal randomized algorithm for the cow-path problem, Proc. 4th ACM-SIAM Sympos. Discrete Algorithms (1993), 441^47. [235] S. Kapoor, Approximate geographic neighbor tree with applications. Manuscript, IIT, New Delhi (1997). [236] S. Kapoor, Efficient computation of geodesic shortest paths, Proc. 32nd Annu. ACM Sympos. Theory Comput. (1999). [237] S. Kapoor and S.N. Maheshwari, Efficient algorithms for Euclidean shortest path and visibility problems with polygonal obstacles, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 172-182. [238] S. Kapoor, S.N. Maheshwari and J.S.B. Mitchell, An efficient algorithm for Euclidean shortest paths among polygonal obstacles in the plane. Discrete Comput. Geom. 18 (1997), 377-383. [239] M. Kindl, M. Shing and N. Rowe, A stochastic approach to the weighted-region problem, I: The design of the path annealing algorithm. Technical Report, Computer Science, U.S. Naval Postgraduate School, Monterey, CA (1991). [240] M. Kindl, M. Shing and N. Rowe, A stochastic approach to the weighted-region problem, 11: Performance enhancement techniques and experimental results. Technical Report, Computer Science, U.S. Naval Postgraduate School, Monterey, CA (1991). [241] P.N. Klein and R. Ravi, A nearly best-possible approximation algorithm for node-weighted Steiner tree, J. Algorithms 19 (1995), 104-115. [242] R. Klein, Walking an unknown street with bounded detour, Comput. Geom. 1 (1992), 325-351. [243] J.M. Kleinberg, On-line search in a simple polygon, Proc. 5th ACM-SIAM Sympos. Discrete Algorithms (1994), 8-15.
696
J.S.B.
Mitchell
[244] S. Kosaraju, J. Park and C. Stein, Long tours and short superstrings, Proc. 35th Annu. IEEE Sympos. Found. Comput. Sci. (FOCS 94) (1994). [245] D. Krznaric, C. Levcopoulos and B.J. Nilsson, Minimum spanning trees in d dimensions, Proc. 5th Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 1284, Springer-Verlag (1997), 341-349. [246] P. Kumar and C. Veni Madhavan, Shortest watchman tours in weak visibility polygons, Proc. 5th Canad. Conf. Comput. Geom. (1993), 91-96. [247] M. Lanthier, A. Maheshwari and J.-R. Sack, Approximating weighted shortest paths on polyhedral surfaces, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 274-283. [248] J.-C. Latombe, Robot Motion Planning, Kluwer Academic Pubhshers, Boston (1991). [249] J.P. Laumond, Feasible trajectories for mobile robots with kinematic and environment constraints. Conference on Intelligent Autonomous Systems (Amsterdam, the Netherlands, December 8-11, 1986), L.O. Hertzberger and F.C.A. Groen, eds, Elsevier Science Publishers (Dec. 1986), 346-354. [250] J.-P Laumond, P. Jacobs, M. Taix and R.M. Murray, A motion planner for nonholonomic mobile robots, IEEE Trans. Robot. Autom. 10 (5) (1994), 577-593. [251] E.L. Lawler, J.K. Lenstra, A.H.G. Rinnooy Kan and D.B. Shmoys, eds. The Traveling Salesman Problem, Wiley, New York, NY (1985). [252] D.T. Lee, Proximity and reachability in the plane. Report R-831, Dept. Elect. Engrg., Univ. Illinois, Urbana,IL(1978). [253] D.T. Lee and F.P. Preparata, Euclidean shortest paths in the presence of rectilinear barriers. Networks 14 (1984), 393-^10. [254] D.T. Lee, CD. Yang and T.H. Chen, Shortest rectilinear paths among weighted obstacles, Intemat. J. Comput. Geom. Appl. 1 (2) (1991), 109-124. [255] D.T. Lee, C D . Yang and CK. Wong, Rectilinear paths among rectilinear obstacles. Discrete Appl. Math. 70(1996), 185-215. [256] CE. Leiserson and F.M. Maley, Algorithms for routing and testing routability of planar VLSI layouts, Proc. 17th Annu. ACM Sympos. Theory Comput. (1985), 69-78. [257] C Levcopoulos and D. Krznaric, Quasi-greedy triangulations approximating the minimum weight triangulation, Proc. 7th ACM-SIAM Sympos. Discrete Algorithms (1996), 392^0L [258] Z. Li and J.F. Canny, eds, Nonholonomic Motion Planning, Kluwer Academic Pubishers, Norwell, MA (1992). [259] A. Lingas, A. Maheshwari and J.-R. Sack, Parallel algorithms for rectilinear link distance problems, Algorithmica 14 (1995), 261-289. [260] A. Lopez-Ortiz and S. Schuierer, Going home through an unknown street. Algorithms and Data Structures, 4th International Workshop, S.G. Akl, F.K.H.A. Dehne, J.-R. Sack and N. Santoro, eds. Lecture Notes in Comput. Sci. 955, Springer-Verlag, Kingston, Ontario, Canada (Aug. 1995), 135-146. [261] A. Lopez-Ortiz and S. Schuierer, Simple, efficient and robust strategies to traverse streets, Proc. 7th Canad. Conf. Comput. Geom. (1995), 217-222. [262] A. Lopez-Ortiz and S. Schuierer, Generalized streets revisited, Proc. 4th Annu. European Sympos. Algorithms, I. Diaz and M. Sema, eds, Lecture Notes in Comput. Sci. 1136, Springer-Verlag (1996), 546-558. [263] A. Lopez-Ortiz and S. Schuierer, Walking streets faster, Proc. 5th Scand. Workshop Algorithm Theory, R.G. Karlsson and A. Lingas, eds. Lecture Notes in Comput. Sci. 1097, Springer-Verlag, Reykjavik, Iceland (July 1996), 345-356. [264] A. Lopez-Ortiz and S. Schuierer, Position-independent near optimal searching and on-line recognition in star polygons. Algorithms and Data Structures, 5th International Workshop, F. Dehne, A. Rau-Chaplin, J.-R. Sack and R. Tamassia, eds. Lecture Notes in Comput. Sci. 1272, Springer-Verlag, Halifax, Nova Scotia, Canada (Aug. 1997), 284-296. [265] V.J. Lumelsky, Algorithmic and complexity issues of robot motion in an uncertain environment, J. Complexity 3 (1987), 146-182. [266] V.J. Lumelsky, Algorithmic issues of sensor-based robot motion planning, Proc. 26th IEEE Conf. Decision Control (1987), 1796-1801. [267] V.J. Lumelsky, A comparative study on the path length performance of maze-searching and robot motion planning algorithms, IEEE Trans. Robot. Autom. 7(1) (1991), 57-66. [268] VJ. Lumelsky and A. A. Stepanov, Dynamic path planning for a mobile automaton with limited information on the environment, IEEE Trans. Autom. Control AC-31 (1986), 1058-1063.
Geometric shortest paths and network optimization
697
[269] V.J. Lumelsky and A.A. Stepanov, Path-planning strategies for a point mobile automaton moving amidst unknown obstacles of arbitrary shape, Algorithmica 2 (1987), 403^30. [270] C. Lund and M. Yannakakis, On the hardness of approximating minimization problems, J. ACM 41 960982. [271] A. Maheshwari, J.-R. Sack and H. Djidjev, Link distance problems. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Publishers B.V., North-Holland, Amsterdam (1999), 519-558. This Handbook, Chapter 12. [272] C. Mata and J.S.B. Mitchell, Approximation algorithms for geometric tour and network design problems, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 360-369. [273] C. Mata and J.S.B. Mitchell, A new algorithm for computing shortest paths in weighted planar subdivisions, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 264-273. [274] K.M. McDonald and J.G. Peters, Smallest paths in simple rectilinear polygons, IEEE Trans, on Computer Aided Design 11 (1992), 864-875. [275] A. Mei and Y. Igarashi, An efficient strategy for robot navigation in unknown environment. Inform. Process. Lett. 52(1994), 51-56. [276] A. Mei and Y Igarashi, A robot navigation strategy in unknown environment and its efficiency, lEICE Trans. Fundamentals Electronics, Comm. and Comput. Sci. E77-A (7) (July 1994), 1157-1162. [277] B. Mirtich and J. Canny, Using skeletons for nonholonomic path planning among obstacles, Proc. 9th lEEEIntemat. Conf. Robot. Autom. (1992), 2533-2540. [278] J.S.B. Mitchell, Planning shortest paths, PhD thesis, Stanford Univ., Stanford, CA (1986). [279] J.S.B. Mitchell, An optimal algorithm for shortest rectilinear paths among obstacles. Abstracts 1st Canad. Conf. Comput. Geom. (1989), 22. [280] J.S.B. Mitchell, On maximum flows in polyhedral domains, J. Comput. Syst. Sci. 40 (1990), 88-123. [281] J.S.B. Mitchell, An algorithmic approach to some problems in terrain navigation. Autonomous Mobile Robots: Perception, Mapping and Navigation, S.S. Iyengar and A. Elfes, eds, IEEE Computer Society Press, Los Alamitos, CA (1991), 408-427. [282] J.S.B. Mitchell, A new algorithm for shortest paths among obstacles in the plane, Ann. Math. Artif. Intell. 3 (1991), 83-106. [283] J.S.B. Mitchell, L\ shortest paths among polygonal obstacles in the plane, Algorithmica 8 (1992), 55-88. [284] J.S.B. Mitchell, Shortest paths among obstacles in the plane, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 308-317. [285] J.S.B. Mitchell, Guillotine subdivisions approximate polygonal subdivisions: A simple new method for the geometric k-MSTproblem, Proc. 7th ACM-SIAM Sympos. Discrete Algorithms (1996), 402-408. [286] J.S.B. Mitchell, Shortest paths among obstacles in the plane, Intemat. J. Comput. Geom. Appl. 6 (1996), 309-332. [287] J.S.B. Mitchell, Guillotine subdivisions approximate polygonal subdivisions: Part III — Faster polynomial-time approximation schemes for geometric network optimization. Manuscript, University at Stony Brook (1997). [288] J.S.B. Mitchell, Shortest paths and networks. Handbook of Discrete and Computational Geometry, Chapter 24, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, EL (1997), 445-466. [289] J.S.B. Mitchell, Guillotine subdivisions approximate polygonal subdivisions: A simple polynomial-time approximation scheme for geometric TSP, k-MST, and related problems, SIAM J. Comput. 28 (1999), 1298-1309. [290] J.S.B. Mitchell, A. Blum, P. Chalasani and S. Vempala, A constant-factor approximation algorithm for the geometric k-MST problem in the plane, SIAM J. Comput. 28 (1999), 771-781. [291] J.S.B. Mitchell, D.M. Mount and C.H. Papadimitriou, The discrete geodesic problem, SIAM J. Comput. 16 (1987), 647-668. [292] J.S.B. Mitchell and C.H. Papadimitriou, The weighted region problem: Finding shortest paths through a weighted planar subdivision, J. ACM 38 (1991), 18-73. [293] J.S.B. Mitchell, D.W. Payton and D.M. Keirsey, Planning and reasoning for autonomous vehicle control, Intemat. J. Intell. Syst. II (1987), 129-198. [294] J.S.B. Mitchell, C. Piatko and E.M. Arkin, Computing a shortest k-link path in a polygon, Proc. 33rd Annu. IEEE Sympos. Found. Comput. Sci. (1992), 573-582.
698
J.S.B.
Mitchell
[295] J.S.B. Mitchell and S. Suri, Separation and approximation ofpolyhedral objects, Comput. Geom. 5 (1995), 95-114. [296] J.S.B. Mitchell and S. Suri, A survey of computational geometry. Network Models, Handbook of Operations Research/Management Science, M.O. Ball, T.L. Magnanti, C.L. Monma and G.L. Nemhauser, eds, Elsevier Science, Amsterdam (1995),425-479. [297] J.S.B. Mitchell and E.L. Wynters, Watchman routes for multiple guards, Proc. 3rd Canad. Conf. Comput. Geom. (1991), 126-129. [298] P. Mitra and B. Bhattacharya, Efficient approximate shortest-path queries among isothetic rectangular obstacles, Proc. 3rd Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 709, Sringer-Verlag (1993), 518-529. [299] C. Monma, M. Paterson, S. Suri and F. Yao, Computing Euclidean maximum spanning trees, Algorithmica 5 (1990), 407^19. [300] D.M. Mount, The number of shortest paths on the surface of a polyhedron, SIAM J. Comput. 19 (1990), 593-611. [301] B.J. Nilsson, Guarding art galleries — methods for mobile guards, PhD thesis, Lund University (1995). [302] B.J. Nilsson and D. Wood, Optimum watchmen routes in spiral polygons, Proc. 2nd Canad. Conf. Comput. Geom. (1990), 269-272. [303] S. Ntafos, The robber route problem. Inform. Process. Lett. 34 (2) (Mar. 1990), 59-63. [304] S. Ntafos, Watchman routes under limited visibility, Comput. Geom. 1 (3) (1992), 149-170. [305] S. Ntafos and L. Gewali, External watchman routes. Visual Comput. 10 (1994), 474-483. [306] C. O'Dunlaing, Motion-planning with inertial constraints, Algorithmica 2 (1987), 431^75. [307] H.L. Ong, Approximate algorithms for the traveling purchaser problem, Oper. Res. Lett. 1 (1982), 201205. [308] J. O'Rourke, Finding a shortest ladder path: A special case, IMA Preprint Series 353, Inst. Math. Appl., Univ. Minnesota, Minneapolis, MN (1987). [309] J. O'Rourke, Uniqueness of orthogonal connect-the-dots. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1988), 97-104. [310] J. O'Rourke, Visibility, Handbook of Discrete and Computational Geometry, Chapter 25, J.E. Goodman and J. O'Rourke, eds, CRC Press LLC, Boca Raton, PL (1997), 467^80. [311] J. O'Rourke and C. Schevon, Computing the geodesic diameter of a 3-polytope, Proc. 5th Annu. ACM Sympos. Comput. Geom. (1989), 370-379. [312] J. O'Rourke and I. Streinu, Vertex-edge pseudo-visibility graphs: Characterization and recognition, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 119-128. [313] M.H. Overmars and E. Welzl, New methods for computing visibility graphs, Proc. 4th Annu. ACM Sympos. Comput. Geom. (1988), 164-171. [314] N. Papadakis and A. Perakis, Minimal time vessel routing in a time-dependent environment, Transp. Sci. 23 (4) (1989), 266-276. [315] N. Papadakis and A. Perakis, Deterministic minimal time vessel routing, Oper. Res. 38 (3) (1990), 426438. [316] C.H. Papadimitriou, The Euclidean traveling salesman problem is NP-complete, Theoret. Comput. Sci. 4 (1977), 237-244. [317] C.H. Papadimitriou, An algorithm for shortest-path motion in three dimensions. Inform. Process. Lett. 20 (1985), 259-263. [318] C.H. Papadimitriou and E.B. Silverberg, Optimal piecewise linear motion of an object among obstacles, Algorithmica 2 (1987), 523-539. [319] C.H. Papadimitriou and M. Yannakakis, Shortest paths without a map, Theoret. Comput. Sci. 84 (1) (1991), 127-150. [320] E. Papadopoulou and D.T. Lee, Efficient computation of the geodesic Voronoi diagram ofpoints in a simple polygon. Algorithms—ESA '95, Third Annual European Symposium, P.G. Spirakis, ed.. Lecture Notes in Comput. Sci. 979, Springer-Verlag, Corfu, Greece (Sept. 1995), 238-251. [321] R. Parker and R. Rardin, Guaranteed performance heuristics for the bottleneck travelling salesman problem, Oper. Res. Lett. 2 (6) (1984), 269-272. [322] J. Pearl, Heuristics: Intelligent Search Strategies for Computer Problem Solving, Addison-Wesley, Reading, MA (1984).
Geometric shortest paths and network optimization
699
[323] M. Pocchiola and G. Vegter, The visibility complex, Proc. 9th Annu. ACM Sympos. Comput. Geom. (1993), 328-337. [324] M. Pocchiola and G. Vegter, Computing the visibility graph via pseudo-triangulations, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 248-257. [325] R. Pollack, M. Sharir and G. Rote, Computing of the geodesic center of a simple polygon. Discrete Comput. Geom. 4 (1989), 611-626. [326] F.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Verlag, New York, NY (1985). [327] R. Raman, Recent results on the single-source shortest paths problem, SIGACT News 28 (2) (1997), 8 1 87. [328] N.S.V. Rao, Algorithmic framework for learned robot navigation in unknown terrain, IEEE Computer 22 (1989), 3 7 ^ 3 . [329] N.S.V. Rao, S.S. Iyengar, C.C. Jorgensen and C.R. Weisbin, Robot navigation in an unexplored terrain, J. Robotic Systems 3 (4) (1986), 389-407. [330] N.S.V Rao, S.S. Iyengar, B.J. Oommen and R.L. Kashyap, On terrain model acquisition by a point robot amidst polyhedral obstacles, Intemat. J. Robot. Autom. 4 (4) (1988), 450^55. [331] S.B. Rao and W.D. Smith, Improved approximation schemes for traveling salesman tours, Proc. 30th Annu. ACM Sympos. Theory Comput. (1998). [332] R. Ravi, R. Sundaram, M.V Marathe, D.J. Rosenkrantz and S.S. Ravi, Spanning trees short and small, Proc. 5th ACM-SIAM Sympos. Discrete Algorithms (1994), 546-555. [333] J. A. Reeds and L.A. Shepp, Optimal paths for a car that goes both forwards and backwards. Pacific J. Math. 145 (2) 1990. [334] G. Reich and P. Widmayer, Beyond Steiner's problem: A VLSI oriented generalization, Proc. 15th Intemat. Workshop Graph-Theoret. Concepts Comput. Sci., Lecture Notes in Comput. Sci. 411, Springer-Verlag, Heidelberg, NY (1989), 196-210. [335] J.H. Reif and S. Sen, Parallel computational geometry: An approach using randomization. Handbook of Computational Geometry, J.-R. Sack and J. Urrutia, eds, Elsevier Science Publishers B.V, North-Holland, Amsterdam (1999), 765-828. This Handbook, Chapter 18. [336] J.H. Reif and M. Sharir, Motion planning in the presence of moving obstacles, J. ACM 41 (4) (July 1994), 764-790. [337] J.H. Reif and H. Wang, Non-uniform discretization for kinodynamic motion planning and its applications. Algorithms for Robotic Motion and Manipulation, J.-P. Laumond and M. Overmars, eds, Wellesley, Massachusetts (1997), 97-112. A.K. Peters. Proc. 1996 Workshop on the Algorithmic Foundations of Robotics, Toulouse, France (July 1996). [338] J.H. Reif and H. Wang, The complexity of the two dimensional curvature-constrained shortest-path problem, Proc. 1998 Workshop on the Algorithmic Foundations of Robotics (1998). [339] J.H. Reif and J. A. Storer, A single-exponential upper bound for finding shortest paths in three dimensions, J. ACM 41 (5) (1994), 1013-1019. [340] J.H. Reif and S.R. Tate, Approximate kinodynamic planning using L2-norm dynamic bounds, Comput. Math. Appl. 27 (5) (1994), 2 9 ^ 4 . [341] J.H. Reif and H. Wang, On-line navigation through weighted regions. Technical Report, Dept. Computer Science, Duke University (1993). [342] G. Reinelt, Fast heuristics for large geometric traveling salesman problems, ORSA J. Comput. 4 (1992), 206-217. [343] D.B. Reister and KG. Pin, Time-optimal trajectories for mobile robots with two independently driven wheels, Intemat. J. Robot. Res. 13 (1994), 38-54. [344] D.S. Richards and J.S. Salowe, A linear-time algorithm to construct a rectilinear Steiner minimal tree for k-extremal point sets, Algorithmica 7 (1992), 247-276. [345] S. Riviere, Topologically sweeping the visibility complex of polygonal scenes, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), C36-C37. [346] H. Rohnert, A new algorithm for shortest paths avoiding convex polygonal obstacles. Report A86/02, Fachber. Inform., Univ. Saarlandes, Saarbrticken, West Germany (1986). [347] H. Rohnert, Shortest paths in the plane with convex polygonal obstacles. Inform. Process. Lett. 23 (1986), 71-76.
700
J.S.B.
Mitchell
[348] D.J. Rosenkrantz, R.E. Steams and RM. Lewis, An analysis of several heuristics for the traveling salesman problem, SIAM J. Comput. 6 (1977), 563-581. [349] N.C. Rowe, Obtaining optimal mobile-robot paths with non-smooth anisotropic cost functions using qualitative-state reasoning, Intemat. J. Robot. Res. 16 (3) (June 1997), 375-399. [350] J.S. Salowe, Constructing multidimensional spanner graphs, Intemat. J. Comput. Geom. Appl. 1 (2) (1991), 99-107. [351] C. Schevon and J. O'Rourke, The number of maximal edge sequences on a convex polytope, Proc. 26th Allerton Conf. Commun. Control Comput. (Oct. 1988), 49-57. [352] S. Schirra, Robustness issues. Handbook of Computational Geometry, J.-R. Sack and J. Urmtia, eds, Elsevier Science Publishers B.V., North-Holland, Amsterdam (1998). [353] S. Schuierer, An optimal data structure for shortest rectilinear path queries in a simple rectilinear polygon, Intemat. J. Comput. Geom. Appl. 6 (1996), 205-226. [354] S. Schuierer, Lower bounds in on-line geometric searching, 11th International Symposium on Fundamentals of Computation Theory, Lecture Notes in Comput. Sci. 1279, Springer-Verlag, Krakow, Poland, 1-3 September (1997), 429^140. [355] J. Sellen, Direction weighted shortest path planning, Proc. IEEE Intemat. Conf. Robot. Autom. (1995), 1970-1975. [356] J. Sellen, Planning paths of minimal curvature, Proc. IEEE Intemat. Conf. Robot. Autom. (1995), 19761982. [357] J. Sellen, Approximation and decision algorithms for curvature-constrained path planning: A state-space approach, Proc. 1998 Workshop on the Algorithmic Foundations of Robotics (1998). [358] I. Semrau, Analyse und experimentelle Untersuchung von Strategien zum Finden eines Ziels in Strafienpolygonen. Masters thesis (diplomarbeit), Femuniversitat Hagen (July 1996). [359] M. Sharir, On shortest paths amidst convex polyhedra, SIAM J. Comput. 16 (1987), 561-572. [360] M. Sharir, A note on the Papadimitriou-Silverberg algorithm for planning optimal piecewise linear motion of a ladder. Inform. Process. Lett. 32 (1989), 187-190. [361] M. Sharir and A. Schorr, On shortest paths in polyhedral spaces, SIAM J. Comput. 15 (1986), 193-215. [362] C.-S. Shin, J.-H. Kim, S. Shin and K.-Y. Chwa, New competitive strategies for searching in unknown star-shaped polygons, Proc. 13th Annu. ACM Sympos. Comput. Geom. (1997), 427^29. [363] P. Slavik, The errand scheduling problem. Technical Report 97-2, Department of Computer Science, SUNY, Buffalo NY, March 14 (1997). [364] P. Slavik, On the approximation of the generalized traveling salesman problem. Manuscript, submitted, Department of Computer Science, SUNY, Buffalo NY (1998). [365] J.M. Smith and P. Winter, Computational geometry and topological network design. Computing in Euclidean Geometry, D.-Z. Du and F.K. Hwang, eds. Lecture Notes Series on Computing, Vol. 1, World Scientific, Singapore (1992), 287-385. [366] S. Suri, Computing geodesic furthest neighbors in simple polygons, J. Comput. Syst. Sci. 39 (1989) 220235. [367] H.J. Sussman, Shortest 3-dimensional paths with a prescribed curvature bound, Proc. 34th IEEE Conf. Decision Control (1995), 3306-3311. [368] H.J. Sussmann and G. Tang, Shortest paths for the Reeds-Shepp car: A worked out example of the use of geometric techniques in nonlinear optimal control. Research Report SYCON-91-10, Rutgers University, New Bmnswick, NJ (1991). [369] P. Svestka and M.H. Overmars, Motion planning for car-like robots using a probabilistic learning approach, Intemat. J. Robot. Res. 16 (2) (Apr. 1997), 119-143. [370] X. Tan and T Hirata, Constructing shortest watchman routes by divide-and-conquer, Proc. 4th Annu. Intemat. Sympos. Algorithms Comput. Lecture Notes in Comput. Sci. 762, Springer-Verlag (1993), 6877. [371] X. Tan and T. Hirata, Shortest safari routes in simple polygon, Proc. 5th Annu. Intemat. Sympos. Algorithms Comput., Lecture Notes in Comput. Sci. 834, Springer-Verlag, Beijing (1994), 523-531. [372] X. Tan, T. Hirata and Y. Inagaki, Corrigendum to "An incremental algorithm for constructing shortest watchman routes',' Intemat. J. Comput. Geom. Appl. 9 (3) (1997), 319-323. [373] X.H. Tan, T. Hirata and Y. Inagaki, An incremental algorithm for constructing shortest watchman routes, Intemat. J. Comput. Geom. Appl. 3 (4) (1993), 351-365.
Geometric shortest paths and network optimization
701
[374] M. Thorup, Undirected single source shortest path in Unear time, Proc. 38th Annu. IEEE Sympos. Found. Comput. Sci. (1997). [375] L. Trevisan, When Hamming meets Euclid: The approximability of geometric TSP and MST, Proc. 29th Annu. ACM Sympos. Theory Comput. (1997), 21-29. [376] C. Umans and W. Lenhart, Hamiltonian cycles in solid grid graphs, Proc. 38th Annu. IEEE Sympos. Found. Comput. Sci. (1997). [377] P.M. Vaidya, A fast approximation for minimum spanning trees in k-dimensional space, Proc. 25th Annu. IEEE Sympos. Found. Comput. Sci. (1984), 403-407. [378] P.M. Vaidya, Minimum spanning trees in k-dimensional space, SIAM J. Comput. 17 (1988), 572-582. [379] P.M. Vaidya, Approximate minimum weight matching on points in k-dimensional space, Algorithmica 4 (1989), 569-583. [380] PM. Vaidya, Geometry helps in matching, SIAM J. Comput. 18 (1989), 1201-1225. [381] P.M. Vaidya, An 0{n\ogn) algorithm for the all-nearest-neighbors problem. Discrete Comput. Geom. 4 (1989), 101-115. [382] K.R. Varadarajan and P. Agarwal, Approximating shortest paths on an nonconvex polyhedron, Proc. 38th Annu. IEEE Sympos. Found. Comput. Sci. (1997). [383] H. Wang and P.K. Agarwal, Approximation algorithms for curvature constrained shortest paths, Proc. 7th ACM-SIAM Sympos. Discrete Algorithms (1996), 409^18. [384] W. Warntz, Transportation, social physics and the law of refraction. The Professional Geographer 9 (4) (1957), 2-7. [385] E. Welzl, Constructing the visibility graph for n line segments in 0(n^) time. Inform. Process. Lett. 20 (1985), 167-171. [386] P. Widmayer, Y.F. Wu and C.K. Wong, On some distance problems infixed orientations, SIAM J. Comput. 16 (1987), 728-746. [387] G. Wilfong, Motion planning for an autonomous vehicle, Proc. IEEE Intemat. Conf. Robot. Autom. (1988), 529-533. [388] G. Wilfong, Shortest paths for autonomous vehicles, Proc. 6th IEEE Internal. Conf. Robot. Autom. (1989), 15-20. [389] D.P Williamson and M.X. Goemans, Computational experience with an approximation algorithm on large-scale Euclidean matching instances, INFORMS J. Comput. 8 (1) (1996), 2 9 ^ 0 . [390] CD. Yang, D.T Lee and C.K. Wong, Rectilinear paths problems among rectilinear obstacles revisited, SIAM J. Comput. 24 (1995), 457-472. [391] A.C. Yao, On constructing minimum spanning trees in k-dimensional spaces and related problems, SIAM J. Comput. 11 (1982), 721-736. [392] A.Z. Zelikovsky, An 11/6-approximation algorithm for the network Steiner problem, Algorithmica 9 (1993), 463^70. [393] A.Z. Zelikovsky, Better approximation bounds for the network and Euclidean Steiner tree problems. Technical Report CS-96-06, University of Virginia, Charlottesville, VA (1996).
This Page Intentionally Left Blank
CHAPTER 16
Randomized Algorithms in Computational Geometry Ketan Mulmuley Computer Science Department, The University of Chicago, and I.I.T., Bombay
Contents 1. Introduction 2. Randomized divide-and-conquer 2.1. Top-down sampling 2.2. Bottom-up sampling 3. Randomized incremental algorithms 3.1. Online algorithms 4. Dynamic algorithms 4.1. Dynamic sampling 5. Dynamic history 5.1. Lazy history 5.2. Clean history 6. Further topics References
705 705 710 712 713 716 717 719 720 720 721 721 722
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
703
This Page Intentionally Left Blank
Randomized algorithms in computational geometry
705
1. Introduction Since Rabin's seminal paper [39], randomized methods have flourished in several branches of computer science. Computational geometry has been no exception. In the past decade, several simple, yet striking randomized techniques have emerged in this field, and they have found an enormous number of applications. In this paper, we shall give a survey of some of the main techniques in this area. A more detailed and complete account of the topics discussed here can be found in the book [36]; see also [12,46]. The simplest and the most well known randomized geometric algorithm is Quicksort. Why is Quicksort a geometric algorithm? Because the items to be sorted can be identified with points on the real line. Then the sorting problem becomes equivalent to the problem of constructing the partition of the real line formed by these points. In other words, the problem is to compute the resulting intervals and their adjacencies. Viewed this way, it becomes clear that Quicksort is a one-dimensional geometric algorithm. It turns out that the basic principles underlying quicksort can be extended to a far more general setting which encompasses several problems in computational geometry. This will be described in the next few sections.
2. Randomized divide-and-conquer Let us view Quicksort in the usual way as a randomized divide-and-conquer algorithm. It is based on the following simple idea. Given n points on the real line, if we choose a random point from these n points, then each of the two intervals that the line is split into contains n/2 points on the average. More generally, if we choose r < n points randomly, then each of the interval that the real line is partioned into contains 0(n/r) points on the average. Reischuk showed that with probability greater than half each such interval contains at most c(n/r) logr points, for some large enough constant c. A fundamental observation of Clarkson [10] and Haussler and Welzl [17] was that a similar fact holds in a much more general setting of a certain combinatorial space of configurations that has bounded dimension. The elements of this space have been called by different names by different authors: regions [13], configurations [28], ranges [17], frames [8] and so forth. Such spaces have also played an important role in learning theory and discrepancy theory [23]. We now briefly describe this notion of a configuration space and the resulting generalization of the divide-and-conquer principle underlying Quicksort. We shall follow the framework in Mulmuley [32,36] that unifies the frameworks of Clarkson [10] and Haussler and Welzl [17]. For another unifying framework, see Chazelle [8]. Let us assume that we are given an abstract set (universe) N of objects. The objects depend on the problem under consideration. For example, they are sites when we are dealing with Voronoi diagrams and half-spaces when we are dealing with convex poly topes. A configuration a over N is SL pair (D, L) = (D(cr), L(a)), where D and L are disjoint subsets of A^. The objects in D are called the triggers associated with cr. They are also called the objects that define a. We also say that a is adjacentto the objects in D{cr). The objects in L are called the stoppers associated with a. They are also called the objects that conflict with cr. The degree d{a) is defined to be the cardinality of D{a). The level
706
K. Mulmuley
or the {absolute) conflict size /(a) is defined to be the cardinahty of L((T). A configuration space n{N) over the universe A^ is just a set of configurations over N with the following bounded degree property: the degree of each configuration in n(N) is bounded by a constant. We shall allow n(N) to be a multiset. This means that several "distinct" configurations in n(N) can have the same trigger and stopper set. By the size of n(N), we mean the total number of elements in this multiset. Here the distinct configurations having the same trigger and stopper sets are counted separately. The number that is obtained when the configurations with the same trigger and stopper set are not counted separately is called the reduced size of n(N). We denote the size of n(N) by either \n(N)\ or 7t{N). The reduced size is denoted by n(N). For each integer / ^ 0, we define 77' (N) to be the set of configurations in n(N) with level /. We denote its size by n^ (N). The configurations in n^(N) are said to be active over A^. The configurations in 77' (A^) are said to bQ partially active over A^ with level /. EXAMPLE 2.1 (Trapezoidal decompositions). Let A^ be a set of segments in the plane. Let us call a trapezoid a in the plant feasible or possible over N if a occurs in the trapezoidal decomposition 77(7?), for some subset R C. N. The trapezoidal decomposition 77(7?) is defined to be the decomposition of the plane obtained by passing a vertical attachment through every endpoint of each segment in R and also every intersection among the segments in R\ the vertical attachment extends in the upward and downward direction until it hits the first segment in R or upto infinity in case no such segment exists. For a feasible trapezoid a, we define the trigger set D(a) to be the set of segments in A^ that are adjacent to the boundary of cr. We define the conflict set L(or) to be the set of segments in N\D(a) intersecting a. In this fashion, we can associate an abstract configuration (D(a), L{G)) with every feasible trapezoid cr. It is easily seen that the size of D(a) is less than or equal to four, assuming that the segments in A^ are in general position. Thus, we get a configuration space n{N) of all feasible trapezoids over A^. The general position assumption is crucial here, as well as in all other examples, to ensure the bounded degree property. Note that n{N) can actually be a multiset since there can be distinct feasible trapezoids with the same trigger and stopper sets. Also note that the configurations in 17^(N) are precisely the trapezoids in the trapezoidal decomposition H(N).
Let us return to the abstract setting and make a few more definitions. Let R c. N be a subset of A'^. We define the subspace 77(7?) as follows. Given a configuration a e n(N) such that D(cr) c 7?, we define the restriction a | 7? to be the configuration over the universe R whose trigger set is D(a) and whose conflict set is L(or) fl /?. We let 77(7?) = {a iR\cr
e n(N),
D(a) C 7?}.
Note that two distinct configurations in 77 (A^) may restrict to the configurations with the same trigger and stopper sets in 77(7?). But these two restricted configurations have to be considered different. For this reason, it is important to consider configuration spaces as multisets. Note that the restriction cr ^|. 7? is defined only when R contains the triggers associated with cr. As a misuse of notation, we shall generally refer to the restriction a | 7? by a
Randomized algorithms in computational geometry
707
itself. Thus, when we say that a e n(N) is active over R what we actually mean is that a ], R belongs to n^(R). This happens iff R contains all triggers associated with a but none of the stoppers. The misuse of notation should cause no confusion as long as one distinguishes between the two conflict lists: the conflict list relative to A^, namely, L(a), and the conflict list relative to R, namely, L(a) D R. The size of the first list is called the conflict size of a relative to A^ and the size of the latter is called the conflict size of a relative to R. Thus, the conflict size of a configuration in n{R) is always relative to a set containing R. If we do not mention this set, it is generally clear from the context. As a convention, we always use the alternative word for the conflict size — namely, level — in the following restrictive sense: When we refer to the level of a configuration in n(R), we always mean its conflict size relative to R. 2.2 (Convex polytopes). Let Nhea set of half-spaces in R^. Let G(N) be the arrangement formed by the hyperplanes bounding these half-spaces. We can associate an abstract configuration with each vertex a of G(N) as follows. D(a) be defined as the set of half-spaces in N whose bounding hyperplanes contain cr. The size of D(a) is clearly d, assuming that the half-spaces are in general position. Let the conflict set L(a) be the set of half-spaces in N whose complements contain a. In this fashion, we obtain a configuration space n(N) of the vertices in the arrangement G{N). We shall find it convenient to let n(N) contain the "vertices" of G(N) that lie at infinity. By this, we mean the endpoints at infinity of the unbounded edges (1-faces) of G(N). Observe that, for every R ^ N, a. vertex a in n(N) is active (as a configuration) over R, i.e., it occurs in 77^(7?), iff it is a vertex of the convex polytope H(R) formed by intersecting the half-spaces in R. Thus, n(N) consists of all vertices that can possibly occur in the incremental computation of EXAMPLE
EXAMPLE 2.3 (Voronoi diagrams). Let TV be a set of sites in the plane. Let G(N) denote the Voronoi diagram formed by N. Let H(N) denote its radial triangulation obtained by connecting each site in N to the vertices of its Voronoi region. Let cr be a triangle or an edge or a vertex in the plane. We say that cr is feasible over N if it occurs in the radial triangulation H(R), for some R ^ N. A site q e N \ R is said to be in conflict with a triangle r e H(R) if the imaginary addition of q to R will destroy r. What this means is that r does not occur in H(RU {q]). This happens iff q is nearer to some point within r than the site labeling the Voronoi region containing r. For any feasible triangle a in H(R), Itt the trigger set D(cf) be defined as the set of sites in R that label the regions of G(R) containing or adjacent to cr. Let the conflict set L(a) be defined as the set of sites in N \ R in conflict with a. It is easily seen that D(a) and L(cf) do not depend on /?. In this fashion, we can associate an abstract configuration (D(a), L{a)) with every feasible triangle a. It is also easily seen that a feasible triangle a is active (as a configuration) over a subset R^N, i.e., it occurs in n^(R), iff a occurs in the radial triangulation H(R). In a similar fashion, we can associate a trigger set and a conflict set with every feasible edge or a vertex over the universe A^. It is clear that the size of the trigger set is always bounded, assuming that the sites in N are in general position. In this fashion, we get a configuration space n(N) of feasible triangles, edges, and vertices over N.
708
K. Mulmuley
EXAMPLE 2.4 (Canonical triangulation of an arrangement). Let A/^ be a set of hyperplanes in R^. Let G{N) be the arrangement formed by them. Let F be any simplex in R^. Consider the restricted arrangement G{N) Pi F ; if we are interested in G(N), we can let the vertices of F approach infinity. A canonical triangulation of G(N) Pi F is defined as follows. Fix the coordinate jcj. We triangulate the faces of G(N) O T by induction on their dimension. For dimension one, we do not need to do anything. Consider now any face / of dimension 7 > 1. Let v be its bottom. By this, we mean the vertex with the minimum jc^-coordinate.^ By the induction hypothesis, all subfaces of / have been triangulated. We triangulate / by extending all simplices on its border to cones with an apex at v. The cones are strictly speaking cylinders if the vertex v lies at infinity. We shall denote the canonical triangulation of G(N) fl F by just H(N) if the simplex F is implicit. Its cells will be called J-simplices. They can be unbounded. The notion of a canonical triangulation gives rise to a certain configuration space of feasible simplices over the universe A^. To see this, fix N and F. For any subset R ^ N, let H(R) denote the canonical triangulation of G(R) Pi F. Call a simple A in R^ feasible if it occurs in H(R), for some R c. N. Define its conflict (stopper) set relative to N to be the set of hyperplanes in N\R intersecting A. Its trigger set is defined to be the set of hyperplanes in R adjacent to Z\. It is easily seen that, for a fixed A, these definitions do not depend on R. Thus we get a configuration space of feasible simplices over A^. DEFINITION 2.5. A configuration space n(N) is said to have bounded valence if the number of configurations in n{N) sharing the same trigger set is bounded by a constant.
All configuration spaces described earher have bounded valence. For example, let N be a set of segments in the plane. Let n{N) be the configuration space of feasible trapezoids over A^ (Example 2.1). Then all feasible trapezoids in n{N) having the same trigger set T can be identified with the trapezoids in the trapezoidal decomposition formed by T. Since the size of T is bounded, the number of such trapezoids is also bounded. DEFINITION 2.6. Let n(N) be a configuration space. For r < /i, let 7r(r) denote the maximum reduced size of /7(/?), for any subset R ^ N of size r. The function 7t(r) is called the reduced size function of n(N). We say that n(N) has a bounded dimension, if there is a constant d such that ir(r) = 0(r^^), for all r ^n? In this case, we say that d is the dimension of n(N).
In this section, by size we shall always mean the reduced size. If a configuration space n(N) has bounded valence, its dimension is also bounded; indeed, if d is the maximum degree of a configuration in n(N), then the dimension of 17 (N) is bounded by d. There are important classes of configuration spaces that do not have bounded valence, but whose dimension is bounded. An important special class is provided by the so-called range spaces. ' We assume that the xj-coordinate is in general position. So the bottom is uniquely defined. Really speaking, uniqueness is not necessary. One could use a fixed lexicographic ordering to break ties. ^ We are ignoring here exactly how the constant factor within the Big-Oh notation is allowed to depend ond.Ifd is a small constant, this does not matter anyway. Otherwise, the cleanest restriction is to stipulate that the constant factor does not depend on d at all. This works for all examples that we will be concerned with. Otherwise, we can allow, say, exponential dependence on d.
Randomized algorithms in computational geometry
709
We say that a configuration space n(N) is a range space, if the trigger set of every configuration in 77 (A^) is empty. In this case, the configurations in 77 (A^) are also called ranges. A range space cannot have bounded valence because all ranges share the empty trigger set. However, a large class of interesting range spaces have bounded dimensions. We provide one such example below. EXAMPLE 2.7 (Half-space ranges). Let A^ be a set of points in 7^^, where the dimension J is a fixed constant. Given a half-space h, the range induced by h is defined to be the set of points in N contained in /z. If two half-spaces contain exactly the same set of points in A'^, they induce the same range. Let n(N) be the set of all such distinct ranges induced by upper half-spaces. By upper half-spaces, we mean the half-spaces extending in the positive Xd direction. The space of ranges induced by lower half-spaces is similar. Now let TV denote a set of hyperplanes in 7^^. Given a semi-infinite vertical line hin R^, let us define the range induced by h to be the set of hyperplanes in N intersecting h. Let n(N) be the set of distinct ranges induced by semi-infinite lines extending in the negative x^-direction. Such half-lines will be called negative half-lines. It can be shown that 77(A/) and 77(^) are dual configuration spaces if the hyperplanes in N are chosen to be duals of the points in A^ under a suitable transformation (see Section 2.4.1 in [36]). Let us show that the dimension of n(N) is d. Fix a J-cell in the arrangement formed by A^. The negative half-lines whose endpoints lie within A induce the same range. Conversely, negative half-lines whose endpoints are in different J-cells induce different ranges. It follows that the size of n(N) is equal to the number of J-cells in the arrangement formed by N. The latter number is O(n^). Similarly, for any subset R ^ N of size r, the reduced size ft(R) = O(r^). It follows that n(N) has dimension d. As n(N) is a dual configuration space, its dimension is also d.
The following theorem unifies the results of Clarkson [10] and Haussler and Welzl [17]; it generalizes the result of Reischuk mentioned earlier in the section. 2.8. Let n(N) be any configuration space of bounded dimension d. Let n be the size of N. Let R be a random sample of N of size r ^n. With probability greater than 1/2, for each active configuration o G n^(R), the confiict size of a relative to N is at most cn/rlogr, where c is a large enough constant.
THEOREM
(For proof, see for example, Section 5.7 in [36].) The special case, when the configuration space has bounded valence, corresponds to Clarkson's result [10]. The special case when the configuration is a range space corresponds to the result Haussler and Welzl [17]. Either special case suffices for most applications. Let us return to the set N of segments in the plane. Apply the preceding theorem to the configuration space of feasible trapezoids over N (Example 2.1). It then follows that, for any random sample R ^ N, each trapezoid in the trapezoidal decomposition H(R) has 0(n/rlogr) conflict size with high probability. Similar result follows for the other configuration spaces described earlier in this section. Haussler and Welzl proved the preceding theorem for range spaces assuming that their VC-dimension is bounded. The VC-dimension of a range space is defined as below. Let
710
K. Mulmuley
n(N) be any range space. Let us say that a subset M c. N is shattered by A^ if every subset of M occurs as a range in n(M). This is equivalent to saying that the reduced size of n{M) is 2^. Here m is the size of M. We define the VC dimension (VapnikChervonenkis dimension) of the range space n{N) as the maximum size J of a shattered subset of A'^. Since it requires 2^ distinct ranges in n{N) to shatter such a subset, clearly, 2^ is bounded by the reduced size of n(N). In other words, d < Llog2 ^ ( ^ ) J • Moreover, it can be shown that the dimension of the range-space defined as earlier in this section is bounded by its VC-dimension. So Theorem 2.8 automatically holds for range-spaces of bounded VC-dimension. When n(N) is a range space, the subset R with the property in Theorem 2.8 is called an 6-net Formally, given ^ > 0, a subset R c. N is called an s-net of the range space n(N), if the conflict size (relative to A^) of every range in 17^(R) is at most en. For range spaces, the theorem says that if r is large enough, then a random sample of size r is an 6:-net with high probability. Roughly, r has to be larger than (d/s) log(l/6:) by a sufficiently large constant factor. The concept of an ^-net and a related concept of an ^-approximation have found a large number of applications in diverse fields such as learning theory discrepancy theory [23], optimal cuttings in arrangements [19,6], derandomization [8,24,18,25], simplex and half-space range search [20], and so on. This material is covered in depth in a separate chapter by Matousek. Theorem 2.8 provides a simple method for randomized division. This leads to natural divide-and-conquer algorithms for several search problems. The search structures based random sampling can be built in either a top-down fashion or a bottom-up fashion. There are some significant differences between these two approaches. In Section 2.1, we shall describe the top-down approach. In Section 2.2, we shall describe the bottom-up approach.
2.1. Top-down sampling We describe in this section a top-down method of building search structures based on random sampling. First, we shall describe the method in intuitive, abstract terms. We shall be concerned with a general search problem of the following abstract form: Given a set A^ of objects in R^^, construct a geometric search structure that can be used to answer quickly the queries (say, point location queries) over an appropriate geometric complex H(N) induced by A^. For example, N could be a set of hyperplanes in R^ and we could be interested in building a search structure for answering point location queries over the arrangement formed by A^. We shall assume that the geometric complex H(N) has the bounded-degree property. This means that every face of H{N), at least of the dimension that matters, is defined by a bounded number of objects in A^^. This assumption is needed to make the random sampling result in Theorem 2.8 applicable. If it is not satisfied by the geometric complex under consideration, one has to work with its suitable refinement. For example, the arrangement formed by a set of hyperplanes need not satisfy the bounded degree assumption. So one needs to work with its suitable refinement such as its canonical triangulation (Example 2.4). For example. Hence, we worked In abstract terms, a search structure based on top-down sampling is defined as follows.
Randomized algorithms in computational geometry
711
(1) Choose a random subset RC.Noi2i large enough constant size r. (2) Build H{R) and a search structure for H(R). Since the size of R is SL constant, this search structure is typically trivial. (3) Build conflict lists of all faces of H(R) of relevant dimensions. The notion of a conflict defined earlier in this section depends on the problem under consideration. If H(R) satisfies the bounded degree assumption, then Theorem 2.8 tells us that the conflict sizes relative to A^ of the faces in H(R) are expected to be small. (4) For each such face A e H(R), recursively build a search structure for A^(Z\), the set of objects in A^ in conflict with A. (5) Build an ascent structure, denoted by ascent(A/^, R). It is used in queries in a manner described below. The queries are answered as follows. The original query is over the set N. We first answer it over the smaller set R. This can be done using the trivial search structure associated with H(R). Let us say that A e H(R) is the answer to this smaller query. We recursively answer the query over the set N(A) of conflicting objects. After this, using the ascent structure ascent(A/^, R), we somehow determine the answer over the set A^. For example, suppose we are interested in building a point location structure for the arrangement formed by a set A^ of hyperplanes in R^. In this case, we can let H(R) to be the canonical triangulation (Example 2.4) of the arrangement formed by J^. Given a J-simplex A in H(R), its conflict list N(A) will be simply the set of hyperplanes in N intersecting /\. As a part of the ascent structure, we associate with each face of the arrangement formed by N(A) a parent pointer to the face that contains it in the arrangement formed by N. Point location queries are answered as follows. Given a query point p, we first locate the simplex A in H{R) containing p trivially in 0(1) time. Next, we locate recursively the face containing p in the arrangement formed by N(A). The parent pointer associated with this face tells us the face containing p in the arrangement formed by A^. Clarkson [10] showed that, for any arbitrarily small positive e, this point location structure can be built in expected 0(n^+^) time using 0(n^+^) space and point location queries can be answered in O(logn) time; the constant factors within the Big-Oh notation depend on s. Clarkson's scheme was refined much further and even derandomized by Chazelle [6] who gave an optimal point location structure with 0(n^) space, O(n^) preprocessing time and O(logn) query time. Clarkson[ll] gives a nearest-neighbour-search structure with 0(n^^/^^+^) space and expected preprocessing time and O(logn) query time. This was generalized by Clarkson and Shor [13] to the nearest ^-neighbors problem and half-space range search problem with similar space and preprocessing time and 0{k\ogn) query time, where k is the answer size. Using random sampling, Clarkson [10] gives a quasi-optimal randomized algorithm for constructing the ^th order Voronoi diagram in the plane. The use of random sampling in the context of range search was begun in the work of Haussler and Welzl [17]. The work was pursued further by Clarkson[13], Chazelle, Sharir, and Welzl, Matousek [20], and several other authors culminating in the work of Matousek [20], who gave an almost optimal search structure for simplex-range-search with 0(m) space requirement, for any parameter m in the range [n, n^], 0{n^^^ -h mlog^ n) preprocessing time and 0{(m/n^^^)\og^^^(m/n)) query time; there is an additive 0(k) term in the query time in the report mode, where k is the answer size. Matousek also gives a search structure for half-space-range-search in the report mode with almost as good
712
K. Mulmuley
performance, with [_d/2\ replacing d in the bounds. Furthermore, he derandomizes these search structures so as to obtain deterministic search structures.
2.2. Bottom-up sampling Now we shall describe an alternative bottom-up method of building search structures based on random sampling, proposed by Mulmuley and Sen [37,32]. The search structures based on this method are easy dynamize; this will be described in Section 4. We shall describe the method in a general form using the same formalism that we used Section 2.1: Given a set A^ of objects, our goal is to build a search structure that can be used for answering queries over a suitably induced geometric partition (complex) H{N) satisfying the bounded degree property. We shall denote the search structure that we are going to associate with N by sample(A^). As usual, the size of A^ will be denoted by n. Starting with the set A^, we obtain a sequence of sets
where A^/+i is obtained from Ni by flipping a fair coin^ independently for each object in Ni and retaining only those objects for which the toss was a success (heads). The sequence of sets above is called a gradation of A^. It can be seen that the length of this gradation is O(logn) and that the total size of the sets in this gradation is 0(n). Intuitively, this follows because the size of each A^, is roughly half the size of M - i . The state of sample(A^) is going to be determined by the gradation of A^. Sample(A^) will consist of r levels, where r is the length of the above gradation. The set A^/, 1 ^ / ^ r, can be thought of as the set of objects stored in the ith level. In each level /, we store the geometric partition H(Ni) formed by Ni. Each face of H(Ni) is associated with the conflict list of the objects in A^/_i \ Ni conflicting with it. Moreover, between every two successive levels / and / + 1, we keep a certain descent structure, which we shall denote by descent(/ + 1, /). It is used in answering queries in a manner to be described soon. Assuming that H{N) satisfies the bounded degree property, sample(A^) satisfies the following crucial property: Since Ni is a random sample of A^/_i of roughly half the size, the conflict size of each A e H(Ni) is logarithmic with high probability (Theorem 2.8). The queries are answered as follows. Suppose we want to answer a query with respect to the set of objects N = N\. We first answer it with respect to A^^ • Since A^^ is empty, this should be trivial. After this, we just descend through our data structure. Inductively, assume that we have the answer to our query with respect to the set A^,, 1 ^ / ^ r. This answer is a face A of H(Ni). We find the answer with respect to the set A^/_i by using the descent structure descent(/, / — 1) and the conflict information associated with A. The exact nature of the descent depends on the problem under consideration. We only need that this descent from the ith level to (/ — l)th level can be done quickly, say, in polylogarithmic time. Descending in this fashion through all levels, we eventually obtain the required answer with respect to the set N = N\. ^ We do not really need the coin to be fair. We only need that the probability of success is a fixed constant between 0 and 1.
Randomized
algorithms in computational
geometry
713
Using this scheme, Mulmuley and Sen [37] designed a point location structure for arrangement of hyperplanes in R^ with 0(n^)^ space and preprocessing time and 0(log^~^ n) query time. Its main advantage is that this search structure can be easily dynamized (Section 4). Similar search structures were designed by Mulmuley [32] for point location in two-dimensional Voronoi trapezoidal, diagrams decompositions and threedimensional vertical decompositions induced by polygons [33].
3. Randomized incremental algorithms Let us return to Quicksort once again. If we unwind the recursion in Quicksort, the resulting iterative algorithm has a very simple structure: We add the points in the input one at a time. At each time, we maintain the partition of the real line formed by the currently added points. We also maintain, with each interval of this partition, a conflict list. This is the list of the unadded points that lie in that interval. Conversely, with each unadded point, we maintain a conflict pointer to the interval in the current partition containing it. At any given time, we choose the next point to be added randomly from the set of unadded points. The conflict pointer tells us the interval in the current partition containing this point. We split this interval along with the associated conflict list. When all points in the input are added in this fashion, the final partition we get is the one we sought. If the points in the input are added in a random order, the expected running time of the preceding incremental version of Quicksort is O(^logn). Thus a naive algorithm, when randomized, becomes quite efficient. This is exactly the philosophy underlying the socalled randomized incremental paradigm introduced in [13,29]. The idea is to design a very simple incremental algorithm for the given problem and then show that the expected running time of its randomized version is good. Since these algorithms are very simple, they seem suitable for practical applications. We shall now describe the basic form of randomized incremental algorithms using the general framework of configuration spaces. The problem we are addressing has the following general form: Given a set N of objects in R^, construct an induced geometric complex H(N) quickly. Both the object set N and the complex H(N) depend on the problem under consideration. In a more formal framework of configuration spaces, we consider an appropriate configuration space n(N) over the universe N and we are interested in computing the set n^{N) of active configurations. For example, if A^ is a set of half spaces and n(N) is the configuration space as in Example 2.2, then n^(N) corresponds to the set of vertices of the convex polytope formed by intersecting the half-spaces in AT. If one is interested in constructing a trapezoidal decomposition, then N would be a set of segments, n(N) would be the configuration space as in Example 2.1, and n^(N) would be the set of trapezoids occurring in the trapezoidal decomposition formed by A/^. If one is interested in constructing planar Voronoi diagrams, then N would be a set of sites, n(N) would be the configuration space as in Example 2.3, and n^(N) would be the set of triangles occurring in the radial triangulation of the Voronoi diagram formed by N. So let n{N) be any configuration space. A randomized incremental algorithm for computing n^(N) has the following abstract form. 6 notation indicates that the bound holds with very high probabihty.
714
K. Mulmuley
(1) Construct a random sequence (permutation) Si, S2,..., Sn of the objects in N. (2) Add the objects in N one at a time according to this sequence. Let N^ denote the set of the first / added objects. At the ith stage, the algorithm maintains the set n^(N^) of active configurations. For each configuration a e n^(N^), we also maintain its conflict set L(a) relative to A^. Its size l(cr) is the conflict size of a relative to A^. With each unadded object, we also maintain a list of conflict pointers to the configurations in n^(N^) in conflict with it; these are the configurations that would be affected if that object were to be added next. Both n^(N^) and the associated conflict lists are updated during the addition of (/ + l)-th object. The details of this update depend on the problem under consideration. By destroyed configurations at time /, we mean the configurations that were present in n^(N^~^) but not in n^(N^). By newly created configurations at time /, we mean the configurations that are present in n^(N^) but not in 77^ (A^' ~ ' ) . Let us define the structural change at time / as the number of newly created and destroyed configurations at time /. Let us define the conflict change at time / as the sum of the conflict sizes (relative to A^) of the newly created and destroyed configurations at time /. We stipulate that the cost of updating n^(N^~^) and the associated conflict information during the i-th addition in the algorithm should be proportional to the structural and conflict change at time / within a small factor. This condition will be caUed the update condition. It can be easily satisfied in the case of convex poly topes, Voronoi diagrams or trapezoidal decompositions; we leave this verification to the reader. The sum of the structural changes at time /, over all /, is called the total structural change during the incremental construction. The total conflict change is defined similarly. The update condition implies that the performance of a randomized incremental construction depends on the expected values of the total structural and conflict change. The following theorem bounds these values in a general setting. For each j ^n, let e(j) denote the expected size of 17^(N-^), assuming that the N^ is a random sample (subset) of A^ of size j . By this, we mean that each element in A^ is equally likely to be present in A^^. Let d = d(n) denote the maximum degree of a configuration in n(N). By the definition of a configuration space, d is bounded by a constant. Proved the following basic theorem regarding randomized incremental constructions. 3.1 ([13]). 77?^ expected value of the total structural change in the randomized incremental construction is bounded by X!, de{j)/j. The expected value of the total conflict change is bounded by ^jd^[(n — j)/j](e(j)/j). THEOREM
For example, in the case of three-dimensional convex poly topes, e(j) is 0(7) and hence the expected value of the total structural (conflict) change is 0(n) (0(n\ogn) resp.). Assuming that the update condition is satisfied, the expected running time of the corresponding randomized incremental algorithm for constructing three dimensional convex polytopes would be 0 ( ^ logn). The earlier analyses of randomized incremental algorithm were quite complex. The preceding theorem on randomized incremental construction was proved by Clarkson and Shor [13] using a somewhat complex argument. Mulmuley [27,28,31] used for such analyses
Randomized algorithms in computational geometry
715
certain probabilistic games and a combinatorial series. This kind of analysis was also complex. The trick that substantially simplified the proofs of randomized incremental algorithms was the idea of analyzing them backwards due to Chew [9] and Seidel [44,43,45]. For a proof of Theorem 3.1 based on backward analysis see [36]. There have been several applications of the randomized incremental paradigm in computational geometry. Clarkson and Shor [13] give a randomized incremental algorithm for constructing convex polytopes in R^ with 0(n^^^^^) expected running time, for J > 3, and O(^logn) expected running time, for d = 2,3. By the connection between Voronoi diagrams and convex polytopes, this immediately yields a randomized incremental algorithm for constructing Voronoi diagrams in R^ with 0(n ^^/^^) expected running time, for J > 2, and 0(n logn) expected running time, for J = 2. Clarkson and Shor also give a randomized output-sensitive algorithm for constructing three dimensional convex polytopes. Mehlhom et al. [26] give a randomized incremental algorithm for constructing abstract Voronoi diagrams. Seidel [42] gives a very simple randomized incremental algorithm for linear programming in dimension d with 0(dln) expected running time. Matousek, Sharir, and Welzl [22] have improved his algorithm so as to reduce the factor dlto d exp[4V^ln(n + 1)]. Mulmuley [28,31] showed that randomized incremental algorithms have another desirable property, namely their expected running time is quasi-output-sensitive. For example, he gave a randomized incremental algorithm for hidden surface removal whose expected running time can be bounded as follows. Project all edges of the polygons in the scene onto the view plane. This gives rise to a number of crossings (junctions) in the view plane. Some of these junctions are actually visible; we shall say that they have level zero. More generally, the level of any crossing is defined to be the number of polygons in the scene which obstruct (i.e. make invisible) that crossing. Let m{i) be the number of crossings with level /. Note that the output size is 0(n + m(0)). The expected running time of his algorithm is 0([n + m(0) -f ^ - m(/)//]polylogn). He showed that a randomized incremental algorithm for convex polytopes has a similar quasi-output-sensitive behaviour. He also gives a quasi-output-sensitive randomized incremental algorithm for constructing < ^-levels in arrangements with worst-case-optimal 0(k^'^^^'^n^^^^^) expected running time with an extra 0(n logn) additive term for J ^ 3. This algorithm has been improved further by Agarwal et al. See also Boissonnat et al. [4]. Aurenhammer and Schwarzkopf [3] give a simple randomized incremental algorithm for computing ^th order Voronoi diagram in the plane with 0(nk^ logn + nklog^ n) expected running time and optimal 0(k(n — k)) space. Clarkson and Shor [13] and Mulmuley [29] independently gave optimal randomized incremental algorithms for constructing trapezoidal decompositions formed by n segments with 0(n logn + k) expected running time, where k is the number of intersections among the input segments; [30] gives an extension when the segments are algebraic and of bounded degree. Seidel [44] gave a randomized incremental algorithm for triangulating simple polygons with 0(n log* n) expected time; for more results in this direction see [14]. Chazelle et al. [7] gives a randomized incremental algorithm with almost worst-caseoptimal expected running time to compute a single face containing a given base point in an arrangement of segments. So far we have only worried about the expected running time of randomized incremental algorithms. It is also preferable to have tail estimates on their running times. Unfortunately, only in few instances are such tail estimates known. For example, Mehlhom, Sharir and
716
K. Mulmuley
Welzl prove that the expected running time of the randomized incremental algorithm for building trapezoidal decompositions is 0{k + n \ogn) with very high probability if k, the number of intersections, is greater than en log n log^^^ n for some large enough constant c. Lazy randomized ineremental construetion. The randomized incremental algorithms discussed so far operate in the setting of configuration spaces with bounded degree property. These configuration spaces are "local" in a sense that each configuration is locally and independently defined in terms of triggers and stoppers without any reference to the global structure. Sometimes one is interested in computing geometric structures whose cells can not be defined locally in this fashion, such as the trapezoidal decomposition of a single face containing the given basepoint in an arrangement of segments — the trapezoids occurring in this decomposition can not be characterized locally. Berg, Dobrindt, and Schwarzkopf have formulated an extension of the randomized incremental approach to certain "nonlocal" configuration spaces. Using this approach, they give efficient randomized algorithms for computing a face containing the given basepoint in an arrangement of segments or an arrangement of triangles in E?. 3.1. Online algorithms The randomized-incremental algorithms encountered earlier in this section are not online though they add objects one at a time. This is because they maintain conflict information which depends on unadded objects. To convert these algorithms into truly online algorithms one needs to maintain, instead of the conflcit information, some online search structure which would allow us to efficiently compute the faces in the current partially built geometric structure that conflict with the new object to be added. For example, when one is building a trapezoidal decomposition, one could maintain an online point location structure that allows to locate the endpoints of the segment to be added in the current trapezoidal decomposition. Once the endpoints are located, one can travel in the trapezoidal decomposition from one endpoint to the other and thus determine all trapezoids that intersect (conflict with) the segment to be added. One method for maintaining such an online search structure is to keep track of the socalled history of randomized incremental algorithms. This idea has been explored by many authors [5,15,16,34,41,44]. We shall demonstrate it here in the case of trapezoidal decompositions following Seidel [44]. Consider the randomized incremental algorithm for constructing trapezoidal decompositions. At time /, it maintains the trapezoidal decomposition H{N^) formed by the set A^' of segments added so far and some conflict information. Suppose we want to make it truly online. Towards this end, we shall maintain, instead of the conflict information, some search structure history (/) based on the history. The leaves of history(/) will point to the trapezoids in H(N^). Given any query point p, we shall be able to locate the trapezoid in H(N^) containing p in 0(log/) time with high probability. To add the (/ + l)-th segment 5/+i to H(N^), we shall first locate the segments of this segment in H{N^) using history (/). After this all trapezoids of H(N^) intersecting (conflicting with) 5/+! can be determined by travelling along this segment in H(N^) from its one endpoint to the other. This is all that is needed to make the previous randomized incremental algorithm on-line. The expected total cost of point location in this on-line version
Randomized algorithms in computational geometry
111
is OCZ^i l^S 0 = 0(n logn). Thus, the expected total running time of the algorithm would remain 0{n \ogn -h k), where k is the number of intersections among the segments in A^. Let us now specify history (/) formally. History (0) consists of one node, called the root, which corresponds to the whole plane. Inductively, assume that history (/) has been specified. History(/ + 1) is obtained from history(/) as follows. As before, let S = Si^^x denote the (/ + l)-th segment to be added. If a trapezoid / G H{N^) intersects S, we say that it is killed during the (/ + l)th addition. Accordingly, we mark the leaf in history (/) pointing to / as killed by the segment S. We associate with this leaf a pointer to the specification of S. Similarly, we allocate new nodes for the trapezoids in H{N^'^^) that are newly created during the (/ + l)th addition. We also store the specifications of these newly created trapezoids at the corresponding nodes. Given a killed trapezoid / in H{N^) and a newly created trapezoid g in H{N^^^), we say that g is a child of / if / Pi g is nonempty. In this case, we associate a pointer with the node in history (/) corresponding to / pointing toward the newly created node (leaf) for g. This completely specifies history (/ + 1) given history (/). Note that the number of children of any killed leaf in history (/) is bounded; in fact, it is at most 4. History (/) is a directed acyclic graph with one root, wherein the directed edges correspond to the pointers from parents to children. The out-degree of each node in this graph is at most 4. Let us now see how history (/) can be used for locating a query point in H(N^). Let us denote the query point by p. Our goal is to locate the trapezoid in H(N^) containing the query point. We begin at the root of history (/). Precisely one of its children corresponds to a trapezoid containing p. Because the number of children is at most four, this child can be determined in 0(1) time. We descend to this child in the history and keep on repeating this process until we reach a leaf. The leaf corresponds to the trapezoid in H(N^) containing p. Similarly, for planar Voronoi diagrams and three-dimensional convex hulls, Guibas, Knuth, and Sharir [16] have given an on-line algorithm based on history. For an earlier Delaunay tree, also based on history, see Boissonnat and Teillaud [5]. Mulmuley [34] gives a dynamic linear optimization algorithm for dimensions up to 4 again based on the notion of history. Further applications of history would be given in Section 5, where we shall see how history can be used in the design of fully dynamic algorithms. 4. Dynamic algorithms So far, we have dealt with only static or online (semidynamic) algorithms. Now we wish to move on to algorithms that are fully dynamic, i.e., they allow deletions of objects. Abstractly speaking, our problem is as follows. Let M denote the set of undeleted objects existing at any given moment. Our goal is to maintain a geometric complex (partition) H(M) in a dynamic fashion. The complex H(M) depends on the problem under consideration. The user can add or delete an object in M. Our goal is to update H(M) quickly. If there is a search structure associated with H(M), we also want to update that search structure quickly. For example, M could be a set of segments and H(M) could be the trapezoidal decomposition formed by them. How does one evaluate a dynamic algorithm? The best we can hope for is that it performs an update in time proportional to the structural change in the underlying geometric
718
K. Mulmuley
complex H(M). The dominant term in the running times of several of the algorithms that we shall describe will essentially turn out to be proportional to this structural change, ignoring a small factor. But in several problems, such as maintenance of Voronoi diagrams, the structural change can vary a lot. In such cases, it is illuminating to know how the given dynamic algorithm performs on a "typical" update sequence. By a typical update sequence, we mean a random update sequence. We already know what is meant by a random sequence of additions. Let us now specify what is meant by a random update sequence, when even deletions are allowed, following a model put forth by Mulmuley [32] and Schwarzkopf [41]. Consider any update sequence u. Define its signature 8 = 8(u) to he the string of + and — symbols such that the ith symbol in 8(u) is + (or —) iff the /th update in u is addition (resp. deletion). Let N be the set of objects involved in u. We say that u is an (A^, 5)-sequence. We shall always denote the size of A^ by n. Not every sequence 5 of H- and — symbols can occur as a signature of an update sequence. To see this, let us define r(8J), the rank of 8 at time /, to be the number of + symbols minus the number of — symbols that occur in the initial subsequence of 8 of length /. If 5 is a signature of an update sequence w, then r(8,i) just denotes the number of current (i.e., undeleted) objects at time /. It is easy to see that 5 is a valid signature, iff r(8,i) ^ 0 , for all /. We denote r(8,i) by just r(i) when the signature is imphcit. When 8 = -^^, the update sequence involves only additions. Notice that r(-\-^, i) = i. Now consider any fixed A^ and 8. We say that i/ is a random (N, 5)-sequence if it is chosen from a uniform distribution on all valid (A^, 5)-sequences. If 5 = +", this just means that all permutations of A^ are equally likely. Thus, a random (A^, +")-sequence is just a usual random sequence of additions. If we stipulate, for the sake of simplicity, that an object, once deleted during w, cannot be added again, then another way to think about a random (A'^, 5)-sequence would be: Read the signature 8 from the left to right. If the symbol is +, randomly choose an unadded object from A^ and add it. If the symbol is —, randomly delete one of the earher added objects. In this model of randomness, an adversary can choose the objects in A^ as well as the signature 8 any way he likes. He must, however, treat all objects in A^ equally as far as the relative order of their additions and deletions is concerned. In that sense, the adversary is extremely fair: He treats all objects (people) equally regardless of their spatial positions. We must emphasize that, in reality, updates need not be random. So we should use this model judiciously. It is very reasonable when, in a given dynamic problem, an adversary can come up with an update sequence that can cause an unusually large total structural change. This sequence will slow down any dynamic algorithm. In this situation, our model can justify why the dynamic algorithm in question should perform well on a typical update sequence. We have encountered two kinds of search structures so far, ones based on random sampling (Sections 2.1 and 2.2), and ones based on the history of randomized incremental algorithms (Section 3.1). In Section 4.1 we shall describe a technique, called dynamic sampling, for dynamizing search structures based on random sampling. Dynamization of history-based search structures will be taken up in Section 5.
Randomized algorithms in computational geometry
719
4.1. Dynamic sampling The dynamic sampling technique, proposed by Mulmuley and Sen [47,37,32,33], allows one to dynamize the search structures based on random sampling so as to allow addition as well as deletion of objects. The basic idea is quite simple: We maintain the search structure in such a fashion that at any time it looks as if it were constructed by applying the randomized static technique to the current set of undeleted objects. Dynamic sampling provides systematic tools for creating this illusion. We shall only describe dynamization of the search structures based on bottom-up sampling. Application of dynamic sampling to the search structures based on top-down sampling is quite similar. We shall describe the technique in an intuitive and abstract fashion. The basic idea is to simulate static sampling in a dynamic fashion. Skip list [38] is based on the same idea. Let us denote the set of current (undeleted) objects existing at any given time by M. We shall denote the size of M by m. The objects will depend on the problem under consideration. We maintain our search structure in such a way that at any given time it looks as if it were constructed by applying the static bottom-up sampling, as described in Section 2.2, to the set M. In other words, we can imagine that our search structure, which we shall denote by sample(M), is obtained as follows. We first obtain a gradation M = M\ 2 ^ 2 2 • • • 2 Mr~\ D Mr = 0, where M/+i is obtained from Mi by flipping a fair coin independently for each object in Mi and retaining only those objects for which the toss was a success (heads). The state of sample(M) is completely determined by this gradation of M. It consists of r = O(logm) levels. Every level / is associated with a geometric complex H{Mi). This complex depends upon the problem under consideration. Between two successive levels / + 1 and /, there is a descent structure that is used during the answering of queries. We shall denote it by descent (/+ 1,/). A key property of the dynamic sampling technique will be that the grading of M, and hence the state of sample(M), will be independent of the sequence of updates that actually built sample(M). This will imply that the bounds on the query time obtained in the static setting continue to hold in the dynamic setting as well. Let us see how to add a new object S to sample(M). Let M' = M VJ {S}. Our goal is to obtain sample(MO from sample(M). This is done as follows. We toss a fair coin repeatedly until we get failure (tails). Let j be the number of successes obtained before getting failure. The idea is simply to add S to levels 1 through j + 1. Let us elaborate what this means. For 1 ^ / ^ j + 1, let M[ denote M/ U {5'}. Addition of S to the /th level means: H{Mi) is updated to H{M[) and descent(/ + 1, /) is accordingly updated. This requires descent(/ + 1, /) to be dynamic as well. When S has been added to all levels from 1 to 7 + 1, we get the updated data structure sample (M^. It is completely determined by the gradation Mj D M^ 3 •. • of M'. Here M[ = M/, for / > 7 + 1. Note that this gradation of M' is again independent of the actual sequence of the previous updates that built sample (MODeletion is conceptually just the reverse of addition. Suppose we want to delete an object S from sample (M). Let M' = M\{S]. Our goal is to obtain sample (M^ from sample (M). This is done by simply deleting S from all levels of sample (M) containing it. Let us elaborate what this means. Suppose S is present in levels 1 through 7 + 1, for some 7 ^ 0 . For 1 ^ / ^ 7 + 1, let M^^ denote Mi \ {S} for each such level /. Deletion of S from the /th level
720
K. Mulmuley
means: H(Mi) is updated to H(M^^). Concurrently, we also update descent(Z + 1, /). At the end of this procedure, we get sample(MO. The state of sample(MO is determined by the gradation M^ = M| 2 M^ 5 • • • . Here M/ = M/, for / > 7 + 1. This gradation of M' is again independent of the actual sequence of the previous updates that built sample (MO. Using dynamic sampling, Mulmuley and Sen [37] give a dynamic search structure for point location and ray-shooting in arrangements of hyperplanes in R^ with 0(n^) space, 6(log^~^ n) query time, and 0(«^~* logn) cost of adding or deleting a hyperplane. Mulmuley [32] gives a dynamic algorithm for maintaing a planar Voronoi diagram and the associated search structure with 0(log m) expected (amortized) cost of update and 0(log^ m) query time. He also gives efficient dynamic algorithms for maintaining trapezoidal decompositions [32] or, more generally, three-dimensional partitions induced by polygons in R^ [33] along with an associated point location structure, and a dynamic search structure for answering nearest-/: neighbour queries [33] in dimension d with expected 0(n^^^^^~^^) cost of executing a random (N, 5)-sequence, for an arbitrary set N of sites and an arbitrary signature 5, and expected 0(k\ogn) cost of answering a query; one similarly gets a dynamic search structure for answering half-space range queries in dimension d with expected 0(n^^^'^^~^^) cost of executing a random (A^, 5)-sequence, for an arbitrary set N of half-spaces and an arbitrary signature 8, and expected 0(k\ogn) cost of answering a query.
5. Dynamic history In Section 3.1 we discussed search structures based on the history of incremental algorithms. Here we shall briefly discuss some strategies for dynamizing these structures so as to allow deletions of objects as well. How do we delete an object? There are a few possibilities.
5.1. Lazy history The simplest one [34,41] is to simply mark the object as dead, but we do not really delete it from the search structure. We also compute the new geometric structure that results from the current one after deleting the object. We remember the local change that occurs in this transition and extend the current structure accordingly by creating a link structure from the faces in the current partition that die during the transition to the new faces that come into existence. For example, in the case of trapezoidal decomposition, we shall compute the new trapezoidal decomposition that results after deleting the required segment and then link each killed trapezoid in the old decomposition to its children, i.e., the newly created trapezoids intersecting it. The number of children of a killed trapezoid need not be bounded by a constant. But these children can be ordered from left to right in an obvious fashion. So we associate a search tree with this sorted list of children which can be used in point location to descend from a trapezoid to its children. There is, however, an obvious problem with the above strategy. When several dead objects accumulate in the search structure, it becomes dirty and inefficient. So we need to
Randomized algorithms in computational geometry
721
clean the search structure periodically by removing the dead objects and rebuilding the search structure from scratch. This lazy maintenance of history was analyzed by Mulmuley [34] and Schwarzkopf [41]. Using this strategy, they gave dynamic algorithms for several problems such dynamic maintenance of trapezoidal decompositions and planar Voronoi diagrams along with associated search structures and showed that their expected performance on random update sequences is almost optimal. They also prove an appropriate generahzation of Theorem 3.1 that holds for random {N, 5)-sequences, for arbitrary N and 5; Theorem 3.1 then corresponds to the special case S = -\-^. 5.2. Clean history A cleaner, but more difficult, alternative is to update the search structure in such a way that after the update it looks as if the deleted object was never encountered in the first place [15,34]. Mulmuley [34] proposes a general scheme for carrying out such deletion through a sequence of operations called rotations. These are akin to rotations that are performed on binary search trees during deletions, but substantially more complicated in general. The idea is as follows. We imagine moving continuously the time of insertion of the object to be deleted from its actual value (which could be long ago) to the present. During this continuous movement, the state of the search structure changes at some discrete times. The basic operation that accomplishes this change is called rotation [34]. It actually turns out to be a higher dimensional generalization of the well known operation of rotation on binary search trees. Once the object to be deleted is brought to the foreground in the history via rotations, its deletion can be completed by simply undoing the last imaginary addition. Using this scheme based on rotations, Mulmuley [34] gives dynamic algorithms for several problems such maintenance of trapezoidal decompositions, three-dimensional partitions induced by polygons in R^, maintenance of convex hulls and Voronoi diagrams in arbitrary dimension. These algorithms have either optimal or almost optimal expected performance on random update sequences. For example, the expected cost of dynamically maintaining convex hulls over a random update sequence of additions and deletions is 0(nL^/^^), for d > 3, and 0(n\ogn) for d = 2,3. Clarkson, Mehlhorn, and Seidel give a different deletion scheme for dynamic maintenance of convex hulls. Devillers, Meiser, and Teillaud [15] give a different scheme for dynamic maintenance of planar Voronoi diagrams. The search structures based lazy history (Section 5.1) or clean history (Section 5.2) have one disadvantage that their query times are good only if the update sequences are random. In some situations, query times may be critical and one may wish to guarantee good query times for any update sequence. One technique for accomplishing this was proposed in [34]. It is called dynamic shuffling. The reader is referred to [34] for details. 6. Further topics Here we shall briefly mention several related topics that have not been touched in this article. One can ask how much of randomness is really essential in the randomized algorithms we studied. There is a general result [35] which states that the number of random bits
722
K. Mulmuley
in most randomized incremental algorithms can be reduced from 0(n\ogn) to O(logn) without changing the expected running time by more than a constant factor. Very little modification is required to accomplish this reduction in randomness. All one has to do is to substitute the truly random source with a suitable pseudo-random source. It can be shown that the resulting algorithm still remains efficient in most cases. Several of the algorithms based on random sampling can be derandomized so as to yield deterministic algorithms. An interested reader is referred to [25,1,8,18,19]. There have been several algorithms in computational geometry, e.g. [2,21], which use random sampling (or more precisely, derandomized version of random sampling) in conjunction with the parametric search technique of Megiddo. Random sampling has also been used to obtain several purely combinatorial results. We have also not touched upon the use of randomization in linear programming. Another vast topic that we have not touched upon is the use of randomization in the design of parallel algorithms for geometric problems; e.g. see [40]. Random sampling has also found applications in the design of approximate algorithms, such as algorithms for approximate nearest-neighbour-search. References [1] RK. Agarwal, Partitioning arrangements of lines: I. An efficient deterministic algorithm. Discrete Comput. Geom. 5 (1990), 449^83. [2] RK. Agarwal and J. Matousek, Ray shooting and parametric search, 24th Annual ACM Symposium on the Theory of Computing (1992), 517-526. [3] F. Aurenhammer and O. Schwarzkopf, A simple on-line randomized incremental algorithm for computing higher order Voronoi diagrams, 7th Annual ACM Symposium on Computational Geometry (1991), 142151. [4] J.-D. Boissonnat, O. Devillers and M. Teillaud, A randomized incremental algorithm for constructing higher order Voronoi diagrams, to appear in Algorithmica. An abstract is available in Second Canadian Conference on Computational Geometry (1990). [5] J.-D. Boissonnat and M. Teillaud, On the randomized construction of the Delauney tree. Technical Report 1140, INRIA (France) (1989). [6] B. Chazelle, An optimal convex hull algorithm and new results on cuttings, 32nd Annual IEEE Symposium on the Foundations of Computer Science (1991), 29-38. [7] B. Chazelle, H. Edelsbrunner, L.J. Guibas, M. Sharir and J. Snoeyink, Computing a face in an arrangement of line segments, 2nd Annual ACM Symposium on Discrete Algorithms (1991), 441^W8. [8] B. Chazelle and J. Friedman, A deterministic view of random sampling and its use in geometry, Combinatorica 10 (3) (1990), 229-249. [9] L.R Chew, Building Voronoi diagrams for convex polygons in linear expected time. Report, Department of Mathematical and Computer Science, Dartmouth College, Hanover, NH (1985). [10] K.L. Clarkson, New applications of random sampling in computational geometry. Discrete Comput. Geom. 2(1987), 195-222. [11] K.L. Clarkson, A randomized algorithm for closest-point queries, SIAM J. Comput. 17 (1988), 830-847. [12] K.L. Clarkson, Randomized geometric algorithms, Computimg in Euclidean Geometry, D.Z. Du and F. Hwang, eds. World Scientific, Singapore (1992), 117-162. [13] K.L. Clarkson and P.W. Shor, Applications of random sampling in computational geometry, II, Discrete Comput. Geom. 4 (1989), 387-421. [14] O. Devillers, Randomization yields simple 0(«log* n) algorithms for difficult Q{n) problems, Intemat. J. Comput. Geom. Appl. 2 (1) (1992), 621-635. [15] O. Devillers, S. Meiser and M. Teillaud, Fully dynamic Delaunay triangulation in logarithmic expected time per operation. Proceedings of the 2nd Workshop on Algorithms and Data Structures, Lecture Notes in Comput. Sci. 519, Springer-Verlag (1991), 42-53.
Randomized
algorithms in computational
geometry
723
[16] L.J. Guibas, D.E. Knuth and M. Sharir, Randomized incremental construction of Delaunay and Voronoi diagrams, Algorithmica 7 (1992), 381^13. [17] D. Haussler and E. Welzl, Epsilon-nets and simplex range queries. Discrete Comput. Geom. 2 (1987), 127-151. [18] J. Matousek, Construction of £-nets. Discrete Comput. Geom. 5 (1990), 427^48. [19] J. Matousek, Cutting hyperplane arrangements. Discrete Comput. Geom. 6 (1991), 385^06. [20] J. Matousek, Range searching with efficient hierarchical cuttings, 8th Annual ACM Symposium on Computational Geometry (1992), 276-285. [21] J. Matousek and O. Schwarzkopf, Linear optimization queries, 8th Annual ACM Symposium on Computational Geometry (1992), 16-25. [22] J. Matousek, M. Sharir and E. Welzl, A subexponential bound for linear programming, 8th Annual ACM Symposium on Computational Geometry (1992), 1-8. [23] J. Matousek, E. Welzl and L. Wemisch, Discrepancy and s-approximations for bounded VC-dimension, 32nd Annual IEEE Symposium on the Foundations of Computer Science (1991), 424^30. [24] J. Matousek, More on cutting arrangements with low crossing number. Technical Report B-90-2, FU Berlin, FB Mathematik (1990). [25] J. Matousek, Approximations and optimal geometric divide-and-conquer, 23rd STOC (1991), 505-511. [26] K. Mehlhom, S. Meiser and C. O'Dunlaing, On the construction of abstract Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 211-224. [27] K. Mulmuley, A fast planar partition algorithm, I, 29th Annual IEEE Symposium on the Foundations of Computer Science (1988), 580-589. [28] K. Mulmuley, An efficient algorithm for hidden surface removal, Comput. Graph. (Proc. ACM SIGGRAPH '89) 23 (3) (1989), 379-388. Full version to appear in the special issue of J. of Algorithms on the 30th Annual IEEE Symposium on the Foundations of Computer Science. [29] K. Mulmuley, A fast planar partition algorithm, I, J. Symbohc Comput. 10 (1990), 253-280. [30] K. Mulmuley, A fast planar partition algorithm, II, J. ACM 38 (1991), 74-103. [31] K. Mulmuley, On levels in arrangements and Voronoi diagrams. Discrete Comput. Geom. 6 (1991), 307338. [32] K. Mulmuley, Randomized multidimensional search trees: Dynamic sampling, 7th Annual ACM Symposium on Computational Geometry (1991), 121-131. [33] K. Mulmuley, Randomized multidimensional search trees: Further results in dynamic sampling, 32nd Annual IEEE Symposium on the Foundations of Computer Science (1991), 216-227. [34] K. Mulmuley, Randomized multidimensional search trees: Lazy balancing and dynamic shuffling, 32nd Annual IEEE Symposium on the Foundations of Computer Science (1991), 180-196. [35] K. Mulmuley, Randomized geometric algorithms and pseudo-random generators, 33rd Annual IEEE Symposium on the Foundations of Computer Science (1992), 90-100. [36] K. Mulmuley, Computational Geometry: An Introduction Through Randomized Algorithms, Prentice-Hall, Englewood Cliffs, New Jersey (1994). [37] K. Mulmuley and S. Sen, Dynamic point location in arrangements ofhyperplanes. Discrete Comput. Geom. 8 (1992), 335-360. [38] W. Pugh, Skip lists: A probabilistic alternative to balanced trees, Comm. ACM 33 (6) (1990), 668-676. [39] M.O. Rabin, Probabilistic algorithms. Algorithms and Complexity, J.F Traub, ed.. Academic Press, New York (1976), 21-30. [40] J.H. Reif and S. Sen, Optimal randomized parallel algorithms for computational geometry. Proceedings of the 16th International Conference on Parallel Processing (1987). Full version to appear in Algorithmica. [41] O. Schwarzkopf, Dynamic maintenance of geometric structures made easy, 32nd Annual IEEE Symposium on the Foundations of Computer Science (1991), 197-206. [42] R. Seidel, Linear programming and convex hulls made easy, 6th Annual ACM Symposium on Computational Geometry (1990), 211-215. [43] R. Seidel, Low dimensional linear programming and convex hulls made easy. Discrete Comput. Geom. 6 (1991), 423^34. [44] R. Seidel, A simple and fast incremental randomized algorithm for computing trapezoidal decompositions and for triangulating polygons, Comput. Geom. 1 (1991), 51-64.
724
K. Mulmuley
[45] R. Seidel, Backwards analysis of randomized geometric algorithms. Report TR-92-014, ICSI, Berkeley (1992). [46] R. Seidel, Backward analysis of randomized incremental geometric algorithms. New Trends in Discrete and Computational Geometry, J. Pach, ed., Springer-Verlag, New York-Berlin-Heidelberg (1993), 37-67. [47] S. Sen, Maintaining arrangements for point location. Technical Report, Bell labs technical memorandum (1990).
CHAPTER 17
Spatial Data Structures: Concepts and Design Choices Jlirg Nievergelt and Peter Widmayer ETH Zurich
Contents 1. Goals and structure of this survey 727 2. Data structures old and new, and the forces that shaped them 728 2.1. Prehistory, logical vs. physical structure 728 730 2.2. Early scientific computation: Static data sets 2.3. Commercial data: Batch processing of dynamic sets, single key access 730 2.4. Transaction processing: Interactive multikey access to dynamic sets 731 2.5. Knowledge representation: Associative recall in random nets 732 2.6. Spatial data management: Proximity access to objects embedded in space 732 2.7. Concise summary of trends that shaped the development of data structures 733 3. Basic concepts and characteristics of multi-dimensional and spatial data structures 734 3.1. The profile of a data structure 734 3.2. The central issue: Organizing the embedding space versus organizing its contents 735 4. The three step model of spatial object retrieval 738 4.1. Cell addressing: query ^ ^- set {(/, j , . . . ) } of query cells 738 4.2. Coarse filter: Set of query cells determines candidate objects 739 4.3. Fine filter: Compare each object to the query 739 740 5. A sample of data structures and their space partitions 5.1. General consideration 740 5.2. Space driven partitions: Multidimensional linear hashing, space filling curves 741 5.3. Data driven partitions: /:-d-B-tree, hB-tree 744 5.4. Combinations of space-driven and data driven-partitions: EXCELL, grid file, hierarchical grid files, BANG file 746 749 5.5. Redundant data storage 6. Spatial data structures for extended objects 749 6.1. Parameter space transformations 750 6.2. Clipping 751 6.3. Regions with unbounded overlap: R-tree 751 6.4. Cells with bounded overlap: multilayer structures, R-file, guard file 753 6.5. Conclusions drawn from the structures surveyed 755 7. Summary: Points to consider when choosing a spatial data structure 756 References 757 HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
725
726
/. Nievergelt and P. Widmayer
Abstract Spatial data structures, once considered mere variations of structures designed for conventional (non-spatial) data, increasingly evolve along a different track. The reason for this lies in the rich structure of Euclidean space. Even without the presence of objects, regions of space admit a multitude of operations and relations that are relevant for efficient query processing, such as: distance, containment, intersection, touching, in front of. This fact suggests that the main task of a spatial data structure is to organize the embedding space in a systematic manner, rather than the content, i.e. the transient set of objects present at any moment. This is particularly true when objects move or are subject to other transformations, as is the case in applications such as computer-aided design (CAD). A second difference between spatial and non-spatial data lies in the query population. Rather than retrieving objects based on their inherent characteristics, the majority of spatial queries are based on proximity of the objects to be retrieved to query regions of the most varied shape (rays, boxes, arbitrary polyhedra). This implies that retrieval begins with a coarse filter that retrieves a cluster of neighboring objects, followed by a fine filter that analyzes their geometric properties. Thus, proximity in space should be reflected in contiguous storage to the extent possible. This survey is concerned with spatial data structures suitable for external storage devices. This implies a conceptual and technical simplicity that excludes a few sophisticated list structures designed for central memory. We explain concepts, and their intuitive justification, in the context of their historical development. We emphasize common sense principles more than detailed techniques; and we illustrate basic ideas by presenting a sample of spatial data structures selected by virtue of their conceptual simplicity. Thus, we hope to provide a user's guide to an applications programmer confronted with a bewildering multitude of structures described in the research literature, many of which differ only in detail: "If you ask the right questions, common sense will provide answers".
Spatial data structures
727
1. Goals and structure of this survey The growing importance of graphic user interfaces and of apphcations such as computeraided design and geo-information systems has confronted many apphcations programmers with a challenging new task: Processing large amounts of spatial data, off disk, correctly and efficiently. The task is daunting, as spatial data poses distinctly novel problems as compared to traditional "business data", in particular the following two: (1) Access is primarily via proximity relations to other objects that populate Euclidean space, rather than via inherent properties of objects, such as attribute values. A typical query is of the form "retrieve all objects that intersect a given region of space". (2) Guaranteed correctness in processing spatial objects has proven to be a thorny problem requiring a systematic analysis of degenerate configurations. Moreover, efficiency depends on the interplay between two techniques: one for representing an object (independently of its location in space), the other for storing the entire collection of objects in relation to their position in space. We aim to provide a guide through the bewildering multitude of concepts, techniques and choices a programmer faces when designing a data structure for managing spatial data. We simplify this task by separating the question of how an object is represented for internal processing (an issue in computational geometry that we shall not address), from the question of how a large collection of simple objects embedded in space are managed on disk (the crucial issue of spatial data management systems). Although object representation and external data structures may be intertwinned, for example in image processing, they are treated separately in many important applications. In geo-information systems, for example, objects of complex shape are routinely approximated or bounded by simple containers for retrieval purposes. The tutorial approach we have chosen for this survey begins with the historical development of data structures in general, a trend from which spatial data in particular emerged as a separate discipline relatively late. In spite of the profound differences between spatial data on the one hand, and conventional data typical of the business applications that shaped the development of database technology on the other hand, the community of database researchers persisted in forcing "non-standard (including spatial) data" into a mold that had proven effective for other applications. It took a long time to realize that data structures inherited or adapted from single-key access had to be reconsidered, and often abandoned. Thus a brief sketch of the development of data structures in Section 2 serves the double purpose of reviewing the basic notions of data structures, and of identifying key differences between spatial and other data. A second characteristic of our tutorial approach is to start from about a dozen concepts or features that appear to cover most of the many spatial data structures described in the literature. This approach assigns to every data structure a "profile" that facilitates assessment of its strong and weak points, and comparison with others. Thus we avoid enumerating the many spatial data structures described in the literature, which often differ only in details, and instead focus on the building blocks from which a programmer can assemble his own data structure tailored to the specific requirements of a given task. Thus, Section 3 presents important concepts needed to discuss spatial data structures at an intuitive level. This includes a list of basic questions to be raised and considerations to
728
/. Nievergelt and P. Widmayer
be aware of before a programmer decides on data representation and storage technique. The latter have a pervasive influence on the complexity and efficiency of any application that processes spatial data. Having assembled an arsenal of concepts and terminology, Section 4 presents a concise model that captures the essence of the majority of spatial data structures and the way they process queries. By separating three key aspects: the organization of the embedding space into a collection of cells, the organization of objects into cell populations, and the internal representation of an object, we arrive at a three-step query processing model that serves as a skeleton for understanding, assessing and comparing most spatial data structures. So far we have merely mentioned a few examples of specific data structures, out of several dozen known today. Sections 5 and 6 continue by systematically listing the major building blocks that go into the design of a spatial data structure, and providing examples of structures for possible design choices. Section 5 treats points, the simplest kind of spatial object, whereas Section 6 discusses extended objects. By following an approach "from general concepts to specific examples", we hope to help a reader to program an appropriate data structure based on half a dozen design choices, rather than by scanning a vast literature that includes hundreds of research papers. The concluding Section 7 attempts to summarize the survey with a simple point of view: Design and choice of spatial data structures, today, is a matter of common sense more than of technical wizardry. Don't let hundreds of research papers prevent you from seeing the forest because of all the trees. With a clear understanding of a dozen fundamental concepts characteristic of spatial data, you can choose a data structure suited to your application.
2. Data structures old and new, and the forces that shaped them 2.1. Prehistory, logical vs. physical structure The discipline of data structures, as a systematic body of knowledge, is truly a creation of computer science. The question of how to organize data was a lot simpler to answer in the days before the existence of computers: The organization had to be simple, because there was no automatic device capable of processing intricately structured data, and there is no human being with enough patience to do it. Consider two examples. (1) Manual files and catalogs, as used in business offices and libraries, exhibit several distinct organizing principles, such as sequential and hierarchical order and crossreferences. From today's point of view, however, manual files are not well-defined data structures. For good reasons, people did not rigorously define those aspects that we consider essential when characterizing a data structure: what constraints are imposed on the data, both on the structure and its content; what operations the data structure must support; what constraints these operations must satisfy. As a consequence, searching and updating a manual file is not typically a process that can be automated: It requires common sense, and perhaps even expert training, as is the case for a library catalog. (2) In manual computing (with pencil and paper or a nonprogrammable calculator) the algorithm is the focus of attention, not the data structure. Most frequently, the person
Spatial data structures
mv\\ o ^ \^ A \-/ E \^ 1
o u
O O O ~A ~E ~I
o ~o ~u
o
u
O A E I
II o o u
111!
O ~A ~E ~I
OMAHA
ir 1M r 1 n
O O O O \ - / V ^ >s>' A E 1 O U -A -^E ^1 ^ o ~U
BEAUTIFUL
III o
729
EXETER
O
Hi
1111 [ O II o
~o
~U
A E I O
u
II
O O ~A ~E ~I
O
II
~o ~u
OMEGA
Fig. 1. Edge-notches cards as a mechanical multi-key access structure.
computing writes data (input, intermediate results, output) in any convenient place within his field of vision, hoping to find them again when he needs them. Occasionally, to facilitate highly repetitive computations (such as income tax declarations), someone designs a form to prompt the user, one operation at a time, to write each data item into a specific field. Such a form specifies both an algorithm and a data structure with considerable formality, but is necessarily special purpose. Edge-notched cards are perhaps the most sophisticated data structures ever designed for manual use. Let us illustrate them with the example of a database of English words organized so as to help in solving crossword puzzles. We write one word per card and index it according to which vowels it contains and which ones it does not contain. Across the top row of the card we punch 10 holes labeled A, E, I, 0,U, ~A, ^E, ~ / , ~(9, ^U. When a word, say ABACA, exhibits a given vowel, such as A, we cut a notch above the hole for A; when it does not, such as £", we cut a notch above the hole for ^E (pronounced "not £"). The figure below shows the encoding of the words BEAUTIFUL, EXETER, OMAHA, OMEGA. For example, we search for words that contain at least one E, but no (7, by sticking two needles through the pack of cards at the holes E and ^U. EXETER and OMEGA will drop out. In principle it is easy to make this sample database more powerful by including additional attributes, such as "A occurs exactly once", "A occurs exactly twice", "A occurs as the first letter in the word", and so on. In practice, a few dozen attributes and thousands of cards will stretch this mechanical implementation of a multikey data structure to its limits of feasibility. The reader might be interested in working out the logic of evaluating queries expressed as arbitrary Boolean expressions over these attributes, observing that AA^D works in parallel with multiple needles, whereas OR is processed sequentially using multiple passes. Exotic as the physical realization may appear today, the logical structure of edge-notched cards is an amazingly modern example of multi-key data structures: it organizes the search space as a hypercube, i.e. a regular grid in which every key value, whether present or not among the actual data to be stored, has its predefined place. Moreover, the physical order of the data to be stored is entirely independent of the logical order imposed on the data space, so the former can be chosen to match the physical characteristics of the hardware
730
/. Nievergelt and P. Widmayer
used (e.g. allocation of clusters of cards to boxes or, today, of records to disk blocks) without interfering with the search logic. But in order to fully appreciate these remarks we must describe the major evolutionary steps along the way from the first computerized data structures to modem multi-key data structures. We will observe that each era that focused on new application domains created new techniques to address concerns not adequately met by prior developments. 2.2. Early scientific computation: Static data sets Numerical computation in science and engineering mostly leads to linear algebra and hence matrix computations. Matrices are static data sets: The values change, but the shape and size of a matrix rarely does — this is true even for most sparse matrices, such as band matrices, where the propagation of nonzero elements is bounded. Arrays were Goldstine and von Neumann's answer to the requirement of random access, as described in their venerable 1947 report "Planning and coding of problems for an electronic computing instrument". FORTRAN '54 supported arrays and sequential files, but no other data structures, with statements such as DIMENSION, READ TAPE, REWIND, and BACKSPACE. Table look-up was also solved early through hashing. The software pioneers of the first decade did not look beyond address computation techniques (array indexing and hashing) because memories were so small that any structure that "wastes" space on pointers was considered a luxury. Memories containing a few K words restricted programmers to using only the very simplest of data structures, and the limited class of problems addressed let them get away with it. The discipline of data structures had yet to be created. 2.3. Commercial data: Batch processing of dynamic sets, single key access Commercial data processing led to the most prolific phase in the development of data structures. The achievements of the early days were comprehensively presented in Knuth's pioneering books on "The Art of Computer Programming" [88,89]. These applications brought an entirely different set of requirements for managing data typically organized according to a single 'primary key'. When updating an ordered master file with unordered transaction files, sorting and merging algorithms determine data access patterns. The emergence of disk drives extended the challenge of data structure design to secondary storage devices. Bridging the 'memory-speed gap' became the dominant practical problem. Central memory and disk both look like random access devices, but they differ in the order of magnitude of two key parameters:
Access time (seconds): Size of transfer unit (bits):
Memory
Disk
10"^... 10"^ 10... 10^
10"^... 10"^ 10^... 10^
Ratio: Disk/Memory 10^... 10^ 10^... 10^
In recent decades technology has reduced both time parameters individually, but their ratio has remained a 'speed gap' of about 4 orders of magnitude. This fact makes the number of disk accesses the most relevant performance parameter of external data structures.
Spatial data structures
731
Many data structures perform well in central memory, but disk forces us to be more selective; disks call for data structures that avoid pointer chains that indiscriminately cross disk block boundaries. The game of designing data structures suitable for disk has two main rules: the easy one is to use a small amount of central memory effectively to describe the current allocation of data on disk in a way that facilitates rapid retrieval; the hard one is to ensure that the structure adapts gracefully to the ever-changing content of the file. Index-sequential access methods (ISAM) order records according to a single key so that a small directory, preferably kept in central memory, ideally directs any point query to the correct data bucket where the corresponding record is stored, if it is present at all. But the task of maintaining this single-disk-access performance in a dynamic file, in the presence of insertions and deletions, is far from trivial. The first widely used idea, of splitting storage into a primary area and an overflow area, suffers from now well-known defects. Balanced trees, one of the major achievements of data structure design, provide a brilliant solution to the problem of 'maintaining large ordered indexes' without degradation. They come in many variations (e.g. [3,11]) all based on the same idea: Frequent small rebalancing operations that work in logarithmic time eliminate the need for periodic reorganization of the entire file. Trees based on comparative search derive their strength from the ease of modifying list structures in central mem.ory. They have been so successful that we tend to apply and generalize them beyond their natural limitations. In addition to concerns about the suitability of comparative search trees for multikey access, discussed in the next section, these limitations include [112]: (1) The number of disk accesses grows with the height of the tree. Depending on the size of the file and the fan-out from a node, or from a page containing many nodes, the tree may well have too many levels for instantaneous retrieval. (2) Concurrency. Every node in a tree is the sole entry point to the entire subtree rooted at that node, and thus a bottleneck for concurrent processes that pass through it, even if they access different physical storage units. Early papers (e.g. [12,98]) showed that concurrent access to trees implemented as lists requires elaborate protocols to insure integrity of the data.
2.4. Transaction processing: Interactive multikey access to dynamic sets Whereas single-key access may suffice for batch processing, transaction processing, as used in reservations or banking systems, calls for multikey access (by name, date, location, etc.). The simplest ideas were tried first. Inverted files try to salvage single-key structures by ordering data according to a 'primary key', and 'inverting' the resulting file with respect to all other keys, called 'secondary'. Whereas the primary directory is compact as in ISAM, the secondary directories are voluminous: Typically, each directory has an entry for every record. Just updating the directories makes insertion and deletion time-consuming. Comparative search trees enhanced ISAM by eliminating the need for overflow chains, so it was natural to generalize them to multikey access and improve on inverted files. This is easy enough, as first shown by k-d trees [19]. But the resulting multi-key structures are neither as elegant nor as efficient as in the single-key case. The main hindrance is that no total order can be imposed on multidimensional space without destroying proximity
732
J. Nievergelt and P. Widmayer
relationships. As a consequence, the simple rebalancing operations that work for singlekey trees fail, and rebalancing algorithms must resort to more complicated and less efficient techniques, such as general dynamization [175,129]. Variations and improvements on multidimensional comparative search trees continue to appear (e.g. [103,104]). Their main virtue, acceptable worst case bounds, comes from the fact that they partition the actual data to be stored into (nearly) equal parts. The other side of this coin is that data is partitioned regardless of where in space it is located. Thus the resulting space partitions exhibit no regularity, in marked contrast to radix partitions that organize space into cells of predetermined size and location. 2.5. Knowledge representation: Associative recall in random nets There is a class of applications where data is most naturally thought of as a graph, or network, with nodes corresponding to entities and arcs to relationships among these. Library catalogs in information retrieval, hypertexts with their many links, semantic nets in artificial intelligence are examples. The characteristic access pattern is 'browsing': A probe into the net followed by a walk to adjacent nodes. Typically, a node is not accessed because of any inherent characteristic, but because it is associated with (linked to) a node currently being visited. The requirements posed by this type of problem triggered the development of list processing techniques and list processing languages. These graphs look arbitrary, and the access patterns look like random walks — neither data nor access patterns exhibit any regular structure to be exploited. The general list structures designed for these applications have not evolved much since list processing was created, at least not when compared to the other data structures discussed. The resulting lack of sophisticated data structures for processing data collections linked as arbitrary graphs reminds us that efficient algorithms and data structures are always tailored to the presence of specific properties to be exploited, in particular to a regular structure of the data space. If the latter has no regular structure to be exploited, access degrades to exhaustive search. Information retrieval is an example of an application where "random" structure cannot be avoided. Although a catalog entry in a library is a record with a regularly structured part, e.g. document = (author, title, publisher, year), search by content relies on index terms chosen from a large thesaurus of thousands of concepts, ranging from "Alchemy" to "Zen". It does not help to consider 1000 index terms, each with a range of perhaps only two values "relevant" and "irrelevant", as attributes of a multi-key data structures, which typically are designed to handle at most tens of access keys. 2.6. Spatial data management: Proximity access to objects embedded in space In typical applications that rely on spatial data, such as computer-aided design or geoinformation systems, many or all of the requirements listed so far are likely to appear: interactive transaction processing, random-looking networks of references among functionally related components, etc. In addition to such non-spatial requirements, spatial data imposes three key characteristics that sets spatial data management apart from the cases described above:
Spatial data structures
733
(1) Data represents objects embedded in some J-dimensional Euclidean space M^. (2) These objects are mostly accessed through their location in space, in response to a proximity query such as intersection with some query region, or containment therein. (3) A typical spatial object has a significantly more complex structure than a 'record' in the other applications mentioned. Although other applications share some of these characteristics to a small extent, in no other do they play a comparably important role. Let us highlight the contrast with the example of a collection of records, each with two attributes, 'social security number' (SSN) and 'year of birth'. (1) Although it may be convenient to consider such a record to be a point in a 2-d attribute space, this is not a Euclidean space; the distance between two such points, for example, or even the distance between two SSNs, is unlikely to be meaningful. (2) Partial match and orthogonal range queries are common in data processing applications, but more complex query regions are rare. In contrast, arbitrarily complex query regions are common in geometric computation (e.g. intersection of objects, or ray tracing). (3) Although a record in commercial data processing may contain a lot of data, for search purposes it is just a point. A typical spatial object, on the other hand, is a polyhedron of arbitrary complexity, and we face the additional problem of representing it using predefined primitives, such as points, edges, triangles, tetrahedra.
2.7. Concise summary of trends that shaped the development of data structures Starting from the standard data processing task of the 50s and 60s: "merge the old master tape with an update file to produce a new master", we have mentioned a few of the many requirements that gradually accumulated a great variety of data handling problems. Here is a concise summary that compares yesterday's and today's requirements: • Batch processing =^ interactive use sequential access =^ random access static file =^ dynamic file delayed result ok ^ "instantaneous" response = 0.1 sec • Simple queries =^ complex queries (e.g. access record with unique id ^ join in relational DB, proximity query in CAD) single key =^ multi-key access few query types =^ many different query types (e.g. point query ^ region query, consistency check,..) single access =^ multi-access transactions • Point objects =^ interrelated objects of arbitrary shape (e.g. [name, SSN, year] =^ assembly of mechanical parts) Whereas the generic data structure 'array' was able to meet most needs of numerical computation for decades, it soon became evident that no single type of data structure could be found to meet the increasing variety of data handling problems that arose when computer use expanded to many other applications. Since the sixties, the search for specialized
734
/. Nievergelt and P. Widmayer
structures designed to handle efficiently a specific set of requirements has never ceased, and the resulting zoo of data structures is impressive, perhaps frightening to the non-specialist. The next section develops concepts needed to detect some order in the wilderness of data structures.
3. Basic concepts and characteristics of multi-dimensional and spatial data structures Having presented a concise historical survey that introduced many ideas needed to understand data structures in general, we now narrow the conceptual framework to deal with multi-dimensional data, and spatial structures in particular. This section aims to be a user's guide to understand the zoo of data structures.
3.1. The profile of a data structure A relatively small number of concepts suffice to characterize any data structure according to its main features, to highlight similarities and contrasts with other structures that might be considered as alternatives, and to guide a programmer in his choice of data structure. These key concepts surface when answering the following questions: • What type of data is to be stored? This is answered by specifying the domain D of key values, and all operations and relations defined on D. Well-known frequent cases include: - Z) is an unordered set, such as author-defined index terms for document retrieval - single-key: D is totally ordered w.r.t. a relation " < " (e.g. integers, character strings) - multi-key: D is a Cartesian product D\ x i)2 x • • x D^ of totally ordered domains
A. When a meaningful distance is defined on D, we talk about "metric data structures". The most prominent example is Euclidean space Mi x IR2 x • * * x M^, where R denotes real numbers, or perhaps integers. • How many keys (search attributes) are involved? The dimension of the space has a great influence on the practical complexity of a multi-key data structure. Some approaches that work well in 2 dimensions, for example, do not generalize efficiently to more dimensions. One might think that "spatial data" obviously refers to 2-d and 3-J Euclidean space, but this is not necessarily so. Higher-dimensional spaces arise naturally when we describe objects to be stored in terms of parameters that characterize them. The term "multi-key access", including spatial data, commonly refers to the case where we have less than 10 keys (search attributes). • Functionality (Abstract Data Type): What operations must be supported by the data structure? The most frequently used data structures are variations of the type dynamic table or dictionary. They support primarily the operations Find, Insert, Delete, along with a host of others such as Predecessor, Successor, Min, Max, etc. Many algorithms that work on spatial data naturally use standard data structures such as stacks and queues, but there is nothing "spatial" about these.
Spatial data structures
735
How much data is to be stored, what storage media are involved? The two major categories to be distinguished are internal data structures, designed for central memory, and external ones, designed for disk. Many more designs are suitable for internal data structures than for external ones. What type of objects are to be stored, how simple or complex is their description? Points are certainly the simplest case. Complex objects are often approximated or packaged in simple containers, such as a bounding box. Is the location of these objects fixed, or are they movable or subject to other transformations? In the second case it is important to separate the description of the object from its location. What types of queries occur, what do we know about their frequency and relative importance? This involves differences such as interactive or batch processing, clustered or scattered access, exact or approximate matches, and many more. Only rarely can we characterize the query population in terms of precise statistical parameters. How complex, how efficient are access and update algorithms! The efficiency of internal data structures is often well described by their asymptotic time complexity (e.g. 0(1), O(logfz), 0{n),...), whereas that of external data structures is more meaningfully measured in terms of the (small) number of disk accesses needed. What implementation techniques are appropriate (e.g. lists, address computation)? List processing is a prime candidate for dynamic data structures in central memory, but is often less efficient for external data structures.
3.2. The central issue: Organizing the embedding space versus organizing its contents The single most important issue that distinguishes spatial data structures from more traditional structures can be summarized in the phrase "organizing the embedding space versus organizing its contents". Let us illustrate this somewhat abstract idea with examples. A record with fields such as (name, address, social security number, ...) can always be considered to be a point in some appropriate Cartesian product space. But the role and importance of this embedding space for query processing, whether its structure is exploited or not, depends greatly on the application and the nature of the data under consideration. Whereas the distance between two character strings, say your address and mine, has no practical relevance, the distance between two points in Euclidean space often carries information that is useful for efficient query processing. In addition, regions in Euclidean space admit relations such as "in front of", "contains", "intersects" that have no counterpart in non-spatial data. For this reason, the embedding space plays a much more important role for spatial data than for any other kind of data. Early data structures, developed for non-spatial data, could safely ignore the embedding space and concentrate on an efficient organization of the particular data stored at any one moment. This point of view naturally favored comparative search techniques. These organize the data depending on the relative value of these elements to each other, regardless of the absolute location in space of any individual value. Comparative search (e.g. binary search) leads to structures that are easily balanced. Thus, they answer statistical queries efficiently (e.g. median, percentiles), but not general location queries ("who is closest to a
736
J. Nievergelt and P. Widmayer
space partition
^n^^^^
-1—
Fig. 2. By balancing data, k-d trees generate irregular space partitions of great complexity.
given query point", "where are there data clusters"). Balanced trees, with their logarithmic worst-case performance for single-key data, are the most successful examples of structures that organize a specific data set. Given the success of comparative search for non-spatial data, in particular for single-key access, it is not surprising that the first approaches to spatial data were based on them. And that the crucial role of the embedding space, independently of the data to be stored, was recognized rather late. But when comparative search is extended to multi-dimensional spatial data, some shortcomings cannot be ignored. If we generalize the idea of a balanced binary search tree to 2 dimensions, as in the following example, we generate a space partition that lacks any regularity. Such a partition does not make it easy to answer the question what cells of the partition lie within a given query region. Even the idea of dynamically balancing the tree, so as to guarantee logarithmic height and access time in the presence of insertions and deletions, does not generalize efficiently from 1 to 2 dimensions. Data structures based on regular radix partitions of the space, on the other hand, organize the domain from which data values are drawn in a systematic manner. Because they support the metric defined on this space, a prerequisite for efficient query processing, we call them metric data structures. The essential structure of these space partitions is determined before the first element is ever inserted, just as inch marks on a measuring scale are independent of what is being measured. The actual data to be stored merely determines the granularity of these regular partitions. Like the "longitude-latitude" partition of the earth, they use fixed points of reference, independent of the current contents. Thus any point on earth has a unique permanent address, regardless of its relation to any cities that may or may not be drawn on a current map. The well-known quad-tree [46,80,87,144,145] illustrates the advantages of a regular partition of the embedding space, in this example a unit square. A hierarchical partition of this square into quadrants and subquadrants, down to any desired level of granularity, provides a general-purpose scheme for organizing space, a skeleton to which any kind of spatial data can be attached for systematic access. The picture below shows a quarter circle digitized on a 16 • 16 grid, and its compact representation as a 4-level quadtree. Most queries about spatial data involve the absolute position of objects in space, not just their relative position among each other. A typical query in computer graphics, such as a visibility computation by means of ray tracing, asks for the first object intercepted by a given ray of light. Computing the answer involves absolute position (location of the ray and objects) and relative order (nearest along the ray). Regular space partitions reduce search effort by providing (direct) access to any cell of the partition. Given a point with coordinates (jc, j ) , a simple formula determines the unique index of the unique cell (at any given
Spatial data
131
structures
Fig. 3. The quad tree is based on a radix 4 hierarchical space partition.
Breadth-first addressing: parent i <
> children 4 i + { 1, 2 , 3 , 4 }
6 I 5
10 I 9 — 2 —
0
1
2
3
4
5
6
7
11
03—
Fig. 4. Breadth-first traversal allocates quad tree cells contiguously in order of increasing depth.
level of granularity) that contains (x, y). Moreover, if storage is allocated contiguously as illustrated in Figure 4, the address of the disk block of each cell can also be computed merely on the basis of the coordinates (x, y). This allows for direct access to those objects that are near to any query point.
738
/. Nievergelt and P. Widmayer
N query / cells
Fig. 5. A region query selects objects that populate a grid-partitioned space.
4. The three step model of spatial object retrieval Having surveyed the main concepts the reader needs to keep in mind when exploring the space of spatial data structures, we can now compress this information into a single model that captures the essence of how most spatial data structures process the vast majority of queries. Naturally, many details remain to be filled in to define precisely how the three processing steps outlined below are implemented for any given data structure. But the point to be made is that spatial query processing is best described in terms of three steps that can be analyzed independently. Consider the embedding space shown in Figure 5. It is grid-partitioned into rectangular cells and populated by objects drawn as circles or ovals. A triangular query region q calls for the retrieval of all objects that intersect q. In this typical example, query processing first transforms the query q into the set of query cells surrounded by the dotted line; second, retrieves the two objects that intersect the query cells (without having to look at the horizontal oval); third, filters out the tall oval as a "false drop", and retains the circle as a "hit". A more general description of these three processing steps follows.
4.1. Cell addressing: query q ^ set [(i, j,...)}
of query cells
Obtain the coordinates of all cells, at any desired hierarchical level, of those cells that intersect q. This address computation step depends on characteristics of the query and of the grid, but not directly on the population of objects. The objects affect this step only to
Spatial data structures
739
the extent that they determine the current space partition. Thus a simple space partition, i.e. a grid of regular structure determined by a few parameters, is a pre-condition for fast cell addressing, and this is perhaps the data structure designer's major choice. He may have less control over the set of permissible queries, but fortunately query complexity is a lesser problem than partition complexity. Even if a complex query causes much computation, it need not cause any disk accesses, if the space partition has been properly designed so as to be completely described by a small amount of data that resides in central memory. And given that disk access is the efficiency bottleneck of spatial data structures, the time required by this first step is generally negligible.
4.2. Coarse filter: Set of query cells determines candidate objects All the objects that populate the query cells determined in step 1 are retrieved from disk, because they might respond to the query. This coarse filter is the bottleneck of spatial data access, and the core problem of data structure design. Many issues must be resolved, e.g: what is the precise definition of "an object O populates cell C?" The picture above suggests the plausible definition "O intersects C", and if so, this coarse filter retrieves the circle and the vertical oval, a hit and a false drop, whereas the horizontal oval is ignored. More sophisticated choices are possible that avoid associating an object with all of the many cells it might intersect, but each choice requires corresponding retrieval algorithms to ensure that no objects are missed. And the main issue of data structure design revolves around the association of data buckets (disk blocks) to cells, where the aim is to allocate objects that touch neighboring cells in as few buckets as possible. However this coarse filter is designed, the disk accesses it may cause are likely to require the lion's share of query processing time.
4.3. Fine filter: Compare each object to the query The objects selected by the coarse filter are mere candidates that need a final check to see whether they are hits, i.e. respond to the query, or false drops, i.e. passed the first but failed the second, crucial test: Does an object that appears to be close enough at first sight, really intersect the query? This intersection test is trivial or complex depending on the shape and complexity of query and object. But floating point operations are cheap compared to disk accesses, so this fine filter is unlikely to be the performance bottleneck. In any case, this step is squarely in the realm of computational geometry. Its implementation depends on the internal representation of the objects, i.e., on the data structure chosen to represent an object for processing in central memory. A complex object will have to be broken into its constituent parts, such as vertices, edges, and faces in the case of a polyhedron. This has little to do with the design of the external data structure — the topic of our survey — which considers an object as a volume of space, to be treated as an undivided unit whenever possible. A final comment: Everything discussed above also applies to the case where the "objects", drawn as ovals in the picture, are containers, chosen for their simple shape, that
740
/. Nievergelt and P. Widmayer
hold a more complex object. In this case the circle, which was labeled a "hit", is reduced to a mere "container hit", and the fine filter must process the object hidden inside, rather than the container. As we discuss the design choices that characterize the many spatial data structures described in subsequent sections the reader is encouraged to keep the first two query processing steps in mind: how fast is cell addressing, how is the query cell population determined, and what disk accesses are caused by the coarse filter? Such questions serve as a guide for a first assessment of any spatial data structure. Often, they suffice to eliminate from further consideration apparently plausible ideas that fail on the grounds that the first or the second step cannot be implemented efficiently.
5. A sample of data structures and their space partitions 5.1. General consideration Data structures for external storage support spatial queries to a set of geometric objects by realizing a fast but inaccurate filter: The data structure returns a set of external storage blocks that together contain the requested objects (hits) and others (false drops). Thereafter, a fine filter analyzes each object retrieved to either include or exclude it from the response. The purpose of a data structure is to associate each object with a disk block in such a way that the required operations are performed efficiently. For exact match, insert and delete operations, non-spatial data structures such as the B-tree or extendible hashing are sufficient, since a unique key can be computed from the geometric properties of each object. But whenever a query involves spatial proximity, as in range queries, a spatial data structure must take into account the shape and location of objects. Naturally, a query can be answered faster if the set of geometric objects that form the response to the query are spread over as few disk blocks as possible. This implies that for proximity queries, the objects stored in a block of an efficient data structure should be close in space. As a consequence, spatial data structures cover the data space (or a part of it) with cells and associate a storage block with each cell. For point objects, the cells partition (a part of) the space, and each point is associated with the cell in which it lies. Our illustrations and explanations of data structuring concepts always refer to 2-dimensional data, but generalization to higher dimensions is often straightforward. Our sample of spatial data structures is limited to those suitable for external storage. We prefer simple structures over sophisticated structures that use complicated lists. We exclude trees designed to support worst-case efficient algorithms in computational geometry, such as segment trees and interval trees (they are treated elsewhere in this book), including their variants for disk storage. Surveys on spatial data structures and geometric range searching that complement ours discuss these trees in more detail ([4,5,54,144]). Segment trees and interval trees, as well as hierarchies of such trees making them multidimensional, where e.g. each node of a segment tree references an interval tree, have been studied extensively in computational geometry ([135,38,81,130,143,144,169]). Based on the segment trees designed for central memory and a worst case scenario, external storage structures have been proposed ([20]). They turned out to be quite complicated, and there is no evidence yet as
Spatial data structures
1A\
to whether these external storage segment trees will perform well on average in practical situations. A new approach seems to be very promising ([9]), but practical experience is still lacking. Among the simple structures we discuss, we emphasize address computation techniques, because they are conceptually the simplest and the easiest to implement, and they often lead to the most efficient access structures for practical situations. Two dominant factors guide the partition of the embedding space into cells, namely the data (the objects) and the space. At one end of the spectrum, the partition is defined without attention to the location of the geometric objects; the amount of data alone determines the refinement of the partition. At the other end, the data completely determines the partition. Naturally, combinations of the two abound.
5.2. Space driven partitions: Multidimensional linear hashing, space filling curves The most regular partitions of the data space are those that take into account only the amount of data to be stored (measured by the number of objects, or by the number of storage blocks needed), but disregard the objects themselves and their specific properties. The num.ber of objects m_erely determines the num_ber of cells of the partition, but not their location, size or shape. The latter are inferred from a generic partition pattern for any number of regions that is parameterized with just one parameter, namely the actual number of regions desired. As a typical example, let us look at the partitions (Figure 6) induced by multidimensional variants of linear hashing [39,100], such as multidimensional order preserving linear hashing with partial expansions [90] or dynamic z~hashing [74]. Linear hashing. When viewed as a spatial data structure, linear hashing (Figure 6(a)) partitions the one-dimensional data space into intervals (one-dimensional regions) of at most two different sizes at any time, the smaller being half the larger. To the left of a separating position, all intervals are small; to the right, all intervals are large. This makes it very simple to find the interval in which a one-dimensional query point lies: Given the size of the smaller intervals and the separating position, a simple calculation returns the desired interval. With the use of an order-preserving addressing function, proximity in the 1-d data space is preserved in storage space. Dynamic modifications to the partition, induced by increasing or decreasing numbers of data points, are simple. An extra interval, for instance, is created by partitioning (splitting) the leftmost of the larger intervals into halves, distributing the data points associated so far with the split interval among the two new intervals, and adjusting the separating position. The separating position starts at the left space boundary and moves from left to right through the data space. On its move, it cuts the intervals encountered in half. After it has reached the right boundary of the data space, all intervals have been cut to the same size, thus the number of intervals has doubled (the doubling phase is complete), and the separating position is reset to the left boundary. The simplicity of the partitioning pattern of linear hashing makes it extremely simple to keep track of the actual partition: the directory consists of only two values, one for the number (or size) of large (or small) intervals at the beginning of the current doubling phase, and one for the separating position. The cost for this simplicity due to the regularity of the partition is the lack of adaptivity of the partition to the actual data points. In general, it will
742
/. Nievergelt and P. Widmayer I0l4l2l5ll
I6l3l7
(a) linear hashing
0
2
3
2
5
3
7
0
1
0
4
1
6
1
3
2
3
6
7
0
2
0
1
4
5
1
(b) MOLHPE
0
1
(c) z-hashing Fig. 6. Space-driven partitions and their development.
be necessary to provide overflow blocks for intervals, since the number of data points in an interval can be larger than the block capacity. Whenever the data points are distributed evenly over the data space, the lack of adaptivity may be tolerable; otherwise, considerable inefficiency may result. Multidimensional linear hashing. Multidimensional order preserving linear hashing versions are nothing but generalizations of linear hashing to higher dimensions. Therefore, they share the basic characteristics with linear hashing. They vary in the way the dimensions are involved in the addressing mechanism. The most direct extension of linear hashing is multidimensional order preserving linear hashing with partial expansions (MOLHPE, [90]), where the doubling phases cycle through the dimensions. Starting with one block, the first doubling leads to two blocks separated in the first dimension, the second doubling leads to two more blocks, separated from the first two in the second dimension, and so on (see Figure 6(b)). Dynamic z-hashing. Since there is some freedom in choosing the addressing function, we can even extend the scope of our considerations and ask for mappings that preserve the geometric order of the data beyond blocks. Here, we request that whenever addresses of blocks are close, their regions tend to be close in data space. This makes sense for proximity
Spatial data structures
743
queries whenever it is faster to read a number of consecutive blocks than to read the same number of blocks, spread out arbitrarily on the storage medium; it has been used for writing in [171]. Since current disks typically have much higher seek plus latency times than transfer time, they qualify as good candidates. Similar in spirit, Droge and Schek [36,37] investigate space partitioning schemes for variable size storage clusters instead of fixed size blocks. An addressing function that leads to a more global preservation of order is dynamic z-hashing ([74], see Figure 6(c)). The static version of this addressing mechanism [105,125,123,124] is long known to cartographers as Morton encoding [107]; it is the same as the quad code [144] or the locational code [1,167]. One of its nice properties is the fact that addresses can be computed easily by interleaving the bits of the coordinates, cycling through the dimensions; therefore, the technique is also known as bit interleaving. The only reason why closeness of blocks does not match closeness of cells precisely lies in the impossibility of embedding a higher dimensional partition in a one-dimensional one while preserving distances. That is, when applied to one-dimensional linear hashing, dynamic z-hashing fully preserves global order. Space-filling curves. Each of the above addressing mechanisms defines a traversal of the embedding space by visiting all cells in the order of their addresses, a so-called spacefilling curve. A number of space-filling curves other than the ones above have been proposed, with the goal of maintaining proximity in space also in the one-dimensional embedding the curve defines. Since the data structure based on a space-filling curve must adapt the partition pattern dynamically, space-filling curves usually have recursive definitions. Figure 7 shows two building blocks ((a) and (c)) and the three best-known space-filling curves based on them — bit interleaving (b), the Gray code (d) [42,43], and Hilbert's curve (e) [44,83]. Experiments comparing the efficiencies of data structures based on these curves [2,83, 168] seem to indicate that for certain sets of geometric objects and sets of queries, bit interleaving and Hilbert's curve outperform the Gray code curve significantly, with Hilbert beating bit interleaving in many cases. On the other hand, an analysis of the expected behavior of space filling curves [115], where all possible different queries are equally likely, indicates that all space filling curves are equally efficient, if disk seek operations are counted. This illustrates that there is a bias in the distribution of query ranges in the experiments: Queries are not chosen at random, but instead are taken to be in some sense typical of a class of applications. It is certainly useful to evaluate data structures with respect to particular query distributions; it is unfortunate that the distributions are not discussed explicitely. In contrast to the average case, the worst case for hierarchical space filling curves clearly depends on the curve [10]. In spite of the interesting properties of dynamic z-hashing and other proximity preserving mappings of partitions in multidimensional space to one dimension, we feel that the importance of the corresponding data structures is limited to uniformly distributed data, due to the lack of adaptivity of the partition.
744
/ Nievergelt and P. Widmayer
5
N 7]
i s K isl 1
\J
\
1
3
Lk Cr^^^ r^^^ N
1
2
[o
\o
3
6
1
0
2
6 1
b_
\
\ \ 1ll 1 \
2
8
3
\1
10_.
(c)
(b)
(a)
7
\ 1 2 ^ 14
4/1
7 5
11|I 8
15
12
11
10
10
9
14
13
8
9
13
14
1
Y
7
6
\\2
15
0
3
4
L-
V
A 1 \rr \
3
(d)
(e)
Fig. 7. Traditional one-dimensional embeddings.
5.3. Data driven partitions: k-d-B-tree, hB-tree The most adaptive partitions of all are those defined by the set of data points. Since the partition tends to be less regular, a mechanism to keep track of the partition is needed. A natural choice for such a mechanism is a hierarchy, and hence multidimensional generalizations of one-dimensional tree structures have been proposed for that purpose. Prime examples are the /:-d-B-tree [138], a B-tree version [11,30] of the /:-d-tree [19], and a modified version of it, the hB-tree [103,104]. The k-d-B-tree. A /:-d-B-tree partition is created from one region for the entire data space by recursive splits of regions (see Figure 8(a)). The splits follow the /:-d-tree structure in that they cycle through the dimensions of the data space, but do so within each node of the tree. The leaves of the tree are all on the same level, just as in B-trees, and maintain the cells of the partition. Interior nodes maintain unions of cells to direct the search through the tree. Thus, the tree is leaf-oriented and serves as a directory. Whenever a data block overflows, due to an insert operation, its region is split so as to balance the number of data points in both subregions, and the change propagates towards the root. This may necessitate a split of a directory block region, not a simple operation in
Spatial data
745
structures
A
B C
B C1
D
E
D
F
C2 E1
E2
F
IB_ C BA
CA
CA
CC
_QD_
DA
DB 1 IEA ED
FR FC EE
EC EE
BB
DC DD
IFA DE
n
FB
FC F D
|FC IF D
D (b) Fig. 8. Data-driven partitions: (a) The /:-d-B-tree, and (b) a split in EA forcing a split in C.
a ^-d-B-tree. The reason is that in order to balance the load between both directory block subregions, a split position may be chosen that cuts through a region of some child (or even several children), thereby forcing the split to propagate downwards in the tree as well. Figure 8(b) shows an example of a forced split for the /c-d-B-tree sketch in Figure 8(a). For a block capacity of five entries, a split of region EA into EAl and EA2 makes block E overfull. E splits into El and E2 in the most balanced way, and this makes block A overfull. Splitting A in a balanced way implies cutting region C into CI and C2. The split through C affects the subregions CB and CD of C, i.e., the split process propagates down the tree. Since the decision for the most balanced split position is made locally for a node, the forced downward split may become quite a costly operation, both in terms of runtime and of the resulting storage space utilization. As a result, no lower bound on the storage space utilization can be given for ^-d-B-trees, in contrast to the 50% guarantee for B-trees. The hB-tree. A closer look reveals that in degenerate cases, a balanced split may be impossible in the ^-d-B-tree (see Figure 9). To remedy that situation, a variant of the k-dB-tree has been proposed, the hB-tree [103,104]. It has the interesting property that the regions that form the partition of the data space are not restricted to multidimensional rect-
/ Nievergelt and P. Widmayer
746
^4^ A
ys y2
F C
yi
B
X4
• • D
(a)
H
G
:
• • • ys * • * * * * • • • •
(b)
E "1
E
1
D
X2 X3 "4
(c)
(d)
Fig. 9. Data-driven partitions: The hB-tree.
angles. Instead, subregions can be removed from a region (see Figure 9), leaving a "holey brick". With this freedom, balanced splits are possible in degenerate situations in which a single split line fails. The hB-tree keeps track of holey brick regions by allowing directory entries to refer to the same block; that is, a holey brick region is represented in the rooted DAG directory by the union of a set of rectangular regions. Of course, holey bricks may occur on each level of the rooted DAG; changes propagate upwards, just as in B-trees. As an example. Figure 9(c) shows the rooted k-d-DAG local to a directory block to be split with regions shown in Figure 9(d), and Figure 9(b) shows the part of the rooted DAG that propagates upwards when the block is split as shown in Figure 9(a). Although data-driven partitions turn out to be quite complicated to maintain, they are able to cope with skew data reasonably well, while space-driven partitions fail here. For extremely skew data or whenever worst-case guarantees are more important than average behavior, data-driven partitions may be the method of choice. Due to the freedom in splitting regions, they certainly do have a great inherent flexibility that allows them to be tuned to various situations easily. For instance, the local split decision (LSD-) tree is designed to make good use of a large available main memory, while resorting to external storage as necessary [71,72,69]. Except for such situations, the adaptivity of data-driven partitions will rarely compensate for the burden of their complexity and fragility. More often, combinations of space-driven and data-driven partitions will be appropriate.
5,4. Combinations of space-driven and data driven-partitions: EXCELL, grid file, hierarchical grid files, BANG file In their simplest form, these partitions follow the generic pattern of space-driven partitions, with different levels of refinement across the data space, determined by the location of the geometric objects. A typical example of a one-dimensional data structure of this type is extendible hashing [41], where the data space is partitioned by recursively halving exactly those subspaces that contain too many data points. EXCELL and the grid file. A direct generalization of extendible hashing to higher dimension, EXCELL [163,164] appHes the one-dimensional strategy of extendible hashing
Spatial data
lAl
structures
A
A
B
B
A
A
B
C
D
E
E
C
D
E
(a)
(b)
Fig. 10. EXCELL and grid file partitions: Cells with data block addresses.
to each dimension, again running cyclically through the dimensions (see Figure 10(a)). Since an extra directory is available for each dimension, plus a directory for the multidimensional product of the one-dimensional directories, and the number of blocks that can be addressed is therefore the product of the sizes of all one-dimensional directories, the sum of the sizes of the one-dimensional directories tends to be quite small in all realistic cases. This observation is used in the grid file [112,113] to keep the directories for all single dimensions — the so-called scales — in main memory; as a result, no duplication of a directory is necessary due to a data block split, but instead a mere addition of a (multidimensional) directory entry will suffice (see Figure 10(b)). Nevertheless, the grid file inherits from extendible hashing the superlinear growth of its directory [137,166]. A search operation in the grid file can always be carried out with just two external memory accesses, the first one to the directory, based on the information from the scales, and the second one to the data block referenced in the directory block. Similarly, a range query can be answered by first searching for a comer point of the query range, and then propagating to adjacent blocks as indicated by the directory. Since this entails a range query on the directory, one might organize the directory itself as a grid file. Hierarchical grid files. This approach has been pursued in hierarchical grid files (Figure 11) with two [73] or more directory levels [97]. The interior of each directory block is organized as a grid file directory; changes in the tree structure, due to block split or merge operations, propagate along the search path in the tree. Data structures of this type are often called hash trees. A particularly efficient example of such a structure is the buddy tree [152, 154]. It applies a specific merge strategy, and it distinguishes the standard block regions, using them for insertions, from the block regions used for all search operations: The latter are the bounding boxes of the objects stored in the corresponding subtree. While the non-hierarchical grid file inherits the property of a superlinearly growing directory from extendible hashing, hash trees grow linearly, just like trees in general. This does not imply that hash trees are always the better choice in practice: It is true for many data structures that better asymptotic efficiency may come at the cost of higher conceptual complexity and therefore lead to poorer performance in practical applications.
748
/. Nievergelt and P. Widmayer
A
B
A
C
(a)
D
C
A E
F
E
G
B D H H k
E
E
H HK
1 J
E
E
1 J K
L
F
G
L L L
(b)
(c)
Fig. 11. Two-level (a), (b) against one-level grid file partition (c).
The BANG file. The balanced and nested grid file (BANG file, Freeston [49]) is a particulariy interesting attempt at balancing the load in a regular partition pattern. It operates on a regular grid in such a way as to guarantee linear growth of the directory. Unlike the grid file, the BANG file spHts a cell such that the numbers of objects in the two resulting subspaces differ as Httle as possible. One of the two subspaces is defined by recursively halving the cell until the number of objects in the subspace is as close as possible to half the number of objects in the cell. This is achieved by repeatedly cutting the subspace that contains more than half of all objects of the cell, until a subspace S is reached for which both halves Si and ^2 contain at most half that number. Then, we select as the subspace resulting from the spht either 5, S\, or ^2, whichever contains closest to half the number of objects. The remaining part of the cell defines the other subspace. Clearly, that other subspace will in general not be convex: It is a rectangle with one or more rectangular pieces removed. For an example, see Figure 12(a), where point numbers indicate the insertion order. As a consequence, the BANG file tends to use fewer cells than the grid file (compare Figures 12(a) and (c)), but these cells have a more complex shape. Nevertheless, it is not a problem to maintain these cells: We simply maintain the rectangular cells without keeping track of their rectangular missing pieces (the holes), and we associate a point with the smallest of all cells containing it (Figure 12(b)). In this way, the association of a point with a cell is unique, and reflects the partition of space, even though cells viewed without holes overlap. In addition, these cells can be stored in a highly compressed form: Since they are created by recursive halving that cycles through all dimensions, each cell can be stored as a pair of indices: The first index indicates the number of recursive cuts, and the second index is the relative number in some numbering scheme, for instance that of MOLHPE (Figure 12(b)). Not surprisingly, the BANG file directory is organized as a tree, following the BANG file strategy recursively. This results in the necessity to propagate splits not only upwards in the hierarchy, but also downwards — the forced split phenomenon shared by quite a few hierarchical spatial access structures. There is a large number of data structures whose partition is driven by a combination of space and data considerations, with quad tree based structures [46,144,145] being the most prominent ones among them. Others are variants of grid file or hash tree structures [92,
Spatial data
^m
• •
10 13 12* i f 3
6
• \'
749
5, 1
0,0
31 4, 3
7,
•
m 4
5
m
structures
1 3,0
R ul 21
1 3,7
*2 •
(a)
(b)
(c)
Fig. 12. A BANG file partition (a), its maintenance (b), and a grid file partition (c) for capacity 3.
126-128,131] or adaptive hashing schemes [91,94]. Some of them aim in particular at high storage space utilization [75-77], apart from the efficiency of range queries.
5.5. Redundant data storage So far we have presented data structures that store every data element (point) exactly once. This natural approach is universally followed in practice, because data redundancy complicates updating and therefore is used only to enhance reliability (e.g. back-up procedures), but is not part of the access structure. From a theoretical point of view, however, one can ask whether replicating some part of the data might speed up retrieval. This turns out to be true in particular for static files. Chazelle [28] proves the following lower bound for a pointer machine that executes static 2-d range searches: A query time of 0(^ -f- log'^ n), where t is the number of points reported and c is some constant, can only be achieved at the expense of ^ {n log w/ log log n) storage. Data structures that use data redundancy to improve access time for range searching include the P-range tree [162], a combination of the priority search tree and a 2-d range tree.
6. Spatial data structures for extended objects So far we have considered the simplest of spatial objects only, points, for the good reason that any spatial data structure must be able to handle point data efficiently. Most applications, however, deal with complex spatial objects. And although complex objects are composed of simpler building blocks, we encounter a multitude of the latter: line segments, poly-lines, triangles, aligned rectangles, simple polygons, circles and ovals, and the multi-dimensional generalizations of all these. The way a spatial data structure supports extended (non-point) objects of various kinds determines whether it is generally applicable. For extended objects, each of which may intersect a number of cells, the association of an object with a cell is not as immediate as it is for points. In this case, cells usually overlap, and an object is associated most often either with a cell that contains it, or with
750
/ Nievergelt and P. Widmayer
all cells it intersects. But there are also other possibilities. Therefore, while we distinguish data structures for points merely according to the type of cells they define, we characterize data structures for extended objects also according to the way they associate objects with regions. We consider the case where objects to be stored are relatively simple, in the sense that they have a concise description, and computations are easy and efficient. This restriction is realistic because complex objects are often approximated or bounded by a simple container, such as a bounding box, the smallest aligned (axis-parallel) multidimensional rectangle that contains the object. Such a container serves as a conservative filter for spatial proximity queries. In a range query, for instance, an object intersects the query range only if its bounding box intersects the query range; similarly, a query point can be contained in an object only if it is contained in its bounding box. Most data structures that support extended objects limit themselves to aligned rectangles (bounding boxes); exceptions include [26, 57-59,62,63,82,170]. Even in this restricted case, it is by no means clear how to associate a rectangle with a region in space, because a rectangle may intersect more than one of these regions. There are essentially three different extremal solutions to this problem, and a fourth one as a combination of two extremes.
6.1. Parameter space transformations Since points can be maintained in any of the ways described in the previous section, there is the obvious possibility to store simple objects as points in some parameter space. Simple mappings have been proposed that transform a J-dimensional rectangle into a 2-ddimensional point [69,73,152]. The comer transformation simply takes the 2-d rectangle boundary coordinates and interprets them as the coordinates of a point in 2-d space (see Figure 13 a for d = 1). The center transformation separates parameters for the position of the rectangle in space from parameters for the size of the rectangle: the former are the d coordinates of the rectangle center, and the latter are the extensions of the rectangles in the d dimensions — divided by two, resulting in a more evenly populated data space (see Figure 13(b)). But then, fairly small query ranges (that seem to be common in practice) may map to queries with fairly large query regions (see Figure 13(c) and (d)), and the distribution of points, the data space partition and the shape of the query region seem not to work well together. For the special case in which range queries are the only type of proximity queries, good transformations have actually been found [133]. These transformations use parameters such as volume and aspect ratio, and they turn out to cluster rectangles in a way that is quite appropriate for many point data structures, especially in combination with highly adaptive space partitions such as the LSD-tree [72,69]. Nevertheless, we feel that a transformation cannot be general enough to preserve the geometry of the situation entirely, and as a consequence, will not be able to support all kinds of locational queries well. In the remainder of this section, we will therefore look more closely at ways to store rectangles in the given space.
Spatial data
751
structures (r-l)/2
(r-l)/2
(r+l)/2
(r+l)/2
(c)
(d)
Fig. 13. Corner transformation (a) and center transformation (b) for intervals and for query regions (c), (d).
6.2. Clipping The problem in associating a rectangle with a region in a partition is the fact that a rectangle can intersect more than one region. For the technique of answering a range query by returning all those data blocks whose regions intersect the query range, there is no other choice but to associate each rectangle with all regions in the partition that it intersects. This method is called clipping. It can be applied to any point data structure. For specific cases, in particular for clipping edges in computer graphics, explicit suggestions can be found in the literature [108,146,163,173]. Clipping can lead to reasonable performance in cases where the geometric object behind the bounding box can be cut at region boundaries, such as those cartographic applications in which objects are polygons with lots of corners [148, 172]. In these cases, the clipping technique has the advantage over many others to be conceptually simple and to preserve the geometry of the situation for any proximity query. Clipping turns out not to lead to good performance for rectangles [158], though, and it can become very bad in the worst case, with a linear proportion of all rectangles even on the best possible cut line [32,33,110,34].
6.3. Regions with unbounded overlap: R-tree Storing a reference point. In another straightforward way of using point data structures for storing objects, a reference point is chosen for each object — typically its center (of gravity) —, and the object is associated with the block in whose region its reference point lies. This works only if we keep track of the extensions of the objects beyond the region boundaries. In a range query, the cell to be considered for a block is not the cell defined by the partition of the data space, but instead the bounding box of all objects actually associated with the block. The latter may in general be larger than the former, and not all data structures will easily accommodate that extended region information. Hierarchical structures such as ^-d-trees [120,121] or the BANG file [51] as well as some others [153, 152] can be used for that purpose. Even though this approach works well whenever only small objects are to be stored, it is inefficient in general, because no attempt is made to avoid the overlap of search regions, and therefore geometric selectivity is lost easily.
J. Nievergelt and P. Widmayer
752 B
root
A Level 0 (root)
C
D
E
F
G
H
I
J
TTI
M
G
J
Level 1
Fig. 14. Cells of an R-tree.
The R-tree family. With the expHcit goal of high geometric selectivity, the R-tree [67] has been designed to maintain block cells that overlap just as much as necessary, so as to make each rectangle fall entirely within a cell. Its structure resembles the B+-tree, including restructuring operations that propagate from the leaf level towards the root. Each data cell is the bounding box of the rectangles associated with the corresponding block. Each directory block maintains a rectangular subspace of the data space; its block cell is the bounding box of the subspaces of its children. As a consequence, on each level of the tree, each stored rectangle lies entirely in at least one block cell; since block cells will overlap in general, it may actually lie in more than one cell (in Figure 14, rectangles E and F lie in cells A and B, referenced by the root block). This fact may distort geometric selectivity: In an exact match query, we cannot restrict the search for E to either A or B, but instead we need to follow both paths (in the worst case, with no hint as to which one is more likely). Since it is essential for the R-tree to avoid excessive overlap of cells, many strategies of splitting an overflowing block into two exist, ranging from the initial suggestion [67] to less or more sophisticated heuristics [18,56] and even to optimal splits for a number of criteria [15,159]. With the appropriate splitting strategy and extra restructuring operations [18], the R-tree seems to be one of the most efficient access structures for rectangles to date. For specific purposes, a number of variants of the R-tree have been proposed. The R+-tree avoids overlapping directory cells by clipping rectangles as necessary [45,155]. It suffers, however, somewhat from the inefficiency caused by forced splits propagating downwards, similar to /:-d-B-trees. For a static situation, in which almost no insertions or deletions take place, and therefore queries dominate the picture, the R-tree can be packed densely so as to increase efficiency in time and space [141]. Ohsawa and Sakanchi [119] combine the R-tree and quad tree cells.
Spatial data
D D
1
iF
-^ r 5o DhJ D 1
Layer 1
753
structures
1
izz§:
PU
Layer 2
1
p p° Layer 3
Fig. 15. Cells of a three-layer grid file.
6.4. C^//^" w/Y/z bounded overlap: multilayer structures, R-file, guard file Geometric selectivity increases witli decreasing cell overlap. This has been the starting point for a number of attempts to maintain rectangles with cells whose overlap is under tight control. The multilayer technique. The basic idea is to cover the data space with more than one partition. Each level of a hierarchical data structure, in which the cells of a node's children are a partition of the cell of their parent, partitions the data space or a subspace. Therefore, such a hierarchy naturally offers a set of partitions with various degrees of refinement. Even though this set of partitions has not been defined with the explicit goal of covering space several times, it can be used nicely to store rectangles: Each rectangle is stored at the node as far down as possible in the hierarchy whose cell encloses the rectangle. This principle has been used in the quad-CIF tree and the MX-CIF quad tree [1,85]. With the explicit goal of creating a few partitions according to the set of rectangles, Six and Widmayer [158] maintain each partition — called layer — in an extra data structure. Care has to be taken to ensure that the partitions of the different layers are actually different (Figure 15); otherwise, the number of partitions increases more than necessary, and in general efficiency deteriorates. A fairly large number of split strategies that guarantees the partitions to be quite different have been developed. It can be guaranteed that for storing a set of small d-dimensional rectangles, d -\-\ layers will always suffice — the technical term "small" there has a precise meaning [158]. Large rectangles must be clipped; whenever there are few of them, such as in most cartographic applications, clipping will not be harmful. In a multilayer data structure that uses a point data structure with a modified split strategy for each layer, the layers are totally ordered, from lowest to highest. A rectangle is associated with the lowest layer that has a cell of the partition containing it entirely; in that layer, the rectangle is associated with that cell, just like a point in the underlying point data structure. If there is no such layer, either a new layer is created, or the rectangle is clipped at the boundaries of the highest layer. Note that the multilayer technique is generic in the sense that it allows any one of a number of point data structures to be used for the layers. Experiments with a multilayer grid file, for instance, show that the loss of efficiency as compared with a standard (single layer)
754
J. Nievergelt and P. Widmayer
D (a)
(b)
D
BI (c)
Fig. 16. R-file cells for insertion (a) and for searching (b), and grid file cells with clipping (c).
grid file for points is tolerable, with a certain, but small, query overhead due to the fact that a directory for each layer needs to be inspected. Experiments with multilayer dynamic zhashing [79] show that the attempt to preserve global order makes range queries extremely fast, far better than any other data structure, for data and queries from cartography. In addition, the multilayer technique realizes the advantages of recursive linear hashing [136] over linear hashing without the overhead, because there are several (recursive) layers anyway. The R-file. Since the search parameters are the same for each layer of a multilayer structure (e.g. in a range query), it might be desirable to integrate all the directories into one directory. This is exactly what the R-file [78] does: It maintains a set of overlapping cells with one directory. The cells are exactly of the same form as the rectangular regions in the BANG file, with no rectangles cut out for subspaces. Similar to the quad-CIF tree, each object is associated with the smallest cell that contains it (Figure 16). Therefore, unlike in the BANG file, where cells are disjoint rectilinear polygons with holes, in the R-file cells overlap. There is a limit to the association of rectangles to cells in this way: If too many rectangles intersect the split line of a cell in which they lie, they cannot be distributed to other cells. In that case, a lower dimensional R-file stores these rectangles; the one dimension in which all of these rectangles intersect the split line can be disregarded. Fortunately, no extra data structure is needed for the (d — 1)-dimensional R-file; instead, a simple skip of the corresponding dimension in the cyclic turn through all dimensions will do. Experiments have shown the R-file to be a very efficient data structure for cartographic data. It suffers, however, from the disadvantage of being somewhat complicated to implement, with extra algorithmic difficulties (but not inefficiencies) such as a forced split downwards. Nevertheless, it is a good basis for a data structure that supports queries with a requested degree of detail, all within a query range [14]. The guard file. The guard file [ 114] is designed for fat objects, where fatness requires that the shape of an object is sufficiently close to a sphere, in a precise, technical sense. The difficulties in maintaining arbitrary spatially extended objects, as opposed to points, comes from the fact that an object may intersect more than one cell of a space partition, that is, it may intersect split lines. For fat objects, the idea is to place guard points (not lines) in
Spatial data f
11
•-
structures
755
=i
nU
R
1 1
V
i
1-
—i
Fig. 17. A radix tree partition with guards at comer points.
Strategic positions, and then to distinguish objects according to the guards they contain. Guards are the comers of the cells of some regular space partition. Figure 17 shows a radix tree partition, but other partitions such as triangular or hexagonal ones work just as well. By imposing the radix tree as a hierarchy on the guards, range queries become efficient: The level of a guard is the level of the largest cell of which the guard is a comer point, with the root of the tree having the highest level. Any sufficiently large, fat object must contain a guard. An object containing a guard (a guarded object) is stored with the highest level guard that it contains. A fat object that contains no guard (an unguarded object) must be small; it is stored with all intersecting cells of the partition at the leaf level of the radix tree. As a consequence, a range query is carried out by inspecting the objects associated with all guards in the query range and all cells intersecting the query range. For long and skinny objects, clipping makes this data stmcture inefficient, but for fat objects such as those often encountered in cartography, clipping is no problem. The guard file, however, includes an additional step to trade storage space for query time: An unguarded object is associated with exactly one cell of the partition, namely the one into which its center (of gravity) falls. Hence, each object is stored only a small, constant number of times, the number depending only on the type of regular partition being used and the precise fatness requirement. In a range query, it is no longer sufficient to inspect the cells that intersect the query range: Adjacent cells also need to be inspected. The neighborhood of adjacent cells by which a query range must be extended depends entirely on how fat the stored objects are: the fatter the objects, the smaller this neighborhood. For various types of regular partitions and various bounds on the fatness (in a precise, technical sense for arbitrary, convex geometric objects), the guard file is easy to implement and efficient at the same time.
6.5. Conclusions drawn from the structures surveyed The set of spatial data structures and paradigms has grown to a respectable size. A multitude of concepts serve as building blocks in the design of new spatial data structures for specific purposes. A number of convincing suggestions indicate that, for instance, these building blocks can be used in the design of data stmctures for more complex set-
756
/. Nievergelt and P. Widmayer
tings. Becker [17], Brinkhoff et al. [24], Gunther [60], Kriegel et al. [95], and Shaffer and Samet [156], among others, show how various kinds of set operations, such as spatial join, can be performed efficiently by using a spatial index. For objects and operations going beyond geometry, Ohler [116] shows how to design access structures that involve non-geometric attributes in a query. In a closer look to the needs of cartography, a data structure of weighted geometric objects is proposed that efficiently supports queries with a varying degree of detail, as specified by the user [14]. For the special case in which the objects to be stored are the polygons of a planar partition, and access to entire polygons (in containment queries with points, for instance) as well as access to the polygon boundaries (for drawing a map) is needed, there are suggestions that consider both external accesses and main memory computations as important cost factors [96,150]; other suggestions aim at making queries efficient without storing polygon boundaries twice [13]. In addition, hierarchical spatial access structures can be designed to support queries into the past [16, 27,176]. It can be seen from this list that even though a fair number of concepts of data access are readily available, it is most often a considerable effort to bring any two of them together without losing key features, especially efficiency. All the arguments above concerning the efficiency of data structures are of an intuitive nature. An average case analysis is rarely given ([7,35,47,99,109,137,140] are notable exceptions), because a probability model for sets of geometric objects and queries is very hard to get [6,68,106,147,161]. Even experiments [93,157,160] that clarify some of the efficiency aspects tend to reveal not too much about the contribution of the building blocks of data structures to their overall efficiency. Some steps towards a clarification of what is the desired average case efficiency and how to achieve it, with consequences for the data structure design, have been taken [70,134,159,7,132], but many more are needed to shed enough light on the inner workings of spatial data structures. In the meantime, the designer and programmer of spatial data structures should be aware of the existing building blocks and use them with expertise and intuition, bringing them together wherever possible.
7. Summary: Points to consider when choosing a spatial data structure Let us conclude this bird's eye survey of the domain of spatial data structures with a few concisely stated points of view and recommendations. Spatial data differs from all other types of data in important respects. Objects are embedded in a Euclidean space with its rich geometric structure, and most queries involve proximity rather than intrinsic properties of the objects to be retrieved. Thus data structures developed for conventional data base systems are unlikely to be efficient. The most important feature of a spatial data structure is a systematic, regular organization of the embedding space. This serves as a skeleton that lets one address regions of space in terms of invariant quantities, rather than merely in relation to transient objects that happen to be stored. In particular, radix partitions of the space are more widely useful than data-driven space partitions based on comparative search. The vast literature on spatial data describes a multitude of structures that differ only in technical details. Theory has not progressed to the stage where it can rank them in terms of efficiency. Performance comparisons representative of a wide range of applications and
Spatial data structures
757
data are difficult to design, and reported results to this effect are often biased. Thus we are left to choose on the basis of common sense and conceptual simplicity. Whereas the choice of a spatial data structure does not require a lot of detailed technical know-how, programming the computational geometry routines that implement the fine filter of Section 4.3 is a different matter. Writing robust and efficient procedures that intersect arbitrary polyhedra (say a query region and an object) is a specialist's task that requires a different set of skills. In conclusion, this survey is neither a "how-to" recipe book that describes the multitude of data structures, nor a sales pitch for any one in particular. It intends to be a thoughtprovoking display of the issues to ponder and to assess. Our message places responsibility for a competent choice where it belongs, with the programmer.
Acknowledgements We are grateful to Martin Breunig, Thomas Ohler, Hanan Samet, Bemhard Seeger, Matti Tikkanen and an unknown referee for comments on this survey and interesting discussions.
References [1] D.J. Abel and J.L. Smith, A data structure and algorithm based on a linear key for a rectangle retrieval problem. Computer Vision, Graphics, and Image Process. 24 (1983), 1-13. [2] D.J. Abel and D.M. Mark, A comparative analysis of some two-dimensional orderings, Intemat. J. Geogr. Inform. Systems 4 (1) (1990), 21-31. [3] G.M. Adelson-Velskii and Y.M. Landis, An algorithm for the organization of information, Dokl. Akad. Nauk SSSR 146 (1962), 263-266. Enghsh translation in Soviet Math. 3, 1259-1263. [4] P.K. Agarwal, Range searching. Handbook of Discrete and Computational Geometry, J.E. Goodman and J. O'Rourke, eds, CRC-Press (1997), 575-598. [5] P.K. Agarwal and J. Erickson, Geometric range searching and its relatives, to appear in Discrete Comput. Geom.: Ten Years Later, B. Chazelle, J. Goodman and R. Pollack, eds, Amer. Math. Soc, Providence, RI (1997). [6] R.V. Ambartzumjan, J. Mecke and D. Stoyan, Geometrische Wahrscheinlichkeiten und Stochastische Geometric, Akademie Verlag, Berlin (1993). [7] C.-H. Ang and H. Samet, Average storage utilization of a bucket method. Technical Report, University of Maryland (1992). [8] W.G. Aref and H. Samet, The spatial filter revisited, Proc. 6th Int. Symp. on Spatial Data Handling (1994), 190-208. [9] L. Arge, Efficient external-memory data structures and applications, PhD thesis. University of Aarhus, Denmark (1996). [10] T. Asano, D. Ranjan, T. Roos, P. Widmayer and E. Welzl, Space filling curves and their use in the design of geometric data structures, Proc. Second Intern. Symp. of Latin American Theoretical Informatics LATIN '95, Valparaiso, Lecture Notes in Comput. Sci. 911, Springer-Verlag (1995), 3 6 ^ 8 . [11] R. Bayer and C. McCreight, Organization and maintenance of large ordered indexes. Acta Informatica 1 (3) (1972), 173-189. [12] R. Bayer and M. Schkolnick, Concurrency of operations on B-trees, Acta Informatica 1 (1977), 1-21. [13] B. Becker, Methoden und Strukturen zur efftzienten Verwaltung geometrischer Objekte in GeoInformationssystemen, Dissertation, Mathematische Fakultat, Albert-Ludwigs-Universitat, Freiburg, Germany (1993).
758
J. Nievergelt and P. Widmayer
[14] B. Becker, H.-W. Six and P. Widmayer, Spatial priority search: An access technique for scaleless maps, Proc. ACM SIGMOD International Conference on the Management of Data, Denver (1991), 128-137. [15] B. Becker, P. Franciosa, S. Gschwind, T. Ohler, G. Thiemt and P. Widmayer, Enclosing many boxes by an optimal pair of boxes, Proc. 9th Annual Symposium on Theoretical Aspects of Computer Science STAGS, Cachan, Lecture Notes in Comput. Sci. 577 (1992), 475^86. [16] B. Becker, S. Gschwind, T. Ohler, B. Seeger and P. Widmayer, On optimal multiversion access structures, 3rd International Symposium on Advances in Spatial Databases, Singapore, Lecture Notes in Comput. Sci. 692, Springer-Verlag (1993), 123-141. [17] L. Becker, A new algorithm and a cost model for join processing with grid files. Dissertation, Fachbereich Elektrotechnik und Informatik, Universitat-Gesamthochschule Siegen, Germany (1992). [18] N. Beckmann, H.-P. Kriegel, R. Schneider and B. Seeger, The R'^-tree: An efficient and robust access method for points and rectangles, Proc. ACM SIGMOD International Conference on the Management of Data, Atlantic City, New Jersey (1990), 322-331. [19] J.L. Bentley, Multidimensional binary search used for associative searching, Comm. ACM 18 (9) (1975), 509-517. [20] G. Blankenagel, Intervall-Indexstrukturen und externe Algorithmen fiir Nicht-StandardDatenbanksysteme, Dissertation, FemUniversitat Hagen (1991). [21] T. Brinkhoff, H.-P. Kriegel and B. Seeger, Efficient processing of spatial joins using R-trees, Proc. ACM SIGMOD International Conference on the Management of Data, Washington D.C. (1993), 237-246. [22] T. Brinkhoff, Der Spatial Join in Geo-Datenbanksystemen, PhD thesis, Ludwig-Maximilians-Universitat Munchen (1994). [23] T. Brinkhoff and H.-P. Kriegel, The impact of global clustering on spatial database systems, Proc. 20th Int. Conf. on Very Large Data Bases (1994), 168-179. [24] T. Brinkhoff, H.-P. Kriegel and R. Schneider, Comparison of approximations of complex objects used for approximation-based query processing in spatial database systems, Proc. 9th IEEE Int. Conf. on Data Eng. (1993), 40-49. [25] T. Brinkhoff, H.-P. Kriegel, R. Schneider and B. Seeger, Multi-step processing of spatial joins, Proc. ACM SIGMOD Int. Conf. on Management of Data (1994), 197-208. [26] E. Bruzzone, L. De Floriani and M. Pellegrini, A hierarchical spatial index for cell complexes, 3rd International Symposium on Advances in Spatial Databases, Singapore, Lecture Notes in Comput. Sci. 692, Springer-Verlag (1993), 105-122. [27] M.E. Charlton, S. Openshaw and C. Wymer, Some experiments with an adaptive data structure in the analysis of space-time data, Proc. 4th International Symposium on Spatial Data Handling, Zurich (1990), 1030-1039. [28] B. Chazelle, Lower bounds for orthogonal range searching: I. The reporting case, J. ACM 37 (2) (1990), 200-212. [29] L. Chen, R. Drach, M. Keating, S. Louis, D. Rotem and A. Shoshani, Access to multidimensional datasets on tertiary storage systems. Inform. Systems 20 (2) (1995), 155-183. [30] D. Comer, The ubiquitous B-tree, ACM Comput. Surveys 11 (2) (1979), 121-138. [31] I.K. Grain, Extremely large spatial information systems: A quantitative perspective, Proc. 4th International Symposium on Spatial Data Handling, Zurich (1990), 632-641. [32] F. d'Amore and PG. Franciosa, Separating sets of hyperrectangles. Intern. J. Comput. Geom. Appl. 3 (2) (1993), 155-165. [33] F. d'Amore, T Roos and P. Widmayer, An optimal algorithm for computing a best cut of a set of hyperrectangles. Intern. Computer Graphics Conference, Bombay (1993). [34] F. d'Amore, V.H. Nguyen, T. Roos and P. Widmayer, On optimal cuts of hyperrectangles. Computing 55, Springer-Verlag (1995), 191-206. [35] L. Devroye, Lecture Notes on Bucket Algorithms, Birkhauser Verlag, Boston (1986). [36] G. Droge and H.-J. Schek, Query-adaptive data space partitioning using variable-size storage clusters, 3rd International Symposium on Advances in Spatial Databases, Singapore, Lecture Notes in Comput. Sci. 692, Springer-Verlag (1993), 337-356. [37] G. Droge, Eine anfrage-adaptive Partitionierungsstrategie fur Raumzugriffsmethoden in GeoDatenbanken, Dissertation ETH Zurich (11172) (1995).
Spatial data structures
759
[38] H. Edelsbrunner, Intersection problems in computational geometry. Dissertation, Technische Universitat Graz (1982). [39] R.J. Enbody and H.C. Du, Dynamic hashing schemes, ACM Comput. Surveys 20 (2) (1988), 85-113. [40] G. Evangelidis, The hB-tree: A concurrent and recoverable multi-attribute index structure, PhD thesis. Northeastern University, Boston, MA (1994). [41] R. Fagin, J. Nievergelt, N. Pippenger and H.R. Strong, Extendible hashing — a fast access method for dynamic files, ACM Trans. Database Systems 4 (3) (1979), 315-344. [42] C. Faloutsos, Multiattribute hashing using Gray codes, Proc. ACM SIGMOD International Conference on the Management of Data, Washington D.C. (1985), 227-238. [43] C. Faloutsos, Gray codes for partial match and range queries, IEEE Trans. Software Eng. 14 (1988), 1381-1393. [44] C. Faloutsos and S. Roseman, Fractals for secondary key retrieval, Proc. 8th ACM SIGACT/SIGMOD Symposium on Principles of Database Systems (1989), 247-252. [45] C. Faloutsos, T. Sellis and N. Roussopoulos, Analysis of object oriented spatial access methods, Proc. ACM SIGMOD International Conference on the Management of Data, San Francisco (1987), 426439. [46] R.A. Finkel and J.L. Bentley, Quad trees: A data structure for retrieval on composite keys. Acta Informatica 4(1) (1974), 1-9. [47] P. Flajolet and C Puech, Partial match retrieval of multidimensional data, J. ACM 33 (2) (1986), 371^07. [48] A. Frank, Application of DBMS to land information systems, Proc. 7th International Conference on Very Large Data Bases, Cannes (1981), 448-453. [49] M.W. Freeston, The BANG file: A new kind of grid file, Proc. ACM SIGMOD International Conference on the Management of Data, San Francisco (1987), 260-269. [50] M.W. Freeston, Advances in the design of the BANG file, Proc. 3rd International Conference on Foundations of Data Organization and Algorithms, Paris, Lecture Notes in Comput. Sci. 367, Springer-Verlag, Berlin (1989a), 322-338. [51] M.W. Freeston, A well-behaved file structure for the storage of spatial objects. Symposium on the Design and Implementation of Large Spatial Databases, Santa Barbara, Lecture Notes in Comput. Sci. 409, Springer-Verlag, Berlin (1989b), 287-300. [52] M. Freeston, A general solution of the n-dimensional B-tree problem, Proc. ACM SIGMOD Int. Conf. on Management of Data (1995), 80-91. [53] V Gaede, Optimal redundancy in spatial database systems, Proc. 4th Int. Symp. on Spatial Databases (SSD'95) (1995). [54] V. Gaede and O. Giinther, Multidimensional access methods. Manuscript, Humboldt-Universitat Berlin, Institut fur Wirtschaftsinformatik, to appear in ACM Comput. Surveys (1996). [55] M.F. Goodchild, Spatial information science, Proc. 4th International Symposium on Spatial Data Handling, Zurich (1990), 3-12. [56] D. Greene, An implementation and performance analysis of spatial data access methods, Proc. 5th International Conference on Data Engineering, Los Angeles (1989), 606-615. [57] O. Giinther, Efficient Structures for Geometric Data Management, Lecture Notes in Comput. Sci. 337, Springer-Verlag, Berlin (1988). [58] O. Giinther, The design of the cell tree: An object oriented index structure for geometric databases, Proc. 5th International Conference on Data Engineering, Los Angeles (1989), 598-605. [59] O. Giinther, Evaluation of spatial access methods with oversize shelves. Geographic Data Base Management Systems, ESPRIT Basic Research Series Proceedings, Springer-Verlag (1992), 177-193. [60] O. Giinther, Efficient computation of spatial joins. Technical Report TR-92-029, International Computer Science Institute, Berkeley (1992). [61] O. Giinther, Efficient computation of spatial joins, Proc. 9th IEEE Int. Conf. on Data Eng. (1993). [62] O. Giinther and J. Bilmes, The implementation of the cell tree: Design alternatives and performance evaluation, GI-Fachtagung Datenbanksysteme fiir Biiro, Technik und Wissenschaft, Informatik-Fachberichte 204, Springer-Verlag, Berhn (1989), 246-265. [63] O. Giinther and J. Bilmes, Tree-based access methods for spatial databases: Implementation and performance evaluation, IEEE Trans. Knowledge and Data Eng. 3 (3) (1991), 342-356.
760
/ Nievergelt and P. Widmayer
[64] P. Gunther and A. Buchmann, Research issues in spatial databases, IEEE CS Bulletin on Data Eng. 13 (4) (1990), 35-42. [65] O. GUnther, R. Korstein, R. Miiller and R Schmidt, The MMM project: Acess to algorithms via WWW, Proc. Third International World Wide Web Conference (1995). URL http.//www.igd.fhg.de/www95.html. [66] R.H. GUting, Gral: An extensible relational database system for geometric applications, Proc. 15th International Conference on Very Large Data Bases, Amsterdam (1989), 33-44. [67] A. Guttman, R-trees: A dynamic index structure for spatial searching, Proc. ACM SIGMOD International Conference on the Management of Data, Boston (1984), 47-57. [68] E.F. Harding and D.G. Kendall, Stochastic Geometry, Wiley, New York (1974). [69] A. Henrich, Der LSD-Baum: eine mehrdimensionale Zugriffsstruktur und ihre Einsatzmdglichkeiten in Datenbanksystemen, Dissertation, FemUniversitat Hagen (1990). [70] A. Henrich and H.-W. Six, How to split buckets in spatial data structures. Geographic Data Base Management Systems, ESPRIT Basic Research Series Proceedings, Springer-Verlag (1991), 212-244. [71] A. Henrich, H.-W. Six and P. Widmayer, Paging binary trees with external balancing, 15th International Workshop on Graph-Theoretic Concepts in Computer Science, Castle Rolduc, Lecture Notes in Comput. Sci. 411 (1989), 260-276. [72] A. Henrich, H.-W. Six and P. Widmayer, The LSD-tree: Spatial access to multidimensional point- and non-point objects, 15th International Conference on Very Large Data Bases, Amsterdam (1989), 45-53. [73] K.H. Hinrichs, The grid file system: Implementation and case studies of applications. Dissertation, ETH Zurich (1985). [74] A. Hutflesz, H.-W. Six and P. Widmayer, Globally order preserving multidimensional linear hashing, Proc. 4th International Conference on Data Engineering, Los Angeles (1988), 572-579. [75] A. Hutflesz, H.-W. Six and P. Widmayer, The twin grid file: A nearly space optimal index structure, Proc. International Conference on Extending Database Technology, Venice, Lecture Notes in Comput. Sci. 303, Springer-Verlag, Berlin (1988), 352-363. [76] A. Hutflesz, H.-W. Six and P. Widmayer, Twin grid files: Space optimizing access schemes, Proc. ACM SIGMOD Conference on the Management of Data, Chicago (1988), 183-190. [77] A. Hutflesz, H.-W. Six and P. Widmayer, Twin grid files: A performance evaluation, Proc. Workshop on Computational Geometry, CG'88, Lecture Notes in Comput. Sci. 333, Springer-Verlag, Berlin (1988), 15-24. [78] A. Hutflesz, H.-W. Six and P. Widmayer, The R-file: An efficient access structure for proximity queries, Proc. 6th International Conference on Data Engineering, Los Angeles (1990), 372-379. [79] A. Hutflesz, P. Widmayer and C. Zimmermann, Global order makes spatial access faster. Geographic Data Base Management Systems, ESPRIT Basic Research Series Proceedings, Springer-Verlag (1992), 161-176. [80] G.M. Hunter and K. Steiglitz, Operations on images using quad trees, IEEE Transactions on Pattern Analysis and Machine Intefligence 1 (2) (1979), 145-153. [81] S.S. Iyengar, N.S.V Rao, R.L. Kashyap and VK. Vaishnavi, Multidimensional data structures: Review and outlook. Advances in Computers, M.C. Yovits, ed.. Academic Press 27 (1988), 69-119. [82] H.V Jagadish, Spatial search with polyhedra, Proc. 6th International Conference on Data Engineering, Los Angeles (1990), 311-319. [83] H.V. Jagadish, Linear clustering of objects with multiple attributes, Proc. ACM SIGMOD International Conference on the Management of Data, Atlantic City, New Jersey (1990), 332-342. [84] I. Kamel and C. Faloutsos, Hilbert R-tree: An improved R-tree using fractals, Proc. 20th Int. Conf. on Very Large Data Bases (1994), 500-509. [85] G. Kedem, The quad-CIF tree: A data structure for hierarchical on-line algorithms. Proceedings of the Nineteenth Design Automation Conference, Las Vegas (1982), 352-357. [86] A. Kemper and M. Wallrath, An analysis of geometric modelling in database systems, ACM Comput. Surveys 19 (1) (1987), 47-91. [87] A. Klinger, Patterns and search statistics. Optimizing Methods in Statistics, J.S. Rustagi, ed., Academic Press, New York (1971), 303-337. [88] D.E. Knuth, The Art of Computer Programming, Vol. 1: Fundamental Algorithms, Addison-Wesley (1968). [89] D.E. Knuth, The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison-Wesley (1973).
Spatial data structures
761
[90] H.-P. Kriegel and B. Seeger, Multidimensional order preserving linear hashing with partial expansions, Proc. International Conference on Database Theory, Lecture Notes in Comput. Sci. 243, Springer-Verlag, Berlin (1986), 203-220. [91] H.-P. Kriegel and B. Seeger, Multidimensional dynamic quantile hashing is very efficient for non-uniform record distributions, Proc. 3rd International Conference on Data Engineering, Los Angeles (1987), 10-17. [92] H.-P. Kriegel and B. Seeger, PLOP-Hashing: A grid file without directory, Proc. 4th International Conference on Data Engineering, Los Angeles (1988), 369-376. [93] H.-P. Kriegel, M. Schiwietz, R. Schneider and B. Seeger, Performance comparison of point and spatial access methods, Proc. Symposium on the Design and Implementation of Large Spatial Databases, Santa Barbara, Lecture Notes in Comput. Sci. 409, Springer-Verlag, Berlin (1989), 89-114. [94] H.-P. Kriegel and B. Seeger, Multidimensional quantile hashing is very efficient for non-uniform distributions. Inform. Sci. 48 (1989), 99-117. [95] H.-P. Kriegel, T. Brinkhoff and R. Schneider, An efficient map overlay algorithm based on spatial access methods and computational geometry. Geographic Data Base Management Systems, ESPRIT Basic Research Series Proceedings, Springer-Verlag (1992), 194-211. [96] H.-P. Kriegel, P. Heep, S. Heep, M. Schiwietz and R. Schneider, An access method based query processor for spatial database systems. Geographic Data Base Management Systems, ESPRIT Basic Research Series Proceedings, Springer-Verlag (1992), 273-292. [97] R. Krishnamurthy and K.-Y. Whang, Multilevel grid files, IBM T.J, Watson Research Center Report, Yorktown Heights, New York (1985). [98] H.T. Kung and PL. Lehman, Concurrent manipulation of binary search trees, ACM Trans, on Database Systems 5 (3) (1980), 339-353. [99] M. Lindenbaum and H. Samet, A probabilistic analysis of trie-based sorting of large collections of line segments. Technical Report, University of Maryland (1995). [100] W. Litwin, A new tool for file and table addressing, Proc. 6th International Conference on Very Large Data Bases, Montreal (1980), 212-223. [101] M. Lo and C. Ravishankar, Spatial joins using seeded trees, Proc. ACM SIGMOD Int. Conf. on Management of Data (1994), im-llQi. [102] F. Lohmann and K. Neumann, A geoscientific database system supporting cartography and application programming, Proc. 8th British National Conference on Databases, Pitman, London (1990), 179-195. [103] D.B. Lomet and B. Salzberg, A robust multi-attribute search structure, Proc. 5th International Conference on Data Engineering, Los Angeles (1989), 296-304. [104] D.B. Lomet and B. Salzberg, The hB-tree: A multiattribute indexing method with good guaranteed performance, ACM Trans, on Database Systems 15 (4) (1990), 625-658. [105] F. Manola and J.A. Orenstein, Toward a general spatial data model for an object-oriented DBMS, Proc. 12th International Conference on Very Large Data Bases, Kyoto (1986), 328-335. [106] G. Matheron, Random Sets and Integral Geometry, Wiley, New York (1975). [107] G.M. Morton, A computer oriented geodetic data base and a new technique in file sequencing, IBM, Ottawa, Canada (1966). [108] R.C. Nelson and H. Samet, A consistent hierarchical representation for vector data. Computer Graphics 20 (4) (1986), 197-206. [109] R.C. Nelson and H. Samet, A population analysis for hierarchical data structures, Proc. ACM SIGMOD International Conference on the Management of Data, San Francisco (1987), 270-277. [110] V.H. Nguyen, T. Roos and P. Widmayer, Balanced cuts of a set of hyperrectangles, Proc. 5th Canadian Conference on Computational Geometry, Waterloo (1993), 121-126. [ I l l ] J. Nievergelt, 7+-2 criteria for assessing and comparing spatial data structures. Symposium on the Design and Implementation of Large Spatial Databases, Santa Barbara, Lecture Notes in Comput. Sci. 409, Springer-Verlag, Berlin (1989), 3-28. [112] J. Nievergelt, H. Hinterberger and K.C. Sevcik, The grid file: An adaptable, symmetric multikey file structure. Trends in Information Processing Systems, Proc. 3rd ECI Conf., A. Duijvestijn and P. Lockemann, eds. Lecture Notes in Comput. Sci. 123, Springer Verlag (1981), 236-251. [113] J. Nievergelt, H. Hinterberger and K.C. Sevcik, The grid file: An adaptable, symmetric multikey file structure, ACM Trans, on Database Systems 9 (1) (1984), 38-71.
762
J. Nievergelt and P. Widmayer
[114] J. Nievergelt and P. Widmayer, Guard files: Stabbing and intersection queries on fat spatial objects. The Comput J. 36 (2) (1993), 107-116. [115] J. Nievergelt and P. Widmayer, All space filling curves are equally efficient. Manuscript, ETH Zurich (1996). [116] T. Ohler, The multiclass grid file: An access structure for multiclass range queries, Proc. 4th International Symposium on Spatial Data Handhng (1992), 260-271. [117] T. Ohler, On the integration of non-geometric aspects into access structures for geographic information systems. Dissertation ETH Zurich Nr. 10877 (1994). [118] T. Ohler and P. Widmayer, A brief tutorial introduction to data structures for geometric databases. Advances in Database Systems: Implementations and Applications, CISM Courses and Lectures No. 347, Springer-Verlag, Wien-New York (1994), 329-351. [119] Y. Ohsawa and M. Sakauchi, A new tree type data structure with homogeneous nodes suitable for a very large spatial database, Proc. 6th International Conference on Data Engineering, Los Angeles (1990), 296303. [120] B.C. Ooi, A data structure for geographic database, GI-Fachtagung Datenbanksysteme fiir Biiro, Technik und Wissenschaft, Informatik-Fachberichte 136, Springer-Veriag, Berlin (1987), 247-258. [121] B.C. Ooi, R. Sacks-Davis and K.J. McDonell, Extending a DBMS for geographic applications, Proc. 5th International Conference on Data Engineering, Los Angeles (1989), 590-597. [122] J.A. Orenstein, Spatial query processing in an object-oriented database system, Proc. ACM SIGMOD International Conference on the Management of Data (1986), 326-336. [123] J.A. Orenstein, Redundancy in spatial databases, Proc. ACM SIGMOD International Conference on the Management of Data, Portland (1989), 294-305. [124] J. A, Orenstein, A comparison of spatial query processing techniques for native and parameter spaces, Proc. ACM SIGMOD International Conference on the Management of Data, Atlantic City, New Jersey (1990), 343-352. [125] J. A. Orenstein and T.H. Merrett, A class of data structures for associative searching, Proc. 3rd ACM SIGACT/SIGMOD Symposium on Principles of Database Systems, Waterioo (1984), 181-190. [126] E.J. Otoo, Balanced multidimensional extendible hash tree, Proc. 5th ACM SIGACT-SIGMOD International Symposium on Principles of Database Systems, Cambridge, Massachusetts (1986), 100-113. [127] E.J. Otoo, An adaptive symmetric multidimensional data structure for spatial searching, Proc. 4th International Symposium on Spatial Data Handling, Zurich (1990), 1003-1015. [128] M. Ouksel, The interpolation-based grid file, Proc. 4th ACM SIGACT-SIGMOD Symposium on Principles of Database Systems, Portland (1985), 20-27. [129] M. Overmars, Dynamization of order decomposable set problems, J. Algorithms 2 (1981), 245-260. [130] M. Overmars, The design of dynamic data structures, Proefschrift, Rijksuniversiteit Utrecht (1983). [131] E.A. Ozkarahan and M. Ouksel, Dynamic and order preserving data partitioning for database machines, Proc. 11th International Conference on Very Large Data Bases, Stockholm (1985), 358-368. [132] B.-U. Pagel, Analyse und Optimierung von Indexstrukturen in GeoDatenbanksystemen, Dissertation, FemUniversitat Hagen, Germany (1995). [133] B.-U. Pagel, H.-W. Six and H. Toben, The transformation technique for spatial objects revisited, 3rd International Symposium on Advances in Spatial Databases, Singapore, Lecture Notes in Comput. Sci. 692, Springer-Veriag (1993), 73-88. [134] B.-U. Pagel, H.-W. Six, H. Toben and P. Widmayer, Towards an analysis of range query performance in spatial data structures, 12th SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, Washington, D.C. (1993), 214-221. [135] F.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-Veriag, BerlinHeidelberg-New York (1985). [136] K. Ramamohanarao and R. Sacks-Davis, Recursive linear hashing, ACM Trans, on Database Systems 9 (3) (1984), 369-391. [137] M. Regnier, Analysis of grid file algorithms, BIT 25 (1985), 335-357. [138] J.T. Robinson, The K-D-B-tree: A search structure for large multidimensional dynamic indexes, Proc. ACM SIGMOD International Conference on the Management of Data, Ann Arbor (1981), 10-18. [139] G.-C. Roman, Formal specification of geographic data processing requirements, IEEE Trans. Knowledge and Data Eng. 2 (4) (1990), 370-380.
Spatial data structures
763
[140] T. Rottke, H.-W. Six and P. Widmayer, On the analysis of grid structures for spatial objects of non-zero size. International Workshop on Graph-Theoretic Concepts in Computer Science, Staffelstein, Lecture Notes in Comput. Sci. 314, Springer-Verlag, BerUn (1987), 94-105. [141] N. Roussopoulos and D. Leifker, Direct spatial search on pictorial databases using packed R-trees, Proc. ACM SIGMOD International Conference on the Management of Data, Austin (1985), 17-31. [142] H. Sagan, Space-Filling Curves, Springer-Verlag, Berlin-Heidelberg-New York (1994). [143] H. Samet, Hierarchical representations of collections of small rectangles, ACM Comput. Surveys 20 (4) (1988), 271-309. [144] H. Samet, The Design and Analysis of Spatial Data Structures, Addison-Wesley, Reading (1990). [145] H. Samet, Applications of Spatial Data Structures, Addison-Wesley, Reading (1990). [146] H. Samet and R.E. Webber, Storing a collection of polygons using quadtrees, ACM Trans, on Graphics 4 (3) (1985), 182-222. [147] L.A. Santalo, Integral Geometry and Geometric Probability, Addison-Wesley, Reading (1976). [148] H,-J. Schek and W. Waterfeld, A database kernel system for geoscientific applications, Proc. 2nd International Symposium on Spatial Data Handling, Seattie (1986), 273-288. [149] H.-J. Schek and A. Wolf, From extensible databases to interoperability between multiple databases and GIS applications, 3rd International Symposium on Advances in Spatial Databases, Singapore, Lecture Notes in Comput. Sci. 692, Springer-Verlag (1993), 207-238. [150] M. Schiwietz and H.-P. Kriegel, Query processing of spatial objects: Complexity versus redundancy, 3rd International Symposium on Advances in Spatial Databases, Singapore, Lecture Notes in Comput. Sci. 692, Springer-Verlag (1993), 377-396. [151] R. Schneider, Geo-Datenbank-Systeme: Bine Speicher- und Zugriffsarchitektur, BI Wissenschaftsverlag, Mannheim, Leipzig, Wien, Zurich, Reihe Informatik 95 (1994). [152] B. Seeger, Entwurf und Implementierung mehrdimensionaler Zugrijfsstrukturen, Dissertation, Universitat Bremen (1989). [153] B. Seeger and H.-P. Kriegel, Techniques for design and implementation of efficient spatial access methods, Proc. 14th International Conference on Very Large Data Bases, Los Angeles (1988), 360-371. [154] B. Seeger and H.-P. Kriegel, The buddy-tree: An efficient and robust access method for spatial data base systems, Proc. 16th International Conference on Very Large Data Bases, Brisbane (1990), 590-601. [155] T. Sellis, N. Roussopoulos and C. Faloutsos, The R-\—tree: A dynamic index for multi-dimensional objects, Proc. 13th International Conference on Very Large Data Bases, Brighton (1987), 507-518. [156] C.A. Shaffer and H. Samet, Set operations for unaligned linear quadtrees, Comput. Vision, Graphics, and Image Process. 50 (1) (1990), 29-49. [157] C.A. Shaffer, H. Samet and R.C. Nelson, QUILT: A geographic information system based on quadtrees, Intemat. J. Geogr. Inform. Systems 4 (2) (1990), 103-131. [158] H.-W. Six and P. Widmayer, Spatial searching in geometric databases, Proc. 4th International Conference on Data Engineering, Los Angeles (1988), 496-503. [159] H.-W. Six and P. Widmayer, Spatial access structures for geometric databases. Data Structures and Efficient Algorithms, B. Monien, and T. Ottmann, eds, Final Report on the DFG Special Joint Initiative, Lecture Notes in Comput. Sci. 594 (1992), 214-232. [160] T.R. Smith and P. Gao, Experimental performance evaluations on spatial access methods, Proc. 4th International Symposium on Spatial Data Handling, Zurich (1990), 991-1002. [161] D. Stoyan, W.S. Kendall and J. Mecke, Stochastic Geometry and its Applications, Wiley, New York (1987). [162] S. Subramanian and S. Ramaswamy, The P-range tree: A new data structure for range searching in secondary memory, Proc. Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, San Francisco, CA (1995), 378-387. [163] M. Tamminen, The EXCELL method for efficient geometric access to data. Acta Polytechnica Scandinavica. Math, and Comput. Sci. Ser. No. 34, Helsinki, Finland (1981). [164] M. Tamminen, The extendible cell method for closest point problems, BIT 22 (1982), 27-41. [165] M. Tamminen, Metric data structures — an overview, Helsinki University of Technology, Laboratory of Information Processing Science, Report HTKK-TKO-A25 (1984). [166] M. Tamminen, On search by address computation, BIT 25 (1985), 135-147. [167] H. Tropf and H. Herzog, Multidimensional range search in dynamically balanced trees, Angewandte Informatik 2 (1981), 71-77.
764
J. Nievergelt and P. Widmayer
[168] P. van Oosterom, Reactive data structures for geographic information systems, Proefschrift, Rijksuniversiteit Leiden (1990). [169] MJ. van Kreveld, New results on data structures in computational geometry, Proefschrift, Rijksuniversiteit Utrecht (1992). [170] P. van Oosterom and E. Claassen, Orientation insensitive indexing methods for geometric objects, Proc. 4th International Symposium on Spatial Data Handling, Zurich (1990), 1016-1029. [171] J.-H. Wang, T.-S. Yuen and D.H.-C. Du, On multiple random access and physical data placement in dynamic files, IEEE Trans, on Software Eng. 13 (8) (1987), 977-987. [172] W. Waterfeld, Eine erweiterbare Speicher- und Zugrijfskomponente fUr geowissenschaftliche Datenbanksysteme. Dissertation, Fachbereich Informatik, Technische Hochschule Darmstadt, Germany (1991). [173] J.E. Wamock, A hidden surface algorithm for computer generated halftone pictures. Computer Science Department TR 4-15, University of Utah, Salt Lake City (1969). [174] P. Widmayer, Datenstrukturen fiir Geodatenbanken, Entwicklungstendenzen bei Datenbank-Systemen, G. Vossen and K.-U. Witt, eds, Oldenbourg Verlag, Munchen-Wien (1991), 317-361. [175] D.E. Willard, Balanced forests ofk-d* trees as a dynamic data structure, TR-23-78, Aiken Computation Lab., Harvard University (1978). [176] X. Xu, J. Han and W. Lu RT-tree: An improved R-tree index structure for spatiotemporal databases, Proc. 4th International Symposium on Spatial Data Handling, Zurich (1990), 1040-1049.
CHAPTER 18
Parallel Computational Geometry: An Approach using Randomization John H. Reif Department of Computer Science, Duke University, Durham, NC 27706, USA
Sandeep Sen Department of Computer Science and Engineering, Indian Institute of Technology, New Delhi 110016, India
Contents 1. Introduction 1.1. The PRAM model 1.2. Performance measures of parallel algorithms 1.3. Randomized algorithms 1.4. Performance measures of randomized algorithms 1.5. Elementary tools for analyzing randomized algorithms 1.6. Problems considered 1.7. Arrangements 2. Basic parallel routines 2.1. Parallel prefix computations 2.2. Parallel sorting and selection 2.3. Load-balancing and processor allocation 2.4. Semisorting 2.5. Randomized symmetry breaking with application to point location 2.6. Sublogarithmic routines 3. Random sampling and polling in computational geometry 3.1. Random sampling 3.2. Converting expected bounds to high-probability 4. Randomized divide-and-conquer 4.1. Trapezoidal map construction 4.2. The general strategy 4.3. 3-D Convex hull 4.4. Constructing arrangements 5. Sublogarithmic algorithms 5.1. Speeding up in the sublogarithmic range
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
765
767 767 768 769 770 770 772 774 774 775 775 779 780 783 787 788 789 795 797 797 801 801 807 810 811
766
J.H. Reifand S. Sen
5.2. Trapezoidal decomposition and triangulation 5.3. 3-D Convex hulls and 2-D Voronoi diagrams 5.4. Lower bounds 6. Geometry onfixed-connectionmachines 6.1. Motivation and overview 6.2. Model of computation 6.3. Overview of sorting and routing onfixed-connectionnetworks 6.4. Binary search without concurrent reads 6.5. Applications to computational geometry 7. Bibliographic notes References
811 812 812 816 816 817 818 821 822 824 825
Abstract We describe very general methods for designing efficient parallel algorithms for problems in computational geometry. Although our main focus is the PRAM, we provide strong evidence that these techniques yield equally efficient algorithms in more concrete computing models like Butterfly networks. The algorithms exploit random sampling and randomized techniques for solving a wide class of fundamental problems from computational geometry like convex hulls, Voronoi diagrams, triangulation, point-location and arrangements. In addition, the algorithms on the Butterfly network rely critically on an efficient randomized multisearching algorithm. Our description emphasizes the algorithmic techniques rather than a detailed treatment of the individual problems.
Parallel computational geometry: An approach using randomization
767
1. Introduction In the quest for faster methods of computation, coupled with the development of VLSI technology, there has been a tremendous growth in research in parallel computation. The objective is to reduce the time complexity of the sequential algorithm by using several processors that are working on the same problem simultaneously. If we let Seq(n) denote the best known sequential time bound for a problem of size n, then clearly the parallel time complexity can be no better than Seq(^)/P where P is the number of processors being used. Otherwise, we can improve on the best sequential algorithm by taking the parallel algorithm and executing the parallel steps sequentially. Throughout this chapter, unless otherwise stated, the parameter n will be used to represent the input size of the problem under consideration. A major drawback in the area of parallel computation is the lack of consensus regarding an ideal model of parallel computation. Although some parallel machines like MPP, Connection Machine, Paragon, MasPar etc. are available commercially, they have vastly different architectures which play a crucial role in algorithm design. The RAM model serves as a reasonable abstraction for almost all uniprocessor computers available today. A substantial amount of research has focused on developing algorithms which are tailor-made for a specific architecture like the 2-D Mesh, Butterfly, or the Hypercube interconnection networks. These algorithms are specialized to an extent that they are not as efficient when implemented on a different architecture from the one that they were designed for. Notwithstanding the contributions of these algorithms, it should be clear that there is a need for more generality in parallel algorithm research and also from a theoretical perspective, a need to decrease the over-dependence of the algorithms on the architecture. It is with these objectives in mind that a major amount of the present research in the theory of parallel algorithms has been developed around the Parallel Random Access Machine (PRAM) model. This model is a very natural extension of the RAM model (although not as ubiquitous).
1.1. The PRAM model In this model, there are P identical processors which execute instructions synchronously (with a global clock) in parallel on different data values. Each processor is identified using a unique integral label which is also called the processor-id. The processors have access to a common shared memory. In one time step, a processor is capable of accessing a memory (shared or local) location, or executing a logical or an arithmetic operation on O(logn) bit words. If the number of processors is one, then this is the usual RAM model. There are variations within this basic model depending on resolution schemes for memory access conflicts. In the most restrictive model, the Exclusive-Read-Exclusive-Write (EREW), no two processors are allowed to read or write simultaneously in the same memory location. In the Concurrent-Read-Exclusive-Write model, no two processors can write to the same memory location whereas any number of processors are allowed to read from a memory location. Note that these constraints have to be guaranteed by the algorithm-designer. In the strongest model, Concurrent-Read-Concurrent-Write model (CRCW) any number of processors are allowed to read or write simultaneously to the same memory location. While reading is not
768
J.H.ReifandS.Sen
a destructive operation, in concurrent-write models, we have to further specify the result in the memory location when more than one processor attempts to write to the same location. In the arbitrary CRCW model, we assume that one of the processors succeed in writing its value but we do not make any assumption regarding which processor succeeds. Clearly, if all the processors try writing the same value, it is simpler than the case where the processors are trying to write different values. It is the algorithm-designer's responsibility to ensure that the correctness of the algorithm does not depend on which value gets written. For a practitioner, the PRAM model may appear to be far from 'reality;' especially, the problems regarding unbounded fan-in in CREW and CRCW models and the nearimpossibility of synchronization of a large number of processors in 0(1) time are inconsistent with the physics of a real machine. These issues and others about 'what constitutes the right parallel model' have been a subject of continuing debate in the research community. We do not wish to confuse the reader any further by offering our own views. Instead, we claim that the methods described here are so general that they can be efficiently mapped into any reasonable parallel computation model. By that we imply that these algorithms will perform very well in any parallel environment, where the performance is measured with respect to a particular machine. For example, it is known that an algorithm running on a two-dimensional mesh cannot (theoretically) achieve the performance of a Butterfly machine with the same number of processors. So an exact (asymptotic) time bound makes sense only in the context of a fixed machine model. To illustrate our point, we give implementations of some of the algorithms on the Butterfly interconnection network that achieve optimal performance in that architecture. As further evidence of generality, a number of these techniques have been exploited successfully for efficient algorithm design in the BSP (Bulk Synchronous Parallel) Model. This model was initially proposed by Valiant [87] to rectify some of the perceived shortcomings of the PRAM model. The BSP model is a coarse-grain parallel-computing model where all inter-processor communication is done in global phases and accounted for separately from computation phases. Algorithm design for BSP model is a relatively new area of research and the interested reader is referred to the Bibliography. Initial trends indicate that many PRAM algorithm design techniques carry over nicely to the BSP model (for example, see Goodrich [42]). In this chapter, mostly we shall be using the CREW model and the performance is analyzed with respect to this model (without any significant loss of generality that follows from our discussion about other models). In addition, we shall assume that a single memory location can hold a real-number and a processor can perform an arithmetic operation involving two real-numbers in a single step. This is consistent with the model that is used for sequential computational geometry called the 'Real'-RAM. In this model a register or a memory location can store a real number and the arithmetic operations can be computed to arbitrary precision. Since we shall be using randomization, we also assume that processors have access to O(logn) random bits in constant time. 1.2. Performance measures ofparallel algorithms Parallelism seems to be an intrinsic property of a problem; some problems admit a greater degree of parallelism than others. By degree of parallelism we imply the speed-up (over its
Parallel computational geometry: An approach using randomization
769
sequential counter-part) obtained by using P processors. The class AfC refers to problems for which we can obtain a polylogarithmic running time algorithm using a polynomial number of processors. The class TZAfC includes problems for which we can obtain an algorithm with the previous property allowing randomization. Clearly, using huge numbers of processors (i.e., high degree polynomial) for a problem may make it very wasteful in the amount of resources used. A very useful metric in this context is the 'processor-time' (PT) product. Ideally we would like PnTn = Seq(n) where Pfi and Tn represent the number of processors and time used for solving a problem of size n. In the future we shall use PT without the subscript. For problems in AfC, PT = 0(n^Stq(n)). A commonly agreed-upon definition of 'efficient' algorithms are those for which PT = 0(Seq(?i) log^ n), i.e., the number of parallel operations is within a polylog factor of the best known sequential algorithm. A parallel algorithm is called 'optimal' if P r = 0(Seq(n)). In this chapter, our goal has been to derive 'optimal' algorithms rather than simply AfC algorithms. The typical sequential complexity of the problems tackled is G{n\ogn) and in most cases we have been able to obtain an O(logn) time optimal algorithm. Although even n processors appear too large in most situations, it implies that the problems have a linear speed-up (linear in the number of processors) when the number of processors is less than n. The following well known result justifies this observation: LEMMA 1.1 (Slow-down lemma). If there exists an algorithm using Pi processors and running in T\ time then it runs in 0{T\P\/ P2) time using P2 processors for P2 ^ P]. The proof follows from the observation that each of the P2 processors can emulate [P1/P2I processors of the first algorithm. This implies that the speed-up obtained does not decrease by reducing the number of processors (it may in fact increase) and so if we can get a linear speed-up with n processors, we can get a linear speed-up with p < n processors. By studying the relationship between speed-up and number of processors we can determine how profitable it is to employ more processors for a problem of a certain size.
1.3. Randomized algorithms The technique of randomizing an algorithm to improve its efficiency was first introduced in 1976 independently by Rabin, and Solovay and Strassen. Since then, this idea has been used to solve a myriad of computational problems successfully. Today randomization has become a powerful tool in the design of both sequential and parallel algorithms. Informally, a randomized algorithm is one which bases some of its decisions on the outcomes of coin flips. We can think of the algorithm with one possible sequence of outcomes for the coin flips to be different from the same algorithm with a different sequence of outcomes for the coin flips. Therefore, a randomized algorithm can be viewed as a family of algorithms. An objective in designing randomized algorithms is to ensure that the number of bad algorithms is a relatively small fraction of the total number of algorithms. If for any input we can show that at most s (e being very close to (0) fraction of algorithms in the family are bad, then this probability is independent of the input distribution.
770
J.H. Reifand S. Sen
Two types of randomized algorithms can be found in the Hterature: (1) algorithms that always produce the correct output but may run for an indefinite period (that is the running time is a random variable). These are called Las Vegas algorithms; and (2) those that run for a specified amount of time and whose output will be correct with a specified probability. These are called Monte Carlo algorithms. The primality testing algorithm of Rabin is of the second type. The error of a randomized algorithm can either be 1-sided or 2-sided. Consider a randomized algorithm for recognizing a language. The output of the algorithm is either yes or no. There are algorithms which when saying yes are always correct, but when saying no may have produced a wrong answer. Such algorithms are said to have 1-sided error. Algorithms that have non-zero error probability on both possible outputs are said to have 2-sided error.
1.4. Performance measures of randomized algorithms The algorithms that we describe in this chapter are Las Vegas, that is they always produce the correct results and only their running time is a stochastic process. So the predicted performance revolves around how well one is able to analyze the random variable that models the running time (or some other performance measures). It would be ideal if we could determine the actual probability distribution of this random variable but that is usually too complex. Instead, we try to bound the various characteristics of the actual probability generating function like expectation, variance or even higher moments. Sometimes, it is possible to bound the tails of the distribution function, which is of the type: What is the probability that the random variable exceeds a certain value? Note that in the context of worst-case algorithm analysis, we are mainly concerned about the upper tail. Just like the big-O function serves to represent the complexity bounds of deterministic algorithms, O serves to represent the complexity bounds of randomized algorithms. Notation. We say a randomized algorithm has a resource (time, space etc.) bound of 0{g{n)) if there exists a constant c such that the amount of resource used by the algorithm (on any input of size n) is no more than cag(n) with probability ^ 1 — l/n" for any a > 0. We shall refer to these bounds as high probability bounds. This is also known as the n-polynomial bounds. Sometimes, it is possible to bound the tails with higher probability, namely, 1 — 2^^^\ These are called n-exponential bounds.
1.5. Elementary tools for analyzing randomized algorithms From our previous discussion, we would like to bound the probability that the algorithm does not terminate after certain time. (Although our discussion is with reference to running time, it applies to other parameters as well). We may think about it as the failure probability, that is, the failure of the algorithm to terminate in a certain time. Since the randomization is with respect to random numbers chosen by the algorithm, often this failure probability can be expressed as the probability of random numbers assuming certain sets
Parallel computational geometry: An approach using randomization
111
of values. We can view them as events in some appropriate sample space so that the failure probability can be expressed as combinations (set operations) of certain events. If the events are independent (in the probabilistic sense), analysis becomes much simpler because the probability of the conjunction of independent events is the product of the probabilities of these events. However, often there is limited independence or no independence. In such cases we can rely only on trivial upper bounds as in Pr
|jE,U^Pr[^/],
(1)
where for all /, Et is an event in the sample space. The significance of high-probability bounds is that the union of a polynomial number of events that succeed with high probability also succeeds with high probability. It follows from the definition of high-probability bounds. The other frequently used tools are the probabilistic inequalities. They yield bounds on the tails of the probability distribution functions. The probability generating function Gx{z) for a non-negative discrete random variable X is defined as Xl/^o^^t^ — ^]^'Given Gx(z), it is possible to determine the expectation, variance, and all the higher moments. The most celebrated is the Chemoff bound, that bounds the tail of a random variable X given Gx(z). Generalized Chemoff bounds Fr[X^x]^z-'''Gx(z).
(2)
By minimizing with respect to z, one can obtain fairly sharp bounds. Since getting hold of Gx(z) is usually quite difficult, the following inequality is quite useful when only the expectation of X, E[X] is known. Markov inequality FT[X^k-E[X]]^-.
(3)
1.5.1. Chemoff bounds for binomial random variables. Frequently, in the design of randomized algorithms, many parameters of interest (like running time, space used, etc.) are random variables with a binomial distribution. For example, let's assume that the run time of an algorithm is binomial with mean m. Can we say the run time of the algorithm is 0(m) with high probability? The answer is yes if m is sufficiently large. Intuitively, if m is large, the area under the tail ends of a binomial distribution is negligible. Chemoff bounds provide fairly tight estimates for computing the area under the tail ends of a binomial. It turns out that if the mean E{X^ of a binomial random variable X is Q(\ogn), then the probability that X is greater than 0(£'[X]) is ^ n"^ for any of > 1 (the constants in ^ 0 and 0() will depend on a). Very often it is easier to bound the random variable corresponding to the running time by a well-known distribution rather than analyze the exact distribution.
772
J.H. Reifand S. Sen
1.2. We say a random variable X upper bounds another random variable Y (equivalently, Y lower bounds X), if for all x such that 0 < x ^ 1, Probability (X ^ x) ^ Probability(y ^jc). A Bernoulli trial is an experiment with two possible outcomes, namely success and failure. The probability of success is p. A binomial variable X with parameters (n, p) is the number of successes in n independent Bernoulli trials, the probability of success in each trial being p. The distribution function of X can easily be seen to be DEFINITION
Angluin and Valiant gave sharp bounds of approximating the tail ends of a binomial distribution. In particular, their results can be summarized as LEMMA 1.3 (Chemoff bounds). If X is binomial with parameters an integer, then
Pr(X>m)^(-^)
e'"-"^.
(M,
p) and m > np is
(4)
Also, Pr (X ^ L(l - e)pni) < exp{-8\p/2)
(5)
and Pr (X ^ r( 1 + e)np^) ^ Qxp{-e^np/3)
(6)
for alio < 6 < I. REMARK 1.4. More general form of these inequalities are also known as ChemoffHoeffding bounds where the success probabilities of the n Bernoulli variables may be different. However, we do not need them in this chapter.
1.6. Problems considered Computational geometry, as it stands today, is concerned with the design and analysis of geometric algorithms. This is quite vast in its scope — including problems from data-bases to mathematical programming. We have chosen some of the most fundamental problems that usually serve as an introduction to computational geometry. It is likely that these will serve as building blocks for solving more complex problems. We will also rely on reductions to make the algorithms more versatile. An informal definition of parallel reduction can be given as:
Parallel computational
geometry: An approach using randomization
11?>
Problem A is 0(P(n), R{n)) time parallel reducible to Problem B if any instance of A can be solved by using an algorithm for Problem B as a subroutine in 0(/?(n)) parallel time using P{n) processors. The sub-routine can be invoked at most a constant number of times and its running time is not included in R{n). In other words, a T{n) time algorithm for Problem B implies a 0(T(n) + R(n)) time algorithm for Problem A. Also a Q{B{n)) time lower bound for Problem A implies a similar lower-bound for B. 1.6.1. Convex hulls. Convex polygons are very important objects in computational geometry, and in a large number of cases give rise to very efficient algorithms because of their nice property, namely convexity. A convex hull of a set of points in E^ (the Euclidean J-dimensional space) is the smallest polygon containing these points. The input is given as a set of n (i-tuples and the output consists of an 'ordered' set of points of the convex hulls. In two-dimensions, this 'ordering' is simply the clockwise (or counter-clockwise) ordering of the vertices of convex hulls. In three-dimensions it can be the cyclic ordering of edges of the convex hull around each vertex. We restrict ourselves to the two and three dimensional case. It is known that sequentially it takes Q (n log n) operations to construct the convex hull in two dimensions and there exist algorithms with matching upper-bound. 1.6.2. Voronoi diagrams. A very general definition of Voronoi diagram given by Edelsbrunner [35] is as follows: Let ^ be a finite set of subsets of E^ and for each 5 € 5 let ds be a mapping of E^ to positive real numbers; we call ds{p) the distance function of s. The set {p e E^: dsip) < dtip), t G S — [s}} is the Voronoi cell of s and the cell complex defined by the Voronoi cells of all subsets in S is called the Voronoi diagram of S. In this chapter, we confine ourselves to the case where 5 is a set of points in E'^ and the distance function is the L2 metric. The subsets considered will be only the singleton points of S. The Voronoi diagram is a very versatile tool for obtaining efficient solutions of some important proximity problems and is also a fundamental mathematical object in its own right. A large number of problems can be solved in linear or 0(n logn) time from the information contained in the Voronoi diagram. A partial list includes Closest Pair: For a set of points in the plane, determine a pair of points such that the Euclidean distance between them is smaller than any other pair of points. All Nearest Neighbor: For each of the given points in the plane determine the point that is closest to it. Largest empty circle: Given a set of points, find the largest circle that contains no point in its interior and its center lies inside the convex hull of the points. Euclidean minimal spanning tree: Given a set of points, find a minimal spanning tree where the edge weights are proportional to the Euclidean distance between the points.
774
J.H. Reifand S. Sen
REMARK 1.5. Using a technique of Brown [18], construction of a Voronoi-diagram (in plane) is (n, 1) reducible to convex-hull in three-dimensions. Later in the chapter, we describe an algorithm for computing the 3-D convex hull.
1.6.3. Triangulation and visibility. Given a simple polygon (i.e., one without selfintersecting edges) with n vertices, a triangulation involves adding n — 3 edges such that each face is a triangle. An equivalent problem is that of determining visibility where for each vertex of the polygon we have to determine the edges (0,1 or 2) that are the first edges (both above and below the vertex) that intersect the vertical line drawn through this vertex. An optimal 0{n) time triangulation algorithm was a subject of much research before it was settled by Chazelle [19]. A related problem is trapezoidal decomposition, where given n non-intersecting line segments (not necessarily forming a simple polygon), we have to determine the visible edges for each end-point in the vertical direction. This problem has a lower bound of ^{n logn) because the two-dimensional dominance problem can be reduced to it (which is known to have a lower bound of Q{n \ogn)). It is also called the Vertical visibility problem and in the context of sequential algorithms this problem and the triangulation problem are linear time reducible to each other. REMARK 1.6. Triangulation is (n/\ogn,\ogn) reducible to Trapezoidal decomposition (Yap [90]). Note that this is not an optimal reduction since simple polygons can be triangulated faster than that of trapezoidal decomposition of arbitrary non-intersecting segments.
1.6.4. Point location. Given a planar sub-division, we are allowed to preprocess it such that given any query point, we have to determine quickly (typically in O(logn) sequential time) the subdivision to which the point belongs. If the sub-division does not have holes, the preprocessing time is dominated by the time to triangulate the sub-division. One of most elegant solutions was given by Kirkpatrick, who decomposed the sub-divisions into a hierarchy of planar maps of decreasing sizes. This has recently been used for determining intersections of polyhedra in three dimensions.
1.7. Arrangements The arrangement of n hyper-planes in d dimensions contains information about the (connected) regions into which the space is partitioned and the incidence relation between the regions of all dimensions. Arrangements are fundamental combinatorial structures that are useful for solving numerous problems including detecting degeneracy to motion planning.
2. Basic parallel routines In this section we will review parallel algorithms for problems like sorting, selection, and some basic parallel procedures that will be frequently used in the design of geometric algorithms. In particular, we will focus on randomized algorithms that are simpler and/or
Parallel computational geometry: An approach using randomization
775
faster than their deterministic counterparts. Most of the material in this section can be skipped without loss of continuity of the remaining chapter. In fact, we recommend that if the reader has some familiarity with parallel algorithms, he can go directly to Section 2.5 and refer back to the results of this section as necessary. Unlike other sections we have not attempted to develop all the algorithms from scratch. For more detailed treatment of the material of this section, we provide extensive bibliographic references at the end of this chapter. We have also omitted description of the more complicated algorithms, namely the sub-logarithmic time algorithms, as their understanding is not important for the development of the subsequent geometric algorithms. A detailed description of these methods is outside the scope of our discussion.
2.1. Parallel prefix computations Given n elements at (1 ^ / < n) from a semi-group where 0 is the semi-group operation, we are required to compute all the partial sums of the form Sk = 0 / = i <3/ for 1 < ^ ^ n. Since these partial sums can be computed in 0(n) time sequentially using a straightforward approach, an optimal PT product is O(^). Although an O(logn) time algorithm is not difficult to derive using a binary-tree. Cole and Vishkin [24] obtained the following result: LEMMA 2.1. In a CRCW (arbitrary) PRAM model, the prefix sum ofn elements can be computed optimally in 0(log n/ log log n) time.
2.1.1. List ranking. A related problem to prefix-computation is that of computing the prefix sums when the input is given as a linked-list rather than an array. This linked-list of n elements is a linear chain such that every element has in-degree and out-degree identically 1 (except for the first and the last elements). A special case is that of determining for every element in the list its distance from the head (or tail) of the list. Once the position of an element in the list is known, the algorithm for prefix sum can be applied to the linked-list prefix sums. Although an O(logn) time algorithm due to Wyllie [88] was known for a while, it used n processors and was not optimal. The following result was obtained independently by Anderson and Miller [10], Han [47], and Cole and Vishkin [22]. LEMMA 2.2. The list ranking problem can be solved in an EREW model optimally in O(logn) time.
2.2. Parallel sorting and selection Like sequential algorithms, sorting and selection play very important roles in the design of parallel algorithms. Various basic parallel routines like compaction and processor allocation can be accomplished directly by sorting. (We will see later that there are more direct and faster ways of implementing them.) Sorting also forms a preprocessing step for ordered searching where the searching is often performed in more abstract domains than an ordered set of points.
776
J.H. Reifand S. Sen
In the context of deterministic PRAM algorithms, the parallel mergesort algorithm due to Cole [22] is perhaps the most elegant and has small constants. The drawback however is that it is not amenable for network models. There are other known 0(\ogn) time optimal sorting algorithms, like the AKS-network [9], Reischuk [79] and Flashsort [78]. Both Reischuk's algorithm and Flashsort use randomization that we will describe in more detail. 2.3. In an EREW PRAM model, n keys from a totally ordered set can be sorted in 0(log«) time using n processors.
LEMMA
In the algorithms, whenever we refer to sorting we can use any of the above mentioned sorting algorithms without changing the running time by more than a constant factor. However, the development of quicksort is a natural exposition for the algorithms in the subsequent sections. 2.2.1. Parallel quicksort. In Reischuk's parallel adaptation of quicksort algorithm, \_^/n\ keys are chosen randomly such that each key was chosen with probability 1/v^. These keys (called splitters) are then sorted using pairwise comparisons from which their ranks can be computed easily. The latter can be done in O(logn) time very easily and we can do the pairwise comparisons simultaneously in constant time by using one processor for each comparison. These splitters partition the n input keys into LAAJ + 1 intervals in a natural fashion. For each key, we can determine the appropriate interval by a simple binary search using one processor for each key (using simultaneous reads). The algorithm is then called recursively in parallel for each interval. We have ignored here the task of putting the elements of each partition in contiguous locations for applying recursion properly; we shall discuss this later under the problem of semisorting. If n, denotes the size of the f-th bucket then we claim the following: LEMMA
2.4. The probability that, for any i, «/ is larger than c^/n\ogn
is less than
\/n^'-^\ PROOF. We shall show that for any key (whether or not it is in the sample), the probability that it is more than c-y/n\ogn away (in rank) from the next sampled key on its right is less than \/n^^'~^\ This follows from the fact that each key was chosen with probability 1/v^ and hence the above event can happen with probability less than (1 — \/^)^^^^ ^^^. For large n this can be bounded by \/n^'. Hence the probability that it can happen for any element is less than \/n^''\ Consequently the distance (in rank) between two sampled elements is less than c y ^ l o g n with probability at least 1 /n^^~^\ D
2.5. The above lemma can be extended easily to the case when the number of sampled keys is r for any r ^n. For any general r the proof of Lemma 2.4 extends easily to bound the interval sizes by 0(n logn/r) (the lemma was proved for the case r = n^^^). REMARK
In the following discussion, we shall use the bound that intervals are of size 0(n^^) where 6:0 > 1 — ^ for r = n'"*^ (the extra logn factor is subsumed in the exponent). Thus at depth / from the root, the size of a sub-problem can be bounded from above by w^o.
Parallel computational geometry: An approach using randomization
111
It may be helpful to view the algorithm as a tree where a node represents a subproblem and its children represent the recursive calls made by this node. For example, the root represents the procedure Sort[l..n] which has L'^^J + 1 children procedure calls each of size at most n^~^ \ogn. The leaves of this tree represent problems of size less than a predetermined threshold, say log^ n for some fixed integer r. At this stage the problem size is so small that we can use a direct sorting procedure like Batcher's sort to sort in O(loglogn) time, thereby adding a factor of o(logn). Our objective is to show that all the leaf-level procedures are completed in O(logn) time with high probability. For this it suffices to show that a particular leaf-level procedure is completed in O(logn) time. This leaf-node defines a fixed path from the root to the leaf such that the problem sizes at successive nodes of this path are decreasing. For this let us denote the node at depth / from the root by Ni, the problem-size by n,, and the time taken at Ni by Tt. We claim the following: PROPOSITION 2.6.
Pr [r, > k . 4 c a l o g n ] ^ 2-^^^oiog«^ where c and a are integers and k is a constant PROOF. From the previous claim and the comment in the previous paragraph, Pr[/i(/+i) > n^-^] < 1/nj for an appropriately chosen constant 0 < 6:0 < 1. We can verify this in 0(log ni) time (using prefix sum) and we repeat the sampling until n(/+i) ^n^.^.lfk log ni is the time for each iteration (of the sampling algorithm) then we can immediately conclude the following:
Pr[ro+i) > kcalogm] < 2-^'^2logn. If ni = 2^0 i°g" then we arrive at the required inequality. In this resampling scheme we have guaranteed that n(/+i) < 2^o^°g" so we have to prove that the claim is true when ni is strictly less than 2^oiog'^. Let m = 2'^^/''^^o^°§'' where a > 1. Substituting this value of n/ in the previous inequality we obtain Pr [r(/+i) > kca{l/a)s^Qlogn] < 2-^^2(i/a)4log«,The above inequality implies that Pr[r(/+i) >i^ca(LaJ/a)4logn] <2-^^^^L«J/^Hiog^/^ Since 2 [a J / a ^ 1 for any a > 1, the lemma follows. We shall now prove the following useful result:
D
778
J.H. Reifand S. Sen
THEOREM 2.7. Given a process-tree which has the property that a procedure at depth i from the root takes time Tt such that
Fr[Ti ^ kcalognisoY]
^ 2-^^o>'^"^^g"
then, all the leaf-level procedures are completed in 0(log«) time. PROOF.
Setting ti = kieoY logna(c —
CQ),
where CQ is some constant, we obtain
Pr[7;- >toc(£oy logn + r/] <2-^"«^'^'"'^g'^ ^ 2 - ^ ' / ^ If T is the total time for this worst case chain of nested calls and m = 1/(1 — ^o), the probability that T exceeds mka log nco -\-t is less than the sum of the probability of events where J2i U =t,t>0, and /x = mka logncQ. We shall compute the probability that ^ - ti = t. Wj^^.^^2-'' < Y.2-'l^ overr^^'^g^^g") tuples. Thus Pr[r > ^mof lognco + r] < 2-^/^+^^'^g''^g^^g^\ Using t ^ kma(c — CQ) logn, for large values of n and m > 1, we can rewrite the above expression as Pr[r > kmaclogn] < 2-"(^-^'o)iogn For c > 4co, i.e., c — CQ > 3/4c, we have the following required bound, Pr[r > alogn] ^ 2'^^^'^^'''^''^^ ^ n"^'^, assuming that /:, m, and c are larger than 1.
D
2.2.2. Selection. We will focus primarily on extremal selection, that is, choosing the smallest or the largest element in a given set A^ where lA'^l = n. General selection, that is choosing the /:-th ranked element for any 1 ^ /: ^ n, is an important problem in its own right but the geometric algorithms do not make use of that. It is known that extremal selection takes jr2(loglog/i) rounds using n processors in any reasonable parallel computing model of parallel computation. However, we will show that a fairly simple constant time randomized algorithm exists for selecting the smallest element. The idea is to make use of Lemma 2.4 and focus on the interval that contains the smallest element. Choose a set R of n'^^^ splitters randomly, and let the smallest element among the randomly chosen elements be RQ. The candidate elements for minimum are all those elements of A^ that are smaller than RQ', denote this set by N.J^rom the Remark 2.5 (following Lemma 2.4), the size of each interval does not exceed 0(n ^ 1^ log n) and hence this bounds IA^ I. If we ignore the time for processor allocation, then the entire algorithm works in time needed to compute the minimum of n^l^ elements using n processors, or equivalently computing the minimum of n elements using n^l^ processors. The latter can be done easily in 0(1) time as follows. Let k\,k2,.. .,kn be the input keys. Group the «'"^^/^ processors into ^/n groups Gi, G 2 , . . . , G/^ where each group has n processors. Each group G/ (1 ^ / ^ ^/n), in
Parallel computational geometry: An approach using randomization
779
parallel, computes the maximum of ^/n elements in constant time. This can be done by checking for each element ki, if there is a larger element in the input than ki. Using a processor for every pair and a special 'marker-cell' for every element this can be accomplished in 0(1) time. The processor comparing ki and kj writes (concurrently) into the 'marker-ceir /, if it finds that ki < kj. Only one 'marker-cell' will not be written into which corresponds to the maximum key. Subsequently we choose the maximum of the ^ maxima by another application of the previous strategy (there are n?/^ processors and only >/^ keys in this phase). After determining Ro, we have to 'compress' the elements of | A^| in contiguous locations for another round of the previous algorithm. In fact, even approximately compressing them (with some empty cells in between) also suffices for our purpose. We will discuss this in the next section.
2.3. Load-balancing and processor allocation For a large number of problems it has been observed that the processor complexity can be reduced by a careful scheduling of processors. For example, consider the problem of computing the sum of n elements. A naive algorithm would start with n/l processors and let the processors add the numbers in a pairwise fashion. By letting this pattern repeat over O(logn) stages, the computation is similar to that of a binary tree. However the processor time product is 0{n log n) which exceeds the sequential complexity by a factor of 0(log n). This can be rectified by a simple modification where we start with n/ logn processors and let each of them compute the sum of O(logn) elements sequentially and then proceed with the previous algorithm. Although this adds a factor of O(logfi), the PT product is asymptotically optimal. The following result due to Brent [17] makes this observation into a formal statement: 2.8 (Brent). Any synchronous parallel algorithm needing time T and a total ofR elementary operations can be executed on p processors in time [_R/p\ + T.
LEMMA
Let Ri denote the number of operations to be executed in the /th step of the algorithm (simultaneously), they can be computed in time \Ri/p'] with p processors. The total running time is therefore PROOF.
Y.^Ri/p^ ^ E (L/?//pJ +1) ^ VR/P\ + T. This observation is not as useful as it may seem at first sight because it doesn't take into account the time required to allocate processors to the tasks at every step i. By letting each processor simulate a fixed set of the processors of the previous algorithm we may obtain a more efficient algorithm. Notice that the slow down lemma stated earlier is a special case of this lemma. In our example of the summation of n elements, we can view it as the following: let each processor simulate the operations carried out by O(logn) processors
780
J.H.ReifandS.Sen
of the naive algorithm. This task scheduHng is possible since the execution profile can be determined in advance. By the execution profile we mean the task carried out by every processor at any time step. In other cases the scenario is much more unpredictable. Even though we can determine that the total number of operations is R,hy simulating a fixed set of processors with one processor, we may not be distributing the load evenly among all processors. Brent's theorem assumes that we can distribute the tasks almost evenly among all processors to achieve the optimal running time. We shall now consider a special case where the parallel algorithm has the following property: The algorithm has O(logn) stages such that the total number of operations is 0{n). Using n processors, the algorithm executes in O(logn) time, and at stage / only n/T processors are active (but we do not know in advance which processor is active in a particular stage). A processor that ceases to be active at any stage does not participate during the subsequent stages of the algorithm. We make the following claim: D CLAIM 2.9. The algorithm can be made to run in O(logn) time using only processors in a CRCW PRAM model.
0{n/\ogn)
The following scheme relies on the sub-logarithmic time algorithm for prefix-sum. After O(loglogn) stages, only (n/log«) processors are required. From the slow-down lemma, we know that for p ^ (n log log n/ logn) we can compute the prefix sum in optimal time. In stage / of the algorithm (/ < log logn), we let each new processor simulate logn/2^ active processors. To distribute the load uniformly at stage /+1, we first associate a tag '0' with a processor that is not going to be active in future and a tag T otherwise. We can find the A:-th active processor k ^n/T~^^ by a prefix sum. Then we let a new processor with processor-id j simulate a block of logn/2'"^' processors that are active in the (/ + l)-th stage. The additional time needed for re-distribution of processors over all the O(loglogn) levels using this scheme is loglog^
E o ( f ! ) = 0(iog„,. The claim holds as long as the problem size decreases by a constant factor (not necessarily 2) and proof follows on the same lines.
2.4. Semisorting A very important component of recursive parallel algorithms is the actual divide step. That is, after figuring out the recursive subproblems, we have to collate the elements of a subproblem together to restore the initial condition for recursive calls. When this division is uniform and predictable, like dividing the input array across the median (like the mergesort), then this step is trivial. On the other hand the elements of a subproblem can be scattered unpredictably so that these have to be brought into contiguous locations before
Parallel computational
geometry: An approach using randomization
781
we can proceed with the recursion. In the geometric algorithms that we will develop, we will often deal with the latter scenario, so we shall examine this in some detail. Also recall that in the parallel quicksort this is an important step. A natural way to think about this problem is to associate integral labels (from a certain range) with each element of a subproblem — that is, all the elements of a subproblem have unique integral labels. In a problem of size n, it is unusual to have labels that exceed n, so we shall restrict ourselves to the case where the labels are in the range [1...«]. For the special case where there are only a constant number of labels, the counting techniques of the previous section can be used. DEFINITION 2.10 (Semisorting). Given n elements in range 1.. .m, place these in an array of size 0(n) such that if there are nt elements having label 1 ^ / < m, these are placed in a subarray of size 0(n/). Moreover, the subarrays corresponding to distinct labels should not overlap.
Clearly semisorting can be accomplished by sorting on the integer labels, namely by integer sorting. However, the definition of semisorting allows for more flexibility that will be exploited later for sub-logarithmic algorithms. We will now describe a method for semisorting when labels are in the range 1 • • • — ^ ^
^
log n
(somewhat smaller than n). Assume that we know how many elements of each label are present in the array; we shall return to this problem when we discuss approximate counting. Semisorting can be done by allocating a subarray of the required size for each label and then actually placing the elements in the appropriate subarray. The former can be done by using parallel prefix sums to compute the boundaries of the non-overlapping subarrays from the size requirements. Suppose there are at most ni elements having label / (that is we have an overestimate of elements with label /), such that J^- ni is 0{n). Let the subarray /(/) corresponding to label / have addresses from S{i) to F{i). Now each element having label / has to be placed in a location in / ( / ) . We call this the placement problem. When two (or more) processors try to place elements of label / into the same location (in /(/)) we call that collision. As there is no restriction on where a certain element having label / is placed in / ( / ) , it is difficult to avoid collision. However, if |/(/)| > / • n/ for some / > 1, then the chances of collision are less. More formally, if elements are placed in a random location in / ( / ) , the probability of collision is no more than 1 / / . In the case of a collision, an attempt is made to place the element again. The expected number of tries for an element is / / ( / — !)• The above observation can be refined into the following claim, which we state here without proof. LEMMA 2.11 (Placement Lemma). Using P ^ n/logn processors, the placement problem ofn elements can be solved in 0(n/P) time in an arbitrary CRCW model. 2.4.1. Estimation and approximate counting. We now address the problem of estimating the number of elements having label / for all / e[D] without explicitly counting all the labels^ More specifically, for each label /, we want to determine a number D(i) which is We are using [D] to denote ( 1 . . . D}.
782
J.H. Reifand S. Sen
an upper-bound on the number nt of elements having label / and additionally ^ - D{i) is 0{n). We describe a method by which we can reduce this problem to explicit counting of only n/K elements for any K ^ oioQn' We first sample every element with probability -^; call this set A^^. Denote the number of elements in Ns having label / as Ds{i). This is obtained by explicitly counting them (which is much smaller than n). Let D(i) = dK max(\Ds(i)\, logn) for / e [D], where d is a constant which will be determined in the analysis. If Hi ^ dKlogn, then always D(i) ^ dKlogn ^ «/. So suppose ni > dKlogn. It is easy to see that \Ds(i)\ is a binomial variable with parameters (n/K, ^ ) . The Chemoff bounds (see Lemma 1.3, Eq. (5)) imply that for all a ^ 1, there exists a c such that
^
'
n^
Therefore, if we choose d = (ca)~^ then D(i) ^ «/ (for every / e [D]) with probability > 1 — n~^. The Chemoff bounds (Eq. (3)) also imply that for all a ^ 1 there exists an h such that D(i) ^ (ha)ni (for every / e [D]) with probability ^ 1 — n~". Moreover, ^D(/) < ^ ie[D]
J/:[|D5(/)|+logn]
/€[D1
= dKD\ogn-\-d\og^n
^
\Ds(i)\
ielD]
= dn-^dK
n/K = 2dn
given that K ^ oio^n • ^ ^ ^^^ summarize the above observation in the following manner that will be useful later. LEMMA 2.12 (Estimation Lemma). For any K ^ -jyj^^ ^y examining only a \/K fraction of a given input of n elements with labels /i,/2,...,/« G [D] we can compute Nil), N(2),... such that X!/efDl ^(^) — ^{^) ^^d with very high likelihood N(i) > nt for each i e [D] where ni is the number of elements with label i.
The immediate utility of the above lemma is in increasing processor efficiency of parallel algorithms. The problem of estimating the number of elements with a particular label has been reduced to exact counting for a small fraction of elements, thereby reducing the number of processors. The exact counting for smaller number of elements can be done using less efficient algorithms. In particular, we can now use fast parallel sorting algorithms that are suboptimal. We refer the reader to the bibliography at the end of the chapter for references to such algorithms. We state the following result for semisorting LEMMA 2.13 (Semisorting). Semisorting of n elements with labels in the range [ 1 . . .w] can be done in O(logn) time using n/logn CRCWprocessors.
Parallel computational geometry: An approach using randomization
783
2.5. Randomized symmetry breaking with application to point location In a number of parallel algorithms a typical scenario is that a processor has to make a choice based on local information and there is (apparently) not much to distinguish between the choices. However, from a global perspective the local choices, if not properly coordinated, could be quite disastrous. Consider the following problem of identifying a large independent set in a linked list C of n elements. Recall that an independent set is a set of nodes that do not have edge (links) between them. By a large independent set, we imply a set that is larger than ^ • n for some constant s >0. This is also called iht fractional independent set (FIS). We know that the maximum sized independent set is of size at least n/2 (by choosing the elements with either the odd ranks or the even ranks). If the given linked list has not been ranked (the distances of each element from the end is not known), it is not easy for a processor to determine if a given element is of odd or even rank. So locally it is difficult to figure out simultaneously for each element whether or not to include it. However, inclusion (or exclusion) implies that its neighbor will be excluded (included). Sequentially, it is a simple procedure, but concurrent decision-making between symmetric situations causes complications in parallel context. Consider the following method. Let us choose a tag tt € {0,1} with equal probability for each element i e C. Let A^o and A^i denote the sets of elements that have tags 0 and 1 respectively. Note that the expected size of No (and N\) is n/2. We choose an element x to be in FIS of the linked list A^ if and only if (1) xeNx (2) The (at most two) neighbors of x, J\f{x) have tags 0. The first condition limits the FIS to be a subset of N\ and the second condition ensures that two neighboring elements of the list are not chosen. The expected size of FIS is ^ P r [ / € FIS] = Y^Vx [{i G Ni] n {M{i) C A^o}]i^C
ieC
This is at least n/8 using the fact that an element is assigned tag 0 or 1 with probability 1/2. This procedure takes time 0(n/P) with P processors in an EREW PRAM and is the basis for a very simple optimal list ranking algorithm. The first geometric algorithm for planar point location makes very crucial use of the above technique which is often referred to in the literature as random mate. 2.5.1. Point location in triangulated planar maps. A Planar Straight Line Graph (PSLG) is an embedding of a planar graph on the plane using only straight line edges. Given a PSLG and a query point, the point location problem is to identify the subdivision in the plane (induced by the PSLG) which contains the query point. In addition we assume that the given PSLG is already triangulated. In a latter section we shall describe efficient parallel algorithms for triangulation so that this assumption is not a serious bottleneck. For a PSLG with n vertices, the optimal query time of O(logn) with 0{n) space can be achieved by some very elegant methods [36,57,81]. The performance is achieved by binary search on a well organized data structure constructed on the PSLG during the preprocessing. We describe a randomized method by which the preprocessing can be done in O(logn) time with very high probability using 0(n) processors given a triangulated PSLG.
784
J.H.ReifandS.Sen
Kirkpatrick had proposed a triangulation refinement technique which builds a hierarchy of triangulated PSLG from the initial graph. A review of his method will help the reader to understand the parallel version presented here. Starting with a triangulated PSLG (i.e., all faces including the exterior face are triangles), his algorithm removes an independent set of vertices, and retriangulates the remaining graph. In addition, it keeps track of the set of the eliminated triangles that have non-empty intersection with each of the new triangles of the re-triangulated graph. This procedure is repeated successively until we are left with a constant number of triangles. Actually, we can stop when the problem size is reduced to 0(log«). The search proceeds in a hierarchical manner from the top level, where the problem can now be solved in constant time or 0(log«) time if we stop at an O(logn) size graph. Subsequently, at each level we relocate the point with respect to the triangles that intersect the triangle in the current level, thus refining the regions of location at each level. At the lowest level the point is located with respect to the regions of the original PSLG and the search terminates. The search data structure is a directed acyclic graph. Each of the nodes represents a triangular region, and is connected by directed arcs to all the triangular regions that it intersects in the previous level. At any node, the algorithm determines which of its children the point lies in. Notice that a node can have more than one parent and hence the graph (the underlying search structure) is not necessarily a tree. The efficiency of this approach depends on the number of levels of the triangulated PSLG, and the number of intersections of each triangle with the triangles in the next lower level. By guaranteeing that a constant fraction of the vertices, and hence the triangles (since it is a planar graph), are eliminated at each successive level a logarithmic level search is achieved. However, in doing so, one must also be careful that a triangle intersects a maximum of a constant number of triangles in the next level (i.e., each node has a bounded constant degree so that a constant time is spent at each search level). Both of the above criteria can be satisfied by identifying an independent set of vertices each having a degree ^ J, where J is a fixed constant. The number of edges in a planar triangulated graph (V, £"), where V and E are the vertices and edges respectively, is 3|y| — 6 from Euler's formula (assuming that the exterior face is also a triangle). This adds up to a total vertex degree of 6| y I — 12, giving us a lower bound on the number of vertices with degree less than d. Thus the number of vertices with degree less than d is at least 6| V|/J — 2 in a triangulated graph for J > 6 (a typical value of d is 12). Since a constant fraction of these vertices can be eliminated at each stage by identifying a maximal independent set of vertices, the height of the search tree is at most 0(log | V |). The preprocessing time is dominated by the identification of this independent set of degree ^ d, which costs linear in size of the PSLG at each level resulting in total time of 0{n). If the initial PSLG is not triangulated, the cost of triangulation dominates the preprocessing time. In the discussion below we present a randomized method to identify a large independent set in constant time for each level using n processors with a high probability. As a result, the search structure can be constructed in 0(log«) time. We associate a processor with each vertex and each edge of the PSLG {V.E). From Euler's formula we need only 0 ( | y | ) processors for the PSLG. An independent set consisting of vertices of degrees less than or equal to d can be identified by generalizing the random-mate technique described in the previous section.
Parallel computational geometry: An approach using randomization
785
Algorithm FIS Input: A PSLG in the form of a doubly connected edge list (DCEL). Output: A large independent set of vertices with degree ^ d. (1) Identify the set of vertices with degree ^ d. This can be done in constant time using one processor for each vertex. There will be at least 6\V\/d (ignoring the small constant) such vertices (from the previous discussion). (2) This has two phases: (2a) Randomly assign a tag 'male' or 'female' with equal probability to each selected vertex from Step (1). The 'males' constitute the candidates for an independent set. For each edge between two 'males' pronounce both vertices 'dead' by marking their corresponding cells. This is easily done by using one processor for every edge with concurrent write capability. Note that it is very easy to get rid of the concurrent-read feature since a vertex has at most degree d and hence this step can be carried out in constant number of steps (instead of exactly one step). (2b) The 'males' which are not 'dead' form an independent set. (3) Output the set X of 'males' which are not 'dead'. The set X is an independent set of vertices having degree less than d. REMARK
2.14. We have used 'male' and 'female' instead of the tags {0,1}.
It is obvious that the algorithm gives us an independent set which is possibly smaller than the maximal independent set (a null set in the worst case for a chain of males). However, we shall show that on the average, this technique will produce an independent set proportional to a constant fraction of the total number of nodes (vertices of degree ^ d) with a very high probability. LEMMA 2.15. Let \V\ =n and let rid denote the number of vertices with degree less than or equal to d (nj ^ 6n/d as shown earlier). There exist constants c, y (0 < v < 1), such that
Pr [|X| < vn] < exp {—en). PROOF. Assuming equal probabilities for a vertex being assigned a 'male' and a 'female' tag, the probability of a vertex being in the independent set is greater than or equal to (1/2)^"^^ (since it has ^ J 4-1 neighbors). We consider an independent set h(nd) of vertices which are at a distance 3 (i.e., the shortest distance between any two vertex in this set is three edges). Since the graph had a bounded degree d, the selection of each vertex can prevent the selection of at most dmax = (d - 1)^ -\-(d- 1)^ + (fif - 1) other vertices. Thus the cardinality of this set is at least (1/Jmax) • 6n/d or 6n/D (D is a constant). The event of a vertex v e I3 (n^) being in X (independent set) is independent of any other vertex in hind). Thus the distribution of the cardinality of the independent set produced by algorithm Random-mate can be bounded from below by a binomial distribution with p = (1/2)*^"^^ and expectation /JL = \h(nd)\p ^ 6np/D.
786
J.H. Reifand S. Sen
Using Chemoff bounds (see Lemma 1.3, Eq. (2)), for 0 < ^ < 1, Pr[|XK(l-^)A6]exp(-^V2). Using V = (1 — 8)6/D and c = 8^/{\2D) we obtain the required result.
D
We have shown that with very high probabihty, the size of the independent set will be greater than a constant fraction of n, which is the key to finding a logarithmic depth search structure. We now present the complete algorithm below. Procedure Point-Location-Tree (1) Let Ni be the number of vertices in stage / where No = N.lf Ni ^k log n (for some fixed constant k), then halt (we can then locate the query point in the 0(log/i) triangular faces in O(logn) time using a single processor). (2) Choose an independent set of vertices that have degrees < 12 using the method described above with d = \2. The time for this step is 0(1). (3) Triangulate the remaining PSLG (after the removal of the independent set). Note that removal of a vertex of degree d necessitates triangulating a simple polygon of d vertices. This can be done in constant time using 1 processor for each polygon. In addition, the adjacency list of the vertices incident on the edges (removed or inserted) have to be updated. All this can be done in 0(1) time with one processor for every vertex. (4) Determine for each of the new triangles (created in Step (3)), which of the old triangles it intersects. This can also be done in constant time using one processor for each of the new triangles using concurrent read. (5) Increment / and go to Step (1). THEOREM 2.16. Algorithm Point-Location-Tree runs in 0(logn) time using 0(n) processors and 0(n) space in a CREW PRAM model. Furthermore, if the input PSLG is triangulated, we can reduce the processor bound to 0(n/ \ogn) without increasing the asymptotic running time of the algorithm. PROOF. Each of the steps at any level of recursion of the algorithm can be done in constant time using 0(n) processors. From Lemma 2.15, there exist constants v and c such that the probability of reducing the problem by a constant fraction (1 — y) is very high. Let nt denote the problem size (the number of vertices remaining in the graph) at stage /, where no = n. We show that after O(logn) stages, the problem size is less than O(logn) with very high likelihood. From Lemma 2.15, Pr[n/ ^ (1 — y)n/_i] > 1 — n~^'^ for n/_i > Klogn for some constant K. The probability that this fails to hold in any level / (1 ^ / ^ logj/^j.^^w) is less than n~^^^^ for any 5 > 0. We abort the algorithm if the number of vertices is greater than K \ogn after the last stage and re-run the entire procedure. The argument for space is similar to the sequential case. If the input PSLG is triangulated, the number of operations performed is linear in n (follows from the sequential algorithm). Using Slowdown technique, the processor bounds can be reduced to 0{n/ logn) without affecting the asymptotic run-time. D
Parallel computational geometry: An approach using randomization
1%1
2.6. Suhlogarithmic routines For a while, the designers of parallel algorithms were apprehensive about investigating parallel algorithms that achieved a running time of o(logn). This was mainly due to a lower bound of ^{\^^) running time for parity in the CRCW model even by using a polynomial number of processors. There were a few exceptions like the extremal selection that can be done in constant time (using n^ processors). Moreover, for the weaker models like the EREW and the CREW models, O(logn) is a lower bound for computing a simple function like OR of n bits using a polynomial number of processors. So logarithmic time appeared like a natural barrier for most of the interesting problems, including sorting and prefix sums. Note that if one could sort elements into an array of size n, parity can be computed in constant time after that. Since sorting is considered such a fundamental problem, the idea of suhlogarithmic time parallel algorithms were considered fairly impractical for most sorting-related problems. There were attempts to study parallelism in even stronger models like parallel comparison tree (PCT) where the only operations that are counted are comparisons. So, for example, counting or processor allocation is not accounted for. These results were much better than CRCW PRAM but the PCT model is considered too unrealistic for designing algorithms and primarily a tool for proving lower bounds. The situation for CRCW models changed dramatically with a slightly modified notion of sorting csilled padded-sorting, first defined by MacKenzie and Stout [62]. Roughly speaking, the problem of padded-sorting involves ordering the input of size n into an output array of size m ^ n. When m = n, or when m is very close to n, the lower-bound of selection becomes applicable. A crucial factor in the performance of the padded-sorting algorithm is the size of the output array m, or more specifically, the ratio m/n.lfm = (l^X)n, then A. is called tht padding factor. A surprising result (that we state below more formally) showed that it is possible to match the bounds of the PCT even for a padding factors significantly less than 1. There is actually a tradeoff between A, and running time; however we state a slightly simplified version that will be useful for our purpose THEOREM 2.17. Given n elements from an ordered universe, these can be sorted with kn CRCW processors in 0(logn/log^) time with a padding-factor k < 1/logn. Moreover between any log n consecutive input keys, there is no more than one empty cell in the output array. REMARK 2.18. The speed-up implied by this theorem is known to be optimal in the PCT model. A nice consequence of Theorem 2.17 is to ordered searching. The output of the padsort algorithm makes it almost directly applicable to search for the predecessor of a given key value. We simply probe the elements like a normal binary search except that when an empty cell is probed, we make an extra probe in the adjoining cell. As a consequence of Theorem 2.17 two adjacent cells cannot be empty. Alternatively, we may simply fill up the empty cells with the contents of the preceding cell and do a usual binary search. The same holds true for any ^-ary search. In summary LEMMA 2.19. The output of the padded-sorting algorithm can be used for performing k-ary search on an n-element ordered array in 0(\ogn/ \ogk) steps.
788
J.H. Reifand S. Sen
The algorithms that we develop in the following sections depend critically on sorting and searching and we will be able to use the above results to derive even sublogarithmic time algorithms in the same spirit as padded-sorting. Note that sorting can be used to accomplish some of the basic parallel routines like semisorting and compaction. However, there are more efficient and direct algorithms now available for these tasks. 2.20 {Approximate Compaction). Given n elements, of which only d are active, the problem of approximate compaction is to find the placement for the active elements in an array of size 0(d). DEFINITION
DEFINITION 2.21 (Interval Allocation). For all n e N, the interval allocation problem is the following: Given n non-negative integers jci,..., jc„, compute n nonnegative integers j i , . . . , y^ (the starting addresses of intervals of size jc/) such that (1) For all /, 7, the block of size jc/ starting at yi does not overlap with the block of size Xj starting at yj. (2)m^x{yj:l^j^n} = 0(j:.Xi). The interval allocation problem can be looked upon as a very general method for processor allocation. The integers xi represent the processor requirement for task /. After interval allocation, we simply divide up the y array equally among the processors, thus ensuring load balancing. The constant hidden behind O of the output array captures the slow-down from the ideal load-balancing. The following result is stated without details of the algorithms. LEMMA 2.22. There is a constant e > 0 such that for all given n,k e N, problems of of interval allocation and approximate compaction of size n can be solved on a CRCWPRAM using 0(k) time, 0{n log^^^ n) processors and 0(n log^^^ n) space with probability at least 1 — 2~" . Alternatively, it can be done in 0(t) steps, t ^ log* n using n/t processors.
3. Random sampling and polling in computational geometry Divide-and-conquer is certainly the most commonly used technique for designing parallel algorithms. The idea is analogous to sequential algorithm design where the original problem is sub-divided into smaller subproblems and then the solutions of the subproblems are combined to obtain a solution to the original problem. The smaller subproblems are solved recursively until a sub-problem size becomes smaller than a predetermined threshold. At this stage a direct (usually brute-force) method is used to solve it. For analyzing this procedure it usually suffices to write down the recurrence equation for the time complexity as: \F(n)
otherwise,
where ^ is a predetermined threshold, ni is the size of the /th subproblem, F is the complexity of a direct algorithm and g(n) is the cost of dividing the problem and recombining the solutions.
Parallel computational geometry: An approach using randomization
789
For a number of problems, J ] - ni = n and hence it is the size of the largest subproblem (which is of size less than n) that is crucial for determining the running time of the algorithm. The equations for the processor and the space bounds can be written similarly, and the processor complexity is the maximum number of processors used at any step of the algorithm. Since there is a trade-off between the number of processors used and the running time, sometimes it becomes necessary to write a recurrence using two variables namely, the problem size and the number of processors used. A generalization of the above procedure is to allow for expected bounds where it is possible to write down the recurrence equation for expected bound with respect to a specific resource. In the above equation for time bound, we can associate a distribution with the size of the largest subproblem, and the solution would be the expected running time of the algorithm. The exact distribution is often hard to ascertain and in most cases only the expectation is known. For some special forms, one can solve these probabilistic recurrence relations satisfactorily (see Karp [53]). However, for most cases, such general solutions are hard to obtain. One example is the parallel quicksort described in the previous section where our analysis (proof of Theorem 2.7) depended heavily on the tail estimates of problem sizes. In the context of computational geometry, sorting can be looked upon as a onedimensional problem. The basic tools that we will develop in this section will enable us to extend some of the techniques to higher-dimensional problems. In some sense, this exercise can be viewed as (although readers are cautioned against over-simplified conclusions) expanding the basic paradigm of quicksort-like algorithms. For the most of this section, the techniques discussed are very general without reference to any particular problem. We shall present some interesting applications in the next section to specific problems where algorithms will be presented more formally.
3.1. Random sampling The divide-and-conquer mechanism that we will use is based on partitioning the problem using a random subset of the input. Recall that in quicksort, the input was partitioned by splitters that were randomly chosen elements of the input. For the higher-dimensional problems, it is not obvious how these splitters partition the input in the absence of a linear ordering. EXAMPLE 1. For concreteness, consider the problem of constructing the trapezoidal map of a given set N of line segments. These segments partition the plane into regions which may have complicated shapes. By passing vertical lines through every end-point and intersection, these regions get partitioned into trapezoids or triangles (degenerate trapezoids). The vertical lines are not allowed to cross line segments. See Figure 1 for an illustration. We will denote the trapezoidal map of a set S by T{S) and the set of trapezoids in T{S) as H{S). By choosing a random subset of line segments R c N, it is not clear how to partition N as there is no natural ordering between segments (like points in a line). Since it is a two-dimensional problem, a natural solution is to consider the two-dimensional partitions induced by R. For example, consider T(R). For any trapezoid A e H(R), consider
790
J.H. Reifand
S. Sen
Fig. 1. Trapezoidal map of a set of line segments.
T{N) restricted within A. The union of Z\ fi T{N) for all A e T(R) contains all the relevant information about T(N). Thus we can recursively compute construct T(N) within each A e H(R). We will denote the line segments intersecting a trapezoid A e H(R) by L(A) so that recursively we compute T(L(A)). From our earlier discussion, a bound on max{L(Z\)} will be crucial for the running time of the algorithm. In addition, the quantity ^^ L(A) is also important as a segment s e N can intersect many As implying that this quantity could exceed n. So it represents the blow-up in the overall problem size in a recursive call and would affect the overall efficiency of any recursive algorithm. REMARK 3.1. In the case of quicksort, we did not have to worry about it since an element would belong to exactly one interval. EXAMPLE 2. Consider the problem of computing the intersection of a set N of half-spaces in three dimensions. If we adopt the previous approach, we choose a random sample R of half-spaces and construct the intersection f]R. For convenience, we assume it is nonempty and contains the origin in its interior. Unlike the previous case, we do not have regions analogous to the trapezoids. With some thought, it is not difficult to come up with sub-divisions analogous to trapezoids. For example, the pyramids formed by joining the
Parallel computational geometry: An approach using randomization
791
origin to every vertex of the intersection. For technical reasons that will become clear later, we will like to have these regions, which we shall call ranges defined by a constant number of input objects or equivalently having constant size. A pyramid defined as above can have a fairly large base if the corresponding face (of H ^ i^ large). By further subdividing the bases using parallel translates of a fixed plane, we can restrict the pyramid bases to be trapezoids (or triangles), so that these have constant size. The intersection P| N can be constructed recursively within these pyramids. In this context, L{A) denotes the set of half-spaces whose defining half-planes intersect a pyramid A. The previous examples would have given the reader some intuition about how random sampling gives rise to a natural class of divide-and-conquer algorithms in computational geometry. It is not difficult to come up with a suitable definition of range in the context of a given problem. To prove any interesting results about these algorithms, we have to bound the quantities max{L(Z\)} and ^ ^ L{A). The former is crucial to bound the depth of recursion, which determines parallel running time and the latter will determine the efficiency of this approach. We shall prove some useful bounds for these quantities for fairly general situations. From here, we will use A to denote a range in an abstract setting where a range is a subset of the Euclidean space E^ defined appropriately in the context of the problem in E^. We will require that a range be defined by at most a constant number of input objects, say b which bounds the possible number of ranges by a polynomial in n, namely 0(n^). In the case of trapezoidal maps, the reader can verify that b is 4. We will use 1{A) to denote |L(Z\)| which will be referred to as the conflict size of A. Note that we are interested in those ranges A where z\ is a range in T(R). The following result gives a bound on 1(A) for a random sample R. LEMMA 3.2. For \N\ =n and a random sample R obtained by choosing every element of N independently with probability r/n, maxz\{/(Z\)} can be bounded by 0 ( - logn). REMARK 3.3. The lemma uses sampling in a slightly different manner than what we had discussed previously. However, it can be seen easily that | /^ | is r -h o(r) with high probability and the same bound would hold for a random sample of size r exactly. In the subsequent discussions, we will not distinguish between these sampling schemes. PROOF. TO avoid complicated notations required for general situations, we will prove it for a special case, namely trapezoidal maps. Extensions to other problems like intersection of half-spaces and other problems considered in this chapter are fairly straightforward. The reader can refer to Clarkson [26] or Mulmuley [67] for more general proofs. For any trapezoid A, L{A) can be partitioned into two disjoint classes — those segments that intersect some (possibly more than one) boundary of A and the others that lie completely within the A. We will bound each of these sets, denoted L\{A) and L2(Z\), by 0 ( ^ log/t). Let £ be the union of vertical line through the end-points or the intersection points and the input segments — \C\ can be bound by O(n^). For a fixed line in C look at the ordered intersections of A^ with this line and the intervals induced by the sampled segments in R. The maximum size of any interval is a bound on L\{A). This can be bounded by 0 ( - \ogn) using arguments identical to Lemma 2.4 and Remarks 2.5.
792
J.H.ReifandS.Sen
For bounding L2(Z\), we define a trapezoid A to be 'bad' if it has more than an logn/r segments and none of them is chosen in R. The probabiHty that a Z\ is 'bad' is less than (1 - ^)^"i«g^/^ < ^ . The number of potential trapezoids A is Oin"^) for n segments. So no trapezoid is 'bad' with high probability, for a > 5. This implies that for A e H(R), L2(A) is bounded by 0 ( " logn) since the event A e H(R) is 'bad' is a special case of the previous event. D REMARK 3.4. The argument that we used for L2(Z\) wouldactually holdfor L1(Z\) also. However, for a number of problems, the arguments are no more complicated than the one we used for L1(Z\). For the intersection of half spaces, a similar argument is applied to the segments joining the origin with a vertex of the arrangement of planes (bounding the input half-spaces). In this case, we bound the number of unsampled planes before the first sampled plane starting from the origin. The bound can be improved in the following direction — with probability at least 1/2, max^{/(Z\)} is 0(j logr) (logn is replaced by logr). See [26] for details.
The next result bounds the expected value of ^ ^ /(Z\). LEMMA 3.5. For | A^ | = n and a random sample R obtained by choosing every element of N independently with probability r/n,
Y,KA)\^o{^^E[\H{R)\\\, where EWH{R)W is the expected number of ranges in T(R). PROOF. Again we will prove it specifically for trapezoidal maps; extension to other problems dealt here is straightforward. Note that the segments in L2(A) present no complications since these segments lie exactly in one trapezoid so that J2A 1^2(^)1 ^ ^- As E[\H(R)\] is ^ ( r ) , this is subsumed by the right hand side. So we focus only on L1(A) and in the remaining proof/(Z\) will denote the segments in Ll(A) only unless otherwise stated. Again, let C be the union of vertical lines through the end-points or the intersection points and the input segments. For a fixed line in C look at the ordered intersections of A^ with this line. We associate a random variable Z/ with each such intersection / that represents the number of unsampled segments of A^ before the first sampled segment in the upward direction. Let 7/ be corresponding the random variable for the downward direction. (The cardinality of the index set of / can be bounded by a polynomial in n and we do not care how they are numbered.) Since each segment is sampled independently with probability r/n, Xi has a geometric distribution with expected value E[Xi] ^n/r. The inequality takes care of the case where there aren't n/r intersections above /. The same holds for the 7/. The number of A e H(R) is itself a random variable so that from the law of conditional expectation
J2^(A)] A
= ^Pr[|7/(/^)| =/:]./:. -I
E[1(A)]
=
E[\H(R)\]
• E[l(A)l
Parallel computational geometry: An approach using randomization
793
where E[l(A)] denotes the expected size of 1(A) for A e H(R). The expected number of trapezoids E[\H(R)\] depends on the number of sampled segments and also on the number of intersections between segments of R. Although we don't know which A appear in the sample, in the above equation, we have only used the expected cardinality of the set of A. From Claim 3.6, it follows that for each trapezoid A G H(R), L1(A) is the union of at most six Xi's. Although the X/ 's are not independent, from the linearity of expectation
E[l(A)]^6-E[\Xi\]^o('pj.
CLAIM
D
3.6. For any A e H(R), L1(A) can be written as a union of at most six Xt.
For every end-point or intersection point j , associate a trapezoid Aj for the A G H{R) containing j (or the trapezoid on its right if it lies on the boundary). For distinct j \ and 72, ^ji could be the same as Aj^. We shall show that for any j , L1 {Aj) is the union of at most six Xi. Since every A e H(R) is Aj for some j , the claim follows. Our arguments are valid for any arbitrary point in the plane and not necessarily an end-point. For an arbitrary j , let D and L be the first sampled segment in the downward and upward directions respectively. We thus have the upper and lower bounding segments of Aj. Let the vertical projections of j on U and D be Uj and dj respectively. The set of segments intersecting Aj intersects L, D or one of the two vertical boundaries (which we haven't discovered yet). The segments intersecting U within Aj is the union of Xuj and Yuj. Likewise the segments intersecting D is the union of Xjj and Y^j. See Figure 2 for an illustration. The segments intersecting the right vertical boundary of Aj can also be bounded by union of X^ and Yr where r (an end-point of some segment) defines the right-boundary of Aj. The argument for left-boundary is identical. This gives a bound of eight Xt's (two for each boundary of Aj). It can be improved to six by walking around the boundary of Aj rather than looking at the four boundaries separately. In this claim we have not distinguished between Xt and F/ which are identical for our purpose except for the geometric orientations. In the proof we used a hypothetical ordering in the way the samples are selected (for example by coin-tossing) so as to 'discover' the relevant trapezoid. Since H(R) is not dependent on the order in which the individual segments are selected, the bounds are not dependent on it either. D PROOF.
The result of Lemma 3.5 can be extended to the case where we are interested in higher moments, namely E[^^ l^i^)] for c < 1. Unfortunately the previous proof-technique is unable to deal with segments in L2(A). Our arguments only apply to situations where all the elements intersecting a range A also intersects a boundary of ^ . The proof given below assumes that L(A) = Ll(A). This is true for the constructing intersection of half-spaces and arrangement of lines. For a more general proof, the reader can consult [30,67] of the bibliographic references.
794
J.H. Reifand
S. Sen
Fig. 2. Segments intersecting Aj.
LEMMA 3.7. For \N\ =n and a random sample R obtained by choosing every element of N independently with probability r/n,
^r(^)]=o(^(^"y.E[lH(/?)i]^, where E[\H{R)W is the expected number of ranges in T(R) andc is a fixed positive integer {independent ofn). PROOF.
From the proof of Lemma 3.5, it follows that
£[^/'(Zi)]=0(£[xn)-£[|//(/?)|], where Xi has a geometric distribution. It can be shown that for a geometric random variable with success probability p, the c-th ordered moment is
s<(^)>
Parallel computational geometry: An approach using randomization
795
where the constant hidden behind O is about /'. For fixed c and p = r/n, the required bound follows. D The above bound is useful in situations where the algorithm's performance can be expressed as E[J2A ^""C^)] (cf. Section 4.4).
3.2. Converting expected bounds to high-probability As discussed in the beginning of this section, the probabilistic recurrence relation arising from a recursive randomized algorithm are often hard to solve without the knowledge of the tail distributions. The parallel algorithm's running time is the maximum of the resulting recursive calls unlike the sequential algorithm where it is a sum of the running times of the recursive procedures. The latter becomes easier to bound from the linearity of expectations. No such nice properties are known about the maximum of expected values and it does appear to depend on the tail estimates. This informal discussion is a motivation for the results obtained in this subsection; we do not claim that this is the only way to get around the problem of bounding maximum of expected values. The naive random sampling gives us a high-probability bound on the maximum size of a subproblem (Lemma 3.2) and only an expected bound on the sum of subproblems (Lemma 3.7). We can restate these results in the following manner. LEMMA 3.8. For suitable constants /ctotal (^^d ^max the following conditions hold with probability at least \/2for a sample where each of the n input elements has been selected independently with probability r/n. (i) The maximum size of a subproblem is less than /^maxf logn (ii) The sum of the subproblems is less than ^totalf * ^ [ | ^ ( ^ ) | ] -
From Lemma 3.5 and Markov's inequality we can choose /ctotai such that the probability that (ii) fails is at most 1/3 (i.e., sum of subproblems is thrice the expected value). Choose /^max such that failure probability in Lemma 3.2 is no more than l/n. For sufficiently large n, l / n + 1/3 is less than 1/2. Thus the probability that both (i) and (ii) are satisfied is at least 1/2. D PROOF.
REMARK 3.9. We can make additional conditions like bounding the higher moments hold with probability at least 1/2 by the above argument. A sample that satisfies a required set of conditions will be called a 'good' sample.
As a consequence of the previous claim, if we repeat the sampling t log n times, the probability that the conditions are not satisfied for all samples is less than n~^. That is, if we choose independently p{n) = O(logn) sets of samples, one of them is good with very high likelihood. Let us assume that we have a verification procedure V that verifies if a sample is good using v{n) operations for n input elements. Therefore, to determine if a sample is 'good', we have to run V O(logn) times for a total of vin)\ogn operations. Depending on vin), this could make an algorithm inefficient. To make resampling more efficient, we
796
J.H. Reifand S. Sen
can run V using only a fraction of the input for each of the samples. For example, we can estimate the size of a subproblem by looking at a fraction of the input. Recall that the method of Lemma 2.12, the Estimation Lemma, gives constant factor estimates from which we can estimate the sum of the subproblem-sizes. Below, we describe a method based on this observation where the main difference is that we have to bound the estimate from both sides. For exposition, we describe it for the special case of trapezoidal maps — for other problems the same arguments apply with minimal modifications, by replacing trapezoids with appropriate ranges. We choose CQ- n/ log^ n input segments randomly from the n input segments for some fixed integer d > 2 and a constant CQ (the actual value will be determined from the required success probability of the algorithm). Let X-j be the number of segments intersecting trapezoid Z\/ corresponding to sample Rj, I ^ j ^ blogn where b is fixed integer greater than 0 which is determined from the success probability of the algorithm. Aj be the number of segments intersecting Ai out of the con log^ n randomly chosen input segments for the same sample. Clearly, A^ is a binomial random variable with parameters CQ-n/ log^ n (number of trials) Xj /n (probability of success). Assuming that Xj is greater than T- log^"^^ n, for some constant F, we will apply Chemoff bounds to tightly bound the estimates within a constant multiplicative factor. Since we do it only for 1/log^ n of the input segments, the total number of operations for the O(logM) random subsets can be bounded by 0(v(n/ log^ n) logn). We will see in the next section that for the problems at hand, this quantity is o(v(n)). Note that Xj < clog^"^^ n, is an easy case since n^ "clog^^^ n = o(n) for sample size = O(n^) for e < 1. More formally, by invoking Chemoff bounds, for any a > 0 (a is a function of CQ), there exists a c\, independent of n, Prob(A/ < ac\X^. /\og^n) ^ \/n^ and Prob(A^ ^ C2Qfco • xj /\og^ n) < \/n^'^^^ < \/n" (for CQ > 1). From the last two inequalities, XJ is bounded by L^ = Aj log^ n/coC20i from below, and by U-^ = Aj log^ n/c\a from above. With appropriate choice of the constants, this condition holds with high likelihood (as defined in Section 2.1) for all XJ simultaneously. We do the following procedure simultaneously for all the samples Rj and choose the sample /?^" using the following simple test: Procedure Polling Input: Samples R] ... Rm where m = 0(\ogn). Output: A good sample 7?^". and the let actual number of intersections be denoted by T^ Notation: Let N^ =^AJ and the upper and lower bounds obtained from N-^ by IJJ and LJ respectively. We will use S to denote ktota\n/rE[\H(R)\]. (clearly good) lfS> UJ then accept sample RJ (since S^UJ ^ TJ), (clearly bad) if 5 ^ LJ then the sample is 'bad' (since S ^ U ^ 7^), (choose the best)
Parallel computational geometry: An approach using randomization
797
if L ^ ^ 5 ^ JJJ, then accept the sample W^ for which A^^^ is minimum. Since both S and r^o He in this interval this guarantees that TJ^ ^C3 S where C3 = U^ /V which is a constant. Recall, that from our earlier discussion at least one of the samples would satisfy conditions 1 or 3 with very high likelihood. We summarize as following: LEMMA 3.10 (Polling Lemma). Using procedure Polling, we can obtain a sample that is 'good' with high probability where a naive random sample is known to be 'good' with probability 1/2. Given a verification procedure V that runs in 0{v{n)) operations for n elements, this procedure uses O (f (/i/polylog(n)) log «) operations. REMARK 3.11. From our definition of a good sample, the sum of the segments should be less than 5, where as the output of the Polling algorithm could be larger by a factor of C3. Strictly speaking, one needs to modify the definition to accommodate an extra factor C3. However, it should be clear that we have succeeded in our objective of choosing a sample for which the sum of subproblems is 0 ( p • E{\H{R)W) with high probability.
The above procedure can be used in a more general situation where we need 'good' samples with a bound on higher moments whose expectations are known from Lemma 3.7.
4. Randomized divide-and-conquer The tools and techniques developed in the previous two sections will be used to design a very general scheme for parallel divide-and-conquer. Random sampling will be used to achieve fairly even partitioning of the problem and the analysis will be done using various properties of random sampling proved earlier. We will illustrate the general methodology using the problem of computing trapezoidal map of line segments that can intersect only in the end-points. The parallel model that will be used is CREW unless otherwise mentioned.
4.1. Trapezoidal map construction This problem is the same as defined in previous section except that the segments are nonintersecting except possibly in the end-points. For every end-point, we want to determine the segment lying immediately above and below. This problem is called the vertical visibility map and is particularly interesting because of its close connection to triangulation. The algorithm we will describe will construct the visibility map of a given set A^ of line segments. A very high-level description is as follows: Algorithm Vertical Visibility 1. Select a 'good' sample R of size 0{n^) (6: > 0 is a constant that will be determined in the analysis). By 'good' sample, we imply that the conditions of Lemma 3.8 hold. We use the technique of polling to do this step efficiently. 2. Construct T{R) using a brute-force approach.
798
J.H. Reif and S. Sen
3. For each segment of N, determine the trapezoids of T{R) that it intersects by a procedure we will describe shortly. (The same procedure will be used as the verification algorithm for Polling in step 1.) 4. For each trapezoid A e T{R), we apply a clean-up phase called Filtering to discard some of the segments in L{A). As we will show later, this phase is crucial for bounding the processor complexity. 5. If /(zA) > C, for some predefined threshold C, then call the algorithm recursively on L{A) else solve the problem directly. (We assume that a suitable algorithm already exists — usually a brute-force method suffices.) We now look at the individual steps in some details. The procedures in steps 1-3 are actually quite related. For ^ < 1/2, the following brute-force method works. For every endpoint, we draw a vertical line and order the segments intersecting this line (sorting in the Y direction of the intersections suffices which can be done in 0(log«) time using n processors for every end-point). From this information, we can determine the segment lying immediate above and below every end-point. From this, we can also compute easily for each segment all the end-points for which it is visible from above (and below). In fact we order the vertical projections of these end-points by sorting. Constructing individual trapezoids can be done by 'walking' around the vertices of a trapezoid using the successor information from the previous computation. So the entire computation can be done in O(logn) time using n^ -n^ ^n processors. 4.1.1. Partitioning the problem. To determine the segments intersecting a trapezoid, we use a locus based approach. This approach involves considering each query as a higher dimensional point and partitioning the underlying space into regions providing the same answer. Thus the query problem is reduced to a point location problem, given sufficient preprocessing time and space. The problem at hand involves preprocessing the trapezoidal subdivisions (induced by the sample) in such a manner that given the end-points of any segment we should be able to list the regions it intersects in O(logw) time using \k/\ogn'\ processors where k is the number of regions that it intersects. We shall show that the preprocessing for n segments can be done in 0(log«) time using 0{n^) processors, where c is a fixed constant. Thus any sample of size less than n^^^ will suffice. Since the input segments are non-intersecting, these can only extend between regions where there exists a 'clear-path' which does not intersect any other sample segment. It must also be clear that there can exist more than such 'clear-path' between two regions. Our objective is to partition the plane into regions (equivalent classes), such that given any fixed pair of such regions (where the end-points of a segment lies), the regions that the segment intersects can be pre-determined. The boundaries of these 'clear-paths' are straight-lines joining vertices of the trapezoidal subdivisions and the equivalent regions are intersections of the half-spaces defined by these boundaries. Since we need a fast preprocessing procedure, we shall settle for a finer partition of space (i.e., more than one pair of partitioned region may intersect exactly the same set of trapezoids). If n is the size of the trapezoidal regions, there are 0{n) vertices. These produce at most 0{n^) boundary conditions which are straight lines joining every pair of vertices. Some of them may intersect sampled segments and hence are not boundaries of 'clear-paths' but it doesn't affect the procedure since they would only make the partition more fine (See Figure 3 for an illustra-
Parallel computational
geometry: An approach using
randomization
799
Fig. 3. There is a clear path between regions A and B where as there cannot be a segment with end-points in regions C and B. This redundant partitioning does not affect the asymptotic complexity of the algorithm.
tion). These O(n^) lines can intersect in O(n^) vertices, giving rise to a O(n^) regions in the partition. This imphes that there are 0{n^) possible pairs of regions where end-points of a segment could lie and one can precompute for each such pair which trapezoids the corresponding segment intersects using O(n^) processors in O(logn) time. For the point location problem, we use a preprocessing scheme first proposed by Dobkin and Lipton. The following result is a straightforward consequence of their paper. 4.1. Given a set ofm line segments in a plane, it is possible to preprocess them in O(logm) time time using O(m^) processors such that point-location for any query point can be done in O(logm) time. The space needed is 0{m?).
LEMMA
PROOF. We merely mimic the sequential algorithm. After computing all possible pairs of intersections in 0(1) time using O(m^) processors, we project the intersection on the xaxis and for each interval we compute the total ordering of the lines in O(logm) time using m processors for each of the intervals. Thus the space required is O(m^). For point search, we first locate the x interval using a binary search and then within an interval, we do a binary search on the lines that are totally ordered. D
4.2. In J dimensions, m hyper-planes can be preprocessed in m^ ~^ processors in O(Jlogm) steps that allows point searching in dlogn steps. The idea is to take intersections of every pair of hyper-planes and project them in J — 1 dimension. Within each region of the J — 1 dimensional arrangement, the original hyper-planes can be totally ordered, so that one additional binary search suffices after inductively locating the query point in J — 1 dimensions in (J — 1) logm steps. The processor and the space complexity grow as claimed as they get squared for every level. REMARK
800
J.H. Reifand S. Sen
In this case, m = n^, corresponding to the n^ Hnear constraints and the regions induced by the preprocessing (trapezoidal regions within an interval), are finer partitioning of the of regions induced by the n^ lines. Since there are 0(n^) 'finer' regions, we require 0(n^ ' n^ • n) processors to precompute the possible intersections. This takes care of all possible placements of the two end-points of a segment. Since each region is a trapezoid, we choose a sample point in each trapezoid to do the precomputing part. We make a table corresponding to each pair of regions containing the trapezoids the corresponding segment intersects. For any input segment, we first do the point location for its end-points and then perform another search on this ordered pair of regions. Clearly the whole procedure requires a constant number of binary searches and takes 0(logn) time. We can also store the number of intersecting trapezoids for each entry, so that we can allocate the required number of processors corresponding to each segment to list the intersecting trapezoids (using a prefix sum). All the segments belonging to a trapezoid can then be packed into contiguous locations by an application of semisorting (see Section 2.4) with labels that identify the trapezoids. 4.1.2. Clean-up for processor bound. Recall that a good sample implies the total subproblem size is within a constant factor of n/r • E[\H(R)\]. In this case (for nonintersecting segments), H(R) is 0(|/?|), i.e., the total subproblem size will be ^ kn for some constant k. So, after recursion depth /, the total subproblem size can be bounded only by k^. This algorithm has a recursion depth O(loglogn) and hence the total sub-problem size could become Q(n polylog(n)). This quantity is related to the number of processors; so we wish to bound it by 0(n). This is achieved by the following clean-up phase that we call Filtering. After partitioning the segments into the trapezoidal regions Z\, we group the segments L(A) into two categories: (a) L^ (A): Segments (part-segments) that have at least one end-point in the region, (b) L^(A): Segments that span the region (horizontally). Notice that number of segments of type (a) is less than 2n and L^(A) in trapezoid A, can be completely ordered (with respect to y-coordinate) within A. So for the end-points of type L^(A), a straight-forward binary search suffices to find the nearest segments among L^(A) in the vertical direction. Consequently, we do not further preprocess the segments in L^(A), i.e. we can leave them out from further recursive calls. Thus, the total size of the subproblems at any level of the recursive call is no more than 2n. Processor allocation is achieved by simply allocating processors in a region equal to the number of end-points lying in it. This ensures that the algorithm does not require more than 0(n) processors for any step. 4.1.3. Analysis. The algorithm is recursive and we have shown that every step can be done in 0(logn/) steps for a subproblem of size «/ using «/ processors. The total processor requirement never exceeds n. The reader can verify that the time complexity 7] at depth / satisfies the preconditions of Theorem 2.7. Hence it follows that THEOREM
processors.
4.3. Algorithm Vertical Visibility executes in O(logn) steps using n CREW
Parallel computational geometry: An approach using randomization
801
4.2. The general strategy The algorithm developed for visibility maps in the previous section can be used for a number of other problems with some modifications required in the context of the problem. The following gives a bird's eye-view of this approach. 1. Good-sampling. We use the method of Polling to choose a sample satisfying certain properties that holds with only constant probability for a naive sample. 2. Partitioning. For computing the subproblems for a given sample. This step is also used in conjunction with the previous step for verifying if a sample is good. The most common partitioning method used is doing point-location in a parameterized space. 3. Filtering. Keep the total problem size at any stage of the algorithm within the given processor bounds by pruning individual subproblems before recursively solving them. This step is the most problem-dependent and depends on the geometric properties of the problem. 4. Solve sub-problems recursively if the size exceeds a certain threshold. We will illustrate this approach in the context of another problem, namely, construction of convex hull of n points in three dimensions. 4.3. 3-D Convex hull We shall actually solve the dual problem, namely the intersection of half-spaces in three dimensions. This dual transformation V maps a point in E^ to a non-vertical hyper-plane in E^ and vice-versa. Let /? = (TTI, 7r2,..., TZd) be a point in E^. Then V{p) is the hyperplane \ = 7T\x\-^ 7t2X2 H h TtdXd and vice-versa such that a hyper-plane h not containing the origin is mapped to a point p for which V{p) = h. The transform V is extended to sets of points (hyper-planes) in a natural way. Let P be a convex polytope with non-empty interior intP and assume that the origin O is contained in V. Then V{V) is an infinite set of hyper-planes that avoid some convex region around O. The dual of V is defined as V = closure
( n f^'°'}
where h^^^ denotes the half-space containing the origin. The following observation can be verified [35]: LEMMA 4.4. Point p belojtgs to the int^, bound^y P or complement^ if and only if the hyper-plane V{p) avoids Vy avoids infP but not V, or intersects intP respectively.
In other words, given a set of points 5, the vertices of the convex hull are the dual transform of the facets of the intersection of the half-spaces X>(5). This property has been exploited very often so that the same algorithm can be used for both convex-hulls and intersection of half-spaces (if we know an interior point). Here, we actually derive an algorithm for constructing the intersection of half-spaces. Moreover, the dual transform will have applications for the partitioning step.
802
J.H. Reif and S. Sen
In the remainder of the section we shall assume that the half-spaces are described as inequalities of the form atx -\-biy -\- ciz -\-di > 0. We shall also use the terms 'half-space' and its bounding 'plane' interchangeably where it is clear from the context. The output is a list of vertices of the polyhedron C which is the intersection of the half-spaces. The vertices are defined by the 3-tuples of the three intersecting planes defining the vertex. We assume that the planes are in general position, that is every vertex is the intersection of exactly three planes. This assumption is for the convenience of analysis and not a real bottleneck for the algorithm. There are standard perturbation techniques which simulates the nondegeneracy condition. For example, changing the coefficients by a sufficiently small real value which is chosen randomly satisfies the property of non-degeneracy with probability approaching 1. The textbook [35] discusses symbolic perturbation techniques which are deterministic but more expensive. The edges of this polytope are those pairs of vertices which have two common planes in the tuples. A face is defined by all tuples which have one common plane. A tuple can be written in 6 ways (permutation of the 3 planes) and thus sorting them (all the 6 possible representation of the vertices) would enable us to obtain the faces and edges as the necessary adjacency structure of the polytope (which is a planar graph). The following observation is useful for constructing the intersection of a random subset of half-spaces that is used to split up the problem evenly. LEMMA 4.5. The intersection of a given set ofn half-spaces can be computed in 0(log n) time using n^ processors in a CREW PRAM model PROOF. Assuming non-degeneracy (i.e., no 4 planes intersect at a common point), there are 0(n^) candidate vertices of of the output convex polytope (of the intersection). For each vertex, test whether it is a vertex of the convex polyhedron by checking if it satisfies all the equations defining the half-spaces. This can be done trivially in O(logn) time using 0(n) processors for each candidate point. Only the vertices would survive. Determine the faces of the convex polyhedron by identifying planes that contain 3 vertices of the intersection. The necessary adjacency structure can be constructed by an application of sorting. D
The algorithm given below is derived from the general strategy in the context of the convex-hull problem. Algorithm 3-D Hull Input: A set S of n half-spaces H\, H 2 , . . . , //«, that contain point /?*. Output: The output convex polyhedron C which is intersection of the n half-spaces. (1) Choose a random subset R C S of half-spaces such that \R\ = n^ (for some e, 0 < e < I that we shall determine during the course of analysis). (2) Find the intersection of the half-spaces in R using Lemma 4.5. Take a fixed plane and cut up each face of the polyhedron with (parallel) translates of this plane passing through the vertices (Example 2, Section 3.1). Thus each face is a trapezoid. Further, partition each trapezoid with a diagonal so that each face is triangular. For a face F/ consisting of vertices xt, yi,Zi consider the pyramid Z\/ formed by p* as the apex and Fi as the base. Let CR denote the set of pyramids. Note that \CR\ = 0(\R\).
Parallel computational geometry: An approach using randomization
803
(3) For the remaining S — R half-spaces find the intersection of the planes (bounding these half-spaces) with the pyramids. Note that a plane may intersect more than one pyramid. The intersection of the S half spaces is the union of the intersection of the half-spaces intersecting a pyramid (over all pyramids). That is, C is IJ/=i ^i where // is f]j [HJ] restricted to Z\/. (4) If the number of planes intersecting a pyramid is more than a pre-determined threshold apply steps 1-3 recursively to this pyramid for the set of half-spaces (bounded by the planes) else solve the problem directly. Recall from Section 3.1 (Example 2), that for this problem, the ranges are the pyramids. The size bounds of Lemma 3.2 would hold with respect to the number of planes intersecting a pyramid. In the context of Lemma 3.5, \H{R)\ = 0(r) because the skeleton of intersection of R half-spaces is a planar graph with at most \R\ faces. This implies that the sum of sub-problem sizes is 0(rz) in a good sample. Polling is used in conjunction with steps 1-3 to achieve this. 4.3.1. Finding intersections quickly. We now focus on a procedure to find the intersection of planes with each of the pyramids. At. We shall use a locus-based approach to solve this problem. In this case, we have to preprocess the convex polytope of the sampled halfspaces in such a way that given any plane, we should be able to report the list of pyramids that it intersects in O(logn) time using at most k processors where k is the number of intersections. We shall show that the preprocessing for a convex polytope of size n can be done in O(logn) parallel time using 0(n^) processors, where c is a fixed constant. Thus we can choose any sample of size less than n^^^ since we have n processors. For this problem, a more precise value of c will emerge during the analysis. Given a convex polytope in three-dimensions of size 0(n) along with an internal point which is the apex of the pyramids, there are only a polynomial (in n) number of combinatorially distinct possibilities of the way any given plane can intersect the pyramids. This can be seen from the following simple argument. Given any plane that intersects the polyhedron, we can perturb the plane without changing the pyramids it intersects so long as it remains within a fixed set of bounding vertices. Figure 4 illustrates the situation for a two-dimensional case. If we consider an equivalence relation where two lines are equivalent iff they intersect the same sets of pyramids, then the equivalence classes correspond to the cells in the arrangement A(H) where H = {V(p): /? is a vertex of the convex n-gon or internal point and D is a dual transform}. Given any query line /, the pyramids that it intersects is defined by the partition of A(H) that V(l) belongs to. This observation can be extended to hold in any dimension; in this case — three. If we consider the partitions of the three-space induced by the intersections of the constraining half-spaces, these are equivalent classes with respect to the pyramids they intersect. Notice that even if this partitioning may not be minimal it suffices for our purpose. All that remains to be done is precompute for each of these regions the pyramids that the corresponding planes would intersect so that for any query plane in the same equivalence class we can list off the intersecting planes by a table look-up. Recall the method of Lemma 4.1 and its generalization in Remark 4.2, the entire preprocessing for point location for n planes in three dimensions can be done in n'^ space and processors in O(logn) time. For each of the cells in 3-space, we can precompute the
804
J.H. Reifand S. Sen
L
Fig. 4. Lines L and K intersect a different set of sectors. In the dual plane, the duals of L and K lie in different faces — in this case separated by the dual of vertex 6.
pyramids that the corresponding plane intersects using 0(n^) processors (by choosing a representative point in each cell and testing it against all the pyramids). Note that these subdivisions are finer than the minimal equivalence classes i.e., more than one subdivisions could have the same set of intersecting pyramids. We also store the number of intersecting pyramids for each of the subdivisions so that while listing the number of pyramids each query plane intersects we can do the processor allocation easily in 0(log«) time using a prefix computation. By choosing \R\ less than w'/^, we can complete the entire preprocessing in the required time and processor bounds. So the entire procedure takes O(logn) time. 4.3.2. Filtering. Consider a pyramid A (we will not use the subscripts unless necessary). We will denote the set of half-spaces intersecting L{A). In this step, our goal is to identify half-spaces in L{A) that would not contribute to any vertices of C within A. In the discussion below, we will often refer to the half-spaces as planes (bounding the half-spaces). After we have found the planes intersecting A, we categorize them as following: (a) planes that are completely occluded by another plane in the A and hence these cannot be a part of the output in the Z\, (b) planes that are occluded because of more than one other plane in the A i.e., there is no one plane that completely occludes them.
Parallel computational geometry: An approach using randomization
805
(c) planes that contribute to an edge without an end-point i.e., the end-points He in some other pyramids, (d) planes that do contribute to a vertex in A. To eliminate planes of type (a), we use a variant of the 3-D maxima algorithm. The 3-D maxima problem is defined as: Given a set S of n points in a three-dimensional space, determine all points p in S such that no other point of S has x, y and z coordinates that simultaneously exceed the corresponding coordinates of /?. In case there is such a point ^, q is said to dominate p. Since A has a triangular base there are 3 edges that join it to the apex /?*. We sort intersections of the planes in L(A) with an edge in increasing distances from the apex. We repeat this for all the three edges. Call these three edges X,Y,Z and denote the intersection of a plane hi as Xi, Yi, Z/ and the ranks in the sorted list as r(Xi), r(F/) and r(Zi). OBSERVATION 4.6. If a plane A is occluded completely by another plane B iff it is dominated on its ranks of intersection on all the three edges by plane B.
This gives an effective strategy for eliminating planes of type (a) by identifying the complement of the set of the maximal elements, where we use the ranks of the intersection on the three edges as the order relation. We can do this in O(logn) time using a linear number of processors (using an algorithm of [6]). REMARK 4.7. Elimination of this step does not change the asymptotic bounds of our algorithm. However, it may eliminate some more planes going into the recursive call thereby improving the performance in practice.
To identify planes of type (b), (c) and (d) we construct the intersection of the convex polytope C with each of the three faces of A. These are intersections of the faces with C that are 2-D convex polygonal chain. These will be referred to as contours for the following discussion. The contours can be computed in O(logn) time with n processors using any of the optimal 2-D convex hull algorithms. Note that these convex contours on the three faces are a part of the output and any plane that appears on this contour is a part of the final output C. Denote the set of planes in L{A) that define the contours as L^{A) and its complement by L^^{A). Consequently, a plane of type (b) cannot be in L^{A). Unfortunately, there can be planes that are part of the output but are not part of any contour. Consider a plane that chops off a portion of the polytope within A. A plane in L^{A) may not contribute to any vertex of the convex polytope C, that is it only contributes a edge of the hull within A. In this case the edge intersects A in exactly two faces and the these vertices can be labeled by the two intersecting planes (which contributes to the output edge). Thus these planes can be identified quickly using sorting on the labels of the intersecting planes. We say that a plane h e L^^{A) and a contour generates the ray e that originates at the closest point p on that contour to h and is contained in the (at most two) bounding planes in L^{A) that defined p. The point p can be identified by doing a binary search on the vertices of the contour. If the contour does not contain a vertex then choose any ray on the plane that defines the contour.
806
J.H. Reifand S. Sen
4.8. If a ray generated from h G L^^{A) intersect h, then h does not contribute to a vertex ofC. OBSERVATION
and a contour of A does not
We say that a plane h e L"^^(A) is pinned to A iff it is intersected by all the three rays generated from h and the contours. From convexity, it follows that OBSERVATION
4.9. A plane h e L^^{A) can be pinned to at most one A.
From the previous observation, it follows that we need to call the algorithm recursively only on those h e L^^(A) that are pinned to A. The number of processors allocated is on the basis of the potential number of vertices in A. This is calculated as follows. We shall use the term 'flattening' to imply that the vertices of the contour are projected along edges (intersection of two planes) they lie on, such that all of them become coplanar. Notice that there may be several such planes. We just choose one arbitrarily and these projected vertices defines a 'base' face. We wish to ensure that going into any recursive call, the sum of the subproblems is less than the output size. We define the output size of the 3-D convex polytope to be 3|y| where V is the number of vertices of the convex polytope. Since the surface of the convex polytope is a connected planar map, we can use Euler's equation to show that | y | = 2|F| — 2 where F is the set of faces in the polytope. Since \F\ ^n, \V\ ^2n — 2. This calculation is done using the property that each vertex is of degree 3 (which follows from our assumption that the planes are in general position). Let the number of processors be 6n. We distribute the processors among the subproblems depending on the output size. For a pyramid A that does not contain Siny free-edge, the output can be bound by the following: CLAIM 4.10. The output size of A is bounded by 3ni + 6m/ — 6, where ni is the number of planes in the contour contributing at least one vertex and m, is the number ofplanes of type (b) and (d). PROOF. Let e\ denote the number of edges of C that intersect the contour and contribute a vertex within A (the vertices of the contour are these edges). Let e2 be the number of edges which lie within A (including both end-points). Let v be the number of vertices of C within A (these have degree 3), then e\ + 2^2 = 3i; or
3i; -\-ni e\+e2 = — - — as ^1 = «/. Consider the planar map of the polyhedron formed by «/ and mi planes and a 'base' face by 'flattening' the contour. Refer to the explanations of the terms 'base' face and 'flattening' in the previous paragraphs. The number of edges on the contour equals the number of vertices on the contour. Then by applying Euler's formula \V\=ni -\- Inf — 2 where « / is the number of faces of of C that show up in A but are not a part of the contour. Since nf (type (d)) can be bounded by m/ the claim is proved. D Notice that if A contains d free-edges, then the above formula can be applied separately to each of the J + 1 partitions (induced by the free edges). The participant planes in each of these partitions are disjoint giving us the following:
Parallel computational geometry: An approach using randomization
807
4.11. The output size of A is bounded by 3ni H- 6m/ — 6d where d is the number of free-edges. CLAIM
The processor allocation strategy is to simply allocate this number of processors to the sub-problem (in the pyramid). The total number of vertices over all the pyramids is bound by the maximum output size and by our allocation strategy, we are allocating processors proportional to the maximum output-size in each pyramid. Note that the actual output size may be less but we shall never have fewer processors than required and this maximum size can be actually achieved. Another way to look at the processor allocation strategy is that two processors are allocated to each edge of the output hull and we allocate those processors to the pyramids which contains (or potentially contain) vertices associated with that edge. ThQ free-edges are not allocated any processors. Hence we have sufficient number of processors. 4.3.3. Analysis of 3-D hull algorithm. In the previous subsections we showed that every step of the algorithm can be done in 0(logn/) steps for a subproblem of size nt using nt processors. The total processor requirement does not exceed 0{n) from our processor allocation strategy. From Theorem 2.7 it follows that THEOREM 4.12. The convex hull ofn points in three dimensions can be constructed in O(logn) time using n CREW processors.
4.4. Constructing arrangements Given a set H of n lines, the arrangement A(H) contains information about the way the plane is partitioned into connected regions by these lines. It is known that in d dimensions, E^ is partitioned into at most n^ connected regions by n hyper-planes, where a connected region could have dimension 0 (points) to d (cells). The textbook by Edelsbrunner (see bibliography) is an excellent source for discussion of the combinatorial properties of arrangements. By construction of A(H), we will imply a representation of the incidence relation of the faces, where a face of dimension k (called a ^-face) is contained in the intersection of at least d — k hyper-planes. For d = 2, A(H) can be considered a planar graph where the vertices are the intersection points of lines, the edges are portions of line between consecutive intersections and the faces are the two-dimensional partitions of the plane. Constructing the arrangement is equivalent to constructing a representation of this graph. This can be easily done by sorting the intersections on all the n lines which takes 0(n ' n logn) steps in all. However there are sequential algorithms that can construct this graph in 0(n^) steps and in general 0(n^) in d dimensions. Here we will outline a parallel algorithm that matches the sequential work bound. Although the technique extends naturally to higher dimension our description will be for the case d = 2. For simplicity we will assume that no three lines have a common intersection. We will differ slightly from our previous generic algorithm, namely that we will choose a much larger sample size so that the number of recursive levels will be constant. Consequently, we will do away with the Filtering phase. Note that for n lines, the arrangement
808
J.H. Reifand S. Sen
can be constructed trivially in O(logn) time by sorting using n^ processors. Each 2-face in the arrangement is convex and a range is a triangle obtained by triangulating a (convex) face by joining the bottommost vertex (of the face) with the other vertices. This is also known as the bv-triangulation. To deal with unbounded faces, we assume that all the intersections are contained within a (symbolic) triangle of appropriate size. Like our previous conventions, L{A) denotes the lines intersecting a triangle A and 1(A) is the cardinality of L{A). The algorithm is as follows Algorithm 2-D arrangement 1. Choose a good* sample R of — ^ lines. By good*, we imply a sample that satisfies the properties of Lemma 3.8 and in addition ^^ 1^{A) = 0(n^). 2. Find the lines in H — R intersecting each range (triangles corresponding to the bvtriangulation of A(R)). 3. For each A, such that 1(A) ^ ^logn, construct the arrangement using an optimal sequential algorithm. 4. For each triangle Z\, such that 1(A) ^ v^logn, choose a good* sample R(A) of size s(A) = 1(A) • \og(l(A))/^\ogn. Here the random sample is good* with respect to L(A). Denote the set of triangles in the bv-triangulation of A(R(A)) by T(A). 5. For a A, if maxt^T{A){KO} ^ a^logn and X!/e7(^)/^(0 = 0(/^(Z\)), then for all triangles t e T(A) obtained after step 4, construct the arrangement of the lines L(A) — R(A) intersecting t using an optimal sequential algorithm. 6. For the remaining A, construct the arrangement of the lines L(A) intersecting A directly using sorting. For a random sample R of size r, \H(R)\ = O(r^) since the size of A(R) is r^. Thus from Lemma 3.5, £'[^^/(z^)] = 0(nr) and from Lemma 3.7 £'[5^^/^(z\)] = 0(n^). Hence Polling can be used to select a good* sample. From Lemma 3.2, for each Z\, l(A) = 0{\og^n).
(7)
The actual partitioning step is carried out by sorting the intersections on the --\- lines. This can be done in 0(log n) time using n^/ log^ n processors. More generally, for a sample of size r, this can be done in 0(log«) time using nr processors. At this point, we know the set of lines in H — R that intersects each face of A(R). Denote the faces of A(R) by T(R). To determine L(A), (in the bv-triangulation of A(R)) we can do a brute force method of checking with respect to each triangle in a face / e T(R). The total work done can be bounded by YlheH-R J2hnf^d) I/I where | / | denotes the size of a face
= E oco heH-R
The first equality follows from Zone theorem that bounds the number of vertices of A(R) visible from any line byO(\R\).
Parallel computational geometry: An approach using randomization
809
LEMMA 4.13. The partitioning ofn lines into the faces induced by a subset ofr lines can be done in O(log^) time using nr CREW processors.
Step 3 can be done in O(logn) steps using one processor per triangle (there are no more than 0{r^) = 0{n^/ \o^ n) triangles from Ruler's formula). In Step 4, the partitioning can be done in 0(log(/(Z\)) steps using I {A) -siA) processors from Lemma 4.13. Thus total number of processors required is
Y,li^)-s{A)
=
A
J2^(A)-l(A)^\og{l(A))/^I^ A
J2i\A)\og(l(A))/./]^
= A
^ loglogn/^logn ^ / ^ ( z \ ) . The last step follows from Eq. (7). From the property of good* sample this is less than n^ log log n/^yiog n. By slowing down from O(loglogn) to O(logn) time, the number of processors can be reduced to n^ loglog^ n/ log^^^ n which is less than n^/ logn. Step 5 takes no more than O(logn) steps for each t e T(A) and the total work over all such t can be bounded by
E E ^'w = Eo(''(^)) A teT(A)
A
The two equations follow from the property of good* sample with respect to L(A) and n respectively. Thus it can be done in 0(logn) time using n^/logn processors after loadbalancing. From Lemma 3.2 applied to each A, for some constant a, Pr[m^ax^{/(0}^ayi^]<^.
(8)
Also, by resampling and polling, the probability that J2teTiA)^^(^^ exceeds 0(l^(A)) is less than l/l^(A) from Lemma 3.10. For Step 6, we bound the work as follows. Since 1(A) > ^/iogn, the probability that a sample is not good* (with respect to a Z\) is less than 1/log^n. If max?e7(/\){/(0} ^ a^/\ogn then a sample is chosen again (for A). The probability that sampling has to be done is less than 1/log^ n from Eq. (8). Since this step is done independently over the A, the probability that it has to be repeated for more than 2/(log^n) • n^/log^n triangles is less than 0(2"^/^*^^ ^) from Chemoff bounds 1.3, Eq. (6). From Eq. (7), 1(A) = 0(log^ n). Thus by assigning 0(log^ n) processors to each Z\, we can construct the arrangement directly (using sorting) in O(loglogn) steps. The total number of processors required is n^/ log n for this step.
810
J.KReifandS. Sen
THEOREM 4.14. The arrangement ofn lines in the plane can be constructed in O(logn) 2
Steps using ^^— CREW processors. REMARK 4.15. (1) We can dispense with Polling in this algorithm as there are enough processors in Steps 1 and Step 4 to do resampling with respect to the entire input in parallel. (2) Practically the same algorithm extends optimally for any fixed dimension d with carefully choosing a representation of the arrangements in higher dimensions.
5. Sublogarithmic algorithms In the previous section, we described parallel algorithms for trapezoidal-maps and 3D convex hulls that run in 0(log«) time with high probabiUty using n processors in a CREW model. This is both time and work optimal in the CREW model; even computing OR of n bits take ^(logn) time. However using concurrent writes, we csinpadsort in 0(logn/\ogk) steps using kn processors (Theorem 2.17). This suggests that we may be able to speed-up the previous algorithms further using faster sublogarithmic parallel routines described in Section 3. The basic idea is as follows. We assume that there are kn CRCW processors for some integer k. We sample roughly (nk)^^^' input elements which we use to partition the problem. From our earlier discussion the maximum subproblem size is no more than n/(nk)^^^ (actually we are ignoring a logarithmic factor which can be adjusted by choosing slightly larger sample) with high likelihood. The constant c is such, that given n^' processors, one can solve the problem in constant time. For example, in the vertical visibility problem, c is no more than 2 since one can determine using n processors per end-point which are the closest segments above and below. We shall show how to do each step of the general algorithm, namely the partitioning Polhng and Filtering in 0(\ogn/ logk) steps. Consider the following recurrence relation whose solution will be the crux of our analysis of the sublogarithmic algorithms. Let T(n,m) represent parallel running time for input size n with m processors.
n rr^ ( (nky^'
nk \ rr I +a\ogn/\ogk.
inky/'J
Here c and a are constants larger than 1. The recurrence arises from the following property of the algorithms: when m = nk, the maximum subproblem size is no more than n/{nk)^f^ with the processor advantage ^ k. It can be easily verified by induction that the solution of the above recurrence with appropriate stopping criterion is 0(\ogn/ log/:). Technically, we cannot use a deterministic solution of this recurrence directly for our purposes as our bounds are probabilistic. So we use a technique which is an extension of the solution described in the proof of Theorem 2.7. View the algorithm as a tree whose root represents the given problem (of size n) and an internal node as a subproblem. The children of a node represents the sub-problems obtained by partitioning the node (by random sampling) and the leaves represent problems which can be solved directly without resorting to recursive calls. Denote the time taken at a node at depth / from the root by 7].
Parallel computational
geometry: An approach using randomization
811
LEMMA 5.1. Suppose Fr[Ti ^ acas^ logn/logk] < 2~^ \ognca y^pi^jr^ ^^ ^ ^y.^ constants and a a positive integer. Then all the leaf nodes of the tree representing the algorithm terminate within T steps, such that Prob[r ^ a logn/ log A:] ^ n~^^, where f is a constant. The proof is along the lines of Theorem 2.7, so we have omitted the details here. Below we describe the modifications required in the generic algorithm to obtain faster running time and then look at the individual problems. 5.1. Speeding up in the sublogarithmic range In the generic divide-and-conquer approach described in Section 4.2, the Partitioning step is speeded up by using padded-sorting and the faster /c-way searching (Lemma 2.19). In the locus-based approach of Lemma 4.1 we obtain the following generalization. LEMMA 5.2. Given h hyper-planes in d dimensions, a data-structure for point location can be constructed in 0(d • log n/ log k) time using k-n^ ~^ processors. This data-structure can be used to do point location in 0(d • log n/log m) steps using m processors for each point. The basic procedure for resampling and Polling is inherently parallel as the samples are tested concurrently. In fact we can dispense with Polling for k = Q(logn) since there are enough processors to test the entire input against a sample. Similarly Filtering becomes redundant once k > log^ n for some constant t from the observation that the algorithms have recursive depth O(loglogn) so a constant factor blow-up implies the above bound. A more critical issue is that of processor allocation. Recall that a common scenario for the algorithms is the following. Suppose s is the number of subproblems (s < n) and each of the input elements for the subproblems has been tagged with an index in I.. .s. Then these can be sorted on their indices into an array of size 5(1 + A.) from the previous theorem where S is the sum of the sizes of the subproblems. A processor indexed P is associated with the element in the cell numbered {P/S^ ? In most cases, 5 = n, so that if we have kn processors, then the number of processors allocated to a subproblem / of size Si is at least Si • /^/(l -h A,). T^at processor advantage which is defined to be the ratio of the number of processors to the subproblem size, is not as good as it was initially, namely it is /:/(! -h A.) instead of k. However, for our purposes it will make little difference because of the property that the number of recursive levels in the algorithm will be bounded by O(log log n). Hence the processor advantage at any depth of the recursion is no worse than J^/(l + A.)^^^^gi^g^^ which is still Q{k). In our future discussions, we shall implicitly use this property for processor allocation. 5.2. Trapezoidal decomposition and triangulation We modify Algorithm Vertical Visibility by substituting the above routines for partitioning and processor allocation. For the Filtering step, recall that it basically involves discarding We will avoid using the ceiling and floor functions when it is clear from the context.
812
J.H. Reif and S. Sen
segments that span the entire trapezoid. This is basically compaction that can be done in 0(riog* n - log* k'X) time using Lemma 2.22 (= o(logn/ log^)). It follows 5.3. The trapezoidal decomposition of n non-intersecting segments can be constructed in 0(logn/logA:) steps using kn CRCW PRAM processors. THEOREM
5.3. 3-D Convex hulls and 2-D Voronoi diagrams An almost identical approach works for algorithm 3-D hull. The Filtering step is essentially locating the half-spaces that are pinned to a pyramid. To find the closest point in a contour to a half-space, we use /:-ary search on the sorted vertices of each contour. This is clearly done in 0(log«/ logk) steps. Again we use compaction to discard the redundant half-spaces within a pyramid. As mentioned previously, the 3-D maxima routine can be dispensed with without affecting the asymptotic bounds. 5.4. The convex-hull of n points in three dimensions can be constructed in 0(logn/\ogk) steps by kn CRCW PRAM processors for k > 1.
THEOREM
Note that the output of this algorithm produces a list of vertices in an array of slightly larger size. To compute the adjacency information (the edges), we require an application of integer sorting. The sorting is done on the list of 3-tuples (the planes intersecting in that point) and we have all the six permutations corresponding to a tuple. If the adjacent tuple have two planes in common, they define an edge. As a consequence of the 'hfting' transformation, we obtain a similar bound for 2-D Voronoi diagram. Here the output is the list of the Voronoi vertices with their adjacency information.
5.4. Lower bounds To gauge the efficiency of the algorithms described in the previous section, we actually prove matching lower bounds for these in a related model of computation. The material in this subsection can be read independently of the rest of the chapter. The model of computation is the parallel analogue of the Bounded-degree decision tree model (BDD Tree). At each node of this tree, each of the p processors compares the value of a fixed degree polynomial with 0. Accordingly each processor gets a sign e {0, +, —} depending on the result of the comparison being {=, >, <} respectively. Subsequently the algorithm branches according to the sign vector, that is by considering the signs of all the processors. The algorithm terminates when we reach a leaf node containing the final answer. If the polynomials are restricted to be of the form JC/ — Xj < 0, then it is the Parallel Comparison Tree (PCT) model. While there is no cost for branching (that includes processor allocation and read-write conflicts), it does not have the arithmetic instruction set of the PRAM model. So, strictly speaking it is incomparable with the PRAM model. Notably, the known geometric algorithms in the PRAM model do not exploit this extra power so lower bounds in the BDD Tree are often regarded as binding in the PRAM model also.
Parallel computational geometry: An approach using randomization
813
Note that comparison tree model is not a meaningful computing model for most problems in geometry like the convex hulls, that inherently involve polynomials of degree greater than one. For this, we will first prove a worst case bound along the lines of Ben-Or [15] and subsequently extend it to the average case. The number of leaves is related to the number of connected components in the solution space in R^ where n is the dimension of the solution space (which is often the input size). The arity of this tree is the number of distinct outcomes of computations performed by p > I processors. The additional complication present in a BDD tree model is that each leaf node may be associated with several connected components of the solution set W. Even if we know \W\ (the number of connected components of W), we still need a lower bound on the number of leaves. Ben-Or tackles this by bounding the number of connected components associated with a leaf using results of Milnor and Thom. His result shows that even under these conditions, the worst-case sequential lower bound is ^(log \W\). If the parallel BDD algorithm uses p processors then the signs of p polynomials can be computed simultaneously. Each test yields a sign and we branch according to the sign vector obtained from all the tests. We shall use the following result on the number of connected components induced by m fixed degree polynomial inequalities due to Pollack and Roy to bound the number of feasible sign-vectors LEMMA 5.5. The number of connected components of all nonempty realizations of sign conditions of m polynomials in d variables, each of degree at most b is bounded by {0{bm/d)Y.
This gives us a bound on the arity of the parallel BDD tree model as well as the number of connected components associated with a leaf node at depth h. The number of polynomials defining the space in a leaf-node at depth h is hp and hence the number of connected components associated with such a node is ((0(bhp/d))^. In our context, the number of processors and (hence the polynomial signs computed at each stage) is bound by kn and d is the dimension of the solution space which is approximately the size of the input. For example, in two dimensions, an n point input consists of 2n real numbers corresponding to all the X and y coordinates and it is considered to be a point in E^^, the Euclidean 2n dimensional space.. This gives us the following theorem THEOREM 5.6. Let W C R^ be a set that has \W\ connected components. Then any parallel BDD tree algorithm that decides membership in W using kn (k^ I) processors has time complexity Q(log | W|/n log^). PROOF.
If h is the length of the longest path in the tree then from Lemma 5.5
{ekn/nf''
•{ehkn/nY^\Wl
where e is a constant that subsumes the degree of the polynomials. The first expression on the left hand side represents maximum number of leaves and the second expression is the maximum number of connected components associated with a leaf at depth h. By simple manipulations and using hn > h log n we arrive at the required result. D
814
J.H.ReifandS.
Sen
The above theorem immediately yields as corollary Q([ogn/\ogk) worst-case bound for a number of problems for which \W\ at least (n/2)^^^^\ This holds for a slightly modified version (used previously in [55,85]) of the convex-hull identification problem where the objective is to determine if among a set of n points all the points belong to the convexhull. Note that this version is constant time reducible to the standard version in a CRCW PRAM model with p^n processors. COROLLARY 5.7. Any algorithm in the parallel algebraic decision tree model that constructs the convex hull of n points using kn processors requires ^(\ogn/\ogk) rounds, k^l.
Clearly a similar bound also holds for sorting n real numbers which strengthens the lower bound for the PCT model. COROLLARY 5.8. Every parallel algebraic decision tree algorithm requires i? (log n/ log k) steps to sort n numbers using kn processors, k^ \.
To extend the above result to the average case we require a technical lemma that generalizes the following property of balanced trees — the balanced tree on A^ leaves, achieves the minimum average height among all trees with A^ leaves. We extend this property of balanced trees to the case where a leaf node at depth / has a weight /^ associated with it where d is an integer significantly less than the arity of the tree. The arity of a tree is the maximum number of children of any node. The total weight of a tree is the sum of the weights of its leaf-nodes. The previous property can be viewed as a case where the leaves have unit weight. LEMMA 5.9. The tree that attains the minimum average height among all trees with total weight w using the weight function defined above is a balanced tree. PROOF. In the proof, we will use the following approach. We will start with a balanced tree T of height h for the given weight w. To avoid unnecessary complications, we assume w to be of the required form and we will justify later that it doesn't affect our arguments. Then we shall show that any unbalanced tree of the same weight must have a larger average height. An unbalanced tree T of the same weight will have leaf nodes at depth less than h and greater than /i, where depth of a node is its distance from the root. For a leaf-node A at depth / (/
Parallel computational
geometry: An approach using randomization
815
one group. In the remainder of this proof, we shall show that the average height of each group exceeds h which will imply the lemma. Let there be c/ leaves at height hi (> h) compensating for A at height /. At most two c/ could be fractional — the first and the last. For weight compensation ci - h^ -{- C2 - h2 + [-ci-hf ^ a^~' • h"^ - /^ where h < h\ < /i2. We want to show that ^ - c/ • /z/ + / / ^ - c/ + 1 > /z. Or by rearranging, ^ • ct - (hi — h) > h — i. It suffices to show that max{c/} > h — i. Let c^ be the maximum of c/. Clearly Cm ^
(a^-' . h"^ - /^)/(/zf + /zf + • • • + hf). If / > 2/z — / + 1, then clearly the average height of this group exceeds /z. So we will only consider I ^2h — i -\- 1. ah-i . h"^ _ id Cm >
T.
(9)
(/?-/ + l ) ( 2 / i - / + l / Since i^/a^~^
T.
(h-i
+ l)(2h-i
(10)
+ lf
By minimizing h'^ — i'^ and maximizing {2h — i + 1)"' (use i =h ~ \ and i — 1 respectively),
Cm ^
T~
^
(/z - / + 1) • {2hY ^ (/z - / + 1) • 3^
when h 4,Cfn > h — i.\j In the context of the parallel algebraic decision trees, arity a is (ek)^ and d = n. We can then bound the number of leaves of the BDD tree to be Q{\W\/{enkL/nY) where L is the average height. This yields a bound similar to the previous theorem. THEOREM 5.10. Let W a R^ be a set that has \W\ connected components. Then any parallel BDD tree algorithm for deciding membership in W using kn (k ^ 1) processors has average time complexity -^(log | W|/n log^). Consequently, any randomized algorithm has the same worst case time complexity.
Since | W| is at least (n/l)^^^^^ for the the two dimensional convex hull problem, the average running time is at least Q (logl/n logk) time. For sorting and the dominance problem, the same bounds hold. By a simple reduction of 2-D dominance to trapezoidal decomposition, we obtain a similar bound for the latter problem.
816
J.H.ReifandS. Sen
6. Geometry on fixed-connection machines 6.1. Motivation and overview In the previous sections, we described fairly general methods for parallelizing algorithms in the PRAM environment. In the process, a number of basic problems were recognized and many sophisticated techniques have been developed which can be viewed as a 'tool-kit' for tackling increasingly complex problems. There is a general consensus that PRAM models are appropriate for the algorithm designer but these algorithms have to be implemented on fixed-connection networks to be of any practical significance. By well known generalpurpose emulation schemes, all these algorithms can be implemented to run on butterfly (or a hypercube) network with a O(logn) multiplicative factor degradation in time complexity. So the crucial question is if the PRAM algorithms can be extended to fixed-connection networks without this logarithmic penalty in running time. In a top-down approach to algorithm design, complicated algorithms are built on top of less complex procedures. The answer to the above question would depend on how far down in this hierarchy can one go without running into problems that cannot be mapped optimally on the fixed-connection network. Moreover, this would also depend on the nature of the algorithm itself. One of the most basic problem in this hierarchy is that of sorting. For example, Reischuk's [79] O(logn) time, n processors randomized PRAM sorting algorithm was successfully extended to networks by Reif and Valiant [78] to run in 0(log w) time by using additional new sampling techniques for problem-size control. In contrast. Cole's deterministic 0(log/i) time parallel mergesort algorithm seems prohibitively difficult to implement (without a logarithmic slowdown) on the networks because of its liberal use of pointers. Consequently a number of algorithms that use this approach on PRAM models would be at least as difficult to be adapted to network models. The eventual goal is to develop efficient algorithms on interconnection networks, and we would like the reader to view this in the more general context of mapping certain kinds of PRAM algorithms on fixed-connection networks and the difficulties associated therewith. REMARK 6.1. In this section, the term fixed-connection network has been used to allude to networks which have OiXogn) diameter for Ai-node networks. There already exists a large body of literature for geometric algorithms on grid-like networks where the diameter is a bottleneck for achieving the kind of time complexity we are aiming for.
One of the underlying problems is doing binary search optimally in a model that does not allow concurrent reads. A common scenario is the following: we are given a tree whose leaves represent intervals and n keys for which we have to determine the interval that each key lies in. If the depth of this tree is d then it is trivial to do this sequentially in 0(nd) time. In case of PRAM models that allow concurrent reads, the problem is again quite simple. With n processors, we can simultaneously do the search for all keys in 0 ( J ) parallel time, thus resulting in an optimal speed-up. The main difficulty associated with this problem stems from the possibility that the keys may be very unevenly distributed among the intervals. Recall that in the Partitioning step of the generic algorithm, we use point-location in arrangements in some parameterized space.
Parallel computational geometry: An approach using randomization
817
An additional problem is that of allocating of sub-problems to sub-networks for recursive calls. Unlike PRAM models, the network topology imposes severe constraints on processor allocation — not only the number of processors should match with the sub-problem sizes but should also be inter-connected in a certain manner. Some of the ideas are similar to Flashsort where one does splitter-directed routing to route the keys to the appropriate sub-networks. However, unlike the Flashsort we may be confronted with situations where we have to dynamically allocate resources as the sub-problems could have varying sizes. In some cases, it is possible to have near-optimal solutions to the above problems that should have applications to a wide class of algorithms. These basic procedures serve as crucial link between the PRAM algorithms and inter-connection networks. In the remaining section, we briefly sketch a method for implementing our generic divide-and-conquer strategy in the context of trapezoidal maps of non-intersecting line segments. We have omitted most details as these are outside the scope of our main focus. For more details of the network implementation, the reader is encouraged to consult the bibliographic references.
6.2. Model of computation Throughout this section we will be using the butterfly inter-connection model where the processors operate in a synchronous fashion and have bounded buffer size. These assumptions are consistent with some of the existing machines like BBN Butterfly and the Connection Machine. During every step, each processor is allowed to perform a real-arithmetic operation consistent with standard models used for sequential geometric algorithms. Moreover, each processor has access to a random-number generator that returns in unit time a truly random number of O(logn) bits. One of the primary reasons for choosing the butterfly network is because of its nice 'recursive' nature. A butterfly network of size k (will be referred to as BFk) has k levels of 2^ nodes each (i.e., it has kl^ nodes). Each node has an address {w, t) where w e {0, 1}^ and O^t < k (see Figure 5). The significance of this network is that there are numerous 'copies' of BBi in BBk for I € {0,1} } and \w\\ ^ / ^ |u;i| + / is isomorphic to BFi.
Moreover, we may have to use emulate a larger butterfly in a work-preserving fashion. The following simple result can be used. FACT 6.3. A BBk can emulate a BBk+c within 0(7f + c) slowdown where c is a positive integer This is similar to Brent's slowdown lemma except that we have to construct a mapping of the processors of BBk^c to BBk respecting the interconnection topology. In this case it is very straightforward. Assume that c=\ and map the processors with addresses {xw,i)
818
J.H. Reifand
Y /
V
1/\'
I vi
I
Y
VK
I
S. Sen
I
\f
^v
\
I
V /
/
1/ \
/
V
I
• Y
l/\
\'
^. # ^^ ,^ <Ji^ ,^ ^^ ^ ^^ ^ ^^ 6 ^ i^ ^ ^ I
*»
I,»»
I,'»
(S (!) dJ *d) (S *6 (S *6 (S *6 & 6
6
o 6 cb
Fig. 5. A butterfly network of size 4. The solid lines illustrates a sub-network isomorphic to BF2.
where jc e {0, 1} and |M;| = k and / ^ /: to (w, /). One can verify that the processors of BFk+x that were neighbors are neighbors in the smaller network. Each processor in the smaller network has to do at most twice the amount of work and require twice the amount of local memory. Only the processors of rank k have to do the extra work of emulating the processors of rank ^ + 1. This scheme can be extended directly to yield the claimed bound. For a fixed c, this implies that there a constant factor slow-down. For these algorithms this scheme is often used with the value of c being 1 or 2.
6.3. Overview of sorting and routing on fixed-connection networks The algorithms use sorting and routing extensively at various stages and a brief review of these routines will help us in understanding the latter algorithms that are built on them. The problem of packet routing involves routing a message from processor / to /7(/) where 77 is a permutation function. There has been a long and rich history of routing algorithms for fixed connection networks (see [86,59,74,54]) and these can be summarized as following LEMMA 6.4. There exists an algorithm for permutation routing on a n-node butterfly network that executes in O(logn) steps and uses only constant size queues to achieve this running time.
A more general result has been proved by Maggs et al. [59] for layered networks. A layered network is one whose nodes can be assigned layer numbers and the edges connects
Parallel computational geometry: An approach using randomization
819
a layer / node to a layer / + 1 node (butterfly is an example of such a network). Let d denote the maximum distance traveled by any packet and c the largest number of packets that must traverse a single edge (c is also called the congestion of the network). These parameters are fixed for a given selection of paths by all the packets to be routed. Then there exists a scheme for scheduling the movements of the packets such that with high probability the routing can be completed in 0(c -\-d -\- log w) steps where n is the size of the network and 0{n) packets are being routed. 6.5. Given the above result and also the fact that d = O(logn) for most path selection strategies (especially in a butterfly network), it remains to bound the value of c to get a bound on the routing time. For packets being routed to a random location, c can be bounded by O(log^) with high probability. REMARK
The first optimal O(logn) time sorting algorithm called Flashsort for the butterfly network was due to Reif and Valiant [78]. It was based on a PRAM sorting algorithm due to Reishchuk [79] but required several additional techniques because of the constraints imposed by the network connectivity. A slightly simplified version can be presented as the following. (1) Select n^, e
820
J.H. Reifand
S. Sen
Contract into single node
Fig. 6. By contracting subtrees of a fixed depth, we get another tree satisfying the preconditions of the lemma.
is executed in / temporarily overlapping stages / = 0 , 1 , . . . , / — 1. For each w e {0,1}^ the set of keys X[w] that are eventually routed through V[w] is defined recursively. The splitter a[w] partitions X[w] — (r[w] into disjoint subsets X[wO] = {xeX[w]\x
and X[wO] =
{xeX[w]\x>a[w]}
which are subsequently routed through V[M;0] and V[w;l] respectively. In our case, we assume that after each recursive call, the sub-networks (of varying sizes corresponding to different subroutine calls) are relabeled as if these were isolated networks. The y[w;]'s are then defined accordingly. The time analysis for this procedure is carried out using a delay-sequence argument [54] and it can be shown that this takes 0(log w) time in a BFn. We would need a generalization of the result of Theorem 2.7 where the process tree is modified in the following manner. Instead of all the sub-routines from a node proceeding independently, all the subroutines for a fixed (constant) depth subtree are required to finish before proceeding to the next level (of subtrees). This can be reduced to the previous case if we contract a subtree of fixed depth (see Figure 6) into a single node of the tree. By appropriate adjustment of constants, we can prove the following result along the lines of Theorem 2.7.
Parallel computational
geometry: An approach using
randomization
821
6.6. All the leaf level procedures of this modified tree will terminate in 0(\ogn) steps. COROLLARY
6.4. Binary search without concurrent reads One of the frequently encountered problems in case of sequential and parallel algorithms is that of doing a binary search on a tree structure. In particular, given a binary tree of depth O(logn) whose leaves represent certain intervals, and 0{n) keys with one processor per key, we would like to locate the interval that the key belongs to in O(logn) parallel time (for each key simultaneously). This problem also known as multisearching, is trivial in a model allowing concurrent-reads. However, the problem becomes more complicated when concurrent reads are not permitted in the model which is the case with inter-connection networks. The simple algorithm uses concurrent reads in an inherent fashion and for situations where the distribution of the keys is not known, this problem appears even more formidable — see Paul et al. [68]. We also note that in certain cases where the intervals and the keys are chosen from the same total ordering the problem reduces to that of merging which can be done efficiently. However, we are concerned about cases where the intervals may induce an ordering different from the ordering among the keys (see Figure 7). We shall look at a special case where the number of leaves is n^ for 0 < e < 1/2 and the search tree is roughly balanced, so that it has depth O(logn). The basic strategy is the following. We first try to get a reasonably accurate estimate of the number of keys associated with each of the leaf nodes. Following this, we allocate appropriate number of sub-networks based on the estimate. Next we route the keys to their destination subnetworks using a scheme similar to the splitter directed routing (SDR) used in Flashsort. We then solve the problem recursively within each sub-network. Omitting further details, we summarize as as follows. THEOREM 6.7. Given a binary search tree with 0(k) leaves, we can do binary search for 0{k) keys in 0(log/c) time in a butterfly network using kprocessors.
Fig. 7. Points 4 and 5 are in different relative orderings with expect to each-other and the segments.
822
J.H, Reifand S. Sen
6.5. Applications to computational geometry 6.5.1. Searching in arrangements. We first focus our attention the following problem. Given an arrangement of n^ lines, y < 1/3, we want to find out for n given points the region that it belongs to. In particular we would like to do this in O(logn) time on a butterfly network. The above problem is useful for the locus-based partitioning. Using the result for binary searches on butterfly network, we can obtain the following result. We have omitted the details of load-balancing and processor allocation which are beyond the scope of our present discussion. THEOREM 6.8. Given n points in the plane and an arrangement ofm lines, m ^ n ' , for each of the n points, the face containing the point can be determined in O(logn) time in an n-node butterfly network. 6.5.2. Trapezoidal maps. For trapezoidal decomposition, we sample line-segments and build its convex-map. We can build this using the following brute-force approach. For every segment end-point, we order the line-segments by their y coordinates. For every segment, we order the projection of the end-points those are visible (from the bottom and top). From this information, we can construct the trapezoids by simulating 'pointer-jumping' a fixed (at most 6) number of times. LEMMA 6.9. The trapezoidal map ofn^ segments segments can be constructed in 0(log n) time in an^^ processor butterfly network. The remaining segments (not part of the sample) are partitioned into subproblems defined by the trapezoidal map. The partitioning step in trapezoidal decomposition can also be reduced to the problem of searching in arrangements of linear constraints in two dimensions (see Section 4.1.1). The faces of the arrangement are preprocessed so that after the point location, one has to do a table look-up to determine the answer. In this case it is a set of trapezoids (that a segment intersects). Since this can be of various length, it has to be done with a little care. First the number of trapezoids is determined (this is just a number) and then an appropriate number of processors is delegated the responsibility of determining the actual trapezoids. This allocation is done with the help of a prefix computation. Subsequently, each of this processor do a table look up. The table look-up is done by emulating a single step of the CREW PRAM in O(logn) steps. For the filtering step, we need to keep track of parts of segments that completely span a trapezoid. Such segments within a trapezoid have to be processed for binary search such that for end-points lying within the trapezoid, we can quickly determine its closest visible (upper and lower) segments. This can be done in O(logn) time using the algorithm of Section 6.3. Moreover, only the segments that partially or completely lie within a trapezoid are needed for further recursive calls. At each stage we keep track for each end-point, which are its closest (upper and lower) segments and hence at the end we have its trapezoidal edge(s). From this information, we can decompose a simple polygon into one-sided monotone polygons (see Figure 8). This
Parallel computational
geometry: An approach using
randomization
823
Fig. 8. Decomposition into one sided monotone polygons. The dotted lines indicate some of the triangulation edges. The distinguished edge is 1,2.
can be accomplished by an application of sorting and prefix computation (Goodrich [38]). Using Yap's [90] technique, further calls to trapezoidal decomposition within these onesided monotone polygons enables us to determine all the triangulation edges. The procedure is as follows. Step 1. Construct the horizontal trapezoidal decomposition of the one-sided monotone polygon i.e., for every vertex v determine the edges of the polygon that a horizontal line through V while the line is contained within the polygon. Assume that the distinguished edge (the one with which the polygon is monotone) is horizontal. Step 2. Denote the left visible edge by l(v) and right visible edge by r(v) and let X(v) and p(v) denote vertices of /(u) and r(v) respectively which have the lower altitude. Step 3. The set of edges E = {vX(v)} U {vp(v)} form a triangulation of the polygon. Trapezoidal decomposition also enables us to solve the problem of determining visibility of a set of non-intersecting line segments when they are projected orthogonally. Sort the end points of the line segments projected on the jc-direction and choose a point (say the mid-point) in every interval. For each of these points, determine its trapezoidal edge using the trapezoidal decomposition algorithm described above. We can state the main result of this section as the following. THEOREM 6.10. There exist algorithms for problems of Trapezoidal Decomposition, Triangulation of Simple Polygons and Visibility that execute in time O(logn) on an nprocessor butterfly network where n is the input size of the problem.
Using similar methods, we can also implement an algorithm for two-dimensional convex hulls along the lines of the 3-D hull algorithm described in section 4.3. In fact the Filtering step is much simpler.
824
J.H. Reifand S. Sen
6.11. The convex hull ofn points in the plane can be constructed in 0(\ogn) in an n node butterfly network with bounded buffer size.
THEOREM
7. Bibliographic notes Random sampling was introduced into parallel computational geometry by Reif and Sen [75] (conference version) independently around the same time as the seminal papers of Clarkson [25,26] and Haussler and Welzl [51]. All these papers primarily exploited the ^net property, namely the (almost) even partitioning of the problem using a random subset. The subsequent papers of Clarkson [27] and Clarkson and Shor [30] refined the techniques considerably and developed very general and elegant techniques for designing geometric algorithms, namely, the randomized divide-and-conquer and randomized incremental construction. Mulmuley [65,66], extended randomized incremental construction for dynamic settings and obtained impressive results for random updates. The textbook of Mulmuley [67] gives an excellent description of these general techniques. A number of very general properties of random-sampling were proved in Clarkson and Shor [30] that simplified or/and improved existing algorithms. The discussion in Section 3 on properties of random sampling follows the methods of Reif and Sen [75,76]. The proofs of Lemmas 3.2 and 3.5 are somewhat simpler and more direct compared to [26,30] but less general. The technique of Polling was first introduced by Reif and Sen [76] (conference version). It is an efficient method to find a sample with certain desirable properties that succeeds with high probability. The straight-forward sampling, as introduced initially, is guaranteed to succeed with only constant probability which does not suffice for bounding the running times of parallel algorithms (Section 3.2). In particular, the high-probability bounds are critical for divide-and-conquer based parallel algorithms. Even for many sequential algorithms based on Clarkson and Shor's paradigm. Polling can be used to bound the variance of the (otherwise only expected) running times without loss of efficiency. The earliest known results in parallel computational geometry can be traced to the thesis of Anita Chow [21] who described polylog(«) algorithms for a number of basic problems. Aggarwal et al. [1] developed some of the earliest techniques towards a unified approach for solving problems like convex hulls, Voronoi diagrams and triangulation. Atallah, Cole and Goodrich [6] improved the efficiency of these problems by extending the techniques of Cole's parallel mergesort [23] which they called Pipelined cascaded merging. Goodrich's thesis [38] is a comprehensive source of some of the basic parallel techniques for solving geometric problems. A majority of the research in this area was directed towards obtaining 0(logn) time algorithms for the above-mentioned problems with optimal speed-up. Reifand Sen [75,76] designed algorithms using randomization that achieved the above goals even for problems for which matching deterministic algorithms are not known, in particular the 3-D convex hull problem. The algorithm for trapezoidal decomposition in Section 4 is a simpler version of the one in [75]. Clarkson, Cole and Tarjan [29] describe optimal speed-up algorithms for a more general version of this problem where the input is a union of K polygonal chains, possibly self-intersecting. For the case of a simple polygon Goodrich [40] designed an
Parallel computational
geometry: An approach using randomization
825
Optimal deterministic O(logn) time algorithm based on Chazelle's [19] optimal sequential algorithm for triangulation and efficient construction of planar separators. The optimal algorithm for three-dimensional convex hulls appears in [76] — the version presented here uses a simpler Filtering scheme used in Amato et al. [7]. The algorithm for two-dimensional arrangements is based on Hagerup et al.'s [49] optimal speed-up algorithms for constructing arrangements of hyperplanes in d dimensions. Ramaswamy and Rajasekaran [73] describe optimal speed-up algorithms for constructing Voronoi diagrams of line segments using an approach that does not require Polling. The sublogarithmic algorithms of Section 5 appear in Sen [83]. The sublogarithmic algorithms play an important role in the fast (0(log//loglogn) time for output size H) output-sensitive algorithms of Gupta and Sen [45,46]. Efficient output-sensitive algorithms for convex-hulls were first described in Ghouse and Goodrich [37]. The details of the Butterfly implementation can be found in Reif and Sen [77]. The problem of binary-search without concurrent reads is also known as multisearching in literature. For a more detailed treatment of the basic parallel routines of Section 1.3, the reader is referred to the textbook of Ja'Ja' [52], and Rajasekaran and Sen [72]. The planar pointlocation algorithm was discovered independently by Dadoun and Kirkpatrick [32] and Reif and Sen [75] — the version presented here follows the latter. The ^ (log n/log log n) lower bound for selection due to Beame and Hastad [14] discouraged researchers from investigating sublogarithmic algorithms for a while. The first breakthrough was obtained by McKenzie and Stout [62] and subsequently Hagerup and Raman [50] obtained tight bounds for padded-sorting. The 0(log* n) result for approximate compaction was discovered simultaneously by Goodrich [39], Matias and Vishkin [61] and Hagerup [48]. The algorithms referred to in Lemma 2.22 can be found in Bast and Hagerup [13]. The issue of bounding the number of random bits has been dealt in Reif and Sen [76] who show that poly logarithmic number of random bits suffice for the algorithms described in this chapter. Bounding the number of random bits has important ramifications in derandomization. Recently there have been some improved results obtained by efficient derandomization of randomized parallel algorithms — Goodrich [41] and Amato et al. [7]. Among other impressive results they also obtain a deterministic work-optimal threedimensional convex hull algorithm based on the algorithm of Reif and Sen. An important problem that was not discussed in this chapter is the fixed-dimensional linear programming. Randomization has been very successfully used for obtaining some of the most elegant and efficient algorithms for this problem [28,56,60]. Alon and Megiddo [3] describe an 0(1) expected time algorithm for this problem using n processors. The algorithms described in this chapter for 3-D convex hull and multisearching have been further extended by Goodrich [43] to the BSP model.
References [1] A. Aggarwal, B. Chazelle, L. Guibas, C. O'Dunlaing and C. Yap, Parallel computational geometry, Proc. of 25th Annual Symposium on Foundations of Computer Science (1985), 468^77. Also appears in full version in Algorithmica 3 (3) (1988), 293-327.
826
J.H. Reifand
S. Sen
[2] N. Alon and Y. Azar, The average complexity of deterministic and randomized parallel comparison-sorting algorithms, SIAM J. Comput. 17 (1988), 1178-1192. [3] N. Alon and N. Megiddo, Parallel linear programming infixed dimensions almost surely in constant time, J. ACM 41 (1994), 422-434. [4] M.J. Atallah and M.T. Goodrich, Efficient parallel solutions to some geometric problems, J. Parallel Distribut. Comput. 3 (4) (1986), 492-507. [5] M.J. Atallah and M.T. Goodrich, Parallel algorithm for some functions of two convex polygons, Algorithmica 3 (4) (1988), 535-548. [6] M.J. Atallah, R. Cole and M.T. Goodrich, Cascading divide-and-conquer: A technique for designing parallel algorithms, SIAM J. Comput. 18 (1989), 499-532. [7] N.M. Amato, M.T. Goodrich and E. A. Ramos, Parallel algorithms for higher-dimensional convex hulls, Proc. of the 35th Annual FOCS (1994), 683-694. [8] S. Akl, Optimal algorithms for computing convex hulls and sorting. Computing 33 (1) (1984), 1-11. [9] A. Ajtai, J. Komlos and E. Szemeredi, Sorting in clogn parallel steps, Combinatorica 3 (1983), 1-19. [10] R. Anderson and G. Miller, Deterministic parallel list ranking, Manuscript (1988). [11] N.M. Amato and P.P. Preparata, The Parallel 3D convex hull problem revisited, Intemat. J. Comput. Geom. Appl. 2 (2) (1992), 163-173. [12] Y. Azar and U. Vishkin, Tight comparison bounds on the complexity of parallel sorting, SIAM J. Comput. 16 (1987), 458^64. [13] H. Bast and T. Hagerup, Fast parallel space allocation,estimation and integer sorting. Technical Report, MPI-I-93-123 (June 1993). [14] P. Beame and J. Hastad, Optimal bounds for decision problems on CRCW PRAMS, Proc. of the 19th ACM STOC (1987), 83-93. [15] M. Ben-Or, Lower bounds for algebraic computation trees, Proc. of the 15th STOC (1983), 80-86. [16] R.B. Boppana, The average-case parallel complexity of sorting, Inform. Process. Lett. 33 (1989), 145-146. [17] R. Brent, Parallel evaluation of general arithmetic expressions, J. ACM 21 (1974), 201-206. [18] K.Q. Brown, Voronoi diagram from convex hulls. Inform. Process Lett. 9, 223-228. [19] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [20] B. Chazelle and D. Dobkin, Intersection of convex objects in two and three dimensions, J. ACM 34 (1) (1987), 1-27. [21] A.L. Chow, Parallel algorithms for geometric problems, PhD thesis, Dept. of Comp. Sci., Univ. of Ilinois, Urbana, IL(1980). [22] R. Cole, Parallel merge sort, SIAM J. Comput. 17 (1988), 770-785. [23] R. Cole, An optimal efficient selection algorithm, Inform. Process. Lett. 26 (1987/88), 295-299. [24] R. Cole and U. Vishkin, Approximate and exact parallel scheduling with applications to list, tree and graph problems, Proc. 27th IEEE Symp. on Foundations of Computer Science (1986), 511-516. [25] K.L. Clarkson, A randomized algorithm for closest point queries, SIAM J. Comput. 17 (4) (August 1988), 830-847. [26] K.L. Clarkson, New applications of random sampling in computational geometry. Discrete Comput. Geom. (1987), 195-222. [27] K.L. Clarkson, Applications of random sampling in computational geometry II, Proc of the 4th Annual ACM Symp on Computational Geometry (1988), 1-11. [28] K.L. Clarkson, Las Vegas algorithms for linear and integer programming when the dimension is small, Proc. of the 29th IEEE Symposium on Foundations of Computer Science (1988), 452^56. [29] K.L. Clarkson, R. Cole and R. Tarjan, Randomized parallel algorithms for trapezoidal diagrams, Internat. J. Comput. Geom. Appl. 2 (1992), 117-134. [30] K.L. Clarkson and P.W. Shor, Applications of random sampling in computational geometry II, Discrete Comput. Geom. 4 (1989), 387^21. [31] X. Deng, An optimal parallel algorithm for linear programming in the plane. Inform. Process. Lett. 35 (1990), 213-217. [32] N. Dadoun and D.G. Kirkpatrick, Parallel construction of subdivision hierarchies, J. Comput. Syst. Sci. 39 (1989), 153-165. [33] D. Dobkin and R.J. Lipton, Multidimensional searching problems, SIAM J. Comput. 5 (1976), 181-186.
Parallel computational
geometry: An approach using randomization
827
[34] H. Bast, M. Dietzfelbinger and T. Hagerup, A perfect parallel dictionary, Proc. of the 17th Intl. Symp on Math, Foundations of Computer Science, LNCS 629 (1992), 133-141. [35] H. Edelsbrunner, Algorithms in Combinatorial Geometry, Springer-Verlag, New York (1987). [36] H. Edelsbrunner, L. Guibas and J. Stolfi, Optimal point location in a monotone subdivision, SIAM J. Cornput. 15 (1986), 317-340. [37] M.Ghouse and M.T. Goodrich, In-place techniques for parallel convex-hull algorithm, Proc. 3rd ACM Sympos. Parallel Algo. Architect. (1991), 192-203. [38] M.T. Goodrich, Efficient parallel techniques for computational geometry, PhD thesis, Purdue University (1987). [39] M. Goodrich, Using approximate algorithms to design parallel algorithms that may ignore processor allocation, Proc. of the 32nd Annual FOCS (1991), 711-722. [40] M. Goodrich, Planar separators and parallel polygon triangulation. To appear in J. Comput. Syst. Sci. A Preliminary version appeared in Proc. of the 24th ACM STOC (1992), 507-516. [41] M. Goodrich, Geometric partitioning made easier, even in parallel, Proc. of the 9th ACM Symp. on Computational Geometry (1993), 73-82. [42] M. Goodrich, Communication efficient parallel sorting, Proc. of the 28th ACM Symp. on Theory of Computing (1996). [43] M. Goodrich, Randomized fully-scalable BSP techniques for multi-searching and convex hull construction, Proc. of the 8th Symp. on Discrete Algorithms (1997). [44] R.L. Graham, An efficient algorithm for determining the convex hull of a finite planar set. Inform. Proc. Lett. 1 (1972), 132-133. [45] N. Gupta and S. Sen, Optimal and output sensitive algorithms for constructing planar hulls in parallel. To appear in Comput. Geom. [46] N. Gupta and S. Sen, Faster output-sensitive parallel convex hulls for d ^3: Optimal sublogarithmic algorithms for small outputs, Proc. of the 12th ACM Symp. on Computational Geometry (1996), 176-185. Proc. of the ACM Symposium on Computational Geometry (1996). [47] Y. Han, Designing fast and efficient parallel algorithms, PhD thesis, Duke University (1987). [48] T. Hagerup, The log star revolution, Proc. of the 9th Annual STAGS, LNCS 577 (1992), 259-278. [49] T. Hagerup, H. Jung and E. Welzl, Efficient parallel computation of arrangements of hyperplanes in d dimensions, Proc. of ACM Symp on Parallel Algorithms and Architectures, (1990), 290-297. [50] T. Hagerup and R. Raman, Waste makes haste: Tight hounds for loose, parallel sorting, Proc. of the 33rd Annual FOCS (1992), 628-637. [51] D. Haussler and E. Welzl, s-nets and simplex range queries. Discrete Comput. Geom. 2 (1987), 111-152. [52] J. JaJa, An Introduction to Parallel Algorithms, Addison-Wesley (1992). [53] R.M. Karp, Probabilistic recurrence relations, Proc. of the 23rd ACM STOC (1991), 190-197. [54] A. Karlin and E. Upfal, Parallel hashing — an efficient implementation of shared memory, Proc. of the 18th ACM STOC (1986), 160-168. [55] S. Kapoor and P. Ramanan, Lower bounds for maximal and convex layer problems, Algorithmica (1989), 447^59. [56] G. Kalai, A subexponential randomized simplex algorithm, Proc. of the 24th ACM Symposium on Theory of Computing (1992). [57] D.G. Kirkpatrick, Optimal search in planar subdivisions, SIAM J. Comput. 12 (1983), 28-35. [58] D.G. Kirkpatrick and R. Seidel, The ultimate planar convex hull algorithm, SIAM J. Comput. 15 (1) (Feb. 1986), 287-299. [59] B. Maggs, T. Leighton and S. Rao, Universal packet routing algorithms, Proc. of the 29th IEEE FOCS (1988), 256-269. [60] J. Matousek, M. Sharir and E. Welzl, A subexponential bound for linear programming, Proc. of the 8th ACM Symposium on Computational Geometry (1992), 1-8. [61] Y Matias and U. Vishkin, Converting high probability into nearly constant time — with applications to parallel hashing, Proc 23rd ACM Symp. on Theory of Computing (1991), 307-316. [62] P. MacKenzie and Q. Stout, Ultra-fast expected time parallel algorithms, Proc. of the 2nd SODA (1991), 414-423. [63] U. Manber and M. Tompa, The effect of number of hamiltonian paths on the complexity of a vertex colouring problem, SIAM J. Comput. 13 (1984), 109-115.
828
J.H. Reifand
S. Sen
[64] K. Mulmuley, A fast planar partition algorithm, /, Proc. of the 29th IEEE Foundations of Computer Science (1988), 580-589. [65] K. Mulmuley, Randomized multidimensional search trees: Dynamic sampling, Proc. of the 7th ACMSymp. on Computational Geometry (1991), 121-131. [66] K. Mulmuley, Randomized multidimensional search trees: Lazy balancing and dynamic shuffling, Proc. of the 32nd IEEE Foundations of Computer Science (1991), 180-196. [67] K. Mulmuley, Computational Geometry: An Introduction through Randomized Algorithms, Prentice Hall (1994). [68] W. Paul, U. Vishkin and H. Wagener, Parallel dictionaries on 2-3 trees, Proc. of 10th ICALP, Vol. 154 (1983), 597-609. [69] F.P. Preparata and S.J. Hong, Convex hulls of finite sets ofpoints in two and three dimensions, Comm. ACM 20 (1977), 87-93. [70] F.P. Preparata, An optimal real time algorithm for planar convex hulls, Comm. ACM 22 (1979), 402^05. [71] F.P. Preparata and M.I. Shamos, Computational Geometry: An Introduction, Springer-verlag, New York (1985). [72] S. Rajasekaran and S. Sen, Random Sampling Techniques and Parallel Algorithm Design, J.H. Reif, ed., Morgan Kaufman (1993). [73] S. Ramaswami and S. Rajasekaran, Optimal parallel randomized algorithms for Voronoi diagram of line segments in the plane and related problems, Proc. of the 10th ACM Symp. on Computational Geometry (1994), 57-66. [74] A. Ranade, How to emulate shared memory, Proc. of the 28th IEEE FOCS (1987), 185-194. [75] J.H. Reif and S. Sen, Optimal randomized parallel algorithms for computational geometry, Algorithmica 7 (1992), 91-117. A prehminary version appeared in Proc. of the 16th Int'l Conference on Parallel Processing (Aug. 1987). [76] J.H. Reif and S. Sen, Optimal parallel randomized algorithms for three-dimensional convex hulls and related problems, SIAM J. Comput. 21 (3) (1992), 466-485. A preliminary version appears as Polling: A new random sampling technique for computational geometry, in Proc. of the ACM STOC (May, 1989). [77] J.H. Reif and S. Sen, Randomized algorithms for binary search and load-balancing on fixed-connection networks with geometric applications, SIAM J. Comput. 23 (3), 633-651. [78] J.H. Reif and L.G. Valiant, A logarithmic time sort for linear size networks, J. ACM 34 (1987), 60-76. [79] R. Reischuk, A fast probabilistic parallel sorting algorithm, Proc. of the 22nd IEEE FOCS (1981), 212-219. [80] M.F. Roy and R. Pollack, On the number of cells defined by a set of polynomials, Comptes Rendus 316 (1992), 573-577. [81] N. Saranak and R. Tarjan, Planar point locatin using persistent search trees, Comm. ACM 29 (1986), 669679. [82] S. Sen, Random sampling techniques for efficient parallel, algorithms in computational geometry, PhD thesis, Duke University (1989). [83] S. Sen, Lower bounds for algebraic decision trees, complexity of convex hulls and related problems. To appear in Theoret. Comput. Sci. A preliminary version appeared in Proc. of the 14th FST&TCS, Madras, India (1994). [84] M.I. Shamos, Computational geometry, PhD thesis, Yale Univ., New Haven (1978). [85] J. Steele and A.C. Yao, Lower bounds for algebraic decision trees, J. Algorithms (1982), 1-8. [86] L.G. Valiant, A scheme for fast parallel communication, SIAM J. Comput. 11 (1982), 350-361. [87] L.G. VaUant, A bridging model for parallel computation, Comm. ACM 33 (1990), 103-111. [88] J. Wyllie, The complexity of parallel computation, PhD thesis, Cornell University (1979). [89] A.C. Yao, A lower bound for finding convex hulls, J. ACM 28 (1981), 780-787. [90] C.K. Yap, Parallel triangulation of a polygon in two calls to the, trapezoidal map, Algorithmica 3 (1988), 279-288.
CHAPTER 19
Visibility in the Plane Tetsuo Asano Japan Advanced Institute of Science and Technology, Asahidai, Tatsunokuchi, Ishikawa, 923-12, Japan E-mail: [email protected]
Subir K. Ghosh School of Computer Science, Tata Institute of Fundamental Research, Bombay 400005, India E-mail: [email protected]
Thomas C. Shermer School of Computing Science, Simon Eraser University, Bumaby, BC Canada V5A 1S6 E-mail: [email protected]
Contents 1. Introduction and motivation 2. Overview 2.1. Convexity 2.2. Kernels and star-shaped sets 2.3. Visibility polygons 2.4. Weak and complete visibility 2.5. Triangulation and trapezoidation 2.6. Visibility graphs 2.7. Guard sets 2.8. Watchman routes 2.9. Hidden sets 2.10. Link properties 2.11. Organization of this chapter 3. Triangulation and trapezoidization 4. Computing visibility polygons 4.1. Problems and results 4.2. Computing the visibility polygon of a point in a polygon 4.3. Computing the visibility polygon of a point in a polygon with holes 4.4. Computing the weak visibility polygon of a segment in a polygon HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V All rights reserved
829
831 833 834 834 835 835 837 839 840 841 841 841 842 842 844 844 845 849 853
830
T. Asano, S.K. Ghosh and T.C. Shermer
5. Characterizing and recognizing visibility polygons 5.1. Problems and results 5.2. Recognizing a point visibility polygon 6. Computing visibility graphs 6.1. The problem and results 6.2. Computing the visibiUty graph of a polygon with holes 7. Characterizing and recognizing visibihty graphs 7.1. Problems and results 7.2. Necessary conditions for recognizing visibility graphs 8. Other types of visibility References
856 856 858 860 860 861 864 864 866 867 871
Visibility in the plane
831
1. Introduction and motivation In this chapter, we study the geometric notion of visibility and many algorithmic questions that incorporate this notion. Consider the following questions: QUESTION 1. Two people are standing at specific places in a large, twisty cavern. If one of them is wearing a glow-in-the-dark hat, will the other one see it? QUESTION 2. A fluorescent tube is placed along the bottom of a wall in a room that also contains several pieces of furniture. When the tube is turned on, which parts of the floor are ht? QUESTION 3. A robot is located in afieldthat contains several fallen logs, which the robot cannot cross. To what locations can the robot move without turning?
Although it may not be obvious at first glance, these questions all are concerned with visibility. We now formally define visibility and the settings under which we use it, and reformulate the above problems as we proceed. A closed polygonal curve is a curve composed of a set of at least three vertices {ui, 1^2,..., fn} (which are points in the plane), and a set of edges {ei, ^2, • • •, ^n}, where each edge et is a line segment from u/ to i;/+i (subscripts are considered modulo n\ e.g. Vn+\ = 1^1). In addition, it is required that the only pairs of edges that intersect are pairs of the form e/, g/+i, whose intersection must be exactly their common vertex i;/+i. A closed polygonal curve is a curve in the plane, homeomorphic to a circle; it has a well-defined interior and exterior. A polygon is then a closed polygonal curve along with its interior; a polygon is shown in Figure 1(a). A vertex of a polygon is called convex if the interior angle between its two incident vertices is at most TX ; otherwise it is called reflex. In the algorithms presented, we assume that polygons are given as a linked list of vertices, given in the order that they are encountered in a counterclockwise traversal of the boundary; this means that the polygon is locally to the left of any edge et traversed from vt to fz+i. We will use the symbol P to refer to a polygon, n to refer to the number of vertices of P, and r to refer to the number of reflex vertices of P. We say that two points x and yindi polygon P are visible if the line segment xy contains no points of the exterior of P (see Figure 1(b)). This definition allows the segment of visibility x j to go through a reflex vertex (as with a and c in the figure) or graze along a polygon edge (as with a and d in the figure). As alternative terminology, we also say that X sees y'lfx and y are visible. If we model the cavern of Question 1 as a polygon, and the locations of the people as points inside the polygon, we can restate Question 1 as: QUESTION
V. Given a polygon P and two points x, 3;
G
P, are x and y visible?
A polygon with holes is a polygon with the interior of zero or more non-intersecting sub-polygons removed from it (where each sub-polygon must be properly contained in the polygon); a polygon with holes is shown in Figure 2(a). Visibility in a polygon with holes is much the same as visibility in a polygon, where the interior of the holes is considered to
832
T. Asano, S.K. Ghosh and T.C. Shermer
(a)
(b)
Fig. 1. (a) A simple polygon, (b) The point a sees b, c, and d, but not e.
Q
O
•
(a) Fig. 2. (a) A polygon with holes, with the exterior shown shaded, (b) The point a sees b, c, and d, but not e.
be exterior to the polygon; examples are shown in Figure 2(b). We will also use the symbol P to refer to a polygon with holes, where n is the number of vertices of P (on the outer or inner polygons), r is the number of those vertices that are reflex, and h is the number of holes. We can model the room of Question 2 as a polygon with holes; the holes represent the furniture. We can then restate Question 2 as: QUESTION 2\ Given a polygon with holes P and an edge e of P, which points of P are visible from some point of ^?
A line segment arrangement is a collection of line segments in the plane; such an arrangement is shown in Figure 3(a). The boundary of a polygon or of a polygon with holes is a line segment arrangement (where the line segments have common endpoints). We can define visibility in a line segment arrangement A as follows. Two points x and y in the plane will be called visible (with respect to A) if the interior of the line segment xy does not intersect (and cross) the interior of any of the line segments in A (see Figure 3(b)). This
Visibility in the plane
833
Fig. 3. (a) An arrangement of line segments, (b) The point a sees b, c, and d, but not e.
definition allows the segment of visibility to pass through the endpoint of a segment of A (as with a and c in the figure), or to have grazing contact along a segment of A (as with a and d in the figure). Using this definition, and modelling logs as line segments. Question 3 can be restated as: QUESTION y. Given a line segment arrangement A and a point p, which points of the plane are visible from pi
These three settings that we have introduced (in a polygon, in a polygon with holes, or in the presence of an arrangement of segments) are the most studied settings for algorithmic visibility problems, and we will generally restrict our attention to them. In fact, our main focus will be on visibility in a polygon, with somewhat shorter discussion on visibility in a polygon with holes or in a line segment arrangement. Other settings are also possible, such as visibility inside an arbitrary point set, or in the presence of a collection of smooth convex sets. A great deal of the mathematical literature on visibility deals with these other settings but most of the computing literature, for obvious representational reasons, does not. The study of visibility dates from at least the 1910's, when Brunn [26] proved a theorem about the kernel of a set. Today visibility is used in many computing applications, including robotics [86,118,125], motion planning [101,87], computer vision [154], computer-aided architecture [34,46], computer graphics [97,103], and pattern recognition [145]. In the following section we give a brief overview of the main topics in visibility, and then discuss the organization of the remainder of this chapter.
2. Overview The major topics in visibility generally arise from secondary definitions that make use of the basic visibility definition presented in the introduction. In this section, we present a selection of these major topics. For some topics, we include a few basic mathematical results and references to the mathematical literature. However, the focus of this chapter is algorithmic and we make no at-
834
T. Asano, S.K. Ghosh and T.C. Shermer
(a)
(b)
Fig. 4. (a) A convex polygon, (b) A star-shaped polygon, with its kernel shown shaded.
tempt at providing any survey of the mathematical results on visibility. At the end of this section we discuss the organization of the remainder of this chapter. 2.1. Convexity A set (e.g. a polygon) is called convex if every pair of points in the set is visible; i.e. S is convex ii^x.y e S x sees y. A convex polygon is shown in Figure 4(a). Convex sets are a field unto themselves and have an extremely rich literature; we make no attempt to survey the results on convex sets here. (A thorough treatment is the two-volume set edited by Gruber and Wills [68].) However, we will mention one classical result, a theorem of Tietze's, which we restrict to polygons: THEOREM
2.1 (follows from Tietze [ 144]). A polygon is convex iff it has no reflex vertices.
This theorem immediately gives rise to an optimal 0{n) algorithm for detecting if a polygon is convex: simply check each vertex to see if it is reflex. Note that a polygon with holes (provided it has at least one hole) cannot be convex. 2.2. Kernels and star-shaped sets The kernel K(S) of a set S is the set of all points in S that see all of the points of 5; Formally, K(S) = [x e S \>/y e S X sees y].A convex set has K(S) = S. If K(S) is nonempty, then S is called star-shaped; i.e. a star-shaped set contains a point that sees all of its other points. Figure 4(b) shows a star-shaped polygon and its kernel. Brunn's original theorem on star-shaped sets describes the shape of the kernel: THEOREM
2.2 (Brunn [26]). For any set S, K(S) is convex.
Another classical result on star-shaped sets is Krasnoselski's theorem, which establishes a condition that is equivalent to the definition of star-shaped: THEOREM 2.3 (Krasnoselski [85]). A set S in R^ is star-shaped iff every triple of points in S is seen by some point of S, i.e. S is star-shaped iffWx,y,z ^ S 3w e S w sees x, j , and z.
Visibility in the plane
835
Krasnoselski actually proved a generalization of this result, that S in R^ is star-shaped iff every (d + 1)-tuple of points in S is seen by some point of S. This theorem is called a Helly-type result, as it is similar in form to Helly's Theorem, which states that a family of convex sets in R^ has a common intersection iff every subfamily of (J + 1) sets has a common intersection. There is a recent survey of Helly-type results by Eckhoff [51]; these results are fundamental in the field of combinatorial geometry. In dealing with polygons, Krasnoselski's theorem can be considerably sharpened (see, e.g. [1491): THEOREM 2.4. A polygon P is star-shaped iff every triple of convex vertices is seen by some point of P.
This characterization does lead to an algorithm for detecting if a polygon is star-shaped. However, this algorithm would be inefficient and much better algorithms are possible; in Section 5.2 we show how to not only detect star-shapedness, but also how to compute the kernel of a polygon. Polygons with at least one hole cannot be star-shaped.
2.3. Visibility polygons The visibility polygon V(p) of a point p in a polygon P is the set of all points visible to p; formally, V(p) = {q e P \ p sees q}. A similar definition holds in a polygon with holes or an arrangement of segments. Figure 5 shows the visibility polygon of a point in a polygon, a polygon with holes, and a line segment arrangement. By definition, any V(p) is star-shaped (p is in its kernel). Note that, as shown in Figure 5(c), the visibility polygon of a point in a line segment arrangement may be infinite. Hence does not really fit our definition of polygon! Another more subtle way in which a visibility polygon may fail to be a polygon is shown in Figure 6. In this figure, consider the visibility polygon of the point /?, which is on the line through reflex vertices q and r. This visibility polygon will look like Figure 6(b); i.e. it is the union of a polygon and the line segment rs. Be careful of these exceptions when implementing visibility polygon algorithms (or when using the output of someone else's implementation). In Section 4, we show how to compute the visibility polygon from a point in a polygon, polygon with holes, or line segment arrangement.
2.4. Weak and complete visibility Let 5* be a subset of a polygon P (or in one of our other settings). A point p is said to be weakly visible from S if it is visible to any point of S. The set of all points weakly visible to S is called the weak visibility polygon of S, and denoted V(S)\ the weak visibility polygon of an edge of a polygon is shown in Figure 7(a). In the same setting, a point p is called completely visible from S if it is visible to every point of S. The set of all points completely visible to S is called the complete visibility polygon of S; an example is shown in Figure 7(b).
836
T. Asano, S.K. Ghosh and T.C. Shermer
Fig. 5. The visibility polygon of p. (a) In a polygon, (b) In a polygon with holes, (c) In a line segment arrangement.
(a)
(b)
Fig. 6. (a) A case in which V{p) fails to be a polygon, (b) The visibility polygon of p.
(a)
(b)
Fig. 7. (a) The weak visibility polygon of the edge e. (b) The complete visibility polygon of the edge e.
Visibility in the plane
837
Fig. 8. (a) A segment pq in a polygon with holes, (b) The visibility polygon of p. (c) The complete visibility polygon of pq.
These definitions were introduced by Avis and Toussaint [15], who amongst other things show: THEOREM 2.5 (follows from Avis and Toussaint [15]). The complete visibility polygon of a line segment pq in a polygon is the intersection ofV(p) and V(q).
This theorem does not hold if we change the setting to a polygon with holes or a line segment arrangement. However, a slight change in the theorem will fix the problem: 2.6. The complete visibility polygon of a line segment pq in a polygon with holes or line segment arrangement is the visibility polygon ofq in V{p).
THEOREM
Figure 8 shows the process of computing a complete visibility polygon as described in this theorem; Figure 8(a) shows the segment pq in a polygon with holes P, Figure 8(b) shows V{p) in P, and Figure 8(c) shows the visibility polygon of q in V{p). In Section 4 we more closely examine the problem of computing the weak or complete visibility polygon from a line segment or convex set, and in Section 5 we discuss determining if a given polygon contains any segment or edge from which it is weakly or completely visible. 2.5. Triangulation and trapezoidation A diagonal of a polygon is a line segment whose endpoints are a pair of visible vertices. A triangulation of a polygon is a division of the polygon into triangles by diagonals. A triangulated polygon is shown in Figure 9(a). One can also divide a polygon into triangles without requiring that the partitioning segments be diagonals, i.e. by partitioning along any set of appropriately-chosen line segments inside the polygon. In such a triangulation, there may be endpoints of line segments that are not vertices of the polygon (such endpoints are called Steiner points), so this type of triangulation is called a triangulation with
838
T. Asano, S.K. Ghosh and T.C. Shermer
Fig. 9. (a) A polygon and one of its triangulations. (b) The dual tree of the triangulation. (c) A triangulation with Steiner points.
Steiner points. A polygon triangulation with Steiner points is shown in Figure 9(c). Triangulations with Steiner points are often used with the finite element method (where they are sometimes called triangular meshes) [27,98]. Researchers in several different areas of mathematics have shown the following theorem. We cite the earliest reference of which we are aware (there are almost undoubtedly earlier ones). THEOREM
2.7 (follows from Lennes [96]). Every polygon admits a triangulation.
An ear of a polygon is a triangle contained in the polygon, formed by three consecutive vertices f/, fz+i, and u/+2- Meisters proved a result that leads to an easy inductive proof of the previous theorem. THEOREM 2.8 (Meisters [105]). Every polygon with at least four vertices has two nonoverlapping ears.
The dual or dual tree of a triangulation is a tree having a node for each triangle of the triangulation, and an arc between every pair of nodes that correspond to triangles that share a diagonal. The dual tree of the triangulation of Figure 9(a) is shown in Figure 9(b). Meister's theorem is easily shown from Lennes' by noting that the dual tree must have two leaves; the triangles corresponding to these leaves are nonoverlapping ears. It is also true that every polygon with holes and every line segment arrangement admits a triangulation without Steiner points (for line segment arrangements, only the inside of the convex hull is divided into triangles). Examples are shown in Figure 10, along with their dual graphs. The dual graphs of triangulations of polygons with holes or of line segment arrangements may have cycles; cycles are not possible in the duals of triangulations of polygons. A trapezoidization of a polygon is a division of the polygon into trapezoids (some of which degenerate into triangles) by maximal horizontal chords through each vertex. A trapezoidization of a polygon is shown in Figure 11(a). Trapezoidizations are sometimes called horizontal decompositions. The dual tree of a trapezoidization is defined similarly
Visibility in the plane
839
(a) Fig. 10. (a) A triangulation of a polygon with holes, with its dual graph, (b) A triangulation of a line segment arrangement.
Fig. 11. (a) A trapezoidization of a polygon, (b) The dual tree of the trapezoidization. (c) A trapezoidization of a line segment arrangement.
to the dual tree of a triangulation; the dual tree of the trapezoidization of Figure 11(a) is shown in Figure 11 (b). Trapezoidizations can also be defined on polygons with holes and line segment arrangements. In the latter case, some of the trapezoids will be infinite, as illustrated in Figure 11(c). We further discuss triangulations and trapezoidizations in Section 3.
2.6. Visibility graphs The vertex visibility graph (often called simply the visibility graph) VG(F) of a polygon P is the graph of the visibility relation on the vertices of the polygon. It has a node for every vertex of P and an edge for every pair of visible vertices. Figure 12(b) shows the visibility graph of the polygon in Figure 12(a). We often draw the visibility graph directly on the polygon, as shown in Figure 12(c). This shows that another way of thinking about the visibility graph is as the collection of all edges and diagonals of the polygon. From this viewpoint, a triangulation can be considered
840
T. Asano, S.K. Ghosh and T.C. Shermer h
(a)
(b)
(c)
Fig. 12. (a) A polygon, (b) The visibility graph of the polygon, (c) The visibility graph drawn on the polygon.
a subgraph of the visibiUty graph. In fact, any maximal subgraph of the visibiHty graph with no edge crossings is a triangulation. Vertex visibiHty graphs of polygons with holes and of line segment arrangements are defined similarly; the endpoints of the line segments serve as the vertices of a line segment arrangement. In Section 6, we will show how to compute the visibility graph of a polygon. The opposite problem, finding a polygon whose visibility graph is a given graph (if possible), is still unsettled and is one of the outstanding open problems in visibility. In Section 7, we survey what is known about this opposite problem. Other types of visibility graphs can also be defined, such as the edge visibility graph (the graph of the weak visibility relation on edges), the vertex-edge visibility graph, and the point visibility graph.
2.7. Guard sets A guard set or a visually dominating set in a polygon is a set of points which the entire polygon is weakly visible from. Each of the points in the guard set is called a guard (the polygon is being envisioned as an art gallery and the points as security guards which must see the entire gallery). Figure 13(a) shows a guard set in a polygon. Lee and Lin, and Aggarwal, have shown that finding a minimum-size guard set for a polygon is NP-hard [90,6]. However, there is a bound known on the size of a minimum-size guard set in a polygon. 2.9 (Chvatal [39]). Any polygon with n vertices has a guard set with at most Lf J guards.
THEOREM
This theorem is known as the Art Gallery Theorem. Guard sets and art-gallery-type theorems are a large subfield of visibility [110,135] and are covered in Chapter 22. We will not consider them further here.
Visibility in the plane
(a)
(b)
841
(c)
Fig. 13. (a) A guard set {a,b,c]. (b) A watchman route, (c) A hidden SQi{d,e,
f,g].
2.8. Watchman routes A watchman route in a polygon is a path or closed circuit in a polygon from which the polygon is weakly visible. A watchman route is shown in Figure 13(b). A minimum-length watchman route can be found in a polygon in polynomial time [36,142,141,28] although a minimum-/m^ (fewest number of segments) watchman route is NP-hard to compute [7]. Watchman routes, and the related robber routes [109], safari routes [35], zookeeper routes [37], and aquarium-keeper routes [57] are covered in Chapter 22.
2.9. Hidden sets A hidden set or visually independent set in a polygon is a set of points such that no two points in the set see each other. A hidden set is shown in Figure 13(c). The maximum hidden set size is related to a property called "property P ^ " [80]. Shermer showed that finding a maximum hidden set in a polygon is NP-hard [132]. Results on hidden sets are also covered in Chapter 22.
2.10. Link properties The link distance between two points p and ^ in a polygon P is the minimum number of line segments (links) in a polygonal path from p to q that stays within P. In Figure 14(a), the link distance from a to Z? is 3, and the link distance from a to c is 4. Two points are visible if their link distance is one. The link diameter of a polygon is the maximum, over all pairs of points in the polygon, of the link distance of the pair of points. The polygon of Figure 14(a) has link diameter 4, realized by the points a and c. If a polygon has link diameter one, it is convex. The link eccentricity or covering radius of a point /? in a polygon is the maximum link distance from p to any other point of the polygon. The link center of the polygon is the set of points with minimum link eccentricity, and the link radius is the link eccentricity of the
842
T. Asano, S.K. Ghosh and T.C. Shermer
Fig. 14. (a) A polygon with link diameter 4. (b) The link center of a polygon.
points in the link center. In Figure 14(b), the hnk center is shown shaded; the polygon in that figure has link radius two. These link properties have been studied by both mathematicians [150,76,21,25] and computer scientists [139,48,95]. Efficient algorithms exist for computing link properties. They are the subject of Chapter 12 and will not be covered further here.
2.11. Organization of this chapter The remainder of this chapter is organized as follows. In the next section, Section 3, we discuss triangulation of polygons and polygons with holes. In Section 4, we discuss results on how to compute visibility polygons, and present algorithms for computing the visibility polygon from a point in a polygon or polygon with holes, and for computing the weak visibility polygon from a segment in a polygon. In Section 5, we discuss results on the structure of visibility polygons and how to recognize them, and give an algorithm for computing the kernel of a polygon. In Section 6, we discuss the problem of computing visibility graphs, and give an algorithm for computing the visibility graph of a polygon with holes. In Section 7, we investigate what is known about characterizing visibility graphs, and present some conditions that a graph must satisfy in order to be a visibility graph of a simple polygon. Finally, in Section 8, we discuss some common variations of the definition of visibility.
3. Triangulation and trapezoidization Many algorithms in visibility, and in computational geometry in general, rely on a first stage of computing a triangulation of an input polygon, polygon with holes, or line segment arrangement. Thus, triangulation is a central computational geometric problem, and so triangulation problems have been extensively studied. In this section, we provide a very brief overview of the results on triangulation. Recall from Section 2.5 that a triangulation is a division of the input (say, a polygon) into triangles by the addition of diagonals. Triangulations are illustrated in Figures 9 and 10. For a polygon without holes, a triangulation uses n — 3 diagonals and divides the polygon into
Visibility in the plane
(a)
843
(b)
Fig. 15. (a) A 7-monotone polygon, (b) A y-monotone decomposition of a polygon.
n — 2 triangles. For a polygon with h holes, there are n + 3/z — 3 diagonals and n-{-2h — 2 triangles. The first major result on triangulation was an algorithm by Garey, Johnson, Preparata, and Tarjan that computes a triangulation of a polygon in 0(nlogn) time [62]. The first step of their algorithm is to decompose the polygon into y-monotone subpolygons. A ymonotone polygon is a polygon whose boundary can be divided into two pieces such that each piece has vertices with increasing y-coordinates. A y-monotone polygon is shown in Figure 15(a), and a decomposition of a polygon into v-monotone pieces is shown in Figure 15(b). This subdivision is accomplished in 0(n\ogn) time by another algorithm, from a paper by Lee and Preparata [92] on locating a point in a set of given regions. Garey et al. then show how to triangulate a monotone polygon in 0{n) time; applying this to each monotone piece from the first step completes the algorithm. Although there are now other, theoretically more efficient algorithms, this algorithm is conceptually quite clean and straightforward to implement, and is often used in practice. Asano, Asano and Pinter [11] studied triangulation in polygons with holes, and noted that the algorithm of Garey et al. is easily extended to handle this setting. (In fact, no change is necessary — the algorithm of Lee and Preparata will decompose not only polygons, but a much more general structure known as SL planar subdivision, of which polygons with holes are a special case.) Asano et al. also proved that, in polygons with holes, at least Q (n log n) time is necessary to compute a triangulation, by showing that one can sort n numbers by solving a triangulation problem for a polygon with 3n -f 3 vertices and n holes. This implies that the Garey et al. algorithm is optimal for polygons with holes. Another conceptually clean 0(nlogn) triangulation algorithm was presented by Mehlhom [104]; this algorithm is based on the plane sweep idea (essentially, moving a vertical line from left to right across the polygon). Ghosh and Mount [67] generalized this algorithm to polygons with holes. The Asano et al. result left behind one unanswered main question: is it possible to triangulate a polygon (without holes) in o(nlogn) time? (Informally, o(nlogn) means strictly less than 0(n log n).) Many researchers worked on this problem. One approach was to find classes of polygons that could be triangulated in 0(n) time; such a class is called triangulation-linear.
844
T. Asano, S.K. Ghosh and T.C. Shermer
(Monotone polygons are triangulation-linear, as noted above.) There were three motivations for this work. First, one might, by successively broadening these classes of polygons, eventually arrive at an algorithm for the class of all polygons. Second, perhaps one of these classes has a subdivision algorithm, like that of Lee and Preparata, but taking only 0{n) time, giving an 0{n) algorithm for all polygons. Third, some of the classes are interesting in their own right and applications that use these classes could benefit from the 0{n) algorithm. This approach yielded many triangulation-linear classes [55,60,65,71,94,117, 147,152], but has not made real progress towards proving that the class of all polygons is triangulation-linear. Another approach to o{n logn) triangulation was to find algorithms whose running time was based on structural characteristics of the polygon. The most notable of these are the algorithms by Hertel and Mehlhorm [75] and by Chazelle and Incerpi [32]. The algorithm of Hertel and Mehlhom takes 0{n + r log r) time, where r is the number of reflex vertices. The algorithm of Chazelle and Incerpi takes 0{n logs) time, where s is the sinuosity of the polygon. The sinuosity is a measure of how much the polygon boundary alternates between left and right turns; informally, it has something to do with how much the polygon "wiggles back and forth". In practice, s is quite small, even for complicated polygons. One can view the Garey et al. result as saying that decomposition into monotone pieces and decomposition into triangles (triangulation) are linear-time equivalent: having one decomposition, you can find the other in 0{n) time. A third approach to o{n\ogn) triangulation was to find other decompositions that are linear-time equivalent to triangulation. Foumier and Montuno showed that triangulation and trapezoidization (see Section 2.5) (and some other decompositions) are hnear-time equivalent [60]. Chazelle and Incerpi also proved the linear equivalence of triangulation and trapezoidization (thankfully, these two papers are one after another in the same journal). Tarjan and Van Wyk were the first to establish an o(n log/i) algorithm [143] for polygon triangulation. Their algorithm runs in O(nloglogn) time, and actually computes a trapezoidization rather than a triangulation. Afterwards, Clarkson, Tarjan, and Van Wyk [40] and Seidel [129] then developed randomized algorithms with 0(nlog*n) expected time. Another 0{n\og\ogn) algorithm was presented by Kirkpatrick, Klawe, and Tarjan [83]; this algorithm is simpler and easier to implement than the one by Tarjan and Van Wyk. Finally, Chazelle [29] settled the question, presenting an 0{n) algorithm for polygon triangulation. Although his algorithm does not require complex data structures, it is still quite complicated and generally not considered a practical algorithm. The development of a truly simple linear-time triangulation algorithm remains an open problem.
4. Computing visibility polygons 4.1. Problems and results The most basic visibility polygon computation problem is that of finding the collection V{p) of all points visible to a point /? in a polygon (see Figure 5(a)). This problem was first taken up in a theoretical setting by Davis and Benedikt [46], who presented an algorithm that takes O(n^) time. Soon thereafter, ElGindy and Avis [54] and Lee [89] published
Visibility in the plane
845
linear-time algorithms. However, both of these linear-time algorithms fail for certain cases; this was discovered by Joe [77] and Joe and Simpson [78,79], who also present corrections to the algorithms. In Section 4.2 below, we present Lee's algorithm. This problem of computing the visibility polygon from a point is an integral part of the rendering process in computer graphics, where it is called hidden line elimination or hidden surface elimination [50]. However, the computer graphics version is most often considered in three dimensions, rather than two, with the setting being "in an arrangement of polygons" (the three-dimensional analog to "in an arrangement of segments"). McKenna [103] presents an O(n^) (theoretical) solution for this three-dimensional problem, which is worstcase optimal. However, this algorithm is not used in practice, where average-case time complexity is most important, and the discrete nature of the display space can be exploited. Avis and Toussaint [15] introduced weak and complete visibility: a point is weakly visible from a set S if it is visible to at least one point in S, and it is completely visible from S if it is visible to all points in 5. In their definition, S was an edge of the polygon, but later work has focussed on more general sets S. As discussed in Section 2.4, the complete visibility polygon V{S) of any line segment S = pq'mdi polygon (or polygon with holes) P can be obtained by computing the visibility polygon V{p) of p in P, and then computing the visibility polygon W{q) of q in V{p)\ W{q) is then the complete visibility polygon of pq in P. Since computing the visibility polygon of a point can be accomplished in 0(n) time, this approach gives an 0(n) time algorithm for computing the complete visibility polygon of a line segment. On the other hand, computing the weak visibility polygon of a segment S = uv in a, polygon is not a straightforward task. ElGindy [56], Lee and Lin [91], and Chazelle and Guibas [30] presented 0(n logn) time algorithms for this problem. Guibas et al. [69] gave a linear-time algorithm for the same problem, if a triangulation of the polygon is part of the input. Since we can combine this with the linear-time triangulation algorithm of Chazelle [29], this algorithm computes the weak visibility polygon of a segment in 0(n) time. Suri and O'Rourke [140] and Asano et al. [12] presented 0(n logn) algorithms for computing the visibility polygon of a point in a polygon with holes (see Figure 5(b)). In Section 4.3 below, we present the algorithms of Asano et al. Later, Heffeman and Mitchell [73] presented an 0(n + h log h) time algorithm for this problem (h is the number holes). Suri and O'Rourke [140] also presented an algorithm for computing the weak visibility polygon from a line segment in a polygon with holes. Their algorithm runs in 0(n'^) time, which is, surprisingly, worst-case optimal: there are polygons with holes that contain a line segment whose visibility polygon has Qin"^) vertices. Ghosh [63] studied the problem of computing the complete and weak visibility polygons of a polygon Q inside another polygon P. He presented 0(n -h A:) algorithms for both of these problems, where k is the number of vertices of Q. No result is known for this problem if the polygon contains holes. 4.2. Computing the visibility polygon of a point in a polygon In this section, we present the algorithm given by Lee [89] for computing the visibility polygon from a point in a polygon. The input to this algorithm is a polygon P and a query point q inside P. The output is V(^), the visibility polygon of ^ in P.
846
T. Asano, S.K. Ghosh and T.C. Shermer
Fig. 16. Regions when i;/_2 is to the right of ^ .
Please note that, as pointed out by Joe and Simpson [79], this algorithm contains a technical problem that will cause it to fail on polygons with sufficient winding. Refer to their paper for details of how to correct this shortcoming. The first step is to find the point i;o of the boundary of P that q sees directly to the right. This is accomplished by examining each edge of the polygon to see if it has one endpoint above q and one below q\ if so, then this edge is intersected by the horizontal line through q and we can compute the intersection point. From all of the intersection points found, we choose as i>o the one that is leftmost amongst those to the right of q (i.e. the one with the lowest abscissa that is larger than the abscissa of q). We henceforth assume that the vertices are labelled v\,V2,. .-.Vn in counterclockwise order with v\ being the first vertex counterclockwise of VQ. The algorithm will process each of the vertices of P in order. At each step, the contents of a stack are updated; the stack maintains what is currently thought to be visible from q. At the end of the algorithm, the stack contains the vertices of V(^). The stack is initialized to contain the two points VQ and v\, with VQ on the bottom. We begin the iterative part of the algorithm by examining V2 (and then proceed to U3, etc.). The current state of the algorithm is denoted by a pair {x\ S) where x is the vertex currently being examined, and S is the stack contents, listed from bottom to top. Thus, the initial state is {v2\ fo, 1^1 )• In general, the algorithm is in a state {vi\V{) = SQ,S\, .. .,Sj =Vi-\). In this situation, Vi-2 is one of the endpoints of the last examined edge. We consider two cases based on which side of the ray qs) the vertex Vi-2 lies. Case 1. Vertex Vi-2 lies to the right of ^ . In this case, let Q be the polygon defined by q,SQ,s\,.. .,Sj. Furthermore, divide the exterior of Q into L and R, where L is those points on or to the left of ^ , and R is those points to the right of q^j (see Figure 16(a)). We consider three subcases, depending on whether the current vertex vi h'm R, L,ox Q.
Visibility in the plane
\
847
q
(d) Fig. 17. Various cases when i;/_2 is left ofqJ^j.
Case la. vt e R (see Figure 17(a)). In this case, the vertex vt is not visible from q. We process the vertices of P starting from vt until we encounter a vertex Vk such that the edge Vk-iVk crosses the ray from Sj in the same direction as q^; such a vertex Vk must exist. Let w be the intersection of the ray with the edge Vk-\Vk. We place w and Vk on the stack, and arrive at the state (fy^+i; SQ, .. .,Sj,w,Vk)-ln the next iteration, the algorithm will be in Case 1. Note that if any edges of P cross the ray q^ before the vertex Vk is found, then we take consider vertices as candidates for Vk when the boundary has crossed q^ an even number of times. Otherwise, situations such as that shown in Figure 17(a) would be incorrectly handled. Case lb. vi e L (see Figure 17(b)). Here we simply place vt on the stack; the next state is (i^/+i \SQ,S\, In the next iteration, the algorithm will be in Case 1.
... .Sj^Vi).
848
T. Asano, S.K. Ghosh and T.C. Shermer
(a) Fig. 18. Cases when i;/_2 is right of ^ .
Case Ic. Vi G Q (see Figure 17(c)). The vertex Sj = i>/-i on the top of the stack is not visible from q, and other stack elements may not be visible as well. We pop elements from the stack until the top of the stack is some Sm such that either the edge Vi-.\Vi intersects StnSm+\ at some point v, or vi lies to the left of ^ ^ . In the former case (see Figure 17(c)), vi is not visible from q. We continue processing the vertices of P until we find a vertex Vk such that the edge Vk-iVk crosses Sm v in the counterclockwise sense with respect to q; such a Vk must exist. Let w be the point where Vk-\Vk crosses SmV. We push w and Vk onto the stack, and so the next state is {vk+\ \S{),s\,. ..,Sm, w, Vk), which will lead to Case 1. In the latter case (see Figure 17(d)), let w be the intersection of SfnSm-\-i and qlfi. We push w and vi onto the stack, giving state (Vi-^\; so,s\,.. .,Stn,'w,Vi), which will lead to Case 2. Case 2. Vertex Vi-2 lies to the left of qfj. In this case, let Q\ be the polygon defined by SjSj-\ and the boundary of P from Sj-\ to Sj, Q2 be the polygon defined by ^, ^o, ^ i , . . . , ^y-i, and L be the remainder of the plane (see Figure 16(b)). As before, we investigate three subcases based on where vi lies. Case 2a. Vi e Q\ (see Figure 18(a)). In this case Vi is not visible from q. We process the vertices of P until finding a vertex Vk such that the edge Vk-\Vk intersects Sj-\Sj at some point v. We continue as if we had Case Ic, with v here playing the role of ^y there. Case 2b. vi e L (see Figure 18(b)). In this case we simply push i>/ onto the stack, giving state (fz+i; ^0. •^'i,..., Sj, Vi), which leads to Case 1. Case 2c. vi G Q2The treatment for this case is identical to Case Ic.
Visibility in the plane
849
While repeating the step described in the cases above, we must be careful not to let the vertices of the stack subtend an angle more than In around q. When this happens, the segment Sm-\Sm between the two top points of the stack intersects the ray ^ , at some point V. We then process the vertices of P until we find either so or a vertex Vk such that Vk-\ Vk crosses ^o^- In the former case, we replace Sm on the stack by f, and we are done. In the latter case, we proceed as in Case Ic. Otherwise, we repeat the step above until UQ is placed on the stack again. The proof of correctness of this algorithm is given in Lee's original paper [89].
4.3. Computing the visibility polygon of a point in a polygon with holes In this section, give a high-level description of two algorithms of Asano et al. [12] for computing the visibility polygon from a point inside a polygon with holes. The first algorithm takes 0{n\ogh) time. The second algorithm uses a preprocessing step taking 0{n^) time and Oiri^) space, but thereafter can report the visibility polygon of any point in 0(n) time. We present the algorithms in the settings that they were designed for. The first algorithm is set in an arrangement of polygons. Given a polygon with holes, one can covert it to an arrangement of polygons by making each hole a polygon of the arrangement, and making the outer polygon of the polygon with holes into two polygons of the arrangement by breaking its boundary in two and slightly thickening the resulting pieces. The second algorithm is set in a line segment arrangement. 4.3.1. Angular plane sweep. In this section we present the 0(n log/z) algorithm without preprocessing. The input is a set Pi, P2, • • •, ^^^ of non-intersecting polygons with a total of n vertices, and a point q in the exterior of all of these polygons. The algorithm computes the visibility polygon of ^ by an angular sweep around ^. It is straightforward to implement this sweep in 0{n logn) time by simply sorting all of the segments (by polar coordinates around q). However, 0(n \ogh) can be obtained by appropriately processing each polygon before constructing the angular sorted order. Let V^{q) be the visibility polygon of q in the exterior of Pi; we compute V-p:{q) for all Pi. A slight modification of Lee's algorithm presented in the previous section will compute each V-p:(q) in time proportional to the number of vertices of Pi, so we can compute them all in a total of 0(n) time. Each V^(q) can be thought of a list of edges angularly sorted around q. We next decompose each V-pr(q) into maximal sequences of edges of Pi. In other words, we break each V^(q) by removing its edges whose extensions pass through the point q. Let m be the total number of maximal sequences of connected edges. The angular sweep will be done in 0(n + m log h) time. As we sweep, we maintain a list of those maximal sequences intersected by the current sweep angle, and sorted by distance from q. In the sweep we have two kinds of events: insertion of a new sequence into the list, and deletion of an existing sequence from the list. These events occur only at endpoints of those maximal sequences. As our input polygons were nonintersecting, these edge sequences do not cross, and so in between endpoints of maximal sequences it suffices to simply follow the edges of the sequence that is closest to
850
T. Asano, S.K. Ghosh and T.C. Shermer
q. The list never contains more than h sequences, as no ray from q intersects more than one sequence from any input polygon. Therefore insertion and deletion of sequences in the list can be accomplished in 0(log/i) time. Performing angular sweep in this way, by keeping track of the maximal sequences closest to q we obtain the visibility polygon of ^, in 0(n + m log h) time. Since m is 0{n), the worst-case time complexity of the algorithm is 0(n \ogh). In some applications, however, each input polygon may yield a constant number of maximal sequences; for these applications, the algorithm takes 0(n + h \ogh) time. Such a situation arises, for example, when each input polygon is convex. 4.3.2. Linear-time algorithm with preprocessing. We now describe the algorithm for computing a visibility polygon of a point ^ in a line segment arrangement, using 0(n) time queries after 0(n^)-time and 0(n^)-space preprocessing. A key to the algorithm is the duality transform between points and lines in the plane, described by Chazelle, Guibas, and Lee [31]. The input to the preprocessing is the set Let 5 = {^i, ^ 2 , . . . , ^n} of line segments that form the arrangement; the elements of S intersect only at their endpoints. We let q denote the query point from which we wish to construct the visibility polygon. As in the previous algorithm, we need to sort the endpoints of the input segments in angular order around q. However, unlike the previous algorithm, we will not use angular sweep from the query point to construct the visibility polygon; instead we construct a list of visible edges starting with an edge that is somehow "closest" to q and proceeding to those that are farther away. We present the method in three sections: performing angular sorting, ordering the segments by nearness to q, and constructing the list of visible edges. Preprocessing and query for angular sorting. For linear-time implementation of sorting we rely on the duality transform between points and lines. That is, the endpoints of the given line segments are transformed into lines in the dual plane, which together form a line arrangement (see Chapter 2). The planar subdivision formed by this arrangement (which includes, for instance, all of the intersection points of the lines, and in what order these intersections occur along each line) is then constructed, in 0{n^) time and space by an algorithm of Edelsbrunner, O'Rourke, and Seidel [52]. An important observation here is that once the planar subdivision is computed, the intersections of any hne L in the dual space with the existing lines can be found in 0{n) time, as can the order in which these intersections occur along L. In particular, we are interested in the case where L = Lg, the line which is dual to a query point q. By properties of the duality transformation, the order of intersections of L^ with lines of the arrangement is the angular order of the corresponding points around q. We thus obtain the angular sorting around q in 0(n) query time by computing and storing the dual arrangement in a O(n^) time and space preprocessing. Preprocessing and query for closeness to q. For the full query step, we will assign a rank to each segment of S so that rank(^/) < mnk(sj) if the segment si is closer to q than Sj is. In this section, we show that such a rank can be computed in 0(n) query time given 0(n log n) time preprocessing and 0(n) storage space. The main idea is to obtain a digraph
851
Visibility in the plane I
I I
"^12
P5.
p
Pi I 0
I
I 2
I
I
I
Pi ^—
^8 I
I
I
I
I
P 11 I
4
(a)
(b) Fig. 19. Solving the visibility problem.
of a partial order on S that captures closeness to q, and then to embed this partial order in a total order by topological sorting. The rank of a segment is then its rank in the total order. Consider defining a relation
852
T. Asano, S.K. Ghosh and T.C. Shermer 1.
Fig. 20. Constructing the directed graph G{Tq).
• If ^ is on the ray /12 that separates R2 from ^ 3 , then add an edge from e^ to 62 to G(Tq). The cases where ^ is on /21, /31, /13, /23 or /32 are similar. • If ^ is on an edge ei or in the interior of the triangle F, add no edges to G{Tq). The resulting graph G{Tq) is acyclic, and its transitive closure includes
Visibility in the plane
853
represent intervals where we already know the lowest segment; more technically, find(x) is the leftmost ordinate that is at least x and immediately to the right of which we do not know the lowest segment. The algorithm fills in an array vis[ ]; at completion, each element vis[x] contains the index / of the lowest segment si between x and x + 1. Algorithm for determining lowest segments X = find(4) while (x
4.4. Computing the weak visibility polygon of a segment in a polygon In this section, we present an overview of the algorithm given by Guibas et al. [69] for computing the weak visibility polygon from a segment inside a polygon. Let P be a simple polygon having n vertices, and q and q^ be points in P. The shortest path in P from qtoq\ denoted 7r(^ ,q^), consists of straight line segments whose endpoints are each either q, q\ or a reflex vertex of P. The collection of shortest paths from q to each vertex of P forms a plane tree rooted at q; this tree is called the shortest path tree (see Chapter 15) of ^ in P, and denoted n(q). Shortest path trees are used in the algorithm to construct weak visibility polygons, so we first outline how to construct shortest path trees in linear time. Computing the shortest-path tree. Here we present only an overview of the method; the efficient implementation of this method is accomplished by Guibas et al. using a finger search tree to store funnels and search for visible vertices. See the original paper [69] for the full details. We construct the shortest path tree incrementally from ^ by a preorder traversal of T starting with the node corresponding to the triangle that contains q. Each time we encounter a new node of T, we are encountering a new triangle of the triangulation, which has one new vertex that we must find the shortest path to. Suppose uw is a diagonal or an edge of P, and a is the least common ancestor of u and w in the shortest path tree n{q) (see Figure 21). Both n{a,u) and 7t{a,w) are outward convex: the convex hull of each of these paths lies outside the region bounded by 7r(a, w), 7r(a,w), and by the segment uw. The union Fuw = 7t(a,u)U 7t(a,w) of these sub-paths
854
T. Asano, S.K. Ghosh and T.C. Shermer X
Fig. 21. The funnel for diagonal uw, with cusp at a.
is called iht funnel associated with the segment TTw, and the vertex a is called the cusp of the funnel. When we encounter a new node of 7, we have just crossed an edge of T that corresponds to a diagonal mB of P. Let x be the new vertex of P^i.e.uwx is the triangle corresponding to the node of T we are visiting. Also, let a be the cusp of the funnel Fuw If x is visible from the cusp a, the parent of x in the shortest path tree is a, so we insert an edge from x to a in n(q), and form new funnels Fux and Fxw from n{a,u), 'ax, and TT((2, u;). On the other hand, if x is not visible from a, we find a vertex v on the funnel such that v is visible from X and iJJc is a tangent line to one of the chains TT(a, w) or TT(a, it;) of the funnel. Then, the parent of jc in the shortest path tree is i;. The funnel Fuw is divided into F\ and F2. If f lies on 7r(a, M), then F\ is defined by 7r(u, u) on n{a, u) and ilx, and F2 by 7r((2, i;) followed by tuc in one side and 7T(a,w) in the other side. The cusp of Fi is 1; and that of F2 is a. The funnels F\ and F2 are defined similarly when v lies on TT(a, w) instead (see Figure 21). Computing weak visibility between edges. Let e = uv and e' = dc be two edges of a polygon P, with u,v,d, and c occurring in that order in a counterclockwise traversal of the boundary of P. In this section, we describe how to determine which parts of e\ if any, are weakly visible from e. We assume that we are given the shortest path trees 77 (w) and 77(f), and furthermore that these structures contain the funnel and cusp information as computed above for each edge of P. We also assume that each vertex in these shortest path trees is marked to indicate if the path from the source makes only left turns, only right turns, or a combination of left and right turns; this is easily computed by traversing the tree. The edge e^ contains a point visible from e iff the paths 7i(u,c) and 7t(w, d) are both outward convex. Here, outward convex means that their convex hulls lie in the exterior of the region defined by uv,7T(v,d),dc, and 7r(M, c), as in Figure 22. These paths are outward convex iff 7r(w, c) contains only left turns, and n{v,d) contains only right turns. Since this information is included in the shortest path trees, we can check if any point of e' is weakly visible from e in constant time. If no point of e' is visible, we report this and are done. Otherwise, the two shortest paths n{v,d) and n{u,c) have two common tangents Xujd and Xujjc', these tangents delimit the portion of e' seen from e. (Note that it is possible that one or more of Xu,Xv,yd, and jc are the vertices u,v,d, and c, respectively.) The vertex Xu is easy to find: it is simply the cusp of e^ in n(u); yd is the vertex following Xu on
Visibility in the plane
855
Fig. 22. Determining visibility between edges.
7T{U, d). Similarly, Xy is the cusp of e^ in Tliv) and jc the vertex following Xy on7r(f,c). Thus, given the two shortest path maps, we may determine the vertices Xu,Xy,yd, and yc in constant time. Clipping e' by the common tangent lines defined by these vertices gives the portion of e' weakly visible from e, again in constant time. Computing a weak visibility polygon. Consider the problem of computing the weak visibility polygon from an edge e = wu of a given polygon P. We first compute the shortest path trees n{u) and /7(u), and determine which vertices are reached by paths containing only left turns or only right turns in each tree; this is accomplished, as described above, in linear time. Next, we simply traverse the edges of P in order, starting at v, and record the list of visible portions of each edge hit. Each visible portion of an edge is recorded as its two endpoints; if an endpoint is repeated in this list, the repetitions occur consecutively, and this endpoint is a vertex of P visible from e. By removing one of each of these pairs of repeated points, we obtain the correctly-ordered list of vertices of the weak visibility polygon of e in P. This entire process takes linear time. Suppose now that we wish to compute the weak visibility polygon of a segment xy inside P. This can be accomplished by first extending xy in each direction until it first reaches the boundary of P, giving a chord x'y' of P. This chord divides P into two parts. Pi and P2. We can consider xy an edge (in general, the middle edge of a set of three colinear edges x'x, xy, and yyO of Pi or P2. We now compute the weak visibility polygon of xy in Pi, and of xy in P2, as described above. The union of these two weak visibility polygons is the weak visibility polygon of xy in P; this can all be accomplished in linear time. 5. Characterizing and recognizing visibility polygons 5.1. Problems and results A polygon is called a point visibility polygon if it is visible from some point; i.e. it is star-shaped (a star-shaped polygon is shown in Figure 4(b)). Given a class of polygons
856
T. Asano, S.K. Ghosh and T.C. Shermer
such as this, it is natural to ask "what is the structure of these polygons?" and "is there an efficient algorithm to recognize them?" In this section, we survey work that addresses these questions for point visibility polygons and other polygon classes that are defined with visibility. Star-shaped polygons have several characterizations and structural properties; some of these were presented in Section 2.2. Lee and Preparata [93] solved the recognition problem, giving an 0(n) algorithm for determining the kernel of a polygon. If the kernel is nonempty, then the polygon is star-shaped. In Section 5.2 below, we present Lee and Preparata's algorithm. A polygon that is weakly visible from an edge is called weakly edge visible. In the paper introducing weak and complete visibility. Avis and Toussaint [15] gave an 0{n) algorithm for determining if a given polygon is weakly visible from a given edge; applying this to each edge gives an O(n^) algorithm for determining if a polygon is weakly edge visible. Sack and Suri [126] and Shin and Woo [136] improved this result, giving (optimal) linear time algorithms for recognizing weakly edge visible polygons. Chen [33] presented a linear time algorithm for computing the shortest subsegment of an edge of a polygon from which the polygon is weakly visible. A polygon P that is weakly visible from a line segment contained in P is called weakly segment visible or weakly internally visible. Ghosh et al. [66] gave an algorithm to determine if a polygon is weakly internally visible; their algorithm takes 0{E) time, where E is the number of edges in the visibility graph of the input polygon. Doh and Chwa [49] and Kim et al. [82] presented 0{n\ogn) time algorithms for this problem, and Das, Heffernan, and Narasimhan [44] and Bhattacharya and Mukhopadhyay [18] presented 0{n) time algorithms. The algorithm of Das et al. can also report all chords from which a polygon is weakly visible. Weakly internally visible polygons have several interesting geometric properties; many authors have exploited these properties to obtain simple and efficient algorithms for a wide range of problems [55,65,66,69,71,117,147,152]. As we saw in the previous section, the notions of weak visibility and shortest paths are closely related. Guibas et al. [69] and Toussaint [146] first used shortest paths to characterize weakly edge visible or weakly segment visible polygons. Later Ghosh [63] and Ghosh et al. [66] used shortest paths to characterize polygons that are weakly visible from an internal set or a chord. Avis and Toussaint [15] first considered external visibility of a polygon. (Two points not in the interior of P are called externally visible if the line segment between them does not intersect the interior of the polygon; this can be considered a variation on a polygon with a hole, or a type of line segment arrangement.) A polygon is called weakly externally visible if every point on the boundary of the polygon is visible from some point outside the convex hull of the polygon; this is equivalent to saying that from each boundary point, one can draw a ray that does not intersect the polygon (see Figure 23). The algorithm of Avis and Toussaint that determines if a polygon is weakly visible from an edge can be used to recognize weakly externally visible polygons in linear time (simply compute the convex hull of the polygon and apply the algorithm to each connected piece of the area inside the convex hull but outside the polygon). Atallah and Bajaj [13] proved that a polygon is weakly externally visible from a line if and only if every vertex of the polygon is weakly externally visible from the line; this is not true if we replace "line" with "line segment".
Visibility in the plane
857
Fig. 23. A weakly externally visible polygon. Exterior rays from some boundary points are shown.
Atallah and Bajaj presented an 0{n\ogna{n)) time algorithm for recognizing polygons that are weakly externally visible from a line, and Bhattacharya, Kirkpatrick, and Toussaint [17] gave a linear algorithm for this problem. Bhattacharya and Toussaint [20] presented a linear time algorithm for computing the shortest line segment from which a convex polygon is weakly externally visible; along with Mukhopadhyay [19], they extended this result to apply to all polygons. A polygon that is weakly internally visible from a chord st can be viewed as a polygon having two boundary points s and t such that (i) s and t are visible, and (ii) every point of the boundary from ^ to / (counterclockwise) is visible from some point of the boundary from t to s, and vice versa. If we remove condition (i), then condition (ii) alone defines a new class of polygons, called LR-visibility polygons, which are also known as streets. The class of L/?-visibility polygons includes all weakly edge visible and weakly internally visible polygons. Heffeman [72] and Bhattacharya and Ghosh [16] presented a linear time algorithm for recognizing if a polygon is L/?-visible with respect to a given s and t. Tseng, Heffernan, and Lee [148] presented an O(nlogn) time algorithm and Das, Heffeman, and Narasimhan [45] gave a linear time algorithm for recognizing L7?-visibility polygons; given a polygon, their algorithms return all pairs of points s and t that the polygon is L/?-visible with respect to.
5.2. Recognizing a point visibility polygon In this section, we present the linear time algorithm of Lee and Preparata [93] for computing the kernel of an input polygon P. By simply checking if the kernel is nonempty, we can use this algorithm to recognize star-shaped or point visibility polygons. Recall from Section 1 that a polygon P is represented by vertices VQ,V\, .. ..Vn'm counterclockwise order, with edge et == vi f/+i. Here we assume without loss of generality that the first vertex v\ is reflex. Let ut) denote the ray from u through v. A line through any edge et divides the plane into two half-planes; by the interior half-plane of et, we mean
858
T. Asano, S.K. Ghosh and T.C. Shermer Vo
V
Fig. 24. The initial intersection ^ i .
the one of these that contains interior points of P in the neighborhood of ei. The other half-plane is called the exterior half-plane of ei. The kernel of a polygon P is the intersection of the interior half-planes of all of the edges of P; this characterization immediately suggests an algorithm for computing the kernel. However, computing the intersection of n arbitrary half-planes takes O(nlogn) time. In order to obtain a linear algorithm, Lee and Preparata incrementally construct the kernel, taking advantage of the structure of a polygon. Their algorithm starts by constructing the intersection Ki of the interior half-planes of e\ and e^, and thereafter visiting each edge ei in e2,e3,.. .,en-\ in turn, constructing Ki by intersecting Ki-\ with the interior halfplane of ei. All of the intersections Ki are convex, and the final intersection Kn-i is the kernel of P. The initial kernel K\ is the wedge formed by two rays from v\, one in the direction of (the directed line segment) VnV\, one in the direction of i;2f i (see Figure 24). For the general step, we will use not only AT/ but also the two rays from i;/+i that are tangent to Ki (or more precisely, the points // and r, where these tangents touch A^,). Initially, these rays from V2 tangent to K\ are parallel to the two rays defining Ki, and the tangency points are the points "at infinity" in the directions of the rays. Suppose now that we have Ki and its tangents to i;/+i, and we want to compute Ki^i. If both tangents are in the exterior half-plane of ^/+i, as in Figure 25(a), then the Ki^i is empty and we may report this and terminate. If both tangents are in the interior half-plane of ^/+i, as in Figure 25(b), then Ki-^\ = Ki. The tangency points //+! and r,+i can be obtained by starting at the previous tangency points // and r/ and walking counterclockwise around AT^+i. The total time for this clockwise walking of tangents over the entire algorithm is 0(n), as a vertex on any Ki is never passed by more than once by either tangent. The final case in the general step is where one tangent is in the interior half-plane of ^/+i, and one is in the exterior half-plane. In this case, we find the intersection of Ki with the interior half-plane by starting at the point of tangency on Ki that is in the exterior halfplane of ^/+i. From this point, we perform two walks along the boundary of Ki, one in each direction. Each walk stops when it reaches a point at infinity or it reaches an edge
859
visibility in the plane
(a)
(b)
Fig. 25. Cases when both tangents are in the same half-plane of ^/+i.
(a)
(b)
Fig. 26. Cases when the tangents are in different half-planes of ^/+i.
intersected by the line through 6/+i. ^/+i is constructed by removing from Kt all vertices that we just walked over, and inserting a new edge, which is the portion of the line through et^i that is between the two intersection points found; see Figure 26(a). (This new edge is a ray if only one intersection point was found, such as in Figure 26(b).) Over the entire algorithm, the time to walk the boundary to find intersection points is linear, as any vertex walked over in this step is eliminated in constructing ^ / + i . One of the new tangent points is an endpoint of the new edge of ^ / + i , and the other is obtained by a counterclockwise walk from the previous tangency point as before. Starting with K\ as described, and computing K2, ^ 3 , • • •, f^n-\ with this general step, we have computed the kernel of P in O(^) time.
860
T. Asano, S.K. Ghosh and T.C. Shermer
6. Computing visibility graphs 6.1. The problem and results The visibility graph of a polygon is a graph whose vertices are the vertices of the polygon, and whose edges are the pairs of visible vertices (see Figure 12). Similarly, the visibility graph of a set of line segments or polygonal obstacles in the plane is a graph whose vertices are the vertices of the segments or obstacles, and whose edges correspond to pairs of visible vertices. The visibility graph is a fundamental structure in computational geometry; some early applications of the visibility graph include computing shortest paths in the presence of obstacles [101] and in decomposing two-dimensional shapes into clusters [130]. Lee [88] and Sharir and Schorr [131] presented 0(n^ logn) time algorithms to compute the visibility graph of a set of obstacles having a total of n vertices. Asano et al. [12] and Welzl [151] later developed O(n^) time algorithms for this problem. All of these algorithms are easily adaptable to any of our visibility settings. Since, at its largest, the visibility graph can be of size i2(n^), the algorithms of Asano et al. and Welzl are worst-case optimal. However, if the visibility graph contains relatively few edges, it is possible that one need not spend O(n^) time to compute it. In other words, the lower bound on the time to compute a visibility graph can expressed as f?(n^), but a more exact lower bound is Q{E), where E is the number of edges in the output visibility graph. To match this better lower bound, Hershberger [74] developed an 0{E) algorithm for computing the visibility graph of a polygon. (An algorithm that takes time dependent on its output size — such as E here — is called output-sensitive.) Overmars and Welzl [115] gave an 0{E logn) time, 0(n) space algorithm for computing the visibility graph for a set of disjoint obstacles. Ghosh and Mount [67] presented 0(/i \ogn + E) time, 0{E) space algorithm for this same problem; we present this algorithm in Section 6.2 below. Pocchiola and Vegter [119] presented an 0{n \ogn + E) time, 0{n) space algorithm for computing the tangent visibility graph of a polygon with convex holes. (The tangent visibility graph is the subgraph of the visibility graph that retains only those edges corresponding to common tangents between two objects.)
6.2. Computing the visibility graph of a polygon with holes In this section, we present an overview of the output-sensitive algorithm given by Ghosh and Mount [67] for computing the visibility graph of a polygon with holes. This algorithm is based on four key ideas. The first is a plane-sweep triangulation algorithm, and analysis of the properties of the triangulations produced. The second is the funnel sequence of an edge; this is a way of looking at the structure of the edges of the visibility graph. The third is a novel traversal scheme of the visibility graph and funnel sequences. The final one is to use an appropriate data structure that allows fast traversals of the visibility graph. Plane-sweep triangulation. We assume as an input a polygon with holes, with the interior of the polygon to the left of every edge; i.e. the outer polygon has counterclockwise orientation, and the holes have clockwise orientation.
Visibility in the plane
861
Fig. 27. A step in the plane-sweep triangulation of a point set. In part (b), the dark edges are edges of the polygon or of a hole.
As is usual with plane sweep, the vertices are sorted by increasing abscissae and introduced into the triangulation in that order. Let ui, i;2,..., f^ be the sorted list of the vertices. During the general step of the algorithm, we have already processed k — I vertices, and have a triangulation of a subregion Pk-i of P. To process Vk, we first locate it vertically in the list of polygon edges that intersect the sweep line, and then connect it to all of the visible vertices on the boundary of / \ _ i , yielding a triangulation of Pk. Consider the triangles formed as Vk is incorporated into the triangulation. These triangles form either one or two connected sequences about Vk, such that for each sequence, the sides opposite Vk form an inward convex chain with respect to Vk- (See Figure 27.) The funnel sequence. In this algorithm, as in the weak visibility polygon algorithm of Section 4.4, the notion of a funnel for a vertex and an edge plays a key role. However, in a polygon with holes, we must be more careful in our definition of a funnel, because the same vertex and edge may define more than one funnel. This is illustrated in Figure 28(b), where one funnel goes above the small triangular hole, and one goes below it. Let i; be a point visible from some other point z on an edge xy. Informally, 2i funnel for xy from v can be formed by considering the paths vzx and vzy to be taut rubber bands and allowing them to snap to their natural shape. The bands then form two outward convex paths, one (the lower chain) from f to x and the other (the upper chain) from i; to _y, as shown in Figure 28(a). Note that a funnel is uniquely determined by the first (directed) segment vl of its lower chain; the cusp is the first vertex v of this segment, the edge xy that the funnel is for is the edge visible from i; in the direction just counterclockwise of /, and the particular funnel for v and xy is the one obtained by starting with the point z where v sees xy just counterclockwise of /. As a consequence of this, the total number of funnels in a visibility graph with E undirected edges is at most 2E. For any edge xy of the polygon, let FNL(xy) denote the set of all funnels generated by vertices that are visible from the interior of xy. As the interior of P lies to the left of xy, all of these funnels are also on the left of xy. If V is the cusp of a funnel in FNL(xy), and u is the first vertex on the lower chain from u to X, then by convexity u is the cusp for a (unique) funnel that is contained within the region bounded by the funnel for v. If we think of the cusp u as the parent of the cusp v, we
862
T. Asano, S.K. Ghosh and T.C. Shermer
y
Fig. 28. Visible chains and funnels.
(a)
(b)
Fig. 29. The lower and upper trees for xy.
see that the set of funnels in FNL(xy) forms a tree rooted at jc. It is important to distinguish vertices from cusps because the same vertex can appear many times as a cusp in FNL(xy) whereas each cusp can appear only once. Each path from the root to a leaf in this tree is a convex visible chain that turns counterclockwise. We call this tree the lower tree for xy, and analogously define the upper tree consisting of the upper chains of FNL(xy) rooted at y (see Figure 29). We can define a natural linear ordering on the funnels of FNL(xy) by considering the clockwise preorder traversal of the lower tree. Thus, we can (and henceforth do) consider FNL(xy) to be a sequence whose first element is the degenerate funnel with cusp at x, and whose last element is the degenerate funnel with cusp at y. We call this sequence the funnel sequence for xy.
visibility in the plane
863
The enhanced visibility graph. Refer to Figure 30 for an illustration of the following definitions. Let i; be a vertex of P, and UQ,U\, . ..,Um be the other vertices of P that visible from u, listed in counterclockwise order around u, with UmV and VUQ being edges of P. For any Uj, let CCW{vuj) be the edge vuj^\ counterclockwise of vuj around u, and CW{vuj) be the clockwise edge vuj-\. The counterclockwise extension of UjV, denoted CCX(ujv), is defined as follows. Rotate the segment UjV counterclockwise by 180° about V. If this sweep lies entirely inside the interior of P locally about f, then the extension is the very next visible segment encountered after the 180 degree sweep, otherwise there is no counterclockwise extension of UjV. The clockwise extension CX(uj v) of Uj v is defined symmetrically. Finally, the reversal REV{uv) of (directed) edge uvis the (directed) edge vu. Finally, the enhanced visibility graph of P consists of: • the visibility graph of P, represented so that the operations CCW, CW, CCX, CX, and REV can each be evaluated in constant time, and • the funnel sequence FNL(xy), for each edge xy of P, represented so that the operations of split, concatenate, predecessor and successor can be implemented in constant time each. For details of the data structure and implementation of the operators, refer to the original paper. The last fundamental operation in the algorithm is the procedure SPLIT. This procedure takes as input the enhanced visibility graph for P, an edge xy of P, and a point v lying to the right of this edge so that the triangle x vy is exterior to P. It modifies the input enhanced visibility graph so that it is the enhanced visibility graph for P U Axvy; essentially, the edge xy is removed and replaced by xf and vy. This is accomplished by finding all of the vertices that are visible to v through the segment xy, and splitting the funnel sequence FNL{xy) into the two funnel sequences FNL(xv) and FNL(vy). Algorithm for computing the visibility graph. We initialize the algorithm with an empty region PQ having an empty enhanced visibility graph. for k=lton add the vertex Vk to Pk-i for each convex chain of vertices of Pk-\ visible to Vk add an edge from Vk to each vertex in the chain for each edge Uj-iUj in the chain call SPLIT on Pk-i with edge xy and vertex f^, yielding lower and upper funnel sequences Lj and Uj. Let LQ be the trivial funnel for UQVt with cusp Vk. Form FNL{uQVk) by concatenating LQ, L I , . . . , L ^ . Let Po be the trivial funnel for VkUm with cusp VkForm FNL(vkUm) by concatenating RQ, R\, .. ..RmThe resulting structure is the enhanced visibility graph for Pk. The running time of this algorithm is dominated by the time to compute the plane-sweep triangulation, which is 0(n logn), and the total time taken by the procedure SPLIT, which can be amortized to 0(£'), as shown in the original paper [67].
864
T. Asano, S.K. Ghosh and T.C. Shermer CCX(u,
v)
CW(v, "
CCW(v,
u)
(a) Fig. 30. Primitives for the traversal of the visibiUty graph.
7. Characterizing and recognizing visibility graphs 7.1. Problems and results Let G be a graph. The problem of determining if there is some polygon P that has G as its visibility graph is called the visibility graph recognition problem. The problem of actually constructing such a P is called the visibility graph reconstruction problem. The visibility graph recognition and reconstruction problems are long-standing open problems with only partial results achieved to date. Everett [58] has shown that visibility graph reconstruction (the stronger problem) is in PSPACE, but no better upper bound on the complexity of either problem is known. In 1988, Ghosh presented a set of four necessary conditions for visibility graphs. Everett [58] pointed out that these conditions were not sufficient: graphs exist that satisfy the conditions but are not visibility graphs. However, these counterexamples can be eliminated by a strengthening of one of the conditions. A recent paper by Ghosh [64] presents the updated conditions. These conditions, which he conjectures are sufficient, are given in Section 7.2 below. Ghosh also shows that visibihty graphs do not possess the characteristics of perfect graphs, circle graphs or chordal graphs. However, Coullard and Lubiw [42] have shown that every triconnected component of a visibility graph admits a 3-clique ordering. This technical property implies that visibility graphs have structural properties that are related to well-studied graph classes, such as 3-trees and 3-connected graphs. Coullard and Lubiw used this property to solve the reconstruction problem for graphs whose edge lengths are given. Other authors have focussed on visibility graph recognition and reconstruction for subclasses of polygons. ElGindy [53] showed that every maximal outerplanar graph (polygon triangulation graph) is a visibility graph, and gave an 0(n logn) algorithm for reconstruction. Everett and Cornell [59] characterized visibility graphs of spiral polygons — polygons with all reflex vertices occurring consecutively along the boundary. They proved that these graphs are a subset of interval graphs and gave a linear reconstruction algorithm.
Visibility in the plane
865
Choi, Shin, and Chwa [38], and Colley, Lubiw, and Spinrad [41] characterized and recognized visibiHty graphs of funnel-shaped polygons. Abello, Egecioglu, and Kumar [1] characterized the visibility graphs of staircase polygons, which are orthogonal polygons formed by a staircase path (see Section 8) and two other edges. Lin and Chen [99] studied planar visibility graphs. Several other results on characterization, recognition, and reconstruction of visibility graphs have appeared; see O'Rourke [111] for more information. Some research has examined the complexity of solving standard graph-theoretic problems on visibility graphs. Avis and Rappaport [14] gave a polynomial time algorithm for finding the largest clique in visibility graphs. Lee and Lin [90] showed that the minimum dominating set problem in visibility graphs (the art gallery problem) is NP-hard [110]. Shermer [132] showed that the maximum independent set problem is also NP-hard. Lin and Skiena [100] also studied a few standard graph theoretic problems, along with the area requirements for reconstruction. Much of the recent work on the reconstruction problem has centered on the relationship between visibility graphs and oriented matroids (such as Abello and Kumar [2]), or the equivalent order types (Lin and Skiena [100]) and pseudo-line arrangements (Streinu [138] and O'Rourke and Streinu [113]). Other types of visibility graphs have also been studied. Vertex-edge visibility graphs are graphs indicating which vertices see which edges; these have been studied by O'Rourke and Streinu [114], and an early one-directional variation appears in Fournier and Montuno [60]. Point visibility graphs are infinite visibility graphs with a vertex for each point in a polygon; these have been studied by MacDonald and Shermer [102], Bremner [24], and Bremner and Shermer [23]. Visibility graphs of line segment arrangements have been studied by Rappaport, Imai, and Toussaint [120], O'Rourke and Rippel [112], and Agarwal etal. [3]. 7.2. Necessary conditions for recognizing visibility graphs In this section we present the four necessary conditions of Ghosh [64] for recognizing visibility graphs. The recognition problem that these conditions address varies slightly from the one presented in Section 7.1 above. In the problem considered here, we are given a graph G and a Hamiltonian cycle C of G, and wish to determine if G is the visibility graph of some polygon P whose boundary edges correspond to the cycle C. This problem is one step easier than the full recognition problem, in that the boundary edges have already been found. However, even this problem has proven difficult to settle. In this section, we henceforth use the term visibility graph to mean a visibility graph with a given Hamiltonian cycle C. Choose either of the two orientations of C. A cycle iiJ2,' "Jk^T^G is said to be ordered if /i, /2, • • •, ik appear in that order in C. The Hamiltonian cycle C itself is the longest ordered cycle in G. NECESSARY CONDITION
I. In a visibility graph, every ordered cycle of k ^ 4 vertices
has at least k — 3 chords. This condition is easily visualized: an ordered cycle corresponds to a subpolygon of P, and a ^-vertex subpolygon must have a triangulation, which has k — 3 diagonals.
866
T. Asano, S.K. Ghosh and T.C. Shermer
If two vertices / and j are not adjacent in G, we call (/, j) an invisible pair. Let Ctj denote the path on C from vertex / to vertex 7, and Gij denote the subgraph of G induced by the vertices of Ctj. If a is a cut vertex of Gij, then (/, j) is an invisible pair and there is no edge from any vertex of Ct^a-i to any vertex of C^+i,/, where a —I and a-\-l denote the vertices preceding and following a in C, respectively. If (/, j) is an invisible pair, we call a a blocking vertex for (/, j) if it is a cut vertex of either G/,y or Gjj. Intuitively, blocking vertices are meant to correspond to reflex vertices of the polygon, which prevent the nearby vertices on one side from seeing the nearby vertices on the other. This correspondence is not exact, as some blocking vertices may be convex. On the other hand, each invisible pair (/, j) has a reflex blocking vertex: the shortest path in P between / and j makes turns at one or more reflex vertices, and each of these reflex vertices is a blocking vertex for (/, j). This gives the next condition: NECESSARY CONDITION
2. In a visibility graph, every invisible pair has at least one
blocking vertex. An invisible pair can have more than one blocking vertex in either chain. We will call an invisible pair (/, j) minimal if there is at most one cut vertex of Gij and at most cut vertex of Gj^i. Given the blocking vertices for all of the minimal invisible pairs, one can easily find blocking vertices for the remaining, nonminimal, invisible pairs. An assignment is a mapping from minimal invisible pairs to vertices such that: • the vertex assigned to a minimal invisible pair is a blocking vertex for that pair, • if fl G Cij is assigned to a minimal invisible pair (/, j), then a is also assigned to every minimal invisible pair (/:, m) where k e Ci^a-\ and m e Ca-\-\j. Two invisible pairs (/, j) and (k, I) with a mutual blocking vertex a are said to be separable with respect to « if A: and / are encountered before / and j when the Hamiltonian cycle is traversed from a. One blocking vertex cannot simultaneously block two separable invisible pairs. NECESSARY CONDITION
3. In a visibility graph, two separable invisible pairs must have
distinct blocking vertices. Everett [58] suggested a stronger version of this condition; Srinivasraghavan and Mukhopadhyay [137] have shown that this stronger condition is in fact necessary: NECESSARY CONDITION y. In a visibility graph, there is an assignment such that no blocking vertex a is assigned to two or more minimal invisible pairs that are separable with respect to a.
4. Let G be a visibility graph and D be any ordered cycle of G. For any assignment on G, there are at most |D| — 3 vertices of D that are assigned to those minimal invisible pairs (/, j) ofG having both i and j in D. NECESSARY CONDITION
Since blocking vertices of G are a superset of the reflex vertices of P, and ordered cycles correspond to subpolygons, this condition (roughly) states that every subpolygon with n' vertices has at most n^ — 3 reflex vertices.
Visibility in the plane
867
Ghosh [64] conjectures that these four conditions (1, 2, 3^ and 4) are not only necessary, but also sufficient — that together they characterize visibility graphs. He has shown that in combination with the requirement that blocking vertices must be reflex vertices, a graph and assignment satisfying these conditions determine the reflex and convex vertices of any reconstructed polygon. He has also shown that conditions 1 and 2 can be checked in Oirp-) time. The complexity of checking conditions 3' and 4 is unknown.
8. Other types of visibility As visibility has proven to be a useful and fertile topic, many variations on the basic visibility definition have been explored. In this section, we survey these variations. What makes a relation qualify as a variation of visibility? Generally, such a variation can be specified by a description of obstacles and a condition that paths must satisfy. Then a point X is said to see y if there is a path p{x,y) between them that satisfies the condition and does not intersect (or only grazes) any obstacle. In the usual visibility in polygons, the obstacles are the points exterior to the polygon, and the condition is that the path is a straight line segment. It is possible to use the above framework to define an asymmetric visibility relation, by letting the condition be asymmetric. For example, we could let the condition on /?(x, j ) be that it is a straight line segment and that y is farther from the origin than x. We can also loosen the meaning of path in our definition, so as to include regions rather than just curves. For example, we could define a visibility where the obstacles are a given set of points in the plane, and the condition is that the "path" must be a circular disk. Under this visibility, the visibility graph of the given points is the Delaunay triangulation (!). Clearly, the generality of the path condition allows for expressing a very wide range of problems as visibility variations; we will limit our scope to some that have a "feel" similar to the standard visibility. Clear visibility. Clear visibility, introduced by Breen [22], is perhaps the mildest variation of visibility possible. Clear visibility is the same as standard visibility, except that grazing contact is not allowed. Formally, we say that two points x and _y in a polygon P are clearly visible if the relatively open line segment from x to y is in the interior of p. In Figure 31, a and b are clearly visible, but neither a and c nor a and d are. Staircase visibility. Although staircase visibility can be used in polygons, it is most often defined for points in orthogonal polygons. An orthogonal polygon is a polygon whose edges alternate between horizontal and vertical; an orthogonal polygon is shown in Figure 32. A staircase path is a path that is monotone in both the x-direction and y-direction, and whose edges alternate between horizontal and vertical. Two points x and y in an orthogonal polygon will be called staircase visible if there is a staircase path from x to _y in the polygon. In Figure 32, a and b are staircase visible, but a and c are not staircase visible. Note that if two points are visible in the standard visibility, then they are also staircase visible.
868
T. Asano, S.K. Ghosh and T.C. Shermer
Fig. 31. The points a and b are clearly visible. However, the point a is not clearly visible to either c or d.
Fig. 32. Staircase visibility in an orthogonal polygon. The points a and b are visible, but a and c are not. The staircase visibility polygon of d is shown shaded.
Staircase visibility has been studied by several authors, including Culberson and Reckhow [43,123], Motwani, Raghunathan, and Saran [106,107], and Wood and Yamamoto [153]. O-visibility. O-visibility is a generalization of staircase visibility (and in fact it is sometimes called staircase visibility). Let O be a set of orientations (a subset of [0°, 180°)). An O-staircase path is a path that is monotone with respect to every direction in O. We say that two points x and y in a polygon are O-visible if there is an (9-staircase path between them in the polygon. Figure 33(a) shows a finite direction set O, and in Figure 33(b), the points a and b are O-visible for this O, but a and c are not. O-visibility encompasses both staircase visibility {O = {0°, 90°}) and standard visibility (O = [0°, 180°)). It was introduced by Schiuerer, Rawlins, and Wood [128,127,122,121] and also studied by Bremner and Shermer [23,24].
Visibility in the plane
869
A (a)
(b)
Fig. 33. (a) A set of orientations O. (b) The points a and b are (9-visible, but a and c are not.
'
ci^-l
I
la
I-
1 '
,
d
• '
Fig. 34. The points a and b are rectangularly visible, but a and c are not. The rectangular visibihty polygon of d is shown shaded.
Rectangular visibility. Rectangular visibility, like staircase visibility, is often used in orthogonal polygons. A rectangle is called aligned if it has its sides parallel to the axes. Two points X and y in a polygon are called rectangularly visible if the aligned rectangle that has X and y as opposite comers is contained in the polygon; this is illustrated in Figure 34. Rectangular visibility has been studied by Keil [81] and Munro, Overmars, and Wood [108,116]. Link visibility. Two points are called link-j visible if the link distance between them is at most j (link distance was defined in Section 2.10). Letting j = I gives the standard visibility. Link visibility has been studied by many authors, including Bruckner and Bruckner [25], Djidjev, Lingas, and Sack [48], Lenhart et al. [95], Shermer [133,134], and Suri [139] (see Chapter 12).
870
T. Asano, S.K. Ghosh and T.C. Shermer
Fig. 35. Under visibility with reflections, a and b are visible.
Fig. 36. Under two-wall X-ray visibility, the point a sees b and c, but not d.
Circular visibility. Two points in a polygon are called circularly visible if they can be connected by a circular arc contained in the polygon. Circular visibility has been studied by Agarwal and Sharir [5,4]. Visibility with reflection. Two points x and >' in a polygon are called visible under visibility with reflection if there is a polygonal path between x and y such that all of the interior vertices of the path are on polygon edges, and the adjacent path edges obey the rule that the angle of incidence is equal to the angle of reflection. Sometimes the number of links in the path is restricted. Figure 35 shows two points in a polygon that are visible in this manner. VisibiUty with reflections has been studied for quite some time in the mathematics literature (where the same concept is sometimes referred to as billiard paths) [70,84]. It is also a part of the ray tracing problem of computer graphics [10,124]. It has recently been investigated in a theoretical computational setting by Aronov et al. [8,9]. X-ray visibility. In X-ray visibility, the obstacles are generally line segments (or polygon edges), and two points are called visible if the straight line segment between them does not cross too many (more than two, e.g.) obstacles. Suppose that we allow the visibility segment to cross two but not three polygon edges. Then, in Figure 36, the point a can see the points b and c, but it cannot see d. The point b can see the entire interior of the polygon. X-ray visibility has been studied by Dean, Lingas, and Sack [47].
Visibility in the plane
871
References [1] J. Abello, O. Egecioglu and K. Kumar, Visibility graphs of staircase polygons and the weak bruhat order, I: From visibility graphs to maximal chains. Discrete Comput. Geom. 14 (1995), 331-358. [2] J. Abello and K. Kumar, Visibility graphs and oriented matroids. Graph Drawing, Lecture Notes in Comput. Sci. 894, DIMACS, Springer-Verlag (1994), 147-158. [3] P.K. Agarwal, N. Alon, B. Aronov and S. Suri, Can visibility graphs be represented compactly? Discrete Comput. Geom. 12 (1994), 347-365. [4] P.K. Agarwal and M. Sharir, Circle shooting in a simple polygon, J. Algorithms 14 (1993), 69-87. [5] P.K. Agarwal and M. Sharir, Circular visibility from a point in a simple polygon, Internat. J. Comput. Geom. Appl. 3 (1993), 1-25. [6] A. Aggarwal, The art gallery theorem: Its variations, applications, and algorithmic aspects, PhD thesis, Johns Hopkins University, Baltimore (1984). [7] M. Alsuwaiyel and D.T. Lee, Minimal link visibility paths inside a simple one polygon, Comput. Geom. 3 (1993), 1-25. [8] B. Aronov, A. Davis, T. Dey, S. Pal and D. Prasad, Visibility with reflection. Discrete Comput. Geom. 19 (1998), 553-574. [9] B. Aronov, A. Davis, T. Dey, S. Pal and D. Prasad, Visibility with multiple reflections. Discrete Comput. Geom. 20 (1998), 61-78. [10] J. Arvo and D. Kirk, Fast ray tracing by ray classiflcation Comput. Graphics 21 (1987), 55-64. [11] Ta. Asano, Te. Asano and R.Y. Pinter, Polygon triangulation: Efficiency and minimality, J. Algorithms 7 (1986), 221-231. [12] Ta. Asano, Te. Asano, L.J. Guibas, J. Hershberger and H. Imai, Visibility of disjoint polygons, Algorithmica 1 (1986), 49-63. [13] M.J. Atallah and C. Bajaj, Efficient algorithms for common transversals. Inform. Process. Lett. 25 (1987), 87-91. [14] D. Avis and D. Rappaport, Computing the largest empty convex subset of a set of points. Proceedings of the ACM Symposium on Comput. Geometry (1985), 161-167. [15] D. Avis and G.T. Toussaint, An optimal algorithm for determining the visibility of a polygon from an edge, IEEE Trans. Comput. C-30 (1981), 910-1014. [16] B. Bhattacharya and S.K, Ghosh, Characterizing LR-visibility polygons and related problems. Proceedings of the 10th Canadian Conference on Computational Geometry (1998), 1-6. [17] B, Bhattacharya, D.G. Kirkpatrick and G.T. Toussaint, Determining sector visibility of a polygon. Proceedings of the 5th Annual ACM Symposium on Comput. Geometry (1989), 247-254. [18] B. Bhattacharya and A. Mukhopadhyay, Computing in linear time a chord from which a simple polygon is weakly internally visible. Proceedings of the 6th International Symposium on Algorithms and Computation (1995), 22-31. [19] B.K. Bhattacharya, A. Mukhopadhyay and G.T. Toussaint, A linear time algorithm for computing the shortest line segment from which a polygon is weakly externally visible, Proceedings of the 2nd Workshop on Algorithms and Data Structures, Lecture Notes in Comput. Sci. 519, Springer-Verlag (1991), 412^24. [20] B.K. Bhattacharya and G.T. Toussaint, Computing shortest transversals. Computing 46 (1991), 93-119. [21] M. Breen, L2 sets which are almost starshaped, Geometriae Dedicata 6 (1977), 485^94. [22] M. Breen, Clear visibility and the dimension of kernels of starshaped sets, Proc. Amer. Math. Soc. 85 (1982), 414-^18. [23] D. Bremner and T. Shermer, Point visibility graphs and restricted-orientation convex cover, Internat. J. Comput. Geom. Appl. (1966). [24] D. Bremner, Point visibility graphs and restricted-orientation polygon covering, M.Sc. thesis, School of Computing Science, Simon Eraser University, Bumaby, BC (April 1993). [25] A.M. Bruckner and J.B. Bruckner, On In sets, the Hausdorff metric, and connectedness, Proc. Amer. Math. Soc. 13 (1962), 765-767. [26] H. Brunn, Uber kernelgebiete. Math. Ann. 73 (1913), 436-^40. [27] A. Bykat, Automatic generation of triangular grid: I — subdivision of a general polygon into convex subregions; II— triangulation of convex polygons. Intern. J. Numer, Methods in Eng. 10 (1976), 13291342.
872
T. Asano, S.K. Ghosh and T.C. Shermer
[28] S. Carlsson and H. Jonsson, Computing a shortest watchman path in a simple polygon in polynomial time, Proceedings of the 4th International Workshop on Algorithms and Data Structures (WADS'95), S.G. Akl, R Dehne, J.-R. Sack and N. Santoro, eds, LNCS 955, Berlin, Springer (August 1995), 122-134. [29] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [30] B. Chazelle and L. Guibas, Visibility and intersection problems in plane geometry, ACM Trans, of Graphics 4 (1989), 551-581. [31] B. Chazelle, L. Guibas and D.T. Lee, The power of geometric duality, BIT 25 (1985), 76-90. [32] B. Chazelle and J. Incerpi, Triangulation and shape-complexity, ACM Trans, of Graphics 3 (2) (April 1984), 135-152. [33] D. Chen, Optimally computing the shortest weakly visible subedge of a simple polygon. Proceedings of the 4th International Symposium on Algorithms and Computation (1993), 323-332. [34] L.T. Chen and L.S. Davis, A parallel algorithm for the visibility of a simple polygon using scan operations, Comput. Vision, Graphics and Image Process. 55 (3) (May 1993), 192-202. [35] W.-P. Chin and S. Ntafos, Optimum zookeeper routes, Congressus Numerantium 58 (1987), 257-266. [36] W.-P. Chin and S. Ntafos, Watchman routes in simple polygons. Discrete Comput. Geom. 6 (1) (1991), 9-31. [37] W.-R Chin and S. Ntafos, The zoo-keeper route problem. Inform. Sci. 63 (1992), 245-259. [38] S.-H. Choi, S.Y. Shin and K.-Y. Chwa, Characterizing and recognizing the visibility graph of a funnelshaped polygon, Algorithmica 14 (1) (1995), 27-51. [39] V. Chvatal, A combinatorial theorem in plane geometry, J. Combin. Theory, Ser. B 18 (1975), 3 9 ^ 1 . [40] K. Clarkson, R.E. Tarjan and C.J. Van Wyk, A fast Las Vegas algorithm for triangulating a simple polygon. Discrete Comput. Geom. 4 (1989), 423^32. [41] P. CoUey, A. Lubiw and J. Spinrad, Visibility graphs of towers, Comput. Geom. 7 (1997), 161-172. [42] C. CouUard and A. Lubiw, Distance visibility graphs, Intemat. J. Comput. Geom. Appl. 2 (1992), 349-362. [43] J. Culberson and R. Reckhow, A unified approach to orthogonal polygon covering problems via dent diagrams. Technical Report TR 89-6, University of Alberta Department of Computing Science (1989). [44] G. Das, P. Heffeman and G. Narasimhan, Finding all weakly-visible chords of a polygon in linear time, Scandinavian Workshop on Algorithm Theory (1994), 119-130. [45] G. Das, P. Heffeman and G. Narasimhan, LR-visibility in polygons, Comput. Geom. 7 (1997), 31-51. [46] L. Davis and M. Benedikt, Comput. models of space: Isovists and isovist fields, Comput. Graphics and Image Process. 11 (1979), 49-72. [47] J. Dean, A. Lingas and J.-R. Sack, Recognizing polygons, or how to spy, Visual Comput. 3 (1988), 344355. [48] H.N. Djidjev, A. Lingas and J. Sack, An 0{n\ogn) algorithm for computing the link center of a simple polygon. Discrete Comput. Geom. 8 (2) (1992), 131-152. [49] J.-I. Doh and K.-Y. Chwa, An algorithm for determining visibility of a simple polygon from an internal line segment, J. Algorithms 14 (1993), 139-168. [50] S.E. Dorward, A servey of object-space hidden surface removal. Internal. J. Comput. Geom. Appl. 4 (1994), 325-362. [51] J. Eckhoff, Helly, Radon and Caratheodory type theorems. Handbook of Convex Geometry, P.M. Gruber and J.M. Wills, eds, North-Holland, Amsterdam (1993), 389-^48. [52] H. Edelsbrunner, J. O'Rourke and R. Seidel, Constructing arrangements of lines and hyperplanes with applications, SIAM J. Comput. 15 (2) (1986), 341-363. [53] H. Elgindy, Hierarchical decomposition of polygons with applications, PhD thesis, McGill University, Montreal (1985). [54] H. ElGindy and D. Avis, A linear algorithm for computing the visibility polygon from a point, J. Algorithms 2(1981), 186-197. [55] H. ElGindy and G.T. Toussaint, On geodesic properties of polygons relevant to linear time triangulation, Visual Comput. 5 (1/2) (1989), 68-74. [56] H.A. ElGindy, Efficient algorithms for computing the weak visibility polygon from an edge. Technical Report MS-CIS-86-04, University of Pennsylvania (1986). [57] J. Czyzowicz et al.. The aquarium keeper's problem. Symposium on Data Structures and Algorithms (1991). [58] H. Everett, Visibility graph recognition, PhD thesis. University of Toronto, Toronto (January 1990).
Visibility in the plane
873
[59] H. Everett and D.G. Comeil, Recognizing visibility graphs of spiral polygons, J. Algorithms 11 (1990), 1-26. [60] A. Foumier and D.Y. Montuno, Triangulating simple polygons and equivalent problems, ACM Trans, of Graphics 3 (1984), 153-174. [61] H.N. Gabow and R.E. Tarjan, A linear-time algorithm for a special case of disjoint set union. Proceedings of the 15th Annual ACM Symposium on the Theory of Computing (1983), 246-251. [62] M.R. Garey, D.S. Johnson, EP. Preparata and R.E. Tarjan, Triangulating a simple polygon, Inforai. Process. Lett. 7 (1978), 175-179. [63] S.K. Ghosh, Computing visibility polygon from a convex set and related problems, J. Algorithms 12 (1991), 75-95. [64] S.K. Ghosh, On recognizing and characterizing visibility graphs of simple polygons. Discrete Comput. Geom. 17 (1997), 143-162. [65] S.K. Ghosh, A. Maheshwari, S.P Pal, S. Saluja and C.E. Veni Madhavan, Computing the shortest path tree in a weak visibility polygon. Found. Software Tech. Theoret. Comput. Sci. 11 (1991), 369-389. [66] S.K. Ghosh, A. Maheshwari, S.P. Pal, S. Saluja and C.E. Veni Madhavan, Characterizing and recognizing weak visibility polygons, Comput. Geom. 3 (1993), 213-233. [67] S.K. Ghosh and D.M. Mount, An output-sensitive algorithm for computing visibility graphs, SIAM J. Comput. 20 (1991), 888-910. [68] P.M. Gruber and J.M. Wills, eds. Handbook of Convex Geometry, North-Holland, Amsterdam (1993). [69] L.J. Guibas, J. Hershberger, D. Leven, M. Sharir and R.E. Tarjan, Linear-time algorithms for visibility and shortest path problems inside triangulated simple polygons, Algorithmica 2 (1987), 209-233. [70] E. Gutkin, Billiards in polygons, Physica D 19 (1986), 311-333. [71] P.J. Heffeman, Linear-time algorithms for weakly-momotone polygons, Comput. Geom. 3 (1993), 121137. [72] P.J. Heifeman, An optimal algorithm for the two-guard problems, Proceedings of the 9th Annual ACM Symposium on Comput. Geometry (1993), 139-168. [73] P.J. Heffernan and J.S.B. Mitchell, An optimal algorithm for computing visibility in the plane, SIAM J. Comput. 24 (1) (1995), 184-201. [74] J. Hershberger, Finding the visibility graph of a polygon in time proportional to its size, Algorithmica 4 (1989), 141-155. [75] S. Hertel and K. Mehlhom, Fast triangulation of the plane with respect to simple polygons. Inform. Control 64 (1-3) (1985), 52-76. [76] A. Horn and F. Valentine, Some properties of I sets in the plane, Duke Math. J. 16 (1949), 131-140. [77] B. Joe, On the correctness of a linear-time visibility polygon algorithm, Intemat. J. Comput. Math. 32 (1990), 155-172. [78] B. Joe and R.B. Simpson, Algorithms and correctness proofs for visibility polygon computations. Report CS-87-03, Dept. Comput. Sci., Univ. Waterloo, Waterloo, ON (1987). [79] B. Joe and R.B. Simpson, Corrections to lee's visibility polygon algorithm, BIT 27 (1987), 458^73. [80] D.C. Kay and M.D. Guay, Convexity and a certain property pm, IJM 8 (1970), 39-52. [81] M. Keil, Minimally covering a horizontally convex polygon. Proceedings of the 2nd Annual ACM Symposium on Computational Geometry (1986), 43-51. [82] S.-H. Kim, S.Y. Shin and K.-Y. Chwa, Efficient algorithms for solving diagonal visibility problems in a simple polygon. Inform. Process. Lett. 5 (4) (1995), 433^58. [83] D.G. Kirkpatrick, M.M. Klawe and R.E. Tarjan, Polygon triangulation in O(nloglogn) time with simple data structures. Discrete Comput. Geom. 7 (1992), 329-346. [84] V Klee and S. Wagon, Old and New Unsolved Problems in Plane Geometry and Number Theory, Mathematical Association of America (1991). [85] M.A. Krasnosel'skii, Sur un criterepour qu'un domaine soit etoile. Math. Sb. 61 (1946), 19. [86] R. Kuc and M. Siegel, Efficient representation of reflecting structures for a sonar navigation model. Proceedings of the 1987 IEEE International Conference on Robotics and Automation (1987), 1916-1923. [87] J.C. Latombe, Robot Motion Planning, Kluwer Acad. PubL, Boston, MA (1991). [88] D.T. Lee, Proximity and reachability in the plane. Technical Report ACT-12 and PhD thesis. Coordinated Science Laboratory, University of Illinois, Urbana-Champaign, IL (1978). [89] D.T. Lee, Visibility of a simple polygon, Comput. Vision, Graphics and Image Process. 22 (1983), 207-221.
874
T. Asano, S.K. Ghosh and T.C. Shermer
[90] D.T. Lee and A.K. Lin, Comput. complexity of art gallery problems, IEEE Trans. Inform. Theory IT--32 (2) (1986), 276-282. [91] D.T. Lee and A.K. Lin, Computing the visibility polygon from an edge, Comput. Vision, Graphics, and Image Process. 34 (1986), 1-19. [92] D.T. Lee and F.P. Preparata, Location of a point in a planar subdivision and its applications, SIAM J. Comput. 6 (1977), 594-606. [93] D.T. Lee and F.P. Preparata, An optimal algorithm for finding the kernel of a polygon, J. ACM 26 (3) (1984), 4 1 5 ^ 2 1 . [94] S.H. Lee and K.-Y. Chwa, A new triangulation-linear class of simple polygons, Intemat. J. Comput. Math. 22 (1987), 135-147. [95] W. Lenhart, R. Pollack, J.-R. Sack, R. Seidel, M. Sharir, S. Suri, G.T. Toussaint, S. Whitesides and C.K. Yap, Computing the link center of a simple polygon. Discrete Comput. Geom. 3 (1988), 281-293. [96] N.J. Lennes, Theorems on the simple finite polygon and polyhedron, Amer. J. Math. 33 (1911), 37-62. [97] M. Levoy, A hybrid ray tracer for rendering polygon and volume data, IEEE Comput. Graph. Appl. 10 (2) (1990), 3 3 ^ 0 . [98] B.A. Lewis and J.S. Robinson, Triangulation of planar regions with applications, Comput. J. 21 (1979), 324-332. [99] S. Y Lin and C. Y Chen, Planar visibility graphs. Proceedings of the 6th Canadian Conference on Comput. Geometry (1994), 30-35. [100] S.Y Lin and S. Skiena, Complexity aspects of visibility graphs, Intemat. J. Comput. Geom. Appl. 5 (1995), 289-312. [101] T. Lozano-Perez and M.A. Wesley, An algorithm for planning collision-free paths among polyhedral obstacles, Commun. ACM 22 (1979), 560-570. [102] G. MacDonald and T. Shermer, Isomorphism of spiral polygons. Discrete Comput. Geom. 16 (1996), 277-304. [103] M. McKenna, Worst-case optimal hidden-surface removal, ACM Trans, of Graphics 6 (1987), 19-28. [104] K. Mehlhom, Data Structures and Algorithms, Volume 3: Multi-Dimensional Searching and Comput. Geometry, Springer-Verlag, Beriin (1984). [105] G. Meisters, Polygons have ears, Amer. Math. Monthly 82 (1975), 648-651. [106] R. Motwani, A. Raghunathan and H. Saran, Covering orthogonal polygons with star polygons: The perfect graph approach. Proceedings of the 4th Annual ACM Symposium on Comput. Geometry (1988), 211-223. [107] R. Motwani, A. Raghunathan and H. Saran, Perfect graphs and orthogonally convex covers. Proceedings of the 4th SIAM Conference on Discrete Mathematics (1988). [108] J.I. Munro, M.H. Overmars and D. Wood, Variations on visibility. Proceedings of the 3rd Annual ACM Symposium on Comput. Geometry (1987), 291-299. [109] S. Ntafos, The robber route problem. Inform. Process. Lett. 31 (1990), 59-63. [110] J. O'Rourke, Art Gallery Theorems and Algorithms, Oxford University Press, New York (1987). [ I l l ] J. O'Rourke, Comput. geometry column 18, Intemat. J. Comput. Geom. Appl. 2 (1993), 107-113. [112] J. O'Rourke and J. Rippel, Two segment classes with Hamiltonian visibility graphs, Comput. Geom. 4 (1994), 209-218. [113] J. O'Rourke and I. Streinu, Vertex-edge pseudo-visibility graphs: Characterization and recognition. Proceedings of the 13th Annual ACM Symposium on Computational Geometry (1997), 119-128. [114] J. O'Rourke and I. Streinu, The vertex edge visibility graph of a polygon, Comput. Geom. 10 (1998), 105-120. [115] M.H. Overmars and E. Welzl, New methods for computing visibility graphs, Proceedings of the 4th Annual ACM Symposium on Comput. Geometry (1988), 164-171. [116] M.H. Overmars and D. Wood, On rectangular visibility, J. Algorithms 9 (1988), 372-390. [117] S.P. Pal Weak visibility and related problems on simple polygons, PhD thesis, Indian Institute of Science, India (September 1990). [118] M.A. Peshkin and A.C. Sanderson, Reachable grasps on a polygon: The convex rope algorithm, IEEE J. Robotics Automat. RA-2 (1) (March 1986), 53-58. [119] M. Pocchiola and G. Vegter, Minimal tangent visibility graphs, Comput. Geom. 6 (1996), 303-314. [120] D. Rappaport, H. Imai and G.T. Toussaint, Computing simple circuits from a set of line segments. Discrete Comput. Geom. 5 (1990), 289-304.
Visibility in the plane
875
[121] G. Rawlins, Explorations in restricted-orientation geometry, PhD thesis, Universtiy of Waterloo (1987). [122] G. Rawlins and D. Wood, Comput geometry with restricted orientations. Proceedings of the 13th IFIP Conference on System Modelling and Optimization (1988). [123] R. Reckhow and J. Culberson, Covering a simple orthogonal polygon with a minimum number of orthogonally convex polygons. Proceedings of the 3rd Annual ACM Symposium on Computational Geometry (1987), 268-277. [124] J. Reif, J. Tygar and A. Yoshida, Computability and complexity of ray tracing. Discrete Comput. Geom. 11 (1994), 265-288. [125] T. Calvert S. Xie and B. Bhattacharya, Planning views for the incremental construction of body models. Seventh International Conference on Pattern Recognition (1986), 154-157. [126] J.-R. Sack and S. Suri, An optimal algorithm for detecting weak visibility of a polygon, IEEE Trans. Comput. 39 (10) (1990), 1213-1219. [127] S. Schuierer and D. Wood, Staircase visibility and computation of kernels, Algorithmica 14 (1) (July 1995), 1-26. [128] S. Schuierer, G.J.E. Rawlins and D. Wood, A generalization of staircase visibility. Computational Geometry — Methods, Algorithms and Applications: Proc. Intemat. Workshop Comput. Geom. CG '91, Lecture Notes in Comput. Sci. 553, Springer-Verlag, (1991), 277-287. [129] R. Seidel, A simple and fast incremental randomized algorithm for computing trapezoidal decomposition and for triangulating polygons, Comput. Geom. 1 (1991), 51-64. [130] L.G. Shapiro and R.M. Haralick, Decomposition of two-dimensional shape by graph-theoretic clustering, IEEE Trans. Pattern Anal, and Machine Intell. PAMI-1 (1979), 10-19. [131] M. Sharir and A. Schorr, On shortest paths in polyhedral spaces, SIAM J. Comput. 15 (1986), 193-215. [132] T. Shermer, Hiding people in polygons. Computing 42 (1989), 109-131. [133] T. Shermer, Visibility properties of polygons, PhD thesis, McGill University, Montreal (1989). [134] T. Shermer, Covering and guarding polygons using Ij^-sets, Geometriae Dedicata 37 (1991), 183-203. [135] T. Shermer, Recent results in art galleries, Proc. IEEE 80 (1992), 1384-1399. [136] S.Y. Shin and T.C. Woo, An optimal algorithm for finding all visible edges in a simple polygon, IEEE J. Robotics Automat. RA-5 (2) (1989), 202-207. [137] G. Srinivasaraghavan and A. Muldiopadhyay, A new necessary condition for the vertex visibility graphs of simple polygons. Discrete Comput. Geom. 12 (1994), 65-82. [138] I. Streinu, Non-stretchable pseudo-visibility graphs. Technical Report, Deptartment of Computer Science, Smith College, Northampton, MA (1996). [139] S. Suri, A linear time algorithm for minimum link paths inside a simple polygon, Comput. Graphics, Vision and Image Process. 35 (1986), 99-110. [140] S. Suri and J. O'Rourke, Worst-case optimal algorithms for constructing visibility polygons with holes. Proceedings of the 2nd Annual ACM Symposium on Comput. Geometry (1986), 14-23. [141] X.-H. Tan and T. Hirata, Constructing shortest watchman routes by divide-and-conquer. Proceedings of International Symposium on Algorithms and Computation (ISAAC '93), LNCS 762, Springer, Berlin, Germany (1993), 68-77. [142] X.-H. Tan, T. Hirata and Y. Inagaki, An incremental algorithm for constructing shortest watchman routes, Intemat. J. Comput. Geom. Appl. 3 (4) (1993), 351-365. [143] R.E. Tarjan and C.J. Van Wyk, An 0(n log log n)-time algorithm for triangulating a simple polygon, SIAM J. Comput. 17 (1988), 143-178. Erratum in 17 (1988), 106. [144] H. Tietze, Uber konvexheit im kleinen und im grossen und uber gewisse den punkten einer menge zugeordnete dimensionszahlen. Math. Z. 28 (1929), 679-707. [145] G. Toussaint, Pattern recognition and geometrical complexity. Fifth International Conference on Pattern Recognition (1980), 1324-1347. [146] G.T. Toussaint, Shortest path solves edge-to-edge visibility in a polygon. Pattern Recogn. Lett. 4 (1986), 165-170. [147] G.T. Toussaint and D. Avis, On a convex hull algorithm for polygons and its application to triangulation problems. Pattern Recogn. 15 (1982), 23-29. [148] L.H. Tseng, P. Heffeman and D.T. Lee, Two-guard walkability of simple polygons, Intemat. J. Comput. Geom. Appl. 8 (1998), 85-116. [149] F.A. Valentine, Convex Sets, McGraw-Hill, New York (1964).
876
T. Asano, S.K. Ghosh and T.C. Shermer
[150] F.A. Valentine, Local convexity and In sets, Proc. Amer. Math. Soc. 16 (1965), 1305-1310. [151] E. Welzl, Constructing the visibility graph for n line segments in 0(n ) time, Inform. Process. Lett. 20 (1985), 167-171. [152] T.C. Woo and S.Y. Shin, A linear time algorithm for triangulating a point-visible polygon, ACM Trans, of Graphics 4 (1) (1985), 60-69. [153] D. Wood and P. Yamamoto, Dent and staircase visibility. Proceedings of the 5th Canadian Conference on Comput. Geometry, University of Waterloo (August 1993), 297-302. [154] M. Yachida, 3-d data acquisition by multiple views. Robotics Research: The Third International Symposium (1986), 11-18.
CHAPTER 20
Closest-Point Problems in Computational Geometry Michiel Smid Department of Computer Science, University of Magdeburg, Universitdtsplatz 2, D-39106 Magdeburg, Germany E-mail: michiel@ isg. cs. uni-magdeburg. de
Contents 1. Introduction 2. The static closest pair problem 2.1. Preliminary remarks 2.2. Algorithms that are optimal in the algebraic computation tree model 2.3. A deterministic algorithm that uses indirect addressing 2.4. Randomized algorithms 2.5. Extensions of the closest pair problem 3. The on-line closest pair problem 3.1. Algorithms based on the logarithmic method 3.2. An algorithm that is optimal for dimension two 3.3. An algorithm that is optimal for all dimensions 4. The dynamic closest pair problem 4.1. The deletions-only case 4.2. A fully dynamic data structure with sublinear update time 4.3. A solution with polylogarithmic update time 4.4. A randomized data structure with polylogarithmic update time using linear space 4.5. A deterministic solution with polylogarithmic update time using linear space 4.6. A dynamic solution based on simplicial cones 4.7. A dynamic solution based on the well-separated pair decomposition 4.8. An optimal dynamic closest pair data structure 5. The post-office problem 5.1. The post-office problem for simple metrics 5.2. The approximate post-office problem 6. Further results on proximity problems 6.1. Approximating the complete Euclidean graph: Spanners 6.2. More results on closest point problems 7. Open problems References
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
877
879 882 882 883 884 888 891 897 898 900 902 903 903 904 904 907 909 910 911 912 914 915 917 924 924 928 929 930
878
M Smid
Abstract A comprehensive overview is given of algorithms and data structures for proximity problems on point sets in M^. In particular, the closest pair problem, the exact and approximate post-office problem, and the problem of constructing spanners are discussed in detail.
Closest-point problems in computational geometry
879
1. Introduction Geometric proximity problems, or closest point problems, have always been a popular topic in computational geometry. These problems deal with distances in sets in M^. In this chapter, we will consider proximity problems on point sets. The distance metrics we consider are the Minkowski metrics defined as follows. For r ^ 1, the L^-distance between the points p = (pi, p2,..., po) and q = (q\,q2, • ^., qo) is defined by /D
\1A
dr(p,q)={J2^Pi-qi\'\
,
and for r = oo, it is defined by doo(p,q)=rmix{\pi
- qt] : 1 ^ /
For example, if r = 2, then we have the standard Euclidean metric, and if r = 1, we have the Manhattan metric. Throughout this chapter, we assume that the dimension D and the parameter r, 1 ^ r < oo, are fixed constants. We denote the L^-distance between the points p and q by d(p,q). We now introduce the type of problems that will be considered in this chapter. The closest pair problem:
The simplest version of this problem is stated as follows.
1.1. Given a set Sofn points in M^, find a closest pair of S, i.e., two points P, Q E S, such that
PROBLEM
d{P, Q) =mm[d(p,q)
: p,q e S,
p^q}.
This problem appeared for the first time in Shamos [112], one of the first papers in computational geometry. Since there are (2) pairs of distinct points, and since the distance between two points can be computed in 0(D) = 0(1) time. Problem 1.1 can trivially be solved in O(n^) time. In the early years of computational geometry, researchers felt that Problem 1.1 might have a quadratic lower bound. (See Bentley [22].) Since solutions to several other geometric problems "contain" the closest pair, this would have implied a quadratic lower bound on these problems as well. Examples are computing the Voronoi diagram, Delaunay triangulation and minimum spanning tree of a point set. Hence, determining the complexity of Problem 1.1 is an important problem from a theoretical point of view. At this moment, many algorithms are known that solve Problem 1.1 in 0(n log n) time for any fixed dimension D. In fact, in certain models of computation, the problem can even be solved in linear time. We will give an overview of most of these algorithms. It is fair to say that Problem 1.1 has been solved both from the theoretical and the practical point of view. There are some obvious generalizations of the closest pair problem that will also be treated in this chapter. Let 5 be a set of n points in E ^ . First, in the all-nearest-neighbors
880
M Smid
problem, we want to compute for each point p of S another point of S that is closest to p. Next, there is thQ fixed-radius near neighbors problem. In this problem, we are given the set S and a positive real number 5, and we have to report all pairs of points that are at distance at most 5 from each other. In the k closest pairs problem, we are given S and an integer /c, 1 < /: < Q), and we have to report among all (2) distances the k smallest ones. We will also consider the k-point clustering problem, in which we are given S and an integer k,2^k^n, and we have to find a subset of S of size k that minimizes some closeness measure. Examples are finding k points whose diameter or enclosing circle is minimum. Finally, we consider different versions of the dynamic closest pair problem, in which we have to maintain the closest pair if the set S is dynamically changed by insertions and/or deletions of points. The closest pair problem and its generalizations arise in areas like statistics, pattern recognition (see the books by Andrews [8] and Hartigan [76]), and molecular biology. As an example, a solution to the fixed-radius near neighbors problem is an essential preprocessing step in the algorithm of Heiden at al. [77] for triangulating the contact surface of a molecule. (See also Lenhof and Smid [87].) Another application is given by Supowit [125]. He applies a dynamic closest pair data structure to give an efficient implementation of a greedy minimum weight matching algorithm. In this problem, we are given a set of n points, where n is even. Our task is to match these points into n/2 pairs such that the sum of the lengths of the distances of these pairs is minimized. The greedy algorithm matches a closest pair and removes these two points from the set. Then, the closest pair of the resulting set is matched, etc., until we have matched all points. In practice, this heuristic gives a good approximation to the optimal matching. The post-office problem: follows.
The post-office problem is due to Knuth [86]. It is stated as
PROBLEM 1.2. Given a set Sofn points in R^, store it in a data structure such that for any query point p G R^, we can efficiently find its nearest neighbor, i.e., a point p* e S that is closest to p,
d(p, p*) = min {d(p, q):q e S). The planar version of the post-office problem has been solved optimally, i.e., with 0(log n) query time and 0{n) space. In the higher-dimensional case, however, it seems impossible to give a data structure of size 0(n log ^^^^n) that answers queries in polylogarithmic time. Moreover, it is an open problem if there exists a dynamic data structure for the planar problem having size 0(n log ^^^^n) and poly logarithmic query and update times. Therefore, we will consider two weaker versions of the problem. First, we consider the post-office problem for "simple" metrics, such as the L\- or Loo-metric. Second, we consider the variant in which we do not have to find the exact nearest neighbor /?* of the query point p, but are satisfied with an approximate neighbor, i.e., a point q e S such that d(p, ^) ^ (1 + e)d{p, p*), for some positive constant e. As we will see, for both weaker versions, dynamic data structures can be designed having polylogarithmic query and update times and having a size that is close to linear.
Closest-point problems in computational geometry
881
The post-office problem has applications in areas such as pattern recognition and data compression. An important example is vector quantization, which is used for compressing speech and images. (See Arya and Mount [10] and the references given there.) Assume we take samples from a signal, and group them into vectors of length D. Also assume that we have constructed a set S of "typical" code vectors in R^, based on a training set of vectors. Then each new vector is encoded by the index of its nearest neighbor in S. If there are n = 2^^ code vectors, then we need rD bits to encode such a new vector. Hence, the rate of this vector quantizer is equal to r. If we fix r, and let D grow, then the performance of this quantizer increases. However, then the number of points n also increases, and we have to solve the post-office problem for a large dimension D. Hence, it is important to have efficient (exact or approximate) data structures for this problem. Related problems: In the final part of this chapter, we will mention several related results for proximity problems. In particular, we consider the problem of approximating the complete Euclidean graph. Let 5* be a set of points in R^. Consider any graph having the points of S as its vertices. The weight of an edge (p,q) in this graph is defined as the distance between p and q. The weight of a path in the graph is defined as the sum of the weights of all edges on the path. DEFINITION 1.1. Let ^ > 1 be any real constant. A graph having the points of S as its vertices is called a t-spanner if for every pair p, q of points in S there is a path in the graph between p and q of weight at most t times the distance between p and q.
Spanners were introduced to computational geometry by Chew [40]. Since then, many papers have been published on the problem of efficiently constructing spanners that have one or more additional properties. We will give an overview of the most important results in this area. Spanners in which the degree of each vertex is bounded by a constant can be used as a data structure for the k closest pairs problem, or the fixed-radius near neighbors problem. (See Arya and Smid [15].) To be more precise, given such a spanner and a query integer k (resp. a query value 5 G R), we can efficiently enumerate the k closest pairs (resp. all pairs that have distance at most 8). We introduce some notation that will be used throughout this chapter. If 5 is a set of points in R^, then d(S) denotes the minimum distance in S, i.e., the distance of a closest pair. If p e R^, then d(p, S) denotes the minimum distance from p to any point of 5 \ {/?}. Finally, if A and B are sets, then d(A, B) denotes the minimum distance between any point of A and any point of B. If (5 is a positive real number, then a 8-grid is the subdivision of R^ into axes-parallel cells with sides of length 8, defined by the hyperplanes xt = j - 8, where 1 ^ / ^ D, and j ranges over the integers. The neighborhood of a cell is defined as the cell itself plus the 3^ — 1 cells that border it. The neighborhood of a point p is defined as the neighborhood of the cell that contains p. We mentioned already that the dimension D is assumed to be a constant. This implies that all constant factors that appear in Big-Oh notations depend on D, unless stated otherwise. In general, such factors are of the form (cD)^, for some constant c.
882
M. Smid
2. The static closest pair problem As mentioned already, many algorithms have been proposed for solving Problem 1.1, i.e., the static closest pair problem. In this section, we give an overview of these algorithms.
2.1. Preliminary remarks It turns out that the complexity of the closest pair problem heavily depends on the machine model. Most algorithms in this chapter can be implemented in the algebraic computation tree model. (See Ben-Or [19].) In this model, the operations + , — , * , / and ^ , where k comes from a finite subset of the positive integers, take unit time. Note that these operations perform exact arithmetic on real numbers. Also, comparisons of real numbers take unit time. We remark that indirect addressing is not possible in the algebraic computation tree model. The closest pair problem has an Q{n\ogn) lower bound in the algebraic computation tree model. Consider the following e-closeness problem: Given n-\-\ real numbers x\,X2,. ..,Xn and £ > 0, decide if there are / ^ j such that \xi — Xj\ < e. Using the lower bound technique of Ben-Or [19], it can be shown that the latter problem takes ^(n log n) time in this model. (See also Preparata and Shamos [100].) This implies the same lower bound for the closest pair problem. In fact, Agarwal et al. [3] even prove an i?(nlog n) lower bound for the closest pair problem, if the n points are given as the vertices of a simple polygon. In this section, we will see several algorithms that solve the closest pair problem in 0(n log n) time. If we use a more powerful machine model, then we can design faster algorithms. More precisely, we have to add randomization, the non-algtbrsiic floor function, and the power of indirect addressing. (See Section 2.4.) We close this section with an important sparseness lemma which is heavily used in all closest pair algorithms. Basically the lemma says that any box having side lengths that are small compared to the minimum distance of a point set contains only few points of this set. LEMMA 2.1. Let S be a set ofn points in M^, let 8 be the distance of a closest pair in S — in the L^ -metric — and let c be a positive integer Then any D-dimensional cube having sides of length c8 contains at most (cD -\- c)^ points of S. PROOF. The proof is by contradiction. Assume the cube contains more than (cD + c)^ points of S. Partition the cube into (cD + c)^ subcubes with sides of length cS/(cD + c). Then one of these subcubes contains at least two points of S. These points, however, have Lr-distance at most the Lr-diameter of a subcube, which is at most equal to its Lidiameter, which in turn is equal to D • c8/(cD + c) <8. This is clearly a contradiction. Q
Closest-point problems in computational geometry
883
2.2. Algorithms that are optimal in the algebraic computation tree model 1,1.\, An algorithm based on the Voronoi diagram. The first optimal algorithm for solving the planar version of the closest pair problem is due to Shamos [112] and Shamos and Hoey [113]. Their algorithm is as follows. In 0(nlog n) time, compute the Voronoi diagram of S. Then, for each edge e of this diagram, compute the distance between the two points whose Voronoi regions share e. This takes only linear time. The smallest distance found in this way determines the closest pair of S. For details, we refer to [16,112,113] and the chapter on Voronoi diagrams in this handbook. 2.2.2. A divide-and-conquer algorithm. Bentley and Shamos [23] were the first who gave an optimal 0(nlog n)-time algorithm for the closest pair problem in any dimension D ^ 2. Their algorithm uses the divide-and-conquer paradigm. (According to Bentley [22], the planar version of this algorithm is due to Shamos, and the idea of using divideand-conquer was suggested to him by H.R. Strong.) For simplicity, let us first consider the planar case. So, let 5 be a set of n points in the plane. Compute the median m of the x-coordinates of the points of S. Partition S into two subsets A and B of (almost) equal size such that all points of A (resp. B) are on or to the left (resp. on or to the right) of the vertical line x =m. Using the same algorithm recursively, solve the closest pair problem for the sets A and B separately. Let 8A (resp. 8B) be the minimum distance in A (resp. B), and let 8 be the smaller of these two numbers. To compute the closest pair in the overall set 5, it remains to find among all pairs (a,b) e A X B that have distance less than 8 the one having minimum distance. Let A^ (resp. B^) be the set of those points of A (resp. B) that are to the right (resp. left) of the vertical line X =m — 8 (resp. x = m -\- 8). Clearly, we only have to consider points of A^ and B\ Sort the points of A^ and B^ according to their >7-coordinates. Then, scan along these points. For each point p = {px, Py) of A' (resp. B'), compare p with all points of B' (resp. A') whose _y-coordinates are between Py — 8 and py -\-8. If there is a pair of points in Ax B that has distance less than 5, then during the scan we will find the pair in Ax B having minimum distance. This pair is the closest pair in the set S. Otherwise, all pairs that are encountered in this "merge step" have distance larger than 8 and, therefore, 8 is the minimum distance in^. It is not difficult to see that this algorithm correctly solves the closest pair problem. Let T{n) denote the running time on a set of n points. Lemma 2.1 implies that in the merge step each point of A' U B' is compared to at most a constant number of points. Therefore, T{n) satisfies the recurrence relation T{n) = 2T(n/2) + 0(^ log n). It follows that T(n) = 0(n log ^n). The merge step consists of two parts. First, there is a sorting step, taking 0(nlog n) time. In the second step, we scan along the points of A^ and B\ This takes only linear time. The algorithm can be improved by making a presorting step. At the start of the algorithm, we sort all points of S by their }^-coordinates. After having computed the median m, we walk along the points of S in sorted order, and obtain the sets A and B, both sorted by their j-coordinates. Similarly, we obtain the points of A^ and B^ in sorted order. In this way, the merge step only takes 0(n) time, and the running time T(n) — on a set ofn points sorted by their y-coordinates — satisfies the recurrence T(n) = 2 T(n/2) + 0(n), which solves to T(n) = 0(n log n). It is easy to see that the entire algorithm uses linear space.
884
M. Smid
It turns out to be non-trivial to extend the given algorithm to higher-dimensional space. Nevertheless, Bentley and Shamos [23] and Bentley in his PhD thesis [20], showed that the divide-and-conquer approach does lead to an optimal 0(nlog n)-time algorithm for any fixed dimension D. (See also Bentley [22].) Let 5 be a set of n points in M^. In a presorting step, sort the points of S on all coordinates, in 0 ( D n log n) = 0(n log n) time. Then, in 0(n) time, compute a hyperplane h perpendicular to one of the D coordinate axes, such that (i) both subsets A and B on either side of h contain at least n/(4D) points of S, and (ii) if 8 denotes the smallest of the minimum distances 8A and 8B of A and B, respectively, then each of the two slabs of width 8 around h contains only 0(n^~^^^) points. (Note that 8 is not known when the hyperplane h is computed.) Given h, recursively compute 8A and 5^. Let A^ (resp. B^) be the points of A (resp. B) that are on either side of h and that are at distance at most 8 from h. Then, in the merge step, we have to find among all pairs (a,b) e A^ x B^ that have distance less than 8, a pair with minimum distance. Note that the sets A' and B^ are sparse, in the sense that every cube with sides of length 8 contains at most a constant number of points. Bentley and Shamos solve the merge step by using again a divide-and-conquer algorithm. If no denotes the size of the set A' U B\ then this step takes O(nolog no) time. Note that no = 0(n^~^^^). Therefore, the running time T(n) — after the presorting step — of the entire algorithm for computing the closest pair in S satisfies the recurrence T(n) = 2 T(n/2) + 0(n), which solves to T{n) = 0(n log n). 2.2.3. A plane sweep algorithm. Hinrichs, Nievergelt and Schom [78] gave an elegant algorithm for the planar case that is based on the plane sweep paradigm. First, sort the points of S by their jc-coordinates. Then, sweep a vertical line over the plane, from left to right. During this sweep, we maintain as an invariant that we have computed the closest pair among all points to the left of the sweep line. Also, if 8 is the distance of this closest pair, then all points that are at distance at most 8 to the left of the sweep line are stored in the leaves of a balanced binary search tree, sorted by their j-coordinates. The leaves of this tree are linked by pointers. If the sweep line moves to the next point p = (px, Py), then the following actions are performed. Search in the tree for py. Then follow pointers that link the leaves, and find all points whose >'-coordinates are between py — 8 and py -\- 8. (By Lemma 2.1, there are at most a constant number of such points.) Compare the distances between p and all points found in this way, and, if necessary update 8. Then, insert p into the tree, and delete from the tree all points having distance larger than 8 from the new position of the sweep line. It is easy to see that this algorithm correctly solves the closest pair problem. Its running time is bounded by 0{n log n).
2.3. A deterministic algorithm that uses indirect addressing In the previous section, we saw several algorithms that solve the closest pair problem. For the planar case, these algorithms are easily implementable. Moreover, they are fast in practice. We saw only one algorithm that is optimal for any fixed dimension; that of Bentley and Shamos. This algorithm, however, is complicated: it uses multi-dimensional divide-and-conquer, and the merge step itself is also based on multi-dimensional divideand-conquer.
Closest-point problems in computational geometry
885
Lenhof and Smid [88] gave a practical algorithm for solving the closest pair problem in any fixed dimension D. The algorithm is based on the fact that it suffices to construct a grid such that (i) at least one cell contains at least 2 points and (ii) each cell contains at most 2^ points. Let 5 be the side length of the cells in such a grid. Property (i) implies that the minimum distance in S is at most equal to Z)5. Hence, given this 5-grid, it suffices to compare each point p of S with those points that are contained in p's cell or in any one of the (2D + 1 ) ^ — 1 neighboring cells. Property (ii) implies that in this way, each point is compared to at most a constant number of other points. Therefore, given the 5-grid, we can compute the closest pair in 0(n log n) time, or even in linear time if we represent the grid in an appropriate way. The main problem is how to compute a grid size such that (i) and (ii) holds. First, why does such a grid size exist? Let 5* be the side length of a smallest axes-parallel Ddimensional cube that contains at least 2^ + 1 points of S. Then any 5-grid, where 5 ^ 5*, has a cell containing at least two points of S. Also, any (5-grid, where 5 ^ 5 * , does not have any cell containing more than 2^ points of 5". In particular, 5* defines a grid for which (i) and (ii) hold. Note that 5* is contained in the set of all differences \pi — qtl, where 1 < / ^ Z) and p and q range over all points of S. Therefore, we do a binary search in this set. Of course, this set has size S(n^). We can maintain it, however, implicitly, in only linear space, using a technique that is similar to one developed by Johnson and Mizoguchi [81]. For 1 ^ / < Z), let Ai be an array that contains the /-th coordinates of the points in sorted order. With each element A/[j], we store two integers Itj and r/y such that the following invariant is maintained: (5* is contained in the set of all differences dij := Ai[j] - Ai[/],
where
/,-,• < / < rij.
(1)
Initially, we have kj = j -{-1 and rij = n. Now we make a sequence of 0(log n) iterations. In one iteration, we do the following. For each 1 < / < D, and each 1 < j < n, such that lij < rij take the difference
Ai[l(lij^rij)/2\]-Ai[j] and give it weight r/j — kj + 1. This gives at most D(n — 1) weighted differences. In 0(n) time, we compute the weighted median 8 of these differences. Now, we construct a 5-grid, and compute the maximum number M of points that are contained in any cell of this grid. There are three cases. First, if 2 ^ M ^ 2 ^ , then we have found a correct grid size, and we can stop. Second, assume that M > 2^. Then (5 > 5*. Therefore, for each / and j such that dij ^ 5, we can assign r/y := [(lij -\- r/j)/2J — 1. This guarantees that the invariant still holds. Finally, if M < 2, then we know that 5 < 5*. In this case, for each / and j such that dij ^ <5, we assign lij := [Qij 4- rij)/2} + 1. Again, the invariant is correctly maintained in this way. Since we choose the weighted median, the set of all differences in (1) is reduced by a factor of at least one quarter. Therefore, in a logarithmic number of iterations, the algorithm has found a correct grid size. (Note that the algorithm does not necessarily find 5*. Any grid size for which (i) and (ii) hold is good for our purposes.) After a presorting step, each
886
M. Smid
iteration can be performed in linear time. Therefore, the entire algorithm takes 0(n log n) time. There are some remarks to be made about the machine model used. We need indirect addressing to access the entries of the arrays A/. It is not clear if this can be avoided. In the algorithm as presented, we also need the non-algebraic floor function in order to count the maximum number of points in any grid cell. (We need the floor function for determining the grid cell containing a given point.) This can be avoided by using a degraded grid that has basically the same properties as a standard grid. We can build and search in a degraded grid, however, without using the floor-function. 2.3.1. The degraded grid. To give an intuitive idea, in a standard (5-grid, we divide Dspace into slabs of width 8. The grid is then defined by fixing an arbitrary point of R^ to be a lattice point of the grid. So, if e.g. ( 0 , . . . , 0) is a lattice point, then for 1 < / < / ) , a slab along the i-th axis consists of the set of all points in D-space that have their /-th coordinates between j8 and (j -\-l)8 for some integer y. In a degraded 5-grid, we also have slabs. The difference is that slabs do not necessarily start and end at multiples of 8. Moreover, slabs have width at least 8, and slabs that contain points of S have width exactly 8. That is, while a 5-grid may be defined independently of the point set by fixing an arbitrary point of R^ to be a lattice point, the degraded 5-grid is defined in terms of the point set stored in it. We give a formal definition, treating the case D = 1 first. DEFINITION 2.1. Let 5 be a set of n real numbers and let 5 be a positive real number. Let ai, ^2, • • •,«/ be a sequence of real numbers such that
(1) for all 1 ^ ; < /, «y+i ^ aj -h 8, (2) for all /7 G 5, fli ^ p < ai, (3) for all \ ^ j < I, if there is a point p e S such that aj ^ p < fly+i, then a^+i = aj-\-8. The collection of intervals [aj : fly+i), 1 ^ 7 < /, is called a one-dimcnsionsil degraded 8-grid for S. To construct a one-dimensional degraded 5-grid, sort the elements of S. Let pi ^ P2^ • • • ^ P« be the sorted sequence. Let a\ := p\. Let 7 ^ 1, and assume that a\, ...,aj are defined already. If there is an element in S that lies in the half-open interval [aj : aj + 5), then we set aj^x := aj -\- 8. Otherwise, we set ^y+i to the value of the smallest element in S that is larger than aj. This construction stops if we have visited all elements of S. We extend the definition of a degraded grid to higher dimensions. 2.2. Let 5 be a set of n points in R^ and let 5 be a positive real number. For 1 < / ^ D, let Si be the set of i-th coordinates of the points in S. Let
DEFINITION
[atj :aij-^\),
l^j
Closest-point problems in computational
Ct'lA
•
•
1
•
•
887
geometry
i
• •
I
> 1
t i
^23
1 1
1 1 1 1
^22
• <
• •
•
• •
•
• •
• •
<^21
•^--^8
- --•
•
•
Ti 1
8 1
t
-<-8-^
Fig. 1. Example of a degraded 5-grid.
be a one-dimensional degraded 8-ghd for the set Si. The collection of D-dimensional cells D
["[[%/ : «/,j/+i),
where
1 ^ j / < //,
is called a Z)-dimensional degraded 8-grid for S. See Figure 1 for an example. The following lemma follows immediately. 2.2. Let p be a point of S and let B be the cell in the degraded 8-grid for S that contains p. Let c be an integer. All points of S that are within distance c8 from p are contained in B and in the (2c -h 1)^ — 1 cells that surround B. LEMMA
We now give a simple algorithm for constructing a D-dimensional degraded (5-grid. Assume the points of S are stored in a one-dimensional array S. For each 1 ^ / < D, sort the elements of St. Give each element in Si a pointer to its occurrence in S. For each 1 ^ / < D, construct a one-dimensional degraded 5-grid [aij : a/,j+i), 1 < j < li, for the set Si using the algorithm given above. During this construction, for each j and each element pi—which denotes the /-th coordinate of point p—such that aij ^ pi < (2/, j+i, follow the pointer to S. Store with the point p inS the numbers aij and j . At the end, each point in S stores with it two vectors of length D. If point p has vectors (Z?!, Z?2,..., ^ D ) and (ji, J2, • • •, jo), then p is contained in the cell with lower-left comer (Z?!, Z72,..., bo)' This cell is part of the ji-th 5-slab along the /-th axis.
888
M Smid
These vectors implicitly define the degraded ^-grid. Note that each jt is an integer in the range from I to n. Hence, we can sort the vectors (7*1, 72, • • •, 7D) in 0(n) time by using radix-sort. This gives the non-empty cells of the degraded grid, sorted in lexicographical order.
2.4. Randomized algorithms In this section, we will give algorithms that solve the closest pair problem in o(n\og n) time. Of course, these algorithms are implemented on a machine model that is more powerful than algebraic computation trees. Most algorithms of this section use randomization, the floor function, and indirect addressing. For most of these algorithms, the basic approach is similar to that of Section 2.3. In a first step, a grid is constructed such that (i) the closest pair is either contained in one grid cell or in two neighboring cells and (ii) the total number of pairs {p,q), where p e S and q is contained in p's cell or in any one of the neighboring cells is bounded (with high probability, or in the worst case) by 0(n). Then, in the second step, we compute the closest pair by taking the minimum distance among all these pairs (p,q). Using perfect hashing [67], this second step takes only 0(n) expected time. Hence, the main problem is how to find a good grid size. 2.4.1. Rabin's algorithm. The oldest randomized closest pair algorithm dates back to 1976 and is due to Rabin [102]. (In fact, [102] is considered as the seminal paper on randomized algorithms.) This algorithm uses random sampling. Let S\ be a random subset of S having size n^^^, and let 8 be the minimum distance in ^i. Consider the grid with cells of size 8. Let N be the total number of pairs (/?, q), where p e S and q is contained in p's cell or in one of the 3 ^ — 1 neighboring cells. Note that A^ is a random variable. Rabin proves that A^ is bounded by 0(n) with probability at least 1 — 2~" . That is, with a very high probability, 8 gives a good grid size. How do we compute the value of 5? Rabin proposes choosing a random subset ^2 of S\ of size \S\ p/'^ = n^/^, and to compute the minimum distance 8' of ^2 by a brute force algorithm, taking 0((n'*/^)^) = 0(n) time. Since with a very high probability, 8^ gives a good grid size for the set ^i, we can use 8^ to find 8 in 0(n^^^) expected time. Hence, the entire algorithm takes 0(n) expected time. (We remark that when Rabin wrote his paper, the implementation of the hashing procedure was left open. Only in 1984, this gap was filled by the perfect hashing scheme of Fredman, Komlos and Szemeredi [67].) Recently, Dietzfelbinger et al. [55] gave a complete description of an implementation of Rabin's algorithm. In particular, they provide all details of the hashing procedure, and modify the algorithm so that only few random bits are needed. Fortune and Hopcroft [65] gave an alternative algorithm to find a good grid size. They assume that a special operation Findbucket{8, p) is available which computes in unit time the cell in the 5-grid that contains the point p. In this model, they give a recursive algorithm that computes a good grid size in 0{n log log n) worst-case time. Moreover, given this grid size, the closest pair can be computed in linear time. We remark that if unbounded space is available, this gives a closest pair algorithm with 0{n log log n) worst-case running time.
Closest-point problems in computational geometry
889
Here is a brief description of the algorithm that computes the good grid size. Start with a grid size 8 equal to D/n times the side length of the smallest axes-parallel cube containing S. Insert the points into the 5-grid until one cell contains ^Jn points, or all points have been inserted. For each cell containing more than one point, call the algorithm recursively on these points. After all recursive calls have been completed, set 8 to the smallest value returned by these recursive calls. Then start the algorithm again with this new value of 5. After all points of S have been inserted into the current grid, call the algorithm recursively on all cells containing more than one point. 2.4.2. A sieve algorithm. KhuUer and Matias [85] give a randomized sieve algorithm to find a good grid size. Their algorithm iteratively discards points from S that are known to be "far away" from all other points. Clearly, such points do not play a role for determining the closest pair. Here is a description of the algorithm. Recall the notion of neighborhood in a grid, as defined at the end of Section 1. We make a sequence of iterations. Initially, we set S\\= S and / := 1. During the /-th iteration, we pick a random point pt e St, and compute its nearest neighbor qi in Si — by brute force. Let di be the distance between pi and qi. Then — using perfect hashing — we store the points of Si in a di/(4D)-gnd and determine the set A of all points of St that do not contain any other points of Si in their neighborhoods. Then, we set 5/+i := Si \ A. If 5/+i ^ 0, then we proceed with the next iteration. Otherwise, the algorithm stops and outputs J/. Consider the /-th iteration. Let p be a point of Si. The following two properties hold. (1) If d(p, Si) ^ di/(4D), then p has another point of Si in its neighborhood and, therefore, p belongs to 5'/+i. (2) If dip, Si) > di/2, then the neighborhood of p is empty and, hence, p does not belong to 5/+i. First, we claim that J/+i ^ di/2. This is proved as follows. Since pi^\ e 5/+!, there is a point q e Si that is in the neighborhood of p/+i — in the di/(4D)-gnd. Note that d(pi-\-i,q) ^ di/2. Also, q is contained in the set 5/+i. As a result, we have J^+i = d(pi+\, Si-\-i) ^d(pi-^\,q) ^ di/2. In particular, the sequence J i , J2, • • • is decreasing. Let i be the number of iterations made by the algorithm, i.e.. Si / 0, but 5^+1 = 0. We claim that di/(4D) ^d(S) ^di. The right inequality trivially holds, because di is a distance in S. To prove the left inequality, let P, 2 be a closest pair in S. Let / (resp. j) be the index such that P e Si\ Si-^i (resp. Q e Sj \ Sj-\-i). Assume w.l.o.g. that / ^ 7 . Then Q e Si and d(S) = d(P, Q) = d(P, Si). Note that d(P, Si) > di/(4D). (Otherwise, by the first property, P would belong to 5/+i.) Therefore, d(S) > di/{4D) ^ di/{4D). Hence, the algorithm computes a grid size di that approximates the minimum distance d{S) up to a constant factor. Given this grid size we can find the closest pair using hashing techniques, in linear expected time. We analyze the expected running time of the sieve algorithm. First note that using perfect hashing, the /-th iteration takes 0(15/1) expected time. For 1 ^ / < £, let Si be the expected size of Si. Moreover, define sg-^i := Si^2 '-="•'•= Sn := 0. (Note that I < n.) We will
890
M. Smid
show that Si ^ Si-^i/2. This impHes that Si ^n/2^~^. time of all iterations is proportional to
(
n
\
n
n
/=i
/
/=i
i=\
Hence, the total expected running
That is, the entire algorithm takes linear expected time. It remains to show that ^/+i < Si/2. If si = 0, then also ^/+i = 0 and the claim holds. Assume that si ^ 0. Consider the conditional expectation E(\Si-^\ \ \ \Si\=k). Let r be a point of Si such that d(r, Si) ^ di. Then the second property implies that r ^ 5/+i. Take the points in 5/ and label them rj, r 2 , . . . , r^ such that d(r\, 5/) ^ d(r2, 5/) ^ • • • < d(rk, Si). The point /?/ is chosen randomly from the set 5/, so it can be any of the rj's with equal probability. Thus E(\Si-\.\\ \ \Si\=k) ^k/2, from which it follows that ^/+i = ZkEQSi^il I \Si\=k)-FT(\Si\=k)^Si/2. 2.4.3. A randomized incremental algorithm. The final algorithm of this section is due to Golin et al. [71]. It follows the randomized incremental construction paradigm. (See Seidel [111].) Number the points of S randomly p\, P2,'-, Pn- For 2^i ^n, let Si := {p\,..., Pi). The algorithm computes d(S2), diS^),..., d(Sn), in this order. Assume that 8 := d(Si) has been computed already. We assume that the points of 5/ are stored in a <5-grid. To compute d{Si-^\), we do the following. Let p be the point of 5/+i \ Si. If the minimum distance of 5/+i is less than 8, then there must be points in the neighborhood of /?'s cell. By Lemma 2.1, there are at most a constant number of points in this neighborhood. We find all these points using perfect hashing, and compute their distances to /?. If all these distances are at least equal to 5, then we know that
Closest-point problems in computational geometry
891
It follows that the entire algorithm takes linear expected time. It can be shown that with high probability, the running time is bounded by Oin log n/ log log n). In [71], it is also shown that this algorithm can be implemented in the randomized algebraic computation tree model, using degraded grids. Then the expected running time increases to 0{n\og n), even with high probability. This is optimal in this model. (See Schwarz [108].)
2.5. Extensions of the closest pair problem 2.5.1. The all-nearest-neighbors problem. Let 5 be a set of n points in M^. Until now, we only looked at the problem of computing the minimum distance in S. An obvious generalization is to compute for each point p of S its nearest neighbor, i.e., another point of S that is closest to p. Let us consider the planar case first. Shamos and Hoey's algorithm of Section 2.2.1 can easily be extended to solve the all-nearest-neighbors problem optimally, i.e., in 0(n log n) time using linear space. In [79], Hinrichs, Nievergelt and Schom extend their plane sweep algorithm that was given in Section 2.2.3 so that it solves the problem within the same complexity bounds. The all-nearest-neighbors problem turns out to be more complicated for higher dimensions. Bentley [20,22] shows how his divide-and-conquer algorithm of Section 2.2.2 can be adapted such that it solves the Z)-dimensional problem in 0{n log ^~^n) time. (In particular, this is optimal if D = 2.) An important property that is used in the merge step is the fact that any point can be the nearest neighbor of at most a constant number of other points. (See [20,52] for a proof of this.) The first 0{n log n)-time algorithm for the all-nearest-neighbors problem for an arbitrary dimension D was given by Clarkson [41]. His algorithm uses randomization — hence, the running time is expected — and the floor function. Vaidya [126] solves the problem deterministically, in 0{n log n) time. His algorithm can be implemented in the algebraic computation tree model and is, therefore, optimal. The algorithms in [41] and [126] are based on carefully constructed subdivisions of MP into axes-parallel rectangles. Callahan and Kosaraju [32] defined the so-called well-separated pair decomposition, which captures the important notions on which these two algorithms are based. It is shown in [32] how such a decomposition can be used for solving several proximity problems such as the allnearest-neighbors problem. In view of this, we only give the algorithm that is based on the well-separated pair decomposition. 2.5.2. The well-separated pair decomposition. The well-separated pair decomposition appeared for the first time in Callahan and Kosaraju [32]. (See [35] for the full version of this paper. Callahan's PhD thesis [31] contains a detailed discussion. We also mention that Vaidya [126] and Salowe [105] already used this notion implicitly.) Intuitively, a well-separated pair decomposition of a point set 5 is a partition of the set of all pairs p, q of distinct points into a collection of pairs of sets (A, B) such that all distances between points in A and points in B are large compared to the distances within A and within B.
892
M. Smid
To define this notion more precisely, let s denote a fixed positive constant, called the separation constant. Let X and Y be two sets of points, and let R{X) and R{Y) be the smallest axes-parallel rectangles containing X and 7, respectively. The sets X and Y are said to be well-separated if there are two D-dimensional balls Bx and By having the same radius — say r — and containing the rectangles R{X) and R{Y), respectively, such that the minimal distance between these balls is at least equal to ^r. DEFINITION 2.3. Let 5" be a set of n points in R^, and let ^ > 0 be any constant. A wellseparated pair decomposition (WSPD) of 5 is a set of pairs of nonempty subsets of S, {{Ai,5i},{A2,B2},...,{A^,5^}}, such that (1) Ai n Bi = 0, for all / = 1, 2 , . . . , m. (2) For each unordered pair of distinct elements {a, b] of S, there exists a unique pair [Ai, Bi] in the decomposition such that a e Ai and b e Bi. (3) Ai and Bi are well-separated, for all / = 1,2,..., m. The integer m is called the size of the WSPD. We now describe the algorithm of Callahan and Kosaraju for constructing such a decomposition for which m = 0(n). They first construct a binary tree, called tht fair split tree, which is recursively defined as follows. If S consists of only one point, then the tree consists of one node. Assume that S contains more than one point. Consider the smallest axes-parallel rectangle R(S) that contains S, and let f, 1 < / ^ D, be the dimension along which this rectangle has the longest side. Split R(S) into two rectangles by cutting the i-th interval into two equal parts. Let Si and ^2 be the subsets of S that are contained in these two new rectangles. (Note that both Si and ^2 are non-empty.) Then the fair split tree for S consists of a root, together with two subtrees which are fair split trees for 5i and ^2, respectively. The leaves of the fair split tree are in one-to-one correspondence with the points of S. If u is a node of this tree, and Sy is the subset of S that corresponds to the leaves in the subtree of i;, then we say that v represents Sy. Since the fair split tree need not be balanced — it may have depth as large as ^(n) — a naive implementation of the recursive definition leads to a quadratic running time. Callahan and Kosaraju show how to reduce the construction time to 0(n log n). Let Si partial fair split tree be defined in the same way as the fair split tree, except that sets represented by the leaves may have size larger than one. The main idea of the efficient construction is to construct a partial fair split tree in which each leaf represents at most n/2 points. Then, for each leaf, a fair split tree is constructed for the points represented by this leaf, using the same algorithm recursively. To be more precise, consider the set S. We make a sequence of splits. Each split results in two non-empty subsets. The next split in the sequence is performed on the larger of these two sets. Hence, if for j ^ 0, Sj is the larger of the two sets that result after the j-th split, then the (j + l)-st split consists of splitting the smallest axes-parallel rectangle containing Sj into two equal parts along its longest side. We stop this process if the set Sj has size at most n/2. If for each 1 ^ / ^ D, we have a list storing the points of S sorted by their i-th coordinates, together with cross-references between these lists, then this sequence of splits can
Closest-point problems in computational geometry
893
be performed in 0(n) time. Here, a key observation is that if we split along the / -th dimension, then by walking from both ends of the /-th list, this split takes time proportional to the size of the smaller of the two resulting subsets. This algorithm correctly computes a fair split tree, in 0(nlog n) time. For a detailed proof, we refer the reader to [31,32,35]. We now sketch how to use the fair split tree in order to obtain a WSPD of S. First, we need some notation. If A is a set of points, then /(A) denotes the length of the longest side of the smallest axes-parallel rectangle that contains A. Let A and B be two sets of points that are represented by two different nodes of the fair split tree. Then we will write A < B if either /(A) < 1{B), or /(A) = 1{B) and the node representing A precedes the node representing B in postorder. Extend this ordering to < in the obvious way. If v is an internal node of the fair split tree, then we denote by A^ and By the sets of points that are represented by the two children of v. The WSPD is obtained by calling the ^roctdmtfindpairs{Ay, By) for each internal node V of the fair split tree. This procedure does the following. If A^; and By are well-separated, thtnfindpairs(Ay, By) returns the pair {Ay, By} and terminates. Otherwise, assume w.l.o.g. that By < Ay. (Otherwise, swap Ay and By.) Note that Ay contains more than one point, because otherwise we would have I (By) =l(Ay) = 0 and, therefore. Ay and By would be well-separated. Therefore, the node representing Ay has two children. Call these vi and V2. Recursively call the pvoctduvQsfindpairs(Ay^, By) andfindpairsiAy^, By), and return the union of their outputs as the output offindpairs(Ay, By). The pairs that are reported by all these procedure calls gives a WSPD for the entire set S. Note that each pair can be represented by just two pointers to the appropriate nodes in the fair split tree. To analyze the size of the computed WSPD and the running time of the algorithm itself, we use the following claim which follows from a packing argument: If A is any subset of S that is represented by some non-root node of the fair split tree, then we denote by p(A) the subset that is represented by the parent of this node. The claim is that if A is any subset that is represented by some non-root node, then the computed WSPD contains at most a constant number of pairs of the form [A, B}, such that B -< p(A) ^ p(B). This implies that the WSPD that is computed has size 0(n). Also, the time needed to compute it — given the fair split tree — is bounded by 0(n). Hence, given a set S of n points in R^, we can in 0(nlog n) time compute a wellseparated pair decomposition for S. We now show that this is optimal. First, we need a lemma, whose proof is trivial. LEMMA 2.3. Assume the separation constant s is larger than two. Let {A, B] be a pair in any WSPD of S. Assume there is a pair of points (a, b) such that a e A, b e B, and b is a nearest neighbor of a. Then A = {a}.
Let P, Q be a closest pair in S. Then this lemma implies that {{P}, {Q}} is a pair in any WSPD of S. Hence, given any WSPD, we can find the closest pair in time proportional to the size of the WSPD. This proves that computing any WSPD takes ^ (n log n) time in the algebraic computation tree model.
894
M. Smid
How do we use the WSPD for solving the all-nearest-neighbors problem? By Lemma 2.3, we only have to consider pairs of the WSPD, one of whose sets is a singleton. An important observation is the following lemma, which is a generalization of the fact that a point can be the nearest neighbor at most a constant number of other points. LEMMA 2.4. Let A and B be sets ofpoints in M^, such that for all a e A, [a] and B are well-separated. Also, assume that for all pairs a, a' of distinct points in A, the distance from a to the smallest sphere containing B is at most equal to the distance between a and a'. Then the size of A is bounded by a constant that only depends on the dimension D and the separation constant s.
For any node v of the fair split tree, let f(v) be the set of all points a e S such that the pair {{a], Byf} is contained in the WSPD for some ancestor u^ of u. Also, define N(v) as the set of all points a e f(v) such that the distance from a to the smallest sphere containing By is at most equal to the smallest distance between a and any point of f(v). Then Lemma 2.4 implies that this set A^(i;) has size 0(1). We compute the sets A^(i;) top down. If v is the root of the fair split tree, then N(v) is empty. Let u be any node with parent v. Then initially we set N(u) to the union of N(v) and the set of all points a such that {{a}, Bu} is a pair of the WSPD. Then we remove elements that do not satisfy the definition of N(u). Computing N{u) from A^(i;) takes constant time. Hence, overall we need linear time to compute all these sets. Let fl be a point of S, let b be its nearest neighbor, and let v be the leaf of the fair split tree that represents b. Then it is easy to see that a must be contained in the set A^(i'). Hence, by considering all leaves, we find all nearest-neighbors, in linear time. This proves that we can solve the all-nearest-neighbors problem in 0(n log n) time. 2.5.3. The k closest pairs problem. In this version of the problem, we are given a set S of n points in R^ and an integer /:, 1 < /: ^ (2), and we have to compute the k smallest distances in the set S. The first algorithms for this problem are due to Smid [119]. He gives an incremental algorithm using a space efficient variant of range trees [120] that solves the problem in Oin'^^^Xog n -\- n\/k\og k) time. For the planar case, this can be improved to 0{n log n + n V^log k) by using a straightforward generalization of the sweep algorithm given in Section 2.2.3. For the case where 1 ^ k ^n, this result can further be improved by first computing for each point its nearest neighbor and then selecting among these n pairs those k whose distance is smallest. This gives a set of at most 2k points that contains the k closest pairs of the set S. We apply the above algorithms on this small set. The result is an algorithm for solving the k closest pairs problem in 0(/i log n -h k\/klog k) time. Diclcerson, Drysdale and Sack [53] give a simple algorithm for the planar case that uses the Delaunay triangulation. Here is a description of their algorithm. Given a set S of n points in the plane, compute the Delaunay triangulation DT of S. For each point p of 5, sort the edges of DT that are incident to p in increasing order of their length. Also, sort all edges of DT by their length. Next, insert the k shortest edges of DT into a heap. (If k is larger than the number of edges in DT, then insert all edges into the heap.) Now we can
Closest-point problems in computational geometry
895
Start with enumerating the k closest pairs. For / = 1,2,..., ^, do the following: Delete the pair, say (p,q), that is stored in the heap and that has minimum distance, and report this pair as being the i-th closest pair. For all Delaunay edges of the form (q,x) such that (i) d{q,x) ^ d{p, q) and (ii) the pair (/?, jc) has not been reported, insert (p, x) into the heap. Similarly, for all Delaunay edges of the form (x, v) such that (i) d{x, v) ^ d{p, q) and (ii) the pair {x,q) has not been reported, insert {x,q) into the heap. The correctness of this algorithm is based on the following property of the Delaunay triangulation. Let p and q be any two points of S. Then either {p,q) is an edge of DT, or there are points jci, X2,. •., x^ such that (i) (/?, xi), {xm,q) and (x/, x/+i), 1 ^ / < m, are edges of DT, (ii) J(x/,x/+i) < d(p,q) for 1 < / < m, (iii) d(p,Xi) < d(p,q) and d(xi,q) < d(p,q) for 1 ^ / ^ m, and (iv) d(p,x\) ^ d{x\,q) or d(q,Xm) ^ d(xm, p)Using this property, Dickerson et al. show that if ip,q) is the i-th closest pair, then the pair (p,q) will be contained in the heap by the time all distances smaller than d(p,q) have been reported. They also show that the running time of the algorithm is bounded by 0(nlog n + ^log k). The efficiency of the algorithm of Dickerson et al. heavily depends on the fact that the Delaunay triangulation has linear size. This does not hold for dimensions greater than two. Dickerson and Eppstein [54], however, circumvent this by using the following result of Bern, Eppstein and Gilbert [26]: Given a set S of n points in R^, there is a superset S' of S having size 0(n), such that the Delaunay triangulation DT' of S' has size 0{n) and bounded degree. Such a superset can be computed in 0{n log n) time. Applying the algorithm given above to DT' gives the k closest pairs of S. (Clearly, the correctness proof is more complicated than in the planar case, because we use the Delaunay triangulation of S' instead of S. See [54].) The entire algorithm solves the k closest pairs problem in 0{n log n -\- k log k) time. Note that this algorithm reports the k closest pairs in sorted order. In [54], a variant is given that reports the k closest pairs — in no particular order — in 0{n log n + k) time. This is optimal in the algebraic computation tree model. We remark that Arya and Smid [15] have shown that the algorithm of [53] also works if we replace the Delaunay triangulation by any bounded degree spanner. (See Section 6.1.) The first optimal algorithm for the k closest pairs problem is due to Salowe [106]. He first combines a variant of Vaidya's algorithm [126] with the parametric search technique to compute the ^-th smallest LQO-distance. Then, again using a variant of Vaidya's algorithm, he enumerates all pairs of points that have distance at most equal to D8. The number of these pairs is bounded by 0(n + A:), and the k closest pairs in S are among them. Hence, using a selection algorithm we get the k closest pairs. The entire algorithm takes 0(n log n-\-k) time. Although Salowe's algorithm is optimal, it is rather complicated because it uses the parametric search technique. Lenhof and Smid [88] give another algorithm that does not use any complicated data structures. Their algorithm is basically the same as the one presented in Section 2.3. Consider a degraded 5-grid for the set S. (See Section 2.3.1.) Number the cells of this grid arbitrarily. Let nt denote the number of points of S that are contained in the /-th cell, and let i:(5) := ^ - ("^). The algorithm of Lenhof and Smid first computes a grid size 8 such that k ^Yi{8) ^ 3^(A: + n/2). This grid size is computed in 0{n\og n) time by a simple variant of the search procedure sketched in Section 2.3. Then, a degraded (D<5)-grid is constructed and
896
M. Smid
all pairs of points that are contained in the same cell or in neighboring cells are enumerated. The number of enumerated pairs is bounded by 0(n + k) and they include the k closest pairs. The total running time of this algorithm is 0(n log n -\-k). We remark that indirect addressing is used and, therefore, the algorithm falls outside the algebraic computation tree model. (The same approach solves the fixed-radius near neighbors problem: Given 8 >0, all pairs of points that are at distance at most 8 are enumerated in time proportional to n log n plus the number of reported pairs. See [87].) The algorithms of [53] and [88] have been implemented by von Ztilow [130]. It turns out that the algorithm of [88] is faster than that of [53]. Also, the algorithm of [88] performs very well for higher dimensions. We finally mention that the well-separated pair decomposition (WSPD) can also be used to solve the k closest pairs problem optimally. Recall that if A is a set of points, then R(A) denotes the smallest axes-parallel rectangle that contains A. Let {{Ai, 5i}, {A2, B2},..., {A^, 5^}} be a WSPD for S, listed in increasing order of d(R(Ai), R(Bi)). To report the k closest pairs, we first find the smallest index / such that Y!J=\ \^j\ • l^yl ^ k- Then, we compute all pairs {A, B} of the WSPD for which d(R(A),R(B)) < (1 -\-4/s)d(R(Ai),R(Bi)), where s is the separation constant. This gives us a sequence of 0(n -f- k) pairs of points that contains the k closest pairs. Hence, again using a selection algorithm, we find the k closest pairs. For details, see [31]. 2.5.4. k-point clustering problems. In the previous sections, we used closeness measures that are based on distances among pairs of points. In this section, we consider k-^oini clustering problems, in which the closeness measure is defined by a subset of the points. To be more precise, given a set S of n points in R^ and an integer k,2^k ^n,we want to find a subset S^ of S of size k that minimizes some closeness measure. For example, we may want to minimize the diameter of the k points, its smallest enclosing circle, it smallest enclosing axes-parallel cube, etc. Clearly, different closeness measures lead to different optimal A:-point subsets. We mention some of the results in this area. Dobkin, Drysdale and Guibas [57] use the following technique to find a /:-point subset for which the perimeter of their convex hull is minimized. First, they give a polynomial time algorithm for solving this problem. Then, they give an improved algorithm that first constructs the (c/:)-order Voronoi diagram of the points of S, for some suitable constant c. They show that the optimal /:-point subset is contained in the set of ck points corresponding to a region in this diagram. Hence, for each of the 0(kn) regions, they apply their first algorithm to the corresponding subset of size ck. Aggarwal et al. [5] improved this technique, by showing that it suffices to consider only 0(n) regions of the (c/:)-order Voronoi diagram. In [5], also closeness measures such as the diameter, enclosing square, or perimeter of the enclosing rectangle are considered. In Smid [123], a simple plane sweep algorithm is given for finding the k points in a set of n planar points whose enclosing axes-parallel square is minimal. Efrat, Sharir and Ziv [62] apply the parametric search technique for finding k points whose enclosing circle is minimal. Matousek [91] gives a simpler algorithm for the same problem in which he replaces parametric search by a randomized search technique. Most algorithms for ^-point clustering problems are inefficient for large values of k. In [92], Matousek gives algorithms that are especially efficient if k is close to n. These are
Closest-point problems in computational
geometry
897
based on generalizing LP-type problems [115] to optimization problems with k violated constraints. Eppstein and Erickson [63] improve the general framework of [57,5]. Their main idea is to replace the expensive 0(/:)-order Voronoi diagram by sets of O(^) nearest neighbors to each of the points of S. In this way, the number of 0(/:)-size subsets to which an "expensive" algorithm is applied is reduced from 0{n) in [5] to only 0(n/k). The framework was further improved by Datta et al. [51]. Consider a closeness measure /x, and let S^ be the A:-point subset that minimizes this measure. The technique of [51] works provided the measure /x satisfies the condition that the value of /x(5'0 is proportional to the size of the smallest axes-parallel D-dimensional cube that contains k points of S. Examples for /x(A) are the diameter of A, the radius of the enclosing ball of A, the size of the enclosing axes-parallel cube and the perimeter of the enclosing rectangle. (The area of the enclosing rectangle does not satisfy this condition.) The algorithm of [51] first constructs a degraded 5-grid such that (i) there is a cell that contains at least k points of S, and (ii) each cell contains at most 2^k points of S. This grid is computed in 0(nlog n) time, by applying the same search technique as in Section 2.3. Then, for each cell C of this grid, the set Sc of points that are contained inside this cell or within a constant number of neighboring cells are collected. If l^c I ^ k, then we compute the optimal ^-point subset of Sc using some other "expensive" algorithm. The /:-point subset found in this way having minimum /x-value is the optimal subset of the entire set S. It is clear that in this way, the expensive algorithm is called only 0{n/k) times. A detailed description of the algorithm and applications to several closeness measures is given in [51].
3. The on-line closest pair problem In this section, we give algorithms for the on-line closest pair problem. In this problem, we have to maintain the closest pair of the set S under insertions of points. That is, we want to design a data structure that efficiently updates the closest pair if points are inserted into S. Given such a data structure, we can compute the closest pair of a point set whose elements become available one after another. When we get the next point, we just insert it into our data structure, and update the closest pair. We saw that in the algebraic computation tree model, there is an Q (n log n) lower bound for the static closest pair problem. This immediately implies an Q (log n) lower bound per insertion for the on-line version of the problem. The main result of this section is a data structure of linear size that matches this lower bound. Let S be the current point set, let 8 be the minimum distance in 5, and let p be the point to be inserted. We assume w.l.o.g. that p is not contained in S. Clearly, if the minimum distance in the new set S U {p} is less than 8, p must be part of a closest pair. Therefore, in order to update the closest pair, we have to perform the following steps. 1. Find out if there is a point ^ in 5* such that d(p,q) < 5. If there is no such point, then the closest pair does not change during the insertion of p. Otherwise, find a point q of S that is closest to p. In this case, (p,q) is the new closest pair. 2. Insert the new point p into the data structure.
898
M. Smid
Let B be the L^-ball with radius 8 centered at p. Lemma 2.1 impHes that B contains at most a constant number of points of S. Our strategy for implementing the first step will be to find a subset S^ of S that contains all points of SOB and whose size is "small". (Ideally, this size is bounded by a constant, although a size logarithmic in |5| suffices.) Given this subset, we can trivially update the closest pair by computing the distances between p and all points of S^ Finding the subset S^ efficiently is achieved by maintaining a subdivision of M^ into cells such that each cell contains only "few" points, and the ball B overlaps only "few" cells. The set S^ is then obtained by performing point location queries in this subdivision. After having performed the first step, we add point p to the cell of the subdivision that contains p and, if necessary, update the subdivision. We now turn to concrete implementations of this insertion procedure.
3.1. Algorithms based on the logarithmic method The first algorithms are based on applying Bentley's logarithmic method [21]. This application first appeared in Smid [121]. (See also Schwarz [108].) Let S be the current set of points in M^, and let n denote its size. Write n in the binary number system, n = J2i>o ^' ^'' where a, G {0, 1}. Partition S (arbitrarily) into subsets: for each / such that a/ = 1, there is one subset 5/, of size 2'. Moreover, for each such i, there is a real number 5/ such that d(S) ^ 5/ ^ d{Si). The data structure consists of the following. (1) The closest pair of S and its distance 8. (2) For each / such that «/ = 1, a 5/-grid storing the points of Si. We assume that the non-empty cells of this grid are stored in a balanced binary search tree, sorted lexicographically according to their "lower left" comers. Now consider the insertion of a new point p. For each / such that«/ = 1, we find the cell of the (5/-grid that contains p together with the 3 ^ — 1 neighboring cells. Then we compute the distances between p and all points of 5/ that are contained in these cells. If we find a distance less than 8, then we update 8 and the closest pair. It remains to update the rest of the data structure. Let j be the index such that ao = ai = • • • = aj-\ = 1 and aj = 0. Let Sj :={/?} U 5o U 5i U ••• U Sj-\ and 8j := 8. We build a 8 j-grid for the set Sj, and discard the grids for the sets So, S\,..., Sj-\ (thereby implicitly making these sets empty). To prove the correctness of this algorithm, note that since d(S) ^ 5/, it suffices to compare p with all points of Si that are in p's neighborhood— in the 5/ -grid. Hence, the closest pair is updated correctly. Also, the new value 8j satisfies d{SU[p}) ^8j ^ d(Sj), and for all i > j , we have d(S U {p}) ^ 8i ^ d(Si). Finally, the updated data structure contains a grid storing 2' points for each / such that the binary representation of « -|- 1 contains a one at position /. We analyze the complexity of the insertion algorithm. First note that since 6/ ^ d(Si), the neighborhood of p in the 8i -grid contains at most a constant number of points of Si. Hence, we spend 0(log n) time for each grid. Since the data structure contains a logarithmic number of grids, the first part of the insertion algorithm takes 0(log ^n) time.
Closest-point problems in computational geometry
899
Consider the second part of the algorithm, in which we build the Sj -grid. This step takes 0{\Sj\\og \Sj\) time, because of sorting. If we store the points in an appropriate sorted order, however, then this grid can be built in 0{\Sj\) = 0(2^) time. (See [108,109] for details.) Since j can take any value between zero and [log n], the insertion time fluctuates widely. We claim, however, that the amortized time for the second step is bounded by 0(log«). To prove this claim, assume we start with an empty set S and perform a sequence of n insertions. Let kj be the number of times that during these insertions, we build a grid for a subset of size 2^. Then kj is at most equal to the number of integers consisting of at most 1 + [log n\ bits whose j least significant bits are equal to one, and whose (j + l)-st bit is equal to zero. That is, we have
The total time spent for the second step during the n insertions is bounded by
which proves the claim. We have shown that the running time of the entire algorithm for maintaining the closest pair is bounded by 0(log ^n) worst-case time plus 0(log n) amortized time per insertion. Using standard techniques (see Overmars [98, pages 102-105]), we can transform the data structure such that the second step takes logarithmic time in the worst case. Hence, we have a data structure that maintains the closest pair in 0(log ^n) worst-case time per insertion. The structure has size 0(n). Note that the first step of the algorithm takes 0(log ^n) time, whereas the second step takes only 0(log n) time. This suggests that an improvement is possible. Indeed, instead of writing n in the binary number system, we use the number system with base log n. (See Overmars [98, pages 108-115] or Schwarz [108].) In this way, both steps take 0(log ^n/ log log n) time, whereas the space used remains linear. Hence, we have a data structure of linear size that maintains the closest pair in 0(log ^n/log log n) worst-case time per insertion. Note that the algorithm uses the floor function in order to find the grid cell containing the new point p. By replacing the grid by a degraded grid, the algorithm can be implemented in the algebraic computation tree model. It is still possible to improve the above data structure. Consider again the data structure based on the representation of n in the binary number system. The main observation is the following: If we insert a point p, then for each / such that at = 1, we find the cell of the 5/ grid that contains p (plus the neighboring cells). That is, we perform point location queries in a logarithmic number of grids, but always with the same query point p. In Schwarz and Smid [109], it is shown that the fractional cascading technique [39] can be extended so that all these queries together can be solved in 0(log n log log n) time. The main problem is that we have grids with different grid sizes. Therefore, an ordering on the grid cells has
900
M Smid
to be introduced that is "compatible" with all these sizes. In [109] such an ordering is defined. As a result, locating the point p in all grids takes 0(log n) comparisons. Since the ordering is quite complicated, however, each comparison takes 0(log log n) time. Overall, we get a data structure of size 0(n) that maintains the closest pair in 0(log nlog log n) amortized time per insertion. Note that we need the floor function for this result. This can probably be made worst-case, but the details will be tedious. It is not clear if the ordering on the grid cells can also be defined if we use degraded grids instead of standard grids. We finally mention an extension of the above data structure. The structure as described above heavily uses the fact that we only insert points. It turns out, however, that the structure can be adapted for dealing with semi-online updates, as defined by Dobkin and Suri [59]. A sequence of updates is called semi-online if the insertions are on-line — i.e., they arrive in an unknown order — but when a point is inserted, we are told after how many updates from the moment of insertion it will be deleted. This extra information about the deletions can be used to guarantee that when a point is deleted, it is always contained in a grid storing a small subset. Because in a deletion the minimum distance may increase, we store extra information in the data structure for updating the closest pair efficiently. In this way, we get a data structure of size 0(n) that maintains the closest pair in 0(log ^n) worstcase time per semi-online update. For details, we refer the reader to Dobkin and Suri [59] and Smid [117,118,121]. 3.2. An algorithm that is optimal for dimension two In this section, we give a data structure that maintains the closest pair in 0(log ^~^n) amortized time per insertion. The algorithms can be implemented in the algebraic computation tree model and, therefore, the result is optimal for the planar case. The results in this section appeared in Smid [124]. In the previous section, we maintained a sequence of subdivisions of M^, where each subdivision was a grid. Now we store the point set in only one subdivision that is maintained in such a way that we do not need the floor function. We will use the skewer tree, see Edelsbrunner, Haring and Hilbert [61]. This data structure stores a collection of m non-overlapping axes-parallel D-dimensional rectangles, such that point location queries can be performed in 0(log ^~^m) time. The skewer tree uses 0(m) space. In [124], it is shown that this data structure can be made dynamic such that the following operations can be performed in 0(log ^m) amortized time: Insert a rectangle into the collection, such that the rectangles in the new collection are still non-overlapping; split a rectangle into two axes-parallel rectangles. (Deletions and merges can also be supported, but then the complexity increases by a factor of log log m because of the usage of dynamic fractional cascading [95].) Let S be the current set of points, and let n denote its size. The data structure consists of the following. (1) The closest pair in S and its distance 5. (2) A subdivision of MP into non-overlapping D-dimensional axes-parallel rectangles. Each rectangle in this subdivision has sides of length at least (5, and contains at least one and at most (2D)^ log ^~^n points of S.
Closest-point problems in computational
geometry
901
/.•
Fig. 2. The 9 point location queries in the planar case.
(3) The rectangles of the subdivision are stored in a skewer tree. With each rectangle R, we store a list of those points in S that are contained in R. Assume we insert a new point p = (p\,..., PD) into S. We update the data structure as follows. First, we perform 3 ^ point location queries in the skewer tree, with query points (pi + £i,..., PD -^ SD), for 6^1, ...,£/) G {—5,0, 5}. Then we compute the distances between p and all points of S that are contained in the rectangles that are found. If we find a distance less than 5, then we update 8 and the closest pair accordingly. (See Figure 2.) Next, we insert p into the list of the rectangle R it belongs to. If this updated list contains at least (2D)^ log ^~^n points, we perform a sequence of at most D split operations on R such that (i) the second property of the data structure is satisfied, and additionally (ii) each of the new rectangles contains at most half of the points that were contained in R. For the details of these split operations, we refer the reader to [124]. (In the next section, we will describe the split operation for a slightly modified subdivision. There, one split operation suffices.) By the above mentioned property of dynamic skewer trees, it follows that the entire insertion procedure takes 0(log ^~^n-^ log ^n) amortized time. Consider a new rectangle of the subdivision. At this moment, it contains at most (1/2)(2D)^ log ^~^n points. Therefore, if this rectangle is split, there must have been this many insertions into it. During those insertions, no split operation is necessary. Hence, the amortized insertion time of the entire data structure is bounded by 0(log ^~^n). It is clear that it uses linear space.
902
M. Smid
3.3. An algorithm that is optimal for all dimensions In this section, we give an optimal data structure for maintaining the closest pair under insertions. This result is due to Schwarz, Smid and Snoeyink [110]. We will use basically the same subdivision as in the previous section. The improvement stems from the use of a better point location data structure. During the sequence of insertions, we maintain a hierarchical collection of axes-parallel D-dimensional rectangles. The data structure stores the following information. (1) The closest pair in S and its distance 5. (2) A binary tree T representing the hierarchical collection. Each node of T stores a rectangle. The rectangles stored in the leaves form a partition of R^ and they represent the "current" subdivision. With each leaf, we also store a list of all points of S contained in the corresponding rectangle. For each internal node of T, the rectangle stored in it is equal to the union of the two rectangles stored in its children. (3) The current subdivision consists of non-overlapping rectangles such that (i) each rectangle has sides of length at least 5, and (ii) each rectangle contains at least one and at most (2D + 2)^ points of S. Note that in order to solve a point location query in the current subdivision, we can walk down the tree T. The query time is proportional to the height of T, which, as we will see, may be linear in n. Assume for the moment, however, that we use this query algorithm. To insert a new point p into 5, we perform the same 3 ^ point location queries as in Section 3.2, and update the closest pair. Afterwards, we insert p into the rectangle R containing it. If this rectangle now contains 1 + (2D + 2)^ points, we split it as follows. Let R have the form [ai, Z?i ] x • • x [ao, bo], and let S' be the points of the new set S that are contained in R. For 1 < / ^ D, compute the value m, (resp. M/) which is the minimum (resp. maximum) /-th coordinate of any point of S'. Let / be an index such that Mi —mi> 28. (It follows from Lemma 2.1 that such an index exists.) Let c, := m/ -h (M/ — m/)/2. Then we split R into two rectangles Rl = [ci\,b\] X ••• X [ai-\,bi-\]
X [fl/,c/] x [«/+i,Z?/+i] x ••• x [ao^bo]
Rr = [a\,b\] X ••• X [ai-\,bi-]]
x [c/,Z?/] x [fl/+l,^/ + i] x ••• x [aD,^z)].
and
In the tree 7, we give the leaf storing R two new children corresponding to Ri and Rr, and give these two new leaves the appropriate lists of points. It is not hard to see that this algorithm correctly maintains the closest pair. To estimate the running time, we observe that we perform a constant number of point location queries and at most one split operation. Since the tree T may have a linear height, the worst-case running time of the insertion algorithm is 0(n). There are two possibilities to improve the running time. First, we can use a centroid decomposition to represent the tree 7 as a balanced tree. A fi-centroid is a node of T whose removal results in three components each containing at most a fraction p of all nodes. The centroid decomposition is obtained by repeatedly choosing such centroids in
Closest-point problems in computational geometry
903
each of the components. Guibas et al. [75] show how this decomposition can be computed in Hnear time. Given this centroid decomposition, point location queries can be solved in logarithmic time. To maintain it efficiently, we apply the partial rebuilding technique. (See Lueker [90] and Overmars [98, Chapter IV].) In this way, a split operation takes 0(log n) amortized time. Hence, overall we get an algorithm for maintaining the closest pair in 0(log n) amortized time per insertion, and using 0{n) space. This version of the algorithm has been implemented by Hintz [80]. A second improvement is obtained by storing the hierarchical subdivision using dynamic trees [116]. Cohen and Tamassia [45] give a general technique to maintain hierarchical subdivisions such that point location queries and several other operations — such as the split operation — take 0(log n) time in the worst case. (For a detailed discussion of the application of this technique to our problem, see Schwarz [108].) Hence using this technique, we get our main result: A data structure that maintains the closest pair in 0(log n) worstcase time per insertion. This data structure uses linear space, and the algorithms fit into the algebraic computation tree model. Therefore, this solves the on-line closest pair problem optimally. We finally mention that the techniques presented in this section can be generalized to get efficient on-line solutions to /:-point clustering problems, for a large class of closeness measures. (See Section 2.5.4, Datta et al. [51] and Schwarz [108].) 4. The dynamic closest pair problem We now turn to the fully dynamic closest pair problem. Here, we have to maintain the closest pair in a point set if both insertions and deletions are allowed. Note that intuitively, insertions are easier to handle than deletions: If a point is inserted, we only have to check the neighborhood of this new point. On the other hand, if we delete a point that is part of the closest pair, then we have to find the new closest pair. 4.1. The deletions-only case Supowit [125] showed that the divide-and-conquer algorithm of Section 2.2.2 can be turned into a data structure that maintains the closest pair if only deletions have to be supported. We sketch this structure for the planar case. Let 5 be a set of n points in the plane. We store the points of S in the leaves of a balanced binary search tree, sorted by their xcoordinates. For any node w of this tree, we denote by S^ the subset of S that is stored in the subtree of w. Every internal node w contains additional information. Let u and v be the left and right child of w, respectively. We store with w the minimum distance d(Syj) of the set Sw, the value 8^ := rmn(d(Su), d(Sv)), and a value MU) that is between the maximum x-coordinate in Su and the minimum x-coordinate in Sy. Also, we store with w a tree T^, storing all points of Sw that are within distance 8^^ of the vertical line x =muj. The points are stored in the leaves of this tree, sorted by their y-coordinates. Finally, we store with w a heap Hy^j, storing all distances d(a,b), where a and b are points of Tyu that are within five positions of each other in this tree. Note that d(Sw) is the minimum of 8^; and the smallest element in Hw
904
M Smid
We also maintain a heap H that contains the smallest elements of all heaps H^j. It is clear that the smallest element stored in H is the minimum distance in the overall set S. To delete a point p, we search in the tree with its x-coordinate. For each node w encountered, we update all relevant information. The important observation is that the values d(Sw) and 8u) can only increase. Therefore, a point of S^ will be inserted into the tree Tuj at most once. If such a point is inserted into T^, it causes a constant number of updates in the heaps Hyu and H. Supowit shows that the data structure maintains the closest pair in 0(log '^n) amortized time per deletion. Clearly, the structure uses 0(n log n) space. This result can be generalized to any dimension D, in much the same way as the algorithm of Section 2.2.2 generalizes. The result is a data structure of size 0{n log ^~^n) that maintains the closest pair in 0(log ^n) amortized time per deletion.
4.2. A fully dynamic data structure with sublinear update time Since a planar Voronoi diagram can be maintained in 0(n) time per insertion and deletion (see Overmars [97,98] and Aggarwal et al. [4]), we can also maintain the closest pair in a planar point set in 0(«) time per update. The first fully dynamic data structure that maintains the closest pair in sublinear time was given by Smid [119]. It is based on the following idea. Instead of maintaining only the minimum distance, we start with the sorted list Loin smallest distances. If a point p is deleted then all distances in L in which p "occurs" have to be deleted. It can easily be shown that there are at most O ( v ^ ) such distances. Hence, during G{^/n) deletions the list L will be non-empty, and it will contain the minimum distance of the current set. Once L gets empty, we compute a new list and continue as above. The initial list L can be computed in 0(n log n) time. The distances that have to be deleted from L because of a deletion can be found using a space efficient variant of the range tree. (See Smid [120].) Using the same range tree, insertions of points can also be supported easily. The resulting data structure maintains the closest pair in 0 ( v ^ l o g n) amortized time per insertion and deletion, and it uses 0(n) space. Using standard techniques, the update time can be made worst-case.
4.3. A solution with polylogarithmic update time The first fully dynamic closest pair data structure having polylogarithmic update time is due to Smid [122]. We describe it in detail here, because the same technique can be used for solving other problems, such as dynamic /:-point clustering problems and constructing spanners. At this moment, it is not clear if other dynamic closest pair data structures can be used for solving these other problems. The description of the data structure given below follows Arya and Smid [15]; it is simpler than that in [122]. For simplicity, we assume in this section that D = 2. The data structure is based on the range tree, see Lueker [90] and Willard and Lueker [128]. Let 5 be a set of n points in the plane. Our data structure has the form of a 3-layered range tree. There is a balanced binary search tree — called the layer-l tree — storing the
Closest-point problems in computational geometry
905
points of S in its leaves, sorted by their x-coordinates. Let v be any node of this tree and let Sv be the subset of S that is stored in the subtree of v. Then v contains a pointer to the root of a balanced binary search tree — called a layer-2 tree — storing the points of S^ in its leaves, sorted by their y-coordinates. Before we can define the third layer of the data structure, we need to introduce some notation. Let u be any node of a layer-2 tree. Let r be the root of this layer-2 tree. Then the node of the layer-1 tree that contains a pointer to r will be denoted by u'. Moreover, let Xu be a real number that is between the maximum x-coordinate in the left subtree of u' and the minimum jc-coordinate in the right subtree of u'. Similarly, let yu be a real number that is between the maximum y-coordinate in the left subtree of u and the minimum y-coordinate in the right subtree of w. We denote the point with coordinates {xu ,yu)by Ou. Now we can define the third layer of the data structure. Let u be any node of any layer-2 tree, and consider the corresponding point Ou. Let Su be the set of points that is stored in the subtree of u. Moreover, for 1 ^ / ^ 4, let Sui be the subset of Su that is contained in the /-th quadrant w.r.t. the point Ou. Finally, for 1 < / < 4, let S'^- be the subset of Sui consisting of the five points that are closest to Ou, measured in the Loo-metric. Then node u contains pointers to (1) four balanced binary search trees. For 1 ^ / ^ 4, the /-th tree contains the points of Sui in its leaves, sorted by their LQO-distances to the point Ou, (2) a variable r]^{u) having value
773(M)=^
U^\/ =l
/
(3) and, in case, ri^{u) < CXD, a pair of points of |J- 5^- that realizes ri^{u). We are almost done with the description of the data structure. We saw that for each layer-3 structure there is a corresponding 773-value. Let 1 < / ^ 2 and let v be any node of a layer-/ tree. If i; is a leaf then v stores a variable r]i{v) having value 00. If i; is not a leaf, then let vi and Vr be the left and right child of u, respectively. Also, let rji^\ {v) be the variable that is stored with the layer-(/ -hi) structure that corresponds to v. Then node v stores a variable rn (v) having value r]i{v) =mm[r]i{vi),r]i{vr),r]i+\i'^))^
(2)
and, in case r]i (u) < 00, a pair of points that realizes rji (f). This concludes the description of the data structure. LEMMA
4. L Let rj be the value that is stored with the root of the layer-l tree. Then rj =
d(sy PROOF. First note that all r]i (•)-variables have value either 00 or d(A) for some subset A of 5. Therefore, J(5)^?7. The entire data structure contains many layer-3 structures as substructures. If we can show that the 773-variable of one of these layer-3 structures has value d(S), then it follows that rj ^d(S) and, hence, rj =d(S).
906
M Smid
We show that such a layer-3 structure exists. Consider the closest pair P, Q of S. Let ui be the highest node in the layer-1 tree such that P and Q are contained in different subtrees of Ml. Similarly, let M2 be the highest node in the layer-2 tree that is pointed to by wi such that P and Q are contained in different subtrees of M2. Node M2 contains a pointer to a layer-3 structure DS. We claim that the variable ^3 that is stored with DS has value d(S). This will complete the proof of the lemma. Consider the point o^^ • We assume w.l.o.g. that this point is the origin of our coordinate system. For 1 ^ / ^ 4, let Su2i be the set of points stored in DS that are contained in the i-ih quadrant. Note that P and Q are both contained in |J- 5^2/. For 1 ^ / ^ 4, consider the subset 5^ • of Su2i • Note that 773 = t/(lj- S^ •). If we can show that P and Q are both contained in |J- 5^ ., then we must have rj^ =d(S). Assume this is not the case. Moreover, assume w.l.o.g. that P does not belong to IJ • 5^ •, and that P lies in the first quadrant, i.e., all coordinates of P are positive. Note that 5^ j contains five points. Let 8 be the maximum Loo-distance between any point of 5^ J and the origin. Then, 5^ j is contained in the box [0 : 8]^. Partition it into four subboxes, each with sides of length 8/2. One of these subboxes contains at least two points of S. Hence, d(S) ^8. Consider again point P. This point has Loo-distance at least 8 to the origin. Let £ G {1, 2} be an index such that Pi, i.e., the €-th coordinate of P, is at least equal to 8. Our choice of the nodes u\ and U2 implies that the £-th coordinate of Q is negative. Hence, the distance between P and Q is greater than 5, which implies that 8 < d(S). This is a contradiction. Hence, we have shown that P and Q are both contained in IJy 5^ •. This completes the proof. D Hence, this data structure stores the minimum distance of our point set S. To insert or delete a point /?, we search for the jc-coordinate of p in the layer-1 tree. For each node on the search path, we search for the >'-coordinate of p in the corresponding layer-2 tree. For each node encountered, we update the corresponding layer-3 structure. Afterwards, we walk back along all these paths, and update the values ^, (•) according to (2). To guarantee that the data structure remains balanced, we take the binary trees from the class of BB[a]trees, and use rotations. (See Mehlhom [93, page 198].) In this way, the amortized update time of the entire data structure is bounded by 0(log ^n). It is easy to show that the structure uses 0(n log ^n) space. It turns out that the orderings used in the layer-3 structures are similar enough so that dynamic fractional cascading [95] can be applied. In this way, the amortized update time is reduced to 0(log ^n log log n). For details, the reader is referred to [122]. Using standard techniques, this result can be generalized to any fixed dimension D. The result is a data structure of size 0(n log ^n) that maintains the closest pair in 0(log ^n log log n) amortized time per insertion and deletion. In Datta et al. [51], it is shown how the data structure presented in this section can be extended to the dynamic /:-point clustering problem, in which we maintain the optimal /:-point subset under insertions and deletions of points. (See also Section 2.5.4 and Schwarz [108].) Finally, Arya and Smid [15] use the data structure for constructing spanners. (See Section 6.1.2.)
Closest-point problems in computational geometry
907
4.4. A randomized data structure with poly logarithmic update time using linear space The data structure of the previous section has polylogarithmic update time, but it uses more than Hnear space. Therefore, after [122] appeared, the goal was to obtain polylogarithmic update time using only 0{n) space. This goal was achieved by Golin et al. [72], in the randomized sense. Basically, they extend the static closest pair algorithm of KhuUer and Matias given in Section 2.4.2. As in the algorithm of Khuller and Matias, the data structure is built by making a sequence of iterations. In order to make the algorithm dynamic, however, we maintain information that is computed during this sequence. The data structure is defined by the following randomized procedure. Let S\ \= S and / := 1. During the /-th iteration, we pick a random point pt e Si — called the pivot — and compute its nearest neighbor qi in St. Let di be the distance between /?/ and qi. Using perfect hashing, we store the points of St in a J//(4Z))-grid. Then, we determine the set S^consisting of all points of Si that do not contain any other points of Si in their neighborhoods. Again using perfect hashing, we store the set S- in a di/(4D)-gnd. For each point p ^ S-, we compute the value
df(p):=mm(di,d(p,
\J
S'A
We store all these values in a heap Hi. If Si = 5-, then the algorithm stops. Otherwise, we set Si-\-\ := Si \ S- and i :=i -\-l, and proceed with the next iteration. The results of Section 2.4.2 imply that J/+i < di/2. Let I be the number of iterations made by the algorithm. Then di/(4D) ^ d(S) ^ di. Finally, the entire algorithm takes linear expected time. It is not difficult to see that the minimum distance in the overall set S is equal to the smallest element contained in any of the heaps ///, 1 ^ / < £. However, we can say more. First, we have d^ip) = min {di,d(p, Sl_^ U ^;_^^i U ... U S^). Hence, to compute such a value df{p), it suffices to perform a constant number of search operations in only D -\-l grids (rather than in / grids). Therefore, this value can be computed in constant time. Second, the minimum distance in S is equal to the smallest element contained in any of the heaps HI-D. HI-D+I, -^Hi. What happens if we insert a new point q into SI Our goal is to update the data structure in such a way that at the end it "looks like" it has been built by the above procedure. That is, the updated data structure should have the same statistical properties as a data structure for SU{q} that has been built from scratch using the above procedure. Here is a brief and intuitive description of the insertion algorithm. By assumption, pi — the pivot of 5i — is a random element of ^i = 5. To generate a pivot for ^i U {^}, it suffices to retain pi as pivot with probability |5i|/(|5i| + 1) and to choose q instead
908
M. Smid
with probability l/(|5i | + 1). If ^ is chosen, then we discard everything and build a completely new data structure using the above procedure. In this case, the insertion algorithm terminates. Note that this happens, however, only with probability l/(|5i | 4-1) and so the expected cost is 0(1). Assume now that p\ remains unchanged as the pivot. We now check ifqi — the nearest neighbor of pi — and, hence, d\ have to be changed. It is known that q can be the nearest neighbor of at most 3 ^ points in S\. (See [52].) This means that d\ changes only if pi is one of these points. Since p\ was chosen uniformly from S\, it follows that the probability of d\ changing is at most 3^/|5i |. If d\ changes, we use the above algorithm to build a completely new data structure and terminate the procedure. The expected cost of this is 0(1). We are left with the case where p\, q\ and d\ remain unchanged. Let us denote SU{q} by 5. We need to determine the set ^2 containing the points in 5i = 5 that contain some other points in their neighborhood. If q does not contain points of S\ in its neighborhood, then it will go into S[, and nothing further needs to be done. In this case, we can terminate the procedure. Otherwise, ^2 contains q and possibly some points from S[. The set of points which are deleted from S[ due to the insertion of q is called D\. Now we need to insert q and D\ into 52, which gives rise to a set D2, such that D2 U {^} is inserted into ^3, etc. Hence, during the insertion algorithm, certain points move down some levels in the data structure. It can be shown that the total number of points that move is bounded by a constant. In particular, the total number of query and update operations in the grids is bounded by 0(log n), and the total number of update operations in the heaps is bounded by a constant. Hence, if we implement the grids using dynamic perfect hashing [56], the entire insertion algorithm takes 0(log n) expected time. The deletion algorithm is basically the reverse of the insertion algorithm. In particular, the points that move to lower levels during an insertion of q move back to their previous locations when q is deleted directly afterwards. For details, we refer the reader to [72,108]. There it is shown that the expected time for a deletion is also bounded by 0(log n), if we use dynamic perfect hashing. The result is a randomized data structure that stores a set 5 of n points in R^ such that the minimum distance d(S) can be found in 0(1) time. The expected size of this structure is 0(n), and we can maintain it under insertions and deletions in 0(log n) expected time per update. The algorithms as presented here assume that the floor function is available at unit cost. Also, because we use dynamic perfect hashing, it is assumed that all points come from a bounded region in M^. Note that in this result randomization is only w.r.t. the coin flips that are made during the algorithms. In particular, no assumption is made about the points that are inserted and deleted (except that they come from a bounded region); these can be arbitrary. We can use degraded grids to remove the floor function from the machine model. In this way, searching and updating a grid takes 0(log n) time. As a result, we get a randomized data structure having 0(n) expected size that maintains the closest pair in 0(log ^n) expected time per insertion and deletion. (The details of this modified data structure are tedious, see [72,108].) This data structure can be implemented in the randomized algebraic
Closest-point problems in computational geometry
909
computation tree model. We finally remark that for the data structures presented in this section high probability bounds can be proved. (See [72,108].)
4.5. A deterministic solution with poly logarithmic update time using linear space The first deterministic data structure that maintains the closest pair in polylogarithmic time using only linear space is due to Kapoor and Smid [82]. They first give a deterministic data structure for maintaining the closest pair that improves the result of Section 4.3. Then they present a "space saving transformation", which transforms any dynamic closest pair data structure of super-linear size into another one that uses less space. Applying this transformation several times leads to a dynamic closest pair data structure using only linear space. To describe the first result in [82], we need to introduce some notation. Let 5 be a set of n points in M^. For any point p € E ^ , box(p) denotes the smallest axes-parallel cube centered at p that contains at least (2D -f- 2)^ points of 5 \ {p}. In other words, the side length of box(p) is twice the LQO-distance between p and its (1 + (2Z) -h 2)^)-th (resp. (2D + 2)^-th) Loo-neighbor, if p e S (resp. p ^ S). Also, for any point p e M^, N(p) denotes the set of points of S\ {p} that are contained in the interior of box(p). The data structure is based on the following lemma, whose proof is straightforward. LEMMA
4.2. The set {(p,q): p e S,q e N(p)} contains a closest pair of S.
This lemma implies that it suffices to maintain the distances d(p,q), p e S, q e N(p), in a heap. The smallest element contained in this heap is the minimum distance in S. Note that the heap stores only a linear number of elements. In order to maintain the heap — if points are inserted and deleted in S — we also have to maintain the set {box(p) : p e S}. Let us see what has to be done when we insert a new point p into S. We must be able to compute box(p), and the corresponding set N(p). These can be found by computing the (2D -f 2)^ Loo-neighbors of p. In Section 5.1.2, we will see that the standard range tree can be used for this. We also have to find all boxes box(q) that contain p. (There are at most a constant number of such boxes.) Each such box has to be replaced by a smaller box — one that contains (2D -h 2)^ points of the new point set. To support these operations, we can use the standard segment tree (see [100]) or a dynamic variant of the skewer tree (see [61, 124]), extended to support dynamic fractional cascading [95]. The efficiency of the query algorithms in these data structures depends on the following fact: The set {box(q): q e S] is of constant overlap, in the sense that each box contains the centers of at most (2D -\-2)^ boxes in its interior. These centers are precisely the points of N(q)U {q}. Using the same data structures, we can efficiently update the heap when we delete a point from the set S. Assume first that we use a segment tree to store the elements of the set {box(q) :q e S}. During the insertion or deletion of a point in S, we perform at most a constant number of query and update operations in the range tree, the segment tree and the heap. Therefore, the amortized update time of the entire data structure is bounded by 0(log ^~^n log log n). Moreover, the size of the data structure is bounded by 0(n log ^~^n). (See [82].) To reduce the space complexity, some additional techniques are needed. We first remark that in the solution just sketched both the range tree and the segment tree use 0(nlog^~^ n)
910
M Smid
space. We need the range tree for computing the boxes box(p). Unfortunately, no linear space solution for the latter problem having polylogarithmic query and update times is known. Hence, in order to reduce the space complexity, we should avoid using the range tree. We can replace the segment tree by a skewer tree — which uses only linear space. Then, however, the update time increases slightly. In [82], a transformation is presented that, given any dynamic closest pair data structure DS having more than linear size, produces another dynamic closest pair structure that uses less space. The transformed data structure is composed on two sets A and B that partition the current point set S. The boxes box(p) of the points in A remain fixed during a sequence of updates — hence we do not need the range tree for this set — whereas the set B is stored in the dynamic data structure DS. To reduce space, 5 is a subset of the entire set and contains points involved ino(n) updates only. In order to guarantee a good amortized behavior, the entire data structure is periodically rebuilt. The result is as follows. Let DS be any data structure for the dynamic closest pair problem. Let S(n) and U(n) denote the size and (amortized or worst-case) update time of DS, respectively. Let I ^ f(n) ^ n/2 he any non-decreasing integer function. Assume that S(n), U{n) and f{n) are smooth. (A function g is called smooth if g{G{n)) = @(g(n)).) The transformation produces a data structure for the dynamic closest pair problem having (1) size 0(n + 5(/(n))), and (2) an amortized update time of 0(log ^~^ n -\- U(f (n)) -\- (nlog n)/f (n)). Applying this transformation twice to the above closest pair data structure, taking f(n) = n/(\og ^~^n log log n) and f(n) = n log log n/ log n, respectively, we get a data structure of size 0(/i) that maintains the closest pair in 0(log ^~^n\og log n) amortized time per insertion and deletion, for D ^ 3. For Z) = 2, we can apply the transformation k times for any constant k, with appropriate choices for the function / . This gives data structures of sizes 0(n) and 0(nlog n/(log log n)^), having amortized update times of 0(log ^n/(log log «)^) and 0(log n log log n), respectively.
4.6. A dynamic solution based on simplicial cones This section describes a solution to the dynamic closest pair problem that is due to Bespamyatnikh [27]. The main idea is to reduce the entire problem to certain range searching problems, and then use standard data structures to solve the latter. (This technique appeared for the first time in Gabow, Bentley and Tarjan [69]. They use it for solving the post-office problem for "simple" metrics. See Section 5.1.1.) For simplicity, we only consider the planar case. So, S denotes a set of n points in the plane. Let A: be a sufficiently large integer constant, and let 0 = 2n/k. Rotate the positive X-axis over angles / • 0, 0 ^ / < k. This gives k rays. Let Cj, C 2 , . . . , Q be the cones that are bounded by any two successive rays. Also, for 1 ^ / ^ ^, let // be a fixed ray that emanates from the origin and that is contained in C,. For each 1 < / ^ /:, we define an approximate distance function Si, as follows. Let p and q be two points in the plane. If q — p is not contained in the cone C/, then 8i(p,q) :=oo. Otherwise, if q — p e Ct, then 8i(p, q) is defined as the L^:-distance between the origin
Closest-point problems in computational geometry
911
and the orthogonal projection ofq — p onto the ray //. (Note that in general, 8i(p,q)
^
Si(q,p).)
These distance functions have the following property. Let p, q and r be three points such that q — p and r — /? are both contained in the cone d. Also, assume that 8i(p,r) < 8i{p, q). Then d{r,q)
:r
eS\{p}},
and 8i(q, p) = min {8i(q, r):r eS\
{q}},
and let E := IJ- £"/. Then £" is a set of size 0(n) that, by the property just mentioned, contains the closest pair. Hence, in order to maintain the closest pair, it suffices to maintain the pairs of £" in a heap, where the ordering is by their L^-distances. Let p be any point in the plane, let 1 ^ / ^ A:, and let C- be the cone Q translated such that its apex is at p. A point q e S \ {p} such that 8i(p, q) is minimal can be computed by selecting among all points that are between the two bounding rays of C[ a point that is furthest to the "left", where we consider the ray // as being "horizontal". Hence, we can use range searching techniques to compute such a point q. Unfortunately, it seems to be difficult to maintain the set E efficiently. However, Bespamyatnikh shows that a subset of E that still contains the closest pair can be maintained such that during each insertion and deletion at most a constant number of query and update operations on the range searching data structure have to be performed. This technique can be generalized to any fixed dimension D by using simplicial cones of angular diameter 0. Each such cone is bounded by D hyperplanes and, hence, again range searching methods can be applied. Moreover, a constant — depending on the dimension D — number of such cones suffice. For an explicit construction of these cones, see Bespamyatnikh [27] or Yao [129]. If we use the standard range tree, then we get a dynamic closest pair data structure of size 0(n log ^~^n) with an update time of 0(log ^n). On the other hand, if we use a data structure due to Chazelle [38], then we get a data structure of size 0(nlog ^~^n) that maintains the closest pair in 0(log ^+^ log log n) time per insertion and deletion.
4.7. A dynamic solution based on the well-separated pair decomposition We saw already in Sections 2.5.2 and 2.5.3 that the well-separated pair decomposition (WSPD) can be used to solve several proximity problems. In order to apply it to dynamic problems, we clearly need efficient ways to update the WSPD. Callahan and Kosaraju [34, 31] show how to maintain the fair split tree of Section 2.5.2 in logarithmic time per insertion and deletion, using linear space. The main idea is very similar to one developed by Bespamyatnikh [28,29], and that will be described in the next section. Therefore, we only give the latter solution.
912
M. Smid
One of the main problems in maintaining information such as the closest pair is the fact that there may be points that are contained in many pairs. Callahan and Kosaraju show how to get around this problem by introducing dummy points. They also present an abstract framework that describes the main properties of algorithms that use the WSPD, and show how to maintain computations in this framework. They show that the problem of maintaining the closest pair fits into this framework. As a result, they get a dynamic closest pair data structure of linear size and 0(log ^«) update time.
4.8. An optimal dynamic closest pair data structure The problem of designing an optimal dynamic closest pair data structure was solved in 1995 by Bespamyatnikh [28,29]: He shows how to maintain the closest pair in 0(log n) worst-case time, using a data structure of size 0(n). The algorithm belongs to the algebraic computation tree model and is, therefore, optimal. An important ingredient used is a hierarchical subdivision of M^ into axes-parallel rectangles. Before we can define this subdivision, we need some definitions. Let B be an axes-parallel rectangle, and for 1 ^ / < D, let si be the side length of B along the /-th dimension. We call B a c-box if 1/3 ^ si/sj ^ 3 for all 1 ^ /, j ^ D. Let B = [a\,b\^ x • • • x [ao,bo] be a rectangle, let 1 ^ / ^ D, and let c/ G {{lat -\bi)/3, {at + 2Z?/)/3]. The two boxes that are obtained from B by replacing the /-th interval by [at, c/] and [c/, Z?/], respectively, are said to be obtained from B by a c-cut. Let A and B be two axes-parallel rectangles. We say that A is an s-subbox of B if they are equal or there exists a sequence BQ, B\, B[,..., Bi, B^, for some / ^ 1, such that B = Bo, A = Bi, and for 1 ^ / ^ /, the boxes Bi and B'. are obtained from Bi-\ by a c-cut. The hierarchical subdivision is represented by a binary tree T. With each node v inT, we store two boxes B(v) and SB(v). During the algorithms, the following conditions are satisfied. (1) For any node v of 7, B{v) and SB(v) are c-boxes. (2) For any node v of 7, SB(v) is an s-subbox of B(v). (3) For any node v of T, SB(v) and B(v) contain the same points of S. (4) If w is any internal node of T, and u and v are the two children of w, then the boxes B(u) and B(v) are obtained from SB(w) by a c-cut. (5) For any leaf v of T, B(v) = SB(v) and these boxes contain exactly one point of S. If i; is a leaf of T and p is the point of S that is contained in B(v), then B(p) will denote thebox^Cu). Let us see how we can maintain the tree T if we insert and delete points in S, Assume we want to delete the point p. Then, by walking down 7, we find the leaf u such that p e B{u). Let w be the parent of M, and let v be the other child of w. If u is a leaf, then we set SB(w) := B(w) and delete the leaves u and v. Otherwise, if v is not a leaf, then we delete the leaf w, set B(v) := B(w), and delete node w by making v a child of w's parent. Insertions are more difficult to describe. Assume we want to insert a point p into S. Then we walk down T and stop if one of the following three cases occurs: (i) p is not contained in B(r) where r is the root of T, (ii) we reach a leaf w and p is contained in B(w), or (iii) we reach an internal node w and p is contained in B{w) but not in SB(w).
Closest-point problems in computational geometry
913
We explain how the third case can be handled. (The other cases are easier.) Our goal is to find a c-box A together with two boxes A\ and A 2 obtained from A by a c-cut, such that (i) A is an s-subbox of B{w), (ii) SB(w) is an s-subbox of Ai, and (iii) p is contained in A2. Given this box A, we update the tree T as follows: Let w^ and w^^ be the two children of w. We give w two new children called u and v, and set SB(u) := SB(w), B(u) := A\, SB(w) := A, B(v) := SB(v) := A^. Finally, u gets w' and w" as its two children. It is easy to see that in this way the tree T is correctly maintained. So it remains to describe how the box A is computed. This is done by performing at most ID iterations. Initially, we set A := B{w). We maintain the invariant that (i) A is a c-box and an s-subbox of B(w), (ii) SB(w) is an s-subbox of A and (iii) p is contained in A. We describe one iteration. Let / be an index such that the side of A along the /-th dimension is maximal. Let [at, hi] (resp. [J/, ei]) be the interval of SB(w) (resp. A) along the /-th dimension. If ai (resp. bi) is contained in the interval [(2J/ -h ^/)/3, (dt + 2^/)/3], then we set xt := at (resp. Xi := bt). Otherwise, the definition of c-cut implies that the interval [at, bi] does not intersect the interval [(2di -h ^/)/3, (di -\- 2^/)/3]. Assume w.l.o.g. that [ai, /?/] is contained in [di, (Idi + e/)/3]. In this case, we set xi := max((2J/ + ^/)/3, 2bi — di). Now we partition the box A along the f-th dimension using the value Xi. If one of the two resulting boxes contains both SB(w) and /?, then we take this box as the new A and proceed with the next iteration. Otherwise, SB(w) and p are contained in two different subboxes of A. In this case, we have found the box A we were looking for, and the iteration can terminate. This completes the description of the hierarchical subdivision and the way it is updated. The time needed to insert or delete a point into T is bounded by a constant plus the time for walking down T in order to find the node in which the local changes have to be made. How do we use this tree T for maintaining the closest pair? A pair (p,q) of points in S is called a neighbor pair if p is the nearest neighbor of ^, and q is the nearest neighbor of p. We will maintain a set E consisting of 0(n) pairs of points that contains all neighbor pairs. Clearly, E then contains the closest pair. Hence, if we store all distances between the pairs of E in a heap, then the smallest element in this heap is equal to the minimum distance in S. We denote the diameter of a box B, i.e., the maximum distance between any two points of 5 n R^, by dmm(B). Also, the minimum (resp. maximum) distance between a point p and any point of 5 fl R^ is denoted by d"^ (p, B) (resp. d^{p, B)). During the algorithm, the following invariant will hold: For any p,q e S, p ^q, such that the pair (p, ^) is not contained in E, there is a node v in the tree T, such that (1) B{p)f\B{v)=^, (2) diam(5(i;)) ^ 2 • diam(5(/?)), (3) J ^ ( p , B{v)) < 3 . diam(5(i;)), (4) d^(p,B(v))
914
M. Smid
LEMMA 4.3. Let E be a set of edges for which the invariant holds. Let p be a point of S, and assume that Ep contains more than {27 D + 1)^ elements. Then there is a point q e Ep such that the invariant also holds for the set E \{(p,q)}. Hence, there is a set E that satisfies the invariant such that each point occurs in at most a constant number of pairs of E. This set E clearly has linear size. Of course, the problem is how to maintain such a set. Assume we want to delete a point p from S. First, we delete all distances d(p,q), q e Ep, from the heap, and delete the set Ep itself. Then, we update the tree T as described above. Note that we delete two nodes from T. Consider the deletion of a node v. In order to restore the invariant, assume that before the deletion of p, the pair (a, b) was not contained in E, because of the existence of node v. That is, we have diam(5(a)) ^ diam(5(i;))/2 and d^{a, B(v)) ^ 3 • dmm(B(v)). It follows from a simple packing argument that the number of such points a is bounded by a constant. We denote this set by A(v), i.e., Aiv) :={aeS:
diam(5(fl)) > diam(B(i;))/2 and J ^ ( a , B(v)) ^3diam(5(i;))}.
Using the tree 7, this set can be computed by searching in the neighborhood of the box B(v). Then for each point a in A(v), we again use T and search in the neighborhood of a to compute its set £^, and insert the corresponding distances into the heap. The algorithm for inserting a point p is similar. Now, we have to compute the set Ep and insert the new distances into the heap. At this moment, the invariant holds, but there may be points that occur more than (27D + 1)^ times in E. These points must be in the neighborhood of p and, therefore, have been found already. For these points, we remove the corresponding pairs from E and the heap. To implement the algorithm efficiently, we use dynamic trees to represent the tree T, in a similar way as in Section 3.3. For details, we refer the reader to [28,29]. There, it is shown that the entire algorithm for inserting or deleting a point takes 0(log n) time in the worst case. Moreover, the entire data structure uses linear space.
5. The post-office problem We now turn to Problem 1.2, the post-office problem. Let 5 be a set of n points in R^. We can solve the post-office problem as follows. Construct the Voronoi diagram of S. Then, given any query point p e M^, its nearest neighbor is found by locating the Voronoi region that contains p. The point of S associated with this region is p's nearest neighbor. In order to implement this solution efficiently, we need fast algorithms for (i) constructing the Voronoi diagram, and (ii) solving point location queries. In the planar case, the Voronoi diagram can be constructed in 0(n log n) time. Also, a data structure can be constructed in 0(nlog n) time such that point location queries can be solved in logarithmic time. The entire data structure uses linear space. This gives an optimal solution for the planar post-office problem. In higher dimensions, the situation is more complicated, because the Voronoi diagram of n points in R^ can have size 0(n^^^^^).
Closest-point problems in computational geometry
915
For more details about the D-dimensional post-office problem, we refer the reader to the chapter on Voronoi diagrams in this handbook. We just mention here that the best results currently known either use a large amount of space, or their query time is almost linear. More precisely, Clarkson [43] gives a randomized data structure that finds a nearest neighbor of a query point in 0(log n) expected time. This structure has size 0(n^^/^^^'^), where 5 is an arbitrarily small positive constant. In [11], Arya and Mount solve the problem with an expected query time of OC/i^"^/^^^"^^^/^^ log ^^^^/i) using 0{n log log n) space. It seems that in dimension D > 2 it is impossible to obtain a solution for the post-office problem having polylogarithmic query time while using 0(nlog ^^^^n) space. Moreover, even in the planar case there is no dynamic data structure known that has polylogarithmic query and update times and that uses 0{n log ^^^^n) space. In view of these negative results, it is natural to study weaker versions of the post-office problem. Two such weaker versions have been considered in the literature. In the first version, distances are measured in the "simple" Li- or L^o-metric instead of the "complicated" Lt-metric. In the second version, it suffices to find an approximate nearest neighbor of the query point rather than the exact nearest neighbor. In the next sections, we consider both versions of the post-office problem in detail.
5.1. The post-office problem for simple metrics 5.1.1. A solution based on the quadrant approach. In this section, we first consider the post-office problem for the Li-metric. The basic approach is to reduce the problem to that of "range searching for minimum". This approach was used for the first time by Gabow, Bentley and Tarjan [69]. Later, it was used again by Bespamyatnikh [27]. In fact, we used this approach already in Section 4.6. Let us describe the planar case first. Let p = (pi, p2) be any query point. Consider the four quadrants defined by this point. Clearly, if we have the Li-neighbor of p in each of these quadrants, then we can compute the overall Li-neighbor of p in constant time. The Li-neighbor in, say, the north-east quadrant of p is determined as follows: Among all points that are above the line y = P2 and to the right of the line jc = pi, it is that point q = iq\,q2) for which qi -\- q2 is minimal. It follows that we can apply standard range searching techniques to solve the problem. The Z)-dimensional version of the Li-post-office problem is solved by using 2^ data structures. For 1 < / ^ 2^, the /-th data structure is used to find the Li-neighbor of the query point p that is contained in its /-th quadrant. Gabow, Bentley and Tarjan [69] give a static data structure for this problem that uses 0 ( ^ log ^~^n) space and has a query time of 0(log ^~^n). Alternatively, we can use the standard range tree to get a dynamic solution. This data structure also uses 0{n log ^"^n) space. Its query and update times are bounded by 0(log ^n). (Chan and Snoeyink [36] also obtain the latter bounds, using a variation of the technique of [27,69].) Finally, using Chazelle's data structure [38], we get a data structure of size 0{n log ^~^n) that has query and update times of 0(log ^"^^ log log n). The same approach works for the Loo-metric. This is clear for D = 2, because this metric is obtained from the Li-metric by rotation and scaling. For the D-dimensional case, Gabow, Bentley and Tarjan reduce the problem to 2^ • D! subproblems of range searching
916
M. Smid
for minima. Bespamyatnikh [27] reduced this number to 2 • D!. Hence, for this metric, the same complexity can be obtained as for the Li -metric. 5.1.2. A solution for the Loo-metric that uses range trees. In this section, we show that the standard range tree [90,128] can be used for solving the Loo-post-office problem. The query algorithm is due to Kapoor and Smid [82]. Finding the Loo-neighbor of a query point p can be visualized by growing an axes-parallel cube centered at p until its boundary hits at a point of 5. As we will see, this growing process can be simulated by the range tree. We describe the query algorithm for the planar case. Let 5 be a set of n points in the plane. First, we recall the range tree. This data structure consists of a main tree, which is a balanced binary search tree storing the points of S in its leaves, sorted by their xcoordinates. If f is a node of this main tree, then Sv denotes the subset of S that is stored in the subtree of v. Every node v of the main tree contains a pointer to the root of a balanced binary search tree — called a secondary tree — storing the points of Sy in its leaves, sorted by their y-coordinates. Let p = (p\, p2) be any query point. We give an algorithm for computing the Looneighbor of p among all points that are to the right of p. We call this neighbor the rightneighbor of p. In a symmetric way, the Loo-neighbor to the left of p can be computed. Clearly, given these two neighbors, we can determine the overall Loo-neighbor of p in constant time. In the first stage, we decompose the set of all points of S that are to the right of p into 0(log n) pairwise disjoint subsets: Initialize M := 0. Starting in the root of the main tree, search for the leftmost leaf storing a point whose x-coordinate is at least equal to pi. During this search, each time we move from a node v to its left child, add the right child of V to the set M. Let v be the leaf in which this search ends. If the point stored in this leaf has a first coordinate that is at least equal to pi, then add v to the set M. Number the nodes of the final set M as ui, i;2,..., i^m, such that vi is closer to the root than i;/_ i, 2 ^ / < m. It is easy to see that {r e S : r\ ^ p\] = | J ^ j Sy.. Hence, at this moment, we know that one of the sets Sy^ contains the right-neighbor of p. In the second stage of the algorithm, we make a sequence of at most m iterations. To start this sequence, we initialize C := 0, / := 1, and stop '.—false. Then, as long as / < m and stop = false, we do the following. Search with p2 in the secondary tree of i;/, and find the point, call it a, whose ycoordinate is nearest to that of p. Then, find the point r that is stored in the rightmost leaf in the main subtree of vi. Let 8 \=r\— p\ and let R be the rectangle [/?i, ri ] x [p2 — 5, /?2+<5]. If a is not contained in R, then insert this point into the set C, and increase / by one. Otherwise, if tj G /?, set u := f/ and stop := true. This concludes the description of the second stage. First assume that the variable stop has value false after this stage has been completed. Then the set C contains the rightneighbor of p. Hence, in this case we can complete the query algorithm by going through the set C and taking the point having minimum Loo-distance to p. What happens if the variable stop has value true after the second stage? In this case, the right-neighbor of p is either contained in C or in Sy, and we proceed with the third — and last — stage of the algorithm.
Closest-point problems in computational geometry
917
During the third stage, we again make a sequence of iterations. We maintain the invariant that the set C U 5^ contains the right-neighbor of p. As long as v is not a leaf, we do the following. Let w be left child of v. Search with p2 in the secondary tree of w, and find the point, call it a, whose _y-coordinate is nearest to that of p. Also find the point r that is stored in the rightmost leaf in the main subtree of w. Let 8 := r\ — p\ and let R be the rectangle First assume that a is not contained m R.lf the right-neighbor of p is contained in the subtree of w, then it must be equal to a. Therefore, we insert a into the set C, set f := right child of V, and proceed with the next iteration. Now assume that a is contained in /?. In this case, the right-neighbor of p is not contained in the subtree of the right child of v. Therefore, we set i; := w; and proceed with the next iteration. After the last iteration, u is a leaf. Moreover, we know that the right-neighbor of p is either contained in C or stored in v. Hence, we find this right-neighbor by going through the set C U 5*1; and taking the point having minimum Loo-distance to p. This concludes the description of the algorithm for finding the right-neighbor of /?. For a correctness proof, the reader is referred to [82]. It is easy to see that each of the stages can be implemented in 0(log ^n) time. Using fractional cascading [39], this can be improved to 0(log n). The range tree can be maintained dynamically in 0(log n log log n) amortized time per insertion and deletion. Then, since we need dynamic fractional cascading [95], the query time also becomes 0(log n log log n). The generalization to the D-dimensional Loo-post-office problem is straightforward. We get a dynamic data structure of size 0(nlog ^~^n) having 0(log ^"^Tilog log n) query time and 0(log ^~^n log log n) amortized update time. (See [82] for details.) 5.2. The approximate post-office problem Let 5 be a set of n points in M^, and let e be any positive constant. For any point p e M^, we denote by ;?* the point of S that is closest to p. A point q e S is called a (1 + ^)approximate neighbor of p, if d(p,q) ^ (l-h £)d(p, p""). In this section, we give several data structures for solving this approximate post-office problem. As we will see, for this problem, there are solutions with polylogarithmic query and update times that use 0(nlog ^^^^w) space. Recall that these bounds seem to be impossible for the exact post-office problem; see the discussion in the beginning of Section 5. 5.2.1. A data structure based on quad trees. The first result for the approximate postoffice problem is due to Bern [25]. By scaling, we may assume w.l.o.g. that the set S is contained in the cube [3/8, 7/8]^. We build a quad tree for the set S. (See Finkel and Bentley [64].) Each node v of this tree stores an axes-parallel cube, such that all points in the subtree of v are contained in this cube. The root of the quad tree contains the cube [0, 1]^. Consider any node u, and let Cv be its cube. We split Cy into 2^ equal sized subcubes, and give v 2^ children, one for each subcube. A node f is a leaf if Cy contains at most one point of S. With such a leaf, we store the point ofS — if it exists — that is contained in Cy.
918
M. Smid
In order to save space, we remove all nodes whose cubes do not contain any points of S. We also remove all nodes that have only one child, by attaching the child directly to its grandparent. Clearly, this results in a tree having linear size. We use this data structure in the following way. Consider a query point /?. If p is not contained in [0,1]^, then return any point q of S. Otherwise, follow a path in the tree in the obvious way, and stop in the node v storing the smallest cube containing p. (Note that V is not necessarily a leaf.) Now return any point q that is contained in the subtree of v. Let us see how good an approximation the returned point q is. First assume that the query point p lies outside [1/4,1]^. Then we have d{p, /?*) ^ 1/8 and d{p, q) ^ d{p, /?*) + J(/7*, q) ^ d{p, /?*) + D/2. It follows that d{p, q)/d{p, /?*) < 1 + 4D, i.e., the returned point ^ is a (1 + 4D)-approximate neighbor of p. There is one more case when ^ is a reasonably good approximation. Before we can describe this case, we need some definitions. Consider the cube Cy. Split this cube into 2^ equal sized subcubes. One of these subcubes contains p. We call this subcube the answer cube of p. Let A be an axes-parallel cube with sides of length i and center a. The point p is said to be central in A if it is contained in the cube centered at a that has sides of length 2€/3. We claim that ^ is a good approximation if p is central in its answer cube. To prove this, let p's answer cube have sides of length I. Since q is contained in Cy, we have d{p, q) ^ IID. Moreover, since p is central in A, and since A does not contain any points of S, we have d{p, /?*) > i/6. Hence, d(p,q)/d(p, /?*) ^ 12D, i.e., the point q is 2i (12D)approximate neighbor of p. Of course, it might be the case that p is not central in its answer cube. To solve this problem, we do the following. For 1 ^ / ^ 2^, let i\i2.. .ID be the binary representation of / — 1. Let Vi be the vector (/i/3, / 2 / 3 , . . . , / D / 3 ) . We build 2^ quad trees, where for 1 ^ / < 2^, the root cube of the i-ih tree is [0, 1]^ translated by f/. The claim now is that if the query point p is contained in [1 /4, 1]^, then p is central in its answer cube in one of these 2^ quad trees. Hence, given a query point p e E ^ , we query each of the quad trees. If qi is the point found in the i-ih tree, 1 ^ / ^ 2^, then we compute the one that is closest to p, and return this point. This point is a (12D)-approximate neighbor of p. We remark that for special metrics, the approximation can be much better. For example, if we use the Euclidean metric, then this solution computes a (12V^)-approximate neighbor of p. If we use a centroid decomposition to represent the quad trees, see Section 3.3, then the query algorithm takes 0(log n) time. The entire data structure uses linear space. Finally, using an algorithm that is similar to that of Section 2.5.2, the entire data structure can be built in 0(n log n) time. 5.2.2. A randomized data structure based on neighborhood graphs. The first efficient data structure for solving the (1 + £)-approximate post-office problem for any constant £ > 0 was given by Arya and Mount [11]. The data structure of Arya and Mount is a directed graph that is constructed in a randomized manner. For each point q of S we cover the space R^ with a constant number of cones having q as their apex. Then we apply the following procedure that adds for each q e S and each cone C with apex q an expected number of 0(log n) directed edges of the form
Closest-point problems in computational geometry
919
(q,r), where r eC: Let ri, r 2 , . . . , r^-i be a random permutation of the point set 5 \ {^}. For each cone C with apex ^, consider all points that are contained in C If r/ € C, then the data structure contains a directed edge (q, r/) if r/ is the point of the set C D {r i, r 2 , . . . , ri} having minimum distance to q. The graph that is constructed in this way is called the randomized neighborhood graph. Standard arguments from probability theory imply that each point has expected out-degree 0(log n). Hence, the expected size of the data structure is bounded by 0{n log n). The data structure can be built in 0(«^) time in a straightforward way. Let p G MP be any query point, and let q be any point of S that is not a (1 -\- e)approximate neighbor of p. Arya and Mount show that by choosing the cones such that their angular diameter is small enough, there is an edge {q,r) in the data structure for which d(p,r) < d(p,q). This implies the following algorithm for solving approximate post-office queries. Start in any point q of S. Consider all edges (q,r), and choose the point r that is closest to /?. If d(p,r) < d(p,q), then set ^ :=r, and repeat this process. Otherwise, if d(p,r) ^ d(p,q), report the point q as being a (1 -h ^)-approximate neighbor of p. Unfortunately, it seems very difficult to prove a good bound on the expected running time of this query algorithm. Therefore, Arya and Mount propose the following modification. We associate each directed edge (a, b) of the data structure with the cone having a as its apex and that contains b. A directed path q\,q2,.. .,qk ^^ csilltd pseudo-linear, if for each I
920
M. Smid
We can improve this solution, by making the following observations. Consider the planar case. First, the point q above is a much better approximation if the angle between the vector p/7* and the positive x-axis is almost 7r/4. Next, the Loo-metric depends on the coordinate system. That is, if we rotate the xy-system, then the Loo-metric changes. The Euclidean metric, however, is invariant under such rotations. We store the set 5 in a constant number of range trees, where each range tree stores the points according to its own coordinate system. Given a query point /?, we use the range trees to compute Loo-neighbors in all coordinate systems. By choosing the coordinate systems in an appropriate way, one of these Loo-neighbors is a (1 +£)-approximate Euclidean neighbor of p. (In the planar case, we take care that there is always one coordinate system in which the angle between the vector /?/?* and the positive jc-axis is "almost" TT/A.) For the planar case, the coordinate systems are obtained as follows. Let 0 < 0 < n/A be such that tan0 = e/{2 -h e). For 0 ^ / < In/cj), let xi (resp. yi) be the directed line that makes an angle ofi-cp with the positive x-axis (resp. j-axis). Then, the i-th coordinate system is w.r.t. the axes xi and yi. For the higher-dimensional case, we use the cones as givenin Yao [129]. Overall, we get a data structure for the (1 + ^)-approximate Euchdean post-office problem having size 0(n log ^~' n), and whose query and amortized update times are bounded by 0(log ^~^n\og log n). Bespamyatnikh [27] gives an alternative solution using the same approximate distance functions as in Section 4.6. His technique applies to any L^-metric. The problem of finding a (1 -h £:)-approximate Lr-neighbor is reduced to that of range searching for minimum. Hence, using range trees, we get a dynamic data structure of size 0(nlog ^~^n) with query and update times of 0(log ^n). Using Chazelle's data structure [38] gives a data structure of size 0(n log ^~^n) with query and update times of 0(log ^"^' log log n). A completely different approach was given by Chan and Snoeyink [36]. Their result applies to any L^-metric, but it only gives efficient dynamic data structures in the planar case. So, assume that D = 2. We start with sketching an exact post-office data structure for the special case in which all query points lie on the >^-axis. Consider the intersection of the Voronoi diagram of S with the y-axis. Using a lifting map and dualization (see [60]), this intersection corresponds to a planar lower convex hull. Using the algorithm of Overmars and van Leeuwen [99], we can store and maintain this lower hull in 0(log ^n) time per insertion and deletion, using linear space. Exact post-office queries on the y-axis can be answered by binary search, in logarithmic time. We use this solution to give an approximate post-office structure for the case in which all points of S are to the left of the y-axis, and all query points are to the right of the y-axis. Let p = (p\, p2) be any query point such that p\ > 0. For each /, — [n/ils) - 11 < / < f7t/(28) — 11, let /?' be the intersection of the y-axis with the ray from p that makes an angle of / • 6: with the negative jc-axis. Also, let q^ be the exact nearest neighbor of p\ One of these exact neighbors is a (1 -|- 6:)-approximate neighbor of the query point p: Let ^* = (p*, p*) be the exact nearest neighbor of /?, and assume w.l.o.g. that /?| ^ /?2- Let / be the index such that the ray with angle i • e is just below /7*. Then the neighbor q^ of p^ satisfies d(p, q^) ^ (1 + s)d(p, p*). (For a proof, see [36].) It follows that we can solve this version of the problem with 0(log n) query time, 0(log ^n) update time, and 0(n) space.
Closest-point problems in computational geometry
921
The general approximate post-office problem can now be solved by applying range tree techniques to the latter solution. The result is a data structure of size 0{n log n), having an update time of 0(log ^n), that solves (1 + 6:)-approximate post-office queries in 0(log ^n) time. We remark that the data structure and, hence, the constants in the space and update time bounds, do not depend on £. In fact, this data structure can be used for queries in which the input consists of a point p and an approximation bound s. 5.2.4. An optimal solution for the approximate post-ojfice problem. The (1 + E)approximate post-office problem was solved optimally by Arya et al. [12]. They give a data structure of size 0{n), that answers queries in 0(log n) time, and that can be built in 0{n log n) time. This data structure and the constants in the space and building time bounds do not depend on 6:. It can be used for answering queries for all degrees of precision. (Of course, the constant factor in the query time does depend on s.) The data structure is based on a hierarchical subdivision of space into cells that is similar to the ones we have seen already, e.g. in Section 2.5.2. Since we are dealing with a query problem, however, the previous techniques have to be adapted somewhat. Define 2ifat box to be a D-dimensional axes-parallel rectangle for which the ratio of its longest side to its shortest side is bounded from above by some constant. We will construct a subdivision of R^ into pairwise disjoint cells, where a cell is either a fat box or the set theoretic difference of two fat boxes. These cells are called box cells and doughnut cells, respectively. The construction is based on two operations on fat boxes. First, in a split operation, a fat box is split into two fat boxes by cutting its longest side into two equal parts. The split is called/a/r if both resulting boxes contain points of S. Let B and B' be two fat boxes such that B^ is contained in B. We say that B' is sticky for B if for each of the 2D sides of B', the distance from this side to the corresponding side of B is either zero or at least the width of B' along this dimension. The second operation is the shrink operation. It is only defined on a fat box B on which a fair split is not possible. This operation returns the smallest fat box B' ^B that is sticky for B and that contains all points of B n 5. The following lemma can be proved easily. LEMMA 5.1. Let B be any fat box that contains at least two points of S. Then a fair split operation or a shrink operation can be performed on B. If the shrink operation can be applied on B, then a fair split is always possible on the resulting shrunken fat box.
Now we can describe the construction of the subdivision. We start with the smallest axesparallel cube U containing all points of S. There are three possible cases. First assume that U contains only one point of S. Then this cube becomes a box cell of the subdivision, and the construction stops. Next, assume that U contains at least two points, but a fair split on U is not possible. Then, we perform the shrink operation on U. Let U' be the shrunken box. We create a doughnut cell U \ U\ and recursively apply the construction on U^ 0 S. Finally, assume that U contains at least two points, and a fair split on U is possible. Then, we perform the fair split, yielding two fat boxes Ui and U2- We now recursively apply the construction onU\ H S and U2 H S, respectively.
922
M Smid
This construction defines a binary tree T in the natural way. Each node of this tree stores a cell. The cells that are stored at the leaves form the subdivision of R^. Lemma 5.1 implies that along any path in T there cannot be two consecutive "shrink nodes". Hence, the tree has size 0{n). In order to use T for solving approximate post-office queries, we need to store some additional information. With each leaf of T, storing the cell C of the subdivision, we store a point q(C) of S. If C is a box cell, then q(C) is the unique point of C H S. Otherwise, if C is a doughnut cell of the form U \U\ then q (C) is an arbitrary point of U^ fl S. Define the size of a box cell (resp. doughnut cell) of the subdivision to be the length of its longest side (resp. length of the longest side of its outer box). Then, it is clear that for each cell C of the subdivision, and for each point x inC H R^, the distance between x and q(C) is at most D times the size of C. Before we give the query algorithm, we make some more remarks. First, we mention the following lemma, whose proof follows from packing arguments. LEMMA 5.2. Let p be any point in M^ and let r and s be positive real numbers such that r ^ s. The number of cells of the subdivision having size at least s and intersecting the ball of radius r with center p is bounded by 0((r/s)^).
If we use a centroid decomposition to represent the tree 7, see Section 3.3, then we can answer point location queries in 0(log n) time. In such a query, we find the cell of the subdivision containing a given query point. Note that the size of the data structure remains linear. Using basically the same algorithm as in Section 2.5.2, the entire data structure can be built in 0(n log n) time. Let p be any point in M^ and let C be any cell of the subdivision. We define the distance between p and C to be the minimum distance between p and any point of C Pi R^. The following lemma will be important for the query algorithm. LEMMA 5.3. Let p e R^ be any query point, and let k be a positive integer In 0(A:log n) time, we can enumerate the k cells of the subdivision that are closest to p, in increasing order of their distance to p. The value of k need not be known at the moment when the enumeration starts. PROOF. We only give the algorithm for enumerating the cells. For the correctness proof and time analysis, we refer to [ 12]. The algorithm is based on the priority search technique, that was used for the first time in [10]. We say that two cells of the subdivision are neighbors if they share a common (D — 1)dimensional boundary. Let C be a cell of the subdivision, and let F be any of its (D — 1)-dimensional facets. Let p' be the point on F that is closest to p. Clearly, p^ can be computed in constant time. Let N(C, F, p) be the cell of the subdivision that is closest to p and that is a neighbor of C along F. Given p\ we can find this cell by point location, in logarithmic time. Now we can give the algorithm. We will maintain a heap that stores cells of the subdivision, sorted by their distances from p. Initially, the heap is empty. Also, we assume that all cells are unmarked. Using point location, we find the cell that contains p, mark it, and insert it into the heap. Now, we make a sequence of k iterations.
Closest-point problems in computational geometry
923
During one iteration, we remove the cell C that is closest to p from the heap, and report it. Then, for each face F of C, compute the cell N(C, F, p) and, in case it is unmarked, mark it and insert it into the heap. D Now we can give the algorithm for answering approximate post-office queries. Let p be any query point. Using the algorithm of Lemma 5.3, enumerate cells of the subdivision in increasing order of their distance to p. For each cell C that is enumerated, compute the distance between p and its associated point q{C), and maintain the smallest distance S encountered so far. We stop with enumerating cells as soon as the distance between p and the current cell is larger than 8/{l-\- s). Then we report S and the point whose distance to p is equal to 8. To prove the correctness of this algorithm, let C be the cell of the subdivision that contains the exact nearest neighbor p* of p. Note that C must be a box cell. If C has been enumerated, then /?* =q{C), and we have in fact found the exact neighbor of p. Assume that C has not been enumerated. Since we visit the cells in increasing order of their distance to /?, we know that the distance between C and p is at least 5/(1 -h 6:). Therefore, (5 < (1 + 6:) d{p, /?*), i.e., we have found a (1 + £)-approximate neighbor of p. It remains to analyze the query time. For each cell visited, we need 0(log n) time. Hence, we have to show that at most a constant number of cells are enumerated before the algorithm terminates. If C is a cell of the subdivision, then we denote its size by size{C). Moreover, d{p, C) denotes the distance between p and C. Consider the query algorithm. Let C be the current cell that is being enumerated, let 3' — dip, C) and s = size{C). We claim that if 5* < 8's/D, then the next cell that is enumerated causes the query algorithm to terminate. To prove this, let x be a point of C n E ^ such that d{p, x) = 8\ We know that d{x,q(C)) ^ Ds. Hence, by the triangle inequality, d(p,q(C)) ^ 8^ -\- Ds < (1 -{- e) 8'. In particular, the current value of 8 satisfies 8 < {\ -\- s) 8\ The next cell that is enumerated has distance at least 8^ > 8/(1 -f s) to p. This proves the claim. Hence, to bound the number of cells that are enumerated, it remains to consider cells C for which size(C) > sd(p, C)/D. We define x to be the minimum value of D size{C) -h d(p,C), minimized over all cells C of the subdivision. LEMMA
5.4. Consider the value of 8 that is reported by the algorithm. We have 8 < {I-\-
£)x. PROOF. Let C be the cell for which D size{C') -\-d{p,C^) = xAfC' is enumerated during the algorithm, then
8 < d{p,q{C'))
^ DsizeiC) -|- d{p, C') = x < {I + s)x.
Otherwise, if C' is not enumerated, then we know that d{p,C) that 8 < (l-\-£)d(p,
C) ^ (l-\-6)d{p,q(C^))
<
> 8/{l+s),
(l-\-s)x.
which implies
924
M. Smid
This completes the proof.
D
LEMMA 5.5. All cells that are enumerated, except possibly the last one, intersect the ball with radius {\-\- e)x centered at p. PROOF. Consider again the final value of 5. Let C be a cell of the subdivision such that d(p,C) > (1 -\- e)x. Also, let Co be the cell whose enumeration resulted in 5. That is, 8 = d(p,q(Co)). Then, since 5 < (1 + e)x, we have d(p, C) > 8 ^ d(p, Co). It follows that if C is enumerated, then this happens after Co has been enumerated. At the moment when C is enumerated, however, we have d(p,C) > 8^ 8/(1 -\- s). Hence, the algorithm terminates at this moment. D
Let C be a cell for which size(C) ^ sd(p, C)/D. The definition of x immediately implies that Dsize(C) + d(p, C) ^ x. Therefore, Dsize(C) + Dsize(C)/e > JC, or, equivalently, size(C) ^ x/(D(\ + 1/6:)). This proves that the number of cells that are enumerated is at most equal to three plus the number of cells of size at least x/(D(\ + l/e)) that intersect the ball centered at p and having radius (\ -\- e)x.By Lemma 5.2, there are at most a constant number of such cells C. This completes the proof of the claim that the running time of the query algorithm is logarithmic. To conclude this section, we remark that Arya et al. extend their algorithm such that the approximate k nearest neighbors to a query point can be enumerated in 0(A:log n) time. (In this case, the points q(C) have to be chosen more carefully.) They also present results of experiments made using a simplification of the algorithm as presented above, for 16-dimensional point sets. For details, we refer to [12].
6. Further results on proximity problems 6.1. Approximating the complete Euclidean graph: Spanners In this section, we give an overview of the algorithms that have been designed for constructing spanners. (See Definition 1.1.) Throughout, distances denote Euclidean distances. We first remark that the problem of constructing any f-spanner, where 1 < f < 2, has an f2(nlog n) lower bound in the algebraic computation tree model. This follows from the simple fact that in such a spanner the closest pair must be connected by an edge. The same lower bound was in fact proved for any r > 1 by Chen, Das and Smid [50]. Spanners were introduced to computational geometry by Chew [40]. Let 5 be a set of n points in the plane. Chew shows that the L \ -Delaunay triangulation of 5 is a Euclidean VTO-spanner. That is, for every pair /?, q of points in S, there is a path in this triangulation between p and q whose weight is at most VT^ times the Euclidean distance between p and q. Later, Dobkin, Friedman and Supowit [58] proved that the Euclidean Delaunay triangulation is a ^-spanner for r = 7r(l -h V5 )/2. Keil and Gutwin [84] improved this to t = 2>cls7i/6' L^vcopoulos and Lingas [89] generalized the latter result in the following
Closest-point problems in computational geometry
925
way. Given the Euclidean Delaunay triangulation of n planar points, and any positive real number r, a plane graph can be constructed in linear time, that is a /-spanner for t = (1 + V^)3cos^/6^ ^^^ whose total weight is at most 2r + 1 times the weight of a minimum spanning tree for these points. 6.1.1. Spanners based on simplicial cones. Using simplicial cones, we can give a simple construction of a f-spanner for any constant t > I. The construction appeared for the first time in Clarkson [42] for the cases D = 2 and D = 3. It was discovered independently by Keil and Gutwin [84] for the case D = 2. Ruppert and Seidel [103] generalized the construction to an arbitrary dimension. We describe the planar version of the construction. As in Section 4.6, we choose an integer constant k. Let 0 = 271/k. Rotate the positive jc-axis over angles i • 0, 0 ^i < k, yielding k rays. Let Ci, C 2 , . . . , Q be the cones that are bounded by any two successive rays. Also, for 1 ^ / ^ ^, let // be a fixed ray that emanates from the origin and that is contained in d. Define a graph in the following way. For each point p of S and each /, 1 < / ^ k, translate the cone Ct and the corresponding ray // such that its apex and starting point are at p, respectively. Then take the point q e S that is contained in the translated cone and whose projection onto the translated ray is closest to p. We add the directed edge (p,q) to the graph. The graph obtained in this way is called the &-graph. Clearly, it contains at most kn = 0(n) edges. To prove that this graph is a spanner, consider any two points p and q of S. We construct a path from p to ^, in the following way. Let po := p. Let / > 0, and assume we have already constructed a path po, p\,..., pi.lf pi =q, then the construction stops. Otherwise, let j be the index such that the cone Cj — when translated such that its apex is at pt — contains q. The 6>-graph contains an edge (pi, r), for some point r in the translated cone. We extend the path by setting /?/+i := r. It can be shown that d(pi+\,q)^d(pi,q)
- (cosO - sin0)d(pi, pi^i).
(3)
As a result, if ^ > 8, each next point on the path is closer to q than the previous one. In particular, point q will be reached. Rewriting inequality (3) shows that the entire path from p to q has weight at most t times the distance between p and q,foTt = l/(cos^ — sin^). Note that by choosing k large enough, the value of t gets arbitrarily close to one. The construction can easily be generalized to any dimension D, by using the simplicial cones of Yao [129]. Using the sweep technique and range trees, the 0-graph can be constructed in 0(nlog ^'^n) time. For details, see [13,14,42,84,103]. Let the spanner diameter of a spanner be defined as the smallest integer I such that for any pair p and q of points, there is a path from p to q of weight at most t times the distance between p and q, and that contains at most t edges. The 6)-graph can have spanner diameter n — l: Take n points on the real line. For these points, the 6)-graph is just a list storing the points in sorted order. Arya, Mount and Smid [13,14] show how to combine the 6)-graph with skip lists [101] to get a /-spanner having 0(n) edges and 0(log n) spanner diameter, both with high probabil-
926
M Smid
ity. They also show how to maintain this spanner efficiently under insertions and deletions of points, in the model of random updates, as defined in Mulmuley [96]. Although the out-degree of any vertex in the 0-graph is bounded by a constant, the maximum in-degree can be as large as ;^ — 1: Take n — 1 points on a circle, and let the n-th point be its center. In the corresponding 6)-graph, each point on the circle has an edge towards the center vertex. Arya et al. [9] give an 0(n log n)-time algorithm that transforms any spanner of bounded out-degree into a spanner that has both bounded out-degree and bounded in-degree. Applying this transformation to the 6)-graph gives an 0(n log ^~^n)time algorithm for constructing a f-spanner of bounded in- and out-degree. 6.1.2. Greedy spanners. There is a simple greedy algorithm for constructing spanners. Let 5" be a set of n points in E ^ , and let ^ > 1. Sort the (2) point pairs in increasing order of their distances. Start with an empty graph on S, and consider all point pairs in sorted order. If p,q is the current pair, then add an edge between them if and only if the current graph does not contain a path between p and q of weight at most t d(p,q). It is clear that this algorithm constructs a r-spanner. Chandra et al. [37] showed that each vertex in this spanner has a degree that is bounded by a constant. Since the greedy algorithm looks at each pair of points explicitly, its running time is Q{n^). Das and Narasimhan [48] present a variant of the greedy algorithm based on graph clustering techniques that runs in 0{n log ^n) time. As mentioned by Vaidya [127], Feder and Nisan gave an alternative greedy algorithm for constructing a spanner of bounded degree. (See also Salowe [107].) Let 0 < ^ < n/A be a real number. Again, sort the (2) pairs in increasing order of their distances, start with an empty graph on S, and consider the pairs in sorted order. If /?, ^ is the current pair, then we add an edge between them if and only if there is no r G »S such that (i) (/?, r) is an edge and the angle rpq is less than 0 or (ii) (r, ^) is an edge and the angle rqp is less than ^. The resulting graph is a r-spanner for t = l/(cos^ — sin^), and it clearly has bounded degree. Arya and Smid [15] gave an efficient implementation of a variant of Feder and Nisan's greedy algorithm that uses the data structure of Section 4.3. The result is an 0{n log ^n)time algorithm that constructs a r-spanner of bounded degree whose weight is bounded by 0(log n) times the weight of a minimum spanning tree. 6.1.3. Spanners based on well-separated pairs. The first optimal 0{n log n)-time algorithms for constructing a r-spanner on any set of n points in M^, for any constant t > I, were given by Vaidya [127] and Salowe [105]. Their algorithms are related and use hierarchical subdivisions. It should not be a surprise that we can also use the well-separated pair decomposition (WSPD) of Section 2.5.2 for giving a similar construction. (This is due to Callahan and Kosaraju [33].) To prove this, let {{Ai, B\], {A2, ^ 2 } , . . . , {A^, 5^}} be a WSPD for S with m = 0(n). For each /, 1 ^ / < m, choose arbitrary representative points ai e A/ and bi e Bt, and add an edge between these two points. This defines the graph. It is clear that it can be built in 0{n log n) time. To prove that it is a spanner, consider any two points p and q of S. We know that there is an index / such that p e Ai and q e Bi. Consider the corresponding representatives at e At and bt e Bi. We recursively construct paths between p and at, and between bi and q. The final path
Closest-point problems in computational geometry
927
between p and q consists of the path between p and «/, followed by the edge (ai,bi), followed by the path between hi and q. The definition of WSPD implies that the edge (at, bt) is long compared to the distances d{p, at) and d(q,bi). Using this observation, it can easily be shown that by choosing the separation constant large enough, the graph is a ^-spanner. It has been shown that by modifying the WSPD-spanner, other spanners can be constructed that have a variety of properties. First, if the representatives are chosen carefully, then the edges of the graph can be directed such that the spanner has bounded out-degree. (See [33].) Hence, applying the transformation of Arya et al. [9] that was mentioned in Section 6.1.1 shows that for each t > 1, we can build in 0(n log n) time a ^-spanner of bounded degree. Next, Arya, Mount and Smid [13] prove that by choosing the representatives in another way, the spanner based on the WSPD has 0(log n) spanner diameter. Arya et al. [9] show that the weight of this spanner is bounded by 0(log n) times the weight of a minimum spanning tree. We note, however, that this spanner does not have bounded degree. One of the main results in [9] is a technique that decomposes the WSPD into a constant number of hierarchically organized sets of well-separated pairs. This decomposition is used to give a class of spanners that can be viewed as the union of a constant number of trees. Moreover, each of the (2) spanner paths arises as the unique path between two leaves in one of these trees. In Alon and Schieber [6] and Bodlaender, Tel and Santoro [30], algorithms are given for adding edges to a tree such that its diameter is reduced. Applying this gives a ^-spanner of spanner diameter 2 with 0(n log n) edges, a ^-spanner of spanner diameter 3 with 0(n log log n) edges, a r-spanner of spanner diameter 4 with 0(n log *«) edges, and so on. In fact, it is even possible to obtain a f-spanner of spanner diameter 2a(n) -h 2 with only 0(n) edges, where a(n) is the inverse of Ackermann's function. All these spanners can be constructed in 0(n log n) time. Moreover, the trade-offs between the spanner diameter and the number of edges are optimal. This is true even for spanners for one-dimensional point sets. (The optimality follows from the results in [6,30]. These papers do not consider spanners explicitly, but their results can easily be "translated" to spanners.) We finally mention the other results in [9]. The decomposition mentioned in the preceding paragraph can be combined with topology trees [66] in order to get a r-spanner of bounded degree and 0(log n) spanner diameter. This spanner can be constructed in 0(n log n) time. Moreover, it is shown that the weight of this spanner is bounded by 0(log ^n) times the weight of a minimum spanning tree. 6.1.4. Spanners with small degree. We have seen that for each r > 1, a ^-spanner of bounded degree can be constructed. The upper bound on the degree, however, depends on t and the dimension D. Typically, it is of the form (c/(r — 1))^, for some constant c. Dobkin, Friedman and Supowit [58] posed the problem of determining the smallest integer f * such that for every set of n points in M^, a /^-spanner of degree u* can be constructed, for some constant t. (Of course, t will depend on D.) They prove that 3 ^ v* ^ 7 . Salowe [107] proves that f* < 4. He gives an algorithm that transforms any ^-spanner of degree v into a f ^-spanner of degree \y/2\ + 2, where t' ^ 111 t-{-32 - 3^^^. Starting with
928
M. Smid
any bounded degree spanner, and applying this transformation repeatedly, proves Salowe's result. The problem of determining u* was solved by Das and Heffeman [46]. They prove that u* = 3. To be more precise, they give a polynomial time algorithm that, given any set of n points in M^ and any 5 > 1, constructs a r-spanner, for some constant t, that has degree three and that contains at most 6n edges. 6.2. More results on closest point problems We have given algorithms and data structures for closest point problems whose complexity does not depend on the geometry of the points. That is, all complexity bounds only depend on the number n of points, and on constants like the dimension D. Several authors have developed algorithms whose running time also depends on measures such as the ratio of the maximum distance to the minimum distance. We mention the algorithm of Clarkson [41] for solving the all-nearest-neighbors problem, and the data structures of Clarkson [44] and Chen and Snoeyink [36] for solving the approximate post-office problem. There has been much work on designing simple algorithms that are especially efficient if the input points come from some probability distribution. For example, Friedman, Bentley and Finkel [68] and Bentley, Weide and Yao [24] give algorithms for the post-office problem and the closest pair problem. Bartling and Hinrichs [18] analyze the expected running time of a simple algorithm for the all-nearest-neighbors problem for point sets that are uniformly distributed in the unit-cube. Finally, Golin [70] gives a simple data structure that maintains the closest pair in logarithmic expected time per update, when the points are drawn from a wide class of distributions. We considered the problem of computing the minimum distance, or the k smallest distances, in a point set, and gave optimal algorithms for these problems. The problem of selecting only the k-ih smallest distance turns out to be much more difficult. Salowe [104] shows how to select the k-ih smallest Loo-distance in a set of n points in R^, in 0{n\og ^n) time. Agarwal et al. [1] give an efficient randomized algorithm for selecting the k-\h Euclidean distance in a planar set of points. Both algorithms use the parametric search technique. The problem of selecting the largest distance, i.e., the diameter, in a set of n points in E ^ , can be solved in 0(« log n) time if Z) = 2. See [112,100]. If D = 3, the best result known is due to Amato, Goodrich and Ramos [7]. They show how the diameter can be computed in 0(n log ^n) time. In the bichromatic closest pair problem, we are given sets R and B of red and blue points in R^, respectively, and we want to find a pair (r, Z?), where r e R and b e B, whose distance is minimal. Let n denote the total number of red and blue points. Using Voronoi diagrams, the planar version of this problem can easily be solved in 0(n log n) time. For D >2, the problem is much more difficult. Agarwal et al. [2] show that there is a relationship between the bichromatic closest pair problem and the minimum spanning tree problem. They use it to give an efficient algorithm to compute the bichromatic closest pair. Callahan and Kosaraju [33] used their well-separated pair decomposition to improve the running time. Katoh and Iwano [83] give a general technique that can be used to compute the k closest bichromatic pairs, or the k furthest bichromatic pairs.
Closest-point problems in computational
geometry
929
Agarwal et al. [3] introduced a variation of the bichromatic closest pair problem. Here, we are given a collection of point sets, and for each point p we have to find a nearest neighbor that does not belong to p's set. If n denotes the total number of points, then the planar version can be solved in 0{n log n) time. See [3] and Graf and Hinrichs [74]. We finally mention that research has been done on proximity problems on sets of objects other than points. We mention Sharir [114], who solves the closest pair problem for a set of planar disks, and Graf and Hinrichs [73], who give a plane sweep algorithm for solving the all-nearest-neighbors problem on a set of convex planar objects.
7. Open problems In the preceding sections, we have seen optimal solutions to several closest point problems. In particular, the complexity of the static and dynamic versions of the closest pair problem have been completely settled. There remain, however, many challenging open problems in this field. We mention some of these. The static post-office problem has been solved optimally in the planar case. Does there exist a dynamic data structure for the planar post-office problem having polylogarithmic query and update times and using 0{n log ^^^^n) space? We mentioned already that in dimension D > 2, the complexity of the static post-office problem has not been determined. It has been conjectured that a data structure of size 0(n log ^^^^n) with polylogarithmic query time does not exist. An important open problem is to prove or disprove this conjecture. We have seen that the all-nearest-neighbors problem can be solved optimally, in 0(n log n) time. No non-trivial results are known, however, for maintaining the all-nearestneighbors under insertions and deletions, even in the planar case. Note that when a point is inserted or deleted, at most a constant number of nearest neighbor pairs are changed. The problem is, of course, finding these pairs. We mentioned in Section 6.2 that the problem of selecting the A:-th smallest Loo-distance in a set of n points in R^ can be solved in 0(n log ^n) time. Can this problem be solved in 0(n log n) time? Also, what is the complexity of selecting the ^-th Euclidean distance, even in a planar set of points? In Section 6.1, several optimal algorithms were mentioned for constructing spanners that have one or more properties. The most general result is an 0(nlog /i)-time algorithm for constructing a ^-spanner of bounded degree, 0(log n) spanner diameter, and weight bounded by 0(log ^n) times the weight of a minimum spanning tree. Is there an 0(n log n)-time algorithm that constructs a spanner of bounded degree, 0(log n) spanner diameter, and weight bounded by 0(log n) times the weight of a minimum spanning tree? Such an algorithm would be optimal: We saw already that ^ ( n l o g n) is a lower bound on the time to construct any spanner. Also, in [9] it is shown that any spanner of 0(log n) spanner diameter must have weight .^(log n) times the weight of a minimum spanning tree. In [9], it is claimed that for any set of n points in M^ and any constant ? > 1, a r-spanner whose weight is proportional to the weight of a minimum spanning tree, can be computed in 0(n log n) time. The analysis uses results from [47] and [49]. Unfortunately, it is not
930
M. Smid
clear if these results are correct. Therefore, the problem of constructing a f-spanner of low weight is still open. Finally, it is clear that all (2) distances in a set of n points in R^ can be sorted in Oin^ log n) time. Can this be improved to 0(n^)?
Acknowledgements This paper was written while the author was at the Max-Planck-Institute for Computer Science in Saarbriicken, Germany. The author was supported by the ESPRIT Basic Research Actions Program, under contract No. 7141 (project ALCOM II). The author thanks Sunil Arya, Sergei Bespamyatnikh, Klaus Hinrichs, Ravi Janardan, Hans-Peter Lenhof, and David Mount for their comments on a preliminary version of this paper.
References [1] RK. Agarwal, B. Aronov, M. Sharir and S. Suri, Selecting distances in the plane, Algorithmica 9 (1993), 495-514. [2] RK. Agarwal, H. Edelsbrunner, O. Schwarzkopf and E. Welzl, Euclidean minimum spanning trees and bichromatic closest pairs. Discrete Comput. Geom. 6 (1991), 407-^22. [3] A. Aggarwal, H. Edelsbrunner, P. Raghavan and P. Tiwari, Optimal time bounds for some proximity problems in the plane. Inform. Process. Lett. 42 (1992), 55-60. [4] A. Aggarwal, L.J. Guibas, J. Saxe and RW. Shor, A linear-time algorithm for computing the Voronoi diagram of a convex polygon. Discrete Comput. Geom. 4 (1989), 591-604. [5] A. Aggarwal, H. Imai, N. Katoh and S. Suri, Finding k points with minimum diameter and related problems, J. Algorithms 12 (1991), 38-56. [6] N. Alon and B. Schieber, Optimal preprocessing for answering on-line product queries. Report 71/87, Tel-Aviv University (1987). [7] N.M. Amato, M.T. Goodrich and E.A. Ramos, Parallel algorithms for higher-dimensional convex hulls. Proceedings 35th Annual IEEE Symposium on Foundations of Computer Science (1994), 683-694. [8] H.C. Andrews, Introduction to Mathematical Techniques in Pattern Recognition, Wiley-Interscience, New York (1972). [9] S. Arya, G. Das, D.M. Mount, J.S. Salowe and M. Smid, Euclidean spanners: Short, thin, and lanky, Proceedings 27th Annual ACM Symposium on the Theory of Computing (1995), 489^98. [10] S. Arya and D.M. Mount, Algorithms for fast vector quantization. Proceedings of the Data Compression Conference (DCC '93), IEEE Press (1993), 381-390. [11] S. Arya and D.M. Mount, Approximate nearest neighbor queries in fixed dimensions. Proceedings 4th Annual ACM-SIAM Symposium on Discrete Algorithms (1993), 271-280. [12] S. Arya, D.M. Mount, N.S. Netanyahu, R. Silverman and A. Wu, An optimal algorithm for approximate nearest neighbor searching. Proceedings 5th Annual ACM-SIAM Symposium on Discrete Algorithms (1994), 573-582. [13] S. Arya, D.M. Mount and M. Smid, Randomized and deterministic algorithms for geometric spanners of small diameter. Proceedings 35th Annual IEEE Symposium on Foundations of Computer Science (1994), 703-712. [14] S. Arya, D.M. Mount and M. Smid, Dynamic algorithms for geometric spanners of small diameter: Randomized solutions. Report MPI-I-94-156, Max-Planck-Institut fiir Informatik, Saarbriicken (1994). [15] S. Arya and M. Smid, Efficient construction of a bounded-degree spanner with low weight, Algorithmica 17 (1997), 33-54.
Closest-point problems in computational
geometry
931
[16] F. Aurenhammer, Voronoi diagrams: A survey of a fundamental geometric data structure, ACM Comput. Surveys 23 (1991), 345-405. [17] F. Bartling and K. Hinrichs, A plane-sweep algorithm for finding a closest pair among convex planar objects. Proceedings 9th Symposium on Theoretical Aspects of Computer Science, Lecture Notes in Comput. Sci. 577, Springer-Verlag, Berhn (1992), 221-232. [18] F. Barthng and K. Hinrichs, Probabilistic analysis of an algorithm for solving the k-dimensional allnearest-neighbors problem by projection, BIT 31 (1991), 558-565. [19] M. Ben-Or, Lower bounds for algebraic computation trees. Proceedings 15th Annual ACM Symposium on the Theory of Computing (1983), 80-86. [20] J.L. Bentley, Divide and conquer algorithms for closest point problems in multidimensional space, PhD thesis. University of North Carohna, Chapel Hill, NC (1976). [21] J.L. Bentley, Decomposable searching problems. Inform. Process. Lett. 8 (1979), 244-251. [22] J.L. Bentley, Multidimensional divide-and-conquer, Comm. ACM 23 (1980), 214-229. [23] J.L. Bentley and M.I. Shamos, Divide-and-conquer in multidimensional space. Proceedings 8th Annual ACM Symposium on the Theory of Computing (1976), 220-230. [24] J.L. Bentley, B.W. Weide and A.C. Yao, Optimal expected time algorithms for closest point problems, ACM Trans. Math. Software 6 (1980), 563-580. [25] M. Bern, Approximate closest-point queries in high dimensions. Inform. Process. Lett. 45 (1993), 95-99. [26] M. Bern, D. Eppstein and J. Gilbert, Provably good mesh generation, J. Comput. Syst. Sci. 48 (1994), 384-409. [27] S.N. Bespamyatnikh, The region approach for some dynamic closest-point problems. Proceedings 6th Canadian Conference on Computational Geometry (1994), 75-80. [28] S.N. Bespamyatnikh, An optimal algorithm for closest pair maintenance. Proceedings 11th Annual ACM Symposium on Computational Geometry (1995), 152-161. [29] S.N. Bespamyatnikh, An optimal algorithm for closest-pair maintenance. Discrete Comput. Geom. 19 (1998), 175-195. [30] H.L. Bodlaender, G. Tel and N. Santoro, Trade-offs in non-reversing diameter, Nordic J. Comput. 1 (1994), 111-134. [31] P.B. Callahan, Dealing with higher dimensions: The well-separated pair decomposition and its applications, PhD thesis, Johns Hopkins University, Baltimore, Maryland (1995). [32] P.B. Callahan and S.R. Kosaraju, A decomposition of multi-dimensional point-sets with applications to knearest-neighbors and n-body potential fields. Proceedings 24th Annual ACM Symposium on the Theory of Computing (1992), 546-556. [33] P.B. Callahan and S.R. Kosaraju, Faster algorithms for some geometric graph problems in higher dimensions. Proceedings 4th Annual Symposium on Discrete Algorithms (1993), 291-300. [34] P.B. Callahan and S.R. Kosaraju, Algorithms for dynamic closest pair and n-body potential fields. Proceedings 6th Annual Symposium on Discrete Algorithms (1995), 263-272. [35] P.B. Callahan and S.R. Kosaraju, A decomposition of multidimensional point sets with applications to k-nearest-neighbors and n-body potential fields, J. ACM 42 (1995), 67-90. [36] T.M. Chan and J. Snoeyink, Algorithms for approximate nearest-neighbor queries. Manuscript (1995). [37] B. Chandra, G. Das, G. Narasimhan and J. Soares, New sparseness results on graph spanners. Internal. J. Comput. Geom. Appl. 5 (1995), 125-144. [38] B. Chazelle, Afunctional approach to data structures and its use in multidimensional searching, SIAM J. Comput. 17 (1988), 427^62. [39] B. Chazelle and L.J. Guibas, Fractional cascading I: A data structuring technique, Algorithmica 1 (1986), 133-162. [40] P. Chew, There is a planar graph almost as good as the complete graph. Proceedings 2nd Annual ACM Symposum on Computational Geometry (1986), 169-177. [41] K.L. Clarkson, Fast algorithms for the all nearest neighbors problem. Proceedings 24th Annual Symposium on Foundations of Computer Science (1983), 226-232. [42] K.L. Clarkson, Approximation algorithms for shortest path motion planning. Proceedings 19th Annual ACM Symposium on the Theory of Computing (1987), 56-65. [43] K.L. Clarkson, A randomized algorithm for closest-point queries, SIAM J. Comput. 17 (1988), 830-847.
932
M Smid
[44] K.L. Clarkson, An algorithm for approximate closest-point queries. Proceedings 10th Annual ACM Symposum on Computational Geometry (1994), 160-164. [45] R.R Cohen and R. Tamassia, Combine and conquer: A general technique for dynamic algorithms. Proceedings 1st Annual European Symposium on Algorithms, Lecture Notes in Comput. Sci. 726, SpringerVerlag, Berlin (1993), 97-108. [46] G. Das and P.J. Heffeman, Constructing degree-3 spanners with other sparseness properties. Proceedings 4th International Symposium on Algorithms and Computations, Lecture Notes in Comput. Sci. 762, Springer-Verlag, Berlin (1993), 11-20. [47] G. Das, P. Heffeman and G. Narasimhan, Optimally sparse spanners in 3-dimensional Euclidean space. Proceedings 9th Annual ACM Symposum on Computational Geometry (1993), 53-62. [48] G. Das and G. Narasimhan, A fast algorithm for constructing sparse Euclidean spanners, Intemat. J. Comput. Geom. Appl. 7 (1997), 297-315. [49] G. Das, G. Narasimhan and J.S. Salowe, A new way to weigh malnourished Euclidean graphs. Proceedings 6th Annual ACM-SIAM Symposium on Discrete Algorithms (1995), 215-222. [50] D.Z. Chen, G. Das and M. Smid, Lower bounds for computing geometric spanners and approximate shortest paths. Proceedings 8th Canadian Conference on Computational Geometry (1996), 155-160. [51] A. Datta, H.-P Lenhof, C. Schwarz and M. Smid, Static and dynamic algorithms for k-point clustering problems, J. Algorithms 19 (1995), 474-503. [52] W.H.E. Day and H. Edelsbrunner, Efficient algorithms for agglomerative hierarchical clustering methods, J. Classification 1 (1984), 7-24. [53] M.T. Dickerson, R.L. Scot Drysdale and J.R. Sack, Simple algorithms for enumerating interpoint distances and finding k nearest neighbors, Intemat. J. Comput. Geom. Appl. 2 (1993), 221-239. [54] M.T. Dickerson and D, Eppstein, Algorithms for proximity problems in higher dimensions, Comput. Geom. 5(1996), 277-291. [55] M. Dietzfelbinger, T. Hagemp, J. Katajainen and M. Penttonen, A reliable randomized algorithm for the closest-pair problem, J. Algorithms 25 (1997), 19-51. [56] M. Dietzfelbinger, A. Karlin, K. Mehlhorn, F. Meyer auf der Heide, H. Rohnert and R.E. Tarjan, Dynamic perfect hashing: Upper and lower bounds, SI AM J. Comput. 23 (1994), 738-761. [57] D.P Dobkin, R.L. Drysdale, III and L.J. Guibas, Finding smallest polygons. Computational Geometry, Advances in Computing Research, Vol. 1, JAI Press, London (1983), 181-214. [58] D. Dobkin, S.J. Friedman and K.J. Supowit, Delaunay graphs are almost as good as complete graphs. Discrete Comput. Geom. 5 (1990), 399^07. [59] D. Dobkin and S. Suri, Maintenance of geometric extrema, J. ACM 38 (1991), 275-298. [60] H. Edelsbmnner, Algorithms in Combinatorial Geometry, Springer-Veriag, Beriin (1987). [61] H. Edelsbmnner, G. Haring and D. Hilbert, Rectangular point location in d dimensions with applications, Comput. J. 29 (1986), 76-82. [62] A. Efrat, M. Sharir and A. Ziv, Computing the smallest k-enclosing circle and related problems, Comput. Geom. 4 (1994), 119-136. [63] D. Eppstein and J. Erickson, Iterated nearest neighbors and finding minimal polytopes. Discrete Comput. Geom. 11 (1994), 321-350. [64] R.A. Finkel and J.L. Bendey, Quad trees — a data structure for retrieval on composite keys. Acta Informatica4(1974), 1-9. [65] S. Fortune and J. Hopcroft, A note on Rabin's nearest-neighbor algorithm. Inform. Process. Lett. 8 (1979), 20-23. [66] G.N. Frederickson, A data structure for dynamically maintaining rooted trees. Proceedings 4th Annual ACM-SIAM Symposium on Discrete Algorithms (1993), 175-184. [67] M. Fredman, F. Komlos and E. Szemeredi, Storing a sparse table with 0(1) worst case access time, J. ACM 31 (1984), 538-544. [68] J.H. Friedman, J.L. Bentley and R.A. Finkel, An algorithm for finding best matches in logarithmic expected time, ACM Trans. Math. Software 3 (1977), 209-226. [69] H.N. Gabow, J.L. Bentley and R.E. Tarjan, Scaling and related techniques for geometry problems. Proceedings 16th Annual ACM Symposium on the Theory of Computing (1984), 135-143. [70] M.J. Golin, Dynamic closest pairs — a probabilistic approach. Proceedings 3rd Scandinavian Workshop on Algorithm Theory, Lecture Notes in Comput. Sci. 621, Springer-Veriag, Beriin (1992), 340-351.
Closest-point problems in computational
geometry
933
[71] M. Golin, R. Raman, C. Schwarz and M. Smid, Simple randomized algorithms for closest pair problems, Nordic J. Comput. 2 (1995), 3-27. [72] M. Golin, R. Raman, C. Schwarz and M. Smid, Randomized data structures for the dynamic closest-pair problem, SIAM J. Comput. 27 (1998), 1036-1072. [73] T. Graf and K. Hinrichs, A plane-sweep algorithm for the all-nearest-neighbors problem for a set of convex planar objects. Proceedings 3rd Workshop on Algorithms and Data Structures, Lecture Notes in Comput. Sci. 709, Springer-Verlag, Berlin (1993), 349-360. [74] T. Graf and K. Hinrichs, Algorithms for proximity problems on colored point sets. Proceedings 5th Canadian Conference on Computational Geometry (1993), 420-425. [75] L. Guibas, J. Hershberger, D. Leven, M. Sharir and R.E. Tarjan, Linear time algorithms for visibility and shortest path problems inside triangulated simple polygons, Algorithmica 2 (1987), 209-233. [76] J. A. Hartigan, Clustering Algorithms, Wiley, New York (1975). [77] W. Heiden, M. Schlenlo-ich and J. Brickmann, Triangulation algorithms for the representation of molecular surface properties, J. Comp. Aided Mol. Des. 4 (1990), 255-269. [78] K. Hinrichs, J. Nievergelt and P. Schorn, Plane-sweep solves the closest pair problem elegantly. Inform. Process. Lett. 26 (1987/88), 255-261. [79] K. Hinrichs, J. Nievergelt and P. Schorn, An all-round sweep algorithm for 2-dimensional nearestneighbors problems. Acta Informatica 29 (1992), 383-394. [80] E. Hintz, Bin optimaler Algorithmus fUr das on-line closest pair Problem im k-dim. Raum, Master's thesis, Universitat Munster (1993). [81] D.B. Johnson and T. Mizoguchi, Selecting the Kth element inX-\-Y and Xi + X2 H hXm, SIAM J. Comput. 7 (1978), 147-153. [82] S. Kapoor and M. Smid, New techniques for exact and approximate dynamic closest-point problems, SIAM J. Comput. 25 (1996), 775-796. [83] N. Katoh and K. Iwano, Finding k farthest pairs and k closest/farthest bichromatic pairs for points in the plane, Intemat. J. Comput. Geom. Appl. 5 (1995), 37-51. [84] J.M. Keil and C.A. Gutwin, Classes of graphs which approximate the complete Euclidean graph. Discrete Comput. Geom. 7 (1992), 13-28. [85] S. KhuUer and Y. Matias, A simple randomized sieve algorithm for the closest-pair problem. Inform, and Comput. 118 (1995), 34-37. [86] D.E. Knuth, The Art of Computer Programming, Volume 3: Sorting and Searching, Addison-Wesley, Reading, MA (1973). [87] H.-P. Lenhof and M. Smid, An animation of a fixed-radius all-nearest-neighbors algorithm, 3rd Annual Video Review of Computational Geometry (1994). See Proceedings 10th Annual ACM Symposium on Computational Geometry (1994), page 387. [88] H.-P. Lenhof and M. Smid, Sequential and parallel algorithms for the k closest pairs problem, Internat. J. Comput. Geom. Appl. 5 (1995), 273-288. [89] C. Levcopoulos and A. Lingas, There are planar graphs almost as good as the complete graphs and as short as minimum spanning trees. Proceedings International Symposium on Optimal Algorithms, Lecture Notes in Comput. Sci. 401, Springer-Verlag, Berlin (1989), 9-13. [90] G.S. Lueker, A data structure for orthogonal range queries. Proceedings 19th Annual IEEE Symposium on the Foundations of Computer Science (1978), 28-34. [91] J. Matousek, On enclosing k points by a circle. Inform. Process. Lett. 53 (1995), 217-221. [92] J. Matousek, On geometric optimization with few violated constraints. Discrete Comput. Geom. 14 (1995), 365-384. [93] K. Mehlhom, Data Structures and Algorithms, Volume 1: Sorting and Searching, Springer-Verlag, Berlin (1984). [94] K. Mehlhom, Data Structures and Algorithms, Volume 3: Multi-Dimensional Searching and Computational Geometry, Springer-Verlag, Berlin (1984). [95] K. Mehlhom and S. Naher, Dynamic fractional cascading, Algorithmica 5 (1990), 215-241. [96] K. Mulmuley, Computational Geometry, an Introduction through Randomized Algorithms, Prentice-Hall, Englewood Cliffs (1994). [97] M.H. Overmars, Dynamization of order decomposable set problems, J. Algorithms 2 (1981), 245-260.
934
M. Smid
[98] M.H. Overmars, The Design of Dynamic Data Structures, Lecture Notes in Comput. Sci. 156, SpringerVerlag, Berlin (1983). [99] M.H. Overmars and J. van Leeuwen, Maintenance of configurations in the plane, J. Comput. Syst. Sci. 23 (1981), 166-204. [100] F.P. Preparata and M.I. Shamos, Computational Geometry, an Introduction, Springer-Verlag, New York (1985). [101] W. Pugh, Skip lists: A probabilistic alternative to balanced search trees, Comm. ACM 33 (1990), 668-676. [102] M.O. Rabin, Probabilistic algorithms. Algorithms and Complexity: New Directions and Recent Results, J.F. Traub, ed., Academic Press (1976), 21-39. [103] J. Ruppert and R. Seidel, Approximating the d-dimensional complete Euclidean graph. Proceedings 3rd Canadian Conference on Computational Geometry (1991), 207-210. [104] J.S. Salowe, L-infinity interdistance selection by parametric search. Inform. Process. Lett. 30 (1989), 914. [105] J.S. Salowe, Constructing multidimensional spanner graphs, Intemat. J. Comput. Geom. Appl. 1 (1991), 99-107. [106] J.S. Salowe, Enumerating interdistances in space, Intemat. J. Comput. Geom. Appl. 2 (1992), 49-59. [107] J.S. Salowe, Euclidean spanner graphs with degree four. Discrete Appl. Math. 54 (1994), 55-66. [108] C. Schwarz, Data structures and algorithms for the dynamic closest pair problem, PhD thesis, Universitat des Saarlandes, Saarbriicken (1993). [109] C. Schwarz and M. Smid, An 0{n log n log log n) algorithm for the on-line closest pair problem. Proceedings 3rd Annual ACM-SIAM Symposium on Discrete Algorithms (1992), 280-285. [110] C. Schwarz, M. Smid and J. Snoeyink, An optimal algorithm for the on-line closest-pair problem, Algorithmical2(1994), 18-29. [ I l l ] R. Seidel, Backwards analysis of randomized geometric algorithms. New Trends in Discrete and Computational Geometry, J. Pach, ed.. Springer-Verlag, Berhn (1993), 37-67. [112] M.I. Shamos, Geometric complexity. Proceedings 7th Annual ACM Symposium on the Theory of Computing (1975), 224-233. [113] M.I. Shamos and D. Hoey, Closest-point problems. Proceedings 16th Annual IEEE Symposium on the Foundations of Computer Science (1975), 151-162. [114] M. Sharir, Intersection and closest-pair problems for a set of planar discs, SIAM J. Comput. 14 (1985), 448-468. [115] M. Sharir and E. Welzl, A combinatorial bound for linear programming and related problems. Proceedings 9th Symposium on Theoretical Aspects of Computer Science, Lecture Notes in Comput. Sci. 577, Springer-Verlag, Berlin (1992), 569-579. [116] D.D. Sleator and R.E. Tarjan, A data structure for dynamic trees, J. Comput. Syst. Sci. 26 (1983), 362-391. [117] M. Smid, Algorithms for semi-online updates on decomposable problems. Proceedings 2nd Canadian Conference on Computational Geometry (1990), 347-350. [118] M. Smid, A worst-case algorithm for semi-online updates on decomposable problems. Report A 03/90, Fachbereich Informatik, Universitat des Saarlandes (1990). [119] M. Smid, Maintaining the minimal distance of a point set in less than linear time, Algorithms Review 2 (1991), 3 3 ^ 4 . [120] M. Smid, Range trees with slack parameter. Algorithms Review 2 (1991), 71-Sl. [121] M. Smid, Rectangular point location and the dynamic closest pair problem. Proceedings 2nd Annual International Symposium on Algorithms, Lecture Notes in Comput. Sci. 557, Springer-Verlag, Berlin (1991), 364-374. [122] M. Smid, Maintaining the minimal distance of a point set in polylogarithmic time. Discrete Comput. Geom. 7 (1992), 415^31. [123] M. Smid, Finding k points with a smallest enclosing square. Report MPI-I-92-152, Max-Planck-Institut fiir Informatik, Saarbriicken (1992). [124] M. Smid, Dynamic rectangular point location, with an application to the closest pair problem. Inform. Comput. 116 (1995), 1-9. [125] K.J. Supowit, New techniques for some dynamic closest-point and farthest-point problems. Proceedings 1st Annual ACM-SIAM Symposium on Discrete Algorithms (1990), 84-90.
Closest-point problems in computational
geometry
935
[126] P.M. Vaidya, An 0(nlog n) algorithm for the all-nearest-neighbors problem. Discrete Comput. Geom. 4 (1989), 101-115. [127] P.M. Vaidya, A sparse graph almost as good as the complete graph on points in K dimensions. Discrete Comput. Geom. 6 (1991), 369-381. [128] D.E. Willard and G.S. Lueker, Adding range restriction capability to dynamic data structures, J. ACM 32 (1985), 597-617. [129] A.C. Yao, On constructing minimum spanning trees in k-dimensional spaces and related problems, SIAM J. Comput. 11 (1982), 721-736. [130] M.H. von Zlilow, Das k-closest-pair-problem. Master's thesis, Universitat des Saarlandes, Saarbriicken (1993).
This Page Intentionally Left Blank
CHAPTER 21
Graph Drawing"* Roberto Tamassia Department of Computer Science, Brown University, Providence, RI02912-1910, USA E-mail: [email protected] http://www. cs. brown, edu/people/rt/
Contents 1. Introduction 2. Definitions 2.1. Types of graphs 2.2. Types of drawings 2.3. Properties of drawings 3. Bounds 3.1. Area bounds 3.2. Bounds on the angular resolution 3.3. Bounds on the number of bends 3.4. Trade-off between area and aspect-ratio 3.5. Trade-off between area and angular resolution 3.6. Bounds on the computational complexity 4. Techniques for drawing graphs 4.1. Force-directed approach 4.2. Layering approach 4.3. Planarization approach 4.4. Proximity and visibility drawings 4.5. Flow and orthogonal drawings 4.6. Orientation and orthogonal drawings 4.7. Dynamic graph drawing 4.8. Three-dimensional drawings of graphs 4.9. Constraint satisfaction in graph drawing 4.10.Comparative studies References
939 939 939 940 942 943 943 948 949 950 951 951 953 953 956 957 959 960 960 961 962 962 963 964
*Work supported in part by the National Science Foundation under grant CCR-9732327, and by the U.S. Army Research Office under grant DAAH04-96-1-0013. HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V. All rights reserved
937
938
R. Tamassia
Abstract Graphs are widely used for information visualization purposes, since they provide a natural and intuitive representation of complex abstract structures. The automatic generation of drawings of graphs has applications to a variety of fields such as software engineering, database systems, and graphical user interfaces. In this survey, we overview graph drawing algorithms from a computational geometry perspective.
Graph drawing
939
1. Introduction Graph drawing addresses the problem of constructing geometric representations of graphs, and is a major aspect of the emerging field of information visualization. Graph drawing has applications to key computer technologies such as software engineering, database systems, information retrieval, visual interfaces, and computer-aided-design. Research on graph drawing has been conducted within several diverse areas, including discrete mathematics (topological graph theory, geometric graph theory, order theory), algorithmics (graph algorithms, data structures, computational geometry, VLSI), and human-computer interaction (visual languages, graphical user interfaces, software visualization). In this paper, we overview upper and lower bounds on properties of various drawings of graphs and survey algorithmic techniques for drawing graphs that take into account several aesthetics and drawing conventions. To find out more about graph drawing, see the book [3] and the WWW graph drawing page maintained by the author at http://www.cs.brown.edu/people/rt/gd.html which includes an Internet-based graph drawing service [20].
2. Definitions 2.1. Types of graphs First, we define some terminology on graphs pertinent to graph drawing. Throughout this chapter let n and m be the number of graph vertices and edges respectively, and let d be the maximum vertex degree (i.e., number of incident edges). Degree-k graph: Graph with maximum degree d
^k.
Digraph: Directed graph, i.e., graph with directed edges (drawn as arrows). Acyclic digraph: Without directed cycles. Transitive edge: Edge (u, v) of a digraph is transitive if there is a directed path from u to V not containing edge (u,v). Reduced digraph: Without transitive edges. Source: Vertex of a digraph without incoming edges. Sink: Vertex of a digraph without outgoing edges. st-digraph: Acyclic digraph with exactly one source and one sink, which are joined by an edge (also called bipolar digraph). Connected graph: Any two vertices are joined by a path.
940
R. Tamassia
Biconnected graph: Any two vertices are joined by two vertex-disjoint paths. Triconnected graph: Any two vertices are joined by three vertex-disjoint paths. Tree: Connected graph without cycles. Rooted tree: Directed tree with a distinguished vertex, the root, such that each vertex Hes on a directed path to the root. Binary tree: Rooted tree where each vertex has at most two incoming edges. Layered {di)graph: The vertices are partitioned into sets, called layers. A rooted tree can be viewed as a layered digraph where the layers are sets of vertices at the same distance from the root. k-layered (di)graph: Layered (di)graph with k layers.
2.2. Types of drawings In a drawing of a graph, vertices are represented by points (or by geometric figures such as circles or rectangles) and edges are represented by curves such that any two edges intersect at most in a finite number of points. Except for Section 4.8, which covers three-dimensional drawings, we consider drawings in the plane. Also, we do not address the problem of labeling the vertices and edges (see, e.g., [25,103]). Polyline drawing: Each edge is a polygonal chain (Figure 1(a)). Straight-line drawing: Each edge is a straight-line segment (Figure 1(b)). Orthogonal drawing: Each edge is a chain of horizontal and vertical segments (Figure 1(c)). Bend: In a polyline drawing, point where two segments part of the same edge meet (Figure 1(a)). Crossing: Point where two edges intersect (Figure 1(b)). Grid drawing: Polyline drawing such that vertices, crossings and bends have integer coordinates. Planar drawing: No two edges cross (see Figure 1(d)). Planar (di)graph: Admits a planar drawing. Embedded (di)graph: Planar (di)graph with a prespecified topological embedding (i.e., set of faces), which must be preserved in the drawing. Upward drawing: Drawing of a digraph where each edge is monotonically nondecreasing in the vertical direction (see Figure 1(d)).
941
Graph drawing
(a)
(b)
(c)
(d)
Fig. 1. Types of drawings: (a) polyline drawing of ^^3 3; (b) straight-line drawing of ^^3 3; (c) orthogonal drawing of ^^3 3; (d) planar upward drawing of an acyclic digraph.
Upward planar digraph: Admits an upward planar drawing. Layered drawing: Drawing of a layered graph such that vertices in the same layer lie on the same horizontal line (also called hierarchical drawing). Face: A region of the plane defined by a planar drawing, where the unbounded region is called the external face. Convex drawing: Planar straight-line drawing such that the boundary of each face is a convex polygon. Visibility drawing: Drawing of a graph based on a geometric visibility relation. E.g., the vertices might be drawn as horizontal segments, and the edges associated with vertically visible segments. Proximity drawing: Drawing of a graph based on a geometric proximity relation. E.g., a tree is drawn as the Euclidean minimum spanning tree of a set of points. Dominance drawing: Upward drawing of an acyclic digraph such that there exists a directed path from vertex u to vertex v if and only if xiu) ^ x{v) and y{u) ^y{v), where x(-) and y{-) denote the coordinates of a vertex. hv-drawing: Upward orthogonal straight-line drawing of a binary tree such that the drawings of the subtrees of each node are separated by a horizontal or vertical line. Straight-line and orthogonal drawings are special cases of polyline drawings. Polyline drawings provide great flexibility since they can approximate drawings with curved edges. However, edges with more than two or three bends may be difficult to "follow" for the eye. Also, a system that supports editing of polyline drawings is more complicated than one limited to straight-line drawings. Hence, depending on the application, polyline or straight-line drawings may be preferred. If vertices are represented by points, orthogonal drawings exist only for graphs of maximum vertex degree 4.
942
R. Tamassia
2.3. Properties of drawings Crossings (x): Total number of crossings in a drawing. Area: Area of the convex hull of the drawing. Total edge length: Sum of the lengths of the edges. Maximum edge length: Maximum length of an edge. Total number of bends: Total number of bends on the edges of a polyline drawing. Maximum number of bends: Maximum number of bends on an edge of a polyline drawing. Angular resolution (p): Smallest angle formed by two edges, or segments of edges, incident on the same vertex or bend, in a polyline drawing. Aspect-ratio: Ratio of the longest to the shortest side of the smallest rectangle with horizontal and vertical sides covering the drawing. In order to effectively draw a graph, we would like to take into account a variety of properties. For example, planarity and the display of symmetries are highly desirable in visualization applications. Also, it is customary to display trees and acyclic digraphs with upward drawings. In general, to avoid wasting valuable space on a page or a computer screen, it is important to keep the area of the drawing small. Drawing a graph can thus be formalized as a multi-objective optimization problem, where the layout of the graph is generated according to a prespecified set of aesthetics, i.e., general rules that are embodied in a layout algorithm. Commonly adopted graph drawing aesthetics include: • Minimization of the total number of crossings between edges. Ideally, we would like to have a planar drawing, but not every graph admits one. • Minimization of the area of the drawing. This aesthetic is meaningful only if the drawing convention adopted prevents drawings from being arbitrarily scaled down (e.g., grid drawing). • Minimization of the total number of bends along the edges. This aesthetic is especially important for orthogonal drawings, while it is trivially satisfied by straight-line drawings. • Minimization of the aspect ratio of the drawing. Ideally, we would like to have unit aspect ratio. • Maximization of the axial and rotational symmetries displayed by the drawing. This aesthetic can be further formalized by introducing a mathematical model of symmetries in graphs and drawings (see, e.g., [58,122,130]). Aesthetics are naturally associated with graph optimization problems. However, most such problems are computationally hard. Thus, many heuristic graph drawing techniques have been developed that work well in practice although they do not necessarily optimize the aesthetics.
Graph drawing
943
3. Bounds In this section, we overview upper and lower bounds on properties of various drawings of graphs, and discuss trade-offs between them. We also present upper and lower bounds on the time-complexity of fundamental graph drawing problems. For various classes of graphs and drawing types, many universal/existential upper and lower bounds for specific drawing properties have been discovered. Such bounds typically exhibit trade-offs between drawing properties. A universal bound applies to all the graphs of a given class. An existential bound applies to infinitely many graphs of a class, that is, there is an infinite family of graphs that exhibit the lower bound. In Sections 3.1, 3.2, and 3.3, we present bounds on the area, angular resolution, and number of bends, respectively. Tradeoffs between area and aspect-ratio as well as between area and angular resolution, are covered in Sections 3.4 and 3.5. Time complexity issues are discussed in Section 3.6. Throughout this chapter, we denote by n and m the number of vertices and edges of the graph being considered, respectively. 3.1. Area bounds We summarize in Tables 2-5 selected universal upper bounds and existential lower bounds on the area of drawings of trees, planar graphs, planar digraphs, and general graphs. Whenever we give bounds on the area, we assume that the drawing is constrained by some resolution rule that prevents it from being arbitrarily scaled down (e.g., we require a grid drawing, or a minimum unit distance between any two vertices). Whenever we say that the area requirement of a class of graphs is 0(f(n)) we mean that there are both an O(/(«)) universal upper bound and an Q{f{n)) existential lower bound on the area. The following general comments apply. • Bends have two effects on the area requirement. On one hand, bends occupy space and hence negatively affect the area. On the other hand, bends may help in routing edges without using additional space. • Linear or almost-linear bounds on the area can be achieved for trees, as shown in Table 2. See Table 8 for trade-offs between area and aspect-ratio in drawings of trees. • As shown in Table 3, planar graphs admit planar drawings with quadratic area. However, the area requirement of planar straight-line drawings may be exponential if high angular resolution is also desired. Almost linear area can be instead achieved in nonplanar drawings of planar graphs, which have applications to VLSI circuits. • As shown in Table 4, upward planar drawings provide an interesting trade-off between area and total number of bends. Indeed, unless the digraph is reduced, the area of a straight-line drawing is exponential in the worst case. A quadratic area bound is achieved only at the expense of a linear number of bends. 3.1.1. Area of drawings of trees. Tables 1 and 2 summarize selected universal upper bounds and existential lower bounds on the area of drawings of trees. All the bounds assume grid drawings.
944
R. Tamassia Table 1 Universal upper bounds and existential lower bounds on the area of downward drawings of rooted trees. We denote by a an arbitrary constant such that 0 < a < 1 Graph
Drawing
Area
Rooted tree
Layered (strictly downward) planar straight-line grid embeddingpreserving
Q{n^)
O(n0
[150]
Rooted tree
Downward planar straight-line grid
Qin)
0(«log«)
[33,158]
Binary tree
hv (downward planar straight-line orthogonal grid)
Q(n)
0(n\ogn)
[33,158]
Binary tree
Downward planar straight-line orthogonal grid
Q(n)
0(«log«)
[22]
Complete, AVL, and Fibonacci tree
Downward plcinar straight-line grid
Qin)
0(n)
[34,175]
Degree-0(«^) rooted tree
Downward planar polyline grid
Q(n)
0(n)
[80]
Binary tree
Downward planar orthogonal grid
Q (n log log n)
0(n\og\ogn)
[80]
Rooted tree
Strictly downward planar straight-line grid
Q{n\ogn)
0(nlog«)
[33]
Rooted tree
Downward embeddingpreserving planar polyline grid
Qin\ogn)
Oin\ogn)
[80]
Ref.
Rooted trees are usually represented by downward planar straight-line drawings. Layered drawings, e.g., [150], have quadratic area requirement. The drawing method of [33, 158] for general rooted trees (which constructs hv-drawings for binary trees) and the recursive winding method of [22] for binary trees yield 0(n logn) area. Linear-area drawing methods are known for AVL-trees (which include complete binary trees) and Fibonacci trees [33,34,175]. No nontrivial lower bounds on the area of downward planar straight-line drawings are known. Allowing bends in downward planar drawings reduces the area requirement. Indeed, for downward planar orthogonal drawings of binary trees, the area requirement is 0(n\oglogn) [80], and for downward planar polyline drawings of trees with maximum degree 0(n^), where a is an arbitrary constant such that 0 ^ a < 1, the area requirement is 0(n) [80].
Graph drawing
945
Table 2 Universal upper bounds and existential lower bounds on the area of drawings of trees Graph
Drawing
Area
Tree
Planar straight-line grid
Q{n)
0{n\ogn)
[33,158]
Binary tree
Planar straight-line orthogonal grid
^{n)
0{n\og\ogn)
[22]
Degree-0(«^) tree
Planar polyline grid
Q{n)
0{n)
[80]
Degree-4tree
Planar grid
Q{n)
0{n)
[178,118]
orthogonal
Ref.
All the above planar downward drawing methods have two limitations: • Horizontal edges may be used. Hence, the drawings are not strictly downward. • The embedding (i.e., order of the children of each node) is not preserved. E.g., in the hv-drawing method of [33] for binary trees, the larger subtree is always placed to the right of the smaller subtree. One can convert an hv-drawing of a binary tree with height h and width w into a strictly downward drawing with height h -\- w and width w [33]. Hence binary trees admit strictly downward drawings with O(nlogn) area. Also, there is a family of binary trees that require ^(nlogn) area in any strictly downward planar drawing [33]. The area requirement of embedding-preserving downward planar polyline drawings of rooted trees is 0(n logn) [80]. However, polyline drawings of trees are not aesthetically pleasing. If we do not require downwardness (e.g., because the tree is not rooted), better bounds can be achieved for orthogonal drawings. Namely, area 0(n log logn) can be achieved for planar straight-line orthogonal drawings of binary trees [22], and area 0(n) can be obtained for planar orthogonal drawings of trees with maximum degree 4 [178,118]. Note that the polyline drawing method of [80] and the straight-line orthogonal drawing method of [22] construct drawings with good aspect ratio. 3.1.2. Area of drawings of planar graphs. Table 3 summarizes selected universal upper bounds and existential lower bounds on the area of drawings of planar graphs. All the bounds assume grid drawings. There is an 0(n^) existential lower bound on the area of planar grid drawings of planar graphs. Such a lower bound is achieved, e.g., by a graph consisting ofn/3 nested triangles. Inductively, adding one more triangle to the graph causes both the width and height of the drawing to increase by at least one unit. IVIany techniques are available for constructing planar grid drawings with O(n^) area: • Various methods based on orientations and numberings yield polyline drawings. See, e.g., [49,51,109]. • Orthogonal drawings can be constructed with methods based on orientations and numberings (see, e.g., [11,109,168]) and on network flow (see, e.g., [48,85,165]).
946
R. Tamassia Table 3 Universal upper bounds and existential lower bounds on the area of drawings of planar graphs Graph
Drawing
Area
Planar graph
Tessellation representation with integer coordinates
QirP-)
0(n^)
[169]
Planar graph
Visibility representation with integer coordinates
Q{n^)
0(n2)
[153,167]
Planar graph
Embeddingpreserving planar polyline grid
^{n^)
Oin^)
[49,51,109]
Planar graph
Embeddingpreserving planar straight-line grid
Q(n^)
0(n2)
[39,157]
Triconnected planar graph
Embeddingpreserving planar straight-line convex grid
Q{r?)
0(«2)
[109]
Planar graph
Planar grid
Q(n^)
0(n2)
[11,48,85,109,165,168]
Planar degree-4 graph
(Nonplanar) thogonal grid
^(nlogn)
0{n\og^n)
[178,118,117,8]
orthogonal or-
Ref.
• Several methods are available for straight-line drawings (see [27,28,39,109,157]). • An algorithm in [109] constructs convex drawings, i.e., straight-line drawings such that all the faces are convex polygons, for triconnected planar graphs. Methods based on the planar separator theorem [123] and originally developed for VLSI layout applications construct (nonplanar) orthogonal grid drawings with 0(n log^ n) area [178,118,8]. An existential ^(n \ogn) lower bound on the area of (nonplanar) orthogonal grid drawings of planar graphs is also known [117].
3.1.3. Area of upward planar drawings ofplanar digraphs. Table 4 summarizes selected universal upper bounds and existential lower bounds on the area of upward drawings of planar digraphs. All the upper bounds assume grid drawings. Techniques based on orientations and numberings yield polyline drawings with O(n^) area. See, e.g., [49,51]. As for planar polyline drawings of undirected graphs, quadratic area is also a lower bound.
Graph drawing
947
Table 4 Universal upper bounds and existential lower bounds on the area of upward planar drawings of planar digraphs. We denote by b and c constants such that
\
Class
Drawing type
Area
Planar 5 r-graph
Tessellation representation with integer coordinates
Q{n^)
0(n^)
[169]
Planar 5/-graph
Visibility representation with integer coordinates
Qin'^)
0(n'^)
[153,167]
Upward planar digraph
Upward planar grid straight-line
Qib")
0(c«)
[51,81]
Reduced planar ^/-digraph
Dominance (upward) planar embeddingpreserving grid straight-hne
Q(n^)
0(n^)
[51]
Upward planar digraph
Upward planar grid polyhne
0(n^)
Q{n^)
[49,51]
Series-parallel digraph
Upward planar embeddingpreserving grid straight-line
^(/?«)
0(c«)
[4,81]
Series-parallel digraph
Upward planar grid straight-line
Q{n^)
0(n^)
[4]
For straight-line drawings the area requirement is exponential [51,81], even for embedding-preserving drawings of series-parallel digraphs [4]. 3.1.4. Area of drawings of general graphs. Table 4 summarizes selected universal upper bounds and existential lower bounds on the area of drawings of general graphs. All the bounds assume grid drawings. Techniques based on orientations yield 0(n^)-area orthogonal grid drawings for graphs of maximum degree 4 (see, e.g., [11,144,178]). A quadratic existential lower bound on the area also holds [178]. In order to draw a general graph, one can planarize it first, and then apply one of the planar drawing methods. This yields a drawing with 0((n + x)^) ^^"^^^ where x is the number of crossings of the drawing. Note that finding the minimum number of crossings is NP-hard (see Section 3.6). A tighter O(m^) area bound is obtained with orientation techniques [13,141,146].
948
R. Tamassia Table 5 Universal upper bounds and existential lower bounds on the area of drawings of general graphs. We denote by x the number of crossings in the drawing Graph
Drawing
Area
Degree-4 graph
Orthogonal grid
QirP-)
0(«2)
[178,156]
Degree-4 graph
Orthogonal grid
Q{n^)
«2
[11]
Degree-4 graph
Orthogonal grid
Q{n^)
0.76n2
[147,148]
General graph
Orthogonal grid
^{n + x)
0{m^)
[13,141,146]
Ref.
Table 6 Universal lower bounds and existential upper bounds on the angular resolution of drawings of graphs. We denote by d the maximum vertex degree of the graph, and with c a constant such that c > 1 Class
Drawing type
Angular resolution
General graph
Straight-line
-(0
General graph
Straight-line
Planar graph
Straight-line
«(^) ^(^)
Planar graph
Planar straight-line
^(»
Planar graph
Planar straight-line
"{^)
Planar graph
Planar polyline
^a)
Ref.
0(l/n)
o(i^)
[68]
K^) K/T)
[68]
0(l/n)
[39,157]
°(^)
[109]
[82,128]
3.2. Bounds on the angular resolution Table 6 summarizes selected universal lower bounds and existential upper bounds on the angular resolution of drawings of graphs. Recall that it is desirable to maximize the angular resolution. For general graphs, a trivial upper bound on the angular resolution is 2n/d, where d is the maximum vertex degree of the graph. This fact implies an existential 0{\/n) upper bound. By placing all the vertices of the graph at the vertices of a regular n-gon, one obtains a trivial matching Q{\/n) universal lower bound. Existential upper bounds dependent only on d are known for straight-line drawings [68] and for planar straight-line drawings [82]. A coloring technique [68] can be used to prove the following universal lower bounds on the angular resolution of straight-line (nonplanar) drawings: Q{^)for general graphs and ^ ( ^ ) for planar graphs. For planar straight-line drawings, Q{\/n^) angular resolution is achieved by any planar straight-line grid drawing with 0(n) height and 0(n) width, such as those constructed by
949
Graph drawing
Table 7 Universal upper bounds and existential lower bounds on the total number of bends and maximum number of bends per edge in orthogonal drawings. We consider only connected simple graphs. Some bounds hold only for n greater than a small constant. E.g., in any planar orthogonal drawing of K4 (resp. the skeleton graph of an octahedron) there is an edge with at least two (resp. three) bends Graph
Drawing at least
Graph
Orthogonal
Degree-4 graph
Orthogonal
¥"
Bends at most
Ref. per edge
m
1
[146]
2« + 2
2
[10,11,144, 148]
Degree-3 graph
Orthogonal
0.5n
1
[9,144,148]
Planar degree-4 graph
Orthogonal planar
2n-2
2« + 2
2
[11,173]
Planar degree-4 graph
Orthogonal planar embeddingpreserving
2n-2
^"+2
3
[65, 124, 167, 172]
Biconnected planar degree-4 graph
Orthogonal planar embeddingpreserving
2n-2
2w + 2
3
[65, 124, 167, 172]
Triconnected planar degree-4 graph
Orthogonal planar embeddingpreserving
^(«-l) + 2
fn + 4
2
[109]
Planar degree-3 graph
Orthogonal planar embeddingpreserving
\nAr\
in + 1
1
[109,124]
the algorithms of [39,157]. On the other hand, the best known lower bound dependent only on d is Q{\), where c > 1 is a constant; this is achieved using a circle packing method [128]. Note that there is a wide gap between the known upper and lower bounds, which depend only on J, on the angular resolution of planar straight-line drawings. Polyline drawings can achieve optimal -^C^) angular resolution, which is obtained through an orientation technique [109]. Trade-offs between the area and the angular resolution are discussed in Section 3.5.
3.3. Bounds on the number of bends Table 7 summarizes selected universal upper bounds and existential lower bounds on the total and maximum number of bends in orthogonal drawings.
R. Tamassia
950
Table 8 Universal upper bounds that can be simultaneously achieved for the area and aspect-ratio in drawings of trees. We denote by a an arbitrary constant such that 0 ^ a < 1 Class
Drawing type
Area
Aspect-ratio
Ref.
Rooted tree
Layered (upward planar straightline) grid
0(^2)
0(1)
[150]
Rooted tree
Upward planar straight-line grid
0(nlog/i)
0{n/\ogn)
[33,158]
Binary tree
Upward planar straight-line orthogonal grid
0(«loglog«)
0(1)
[22]
Rooted degree0(n^)tree
Upward planar polyline grid
0(n)
0(«^)
[80]
Binary tree
Upward planar orthogonal grid
0(/iloglog/i)
0{n log log «/ log^ n)
[80]
Binary tree
Planar straight-line orthogonal grid
0{n\ogn)
0(1)
[22]
Degree-4 tree
Planar grid
0{n)
0(1)
[178,118]
orthogonal
All the upper bounds are achieved by drawing algorithms based on orientations and numberings (see, e.g., [13,11,66,109,125,141,144,147,148,146,168]). Lower bounds are discussed in [173] and [10].
3.4. Trade-off between area and aspect-ratio A variety of trade-offs for the area and aspect-ratio arise even when drawing graphs with a simple structure, such as trees. Table 8 summarizes selected universal bounds that can be simultaneously achieved on the area and the aspect-ratio of various types of drawings of trees. Downward planar drawings are the most natural way of visualizing rooted trees. Except for binary trees (see [22]), the existing straight-line drawing techniques are unsatisfactory with respect to either the area requirement (see, e.g., [150]) or the aspect ratio (see, e.g., [33,158]). Regarding polyline drawings, linear area can be achieved with a prescribed 0{n^) aspect ratio, where a is an arbitrary constant such that 0 ^ « < 1 (see [80]). For non-upward drawings of trees, 0{n log log «) area and 0(1) aspect ratio are achievable in planar straight-line orthogonal grid drawings of binary trees [22], and 0{n) area and and 0(1) aspect ratio are possible for planar orthogonal drawings of degree-4 trees [178, 118]. However, the latter method does not seem to yield aesthetically pleasing drawings, and is more suited for VLSI layout than for visualization applications.
Graph drawing
951
Table 9 Asymptotic bounds for the area and angular resolution that can be simultaneously achieved in drawings of graphs. We denote by b and c constants such that b > 1 and c > 1 Class
Drawing type
Area
Angular resol.
Ref.
Planar graph
Straight-line
0(d^n)
[68]
Planar graph
Straight-line
0(d^n)
<^)
[68]
Planar graph
Planar straight-line grid
0{r?)
^(^)
[39,157]
Degree-O(l) planar graph
Planar straight-line
X2(c«)
^(1)
[82,128]
Planar graph
Planar straight-line
^(c^")
Q(p)
[82]
Planar graph
Planar straight-line
0(^")
^(^)
[128]
Planar graph
Planar polyline grid
0(«2)
<^)
[109]
3.5. Trade-off between area and angular resolution There are trade-offs between the area and the angular resolution. Table 9 summarizes selected universal bounds that can be simultaneously achieved. Good simultaneous bounds can be achieved only in nonplanar straight-line drawings [68] and planar polyline drawings [109]. Indeed, there is a class of 0(1)-degree planar graphs that require exponential area in any planar straight-line drawing with optimal ^ ( 1 ) angular resolution [82,128]. This result can be extended to a continuous tradeoff between area and angular resolution in planar straight-line drawings [82].
3.6. Bounds on the computational complexity Results on the computational complexity of planarity testing and embedding problems are summarized in Table 10. It is interesting to observe that apparently similar problems exhibit very different time complexities. For example, while planarity testing can be done in linear time [14,23,67,40,96,119], upward planarity testing is NP-hard (see [83]). Note that for restricted classes of digraphs, upward planarity testing can be performed in polynomial time (see [6,5,98,140]). The technique for constructing orthogonal drawings of graphs presented in [12,146] runs in 0(n + m) time. The computational complexity of other general techniques for drawings graphs is difficult to summarize because each of the steps of a given technique can be implemented with different algorithms. Detecting and displaying symmetries in drawings of general graphs is NP-hard [129]. Table 11 summarizes the computational complexity of several problems arising in constructing straight-line and polyline drawings of planar graphs. It is NP-hard to construct
952
R. Tamassia Table 10 Time complexity of selected graph drawing problems: planarity testing and embedding Class
Problem
Complexity
Ref.
General graph
Minimize crossings
NP-hard
[78]
2-layered graph with preassigned order on one layer
Minimize crossings in a layered drawing
NP-hard
[65]
General graph
Maximum planar subgraph
NP-hard
[77]
General graph
Planarity testing and computing a planar embedding
0{n)
[14,23,67,40, 96,119]
General graph
Maximal planar subgraph
0{n-\-m)
[50,89,116,54]
General digraph
Upward planarity testing
NP-hard
[83]
Embedded digraph
Upward planarity testing
Q{n),0{rp-)
[5]
Outerplanar digraph
Upward planarity testing
Q{n),0{rP')
[140]
Embedded outerplanar digraph
Upward planarity testing
0{n)
[140]
Single-source digraph
Upward planarity testing
G{n)
[6,98]
planar straight-line drawings with prescribed edge lengths [64], prescribed angles [79], or maximum angular resolution [79,109]. Linear time algorithms have been devised for the following problems: test the existence of a planar straight-line drawing with prescribed angles for a maximal planar graph [53]; construct planar grid drawings with quadratic area [28,39,109,157]; construct planar straight-line strictly convex drawings [24,176,177]; construct upward planar grid straight-line dominance and polyline drawings [49,51]. Constructing orthogonal grid drawings with 0{n^) area and 0{n) bends can be done in 0{n) time for degree-4 graphs (see [11,144,147,148]). If the input graph is planar, planar orthogonal grid drawings with the same bounds on the area and number of bends can be constructed in 0{n) time (see [11,109,168]. Minimizing the number of bends in planar orthogonal drawings is NP-hard [83]. However, the problem can be solved in polynomial time if the input graph has a prescribed embedding (see [85,165]) or has degree at most 3 [48]. The above results are summarized in Table 12. A polynomial time algorithm based on linear programming minimizes the area of a planar straight-line upward layered drawing of a tree that displays symmetries and isomorphisms of subtrees [163]. Note that the drawing constructed by this algorithm is not, in general, a grid drawing. A polynomial time algorithm based on dynamic programming minimizes the area of hv-drawings of binary trees [60]. IMany other drawing optimization problems are NP-hard for trees, including area and edge-length minimization in planar grid drawings [7,16,55,87,113,160,163]. Also, it is NP-hard to determine whether a tree can be drawn as the Euclidean minimum spanning tree of a set of points in the plane [63]. Efficient drawing algorithms that guarantee good universal upper bounds on the area are known for rooted trees (see [33,22,80,150,158]).
953
Graph drawing
Table 11 The time complexity of selected graph drawing problems: straight-line and polyline drawings of planar graphs Class
Problem
Complexity
Ref.
Planar graph
Planar straight-line drawing with prescribed edge lengths
NP-hard
[64]
Embedded planar graph
Planar straight-line drawing with prescribed angles
NP-hard
[79]
Maximal planar graph
Planar straight-line drawing with prescribed angles
0(n)
[53]
Planar graph
Planar straight-line drawing with maximum angular resolution
NP-hard
[79,109]
Planar graph
Planar straight-line grid drawing with 0{n^) area and Q{\/n^) angular resolution
@(n)
[28,39,74,157]
Planar graph
Planar polyline grid drawing with 0{n ) area, 0{n) bends, and Q(\/d) angular resolution
0{n)
[109]
Planar graph
Visibility representation 0{n^) area
with
0(^)
[49,52,108,153, 167]
Triconnected planar graph
Planar straight-line convex grid drawing with O(n^) area and Q{l/n^) angular resolution
0{n)
[109]
Triconnected planar graph
Planar straight-line strictly convex drawing
@{n)
[24,176,177]
Outerplanar graph
Planar straight-line drawing
symmetric
©{n)
[131]
Reduced planar ^?-digraph
Upward planar grid straight-line dominance drawing with minimum area
©{n)
[51]
Upward planar digraph
Upward planar polyline grid drawing with 0{n^) area and 0{n) bends
©in)
[49,51]
4. Techniques for drawing graphs In this section, we present examples of techniques for constructing drawings of graphs.
4.1. Force-directed approach Force-directed methods construct straight-hne drawings of general graphs using a physical model where the vertices and edges of the graph are viewed as physical objects subject to
954
R. Tamassia Table 12 The time complexity of selected graph drawing problems: orthogonal drawings of graphs with degree at most 4 Class
Problem
Complexity
Ref.
Degree-4 graph
Orthogonal grid drawing with 0{n^) area and 0(«) bends
@{n)
[11,144,147, 148]
Planar degree-4 graph
Planar orthogonal grid drawing with 0{n^) area and 0(/i) bends
@{n)
[11,109,168]
Planar degree-4 graph
Planar orthogonal grid drawing with minimum number of bends
NP-hard
[83]
Planar degree-3 graph
Planar orthogonal grid drawing with minimum number of bends and 0(«^) area
Q{n),0{rr'\ogn)
[48]
Embedded planar degree-4 graph
Planar orthogonal grid drawing with minimum number of bends and O(n^) area
Q{n),0{n^l^\ogn)
[85,165]
various forces. Starting from an initial random drawing, the graph evolves into afinaldrawing, which is a local minimum energy configuration of the physical system. Force-directed methods are referred in the literature also as spring methods Sind physical simulation methods. In Eades' spring embedder [57], every pair of vertices is connected by a "spring": • for adjacent vertices, the spring has unit natural length, thus attracting the vertices unless they are at the "ideal" unit distance; also, the spring has logarithmic strength, i.e., the intensity fa of the attractive force exerted on its endpoints depends on the length I according to the following formula: fa = Ca log£, where Q is a parameter; • for nonadjacent vertices, the spring has infinite natural length, thus always repelling the vertices; also, the spring has inverse-square strength, i.e., the intensity fr of the repulsive force exerted on its endpoints depends on the length i according to the following formula: fr = Cr/t^, where Cr is a parameter. Rather than solving a system of differential equations, the evolution of the system is usually simulated using numerical methods. The simulation consists of a sequence of steps (see Figure 2). At each step, for each vertex v, the resulting force / on u is computed, and V is translated by A / , where A is a displacement parameter. The force-directed approach was pioneered in [57,115]. Notable developments include [38,72,73,90,105,161]. In particular: • The method of [105] uses forces that attempt to place vertices such that, for a pair of vertices u and u, their Euclidean distance in the drawing is equal to their graphtheoretic
Graph drawing
955
Table 13 The time complexity of selected graph drawing problems: trees. We denote by A: a constant such that
Class
Problem
Complexity
Ref.
Tree
Draw as the Euclidean minimum spanning tree of a set of points in the plane
NP-hard
[63]
Degree-4 tree
Minimize area in planar orthogonal grid drawing
NP-hard
[16,55,113, 160]
Degree-4 tree
Minimize total/maximum edge length in planar orthogonal grid drawing
NP-hard
[7,16,87]
Minimize area in a planar straight-line upward layered grid drawing that displays symmetries and isomorphisms of subtrees
NP-hard
[163]
Minimize area in a planar straight-line upward layered drawing that displays symmetries and isomorphisms of subtrees
X2(n),0(«^)
[163]
Binary tree
Minimize area in hv-drawing
Q(n),
[60]
Rooted tree
Planar straight-line upward layered grid drawing with 0{n^) area
0(n)
[150]
Rooted tree
Planar polyline upward grid drawing with 0(n) area
@(n)
[80]
Rooted tree
Planar straight-line upward grid drawing with 0{n\ogn) area
0(n)
[33,158,22]
Rooted tree
Rooted tree
0(n^nlogn)
distance d(u,v) in the graph (the length of a path with the fewest edges connecting them); thus, in their approach, edge (u, v) has ideal length d(u,v). • In [73] a complex system of forces similar to that of subatomic particles and celestial bodies is proposed; also, the size of the drawing is controlled by assuming that the boundary of the prespecified drawing region acts as a "wall". • The method of [38] does not use forces explicitly, but defines an energy function that takes into account vertex distribution, edge-lengths, and edge-crossings; the simulated annealing method is used to find a drawing with low energy. It is interesting to note that a classical drawing algorithm for planar graphs, the barycentric method by Tutte [176,177], can be reinterpreted as a constrained force-directed method. An experimental comparison of various force-directed methods [19] indicates that draw-
956
R. Tamassia
(0 Fig. 2. Simulation of the evolution of a drawing in the spring embedder algorithm: (a) initial drawing; (b) drawing at an intermediate step; (c) final drawing.
ing algorithms based on the force-directed approach have several advantages. Namely, they are: • relatively simple to implement; • straightforward to parameterize; • easy to extend by adding new forces; • usually effective for small graphs with regular structure; • often able to detect and display symmetries in the graph (see, e.g., Figure 2); • capable of preserving the user's "mental map" by providing a continuous evolution of the drawing from the initial to the final configuration. Disadvantages include: • the running time for large graphs is rather slow; • only straight-line drawings are supported; • the properties of the generated drawings (e.g., area, crossings) are difficult to analyze theoretically.
4.2. Layering approach The layering approach for constructing polyline drawings of directed graphs transforms the digraph into a layered digraph and then constructs a layered drawing. A typical algorithm based on the layering approach consists of the following main steps:
Graph
drawing
957
Fig. 3. Schematic illustration of the planarization approach.
1. Assign each vertex to a layer, with the goal of maximizing the number of edges oriented upward. 2. Insert fictitious vertices along the edges crossing layers, such that each edge in the resulting digraph connects vertices in consecutive layers. (The fictitious vertices will be displayed as bends in the final drawing.) 3. Permute the vertices on each layer with the goal of minimizing crossings. 4. Adjust the position of the vertices in each layer with the goal of distributing the vertices uniformly and minimizing the number of bends. Most of the subproblems involved in the various steps are NP-hard, hence heuristics must be used. The layering approach was pioneered in [162]. The most notable developments of this technique appear in [76,75].
4.3. Planarization approach The planarization approach is motivated by the availability of many efficient and wellanalyzed drawing algorithms for planar graphs. If the graph is nonplanar, it is transformed into a planar graph by means of a preliminary planarization step that replaces each crossing with a fictitious vertex, and then a drawing method for planar graphs is applied (see Figure 3).
958
R. Tamassia
(d) Fig. 4. Simple planarization method: (a) initial graph; (b) partition of the edges into planar (solid) and nonplanar (dashed); (c) dual graph (dotted) used to route the nonplanar edges; (d) final planarized graph.
A successful drawing algorithm based on the planarization approach and a bendminimization method [165] (see Section 4.5) is described in [166]. Systems based on this algorithm have been been widely used in information visualization applications. Finding the minimum number of crossings or a maximum planar subgraph are NP-hard problems [78]. Hence, existing planarization algorithms use heuristics. A simple planarization method that uses as a subroutine an algorithm for finding a planar subgraph works as follows (see Figure 4): 1. compute a planar subgraph of the input graph, and partition the edges into "planar" and "nonplanar" accordingly; 2. construct a planar embedding of the planar subgraph; 3. add the nonplanar edges, one at at a time, minimizing each time the number of crossings introduced. The computation in Step 3 of the above algorithm for a certain nonplanar edge (w, v) is equivalent to finding a shortest path in the dual graph of the current embedding from the faces incident to u to the faces incident to v. A simple heuristic for Step 1, computes a "maximal" planar subgraph S of the input graph G as follows: 1. start with subgraph S consisting only of the vertices of G, but no edges; 2. for each edge ^ of G, if the graph obtained by adding ^ to 5 is planar, then add e to S and classify e as "planar", else reject e and classify it as "nonplanar". The best available heuristic for the maximum planar subgraph problem is described in [102]. This method has a soUd theoretical foundation in polyhedral combinatorics, and achieves good results in practice.
Graph
drawing
959
Fig. 5. Example of a visibility representation.
4.4. Proximity and visibility drawings Proximity drawings include Gabriel, relative neighborhood, Delaunay, sphere of influence, and minimum spanning tree drawings. Increasing attention has been devoted to the problem of characterizing the classes of graphs that admit various types of proximity drawings. A survey of this area appears in [47]. Proximity drawings of trees are investigated in [15]. The problem of representing a tree as an Euclidean minimum spanning trees is studied in [63]. A visibility representation F of a graph G (see Figure 5) draws each vertex f as a horizontal segment, called vertex-segment F (v), and each edge (u, v) as a vertical segment, called edge-segment r(u,v), such that: • the vertex-segments do not overlap; • the edge-segments do not overlap; • edge-segment r(u,v) has its endpoints on r(u) and r(v), and does not intersect any other vertex-segment. The study of visibility representations was originally motivated by VLSI layout and compaction problems. Visibility representations are studied in [49,56,111,126,153,167, 170,174,180]. Algorithms that construct visibility representations in linear time are given in [49,108,153,167]. A complete combinatorial characterization of three classes of visibility representations and linear time drawing algorithms are presented in [167]. Related work includes [1,41,110,114]. A visibility representation of a planar graph G with integer coordinates and 0(n^) area can be computed in 0(n) time. We can also construct a planar polyline drawing of a planar graph G starting from a visibility representation of G as follows [49]: we draw each vertex of G at an arbitrary point of its vertex-segment, and each edge (u, u) of G as a three-segment polygonal chain whose middle segment is a subset of the edge-segment of (u,v). E.g., a possible choice for the placement of P(v) is the middle point of vertexsegment r(v). Examples of polyline drawings obtained from the visibility representation of Figure 5 are shown in Figure 6.
960
R. Tamassia
Fig. 6. Polyline drawings derived from the visibility representation of Figure 5: (a) median positioning; (b) "longedge" positioning with integer coordinates.
4.5. Flow and orthogonal drawings An important aesthetic for planar orthogonal drawings is the minimization of the number of bends (see Figure 7). Minimizing bends in planar orthogonal drawings can be modeled as a minimum cost flow problem on a flow network derived from the graph and its embedding. In this flow network, each unit of flow corresponds to a 7r/2 angle, the vertices are producers of four units of flow, the faces consume an amount of flow proportional to the number of angles in their interior, and each bend transfers a unit of flow across its incident faces. By giving unit cost to the flow associated with bends, we have that a drawing with the minimum number of bends corresponds to a flow of minimum cost. This yields a quadratic-time algorithm for bend minimization. This technique was first presented in [165], with variations and refinements given in [48,70,71,85,164,166,172].
4.6. Orientation and orthogonal drawings A technique based on first orienting a given graph into an acyclic digraph, and then constructing an orthogonal drawing one vertex at time, following the topological order induced
961
Graph drawing
I
#
1
(a)
(b)
Fig. 7. Two planar orthogonal drawings of the same embedded planar graph: (a) drawing with 9 bends; (b) drawing with 6 bends. The drawing in part (b) has the minimum number of bends.
by the orientation, has been used in several algorithms that achieve good bounds on the area and the number of bends [13,11,144,141,146-148]. For example, the algorithm of [144,147,148] constructs an orthogonal grid drawing of a degree-4 biconnected graph with at most 0J6n^ area and at most 2n + 2 bends, and the algorithm of [141,146] constructs an orthogonal grid drawing of an arbitrary graph with area at most m^/2 and such that each edge has at most one bend. The above algorithms have linear running time. 4.7. Dynamic graph drawing Many applications require human interaction during the design process, where the user is given the ability to alter the graph as the design progresses. Interactive, or dynamic, graph drawing addresses the problem of maintaining a drawing of a graph while the user is interactively modifying the graph. Layout adjustment methods were proposed in [135] for rearranging a diagram to avoid overlapping nodes, and for changing the focus of interest of the user in a diagram. The layout adjustment methods of [135] have the property that they preserve the user's "mental map", that is, the way that the user visualizes and understands the drawing. A technique for restructuring a layered drawing of tree in time proportional to its height is presented in [136]. An interactive drawing system for layered drawings is presented in [137]. An interactive system based on force-directed methods and constraint resolution is presented in [154]. Methods for performing queries and updates on an implicit representation of a drawing of a graph are presented in [29]. Specifically algorithms are presented for maintaining planar drawings of trees, series-parallel graphs, and planar ^/^-graphs. Most updates of the data structures require logarithmic time. A systematic approach to dynamic graph drawing is presented in [143,145], where several scenaria for interactive graph drawing are introduced. In the no-change scenario, the coordinates of the already placed vertices, bends and edges do not change at all after an update operation. In the relative-coordinates scenario, the general shape of the current drawing remains the same after an update. However, the coordinates of some vertices and edges may change by a small amount.
962
R. Tamassia
Practical techniques for the incremental restructuring of an orthogonal drawing under the relative-coordinates scenario are presented in [21,134]. Methods that incrementally construct an orthogonal drawing under the relative-coordinates and no-change scenaria are presented in [12,69,143,145,142].
4.8. Three-dimensional drawings of graphs Of special appear to computational geometers is the study of 3D convex drawings. A 3D convex drawing of a graph G is a realization of G by the skeleton of a 3D convex polytope. The well-known Steinitz's theorem says that a graph admits a 3D convex drawing if and only if it is planar and triconnected [159] (see also Griinbaum [88]). Onn and Sturmfels [139] show how to construct a 3D convex grid drawing within a cube of side 0(w^^^" ). Maxwell [133] (see also [31,32,179]) describes a mapping that transforms a 2D convex drawings with a certain "equilibrium stress property" into a 3D convex drawing. Further results on this transformation are given in [97]. Eades and Garvan [59] show how to construct 3D convex drawings by combining the above transformation with the 2D-drawing method of Tutte [176,177]. They also show that their drawings have exponential volume in the worst case. Smith [95] claims a polynomial-time algorithm for constructing a 3D convex drawing inscribed in a sphere, with vertex coordinates represented by 0(nlog/i)-bit numbers, for an n-vertex graph known to be inscribable. Das and Goodrich [37] present a linear-time algorithm for constructing a 3D convex drawing of a maximal planar graph such that the vertex coordinates are rational numbers that can be represented with a polynomial number of bits. Chrobak, Goodrich and Tamassia [26] have shown how to construct in 0{n^-^) time a 3D convex drawing with 0{n) volume such that the vertex coordinates are represented by 0{n logn)-bit rational numbers and any two vertices are at distance at least one. Additional theoretical work on 3D graph drawing is presented in [1,30,26,61,62,86,91, 99,121,149]. Systems for 3D graph visualization are described in [84,151,152]).
4.9. Constraint satisfaction in graph drawing Research in graph drawing has traditionally focused on algorithmic methods, where the drawing of the graph is generated according to a prespecified set of aesthetic criteria (such as planarity or area minimization) that are embodied in an algorithm. Although the algorithmic approach is computationally efficient, it does not naturally support constraints, i.e., requirements that the user may want to impose on the drawing of a specific graph (e.g., clustering or aligning a given set of vertices). Previous work has shown that only a rather limited constraint satisfaction capability can be added to existing drawing algorithms (see, e.g., [52,166]). A formalism for the declarative specification of drawings of graphs with Prolog predicates and an associated constraint solving mechanism have been developed by Kamada [104]. Using this formalism, one can express several simple geometric constraints
Graph drawing
963
among the vertices, such as horizontal or vertical alignment, circular arrangement, and relative X- or y-ordering. Each constraint can be specified as being rigid or "pliable". Rigid constraints must be satisfied exactly, while pliable constraints can be satisfied approximately. The constraint-solving mechanism is based on the least square method. Marks et al. [42,112,132] provide a notation for describing the desired perceptual organization of a layout of a graph by means of a collection of layout patterns called visual organization features, which include clustering, zoning, sequential placement, T shape, and hub shape. They also present three methods that take as input a graph and a set of visual organization features, and produce an aesthetically pleasing drawing that exhibits the specified visual organization features. The first method is rule-based and implemented in Prolog. The second method is a genetic algorithm designed for execution on a massively parallel computer. The third, method [42] incrementally improves an initial randomly-generated drawing using a force-directed technique, and is the most practical. This approach has also been used within an interactive graph drawing system [154]. Luders et al. [127] present a combinatorial approach for satisfying inequality constraints between vertex coordinates within a graph drawing system. Kamps et al. [106] show how to extend force-directed methods to support the following geometric constraints: fixed vertex positions, fixed distances between pairs of vertices, relative x- or y-ordering, and horizontal or vertical alignment. A comprehensive approach to constrained graph drawing is presented by He and Marriott [92]. They give a general model that supports: • the specification of arbitrary arithmetic linear equality and inequality constraints on the coordinates of the vertices; and • suggested coordinates for the vertices, each with an associated weight, which denotes the strength of the suggestion. They show how to extend the force-directed approach by Kamada and Kawai [105] to support such constraints using a technique based on the "active set method" that is fast and gives good results in practice. They also present a simplified approach for constrained drawings of rooted trees. Eades and Lin [120] attempt to combine algorithmic and constraint-based declarative methods in drawings of trees. Brandenburg presents a comprehensive approach to graph drawing based on graph grammars [17], where drawings are generated by rule-based methods. A visual approach to graph drawing, where the layout of a graph is pictorially specified "by example," is proposed by Cruz and Garg [36]. Within this approach, a graph is stored in an object-oriented database, and its drawing is defined used recursive visual rules of the visual meta-language DOODLE [35].
4.10. Comparative studies Many graph drawing algorithms have been implemented and used in practical applications. Most papers show sample outputs, and some also provide limited experimental results on small test suites (see, e.g., [38,73,76,102,104,107,155] and the experimental papers in [18, 43,138,171]). However, in order to evaluate the practical performance of a graph drawing
964
R. Tamassia
algorithm in visualization applications, it is essential to perform extensive experimentations with input graphs derived from the application domain. The performance of four planar straight-line drawing algorithms on 10,000 randomly generated maximal planar graphs is compared by Jones et al. [100]. Himsolt [93] presents a comparative study of twelve graph drawings algorithms based on various approaches. The experiments are conducted on 100 sample graphs with the graph drawing system GraphEd [94]. Many examples of drawings constructed by the algorithms are shown, and various objective and subjective evaluations on the aesthetic quality of the drawings produced are given. Brandenburg et al. [19] compare five "force-directed" methods for constructing straightline drawings of general undirected graphs. The algorithms are tested on a a wide collection of examples and with different settings of the force parameters. The quality measures evaluated are crossings, edge length, vertex distribution, and running time. They also identify tradeoffs between the running time and the aesthetic quality of the drawings produced. Jiinger and Mutzel [101] investigate crossing minimization strategies for straight-line drawings of 2-layer graphs, and compare the performance of eight popular heuristics for this problem. Various upward drawing algorithms for directed acyclic graphs are compared by Di Battista et al. in [45]. In [46,2] Di Battista et al. present an extensive experimental study comparing four orthogonal drawing algorithms for general graphs. In [142], Papakostas et al. report on an experimental study in the performance of the relative-coordinates and no-change scenaria for interactive orthogonal graph drawing. In general, the experimental studies mentioned in this section show that fine tuning an algorithm beyond the schematic description typically provided in the literature greatly affects the quality of the output and the running time.
Acknowledgement I would like to thank loannis G. Tollis for useful comments.
References [1] H. Alt, M. Godau and S. Whitesides, Universal ?>-dimensional visibility representations for graphs. Graph Drawing (Proc. GD '95), F.J. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, Springer-Verlag (1996), 8-19. [2] G.D. Battista, A. Garg, G. Liotta, R. Tamassia, E. Tassinari and F. Vargiu, An experimental comparison of four graph drawing algorithms, Comput. Geom. 7 (1997) 303-326. [3] G. Di Battista, P. Fades, R. Tamassia and I.G. Tollis, Graph Drawing, Prentice-Hall (1999). [4] P. Bertolazzi, R.F. Cohen, G. Di Battista, R. Tamassia and I.G. Tollis, How to draw a series-parallel digraph, Intemat. J. Comput. Geom. Appl. 4 (1994), 385^02. [5] P. Bertolazzi, G. Di Battista, G. Liotta and C. Mannino, Upward drawings of triconnected digraphs, Algorithmica 6 (12) (1994), 476-497. [6] P. Bertolazzi, G. Di Battista, C. Mannino and R. Tamassia, Optimal upward planarity testing of singlesource digraphs, Proc. 1st Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 726, Springer-Verlag (1993), 37-48.
Graph drawing
965
[7] S. Bhatt and S. Cosmadakis, The complexity of minimizing wire lengths in VLSI layouts, Infomi. Process. Lett. 25 (1987), 263-267. [8] S.N. Bhatt and F.T. Leighton, A framework for solving VLSI graph layout problems, J. Comput. Syst. Sci. 28 (1984), 300-343. [9] T. Biedl, Improved orthogonal drawings of 3-graphs, Proc. 8th Canad. Conf. Comput. Geom. (1996), 295-299. [10] T. Biedl, New lower bounds for orthogonal graph drawings. Graph Drawing (Proc. GD '95), F.J. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, Springer-Verlag (1996), 28-39. [11] T. Biedl and G. Kant, A better heuristic for orthogonal graph drawings, Proc. 2nd Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 855, Springer-Verlag (1994), 24-35. [12] T. Biedl and M. Kaufmann, Area-efficient static and incremental graph drawings, Proc. 5th Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 1284, Springer-Verlag (1997), 37-52. [13] T.C. Biedl, Orthogonal graph visualization: The three-phase method with applications, PhD thesis, RUTCOR, Rutgers University (May 1997). [14] K. Booth and G. Lueker, Testing for the consecutive ones property interval graphs and graph planarity using PQ-tree algorithms, J. Comput. Syst. Sci. 13 (1976), 335-379. [15] P. Bose, W. Lenhart and G. Liotta, Characterizing proximity trees, Algorithmica 16 (1996), 3-110. (Special issue on Graph Drawing, edited by G. Di Battista and R. Tamassia.) [16] F.J. Brandenburg, Nice drawings of graphs and trees are computationally hard. Technical Report MIP8820, Fakultat fur Mathematik und Informatik, Univ. Passau (1988). [17] F.J. Brandenburg, Designing graph drawings by layout graph grammars. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 416-427. [18] F.J. Brandenburg, ed.. Graph Drawing (Proc. GD '95), Lecture Notes in Comput. Sci. 1027, SpringerVerlag (1996). [19] F.J. Brandenburg, M. Himsolt and C. Rohrer, An experimental comparison of force-directed and randomized graph drawing algorithms. Graph Drawing (Proc. GD '95), F.J. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, Springer-Verlag (1996), 76-87. [20] S. Bridgeman, A. Garg and R. Tamassia, A graph drawing and translation service on the WWW, Graph Drawing (Proc. GD '96), S.C. North, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1997). [21] S.S. Bridgeman, J. Fanto, A. Garg, R. Tamassia and L. Vismara, Interactivegiotto: An algorithm for interactive orthogonal graph drawing, Graph Drawing (Proc. GD '97), G. Di Battista, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1998). [22] T. Chan, M.T. Goodrich, S.R. Kosaraju and R. Tamassia, Optimizing area and aspect ratio in straight-line orthogonal tree drawings. Graph Drawing (Proc. GD '96), S. North, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1997). [23] N. Chiba, T. Nishizeki, S. Abe and T. Ozawa, A linear algorithm for embedding planar graphs using PQ-trees, J. Comput. Syst. Sci. 30 (1) (1985), 54-76. [24] N. Chiba, K. Onoguchi and T. Nishizeki, Drawing planar graphs nicely. Acta Inform. 22 (1985), 187-201. [25] J. Christensen, J. Marks and S. Shieber, An empirical study of algorithms for point-feature label placement, ACM Trans. Graph. 14 (1995), 202-232. [26] M. Chrobak, M.T. Goodrich and R. Tamassia, Convex drawings of graphs in two and three dimensions, Proc. 12th Annu. ACM Sympos. Comput. Geom. (1996), 319-328. [27] M. Chrobak and S. Nakano, Minimum-width grid drawings of plane graphs. Graph Drawing (Proc. GD '94), R. Tamassia and LG. Tolhs, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 104110. [28] M. Chrobak and T. Payne, A linear-time algorithm for drawing planar graphs. Inform. Process. Lett. 54 (1995), 241-246. [29] R.F. Cohen, G. Di Battista, R. Tamassia and I.G. Tollis, Dynamic graph drawings: Trees, series-parallel digraphs and planar ST-digraphs, SIAM J. Comput. 24 (5) (1995), 970-1001. [30] R.F. Cohen, P. Fades, T. Lin and F. Ruskey, Three-dimensional graph drawing. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 1-11. [31] R. Connelly, Rigidity and energy. Invent. Math. 66 (1982), 11-33. [32] H. Crapo and W. Whitely, Statics offrameworks and motions of panel structures, a projective geometric introduction. Structural Topology 6 (1982), 42-82.
966
R. Tamassia
[33] P. Crescenzi, G. Di Battista and A. Pipemo, A note on optimal area algorithms for upward drawings of binary trees, Comput. Geom. 2 (1992), 187-200. [34] P. Crescenzi and A. Pipemo, Optimal-area upward drawings ofAVL trees. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 307-317. [35] I.F. Cruz, DOODLE: A visual language for object-oriented databases, Proc. ACM SIGMOD Conf. on Management of Data (1992), 71-80. [36] I.F. Cruz and A. Garg, Drawing graphs by example efficiently: Trees and planar acyclic digraphs. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, SpringerVerlag (1995), 404^15. [37] G. Das and M.T. Goodrich, On the complexity of approximating and illuminating three-dimensional convex polyhedra, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955, SpringerVerlag (1995), 74-85. [38] R. Davidson and D. Harel, Drawing graphics nicely using simulated annealing, ACM Trans. Graph. 15 (4) (1996), 301-331. [39] H. de Fraysseix, J. Pach and R. Pollack, How to draw a planar graph on a grid, Combinatorica 10 (1990), 41-51. [40] H. de Fraysseix and P. Rosenstiehl, A depth-first-search characterization ofplanarity, Ann. Discrete Math. 13 (1982), 75-80. [41] A.M. Dean and J.P. Hutchinson, Rectangle-visibility representations of bipartite graphs. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 159-166. [42] E. Dengler, M. Friedell and J. Marks, Constraint-driven diagram layout, Proc. IEEE Sympos. on Visual Languages (1993), 330-335. [43] G. Di Battista, ed.. Graph Drawing (Proc. GD '97), Lecture Notes in Comput. Sci., Springer-Verlag (1998). [44] G. Di Battista, P. Fades, R. Tamassia and I.G. Tolhs, Algorithms for drawing graphs: an annotated bibliography, Comput. Geom. 4 (1994), 235-282. [45] G. Di Battista, A. Garg, G. Liotta, A. Parise, R. Tamassia, E. Tassinari, F Vargiu and L. Vismara, Drawing directed graphs: An experimental study. Graph Drawing (Proc. GD '96), S. North, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1997). [46] G. Di Battista, A. Garg, G. Liotta, R. Tamassia, E. Tassinari and F. Vargiu, An experimental comparison of three graph drawing algorithms, Proc. 11th Annu. ACM Sympos. Comput. Geom. (1995), 306-315. [47] G. Di Battista, W. Lenhart and G. Liotta, Proximity drawability: A survey. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tolhs, eds, Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 328-339. [48] G. Di Battista, G. Liotta and F Vargiu, Spirality of orthogonal representations and optimal drawings of series-parallel graphs and 3-planar graphs, Proc. Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 709, Springer-Verlag (1993), 151-162. [49] G. Di Battista and R. Tamassia, Algorithms for plane representations of acyclic digraphs, Theoret. Comput. Sci. 61 (1988), 175-198. [50] G. Di Battista and R. Tamassia, On-line planarity testing, SIAM J. Comput. 25 (1996), 956-997. [51] G. Di Battista, R. Tamassia and I.G. Tolhs, Area requirement and symmetry display of planar upward drawings. Discrete Comput. Geom. 7 (1992), 381^01. [52] G. Di Battista, R. Tamassia and I.G. Tolhs, Constrained visibility representations of graphs. Inform. Process. Lett. 41 (1992), 1-7. [53] G. Di Battista and L. Vismara, Angles ofplanar triangular graphs, Proc. 25th Annu. ACM Sympos. Theory Comput. (1993), 431^37. [54] H.N. Djidjev, A linear algorithm for the maximal planar subgraph problem, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci., Springer-Verlag (1995). [55] D. Dolev, F T Leighton and H. Trickey, Planar embedding of planar graphs. Adv. Comput. Res., Vol. 2, F.P Preparata, ed., JAI Press, Greenwich, Conn. (1985), 147-161. [56] P. Duchet, Y. Hamidoune, M.L. Vergnas and H. Meyniel, Representing a planar graph by vertical lines joining different levels. Discrete Math. 46 (1983), 319-321. [57] P. Fades, A heuristic for graph drawing, Congr. Numer. 42 (1984), 149-160.
Graph drawing
967
[58] P. Eades, Symmetry finding algorithms. Computational Morphology, G.T. Toussaint, ed., North-Holland, Amsterdam, Netherlands (1988), 41-51. [59] P. Eades and P. Garvan, Drawing stressed planar graphs in three dimensions. Graph Drawing (Proc. GD '95), FJ. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, Springer-Verlag (1996). [60] P. Eades, T. Lin and X. Lin, Minimum size h-v drawings, Proc. Advanced Visual Interfaces, World Scientific Series in Comput. Sci., Vol. 36 (1992), 386-394. [61] P. Eades, C. Stirk and S. Whitesides, The techniques of Kolmogorov and Bardzinfor three dimensional orthogonal graph drawings. Inform. Process. Lett. 60 (1996), 97-103. [62] P. Eades, A. Symvonis and S. Whitesides, Two algorithms for three-dimensional orthogonal graph drawing. Graph Drawing (Proc. GD '96), S. North, ed.. Lecture Notes in Comput. Sci. 1190, Springer-Verlag (1997), 139-154. [63] P. Eades and S. Whitesides, The realization problem for Euclidean minimum spanning trees is NP-hard, Algorithmica 16 (1996), 60-82. (Special issue on Graph Drawing, edited by G. Di Battista and R. Tamassia.) [64] P. Eades and N. Wormald, Fixed edge length graph drawing is NP-hard, Discrete Appl. Math. 28 (1990), 111-134. [65] P. Eades and N. Wormald, Edge crossings in drawings of bipartite graphs, Algorithmica 11 (1994), 379403. [66] S. Even and G. Granot, Grid layouts of block diagrams — bounding the number of bends in each connection. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 64-75. [67] S. Even and R.E. Tarjan, Computing an st-numbering, Theoret. Comput. Sci. 2 (1976), 339-344. [68] M. Formann, T. Hagerup, J. Haralambides, M. Kaufmann, F.T. Leighton, A. Simvonis, E. Welzl and G. Woeginger, Drawing graphs in the plane with high resolution, SIAM J. Comput. 22 (1993), 10351052. [69] U. FoBmeier, Interactive orthogonal graph drawing: Algorithms and bounds. Graph Drawing (Proc. GD '97), G. Di Battista, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1998). [70] U. FoBmeier and M. Kaufmann, On bend-minimum orthogonal upward drawing of directed planar graphs. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 52-63. [71] U. FoBmeier and M. Kaufmann, Drawing high degree graphs with low bend numbers. Graph Drawing (Proc. GD '95), F.J. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, Springer-Verlag (1996), 254266. [72] A. Frick, A. Ludwig and H. Mehldau, A fast adaptive layout algorithm for undirected graphs. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, SpringerVerlag (1995), 388^03. [73] T. Fruchterman and E. Reingold, Graph drawing by force-directed placement, Softw.-Pract. Exp. 21 (11) (1991), 1129-1164. [74] M. Purer, X. He, M.-Y. Kao and B. Raghavachari, 0(n log log n)-work parallel algorithms for straight-line grid embeddings of planar graphs, SIAM J. Discrete Math. 7 (4) (1994), 632-647. [75] E.R. Gansner, E. Koutsofios, S.C. North and K.P. Vo, A technique for drawing directed graphs, IEEE Trans. Softw. Eng. 19 (1993), 214-230. [76] E.R. Gansner, S.C. North and K.P. Vo, DAG — A program that draws directed graphs, Softw.-Pract. Exp. 18 (11) (1988), 1047-1062. [77] M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W.H. Freeman, New York, NY (1979). [78] M.R. Garey and D.S. Johnson, Crossing number is NP-complete, SIAM J. Algebraic Discrete Methods 4 (3) (1983), 312-316. [79] A. Garg, On drawing angle graphs. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds, Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 84-95. [80] A. Garg, M.T. Goodrich and R. Tamassia, Planar upward tree drawings with optimal area, Internat. J. Comput. Geom. Appl. 6 (1996), 333-356. [81] A. Garg and R. Tamassia, Efficient computation of planar straight-line upward drawings. Graph Drawing '93 (Proc. ALCOM Workshop on Graph Drawing) (1993).
968
R. Tamassia
[82] A. Garg and R. Tamassia, Planar drawings and angular resolution: Algorithms and bounds, Proc. 2nd Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 855, Springer-Verlag (1994), 12-23. [83] A. Garg and R. Tamassia, On the computational complexity of upward and rectilinear planarity testing. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 286-297. [84] A. Garg and R. Tamassia, GI0TT03D: A system for visualizing hierarchical structures in 3D, Graph Drawing (Proc. GD '96), S. North, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1997). [85] A. Garg and R. Tamassia, A new minimum cost flow algorithm with applications to graph drawing. Graph Drawing (Proc. GD '96), S.C. North, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1997). [86] A. Garg, R. Tamassia and P. Vocca, Drawing with colors, Proc. 4th Annu. European Sympos. Algorithms, Lecture Notes in Comput. Sci. 1136, Springer-Verlag (1996), 12-26. [87] A. Gregori, Unit length embedding of binary trees on a square grid. Inform. Process. Lett. 31 (1989), 167-172. [88] B. Grunbaum, Convex Polytopes, Wiley, New York, NY (1967). [89] J.C.X. Han and R.E. Tarjan, An 0(m\ogn)-time algorithm for the maximal subgraph problem, SIAM J. Comput. 22 (1993), 1142-1162. [90] D. Harel and M. Sardas, Randomized graph drawing with heavy-duty preprocessing, J. Visual Lang. Comput. 6(3) (1995). (Special issue on Graph Visualization, edited by I.F. Cruz and P. Eades.) [91] S.M. Hashemi and I. Rival, Upward drawings to fit surfaces, Proc. Workshop on Orders, Algorithms and Applications, Lecture Notes in Comput. Sci. 831, Springer-Verlag (1994), 53-58. [92] W. He and K. Marriott, Constrained graph layout. Graph Drawing (Proc. GD '96), S. North, ed.. Lecture Notes in Comput. Sci. 1190, Sringer-Verlag (1997), 217-232. [93] M. Himsolt, Comparing and evaluating layout algorithms within GraphEd, J. Visual Lang. Comput. 6(3) (1995), 255-273. (Special issue on Graph Visualization, edited by I.F. Cruz and P. Eades.) [94] M. Himsolt, GraphEd: A graphical platform for the implementation of graph algorithms. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 182-193. [95] C D . Hodgson, I. Rivin and W.D. Smith, A characterization of convex hyperbolic polyhedra and of convex polyhedra inscribed in the sphere. Bull. (New Series) of the AMS 27 (2) (1992), 246-251. [96] J. Hopcroft and R.E. Tarjan, Efficient planarity testing, J. ACM 21 (4) (1974), 549-568. [97] J.E. Hopcroft and P.J. Kahn, A paradigm for robust geometric algorithms, Algorithmica 7 (1992), 339380. [98] M.D. Hutton and A. Lubiw, Upward planar drawing of single source acyclic digraphs, Proc. 2nd ACMSIAM Sympos. Discrete Algorithms (1991), 203-211. [99] T. Jeron and C. Jard, 3D layout of reachability graphs of communicating processes. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. Tollis, eds, Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 25-32. [100] S. Jones, P. Eades, A. Moran, N. Ward, G. Delott and R. Tamassia, A note on planar graph drawing algorithms. Technical Report 216, Department of Computer Science, University of Queensland (1991). [101] M. Jtinger and P. Mutzel, Exact and heuristic algorithms for 2-layer straightline crossing minimization. Graph Drawing (Proc. GD '95), F.J. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, SpringerVerlag (1996), 337-348. [102] M. Jiinger and P. Mutzel, Maximum planar subgraphs and nice embeddings: Practical layout tools, Algorithmica 16 (1996), 33-59. (Special issue on Graph Drawing, edited by G. Di Battista and R. Tamassia.) [103] K.G. Kakoulis and I.G. Tollis, An algorithm for labeling edges of hierarchical drawings. Graph Drawing (Proc. GD '97), G. Di Battista, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1998). [104] T. Kamada, Visualizing Abstract Objects and Relations, World Scientific Series in Computer Science (1989). [105] T. Kamada and S. Kawai, An algorithm for drawing general undirected graphs. Inform. Process. Lett. 31 (1989), 7-15. [106] T. Kamps, J. Kleinz and J. Read, Constraint-based spring-model algorithm for graph layout. Graph Drawing (Proc. GD '95), F.J. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, Springer-Verlag (1996), 349-360.
Graph drawing
969
[107] G. Kant, Algorithms for drawing planar graphs, PhD thesis, Dept. Comput. Sci., Univ. Utrecht, Utrecht, Netherlands (1993). [108] G. Kant, A more compact visibility representation, Proc. 19th Intemat. Workshop Graph-Theoret. Concepts Comput. Sci. (1993). [109] G. Kant, Drawing planar graphs using the canonical ordering, Algorithmica 16 (1996), 4-32. (Special issue on Graph Drawing, edited by G. Di Battista and R. Tamassia.) [110] G. Kant, G. Liotta, R. Tamassia and I. ToUis, Area requirement of visibility representations of trees, Proc. 5th Canad. Conf. Comput. Geom. (1993), 192-197. [ I l l ] D.G. Kirkpatrick and S.K. Wismath, Weighted visibility graphs of bars and related flow problems, Proc. 1st Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 382, Springer-Verlag (1989), 325-334. [112] C. Kosak, J. Marks and S. Shieber, Automating the layout of network diagrams with specified visual organization, IEEE Trans. Syst. Man Cybem. 24(3) (1994), 440-454. [113] M.R. Kramer and J. van Leeuwen, The complexity of wire-routing and finding minimum area layouts for arbitrary VLSI circuits. Adv. Comput. Res., P.P. Preparata, ed., Vol. 2, JAI Press, Greenwich, Conn. (1985), 129-146. [114] E. Kranakis, D. Krizanc and J. Urrutia, On the number of directions in visibility representations of graphs. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds, Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 167-176. [115] J.B. Kruskal and J.B. Seery, Designing network diagrams, Proc. First General Conference on Social Graphics, U.S. Department of the Census (1980), 22-50. [116] J. A. La Poutre, Alpha-algorithms for incremental planarity testing, Proc. 26th Annu. ACM Sympos. Theory Comput. (1994), 706-715. [117] F.T. Leighton, New lower bound techniques for VLSI, Math. Syst. Theory 17 (1984), 47-70. [118] C.E. Leiserson, Area-efficient graph layouts (for VLSI), Proc. 21st Annu. IEEE Sympos. Found. Comput. Sci. (1980), 270-281, 1980. [119] A. Lempel, S. Even and I. Cederbaum, An algorithm for planarity testing of graphs. Theory of Graphs: Intemat. Symposium (Rome 1966), Gordon and Breach, New York (1967), 215-232. [120] T. Lin and P. Fades, Integration of declarative and algorithmic approaches for layout creation. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds. Lecture Notes in Comput. Sci. 894, SpringerVerlag (1995), 376-387. [121] G. Liotta and G. Di Battista, Computing proximity drawings of trees in the 3-dimensional space, Proc. 4th Workshop Algorithms Data Struct., Lecture Notes in Comput. Sci. 955, Springer-Verlag (1995), 239-250. [122] R.J. Lipton, S.C. North and J.S. Sandberg, A method for drawing graphs, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 153-160. [123] R.J. Lipton and R.E. Tarjan, Applications of a planar separator theorem, SIAM J. Comput. 9 (1980), 615-627. [124] Y. Liu, P. Marchioro, R. Petreschi and B. Simeone, Theoretical results on at most I-bend embeddability of graphs. Technical Report, Dipartimento di Statistica, Univ. di Roma "La Sapienza" (1990). [125] Y. Liu, A. Morgana and B. Simeone, General theoretical results on rectilinear embeddability of graphs. Acta Math. Appl. Sinica 7 (1991), 187-192. [126] F. Luccio, S. Mazzone and C. Wong, A note on visibility graphs. Discrete Math. 64 (1987), 209-219. [127] P. Luders, R. Ernst and S. Stille, An approach to automatic display layout using combinatorial optimization, Software-Practice and Experience 25 (11) (1995), 1183-1202. [128] S. Malitz and A. Papakostas, On the angular resolution of planar graphs, SIAM J. Discrete Math. 7 (1994), 172-183. [129] J. Manning, Computational complexity of geometric symmetry detection in graphs. Lecture Notes in Comput. Sci. 507 (1991), 1-7. [130] J. Manning, M. Atallah, K. Cudjoe, J. Lozito and R. Pacheco, A system for drawing graphs with geometric symmetry. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds. Lecture Notes Comput. Sci. 894, Springer-Verlag (1995), 262-265. [131] J. Manning and M.J. Atallah, Fast detection and display of symmetry in outerplanar graphs. Discrete Appl. Math. 39 (1992), 13-35. [132] J. Marks, A formal specification for network diagrams that facilitates automated design, J. Visual Lang. Comput. 2 (1991), 395-414.
970
R. Tamassia
[133] J.C. Maxwell, On reciprocal figures and diagrams offerees, Phil. Mag. Ser. 27 (1864), 250-261. [134] K. Miriyala, S.W. Homick and R. Tamassia, An incremental approach to aesthetic graph layout, Proc. Intemat. Workshop on Computer-Aided Software Engineering (1993). [135] K. Misue, P. Eades, W. Lai and K. Sugiyama, Layout adjustment and the mental map, J. Visual Lang. Comput. 6 (2) (1995), 183-210. [136] S. Moen, Drawing dynamic trees, IEEE Software 7 (1990), 21-28. [137] S. North, Incremental layout in DynaDAG, Graph Drawing (Proc. GD '95), F.J. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, Springer-Verlag (1996), 409^18. [138] S. North, ed.. Graph Drawing (Proc. GD '96), Lecture Notes in Comput. Sci. 1190, Springer-Verlag (1997). [139] S. Onn and B. Sturmfels, A quantitative Steinitz' theorem, Beitrage zur Algebra und Geometric/ Contributions to Algebra and Geometry 35 (1994), 125-129. [140] A. Papakostas, Upward planarity testing of outerplanar dags. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds, Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 298-306. [141] A. Papakostas, Information visualization: Orthogonal drawings of graphs, PhD thesis. Department of Computer Science, University of Texas at Dalla (November 1996). [142] A. Papakostas, J. M. Six and I.G. ToUis, Experimental and theoretical results in interactive graph drawing. Graph Drawing (Proc. GD '96), S. North, ed., Lecture Notes in Comput. Sci. 1190, Springer-Verlag (1997), 371-386. [143] A. Papakostas and I.G. ToUis, Interactive orthogonal graph drawing, IEEE Trans. Comput. 47 (11) (1998), 1297-1309. [144] A. Papakostas and I.G. ToUis, Improved algorithms and bounds for orthogonal drawings. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds. Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 40-51. [145] A. Papakostas and I.G. ToUis, Issues in interactive orthogonal graph drawing. Graph Drawing (Proc. GD '95), F.J. Brandenburg, ed.. Lecture Notes in Comput. Sci. 1027, Springer-Verlag (1996), 419^30. [146] A. Papakostas and I.G. ToUis, Orthogonal drawing of high degree graphs with small area and few bends, Proc. WADS '97, Lecture Notes in Comput. Sci., Springer-Verlag (1997). [147] A. Papakostas and I.G. ToUis, A pairing technique for area-efficient orthogonal drawings. Graph Drawing (Proc. GD '96), S. North, ed., Lecture Notes in Comput. Sci. 1190, Springer-Verlag (1997), 354-370. [148] A. Papakostas and I.G. ToUis, Algorithms for area-efficient orthogonal drawings, Comput. Geom. (1998). [149] A. Papakostas and I.G. ToUis, Incremental orthogonal graph drawing in three dimensions. Graph Drawing (Proc. GD '97), G. Di Battista, ed.. Lecture Notes in Comput. Sci., Springer-Verlag (1998). [150] E. Reingold and J. Tilford, Tidier drawing of trees, IEEE Trans. Softw. Eng. SE-7 (2) (1981), 223-228. [151] S.P. Reiss, An engine for the 3D visualization of program information, J. Visual Lang. Comput. 6 (3) (1995). (Special issue on Graph Visualization, edited by I.F Cruz and P. Eades.) [152] G.G. Robertson, J.D. Mackinlay and S.K. Card, Cone trees: Animated 3D visualizations of hierarchical information, Proc. ACM Conf. on Human Factors in Computing Systems (1991), 189-193. [153] P. Rosenstiehl and R.E. Tarjan, Rectilinear planar layouts and bipolar orientations of planar graphs. Discrete Comput. Geom. 1 (4) (1986), 343-353. [154] K. Ryall, J. Marks and S. Shieber, An interactive system for drawing graphs. Graph Drawing (Proc. GD '96), S. North, ed.. Lecture Notes in Comput. Sci. 1190, Springer-Verlag (1997), 387-393. [155] G. Sander, Graph layout through the VCG tool. Graph Drawing (Proc. GD '94), R. Tamassia and I.G. ToUis, eds, Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995), 194-205. [156] M. Schaffter, Drawing graphs on rectangular grids. Discrete Appl. Math. 63 (1995), 75-89. [157] W. Schnyder, Embedding planar graphs on the grid, Proc. 1st ACM-SIAM Sympos. Discrete Algorithms (1990), 138-148. [158] Y. Shiloach, Arrangements of planar graphs on the planar lattice, PhD thesis, Weizmann Institute of Science (1976). [159] E. Steinitz and H. Rademacher, Vorlesungen iiber die Theorie der Polyeder, Julius Springer, Berlin, Germany (1934). [160] J.A. Storer, On minimal node-cost planar embeddings. Networks 14 (1984), 181-212. [161] K. Sugiyama and K. Misue, Graph drawing by magnetic-spring model, J. Visual Lang. Comput. 6 (3) (1995). (Special issue on Graph Visualization, edited by I.F. Cruz and P. Eades.)
Graph drawing
971
[162] K. Sugiyama, S. Tagawa and M. Toda, Methods for visual understanding of hierarchical systems, IEEE Trans. Syst. Man Cybem. SMC-11 (2) (1981), 109-125. [163] K.J. Supowit and E.M. Reingold, The complexity of drawing trees nicely. Acta Inform. 18 (1983), 377392. [164] R. Tamassia, New layout techniques for entity-relationship diagrams, Proc. 4th Intemat. Conf. on EntityRelationship Approach (1985), 304-311. [165] R. Tamassia, On embedding a graph in the grid with the minimum number of bends, SIAM J. Comput. 16 (3) (1987), 421^44. [166] R. Tamassia, G. Di Battista and C. Batini, Automatic graph drawing and readability of diagrams, IEEE Trans. Syst. Man Cybem. SMC-18 (1) (1988), 61-79. [167] R. Tamassia and I.G. ToUis, A unified approach to visibility representations of planar graphs. Discrete Comput. Geom. 1 (4) (1986), 321-341. [168] R. Tamassia and I.G. ToUis, Planar grid embedding in linear time, IEEE Trans. Circuits Syst. CAS-36 (9) (1989), 1230-1234. [169] R. Tamassia and I.G. ToUis, Tessellation representations ofplanar graphs, Proc. 27th AUerton Conf. Commun. Control Comput. (1989), 48-57. [170] R. Tamassia and I.G. ToUis, Representations of graphs on a cylinder, SIAM J. Discrete Math. 4 (1) (1991), 139-149. [171] R. Tamassia and I.G. ToUis, eds, Graph Drawing (Proc. GD '94), Lecture Notes in Comput. Sci. 894, Springer-Verlag (1995). [172] R. Tamassia, I.G. ToUis and J.S. Vitter, Lower bounds and parallel algorithms for planar orthogonal grid drawings, Proc. IEEE Symposium on Parallel and Distributed Processing (1991), 386-393. [173] R. Tamassia, I.G. ToUis and J.S. Vitter, Lower bounds for planar orthogonal drawings of graphs. Inform. Process. Lett. 39 (1991), 35-^0. [174] C. Thomassen, Plane representations of graphs. Progress in Graph Theory, J.A. Bondy and U.S.R. Murty, eds. Academic Press, New York, NY (1984), 43-69. [175] L. Trevisan, A note on minimum-area upward drawing of complete and Fibonacci trees. Inform. Process. Lett. 57 (5) (1996), 231-236. [176] W.T. Tutte, Convex representations of graphs, Proc. London Math. Soc. 10 (3) (1960), 304-320. [177] W.T. Tutte, How to draw a graph, Proc. London Math. Soc. 13 (3) (1963), 743-768. [178] L. Valiant, Universality considerations in VLSI circuits, IEEE Trans. Comput. C-30 (2) (1981), 135-140. [179] W. Whitney, Motions and stresses ofprojected polyhedra. Structural Topology 7 (1982), 13-38. [180] S.K. Wismath, Characterizing bar line-of-sight graphs, Proc. 1st Annu. ACM Sympos. Comput. Geom. (1985), 147-152.
This Page Intentionally Left Blank
CHAPTER 22
Art Gallery and Illumination Problems Jorge Urrutia* Instituto de Matemdticas, Universidad Nacional Autonoma de Mexico, Mexico D.F., Mexico
Contents 1. Introduction 1.1. Basic terminology 2. Four theorems in Art Galleries and Illumination 2.1. Chvatal's classical Art Gallery theorem 2.2. Guarding traditional art galleries 2.3. Illuminating families of convex sets 2.4. A floodlight illumination problem 3. Variations on the Art Gallery problem 3.1. Edge guards, vertex guards, etc 3.2. The complexity of the Art Gallery theorem 3.3. Orthogonal polygons 3.4. Polygons with holes 3.5. Orthogonal polygons with holes 3.6. Edge and mobile guards 3.7. The Fortress and Prison Yard problems 4. Generalized guards and hidden sets 4.1. Lj visibility for orthogonal polygons 5. Floodlight illumination problems 5.1. Floodlight illumination of orthogonal polygons 5.2. TT-floodlights 6. Illuminating families of convex sets on the plane 6.1. Illuminating line segments on the plane 6.2. Illuminating using line segments 7. Watchman, Robber, Safari, and Zoo-keeper's Routes 7.1. The Watchman Route problem 7.2. The Robber Route problem 7.3. The Zoo-keeper's and the Safari Route problems 7.4. Vision points on watchman routes 8. Mobile guards 8.1. The Hunter's problem 8.2. The two guard problem *The author was supported by NSERC Operating Grant.
HANDBOOK OF COMPUTATIONAL GEOMETRY Edited by J.-R. Sack and J. Urrutia © 1999 Elsevier Science B.V All rights reserved
973
975 975 977 978 978 980 981 982 982 983 984 985 986 987 990 993 995 995 998 999 1001 1004 1005 1006 1006 1009 1009 1010 1011 1011 1013
974
/. Urrutia
8.3. Lazy guards 8.4. Treasures in art galleries 9. Miscellaneous 9.1. Polyhedral terrains 9.2. Protecting convex sets 9.3. Cooperative guards 9.4. Guarding polygons using consecutive edges or vertex sets 9.5. A:-guarding 9.6. Minimizing and maximizing visibility 9.7. The Searchlight problem 9.8. Coverings and partitionings of polygons 10. Conclusions and further directions of research References
1013 1014 1015 1015 1016 1016 1017 1018 1019 1019 1020 1022 1023
Abstract In 1973, Victor Klee posed the following question: How many guards are necessary, and how many are sufficient to patrol the paintings and works of art in an art gallery with n walls? This wonderfully naive question of combinatorial geometry has, since its formulation, stimulated a plethora of papers, surveys and a book, most of them written in the last fifteen years. The first result in this area, due to V. Chvatal, asserts that L|J guards are occasionally necessary and always sufficient to guard an art gallery represented by a simple polygon with n vertices. Since Chvatal's result, numerous variations on the art gallery problem have been studied, including mobile guards, guards with limited visibility or mobility, illumination of families of convex sets on the plane, guarding of rectilinear polygons, and others. In this paper, we survey most of these results.
Art gallery and illumination problems
975
1. Introduction Illumination problems have always been a popular topic of study in Mathematics. For example, it is well known that the boundary of any smooth compact convex set on the plane can always be illuminated using three light sources. One famous—and until recently open—^problem on illumination is attributed to Ernst Strauss (see E.G. Strauss and V. Klee [83]), who in the early fifties posed the following problem: Suppose that we live in a two-dimensional room whose walls form a simple closed polygon P and each wall is a mirror. 1. Is it true that if we place a light at any point of P, all of P will be illuminated using reflected rays as well as direct rays? 2. Is there necessarily a point from which a single light source will illuminate the entire room using reflected rays as well as direct rays? The first part of Strauss's problem was recently proved to be false by G.W. Tokarsky [123]. Tokarsky's proof is surprisingly simple, using basic concepts of geometry that are easily understandable. We refer the interested reader to Tokarsky's original manuscript which is clearly written and a pleasure to read. The second part of Strauss's conjecture, though, remains open. It would be nice if a "simple" proof for it could be obtained. More closely related to our topic of interest here is a question posed by V. Klee during a conference in Stanford in August 1976. Klee's question was: How many guards are always sufficient to guard any polygon with n vertices! Soon after, V. Chvatal established what has become known as ChvataVs Art Gallery theorem, namely: that [f J guards are always sufficient and occasionally necessary to cover a simple polygon with n vertices [26]. Since the publication of this original result, a tremendous amount of research on illumination or Art Gallery problems has been carried out by mathematicians and computer scientists. In 1987, J. O'Rourke [99] published Ar^ Gallery Theorems and Algorithms, the first book dedicated solely to the study of illumination problems of polygons on the plane. The publication of this book further fueled the study of Art Gallery type problems, and many variations to the original Art Gallery theorem have since been studied. In 1992, T. Shermer [110] published a thorough survey paper on Art Gallery problems. Since then a large number of papers in this area have appeared, and some important open problems have been solved. In this survey, we try to cover most of the results published to date in Art Gallery or Illumination theorems. Visibility graphs, studied in O'Rourke's book and Shermer's survey, will not be covered in this survey; they are surveyed in another paper in this volume.
1.1. Basic terminology A polygon P is an ordered sequence of points pi,..., pn, n ^ 3, called the vertices of P together with the set of line segments joining pi to pz+i, i = 1 , . . . , n — 1 and pn to pi, called the edges of P. P is called simple if any two non-consecutive edges do not intersect. A simple polygon divides the plane into two regions, an unbounded one called the exterior
976
J. Urrutia
Fig. 1. A simple and an orthogonal polygon.
region and a bounded one, the interior. Henceforth to simpHfy our presentation, the term polygon will be used to denote simple polygons together with their interior. A simple polygon is called orthogonal if all its edges are parallel to either the x-axis or the y-axis. Given two points p and ^ of a polygon P, we say that p is visible from q if the line segment joining /? to ^ is totally contained in P. A collection H of points of P illuminates or guards P if every point M of P is visible from a point p in H. The term illuminates follows the notion that if at each element of H we place a light source that emits light in all directions P is totally illuminated. The use of the term guard follows the notion that if we station a guard at each element of //, all of P is guarded. To illuminate the orthogonal polygon in Figure 1 we need four lights. We remark at this point that the terms illumination and guarding will be used interchangeably in this manuscript. Our choice of whether to "guard" or "illuminate" an object depends mainly on the term used in the original paper in which a particular result was proved. A triangulation 7 of a polygon P is a partitioning of P into a set of triangles with pairwise disjoint interiors in such a way that the edges of those triangles are either edges or diagonals of P joining pairs of vertices. It is easy to see that any triangulation of a polygon P with n vertices contains exactly n — 2 triangles. Triangulations of polygons play a central role in the study of Art Gallery problems. The problem of finding efficient algorithms to triangulate polygons has received much attention in Computational Geometry. In 1978, Garey, Johnson, Preparata and Tarjan [58] obtained the first 0(n\nn) time triangulation algorithm. This result was improved in 1988 by Tarjan and van Wyk to 0(n In In /i) [ 122]. Finally in 1990, Chazelle [ 19] obtained an optimal linear time algorithm to solve this problem. At the time some of the algorithmic results surveyed here were published, they contained a logarithmic or double logarithmic factor introduced by the use of a triangulation algorithm. In these cases, these factors have been dropped. A graph G(V, E) consists of a set of elements V called the vertices of G(V, E), together with a set E of pairs of vertices of G(y, E) called the edges of G( V, £"). Two vertices u andf of G(y, E) are called adjacent if the pair {w, v} is an element of £^. A graph G(y, E) is planar if it can be drawn on the plane in such a way that its vertices are represented by points on the plane, and each edge {u, v} of G(V, E) is represented by a simple curve
Art gallery and illumination problems
977
joining points representing u and v. Moreover two edges of G(y, E) may only intersect at their endpoints. A path of G(y, E) is a sequence of distinct vertices v\,. ..,Vk such that vi and Vi^\ are adjacent in G{y, E), i = I,.. .,k — I, k^2. A cycle of G(V, E) is a path v\,.. .,Vk together with the edge [vk,v\},k^?). A graph G{y,E) is called connected if for every pair of vertices u and v of G{V,E), there exists a path u = v\,...,Vk = v starting at u and ending at f, otherwise G{V,E) is called disconnected. A graph G{V, E) is called k-connected if, when we remove any m vertices of G(y, E) together with the edges adjacent to them, we obtain a connected graph, m
THEOREM
For the case of planar graphs, we will use the following result by T. Nishizeki extensively: THEOREM 1.2 (Nishizeki [94]). Any planar 2-connected graph G with n ^ 14 vertices and minimum vertex degree greater than or equal to 3 has a matching with at least \J^^\ edges. When n ^\A, the number of edges in such a matching is [ f j .
The proofs of these results are not of concern in this work; the interested reader can find them in many books on graph theory.
2. Four theorems in Art Galleries and Illumination The study of Art Gallery problems deals mainly with illumination of polygons, families of convex sets and most recently, floodlight illumination problems; that is illumination
978
/. Urrutia
Fig. 2. Illustration of proof of Chvatal's Art Gallery theorem.
problems using light sources with restricted angle of illumination. To illustrate the main techniques used in this area of research, in this section we give four results with complete proofs. 2.1. ChvdtaVs classical Art Gallery theorem We start with the proof of Chvatal's Art Gallery theorem. The proof presented here is due to S. Fisk [54]. 2.1. [|J stationary guards are always sufficient and occasionally necessary to illuminate a polygonal art gallery with n vertices.
THEOREM
PROOF. Consider an arbitrary simple polygon P with n vertices. Obtain a triangulation T of P by adding n — 2 interior diagonals. (See Figure 2.) It is easy to see that we can color the vertices of P using three colors {1,2, 3} such that any two vertices joined by an edge of P or a diagonal of T receive different colors. This partitions the vertex set of P into three chromatic classes Ci, C2 and C3. Since the vertices of each triangle of T receive different colors, each chromatic class guards P. Place a guard at each vertex of the smallest chromatic class and our result follows. To see that [f J guards are sometimes needed, consider the comb polygon Combm with n = 3m vertices presented in Figure 2. It is easy to see that to guard P^ we need at least m guards. D
2.2. Guarding traditional art galleries In the classical Art Gallery theorem, an art gallery is a simple polygon on the plane. In a more realistic setting, a traditional art gallery is housed in a rectangular building subdivided into rectangular rooms. Assume that any two adjacent rooms have a door connecting them. (See Figure 3.)
Art gallery and illumination
problems
979
Fig. 3. Traditional art gallery and its dual graph.
How many guards need to be stationed in the gallery so as to guard all its rooms? Notice that if a guard is stationed at a door connecting two rooms, he will be able to guard both rooms at once, and since no guard can guard three rooms, it follows that if the art gallery has n rooms we need at least [|"| guards. We now prove: THEOREM 2.2 ([39]). Any rectangular art gallery with n rooms can be guarded with exactly |"|] guards. PROOF. Given a rectangular art gallery T with n rooms Ri,..., Rn,we can associate to it a dual graph G(T) by representing each room Rt of T by a vertex vt in G(T), two vertices being adjacent if their corresponding rectangles share a line segment in their common boundary. See Figure 3. Notice that the outermost boundary of the union of the rectangles corresponding to the vertices of any connected subgraph of G ( r ) form an orthogonal polygon. We now show that if G(T) has an even number of vertices, G(T) has a perfect matching M. This suffices to prove our result since our ffl points can now be chosen using M as follows: for every edge [vt, Vj} of G(T) in M, station a guard at the door connecting Ri and Rj. Clearly these guards will cover all the subrectangles of T. The case when G{T) has an odd number of vertices follows by subdividing any room of T into two. Let us now assume that G(T) has an even number of vertices. To prove that G{T) has a perfect matching, we will show that it satisfies the conditions stated in Tutte's Theorem for the existence of a perfect matching; namely that for any subset S of the vertices of G(T) the number of odd components of G(T) — S does not exceed \S\. Let k be the number of connected components of G(T) — S. Each connected component Q of G(T) — S is represented by an orthogonal subpolygon P/ of T. Each such polygon has at least four comer points, and thus the total number of corner points generated by the k components in G ( r ) - 5 is at least 4y^. The next observation is essential to our proof: When a rectangle represented by a point in S is now replaced, at most four corner points will disappear. Once all the rectangles in S are replaced, all the comer points generated by the components of G(T) -- S will disappear, except for the four corner points of T. It follows that
980
/. Urrutia
k ^\S\-\-l. The reader may verify that ifk=\S\-\-l, of G ( 7 ) - 5 is even.
then at least one of the components D
2.3. Illuminating families of convex sets A folklore result in mathematics asserts that to illuminate the boundary of a compact convex set S on the plane, three light sources always suffice. The following problem was first studied by Fejes Toth [53]. Let F = {5i, • •, 5^} be a family of n disjoint compact convex sets on the plane. How many light sources located in the complement of S\ U ...U Sn are always sufficient to completely illuminate the boundaries of the elements of F? In this section we prove: THEOREM 2.3 ([53]). For any family F = [S\,..., Sn] ofn disjoint compact convex sets, An — 1 lights located in the complement of S\ U • • • U 5^ are always sufficient and occasionally necessary to illuminate the boundaries of the elements of F. PROOF.
Construct a family T = [T\,.. .,Tn) oin strictly convex sets such that:
(1) Si is contained in T,, / = 1 , . . . , n. (2) The interiors of 7/, / = 1 , . . . , n are disjoint. (3) The number of tangencies between the elements of T is maximized. Suppose that 7/ is tangent ioTs{j), j = \,. ..,m. Consider the lines //,.s(/) tangent to Tt at the points in which T, intersects Ts^j), j = \,.. .,m. For each /, Ts{\),.. .,Ts{m) define a polygonal region P/. Two cases arise: (1) P/ is a bounded polygonal region. In this case, place a light at each vertex of P/. (2) Pi is an unbounded polygonal region. For this case, place a light at each vertex of Pi, and one more at each of two semilines of P, far enough from Si. It is easy to see that these lights illuminate 5/, / = ! , . . . , « and that each of the lines defined above is assigned exactly two lights. See Figure 4. Construct a planar graph G with vertex set {Pi,..., 7^} such that P/ and Tj are adjacent if they are tangent. It is clear that this graph is planar, and thus it has at most 3n — 6 edges. Notice that there is a one to one correspondence between the edges of G and the set of tangents generated by P = {Pi,..., P,^}. It now follows that the number of lights used so far is at most 2(3n — 6). Let H be the complement of the union of P,, / = 1 , . . . , AI . // consists of an unbounded face and a number of bounded ones. It is easy to see that the number of lights needed to illuminate ^ i , . . . , 5« is maximized when all of the faces of //, including the outer one, are bounded by exactly three elements of P. We analyze this case only, and leave the rest to the reader. We observe that each face of H contains exactly 3 lights. Note, however, that if for each face of H except the outer face, we remove one of these three lights, the remaining lights still illuminate all the elements of P; see Figure 4. It is now easy to see that An — 1 lights remain, and our result follows. D
Art gallery and illumination
problems
981
Lights used to illuminate our sets Fig. 4. Illustration of proof of theorem on illumination families of convex sets.
2.4. A floodlight illumination problem In the previous problems, we have assumed that the light sources emit light in all directions, or that the guards can patrol around themselves in all directions. We now present an illumination problem in which the light sources have a restricted angle of illumination. We call such light sources floodlights. Thus for the rest of this paper, a floodlight ft is a source of light located at a point p of the plane, called its apex; fi illuminates only within a positive angle of illumination at, and can be rotated around its apex. We study the following problem due to J. Urrutia: PROBLEM 2.1 (The 3-floodlight illumination problem). Let a\ -\- a2 -\- oi3 = n and consider any convex polygon P. Can we place three floodlights of sizes at most oti, 0^2, 0^3, at most one per vertex, in such a way that P is completely illuminated?
We now show that the Three Floodlight Illumination problem always has a positive solution. Clearly our result is true if P has 3 vertices. Consider any convex polygon P with at least four vertices and suppose that a\ < cy2 ^ot^- Notice first that 0^2 < 7r/2, and that since P has at least four vertices, the interior angle at one vertex u of P is at least n/l. Find a triangle T with internal angles a i , 0^2, and a^ such that the vertex of T with angle Of2 hes on v, and the other vertices of T lie on two points x and y on the boundary of P.
/. Urrutia
982
Fig. 5. Illustration of proof of the Three Floodlight problem.
Suppose that x and y lie on different edges, say e\ and ^3 of P. (The case when they He on the same edge will be left to the reader.) See Figure 5. Place a floodlight /2 with angle of illumination 0^2 at f, illuminating T. Consider the circle C passing through the vertices of T. It is easy to see that at least one vertex of each of e\ and ^3 is not contained in the interior of C. Let u and w be these end points. Two cases arise: (1) u ^ w. Place floodlights f\ and /3 at u and w, illuminating the angular region determined by v,u,x and v,w, y. Since u and w are not contained in the interior of C, the angles of illumination of f\ and /3 are at most a\ and a^ respectively. Since / i , /2, and /3 illuminate P, our result follows. (2) u = w. By considering the tangents to C at jc and y it is easy to verify that the angle a of P at M is at most TT — la^, which is less than or equal to 0^3 = TT — {oi\ + ai). Place a floodlight of size a atu. This illuminates P. Our result follows.
3. Variations on the Art Gallery problem 3.1. Edge guards, vertex guards, etc. There are several types of restrictions that may be imposed on the guards used to cover a polygon P. In some cases, we may want them to be stationed at vertices of P. In other cases, they can be located anywhere within P, or patrol along diagonals or edges of P. We now list all the different types of guards or light sources studied in the literature. Point guards. These are guards that can be located anywhere in the polygon to be guarded. Vertex guards. In this case, the positions of the guards are restricted to vertices of a polygon.
Art gallery and illumination problems
983
The distinction between point and vertex guards is important. In many of our results, the bounds obtained for these two types of guards are different. Edge guards. Edge guards were introduced by Toussaint in 1981. His original motivation was that of allowing a guard to move along the edges of a polygon. A point q can be considered guarded if it is visible from some point in the path of a guard. Alternately, we could think of the illumination problem of a polygon P in which we are allowed to place "fluorescent" lights along the edges of P\ each fluorescent light covers the whole length of an edge of P. Within this setting, our problem becomes: How many "fluorescent" lights are needed to illuminate a polygon with n vertices? Mobile guards. O'Rourke [100] introduced this variation in which the guards are allowed to move along closed line segments totally contained in a polygon P. Vertex and point floodlights. We also distinguish between vertex floodlights, located at vertices of a polygon, and point floodlights, which can be located anywhere in the polygon to be guarded. Floodlights were introduced by J. Urrutia in 1990 at a workshop on illumination in Bell Airs, Barbados. The motivation for this type of guard is that many guarding and broadcasting devices have a limited range of visibility.
3.2. The complexity of the Art Gallery theorem Fisk's proof of Chvatal's theorem to find [f J guards to cover a polygon leads in a natural way to an efficient algorithm. First triangulate the polygon P to be guarded, then 3-color the resulting graph and station a guard at all the vertices of the smallest chromatic class. This was noticed first by Avis and Toussaint [7] who gave an Oinlnn) time algorithm to solve the Art Gallery theorem. Their result was later improved when Tarjan and van Wyk [122] obtained an 0{n\n\nn) time algorithm to triangulate polygons. The complexity of the Art Gallery theorem was finally settled when Chazelle obtained a linear time triangulation algorithm [19]. On the other hand, the problem of finding the minimum number of guards needed to guard a polygon is much harder. Lee and Lin [85] proved: THEOREM
3.1. The minimum vertex guard problem for polygons is NF-hard.
Their proof is based on a reduction of the 3-satisfiability problem [57]. In the same paper, they show that the minimum edge and point guard problems are also NP-hard. One approach that has been neglected in the study of Art Gallery problems is that of finding algorithms that obtain approximate solutions in terms of optimal ones. To our knowledge, there is only one paper on this subject (Ghosh [65]). He obtained an algorithm that, given a polygon P with n vertices, finds in 0(n^ Inn) time a vertex guard set that has at most 0(lnn) times the minimum number of vertex guards needed to guard P. For orthogonal polygons, Schuchardt and Hecker [107] recently proved: THEOREM 3.2. The minimum vertex- and point-guard problems for orthogonal polygons are NF-hard.
984
/. Urrutia
Fig. 6. A polygon that requires [^ J guards.
3.3. Orthogonal polygons Guarding problems for orthogonal polygons have received much attention. This is perhaps because most real buildings are "orthogonal", and thus they are a better model for potential applications of our results. From a mathematical point of view, their inherent structure allows us to obtain very interesting and aesthetic results. The first major result here is due to Kahn, Klawe and Kleitman [82]. They proved: 3.3. Any orthogonal polygon with n vertices can always be illuminated with L^J vertex guards. L^J guards are sometimes necessary.
THEOREM
Kahn, Klawe and Kleitman's proof was based on a similar technique to that used by Fisk. The main idea of their proof is to partition an orthogonal polygon into convex quadrilaterals. The internal diagonals of each of these quadrilaterals are then added, and the graph thus obtained four-vertex colored. Kahn, Klawe and Kleitman's result provided an incentive to study the problem of decomposing a rectilinear polygon into convex quadrilaterals. The first 0(n) algorithm to achieve this was obtained by Sack [104] (see also [106]). A different algorithm was later obtained by Lubiw [90]. Related results can also be found in Sack and Toussaint [105]. A linear time algorithm to guard orthogonal polygons using [fj point guards, some of which may be located in the interior of the polygon, was then given by Edelsbrunner, O'Rourke and Welzl [44]. Their result is based on an L-shaped partitioning of orthogonal polygons. In 1986, E. Gyory gave another proof of Theorem 3.3. His proof also decomposes an orthogonal polygon into a set of at most [^ J L-shaped polygons. More recently, Estivill-Castro and Urrutia [48] (see also [2]) proved that [^J guards are also sufficient to guard an orthogonal polygon, but in this case using orthogonal floodlights; that is guards which have an angle of vision of 90 degrees. Moreover, unlike the result of Edelsbrunner, O'Rourke and Welzl, they locate the lights on the edges of the polygon. For more details, see Theorem 5.7 of this survey. They also give a linear time algorithm to solve this problem.
Art gallery and illumination
problems
985
Fig. 7. A polygon that requires L^^^J guards
3.4. Polygons with holes Given a polygon P and a set of m disjoint polygons P\,..., P^ contained in the interior of P, we call the set P — {Pi U • • • U P^} a polygon with holes. In this case, we say that P has m holes. O'Rourke [99] proved the first result on guarding polygons with holes: 3.4. Any polygon with n vertices and h holes can always be guarded with J vertex guards.
THEOREM (n+2h)
O'Rourke's proof proceeds by eliminating the holes of a polygon P one at a time by cutting it along a line segment joining a diagonal joining two vertices of P; one a vertex of a hole, the other on the outer face of P. It is widely believed that this bound is not tight, in fact Shermer conjectures: 3.1. Any polygon with n vertices and h holes can always be guarded with L^"^-l "vertex guards.
CONJECTURE
Shermer proved his conjecture for the case h = \\ see [99]. However, for h > \ the conjecture remains open. Substantial progress has been achieved for point guards. BjorlingSachs and Souvaine [11] and Hoffmann, Kaufman, and Kriegel [76] independently proved: THEOREM 3.5. [ 3~^1 point guards are always sufficient and occasionally necessary to guard any polygon with n vertices and h holes.
In 1995, Bjorling-Sachs and Souvaine [12] gave an 0{n^) time algorithm to find the position of the [ 3 - ^ ! guards. The main idea in Bjorling-Sachs and Souvaine's paper is to connect each hole of the polygon to the exterior by cutting away a quadrilateral channel such that one vertex is introduced for each channel, and there is a triangle T in the remaining polygon such that any point in it sees all of the channel. This triangle is then forced to be in a triangulation of the remaining polygon, and using Fisk's proof of Chvatal's theorem, we place a guard at a vertex of T. This will cover the channel, and the result follows.
J. Urrutia
986
Fig. 8. An orthogonal polygon with 44 vertices and 4 holes that requires 12 vertex guards.
3.5. Orthogonal polygons with holes In 1982,0'Rourke [99] proved that any orthogonal polygon with n vertices and h holes can always be guarded with \J^^^\ guards. He conjectured that [fj point guards are always sufficient to guard them. Aggarwal [4] was able to verify this conjecture for /z = 1, 2. It then remained open until 1990, when F. Hoffmann [75] proved: 3.6. [^J point guards are always sufficient to guard any orthogonal polygon with n vertices and h holes. THEOREM
For vertex guards, the best known upper bound, again due to O'Rourke, remains at l^n±2/z J j^ j ^ ^ ^ httn known for some time that [|J vertex guards are not always sufficient to guard orthogonal polygons with many holes. The polygon shown in Figure 8, with 44 vertices and 4 holes, requires 12 vertex guards. This example, which can easily be generahzed, led T. Shermer [99] to make the following conjecture: CONJECTURE 3.2. L^^J vertex guards are sufficient to cover any orthogonal polygon with n vertices and h holes. When h is "large", O'Rourke's upper bound on the number of guards needed to guard an orthogonal polygon with holes was achieved by Hoffman and Kriegel [77]. They proved: THEOREM
3.7. [|J vertex guards are always sufficient to guard an orthogonal polygon
with holes. The main idea behind their proof is the following result which is interesting in its own right: THEOREM 3.8. Any planar bipartite graph can be completed to a maximal planar graph which is 3-vertex colorable.
Art gallery and illumination
problems
987
Fig. 9. Hoffman's polygon requiring [7^ J vertex guards.
To prove their result, they first partition the orthogonal polygon into convex quadrilaterals, and then triangulate the resulting graph in such a way that every vertex has even degree. Then they use a theorem by Whitney that states that any planar triangulated graph is 3-vertex colorable iff all its vertices have even degree. Their result leads to an O(n^) time algorithm. For the lower bound, Hoffman found a family of polygons with holes that require [ ^ J vertex guards. This disproved an earlier conjecture by Aggarwal [4] that [yyj were always sufficient. Hoffman conjectures: 2/1
CONJECTURE 3.3. [ ^ J vertex guards are always sufficient to guard any orthogonal polygon with holes. It is worth noticing that Hoffman's polygons do not disprove Shermer's conjecture that \J^-^\ vertex guards are sufficient to cover any orthogonal polygon. Hoffman's polygons 2n = have n = 14k vertices and h = 2k holes, and for this particular choice of numbers, [—J
3.6. Edge and mobile guards In 1981, Toussaint asked the question of determining the minimum number of edge guards required to guard any polygon with n vertices. He conjectured: CONJECTURE 3.4. Except for a few polygons, L|J edge guards are always sufficient to guard any polygon with n vertices.
In the next figure, we show a typical polygon that requires [f J edge guards, as well as the only two known counterexamples to this conjecture due to Paige and Shermer. See Figure 10. This conjecture remains open. The first positive result in this direction is due to O'Rourke [100]. By allowing the guards to move along diagonals joining vertices of P, i.e. using mobile guards, he was able to prove:
988
J. Urrutia
Fig. 10. A polygon that requires L|J edge guards, and Paige and Shermer's polygons.
THEOREM 3.9. L^J iriobile guards are always sufficient and occasionally necessary to guard any polygon with n vertices.
O'Rourke's proof proceeds by induction on the number of vertices of Pn. He first establishes his result for polygons with up to nine vertices. For polygons with more than nine vertices, he considers a triangulation T of Pn. Then he shows that this triangulation contains a diagonal that cuts Pn into two polygons, P^ and P^^ one of which, say P\ contains between five and eight edges of P. He then finds a solution for P' that can be used with any solution of P^^ to obtain a solution for Pn. It is not hard to see that O'Rourke's proof of Theorem 3.9 can be implemented in linear time [100]. An interesting problem arose at this stage. A triangulation graph is a maximal outerplanar graph, i.e. a Hamiltonean planar graph which contains n vertices and 2n — 3 edges, and all of whose internal faces are triangles. O'Rourke showed that there are triangulation graphs with n vertices such that any set of edges that covers their triangular faces requires LT-I ^^g^s- Shermer later found examples of triangulation graphs that require [ygj edge guards to cover them. Since this number is greater than [^J, this means that the technique of trying to solve Toussaint's conjecture using triangulations may not work. Recently, Shermer [112] settled the edge guarding problem for triangulated graphs. He showed: THEOREM 3.10. [j^J edge guards are always sufficient and occasionally necessary to guard any triangulation graph with n vertices, with the exception of three graphs.
The proof of Theorem 3.10 is long and tedious. For details, see Shermer's original paper. For spiral polygons, I. Bjorling-Sachs [10], and S. Viswanathan [127] showed that L^^^J edge guards are always sufficient and occasionally necessary. Linear time algorithms to find these guards are also provided in [10]. 3.6.1. Mobile guards for orthogonal polygons. For mobile guards in orthogonal polygons, the following result by A. Aggarwal [4] gives a complete solution: THEOREM 3.11. L ^ i ^ J Jnobile guards are sufficient and occasionally necessary to cover any orthogonal polygon with n vertices.
Art gallery and illumination
989
problems
(a)
(b)
Fig. 11. O'Rourke's and Shermer's polygons that require [ ^ J and {.j^\ edge guards respectively.
u
J
r^
u n
u n
Fig. 12. A polygon that requires L^t" J mobile guard:
The proof of AggarwaFs result is interesting, but rather long and complicated. The interested reader can find the complete proof in [99]. It is worth noticing here that AggarwaFs proof for Theorem 3.11 leads to an O(n^logn) time algorithm using Sack's or Lubiw's quadrilaterization algorithms. An interesting open problem is: PROBLEM
3.1. Find, ifpossible, a subquadratic algorithm to solve Theorem 3.11.
AggarwaFs result was generalized to orthogonal polygons with holes by Gyory, Hoffmann, Kriegel and Shermer [67]. They proved: THEOREM
3.12. L
15 "*" J mobile guards are always sufficient and occasionally neces-
/. Urrutia
990
Fig. 13. A polygon that requires [3n+4|i+4j jj^Qi^jig guards.
sary to guard an orthogonal polygon. -n-2- ^^g^ guards For spiral orthogonal polygons, I. Bjorling-Sachs [10] proved that [^^1 are always sufficient, and occasionally necessary. A hnear time algorithm to find these guards is also provided.
3.7. The Fortress and Prison Yard problems In this section, we study two variations to the Art Gallery problem due to D. Wood:
The Fortress problem. How many vertex guards are needed to see the exterior of a polygon?
The Prison Yard problem. How many vertex guards are sufficient to simultaneously guard the interior and the exterior of any simple polygon with n vertices? 3.7.1. The Fortress problem. For arbitrary polygons, the Fortress problem was solved by O'Rourke and Wood [100]. They proved: THEOREM 3.13. r | ] vertex guards are necessary and sufficient to to see the exterior of any polygon with n vertices.
The upper bound of r | l is achieved by any convex polygon with n vertices. The upper bound is proved by "triangulating" the exterior of Pn using an extra point at infinity. Next, this graph is converted to a triangulation of a polygon by splitting one of its vertices in two. This produces a graph with n -\-1 vertices that is 3-vertex colorable. If the smallest chromatic class does not contain the vertex at infinity, place a guard at the points of this chromatic class, otherwise choose the smaller of the two remaining chromatic classes. It is easy to see that this rule will not use more than r|"l guards; see [100].
Art gallery and illumination problems
991
Fig. 14. Aggarwal's polygon requiring [ f] + 1 vertex guards.
For orthogonal polygons, Aggarwal [4] proved: THEOREM 3.14. r | ] + l vertex guards are necessary and sufficient to see the exterior of any orthogonal polygon P with n vertices.
The upper bound is proved as follows: First enclose P within a rectangle R. Then transform the area contained between R and P into an orthogonal polygon by cutting away from it a small rectangle having two of its vertices in P. From here, a small modification to the proof of Theorem 3.3 given by given by Edelsbrunner, O'Rourke and Welzl [44] gives the desired result. The proofs of Theorems 3.13 and 3.14 lead to linear time algorithms [100]. 3.7.2. Fortress problems with guards in the plane. In the previous section, the guards were required to be placed within the polygon. For the case when this condition is dropped, the following result due to Aggarwal and O'Rourke [99] solves the problem: 3.15. I" | ] point guards are always sufficient and sometimes necessary to cover the exterior of an n vertex polygon P.
THEOREM
The easiest proof for Theorem 3.15 is due to Shermer. He first adds two extra points u and V such that the convex hull of P U {w, u} is a convex quadrilateral Q\ see Figure 15. The area between Q and P is again triangulated and three-colored. The guarding set is then obtained from this coloring. Shermer's proof presented in [100] leads again to a linear time algorithm. 3.7.3. Edge guards and the Fortress problem. problem using edge guards. They show:
Yiu and Choi [129] studied the Fortress
992
/ Urrutia
Fig. 15. Illustration of proof of Theorem 3.15.
3.16. r | l (respectively [f J + 1) edge guards are sufficient and occasionally necessary to guard the exterior of a simple (respectively, orthogonal) polygon P with n vertices.
THEOREM
For simple polygons, their proof proceeds as follows: If P is convex, it is easy to see that r | l edge guards are necessary and sufficient. If P is not convex, and all of its pockets have at most four edges, then placing a guard at every third edge of P suffices. The remaining case is handled by a result of O'Rourke [99] that asserts that in any triangulation of a simple polygon, there is a diagonal that cuts off 4,5, or 6 edges. Then by an analysis similar to that used to prove Theorem 3.9 our result follows. Their proof leads to a linear time algorithm. The orthogonal part of Yiu and Choi's result follows by first enclosing the polygon within a square, then decomposing the region between this square and P into a set of | + 2 rectangles by extending the edges of P parallel to the .x-axis until they meet another edge of P or the square. Yiu and Choi then proceed in a way similar to that used by Edelsbrunner, O'Rourke and Welzl [44] in their proof of Theorem 3.3. The result can be implemented in linear time. Yiu [128] also studied the case when consecutive vertex guards are used. He defines a k-consecutive vertex guard to be a set of k vertex guards placed at k consecutive vertices on the boundary of a polygon. He shows that \-j^^ /:-consecutive vertex guards are sometimes necessary and always sufficient to cover the exterior of any «-vertex polygon, k
Art gallery and illumination problems
993
THEOREM 3.17. r | ] vertex guards (resp. L|J) vertex guards are always sufficient and occasionally necessary to simultaneously guard the interior and the exterior of a convex {resp. non convex) polygon with n vertices.
The reader interested in details should consult FUredi and Kleitman's paper. The first result for the orthogonal case was again obtained by J. O'Rourke. He proved [100] that L yfJ + 5 vertex guards were always sufficient. This result was recently improved by Hoffmann and Kriegel [77]. They showed: THEOREM 3.18. L j f J + 2 (resp. L^^J) vertex (resp. point) guards are always sufficient to guard the interior and the exterior of an orthogonal polygon with holes.
They also show: THEOREM 3.19. L i § J + 2 (resp. [flJ + 2 ) vertex guards are always sufficient and occasionally necessary to guard the interior and the exterior of a staircase (resp. orthoconvex) polygon with n vertices.
They introduce a new problem that they call the Prison problem in which the guards are required to cover all of the plane, that is, the interior, exterior and the "interior" of the holes of the orthogonal polygon. They prove: THEOREM 3.20. L [2 J + ^ guards are always sufficient to cover all the cells, the interior and the exterior of an orthogonal polygon with holes.
All their results are based on Theorem 3.8, and are proved in a similar way to Theorem 3.7. Hoffmann and Kriegel also show that all their results, with the exception of the orthoconvex one, lead to 0(n^) time algorithms; see Theorem 3.7. The [ff J + 2 guards for the orthoconvex problem can be found in linear time. They also conjecture: CONJECTURE 3.5. There is a constant c such that any orthogonal prison yard can be watched with |f + c vertex guards.
We also mention the following result for monotone polygons. A polygon is called monotone if every line parallel to the x axis intersects it exactly once. O'Rourke [100] proved: THEOREM 3.21. f | ] vertex guards are occasionally necessary and always sufficient to see the interior and exterior of a monotone polygon.
4. Generalized guards and hidden sets Let P be a polygon, and H a subset of points in P. We say that / / is a hidden set if no pair of elements of H are visible to each other, i.e. if the line segment joining them intersects the exterior of P. The following result is due to T. Shermer [108]:
994
/. Urrutia
4.1. Computing the size of the maximum hidden set or hidden vertex set is NPhard; computing the size of the minimum hidden guard set is NP-complete and computing the size of the minimum hidden vertex guard set is NP-hard.
THEOREM
In the same paper, Shermer shows that any polygon with r reflex vertices may have a hidden set of size at most r + 1 . He also shows that that the size of the maximum vertex hidden set of a polygon with n vertices is at most L|J • Both bounds are tight. For orthogonal polygons, tight bounds for hidden guard and hidden vertex guard sets of ^ ^ are given. Two points u and i; of a polygon are called Lj -visible if there is a polygonal path joining them consisting of at most j straight line segments. Under this definition, two points that are visible are Li-visible. A set Q on the plane is called Ly-convex if any two points in them are Ly-visible. Shermer [109] proved: 4.2. L 27x7 J vertex or point guards are always sufficient and occasionally necessary to guard, under Lj visibility, any polygon with n vertices.
THEOREM
4.3. For any integers j ^0 and n ^ 7' + 1, there exist polygons with n vertices that have a Lj-hidden vertex set of size L^xy J- Moreover, these polygons require at least L j ^ J regions in any covering or partition by Lj-convex regions. These bounds are tight.
THEOREM
Notice that for 7 = 1, Theorem 4.2 yields Chvatal's Art Gallery theorem. Shermer also obtained bounds to guard, under Lj visibility, the exterior of a polygon. For these and more results regarding Lj visibility, the reader is referred to [109]. Hidden sets can also be studied from the following point of view: Suppose that we have a family F = [S\,.. .,Sn) oi disjoint sets on the plane. A set of points H contained in the complement of the union of the elements of F is called a hidden set of F if the line segment joining any two elements of H intersects an element of F. Hurtado, Serra, and Urrutia [78] proved: THEOREM 4.4. Let F be a family ofn disjoint line segments on the plane, no two of which are colinear. Then F always has a hidden set of size at least ^>Jn. There are sets of lines that admit no hidden set of size greater than 2^.
Their lower bound proof is based on the Erdos and Szekeres [46] theorem that asserts that any sequence of n numbers contains an increasing or decreasing subsequence of size ^/n. To prove their result they first shorten the segments until all have disjoint projections on the X-axis. Then they take the sequence determined by the slopes of the line segments in the order of their projection on the jc-axis, and applying the Erdos-Szekeres theorem, obtain a subset S of size at least ^ of F. This set has a hidden set of size at least \S\ and the result follows. The upper bound is achieved by an easy example. For families of isothetic line segments, i.e. each of them parallel to the x or y-axis, they obtain a lower bound of L| + 2 -I ^^^ ^^ upper bound of [ | + v^J • They can find those points in 0(n In w).
Art gallery and illumination problems
995
4.1. Lj visibility for orthogonal polygons Gewali and Ntafos [62] studied orthogonal L2 visibility for orthogonal polygons and grids, i.e. the union of a collection of horizontal or vertical line segments. In this case the polygonal line joining two L2 orthogonally visible points has at most one horizontal line segment and at most one vertical line segment. They call this periscope visibility. A grid is called simple if all the endpoints of its line segments lie on the outer face of the planar subdivision induced by the grid. They proved: THEOREM 4.5. A minimum periscope guard set for simple grids and orthogonal polygons can be found in 0{n^) time.
A r^-guard is a tree of diameter k completely contained in a polygon P. A point is guarded by a tree Tk if it is visible from at least one point of 7y^. Gyory, Hoffmann, Kriegel and Shermer [67] define the function r(n,h,k) to be the minimum number of Tk trees needed to guard an orthogonal polygon with n vertices and h holes. They prove the following results: THEOREM 4.6. Fork even, r(n,h,k)^ l ^ j . Fork =1,3, r(n,h,k)^ and fork odd, k^5, r(n, h, k) ^ L ^ ^ i m ^ J THEOREM
l^^'^^^k'In^^'^i'
4.7. r{n, 0, k) < L ^ J » "^ith equality fork even; r(n, h, 1) = _| 3^+4^/^+4 j^ ^ ^ j
r(n,h,2)^l^l
The proofs of these results are based on a long case analysis. For the details, the reader is referred to the authors' paper. Some open problems posed in [67] are: PROBLEM
4.1. What is the lower bound onr(n,h,k)
when h is large?
PROBLEM 4.2. What are the exact bounds for orthogonal polygons with holes expressed as a function only ofn andk?
The authors mention that Wessel showed a lower bound of L^^jj^ J for ^ = 1. 5. Floodlight illumination problems In this section, we survey results concerning illumination problems using floodlights. The following problem, posed by J. Urrutia in 1992, is perhaps the most interesting open problem in this area. PROBLEM 5.1 (The Stage Illumination problem). Let I be a line segment contained in the X-axis of the plane, and F = {f\,..., f^} be a set of floodlights with sizes [ai,... ,an} resp. such that their apexes are located at some fixed points on the plane, all on the same side of I. Is it possible to rotate the floodlights around their apexes so as to obtain a final configuration such that I is completely illuminated?
996
J. Urrutia
Fig. 16. The Floodlight Illumination problem.
Fig. 17. Four ^-floodlights that illuminate the plane.
The problem of finding an efficient algorithm to solve the Stage Illumination problem, or proving that such an algorithm does not exist, is open. Even the cases when all the floodlights are the same size, or all lie on a single line segment different from / are open. On the other hand, the following result was proved in [13]. Suppose that we have a set F = { / i , . . . , / « } of n floodlights with angles of illumination {a\, ...,an) respectively. Let Pn be a collection of n points on the plane. We say that a floodlight // is assigned to a point pj G Pn if the apex of // lies on pj. THEOREM 5.1 ([13]). Let Pn be a set ofn points on the plane, and F = {f\,.,., fn] a set of n floodlights with angles of illumination {«!,...,«„} resp. such that a \ -\ \-an=27t. Then it is always possible to assign one floodlight to each point of Pn and position the floodlights in such a way that the whole plane is illuminated. In the Figure 17, we show a solution to the plane illumination problem for the case of four points and four |^-floodlights. The main step in the proof of Theorem 5.1 is to split the floodlights into three disjoint sets {/i,...,/;•}, { / ; + i , . . . , / ; } , a n d { / y + i , . . . , / „ } such that ofi H hof/ =Puai^i + \-aj = P2 and ay+i H [-an= ^3 such that P\, ^2 and ^3 are all less than or equal to 7t. The plane is then subdivided into three unbounded angular "wedges" Wi with apertures
Art gallery and illumination problems
997
^/, / = 1 , . . . , 3 such that w\, W2 and it's contain exactly i, j — i and n — j elements of Pn respectively. Then each of these "wedge illumination problems" is solved separately to obtain a solution to the plane illumination problem. The solution leads to an 0{n \ogn) time algorithm. For a time, it was not known if the complexity of the previous problem, called the Floodlight Illumination problem of the Plane, was optimal or not. Motivated by the proof of Theorem 5.1, B. Steiger and I. Streinu showed that the partitioning of the plane into w\, W2 and w^ can be achieved in linear time; see [114,115,113]. Moreover, they showed that the tight floodlight wedge illumination problem as defined before is in NP, as well as proving [114]: THEOREM 5.2. The Floodlight Illumination problem of the Plane has a lower bound complexity of Q{n logn).
This result has been generalized to higher dimensions by G. Rote [103] in the following way: Let P be a convex polyhedron in R^, and p a point in the interior of P. Each d — I facet Ci of P, together with p, defines a cone of illumination f, consisting of all semirays starting at p that intersect c/. Let F(P, p) = {f : Ci is ad — 1 facet of P}. THEOREM 5.3 [103]. Let P be a convex polyhedron in R^ with m d — \ facets, Pm a set ofm points in R^ and let F(P, p) be as defined above. Then it is always possible to assign one floodlight of F(P, p) to each point of Pm and position them in such a way that R^ is completely illuminated.
Surprisingly, the following variation of the Stage Illumination problem can be solved efficiently. Optimal Floodlight Illumination of Stages. Let / be a line segment contained in the x-axis, and Pn a set of points on the plane with positive y-coordinate. Find a set of floodlights F = {fi,..., fm} such that the apex of every fi is located at an element of P^, F illuminates /, and a\ -{ h o?^ is minimized. In the previous problem, we allow more than one floodlight to have its apex at the same point. Czyzowicz, Rivera-Campo and Urrutia [40] proved: THEOREM 5.4. The Optimal Floodlight Illumination of Stages problem can be solved in 0(n logn) time.
We notice that the solutions obtained in [40] for Theorem 5.4 require two floodlights in at most one element of Pn • If we insist that at each point we have exactly one floodlight, the problem remains open. In [49], the Two Floodlight Illumination problem for convex polygons is studied. In this problem, we want to illuminate a convex polygon P using at most two floodlights in such a way that the sum of their sizes is minimized. In [49] the following result is proved: THEOREM 5.5. The Two Floodlight Illumination problem for convex polygons with n vertices can be solved in 0(n^) time.
998
/. Urrutia
It is not known if the algorithm to solve the previous problem is optimal. The A:-floodlight illumination problem, that is the problem of illuminating a convex polygon P with k floodlights, A: ^ 3, such that the sum of their sizes is minimized, is open. At this point we do not even know if the floodlights have to be located at vertices of the polygon to be illuminated. Moreover, we do not even know if there is a constant / such that if k > I then the optimal solution to the /^-floodlight illumination problem uses at most / floodhghts. We know, however, that if the vertices of P are cocircular, two floodlights suffice. We close this section with a result of O'Rourke, Streinu and Shermer related to the Three-Floodlight Illumination problem presented in Section 2.4. As we showed in Theorem 2.1, any convex polygon can always be illuminated with three vertex floodlights such that the sum of their sizes is TT. O'Rourke, Streinu and Shermer [102] showed that in general. Theorem 2.1 cannot be extended. In a very nice paper they prove: THEOREM 5.6. Let [f\,..., fm} be a set of m floodlights of sizes { a i , . . . , a^} such that \-am=7t, m large enough and P a convex polygon with n vertices, n^m. Then cii -\ it is not always possible to illuminate P by assigning at most one floodlight to each vertex of P.
An open problem is that of determining the smallest integer for which Theorem 2.1 can be generalized. We do not know if Theorem 2.1 can be extended, even for the case n = 4; see [102].
5.1. Floodlight illumination of orthogonal polygons For orthogonal polygons, the first result was obtained by Estivill-Castro and Urrutia [49]. A floodlight is called orthogonal if it is of size n/2. THEOREM 5.7. Any orthogonal polygon with n vertices can always be illuminated using at most L^^^ J orthogonal vertex floodlights. If the floodlights are allowed to be anywhere on the boundary of the polygon, [^J suffice. Both bounds are tight.
The proof for the L^^^ J vertex guards was proved by obtaining four different illumination rules as follows: Classify the edges of an orthogonal polygon P into four types, top, left, bottom and right edges. The left-top illumination rule is now defined as follows: At the top vertex of all left edges, and at the left endvertex of all top edges, put an orthogonal floodlight that illuminates the angular sector 37r/2 to In. It is easy to see that these floodlights illuminate P. In a similar way, we can define the top-right, right-bottom and bottom-left illumination rules. An easy counting argument shows that one of these illumination rules uses at most L^^^J floodlights. The examples in Figure 18 achieve this bound. The proof for the L|J bound follows an idea similar to that used by Edelsbrunner, O'Rourke and Welzl [44] in the proof of Theorem 3.3. It is interesting to point out here that the bound of [^ J obtained in Theorem 5.7 is the same as that of Theorem 3.3 for orthogonal polygons using vertex guards. Thus Theorem 5.7 provides a new proof for Theorem 3.3.
Art gallery and illumination problems
999
Fig. 18. Orthogonal polygons that need [ n J orthogonal floodlights.
This result was later extended to orthogonal polygons with holes by Abello, EstivillCastro, Shermer and Urrutia [2]. They showed: THEOREM 5.8. [ ^ g ~ J orthogonal vertex floodlights are always sufficient and occasionally necessary to illuminate any orthogonal polygon with n vertices and h holes. The bound is tight.
Theorem 5.8 gives the first tight bound for vertex guards of orthogonal polygons with holes. 5.2. 7T-floodlights
The results of Theorem 5.7 motivated the study of the following problem, posed by Urrutia. Is there an a < TT such that any polygon P can be illuminated by placing an a-floodlight at every vertex of P? It is easy to see that a = TT is sufficient. Take any triangulation of F , choose an ear e of it and place a TT-floodlight at the vertex of degree two of e. Cut e off from P and proceed by induction. The original value conjectured by Urrutia was a = 7T/2. O'Rourke and Xu [101] disproved this conjecture. The reader can easily verify that the polygon shown in Figure 20 cannot be illuminated by placing a |-floodlight at each of its vertices. Shortly after their result was proved, it was extended by Estivill-Castro, O'Rourke, Urrutia and Xu [47]. They proved the following result: THEOREM 5.9. For any a < TT there is a polygon P that cannot be illuminated by placing an a floodlight at every vertex of P.
It is now natural to ask the following open question: PROBLEM 5.2. How many re-vertex floodlights are always sufficient to illuminate any polygon with n vertices? Is there a c < \ such that any polygon with n vertices can be illuminated with en vertex floodlights?
J. Urrutia
1000
Fig. 19. An orthogonal polygon with holes that needs [ ^"^ 1
^J orthogonal floodlights.
Fig. 20. O'Rourke and Xu's polygon cannot be illuminated by a 5--floodlight at each vertex.
F. Santos produced a family of polygons with 5n + 1 vertices that require 3/2 TT-vertex floodlights. The only known upper bound at this time is n — 2 which is obviously not tight. For point floodlights, Bunting and Larmann [16], and independently Csizmadia and Toth, proved in 1992 that [^('^ H- 5)] TT-floodlights suffice. In a recent paper, Csizmadia and Toth proved [32]:
\l{n
3)1 point n-floodlights are always sufficient to illuminate any polygon P with n vertices, n > 3. THEOREM
5.10.
To prove Theorem 5.10, Csizmadia and Toth first find a triangulation T of P. Then using the dual tree of 7, they show that they can cut P along a diagonal of T chosen appropriately. They then proceed by induction on the number of vertices of P. From Theorem 5.10, it follows that f^l l^(n — 3)] of-point floodlights are always sufficient to illuminate an n-vertex polygon. This bound is not optimal; for example it is easy to see that n — 2 y-point floodlights always suffice to illuminate any polygon with n vertices, and for a = 7r/3, the previous formula yields a value greater than n —2. The proof of Theorem 5.10 leads to a linear time algorithm. We close this section with the following conjecture:
Art gallery and illumination
problems
1001
Fig. 21. Santos' polygons with 5n + l vertices, which require 3« TT-vertex floodUghts.
CONJECTURE 5.1. [ f J point n -floodlights are always sufficient to illuminate any polygon with n vertices. Urrutia [125] wrote a survey (in Spanish) containing many results on floodlight illumination problems.
6. Illuminating families of convex sets on the plane As we mentioned in Section 2.3, Fejes Toth showed in 1977 that any family of n disjoint compact convex sets can always be illuminated with at most An — 1 light sources, n ^ 3. This result was rediscovered in 1989 by Zaks and Urrutia [126]. Fejes Toth also proved: 6.1. 2n — 2 light sources are always sufficient and occasionally necessary to illuminate any family ofn disjoint closed circles.
THEOREM
This result was rediscovered again by Coullard et al. [29] and Czyzowicz et al. [36]. Czyzowicz, Rivera-Campo, and Urrutia [35] also studied the problem of illuminating families of triangles and rectangles. They proved that any family of n disjoint triangles can always be illuminated with at most [^^^J guards. They also showed: 6.2. n -\- \ lights are always sufficient and n — \ occasionally necessary to illuminate any family ofn homothetic triangles.
THEOREM
The example shown in [35] can be slightly modified to obtain a lower bound of n lights, instead of n — 1 for Theorem 6.2; see Figure 22. We now prove: THEOREM
6.3. Any family Fofn disjoint k-gons can always be illuminated with at most
1002
/. Urrutia
Fig. 22. A family of n homothetic triangles that requires n point lights.
To prove this result, we simply enclose all the elements of F within a triangle. This can now be considered as a polygon with kn -\-?> vertices with n holes. Thus by Theorem 3.5 the elements of F can be illuminated with at most [nh±^±2L\ lights. Our result follows. For /: = 3, this slightly improves on Czyzowicz, Rivera-Campo, and Urrutia's [35] result on triangles. There are still some small gaps left between the upper and lower bounds to illuminate families of rectangles and triangles. The lower bounds are: (1) n — \io illuminate families of/i isothetic rectangles, (2) n to illuminate any family of homothetic triangles. An open problem is that of closing these gaps, and of establishing non-trivial lower bounds for the general case of triangles. Furthermore, Theorem 6.3 provides an upper bound for the problem of illuminating families of convex /c-gons, /: > 3. None of these bounds, I believe, are tight. It would be of interest to tighten them, particularly for the case when k ^\2 where better bounds are obtained using Fejes Toth's Theorem 2.3. For the case when our sets are arbitrary disjoint triangles, we conjecture: 6.1 [35]. There is a constant c such that n-\- c point lights are sufficient to illuminate any collection ofn triangles.
CONJECTURE
For famines of disjoint isothetic rectangles Czyzowicz, Rivera-Campo, and Urrutia [35] proved that [^^^ J guards suffice, and conjectured that n-\-c would suffice, c a constant. This conjecture can easily be obtained from Theorem 3.6. We now prove:
Art gallery and illumination problems
1003
THEOREM 6.4. Any family F of n disjoint rectangles can be illuminated with at most n-\-\ light sources.
To prove our result, we enclose the elements of F by a big rectangle, and consider this as an orthogonal polygon with holes. The total number of vertices is now An -\- A. By Theorem 3.6 this can be illuminated with n-\-\ light sources. Everett and Toussaint [52] proved that any family of n disjoint squares, n > 4, can always be illuminated with n point lights. Everett, Lyons, Reed and Souvaine [50] also showed that if the squares are such that they all intersect a line L, then [^J + 2 lights are sometimes required and [^J + 7 are always sufficient. They also gave 0{n\nn) time algorithms to place the n, and \Jf\-{-l lights respectively. Garcia-Lopez [56] studied the problem of illuminating the free space generated by a family of disjoint polygons, i.e. the complement of their union. Using Theorem 3.5 he showed: 6.5. The free space generated by any family ofh disjoint polygons with a total ofn vertices can be illuminated with at most [^+^+3j point lights. There are families that require [^+^~^ J lights. THEOREM
Using Theorem 3.5 this leads to an 0{n^) time algorithm. For vertex lights Garcia-Lopez proved: 6.6. [-^J vertex lights are always sufficient and ffl occasionally necessary to illuminate the free space generated by a family of disjoint polygons with n vertices.
THEOREM
The proof of Theorem 6.6 leads to an 0(n Inn) time algorithm to find the [ ^ J vertex lights. He also proved that to illuminate the free space generated by any family of m disjoint quadrilaterals, 2m vertex lights are always sufficient and occasionally necessary, and that L^^y^ J point guards are always sufficient. He conjectured that the free space generated by m disjoint quadrilaterals can always be illuminated by n + c point lights, c a constant. This conjecture was proved to be false by Czyzowicz and Urrutia [42]. They produced a family of n = 3m — 3 quadrilaterals such that to illuminate the free space they generate requires 4m — 4 point lights, m > 4; see Figure 23. The illumination problem for higher dimensions is completely different. In [39] it is shown that there are families of O(n^) boxes such that to illuminate the free space generated by them requires O(n^) light sources. On the other hand, Czyzowicz, Gaujal, RiveraCampo, Urrutia and Zaks [41] proved: THEOREM 6.7. For any compact convex set T in E^, there is a constant Cd(T) such that every family F consisting ofn mutually disjoint congruent copies ofT can be illuminated with Cd{T)n lights.
1004
/. Urrutia
Fig. 23. An example of a family of n = 3m — 3 quadrilaterals that requires Am 4 point lights to illuminate the free space they generate, m = 6.
6.1. Illuminating line segments on the plane A particularly interesting problem is that of illuminating the plane in the presence of obstacles represented by collections of disjoint line segments, or illuminating the line segments themselves. J. O'Rourke [99] proved: 6.8. [ 2n -^ J point guards are sometimes necessary and always sufficient to cover the plane in the presence of n disjoint line segment obstacles, where the guards may be stationed on top of an obstacle, n^ 5. THEOREM
Here is a brief outline of O'Rourke's proof: Let F be a collection of n disjoint line segments, no two of which are parallel. One by one, extend the line segments until they hit another line, or extension of another line of F. This produces a partitioning P of the plane into n-\-l convex sets with disjoint interiors. Take the dual graph G of P; see Figure 24(a). It is now easy to see that G satisfies the conditions of Nishiseki's Theorem 1.2, and thus has a matching of size at least [^4^1 • If two regions are matched, we guard them with the same guard; to each unmatched region, we assign a different guard. It is easy to see that this rule uses at most [3^ J point guards. The case when parallel lines appear can be handed in a similar way.
Art gallery and illumination
(a)
1005
problems
(b)
Fig. 24. (a) A family of line segments, their extensions and their dual graph, (b) An example where n vertex guards are needed to illuminate the plane.
If the guards are required to be at endpoints, then Shermer and Boenke showed that n guards are sometimes needed and always sufficient [99]. The problem of illuminating families of line segments leads to an interesting variation; the illumination of a point of a line segment / can be achieved by locating a light source at either side of /. The first result in this direction was obtained by Czyzowicz, Rival and Urrutia [34]. They proved that any collection of n line segments can always be illuminated using at most [^J line segments. This result was improved by Czyzowicz, Rivera-Campo, Urrutia and Zaks [38]. They proved: 6.9. f ^ ] — 3 point guards are always sufficient to illuminate any family F of n line segments. If the elements of F are all parallel to the x- or y-axis, [^^1 suffice. THEOREM
The proofs of these bounds are obtained by generating planar graphs which satisfy Nishizeki's and Tutte's theorems for matchings in planar graphs. They follow similar steps to those used by O'Rourke in the proof of Theorem 6.8. Another line illumination problem was studied by Jennings and Lenhart [80]. They were concerned with the following problem: Given a family Fofn disjoint line segments, find a subset 5 of F such that every element of F is visible from at least one point in an element of S. They proved: THEOREM 6.10. Given any set F ofn pairwise disjoint line segments, it is possible to find a subset S e F with at most [|J elements such that every element of F is seen by at least one point on one of the elements of S. The bound is tight.
6.2. Illuminating using line segments We now consider the problem of illuminating families of disjoint compact convex sets using line segment illuminators. Our line segments are not allowed to intersect any of the
1006
/. Urrutia
compact sets. Using the same idea used to prove Fejes Toth's Theorem 2.3 we can prove: THEOREM 6.11. Any family ofn disjoint compact convex sets can always be illuminated with at most n — \ line segments, n > 2.
Consider a family F = {S\,..., Sn} of n disjoint compact convex sets. Find a family of sets r = {Ti,..., r„} as in the proof of Theorem 2.3. Let H be the complement of TiU '"UTn. Again the worst case arises when H is partitioned into triangular faces. We now construct a graph G whose vertex set is the faces of //, two of which are adjacent if they have two common elements of T on their boundaries; see Figure 25. Notice that G has 2n — 4 vertices. The degree of each vertex of G is 3, and it is 3-connected, n>2. Therefore by a well known result in graph theory, G has a perfect matching. Observe that if two triangular faces of H are adjacent in G, they can be illuminated by a common line segment not intersecting the interior of any 7/, / = 1 , . . . , n. Using the perfect matching of G, we can now choose n — 2 line segments to illuminate all the faces of H, except the outer one, which needs an extra line segment, i.e. we use n — 1 segments in total. These line segments also illuminate all the elements of S, and our result follows. It is easy to see that the family of circles shown in Figure 34 (see page 1016) requires n — I line segment illuminators. We close this section with the following conjecture: 6.2 [34]. Any family of disjoint line segments can always be illuminated with at most | + c light sources, c a constant.
CONJECTURE
7. Watchman, Robber, Safari, and Zoo-keeper's Routes 7.1. The Watchman Route problem The following guarding problem, known as the Watchman Route, was introduced by Ntafos and Chin [23]. Suppose a guard has to patrol a polygon P. To do this, he must find a closed walk W starting and ending at a starting point s such that every point in P is visible from some point in W; see Figure 26. In order to minimize the distance the guard has to travel, we would like to find the shortest possible route the guard can use. The following result was proved by Ntafos and Chin [23]: THEOREM 7.1. The Optimum Watchman Route for orthogonal polygons can be solved in linear time. For polygons with holes the problem is NP-hard, even if the holes are convex or orthogonal.
The NP-hard part was proved by reducing the Geometric Travehng Salesman problem to the Watchman problem. The NP-hardness for orthogonal case follows from the observation that the Geometric Traveling Salesman problem remains intractable even under the Manhattan distance. To find the Watchman Route in orthogonal polygons, Ntafos and Chin first identify edges that have to be present in the route, then "unroll" the remaining polygon by reflecting it around several of its edges.
Art gallery and illumination
problems
1007
Fig. 25. Illustration of proof of theorem on illuminating disjoint compact convex sets.
In another paper, Chin and Ntafos [24] proved that the Watchman problem for simple polygons can be solved in polynomial time. In fact, Chin and Ntafos claimed to have an 0(n^) time algorithm to solve this problem. Using techniques similar to those of Chin and Ntafos, Tan, Hirata and Inagaki [120] obtained an O(n^) algorithm to solve the Watchman Route problem. Finally, using a divide and conquer approach, the same authors [121] proved that the Watchman Route problem can be solved in O(n^) time. However it was recently pointed out by Hammar and Nilsson [68] that all the previous results had a common mistake that invalidated them. In their paper, they gave a solution to the mistake, yet it is interesting to note that Tan has uncovered errors in Hammar and Nilsson's paper, and proposes an O(n^) time algorithm [119]. The Watchman Route problem without specifying a starting point remains open. One of the most interesting problems here, due to Chin and Ntafos [24], is: PROBLEM 7.1. Can the Watchman Route problem without an initial starting point be solved in polynomial time?
The External Watchman Route problem is that of finding a watchman route in which a watchman is required to patrol the exterior of a polygon. Ntafos and Gewali [97] gave an 0{n'^) time algorithm for finding a shortest external watchman route for a simple polygon. In the same paper, linear time algorithms to solve the Watchman Route problem for monotone, convex, or rectilinear polygons are given. Nilsson and Wood [93] obtained a linear time algorithm to find a shortest watchman route, internal as well as external, in spiral
1008
J. Urrutia
Fig. 26. A watchman route.
Fig. 27. An external watchman route that does not intersect the boundary of two convex polygons.
polygons. In the same paper, they also studied the problem of finding optimal routes for m watchmen in a spiral polygon. They give an 0(«^m) algorithm for this case. Gewali and Lombardo [60] studied the problem of finding the optimal watchman route to guard the exterior of two convex polygons such that their total number of vertices is n. They gave an 0{rv') algorithm to solve this problem. This was recently improved by Gewali and Ntafos [63] to 0{n^). It is believed that an 0{n\nn) algorithm may exist to solve this problem. The shortest external watchman route for two convex polygons need not be in contact with their boundary; this is the main source of difficulty for finding the shortest route; see Figure 27. An interesting result was obtained recently by Mata and Mitchell [91 ] concerning approximation algorithms to find watchman routes in polygons in orthogonal polygons with holes. They showed: THEOREM 7.2. There is an 0{n^) time algorithm that finds a watchman route in orthogonal polygons whose length is within O(logm) times of the optimal watchman route, where m is the minimum number of edges in a rectilinear optimal watchman route.
Art gallery and illumination problems
1009
The shortest watchman route in which the starting position is not specified is much harder to solve. It is generally believed that this problem can be solved in polynomial time for simple polygons, however to our knowledge, no efficient algorithm to solve this problem is known. In a recent paper, Kumar and Madhavan [84] give an algorithm to solve the watchman route without a starting point for polygons that contain an edge e such that every point of P is visible from some point in e. Their algorithm works in 0{n^^).
7.2. The Robber Route problem Another variation introduced by Ntafos [95] is called The Robber Route problem. Consider a set T of points and a set S of edges of a polygon P. Our goal is to find a closed walk W starting and ending at a point x such that every point on an element of S is visible from a point in W while W is not visible from any point in T. One could think of the elements of T as threats, and the elements of S as sights one may wish to see. If T has at most n elements, Ntafos proves [95]: THEOREM 7.3. The Robber Route problem can be solved in 0(n^) time for arbitrary polygons, and in 0{\S\n -\-\T\n-\-n) time in orthogonal polygons.
A problem closely related to the Robber Route problem, introduced by Gewali, Meng, Mitchell, and Ntafos [61], is the computation of watchman routes inside a polygon with threat sources. The objective is to determine a watchman route that minimizes total exposure to threats; such a route is called the least-risk watchman route. It has been shown that a least-risk watchman route through a specified point x on the boundary of a simple orthogonal polygon with k threats can be constructed in 0{k^n^) time [61].
7.3. The Zoo-keeper's and the Safari Route problems Chin and Ntafos also considered two variations to the watchman route that they called The Zoo-keeper and Safari Routes. In these problems, our objective is to walk within a polygon P containing k "sites" one wishes to visit. These sites are represented by polygons within P. In the Safari Route problem we are allowed to enter the sites, as one does when visiting pavilions at an exhibition. In the Zoo-keeper Routes, we are not allowed to enter the sites, as a zoo-keeper who has to feed the animals, but does not enter their cages. They showed that in general, these problems are NP-hard. However, efficient solutions can be obtained under the condition where the sites are attached to the boundary of P. Chin and Ntafos [25] proved: THEOREM
7.4. The Zoo-keeper's problem can be solved in 0(n^) time.
This result has been improved by Hershberger and Snoeyink [72] who obtained an 0{n log^n) algorithm to solve this problem.
1010
J. Urrutia
Ntafos has also been able to obtain a polynomial time algorithm to solve the Safari Route problem, again under the restriction that the sites are attached to the boundary of P, in [96]. He shows: THEOREM
7.5. The Safari Route problem can be solved in 0{n?) time.
In the same paper, Ntafos studies watchman routes under limited visibility. In this context, he defines points to be ^-visible if they are visible and at distance at most d from each other. In [96] Ntafos gives approximation algorithms for the J-Watchman problem, i.e. finding a closed path that covers all of the boundary of P, and the J-sweeper problem, i.e. a path that covers the whole polygon. An interesting case arises when the sites to be visited are exactly all the edges of a polygon P. Czyzowicz et al. gave an 0{n) time algorithm to solve this case. They call this problem The Aquarium Keeper's problem [33].
7.4. Vision points on watchman routes Carlsson, Nilsson and Ntafos [18] studied another variation of the Watchman Route problem. In this variation, the guard is restricted to move along a path W such that all of P is visible from W. However, the guard surveys the polygon around him only at some selected points of W from which he can cover all of P. They call these points vision points. The motivation here is that we could think of a watchman route as an electrical wire that covers all of P. The vision points are the locations along the wire where we need to install lamps to illuminate P; see Figure 28. Their problem is that of determining the minimum number of vision points or lamps needed to illuminate P. They show: 7.6. Finding the minimum number of vision points along a shortest watchman route is NP-hard.
THEOREM
For histograms, however, they can solve this problem in linear time. In the same paper, they also solve the problem of finding the best m-watchmen routes for histogram polygons. Their algorithm runs in n^m^) time using O(n^m^) space. More results on watchman routes can be found in Nilsson's PhD thesis [92]. He studies watchmen routes for spiral, doughnut, histogram, and Alp polygons. For example, he shows that the number of vision points required to cover a polygon can be arbitrarily large, and if no general position is assumed, an infinite number of vision points may be required. He also shows that finding m minsum-watchmen routes in Alp polygons can be done in 0(n(n + m^)) time using 0(nm^) space. Very few results dealing with parallel algorithms for Watchman Route problems have been obtained. Gewali and Stojmenovic [64] have shown that a shortest external watchman route for a convex polygon can be computed in 0(\ogn) time using O ( j ^ ) processors in the CREW-PRAM computational model. In the same paper it is proved that a shortest external watchman route for a convex polygon can be computed in O(logn) time on a hypercube with 0(n) processors.
Art gallery and illumination
problems
1011
Fig. 28. An example where 3 vision points are required.
8. Mobile guards In this section we study several problems similar to Watchman Route problems. In contrast to stationary guards, which are not allowed to move, in the following set of problems, guards are required to move. This drastically reduces the number of guards required to patrol a polygon.
8.1. The Hunter'sproblem Suzuki and Yamashita [118] considered a search problem in which both a guard and a robber are allowed to move freely within a polygon. The guard moves with bounded velocity, and the robber moves with unbounded velocity. They study variations in which the guard can see in all directions at once, or in a fixed number k of directions, which, as in the Searchlight problem (Section 9.7), can change continuously. They call such a guard a ksearcher. They show that there are polygons which are 2-searchable but not 1-searchable. They also give some necessary and some sufficient conditions for a polygon to be searchable. A polygon is called /^-searchable if, given any initial configuration of a robber and k guards, it is always possible to move the guards such that at some point in time, the robber will come within sight of a guard. For example they prove that if a polygon is 1 -searchable, it has no points xi, X2, and X3 such that the shortest path between xi and Xj is not visible from any point visible from Xk\ i, j,k e {1, 2, 3}, / ^ j ^k. The polygon in Figure 29 is not 1-searchable. Shermer called the previous problem the Hunter's problem [110]. In his formulation of the problem, a hunter tries to catch a prey that is trapped within a polygonal region. The prey is considered caught if it comes within sight of the hunter. As do Suzuki and Yamashita, he assumes that the prey can move at an arbitrarily large speed, while the hunter moves with bounded velocity. Urrutia proved:
1012
/. Urrutia
Fig. 29. A 2-searchable polygon.
Fig. 30. A binary polygon.
8.1. 0(\nn) hunters are always sufficient, and occasionally necessary to catch a prey in any polygon with n vertices. THEOREM
Let fin) be the minimum number of hunters needed to catch a prey in an n vertex polygon P. We now show that f{n) ^ /(2«/3) + 1. This will prove our result. We first find a diagonal that splits P into two subpolygons Pi and P2 of size at most In 13. Station a hunter at an endpoint of this diagonal. This will ensure that no prey can go from Pi to P2. Next scan Pi first, and then P2. This can be accomplished with at most fi^njV) hunters. Our result now follows. A family of polygons that require O(lnn) hunters can be obtained from a binary search tree T as follows: first draw 7 on the plane without crossing edges, and then substitute a sequence of three narrow corridors for each edge of T as in Figure 30.
Art gallery and illumination
problems
1013
Fig. 31. A two-waUcable polygon.
8.2. The two guard problem Icking and Klein [79] introduced the following problem: Let P be a simple polygon, and s and t two points on its boundary. If we place two guards at s, can we move them to r, one in the clockwise direction and the other in the couter-clockwise direction along the boundary of P, while they remain mutually visible all the time? This is called the Straight Walk problem. Icking and Klein study several variations to the problem. In one of them, the guards are allowed to backtrack. They call this the General Walk problem. They also study the case when one guard moves from s io t while the other moves from t Xo s (counter walk). For the General Walk problem, Icking and Klein [79] present an 0{n\x\n + k) constructive algorithm, where k is the number of times both guards have to backtrack. They show that their algorithm is optimal by showing that computing a general walk has a lower bound of Q{n\nn). For the straight and the counter walk version of their problem they give Oinlnn) time algorithms. These results were improved by Heffeman [70] who proved: THEOREM
8.2. The Straight And Counter Walk problem can be solved in linear time.
Heffeman also gave a 0{n) time algorithm to decide if a polygon with n vertices has a general walk. Notice however that unlike Icking and Klein's optimal 0(n In/i) time optimal constructive algorithm, Heffeman's result does not produce the actual walks that the guards have to follow. 8.3. Lazy guards Colley, Meijer, and Rappaport [27] studied the following variation of mobile guards, which they call The Lazy Guard problem. Given a polygon P, choose a minimal number of stations (points) in the polygon such that a mobile guard who visits all stations, guards P; see Figure 32. They proved:
1014
/
Urrutia
Fig. 32. Three guard stations suffice to guard this polygon.
8.3. An optimal placement of stations for lazy guarding a simple polygon can be found in linear time.
THEOREM
They also show that the Lazy Guard problem is NP-complete for polygons with holes.
8.4. Treasures in art galleries Deneen and Joshi [43] studied the following problem: Suppose we have a number of valuable treasures in a polygon P. What is the minimum number of mobile guards required to patrol P in such a way that each treasure is always visible from at least one guard? They show that their problem is NP-hard, and give some heuristic algorithms to solve it. Carlsson and Jonsson [17] assigned weights to the treasures in the gallery, and asked for the problem of finding the problem of placing a guard in the gallery in such a way that the sum of weights of the treasures visible to the guard is maximized. They show: 8.4. Let P be a polygon with n vertices, and t weighted treasures. Finding the vertex guard that maximizes the weights of the treasures it sees can be done in 0(rmn[tn, / Inn + n^}) time. THEOREM
They also study the problem when the treasures are located at vertices of P, on its boundary, or in the interior of P.
Art gallery and illumination
problems
1015
Fig. 33. A 6-vertex terrain that needs two edge guards, and a 7-vertex terrain that needs 3 vertex guards.
9. Miscellaneous 9.1. Polyhedral terrains Let Pn be a point set on the plane. A triangulation of Pn is a subdivision of the convex hull of Pn into a set of triangles with disjoint interiors such that the vertices of all these triangles are elements of Pn. A polyhedral terrain P is defined in Bose, Shermer, Toussaint and Zhu [15] to be a triangulation of a point set Pn on the plane. A set S of vertices (resp. set H of edges) guard a polyhedral terrain P if every face of P has a vertex in S (resp. has an endpoint of an edge of H). The following result is due to Rivera-Campo and Everett [51]. THEOREM
9.1. Any triangulation of the plane can be guarded with at most [fj edge
guards. Their proof uses a nice argument based on the Four Color theorem. Bose, Shermer, Toussaint and Zhu [15] then proved: 9.2. [|J vertex guards are always sufficient and occasionally necessary to guard an n-vertexpolyhedral terrain. L ^ T ^ J edge guards are sometimes necessary. THEOREM
They provide linear time algorithms to place [_^\ vertex guards and \_^\ edge guards respectively. An interesting problem arising from the proof by Everett and Rivera-Campo was to prove Theorem 9.1 without the use of the Four Color theorem. This was recently achieved by Bose, Kirkpatrick, and Li [14]. They proved Theorem 9.1 using the fact that any bridgeless cubic graph always has a perfect matching. Their proof enabled them to obtain an 0(n^/^) time algorithm to place at most [f J edge guards and [fj vertex guards to guard a polyhedral terrain.
1016
/. Urrutia
Fig. 34. A set of circles that needs V-^—^ J guards to protect them.
9.2. Protecting convex sets Another variation to the Art Gallery theorem was proposed by Czyzowicz, Rivera-Campo, Urrutia and Zaks [37]. In this case, we say that a set S is protected by a guard g if at least one point in the boundary of S is visible from g. The motivation here is that as long as we can see part of an object, we know it has not been stolen. In [37] they prove the following results: 9.3. [ ^^ J guards are always sufficient and occasionally necessary to protect any family ofn disjoint convex sets, n > 2.
THEOREM
In the same paper, the following results are also proved: (1) r | ] guards are always sufficient and [f J are sometimes necessary to protect any family of n isothetic rectangles or any family of homothetic triangles. (2) r^"| guards are always sufficient to protect any family of n triangles. (3) There is no constant c < 1 such that every family of n convex sets in R^ can be protected with en guards. Once again, most of the proofs are based on Tutte's and Nishizeki's theorems. A family of circles that requires [ ^^7 ^J guards is shown in Figure 34.
9.3. Cooperative guards The concept of cooperative guards was proposed by Liaw, Huang and Lee [87]. Let Q be a set of points contained in a polygon P. The visibility graph of Q is the graph with vertex
Art gallery and illumination
problems
1017
Fig. 35, An orthogonal polygon with 6m vertices that requires 2m watched guards.
set Q in which two elements of Q are adjacent if they are mutually visible. A set of guards is called cooperative if they guard all of P and their visibility graph is connected. The idea behind this concept is that it could be dangerous for a guard to be stationed in an isolated location, unable to communicate with other guards. The main result in Liaw, Huang and Lee's paper is THEOREM 9.4. The Minimum Cooperative Guards problem/or simple polygons is NPhard. For spiral and 2-spiral polygons, this problem can be solved in linear time.
The proof for NP-hardness follows directly from the proof of Lee and Lin [85] that Theorem 3.1 is NP-complete. Combinatorial bounds for the minimum number of cooperative guards needed to guard a polygon were given by Hemandez-Penalver in [73]. He proved: THEOREM 9.5. L | J ~ 1 cooperative guards are always sufficient and occasionally necessary to guard a polygon with n vertices.
He also studied what he called watched guards, that is, sets of guards in which each guard is "guarded" by at least one other guard. He proved: THEOREM 9.6. [ ^ J watched guards are always sufficient and occasionally necessary to guard a polygon with n vertices.
Hernandez-Peiialver also obtained tight bounds on the number of cooperative guards and watched guards required to guard orthogonal polygons; these bounds are | — 2 [73], and Lf J [74] respectively. In Figure 35 we show an orthogonal polygon that requires [fj watched guards.
9.4. Guarding polygons using consecutive edges or vertex sets The problem of determining whether a polygon P is guarded by an arc 8 (P) of its boundary has also been studied in the literature. By an arc8(P), we understand a contiguous subset of the boundary of P bounded by two arbitrary points, not necessarily vertices of P.
1018
J. Urrutia
The first result in this direction was obtained by Avis and Toussaint [6]. They gave an optimal linear time algorithm to determine the visibility region of an edge e of P, that is, the set of points in P visible from at least one point on e. They also studied the problem of finding the set of points visible from every point in e. They call the first concept weak visibility and the latter strong visibility. In 1992, Chen [21] developed an optimal parallel algorithm to compute the visibility region of an edge of a polygon. His algorithm works in O(lnn) time using 0 ( | ^ ) processors in the CREW-PRAM computational model. Abellanas, Garcia-Lopez and Hurtado [1] study the problem of determining the minimum number of consecutive edges and guards required to cover a polygon P. THEOREM 9.7. For n even (resp. n odd), n — 3 vertex guards (resp. n — 4) are always sufficient and occasionally necessary to guard any polygon with n vertices, n^4.
They also show that n — 5 consecutive edge guards are always sufficient and occasionally necessary to guard any polygon P with n vertices, n > 5. For n < 5, one edge guard suffices. Their results lead to linear time algorithms. For the problem of finding the minimum number of consecutive vertex and edge guard sets, they claim an 0(n^ logn) time algorithm in the same paper. Their algorithm can also be modified to compute the shortest guarding arc of 8(P) in 0{n^ logn) time. These results were improved by Chen, Estivill-Castro and Urrutia [22], who proved: THEOREM 9.8. The shortest guarding boundary chain and the smallest guarding set of consecutive vertices of a polygon with n vertices can be found in 0{n Inn) time. They also gave parallel implementations of their results that run in O(logn) time using 0(n) processors in the CREW-PRAM model.
9.5. k-guarding The following problem was posed by A. Lubiw at the Fourth Canadian Conference in Computational Geometry: Suppose we want to guard a polygon P using guards stationed in the interior of the edges of P and in such a way that every edge of P is assigned at most one guard. How many guards are needed to guard PI For security reasons, we may want to cover every point of P by A: guards; for what values of k is it possible to A:-guard PI Shermer noticed that the comb polygon showed in Figure 36 is not 3-guardable. Belleville, Bose, Czyzowicz, Urrutia and Zaks [9] proved: 9.9. Every polygon can be 2-guarded with at most n — \ guards. Every polygon can be 1-guarded with at most L^^J guards. THEOREM
The polygon in Figure 36 with 2m + 1 vertices requires 2m — 2 guards to be 2-guarded, and m — 1 guards to 1-guard it. The results in [9] lead to linear time algorithms to find those guards.
Art gallery and illumination problems
1019
Fig, 36. A 2m + 1 polygon that is 2-guarded by 2m — 2 guards and 1-guarded by m — 1 guards.
9.6. Minimizing and maximizing visibility The problem of finding the location for a guard inside a polygon in such a way that the area covered by the guard is maximized or minimized has also been studied. Intuitively speaking, if we have only one guard available, the best place to station it is the point with the largest visibility area. On the other hand, if we want to hide something (or someone) inside a polygon, the best place is the point that minimizes visibility. Ntafos and Tsoukalas [98] proved: THEOREM 9.10. Finding the vertex guard of a polygon P with n vertices that maximizes visibility can be done in 0{n^) time. Finding the point along the boundary of P that maximizes the area of visibility can be found in 0(n^L) where L is the time it takes to numerically solve an equation of degree 0(n).
They also give an approximation algorithm to the boundary problem which in 0(m^^^) time produces a solution within ^ of the optimal one. The problem of finding the optimal point location of a guard that maximizes the visibility area is open. It is not known if an efficient algorithm to solve it exists. The problem of finding a point on the boundary of an orthogonal polygon that minimizes visibility was studied by Gewah [59]. He showed: THEOREM 9.11. The boundary point solution for the Minimum Visibility problem can be computed in 0{n^) time for orthogonal polygons, and in O(n^lnn) time for orthogonal polygons with holes.
Gewali also obtains an 0(n^) time algorithm for class 3 orthogonal polygons under staircase visibility. Two points are staircase visible if there is a polygonal joining them consisting of horizontal and vertical line segments such that any parallel to the x- or yaxes intersects it exactly once. 9.7. The Searchlight problem Sugihara, Suzuki and Yamashita [116] introduced the Searchlight Scheduling problem. A searchlight is a stationary guarding device based at a fixed position that emits a ray of light
Fig. 37. A schedule for two searchlights.
in one direction at a time. This direction, though, can be changed, as the searchlight is allowed to swivel around its base. A robber is a point that can move continuously and with unbounded speed. The Searchlight Scheduling problem is that of determining a way to move a set of searchlights in a polygon P such that an intruder (the "robber") within P can be detected. The intruder is considered detected if, at some point in time, it is illuminated by a searchlight. In Figure 37, we show a polygon with two searchlights, as well as the way to move them so that any robber will be detected, no matter how he moves. Sugihara, Suzuki and Yamashita [116] obtained necessary and sufficient conditions under which an intruder can be detected using one and two searchlights. They also claim that in linear time, they can find a set of L|J searchlights that will always detect an intruder in P. In [117], the same authors study the case when three searchlights are available. Sugihara, Suzuki and Yamashita [116] pose the following open problem: PROBLEM 9.1. Determine necessary and sufficient conditions for the existence of a search schedule for k searchlights.
9.8. Coverings and partitioning s of polygons A polygon P is called star shaped if there is a point q e P such that all the points of P are visible from q. The kernel of a polygon P is the set of all points that see all of P. It follows by definition that star-shaped polygons are those that can be guarded with one guard. The recognition problem for star-shaped polygons was completely settled by Lee and Preparata [86]. They showed: THEOREM
9.12. The kernel of a polygon can be found in linear time.
It is obvious that finding a minimal star shaped covering of a polygon P is equivalent to finding the smallest guarding set of P. This leads us to study the following problems:
Convex covering of polygons. Find the smallest number of convex polygons needed to cover a polygon. Notice that in this case, the polygons need not have disjoint interiors.
Art gallery and illumination problems
1021
Convex partition of polygons. Partition a polygon into a set of convex polygons with disjoint interiors.
Culberson and Reckhow [30] showed that the Convex Covering problem is NP-hard. They also showed that the related problems of covering only the edges or vertices of a polygon are also NP-hard. Hecker and Herwing [69] showed that Diagonal Guarding, Triangulation Triangle Guarding, and Mobile Guarding are all NP-hard. Chazelle and Dobkin [20] proved, surprisingly, that the problem of finding a minimum convex partitioning of a polygon can be done in polynomial time. They proved: THEOREM 9.13. Finding a minimum convex partitioning of a simple polygon P with n vertices into convex pieces can be done in 0(n -\- N^) time, where N is the number of reflex vertices of P.
Lingas [88] has shown that this problem becomes NP-hard for polygons with holes. Keil [81] studied the problem of partitioning a polygon into a set of star-shaped polygons and convex polygons such that the vertex set of each of these polygons is a subset of the vertices of the original polygon. He proved: THEOREM 9.14. Finding a minimum star-shaped (resp. convex) partitioning of a simple polygon P with n vertices can be done in 0(n^N^logn) time (resp. O(N^nlnn)), where N is the number of reflex vertices of P.
In the same paper, Keil also studies partitioning problems in which the length of the internal edges used is minimized. Aggarwal, Ghosh, and Shyamasundar [3] gave another approximation algorithm to partition a polygon into restricted star-shaped polygons. A restricted star-shaped polygon of a polygon P is a star-shaped subpolygon of P such that its edges are contained in edges or extensions of edges of P. They give an 0(n^ Inn) time algorithm to find a decomposition of a polygon P into restricted star-shaped subpolygons such that the number of polygons obtained is within O(lnn) times of the number of subpolygons in an optimal partition. The problem of partitioning a polygon into a small number of convex pieces has been studied by Shermer and by Belleville. Shermer proved that deciding if a polygon can be covered by two convex sets can be done in linear time [111], and Belleville [8] proved that the same bound is achievable for 3-convex coverings. Liu and Ntafos [89] have studied the problem of partitioning orthogonal polygons into star-shaped polygons. For monotone orthogonal polygons, they were able to solve this problem in linear time. They used this as a basis to obtain an 0(nlogn) approximation algorithm to partition a simple orthogonal polygon into star-shaped pieces such that the solution obtained is within six times the size of the optimal partitioning. Culberson and Reckhow also showed [31] that finding a minimum rectangle cover of an orthogonal polygon is NP-complete. Conn and O'Rourke [28] showed that the Rectangle Cover problem for orthogonal polygons with holes is NP-complete even if we are interested in covering only the reflex vertices. In the same paper, they showed that finding
1022
/ Urrutia
Fig. 38. A polyhedron with 6{k-\-\) edges that requires k edge guards.
a minimum rectangle cover for the set of convex vertices of orthogonal polygons can be done in 0{rp-^). It is easy to see that this case reduces to that of finding a maximum matching in a bipartite graph with vertex set equal to the set of convex vertices of an orthogonal polygon, two of which are adjacent iff they are rectangularly visible.
10. Conclusions and further directions of research Most of the results surveyed here study guarding or illumination problems on the plane. Little is known about illumination of polyhedra in higher dimensions. Seidel [99] constructed a polyhedron P„ with n vertices for every n = S(3k^ + 1) that has the following properties: (1) Even placing a guard on every vertex does not guard the entire interior of Pn. (2) ^{rv'/'^) point guards are necessary to cover Pn. It would be interesting to find tight bounds for the number of point guards necessary to cover any polyhedron with n vertices. On the other hand, a problem that might be easier to solve is that of edge guarding polyhedra of dimension 3. To start, it is easy to see that every polyhedron of dimension 3 can be guarded by placing an edge guard on every edge. For simply connected polyhedra of dimension 3, i.e. polyhedra homeomorphic to the sphere, we conjecture: CONJECTURE 10.1. Any simply connected ?>-dimensional polyhedron with m edges can be guarded with at most \J^\-\-c edge guards, c a constant.
A polyhedron achieving the bounds of our conjecture is shown in Figure 38.
Art gallery and illumination
problems
1023
Fig. 39. An orthogonal polyhedron with \2{k + 1) edges that requires k edge guards.
For orthogonal polyhedra, i.e. polyhedra such that each of their faces are parallel to the xy, yz, or zx planes, we can prove the following result: THEOREM 10.1. Any orthogonal polyhedron of dimension 3 with m edges can always be guarded with \J^\ edge guards.
I believe that the bound stated in the previous result is not tight, and venture the following conjecture: CONJECTURE 10.2. Any orthogonal polyhedron of dimension 3 with m edges can always be guarded with at most L^ J + <^ edge guards, c a constant.
An orthogonal polyhedron that achieves the bound stated in this conjecture is shown in Figure 39.
References [1] M. Abellanas, J Garcia-Lopez and F. Hurtado, Consecutive guards, Proc. of the Sixth Canadian Conference on Computational Geometry (1994), 393-398. [2] J. Abello, V. Estivill-Castro, T. Shermer and J. Urrutia, Illumination of orthogonal polygons with orthogonal floodlights, to appear in Intemat. J. Comput. Geom. [3] A. Aggarwal, S. Ghosh and R. Shyamasundar, Computational complexity of restricted polygon decomposition. Computational Morphology, G. Toussaint, ed.. North Holland (1988), 1-11. [4] A. Aggarwal, The Art Gallery Theorem: Its variations, applications and algorithmic aspects, PhD thesis, Johns Hopkins Univ. (1984). [5] D. Avis and H. ElGindy, A combinatorial approach to polygon similarity, IEEE Trans. Inform. Theory IT-29 (1983), 148-150. [6] D. Avis and G. Toussaint, An optimum algorithm to determine the visibility of a polygon from an edge, IEEE Trans. Comput. C-30 (1981), 910-914. [7] D. Avis and G. Toussaint, An efficient algorithm to decompose a polygon into star-shaped pieces. Pattern Recognition 13 (1981), 295-298. [8] P. Belleville, On restricted boundary covers and convex three-covers. Technical Report, Simon Eraser University, in preparation. [9] P. Belleville, P. Bose, J. Czyzowicz, J. Urrutia and J. Zaks, K-guarding polygons on the plane. Proceedings of the Sixth Canadian Conference on Computational Geometry (1994), 381-386.
1024
/
Urrutia
[10] I. Bjorling-Sachs, Variations on the Art Gallery Theorem, PhD thesis, Rutgers University (1993). [11] I. Bjorhng-Sachs and D. Souvaine, A tight bound for guarding polygons with holes, Rutgers University Technical Report LCSR-TR-165 (1991). [12] I. Bjorhng-Sachs and D. Souvaine, An efficient algorithm for guard placement in polygons with holes. Discrete Comput. Geom. 13 (1995), 77-109. [13] R Bose, L. Guibas, A. Lubiw, M. Overmars, D. Souvaine and J. Urrutia, The floodlight illumination problem, to appear in Intemat. J. Comput. Geom. [14] R Bose, D. Kirkpatrick and Z. Li, Efficient algorithms for guarding or illuminating the surface of a polyhedral terrain, to appear in Proc. of the Eight Canadian Conference on Computational Geometry (1996). [15] P. Bose, T. Shermer, G. Toussaint and B. Zhu, Guarding polyhedral terrains, to appear in Comput. Geom. [16] H. Bunting and D. Larman, Personal communication (1992). [17] S. Carlsson and H. Jonsson, Guarding a treasury, Proc. Fifth Canadian Conference on Computational Geometry (1993), 85-90. [18] S. Carlsson, B.J. Nilsson and S. Ntafos, Optimum guard covers and m-watchmen routes for restricted polygons, Proc. 2nd Workshop on Algorithms and Data Structures, Lecture Notes in Comput. Sci. 519 (1991), 367-378. [19] B. Chazelle, Triangulating a simple polygon in linear time. Discrete Comput. Geom. 6 (1991), 485-524. [20] B. Chazelle and D. Dobkin, Optimal convex decompositions. Computational Geometry, G. Toussaint, ed., North-Holland (1985). [21] D.Z. Chen, An optimal parallel algorithm for detecting weak visibility of a simple polygon, Proc. Eight Annual Computational Geometry Symposium (1992), 63-72. [22] D.Z. Chen, V. Estivill-Castro and J. Urrutia, Optimal guarding of polygons and monotone chains, Proc. of the Seventh Canadian Conference on Computational Geometry (1995), 133-138. [23] W.R Chin and S. Ntafos, Optimum watchman routes. Inform. Process. Lett. 28 (1988), 39^W. [24] W.R Chin and S. Ntafos, Watchman routes in simple polygons. Discrete Comput. Geom. 6 (1991), 9-31. [25] W.R Chin and S. Ntafos, The zoo-keeper route problem. Inform. Sci. 63 (1992), 245-259. [26] V. Chvatal, A combinatorial theorem in plane geometry, J. Combin. Theory Ser B 18 (1975), 3 9 ^ 1 . [27] P. CoUey, H. Meijer and D. Rappaport, Motivating lazy guards, Proc. Seventh Canadian Conference on Computational Geometry (1995), 121-126. [28] H. Conn and J. O'Rourke, Some restricted rectangle covering problems. Proceedings of the 1987 AUerton Conference. [29] C. CouUard, B. Gamble, W. Lenhart, W. Pulleyblank and G. Toussaint, On illuminating a set of disks. Manuscript (1989). [30] J. Culberson and R. Reckhow, Covering polygons is hard, Proc. 29th Symposium on Foundations of Computer Science (1988), 601-611. [31] J. Culberson and R. Reckhow, A unified approach to orthogonal polygon covering problems via Dent Diagrams, University of Alberta TR-89-6 (1989). [32] G. Csizmadia and G. Toth, Note on an art gallery problem. Manuscript (1996). [33] J. Czyzowicz, P. Egyed, H. Everett, W. Lenhart, K. Lyons, D. Rappaport, T. Shermer, D. Souvaine, G. Toussaint, J. Urrutia and S. Whitesides, The aquarium keeper's problem, Proc. ACM-SIAM Symposium on Data Structures and Algorithms (1991), 459^64. [34] J. Czyzowicz, I. Rival and J. Urrutia, Galleries, light matchings and visibility graphs, WADS 1989, Ottawa, F. Dehne, J.-R. Sack and N. Santoro, eds.. Lecture Notes in Comput. Sci. 382 (1989), 316-324. [35] J. Czyzowicz, E. Rivera-Campo and J. Urrutia, Illuminating rectangles and triangles in the plane, J. Combin. Theory Ser. B (1993), 1-17. [36] J. Czyzowicz, E. Rivera-Campo, J. Urrutia and J. Zaks, Illuminating lines and circles on the plane. University of Ottawa, Computer Science Department TR-89-49 (1989). [37] J. Czyzowicz, E. Rivera-Campo, J. Urrutia and J. Zaks, Protecting convex sets. Graphs and Combinatorics 10 (1994), 311-312. [38] J. Czyzowicz, E. Rivera-Campo, J. Urrutia and J. Zaks, On illuminating line segments in the plane. Discrete Math. 137 (1995), 147-153. [39] J. Czyzowicz, E. Rivera-Campo, N. Santoro, J. Urrutia and J. Zaks, Guarding rectangular art galleries. Discrete Math. 50 (1994), 149-157.
Art gallery and illumination problems
1025
[40] J. Czyzowicz, E. Rivera-Campo and J. Urrutia, Optimal floodlight illumination of stages, Proc. 5th Canadian Conference on Computational Geometry (1993), 393-398. [41] J. Czyzowicz, B. Gaujal, E. Rivera-Campo, J. Urrutia and J. Zalcs, Illuminating high-dimensional convex sets, Geometriae Dedicata 56 (1995), 115-120. [42] J. Czyzowicz and J. Urrutia, Personal communication (1996). [43] L.L. Deneen and S. Joshi, Treasures in an art gallery, Proc. Fourth Canadian Conference on Computational Geometry (1992), 17-22. [44] H. Edelsbrunner, J. O'Rourke and E. Welzl, Stationing guards in rectilinear art galleries, Comput. Vision, Graphics and Image Process. 27 (1984), 167-176. [45] H. ElGindy and D. Avis, A linear time algorithm for computing the visibility polygon from a point, J. Algorithms 2 (1981), 186-197. [46] P. Erdos and G. Szekeres, A combinatorial problem in geometry, Compositio Math. 2 (1935), 463^70. [47] V. Estivill-Castro, J. O'Rourke, J. Urrutia and D. Xu, Illumination of polygons with vertex floodlights. Inform. Process. Lett. 56 (1) (1995), 62-73. [48] V. Estivill-Castro and J. Urrutia, Optimal floodlight illumination of orthogonal polygons, Proc. Sixth Canadian Conference on Computational Geometry (1994), 81-86. [49] V. Estivill-Castro and J. Urrutia, The two floodlight illumination problem, Proc. Fourth Workshop on Algorithms and Data Structures, Lecture Notes in Comput. Sci. 955, Springer-Verlag (1995), 62-73. [50] H. Everett, K. Lyons, B. Reed and D. Souvaine, Illuminating squares on a traversal, Proc. Third Canadian Conference on Computational Geometry (1991), 118-121. [51] H. Everett and E. Rivera-Campo, [^J edge guards are sufficient to guard a polyhedral terrain, to appear in Comput. Geom. [52] H. Everett and G. Toussaint, On illuminating isothetic rectangles in the plane. Manuscript (1990). [53] L. Fejes Toth, Illumination of convex disks. Acta Math. Acad. Sci. Hungar. 29 (1977), 355-360. [54] S. Fisk, A short proof of ChvdtaVs watchman theorem, J. Combin. Theory Ser B 24 (1978), 374. [55] Z. Fiiredi and D. Kleitman, The prison yard problem, Combinatorica 14 (1994), 287-300. [56] J. Garcia-Lopez, Problemas algoritmico-combinatorios de visibilidad, PhD thesis, Universidad Politecnica de Madrid (1995). [57] R. Garey and D. Johnson, Computers and Intractability, W.H. Freeman and Company, New York (1979). [58] M. Garey, D.S. Johnson, F.P. Preparata and R.E. Tarjan, Triangulating a simple polygon. Inform. Process. Lett. 7 (1978), 175-179. [59] L. Gewali, Placing guards inside orthogonal polygons. Inform. Sci. 88 (1996), 1-14. [60] L. Gewali and R. Lombardo, Watchman routes for a pair of convex polygons. Lecture Notes in Pure Appl. Math. 144 (1993). [61] L. Gewali, A.C. Meng, J.S.B. Mitchell and S. Ntafos, Path planning in 0/1/inf weighted regions with applications, ORSA J. Comput. 3 (2) (1990), 253-272. [62] L.P. Gewali and S. Ntafos, Covering grids and orthogonal polygons with periscope guards, Comput. Geom. 2 (1993), 309-334. [63] L.P, Gewali and S. Ntafos, Watchman routes in the presence of a pair of convex polygons, Proc. Seventh Canadian Conference on Computational Geometry (1995), 127-132. [64] L.P. Gewali and I. Stojmenovic, Computing external watchman routes on PRAM, BSR and interconnection network models of parallel computation. Parallel Process. Lett. 4 (182) (1994), 83-93. [65] S. Ghosh, Approximation algorithms for Art Gallery Problems, Proceedings of the Canadian Information Processing Society Congress (1987). [66] E. Gyory, A short proof of the rectilinear art gallery theorem, SIAM J. Alg. Disc. Meth. 7 (1986), 452^54. [67] E. Gyory, F. Hoffmann, K. Kriegel and T. Shermer, Generalized guarding and partitioning for rectilinear polygons. Proceedings of the Sixth Canadian Conference on Computational Geometry (1994), 302-307. [68] M. Hammar and B.J. Nilsson, Concerning the time bounds of existing shortest watchmann route algorithms, Proc. FCT'97, LNCS 1279 (1997), 210-221. [69] H.-D. Hecker and D. Herwing, Some NP-hard polygon cover problems, J. Inf. Process Cybem. 25 (1989), 101-108. [70] P.J. Heffeman, An optimal algorithm for the two-guard problem, Intemat. J. Comput. Geom. Appl. 6 (1996), 14-44.
1026
J. Urrutia
[71] J. Hershberger, Finding the visibility graph of a polygon in time proportional to its size. Proceedings of the Third ACM Symposiuum on Computational Geometry (1987), 11-20. [72] J. Hershberger and J. Snoeyink, An efficient solution to the Zookeeper's Problem, Proc. Sixth Canadian Conference on Computational Geometry (1994), 104-109. [73] G. Hemandez-Penalver, Controlling guards, Proc. of the Sixth Canadian Conference on Computational Geometry (1994), 387-392. [74] G. Hemandez-Penalver, Vigilancia vigilada de poligonos orthogonales, Actas del VI Encuentros de Geometria Computacional, Barcelona, Spain, July (1995), 198-205. [75] F. Hoffmann, On the rectilinear Art Gallery Problem, Proc. ICALP, Lecture Notes in Comput. Sci. 90, Springer-Verlag (1990), 717-728. [76] F. Hoffman, M. Kaufman and K. Kriegel, The art gallery problem for polygons with holes. Proceedings of the 32nd Symposium on Foundations of Computer Science (1991), 3 9 ^ 8 . [77] F. Hoffman and K. Kriegel, A graph coloring result and its consequences for the polygon guarding problems. Technical Report B 93-08, Freie Universitat Berhn (1993). [78] F. Hurtado, O. Serra and J. Urrutia, Hiding people in arrangements of segments, to appear in Discrete Appl. Math. [79] C. Icking and R. Klein, The two guards problem, Intemat. J. Comput. Geom. Appl. 2 (1992), 257-285. [80] G.F. Jennings and W. Lenhart, An art gallery theorem for line segments in the plane, Pattern Recogn. Lett. 14 (1993), 727-732. [81] J.M. Keil, Decomposing a polygon into simpler components, SI AM J. Comput. 14 (4) (1985), 799-817. [82] J. Kahn, M. Klawe and D. Kleitman, Traditional galleries require fewer watchmen, SIAM J. Algebraic and Discrete Methods 4 (1983), 194^206. [83] V. Klee, Is every polygonal region illuminated from some point? Amer. Math. Monthly 76 (1969), 180. [84] P.P. Kumar and C.E.V. Madhavan, Shortest Watchman tours in weak visibility polygons, Proc. Fifth Canadian Conference on Computational Geometry (1995), 91-96. [85] D.T. Lee and A.K. Lin, Computational complexity of art gallery problems, IEEE Trans. Info. Th. IT-32 (1979), 415-421. [86] D.T. Lee and F.P. Preparata, An optimal algorithm for finding the kernel of a polygon, J. ACM 26 (1979), 276-282. [87] B.-C. Liaw, N.F. Huang and R.C.T. Lee, The minimum cooperative guards problem on k-spiral polygons, Proc. of the Fifth Canadian Conference on Computational Geometry (1993), 97-102. [88] A. Lingas, The power of non rectilinear holes, Proc. 9th Colloquium on Automata, Languages and Programming, Springer-Verlag (1982), 369-383. [89] R. Liu and S. Ntafos, On partitioning rectilinear polygons into star-shaped polygons, Algorithmica 6 (1991), 771-800. [90] A. Lubiw, Decomposing polygonal regions into convex quadrilaterals, Proc. First ACM Computational Geometry Symposium, Baltimore, (1985), 97-106. [91] C.S. Mata and J. Mitchell, Approximation algorithms for geometric tours and network design problems, Proc. 11th ACM Symposium on Computational Geometr (1995), 360-370. [92] B.J. Nilsson, Guarding art galleries, methods for mobile guards, PhD thesis. Department of Computer Science, Lund University (1994). [93] B.J. Nilsson and D. Wood, Optimum watchmen routes in spiral polygons. Proceedings of the Second Canadian Conference in Computational Geometry (1990), 269-272. [94] T. Nishizeki and I. Baybars, Lower bounds on cardinality of maximum matchings of planar graphs. Discrete Math. 28 (1979), 255-267. [95] S. Ntafos, The robber problem. Inform. Process. Lett. 34 (1990), 59-63. [96] S. Ntafos, Watchman routes under limited visibility, Comput. Geom. 1 (1992), 149-170. [97] S. Ntafos and L. Gewali, External watchman routes. The Visual Computer 10 (1994), 474-483. [98] S. Ntafos and M. Tsoukalas, Optimal placement of guards. Proceedings of the Third Canadian Conference on Computational Geometry (1991), 122-125. To appear in Inform. Sci. [99] J. O'Rourke, Art Gallery Theorems and Algorithms, Oxford University Press (1987). [100] J. O'Rourke, Galleries need fewer mobile guards: a variation to Chvdtal's Theorem, Geometriae Dedicata 14 (1983), 273-283.
Art gallery and illumination problems
1027
[101] J. O'Rourke and D. Xu, Illumination of polygons with 90° vertex lights. Snapshots in Comput. Geom. 3 (1992), 109-123. [102] J. O'Rourke, T. Shermer and I. Streinu, Illuminating convex polygons with vertex floodlights. Proceedings of the Seventh Canadian Conference on Computational Geometry (1995), 151-156. [103] G. Rote, Personal communication (1993). [104] J.R. Sack, Rectilinear computational geometry, Carleton University, TR-SCS-54-1984. [105] J.R. Sack and G. Toussaint, A linear time algorithm for decomposing rectilinear star-shaped polygons into convex quadrilaterals. Proceedings of the 19th AUerton Conference on Communication, Control and Computing, Monticello (1981), 21-30. [106] J.R. Sack and G. Toussaint, Guard placement in rectilinear polygons. Computational Morphology, G.T. Toussaint, ed., Elsevier Science Publishers (1988), 153-175. [107] D. Schuchardt and H. Hecker, Two NP-hard problems for ortho-polygons. Math. Logiv Quart. 41 (1995), 261-267. [108] T. Shermer, Hiding people in polygons. Computing 42 (1989), 109-131. [109] T. Shermer, Visibility properties of polygons, PhD thesis, McGill University, Montreal, Canada (1989). [110] T. Shermer, Recent results in Art Galleries, Proceedings of the IEEE (1992), 1384-1399. [ I l l ] T. Shermer, On recognizing unions of two convex polygons. Pattern Recogn. Lett. 14 (1993), 737-745. [112] T. Shermer, A tight bound on the combinatorial edge guard problem, in preparation. [113] L Streinu, Positive and negative results in computational geometry, PhD thesis, Rutgers University (1994). [114] W. Steiger and I. Streinu, Positive and negative results on the floodlight illumination problem, Proc. Sixth Canadian Conference on Computational Geometry (1994), 87-92. [115] W. Steiger and I. Streinu, Illumination by floodlights. Manuscript (1996). [116] K. Sugihara, I. Suzuki and M. Yamashita, The searchlight scheduling problem, SIAM J. Comput. 19 (1990), 1024-1040. [117] K. Sugihara, I. Suzuki and M. Yamashita, The searchlight scheduling problem. Technical Report, Department of Electrical Engineering and Computer Science University of Milwaukee (October 1988). [118] I. Suzuki and M. Yamashita, Searching for a mobile intruder in a polygonal region, SIAM J. Comput. 21 (1992), 863-888. [119] X.-H. Tan, Corrigendum to: "An incremental algorithm for constructing shortest watchman routes". Personal communication (1998). [120] X.-H. Tan, T. Hirata and Y. Inagaki, An incremental algorithm for constructing the shortest watchman route, Proc. ISAC'91, Lecture Notes in Comput. Sci. 557 (1991), 163-175. [121] X.-H. Tan, T. Hirata and Y. Inagaki, Constructing the shortest watchman routes by divide and conquer, Proc. 4th International Symposium on Algorithms and Computation, Lecture Notes in Comput. Sci. 762 (1993), 68-77. [122] R. Tarjan and C. van Wyk, An 0(n log log n) time algorithm for triangulating simple polygons, SIAM J. Comput. 17 (1988), 143-178. [123] G.T. Tokarsky, Polygonal rooms not illuminable from every point, Amer. Math. Monthly 102 (1995), 867879. [124] W.T. Tutte, The factorization of a planar graph, J. London Math. 22 (1947), 107-111. [125] J. Urrutia, Iluminando poligonos con reflectores, Actas VI Encuentro de Geometria Computacional, Barcelona, July 1995, F. Hurtado, M. Noy and J. Trias, eds, Universitat Politecnica de Catalunya (1995), 59-73. [126] J. Urrutia and J. Zaks, Illuminating convex sets. University of Ottawa TR-89-31 (1989). [127] S. Viswanathan, The edge guard problem for spiral polygons, Proc. Fifth Canadian Conference on Computational Geometry (1993), 103-108. [128] S.N. Yiu, A generalized fortress problem using k-consecutive vertex guards, Proc. Seventh Canadian Conference on Computational Geometry (1995), 139-144. [129] S.M. Yiu and A. Choi, Edge guards on a fortress. Proceedings of the Sixth Canadian Conference on Computational Geometry (1994), 296-301.
This Page Intentionally Left Blank
Author Index Roman numbers refer to pages on which the author (or his/her work) is mentioned. ItaUc numbers refer to reference pages. Numbers between brackets are the reference numbers. No distinction is made between first and co-author(s)
Abe, 8.951,952,9(55 [23] Abel, D.J. 743, 753, 757 [1]; 757 [2] Abellanas, M. 262, 2M [1]; 1018,1023 [1] Abello, J. 645, 686 [1]; 865, S71 [1]; 871 [2]; 984, 999,1023 [2] Abrahamson, K. 161,192 [1] Ackermann, W. 11, 47 [1] Adamec, R. 11, 4i [2] Adegeest, J. 548, 555 [1] Adelson-Velskii, G.M. 731, 757 [3] Aftosmis,M. 317, 527 [1] Agarwal, R 3, 4, 10, 11, 14, 16, 17, 19, 21-26, 29, 30, 34, 36-38, 40, 41, 41 [3]; 41 [4]; 41 [5]; 42 [10]; 42 [11]; 42 [12]; 42 [6]; 42 [7]; 42 [8]; 42 [9]; 46 [142]; 51, 53, 54, 60, 63, 65, 66, 68, 74^79, 84, 86-88, 90-94, 96-103, 106, 106 [1]; 106 [2]; 106 [3]; 107 [10]; 107 [11]; 107 [12]; 107 [13]; 107 [14]; 107 [15]; 107 [16]; 707 [17]; 107 [18]; 707 [19]; 707 [20]; 707 [21]; 707 [22]; 707 [23]; 707 [24]; 707 [25]; 707 [26]; 707 [27]; 707 [28]; 707 [29]; 707 [4]; 707 [5]; 707 [6]; 707 [7]; 707 [8]; 707 [9]; 777 [294]; US [330]; 133, 134, 136, 137, 145, 750 [14]; 750 [16]; 792 [2]; 792 [3]; 200 [210]; 236, 237, 271, 281,281 [2]; 281 [3]; 350, 357, 372, 375, 377 [1]; 377 [2]; 377 [3]; 377 [4]; 377 [5]; 377 [6]; 378 [44]; 430, 435, 438, 456 [2]; 456 [3]; 456 [4]; 566, 574, 578, 581, 585, 586, 589, 590, 590 [1]; 597 [3]; 597 [4]; 597 [5]; 597 [11]; 597 [12]; 597 [13]; 597 [15]; 597 [16]; 594 [112]; 626, 627 [1]; 653, 654, 659, 668, 669, 670, 672, 674, 686 [2]; 686 [3]; 686 [4]; 686 [5]; 686 [6]; 686 [7]; 686 [8]; 707 [382]; 707 [383]; 722, 722 [1]; 722 [2]; 740, 757 [4]; 757 [5]; 865, 870, 871 [3]; 871 [4]; 871 [5]; 928, 930 [1]; 930 [2] Aggarwal, A. 142, 750 [5]; 165, 181, 184, 185, 187, 792 [4]; 792 [5]; 792 [6]; 792 [7]; 193 [8]; 193 [9]; 193 [10]; 193 [11]; 245, 265, 277, 281 [4]; 281 [5]; 287 [6]; 436, 456 [5]; 493, 498, 501, 513 [1];
57i [2]; 575 [3]; 513 [4]; 530, 540, 550, 551, 555 [2]; 681, 686 [9]; 824, 825 [1]; 840, 877 [6]; 882, 896, 897, 904, 929, 930 [3]; 930 [4]; 950 [5]; 986-988, 991, 1021, 7025 [3]; 7025 [4] Ahn, H.-K. 105, 707 [30] Aho, A.V. 125, 750 [10]; 609, 627 [2] Ahuja, N. 275, 287 [7] Ahuja, R.K. 636, 686 [10] Aichholzer, O. 138, 750 [1]; 228, 242, 244, 287 [8]; 287 [9]; 287 [10]; 448, 456 [6] Ajtai, A. 776, 826 [9] Ajtai, M. 74, 708 [31]; 160, 795 [12]; 795 [13]; 569, 589, 597 [10] Ajuria,M.B.G. 312, 527 [3] Akin, J.E. 316, 529 [67] Akl, S. 826 [8]; 157, 795 [14]; 795 [15]; 271, 287 [11] Akutsu, T. 125, 757 [20] Albers, G. 37, 42 [13] Alberts, D. 244, 287 [8] Albertson, M. 510, 575 [5] Aldrich, C. 361, 579 [73] Alefeld, G. 612, 627 [3] Aleksandrov, L. 552, 553, 555 [3]; 651, 670, 687 [11]; 687 [12] Alevizos, R 21, 23, 27, 42 [14]; 42 [15] Alexander, R. 651, 687 [13]; 687 [14]; 687 [15] Alexanderson, G.L. 52, 56, 708 [32]; 708 [33]; 708 [34] Alon, N. 29, 42 [16]; 58, 73, 76, 89, 708 [35]; 708 [36]; 708 [37]; 795 [16]; 439, 440, 456 [7]; 561, 569, 570, 573, 578, 590 [2]; 597 [14]; 597 [6]; 597 [9]; 675, 680, 687 [16]; 687 [17]; 825, 826 [2]; 826 [3]; 865, 877 [3]; 927, 930 [6] Alsuwaiyel, M. 554, 555 [4]; 555 [5]; 685, 687 [18]; (587 [19]; 841, 877 [7] Alt, H. 38, 42 [17]; 75, 82, 708 [38]; 708 [39]; 125-128, 133, 136-139, 141, 750 [1]; 750 [2];
I-l
1-2
Author
150 [3]; 150 [4]; 150 [7]; 150 [8]; 150 [9]; 750 [13]; 242, 280, 281 [12]; 287 [13]; 281 [14]; 645, 687 [20]; 959, 962, 964 [1] Althofer, I. 451-453, 457 [8]; 457 [9] Amanatides, J. 344, 384 [205] Amato, N. 26,42 [18]; 104, 708 [40]; 189, 190, 192, 795 [17]; 193 [18]; 795 [19]; 795 [20]; 795 [21]; 795 [22]; 234, 287 [15]; 570, 578, 580, 581, 585, 586, 588, 589, 597 [7]; 597 [8]; 825, 826 [7]; 826 [11]; 928, 950 [7] Ambartzumjan, R.V. 756, 757 [6] Amenta, N. 34, 41 [3]; 102, 707 [5]; 312, 313, 324, 327 [2] Amezua,E. 312, 527 [3] Ammann, C 626, 657 [110] Amorin, R.V. 393, 397, 420 [1] Anagnostou, E.G. 91, 708 [41] Anderson, R. 160, 795 [23]; 795 [24]; 540, 555 [6]; 775, 826 [10] Andrews, D.S. 346, 377 [7] Andrews, H.C. 880, 930 [8] Andrzejak, A. 75, 708 [42] Ang, C.-H. 756, 757 [7] Aonuma, H. 37,42[19] Apostolico, A. 183-185, 795 [25] Aref, W.G. 343, 377 [8]; 757 [8] Arge, L. 98, 707 [6]; 487, 487 [1]; 487 [2]; 741, 757 [9] Arikati, S. 451, 457 [10]; 647, 649, 687 [21] Arkin, E.M. 22, 42 [20]; 126, 127, 140, 750 [11]; 750 [6]; 521, 530, 531, 549, 550, 555 [7]; 557 [65]; 657-659, 676, 679, 680, 682-685, 687 [22]; 687 [23]; 687 [24]; 687 [25]; 687 [26]; 687 [27]; 687 [28]; 687 [29]; 687 [30]; 687 [31]; 697 [294] Armstrong, CO. 318, 327 [4] Arnold, D.N. 325, 327 [5] Amon, D.S. 90, 708 [43] Aronoff, S. 352, 377 [9] Aronov, B. 28, 33, 34, 41 [3]; 41 [4]; 41 [5]; 42 [21]; 44 [79]; 51, 58, 66, 68, 70, 71, 74-79, 81, 83, 86, 87, 90, 94, 98, 100-103, 707 [7]; 707 [8]; 707 [9]; 707 [10]; 707 [11]; 707 [12]; 708 [42]; 708 [44]; 708 [45]; 708 [46]; 708 [47]; 708 [48]; 708 [49]; 708 [50]; 708 [51]; 708 [52]; 708 [53]; 708 [54]; 708 [55]; 708 [56]; 708 [57]; 149, 750 [15]; 242, 247, 276, 287 [16]; 287 [17]; 282 [29]; 590, 590 [1]; 642, 643, 667, 668, 686 [3]; 687 [32]; 687 [33]; 687 [34]; 865, 870, 877 [3]; 877 [8]; 877 [9]; 928, 950 [1] Arora, S. 439, 440, 442, 457 [11]; 457 [12]; 671, 675, 676, 678, 688 [35]; 688 [36] Arvo, J. 870, 877 [10] Arya, S. 130, 750 [12]; 454, 455, 457 [13]; 457 [14]; 457 [15]; 676, 679, 688 [37]; 881, 895, 904, 906,
index 911, 915, 918, 919, 921, 922, 924-927, 929, 930 [9]; 930 [10]; 930 [11]; 930 [12]; 930 [13]; 930 [14]; 930 [15] Asano, T. 91, 708 [58]; 277, 287 [18]; 427,437, 457 [16]; 538, 556 [46]; 643-645, 656, 673, 688 [38]; 688 [39]; 688 [40]; 688 [41]; 688 [42]; 743, 757 [10] Asano, Ta. 493, 496, 499, 504, 575 [6]; 575 [62]; 843, 845, 849, 860, 877 [11]; 877 [12] Asano, Te. 493, 496, 499, 575 [6]; 843, 845, 849, 860, 877 [11]; 877 [12] Ash, R 222, 225, 282 [19]; 282 [20] Atallah, M.J. 3, 5, 9, 35-37, 42 [22]; 42 [23]; 133, 750 [18]; 157, 159, 163-166, 168, 169, 172, 176, 179-181, 183-186, 188, 192, 795 [25]; 795 [26]; 795 [27]; 795 [28]; 795 [29]; 795 [30]; 795 [31]; 795 [32]; 795 [33]; 795 [34]; 795 [35]; 795 [36]; 194 [37]; 194 [38]; 194 [39]; 194 [40]; 794 [41]; 194 [42]; 194 [43]; 194 [44]; 194 [45]; 794 [46]; 794 [47]; 794 [48]; 794 [49]; 219, 282 [21]; 368, 377 [10]; 636, 649, 688 [43]; 688 [44]; 688 [45]; 805, 824, 826 [4]; 826 [5]; 826 [6]; 856, 877 [13]; 942, 953, 969 [130]; 969 [131] Atkinson, M.D. 124, 125, 750 [19] Aupperle, L.J. 510, 575 [7]; 575 [8] Aurenhammer, F. 30, 42 [24]; 80, 709 [59]; 203, 225, 228, 233-235, 237, 238, 242, 244, 265, 276, 280, 287 [8]; 287 [9]; 287 [10]; 282 [22]; 282 [23]; 282 [24]; 282 [25]; 282 [26]; 282 [27]; 282 [28]; 282 [29]; 282 [30]; 282 [31]; 342, 355, 377 [11]; 448, 456 [6]; 639, 674, 688 [46]; 715, 722 [3]; 883, 957 [16] Avis, D. 36, 42 [25]; 42 [26]; 42 [27]; 55, 91, 95, 709 [60]; 709 [61]; 709 [62]; 142, 750 [17]; 233, 282 [32]; 374, 377 [12]; 445, 460 [103]; 496, 498, 501, 575 [9]; 525, 556 [31]; 837, 844, 845, 856, 865, 877 [14]; 877 [15]; 872 [54]; 875 [147]; 977, 983, 1018, 7025 [5]; 7025 [6]; 7025 [7]; 7025 [45] Avnaim, F. 613, 626, 627 [4]; 627 [5] Awerbuch, B. 441, 457 [17]; 679, 688 [47] Azar, Y. 441,457 [17]; 675, 677, 679, 687 [16]; 688 [47]; 688 [48]; 826 [12]; 826 [2] Aziz, A. 299, 327 [6] Babai, L. 569, 590 [2] Babu§ka, I. 299, 309, 327 [6]; 327 [7] Badre, A. 419, 422 [34] Baecker, R.M. 393, 413, 415, 416, 420 [2]; 427 [26]; 427 [27] Baehmann, RL. 308, 323, 327 [8]; 557 [116] Baeza-Yates, R. 661, 662, 688 [49] Bafna, V. 677, 688 [50] Baird, H.S. 131, 757 [21]
Author index Bajaj, C. 35, 42 [23]; 356, 374, 377 [13]; 377 [14]; 387 [272]; 493, 513 [10]; 622, 624, 627 [6]; 627 [7]; 628 [35]; 666, 655 [51]; 688 [52]; 856, 577 [13] Baker, B.S. 315, 527 [9] Baker, J.E. 626, 627 [8] Baker, TJ. 304, 321, 327 [10]; 329 [68] Balaban, I. 91, 109 [63]; 589, 591 [17] Balas, E. 679, 688 [53] Baltsan, A. 34, 42 [28] Bank, R.E. 299, 310, 327 [11]; 527 [12]; 327 [13] Biinsch, E. 325, 327 [14] Bar-Eli, E. 661, 655 [54] Bar-Yehuda, R. 510, 513 [11]; 638, 655 [55] Barany, I. 75, 76, 108 [36]; 109 [64]; 709 [65] Barber, C.B. 321, 327 [15]; 622, 627 [9]; 627 [10]; 627 [11] Barequet, G. 146, 147, 757 [25] Barfield, W.D. 302, 327 [16] Barr, A.H. 361,i57[278] Barraquand, J. 104,109 [66]; 653, 655 [56] Barrera, R. 372, 377 [15] Barrett, R. 298, 327 [17] Barth,TJ. 300, 527 [18] Bartling, R 928, 957 [17]; 957 [18] Barvinok, A. 440, 457 [18]; 680, 655 [57]; 655 [58] Basch, J. 437, 457 [19]; 457 [20] Bast, H. 825, 526 [13]; 527 [34] Basu, S. 55, 58, 67, 71, 89, 90, 93, 104,109 [67]; 709 [68]; 109 [69]; 709 [70]; 709 [71] Batchelor, B.G. 501, 575 [12] Bateman, CD. 675, 655 [59] Batini, C. 958, 960, 962, 977 [166] Battacharya, B.K. 374, 377 [12] Battista, G.D. 964, 964 [2] Baumgart, B. 340, 377 [16]; 467, 468, 457 [3] Bayazit, O.B. 104, 705 [40] Baybars, I. 977, 7026 [94] Bayer, R. 731, 744, 757 [11]; 757 [12] Beame, R 795 [23]; 825, 526 [14] Beck, J. 573, 597 [18] Becker, B. 752, 754, 756, 757 [13]; 755 [14]; 755 [15]; 755 [16] Becker, L. 756, 755 [17] Beckmann, N. 345, 377 [17]; 752, 755 [18] Behrends, B. 38, 42 [17]; 127, 128, 133, 136, 137, 750 [2]; 750 [3]; 757 [22] Beigel, R. 794 [50] Belleville, R 501, 575 [13]; 575 [14]; 575 [15]; 1018, 1021, 7025 [8]; 7025 [9] Ben-Chanoch, E. 510, 575 [11] Ben-Or, M. 813, 526 [15]; 882, 957 [19] Benedetti, R. 256, 252 [33] Benedikt, M. 833, 844, 572 [46]
1-3
Benouamer, M. 611, 627 [12] Bent, S.W. 473, 480, 481, 457 [4] Bentley, J.L. 20, 42 [29]; 91, 709 [72]; 214, 217, 268, 252 [34]; 252 [35]; 252 [36]; 345, 346, 377 [18]; 399, 415, 420 [3]; 420 [4]; 434, 457 [21]; 484-486, 457 [5]; 457 [6]; 457 [7]; 457 [9]; 459 [64]; 610, 627 [13]; 673, 677, 655 [60]; 692 [162]; 731, 736, 744, 748, 755 [19]; 759 [46]; 879, 883, 884, 891, 898, 910, 915, 917, 928, 957 [20]; 957 [21]; 957 [22]; 957 [23]; 957 [24]; 932 [64]; 932 [68]; 932 [69] Benzley,S.E. 318, 527 [19] Berger, B. 189, 794 [51]; 570, 597 [22]; 597 [23] Berger, M. 317, 318, 327 [1]; 327 [20]; 327 [21] Berkman, O. 794 [52]; 544, 555 [8] Berman, R 508, 575 [16]; 661, 662, 665, 655 [54]; 659 [61]; 659 [62]; 659 [63] Bern, M. 27, 39, 42 [30]; 42 [31]; 58, 705 [45]; 247, 269, 252 [37]; 252 [38]; 295, 296, 304, 308, 309, 312-315, 319, 323, 324, 327 [2]; 525 [22]; 525 [23]; 525 [24]; 525 [25]; 525 [26]; 525 [27]; 427, 432, 444, 451, 457 [111, 457 [23]; 457 [24]; 457 [25]; 457 [26]; 493, 574 [17]; 637, 638, 672-675, 677, 659 [64]; 659 [65]; 659 [66]; 659 [67]; 659 [68]; 895, 917, 957 [25]; 957 [26] Bemal, J. 203, 252 [39] Bemardini, R 374, 377 [14] Berry, M. 298, 327 [17] Bertolazzi, R 165, 180, 794 [53]; 947, 951, 952, 964 [4]; 964 [5]; 964 [6] Bertolotto, M. 341, 377 [19] Bespamyatnikh, S. 102, 709 [73]; 910-912, 914-916, 920, 957 [27]; 957 [28]; 957 [29] Bezdek, A. 662, 659 [69] Bhadury, J. 551, 555 [9] Bhaskar, S.K. 509, 575 [136] Bhatt, S. 946, 952, 955, 965 [7]; 965 [8] Bhattacharya, B. 233, 270, 277, 257 [18]; 252 [32]; 252 [40]; 427, 437, 457 [16]; 649, 673, 655 [39]; 695 [298]; 833, 856, 857, 577 [16]; 577 [17]; 577 [18]; 577 [19]; 577 [20]; 575 [125] Biedl, T. 654, 656 [4]; 945-952, 954, 961, 962, 965 [9]; 965 [10]; 965 [11]; 965 [12]; 965 [13] Bienstock, D. 41, 43 [32]; 679, 659 [70] Bieterman, M.B. 317, 332 [144] Bilardi, G. 160, 794 [54] Bilmes, J. 750, 759 [62]; 759 [63] Bitelli, G. 355, 575 [29] Bjomer, A. 52, 53, 106, 709 [74]; 709 [75] Bj0rstad, R 298, 557 [122] Bjorling-Sachs, I. 985, 988, 990, 7024 [10]; 7024 [11]; 7024 [12]
1-4
Author index
Blacker, T. 319, 312, 313, 328 [28]; 328 [33] Blankenagel, G. 740, 758 [20] Blelloch, G. 194 [55]; 194 [56]; 217, 282 [41] Blomer, J. 38, 42 [17]; 128, 133, 136, 137, 141, 150 [2]; 150 [3]; 750 [4]; 611, 627 [14] Blum, A. 440, 441, 457 [17]; 457 [27]; 457 [28]; 661, 662, 676, 678, 679, 681, 688 [47]; 689 [62]; 689 [71]; 689 [72]; 689 [73]; 689 [74]; 697 [290] Blum, M. 191, 194 [57]; 660, 689 [75] Blum, N. 481, 488 [10] Bochnak, J. 52, 54, 93, 109 [76] Bodlaender, H.L. 927, 931 [30] Bohringer, K.-F. 89, 105, 109 [77] Boissonnat, J.-D. 21, 23, 27, 42 [14]; 42 [15]; 80, 81, 83, 93, 109 [78]; 109 [79]; 709 [80]; 213, 214, 241, 256, 273, 282 [42]; 282 [43]; 282 [44]; 283 [45]; 285 [46]; 366, 368, 374, 377 [20]; 377 [21]; 377 [22]; 377 [23]; 345, 346, 554, 556 [37]; 608, 613, 627 [5]; 627 [15]; 627 [16]; 653, 654, 689 [76]; 689 [77]; 689 [78]; 715-717, 722 [4]; 722 [5] Bokafos, P. 337, 340, 388 [292] Bolker, E. 222, 225, 282 [19]; 282 [20] Booth, H. 142, 750 [5]; 530, 540, 550, 551, 555 [2] Booth, K. 951, 952, 965 [14] Boots,B. 203, 280, 288 [210] Boppana, R.B. 826 [16] Boritz, J. 346, 377 [7] Borodin, A. 194 [58] Boros, E. 276, 283 [47] Borouchaki, H. 322, 329 [59] Bose, P. 105, 707 [30]; 369, 372, 377 [24]; 379 [52]; 500, 514 [18]; 659, 689 [79]; 959, 965 [15]; 996, 1015, 1018, 7023 [9]; 1024 [13]; 1024 [14]; 7024 [15] Bossen,E 304, 310, 328 [29] Bowyer, A. 321, 328 [30] Bowyer, K.W. 99, 709 [81] Boxer, L. 194 [59] Brandenburg, F.J. 952, 955, 963, 964, 965 [16]; 965 [17]; 965 [18]; 965 [19] Brandstadt, A. 508,574[19] Breen, M. 842, 867, 877 [21]; 877 [22] Bremner, D. 95, 109 [60]; 709 [82]; 512, 514 [20]; 574 [21]; 865, 868, 877 [23]; 877 [24] Brent, R. 161, 194 [60]; 779, 826 [17] Brickmann, J. 880, 933 [77] Bridgeman, S. 939, 962, 965 [20]; 965 [21] Bridgett, S.J. 318, 327 [4] Bright, J. 188-190, 192, 797 [140] Brinkhoff, T. 345, 383 [166]; 383 [167]; 756, 758 [21]; 758 [22]; 758 [23]; 758 [24]; 758 [25]; 767 [95] Brisson, E. 89, 90, 709 [83]; 793 [23]; 232, 283 [48]; 340, 378 [25]; 483, 488 [11]
Bronnimann, H. 95, 102, 709 [84]; 709 [85]; 145, 757 [23]; 450, 457 [29]; 573, 575, 586, 588, 590, 597 [19]; 597 [20]; 597 [21]; 609, 613, 627 [17]; 627 [18] Brooks, F. 378 [44] Brooks, F.R, Jr. 105, 106, 779 [351] Brousseau, U.A. 56, 709 [86] Brown, K.Q. 221, 233, 248, 283 [49]; 283 [50]; 321, 328 [31]; 774, 826 [18] Brown, M.H. 393, 395, 396, 405, 407, 413-415, 427 [5]; 427 [6]; 427 [7]; 427 [8]; 427 [9]; 427 [10]; 427 [11]; 427 [12] Brown, RJ.C. 363, 378 [26] Bruckner, A.M. 842, 869, 877 [25] Bruckner, J.B. 842, 869, 877 [25] Bruderlin, B. 621, 622, 629 [48] Brungger, A. 626, 637 [110] Brunn, H. 833, 834, 877 [26] Brunson, C.F 355, 378 [28] Bruzzone, E. 750, 758 [26] Buchmann, A. 760 [64] Buck, R.C. 52, 56, 709 [87] Bundy, G.L. 348, 383 [154]; 387 [281] Bunting, H. 1000, 7024 [16] Buratynski, E.K. 323, 328 [32] Bumikel, C. 55, 770 [88]; 124, 757 [24]; 241, 283 [51]; 603, 606, 608, 611, 614, 615, 624, 627 [19]; 628 [20]; 628 [21]; 628 [22]; 628 [23] Burrough, PA. 352, 378 [27] Busemann, H. 248, 283 [52] Bussoletti,J.E. 317, 332 [144] Bykat, A. 838, 877 [27] Cai, L. 444, 457 [30] Callahan, P 163, 793 [28]; 794 [61]; 431, 432, 453, 457 [31]; 457 [32]; 487, 488 [12]; 646, 672, 689 [80]; 891, 893, 896, 911, 926-928, 937 [31]; 931 [32]; 937 [33]; 937 [34]; 937 [35] Calvert S. Xie, T. 833, 875 [125] Canann,S. 312, 313, 328 [33] Canham, R. 28, 43 [33]; 77, 770 [89] Canny, J. 34, 43 [34]; 55, 89, 90, 93, 104, 770 [90]; 770 [91]; 770 [92]; 770 [93]; 770 [94]; 772 [171]; 773 [172]; 242, 280, 283 [53]; 283 [54]; 614, 623, 624, 628 [24]; 628 [25]; 628 [43]; 628 [44]; 628 [45]; 652-654, 659, 666, 667, 696 [258]; 697 [277]; 689 [81]; 689 [82]; 689 [83]; 692 [141]; 695 [227]; 695 [228] Capoyleas, V. 276, 277, 283 [55] Card, S.K. 962, 970 [152] Carey, G.F 296, 328 [34] Carla, R. 355, 378 [29] Carlson, W. 146, 149, 150, 752 [67]
Author index Carlsson, S. 513, 514 [22]; 684-686, 689 [84]; 690 [85]; 690 [86]; 841, 872 [28]; 1010, 1014, 1024 [17]; 1024 [18] Carrara, A. 355, 378 [29] Carver, SJ. 355, 575 [28] Castillo, J.E. 296, 300-302, 328 [35] Castro-Diaz, M.J. 299, 304, 310, 328 [36] Cederbaum, I. 951, 952, 969 [119] Cerezo, A. 273, 282 [42]; 653, 689 [76] Chaiken, S. 507, 508, 514 [23] Chalasani, P. 440, 457 [27]; 662, 676, 678, 681, 689 [71]; 689 [72]; 689 [73]; ^97 [290] Chan, E.P.R 551, 555 [85] Chan, K.F. 661, 662, 690 [87] Chan, T. 96,110 [98]; 345, 346, 377 [7]; 378 [32]; 944, 945, 950, 952, 955, 965 [22] Chan, T.F. 298, 327 [17] Chan, T.M. 33, 44 [79]; 74-76, 95, 96, 101, 107 [8]; 110 [95]; 770 [96]; 770 [97]; 770 [99]; 234, 283 [56]; 590, 592 [34]; 915, 920, 928, 931 [36] Chan, W.S. 143, 757 [26] Chandra, B. 275, 283 [57]; 453-456, 458 [33]; 458 [34]; 926, 957 [37] Chandrasekran, R. 551, 555 [9] Chandru, V. 794 [62]; 526, 530, 540-542, 551, 555 [9]; 555 [10] Chang, C.-H. 442, 459 [82] Chang, J. 609, 628 [27] Chang, R. 37, 44 [85] Charikar, M. 675, 690 [88]; 690 [89] Charlton, M.E. 756, 758 [27] Chazelle, B. 24-28, 39, 43 [35]; 43 [36]; 45 [37]; 52, 68, 76, 86-88, 90-92, 94, 95, 98, 99, 102,108 [46]; 709 [84]; 709 [85]; 770 [100]; 770 [101]; 770 [102]; 770 [103]; 770 [104]; 770 [105]; 770 [106]; 770 [107]; 770 [108]; 770 [109]; 770 [110]; 770 [111]; 770 [112]; 770 [113]; 163-165, 167, 168, 172, 189, 792 [4]; 794 [63]; 794 [64]; 794 [65]; 795 [66]; 795 [67]; 234, 237, 283 [58]; 283 [59]; 319, 328 [37]; 345, 346, 378 [30]; 378 [31]; 465, 477, 479, 482, 486, 488 [13]; 488 [14]; 488 [15]; 488 [16]; 488 [17]; 493, 497-^99, 575 [2]; 574 [24]; 574 [25]; 574 [26]; 574 [27]; 574 [28]; 574 [29]; 522, 534, 555 [11]; 555 [12]; 561, 566, 574, 575, 578, 581, 585-590, 597 [19]; 597 [20]; 597 [24]; 597 [26]; 597 [27]; 597 [28]; 597 [29]; 592 [31]; 592 [32]; 592 [33]; 592 [42]; 592 [43]; 592 [49]; 638, 639, 641, 643, 648, 688 [55]; 690 [90]; 690 [91]; 690 [92]; 690 [93]; 705, 710, 711, 715, 722, 722 [6]; 722 [7]; 722 [8]; 749, 758 [28]; 774, 824, 825, 825 [1]; 826 [19]; 826 [20]; 844, 845, 850, 872 [29]; 872 [30]; 872 [31]; 872 [32]; 899, 911,
1-5
915, 917, 920, 957 [38]; 957 [39]; 976, 983, 1021, 7024 [19]; 7024 [20] Chekuri, C. 675, 690 [88]; 690 [89] Chen, C.Y. 865, 874 [99] Chen, D. 157, 164-166, 168, 181, 188, 191, 192, 795 [29]; 795 [30]; 795 [31]; 795 [32]; 795 [33]; 795 [34]; 795 [35]; 795 [36]; 795 [68]; 795 [69]; 795 [70]; 795 [71]; 795 [72]; 795 [73]; 795 [74]; 795 [75]; 795 [76]; 795 [77]; 795 [78]; 795 [80]; 451, 452, 457 [10]; 458 [35]; 636, 646-649, 651, 658, 687 [21]; 688 [43]; 688 [44]; 688 [45]; 690 [94]; 690 [95]; 690 [96]; 690 [97]; 690 [98]; 690 [99]; 856, 872 [33]; 924, 932 [50]; 1018, 7024 [21]; 7024 [22] Chen, J. 34, 43 [38]; 372, 374, 377 [14]; 378 [34]; 667, 690 [100] Chen, L. 758 [29]; 833, 872 [34] Chen, T.H. 650, 696 [254] Chen, W. 191, 795 [75]; 795 [79]; 795 [80]; 573, 597 [18]; 622, ^25 [28] Chen, Y.-B. 656, 690 [101] Chen, Z.-T. 357, 378 [33] Cheng, S. 105, 707 [30]; 228, 274, 281 [10]; 283 [60]; 283 [61]; 448, 450, 458 [38]; 481, 488 [18]; 675, 690 [102]; 690 [103]; 690 [104] Cheng, Y. 508, 574 [30] Cheriton, D. 429, 458 [36]; 672, 690 [105] Chervonenkis, A.Ya. 189, 200 [223]; 595 [120] Cheung, S.Y 441, 455 [37] Cheung, T. 675, 690 [88] Chew, L. 34, 37, 43 [39]; 43 [40]; 80, 81, 770 [114]; 770 [115]; 130, 134, 136, 140, 750 [6]; 757 [27]; 757 [29]; 205, 214, 215, 245, 247, 253, 256, 260, 275, 283 [62]; 283 [63]; 283 [64]; 283 [65]; 283 [66]; 283 [67]; 306, 319, 328 [22]; 328 [38]; 434, 449, 451, 457 [10]; 458 [39]; 458 [40]; 458 [41]; 566, 592 [35]; 646, 647, 649, 655, 687 [21]; 690 [106]; 690 [107]; 715, 722 [9]; 881, 924, 957 [40] Chiang, C. 427, 458 [43] Chiang, Y-J. 481, 487, 488 [19]; 488 [20]; 488 [21]; 531, 555 [13]; 642, 646, 668, 676, 680, 687 [22]; 687 [23]; 690 [108]; 690 [109]; 690 [110] Chiba, N. 951-953, 965 [23]; 965 [24] Chien, C.-B. 493, 577 [109] Chin, F. 143, 757 [26]; 241, 247, 283 [68] Chin, W. 684, 685, 690 [111]; 697 [112]; 691 [113]; 841, 872 [35]; 872 [36]; 872 [37]; 1006, 1007, 1009, 7024 [23]; 7024 [24]; 7024 [25] Choi, A. 991, 7027 [129] Choi, J. 34, 43 [41]; 372, 378 [35]; 669, 671, 691 [114]; 691 [115]; 697 [116]; 697 [117]; 697 [118] Choi, S.-H. 865, 872 [38]
1-6
Author
Chow, A. 195 [81]; 198 [166]; 824, 826 [21] Chow, M.M. 356, 378 [36] Chrisman, N.R. 351, 379 [71] Christensen, J. 349, 355, 378 [37]; 378 [38]; 940, 965 [25] Christofides, N. 271, 283 [69]; 439, 458 [42] Chrobalc, M. 946, 952, 953, 962, 965 [26]; 965 [27]; 965 [28] Chvatal, V. 74,108 [31]; 840, 872 [39]; 975,1024 [26] Chwa, K.-Y. 664, 700 [362]; 844, 856, 865, 872 [38]; 872 [49]; 873 [82]; 874 [94] Ciampalini, A. 378 [39] Ciarlet, RG. 299, 300, 328 [39]; 328 [40] Cignoni, R 231, 283 [70]; 363, 378 [39]; 578 [40] Claassen, E. 750, 764 [170] Clark, B. 318, 327 [19] Clarkson, K. 23, 25, 28, 29, 34, 43 [42]; 43 [43]; 43 [44]; 43 [45]; 43 [46]; 72, 75, 77-79, 84, 88, 91, 95,102, 103, 770 [116]; 7/0 [117]; 777 [118]; 777 [119]; 777 [120]; 777 [121]; 145, 757 [30]; 189, 192, 795 [82]; 795 [83]; 795 [84]; 214, 234, 236, 237, 281, 283 [71]; 284 [72]; 284 [73]; 284 [74]; 345, 346, 378 [41]; 566, 570, 573, 581, 585, 587-589, 597 [25]; 597 [30]; 592 [36]; 592 [37]; 592 [38]; 592 [39]; 592 [40]; 592 [45]; 592 [46]; 612, 628 [29]; 646-650, 668, 671, 673, 697 [119]; 697 [120]; 697 [121]; 697 [122]; 705, 709, 711, 713-715, 722 [10]; 722 [11]; 722 [12]; 722 [13]; 791-793, 824, 825, 826 [25]; 826 [26]; 826 [27]; 826 [28]; 826 [29]; 826 [30]; 844, 872 [40]; 891, 915, 925, 928, 931 [41]; 937 [42]; 937 [43]; 932 [44] Clementini, E. 337, 341, 378 [42]; 378 [43]; 380 [86]; 380 [87] Cohen, E. 795 [85]; 589, 590, 592 [41] Cohen, J. 378 [44] Cohen, R.F. 903, 932 [45]; 947, 961, 962, 964 [4]; 965 [29]; 965 [30] Cohen, S.D. 141,757 [28] Coiner, W.J. 317, 328 [41]; 328 [42] Cole,R. 38, 39,43[47];96, 101, 103, 777 [122]; 777 [123]; 130, 136, 140, 757 [32]; 757 [33]; 160, 161, 168, 169, 172, 173, 176, 178-180, 190-192, 194 [37]; 795 [83]; 795 [86]; 795 [87]; 195 [88]; 795 [89]; 795 [90]; 795 [91]; 795 [92]; 195 [93]; 218, 284 [75]; 365, 368, 378 [45]; 465, 471, 479, 488 [22]; 588, 590, 592 [44]; 592 [47]; 592 [48]; 643, 697 [123]; 775, 776, 805, 824, 826 [6]; 826 [22]; 826 [23]; 826 [24]; 826 [29] Colella,R 318, 327 [20] CoUey, R 865, 872 [41]; 1013,1024 [27] Collins, G.E. 84, 90,108 [43]; 777 [124] Collins, M.J. 554, 555 [14] Comba, J.L.D. 612, 628 [30]
index Comer, D. 744, 758 [30] Cong, J. 427,459 [84] Conn, H. 506, 507, 510, 573 [8]; 514 [31]; 514 [32]; 1021,1024 [28] Connelly, R. 962, 965 [31] Connolly, M.L. 105, 777 [125] Connolly, T.H. 106, 777 [126] Cook, S. 159, 166, 796 [94] Coppersmith, D. 681, 686 [9]; 689 [72] Corbalan, A.G. 253, 254, 284 [76] Corbett, J.R 340, 378 [46] Gormen, T.H. 143, 147, 757 [31]; 191, 796 [95]; 636, 697 [124] Comeil, D. 444, 457 [30]; 864, 873 [59] Cosmadakis, S. 952, 955, 965 [7] Coste, M. 52, 54, 93, 109 [76] Coullard, C. 864, 872 [42]; 1001, 1024 [29] Grain, I.K. 758 [31] Crapo, H. 225, 282 [19]; 284 [77]; 962, 965 [32] Crescenzi, R 944, 945, 950, 952, 955, 966 [33]; 966 [34] Cromley, R.G. 349, 378 [47] Cruz, I.R 963, 966 [35]; 966 [36] Csizmadia, G. 1000, 1024 [32] Cudjoe,K. 942, 969 [130] Culberson, J. 501, 508, 510-512, 514 [33]; 514 [34]; 514 [35]; 577 [119]; 661, 662, 682, 688 [49]; 697 [125]; 868, 872 [43]; 875 [123]; 1021, 1024 [30]; 1024 [3]] Cypher, R. 796 [96]; 796 [97]; 799 [205] Czyzowicz, J. 163, 796 [98]; 654, 686, 689 [77]; 697 [126]; 841, 872 [57]; 979, 997, 1001-1003, 1005, 1006, 1010, 1016, 1018, 7023 [9]; 7024 [33]; 7024 [34]; 7024 [35]; 7024 [36]; 7024 [37]; 7024 [38]; 7024 [39]; 7025 [40]; 7025 [41]; 7025 [42] d'Amore, F 751, 758 [32]; 758 [33]; 758 [34] D'Azavedo, E.R 227, 284 [79]; 304, 328 [43]; 353, 378 [48] Dadoun, N. 161, 180, 187, 792 [1]; 796 [99]; 796 [100]; 796 [101]; 477, 488 [23]; 488 [24]; 488 [25]; 825, 826 [32] Daescu, O. 181, 793 [34]; 646, 649, 658, 690 [95] Dai, Z. 675, 690 [88] Dale, L.K. 104, 708 [40] Das, G. 145, 757 [36]; 275, 283 [57]; 284 [78]; 429, 444, 449, 451^56, 457 [8]; 457 [9]; 457 [10]; 457 [13]; 458 [34]; 458 [35]; 458 [44]; 458 [45]; 458 [46]; 458 [47]; 458 [48]; 458 [49]; 537, 549, 552, 555 [19]; 555 [20]; 555 [21]; 646, 647, 649, 673, 677, 687 [21]; 690 [96]; 697 [127]; 856, 857, 872 [44]; 872 [45]; 924, 926-929, 930 [9];
Author 931 [37]; 932 [46]; 932 [47]; 932 [48]; 932 [49]; 952 [50]; 962, 966 [37] DasGupta, B. 508, 513 [16]; 551, 555 [22] Datta, A. 79(5 [102]; 440, 458 [50]; 660, 664, 691 [128]; (597 [129]; ^97 [130]; 897, 903, 906, 932 [51] Davenport, H. 3, 5, 9, 10, 43 [48]; 4i [49] Davidson, R. 954, 955, 963, 966 [38] Davis, A. 870, 577 [8]; S77 [9] Davis, L. 833, 844, 572 [34]; 872 [46] Day, W.H.E. 891, 908, 932 [52] de Berg, M. 25, 29, 37, 42 [6]; 43 [50]; 45 [51]; 58, 86, 87, 91, 93-97, 99, 100, 105, 707 [13]; 107 [30]; 777 [127]; 777 [128]; 777 [129]; 777 [130]; 777 [131]; 777 [132]; 777 [133]; 141, 144, 757 [34]; 757 [35]; 196 [103]; 236, 237, 242, 281 [2]; 284 [80]; 342, 348, 356, 358, 362, 366, 367, 372, 378 [49]; 378 [50]; 379 [51]; 379 [52]; 379 [53]; 379 [54]; 465, 488 [26]; 521, 534-536, 546, 555 [23]; 581, 592 [50]; 608, 628 [31]; 648, 658, 668, 671, 691 [131]; 691 [132]; 691 [133]; 691 [134] de Floriani, L. 228, 284 [81]; 293, 328 [44]; 337, 341, 342, 345, 358, 359, 361-363, 366, 368, 369, 377 [19]; 379 [56]; 379 [57]; 579 [58]; 379 [59]; 579 [60]; 579 [61]; 379 [62]; 579 [63]; 379 [64]; 579 [65]; 579 [66]; 384 [184]; 635, (597 [135]; 750, 758 [26] de Fraysseix, H. 946, 948, 949, 951-953, 966 [39]; 966 [40] de Groot, M. 372, 379 [52] de Lorenzi, M. 626, 657 [110] de Rezende, R 536, 537, 555 [24]; 626, 628 [32] Dean, A.M. 959, 966 [41] Dean, J. 870, 872 [47] Deering, M. 356, 379 [55] Defays, D. 278, 284 [82] Dehne, F. 194 [38]; 796 [104]; 796 [105]; 796 [106]; 796 [107]; 796 [108]; 796 [109]; 796 [110]; 796 [111]; 796 [112]; 249, 259, 277, 284 [83]; 284 [M]; 284 [S5] Dekker, T.J. 611, 625 [33] Delaunay, B. 203, 284 [86]; 306, 328 [45] Delcher, A. 161,198 [158] Delis, V. 349, 379 [67] Delott, G. 964, 968 [100] Demmel, J. 298, 327 [17] Deneen, L.L. 1014,1025 [43] Deng, X. 191, 796 [113]; 665, 697 [136]; 697 [137]; 526 [31] Dengler, E. 963, 966 [42] Denham, G. 346, 377 [7] Dennehy, T.G. 355, 557 [111]
index
1-7
DeRose, T. 364, 374, 552 [144]; 384 [181]; 557 [259]; 557 [260] Desaulniers, G. 655, 692 [138] Descartes, R. 203, 284 [87] Desikan, RK. 357, 377 [6] Dessmark, A. 164, 196 [lU] Dettori, G. 341, 349, 379 [68]; 555 [223] DeviUers, O. 141, 757 [34]; 796 [115]; 214, 241, 273, 252 [42]; 252 [43]; 284 [88]; 345, 346, 377 [22]; 436, 455 [51]; 610, 613, 627 [5]; 625 [34]; 654, 659 [77]; 715, 716, 721, 722 [4]; 722 [14]; 723 [15] Devroye, L. 756, 755 [35] Dewdney, A.K. 229, 254 [89] Dey, T. 29, 43 [52]; 74, 76, 103,108 [47]; 777 [134]; 777 [135]; 437, 458 [52]; 493, 575 [10]; 622, 624, 627 [6]; 627 [7]; 625 [35]; 870, 577 [8]; 577 [9] Di Battista, G. 939, 944-947, 950-955, 958-964, 964 [3]; 964 [4]; 964 [5]; 964 [6]; 965 [29]; 966 [33]; 966 [43]; 966 [44]; 966 [45]; 966 [46]; 966 [47]; 966 [48]; 966 [49]; 966 [50]; 966 [51]; 966 [52]; 966 [53]; 969 [121]; 977 [166] Di Felice, R 337, 341, 575 [42]; 575 [43]; 550 [86]; 550 [87] Diax, A.M. 355, 557 [110] Dickerson, M. 268, 269, 254 [90]; 254 [91]; 315, 525 [46]; 448, 455 [53]; 455 [54]; 894-896, 932 [53]; 932 [54] Dielissen, V.J. 504, 574 [36] Dietz, P.F481,455[27] Dietzfelbinger, M. 527 [34]; 888, 908, 932 [55]; 932 [56] DiGiano, C.J. 393, 427 [13] Dijkstra, E.W. 636, 692 [139] DiUencourt, M.B. 271, 254 [92]; 254 [93]; 254 [94]; 590, 592 [51] Dirichlet, RG.L. 203, 254 [95] Dirksen, R 10, 47 [147] Djidjev, H. 210, 254 [96]; 528, 530, 536, 552, 553, 555 [3]; 556 [25]; 649, 697 [271]; 842, 869, 572 [48]; 952, 966 [54] Dobkin, D. 39, 42 [30]; 52, 84, 89, 777 [136]; 777 [137]; 777 [138]; 777 [139]; 163, 167, 168, 187, 794 [65]; 796 [116]; 796 [117]; 796 [118]; 796 [119]; 796 [120]; 229, 265, 275, 277, 254 [97]; 254 [98]; 254 [99]; 254 [100]; 321, 327 [15]; 393, 403, 406, 413^15, 422 [37]; 449-453, 457 [8]; 457 [9]; 455 [55]; 465, 471, 483, 455 [28]; 455 [29]; 455 [30]; 455 [31]; 455 [32]; 497, 574 [28]; 574 [29]; 574 [37]; 599, 622, 627, 627 [10]; 625 [36]; 526 [20]; 526 [33]; 896, 897, 900, 924, 927, 932 [57]; 932 [58]; 932 [59]; 1021, 7024 [20] Dobrindt, K. 25, 43 [50]; 93-95, 97, 709 [78]; 709 [79]; 777 [128]; 358, 362, 575 [50]; 366-368, 372, 377 [23]; 379 [52]; 379 [69]; 581, 592 [50]
Author index Dobson, A. 10, 43 [53] Doerschler, J.S. 349, 379 [70] Doh, J.-I. 856, 872 [49] Dolev, D. 952, 955, 966 [55] Dominique, J.O. 371, 382 [150] Donald, B. 89, 105,109 [77]; 242, 280, 283 [54]; 652, 653, 692 [140]; 692 [141] Donato, J. 298, 327 [17] Dongarra, J. 298, 327 [17] Dor, D. 130, 757 [27] Dorward, S.E. 845, 872 [50] Dougenik,J.A. 351, 579 [71] Douglas, D. 143, 757 [37]; 347, 357, 370, 371, 379 [72]; 385 [217]; 599, 628 [37] Drach, R. 758 [29] Drappier, J.-M. 210, 284 [101] DriscoU, J.R. 188,196 [121]; 486, 488 [33]; 644, 692 [142] DriscoU, T.A. 303, 328 [47]; 328 [48] Droge, G. 743, 758 [36]; 758 [37] Drysdale, R.L., III 205, 214, 215, 239, 253, 257, 260, 268, 277, 283 [66]; 284 [90]; 284 [97]; 287 [182] 289 [240]; 434, 458 [41]; 458 [56]; 896, 897, 932 [57] Du, D.-Z. 427, 458 [57]; 674, 692 [143]; 692 [144] Du,D.H.-C.743, 764[171] Du,H.C. 741, 759 [39] Dube, T. 602, 607, 608, 611,612, 614, 615, 623, 627, 628 [38]; 625 [39]; 632 [151] Dubins, L.E. 653, 692 [145] Duchaineau, M. 361, 379 [73] Duchamp, T. 374, 382 [144] Duchet, R 959, 966 [56] Duda, R.O. 348, 379 [74] Duisberg, R.A. 393, 421 [14]; 421 [20] Dutton, G. 337, 360, 379 [75]; 379 [76]; 380 [77] Dvinsky, A.S. 302, 328 [49] Dwork, C 159, 166, 796 [94] Dwyer, R.A. 80, 777 [140]; 214, 217, 229, 285 [102]; 285 [103] Dyer, C.R. 99, 100,109 [81]; 777 [304] Dyer, M. 191, 797 [122]; 797 [123]; 589, 592 [52]; 592 [53] Dyn, N. 353, 355, 380 [78] Eades, R 661, 692 [146]; 939, 942, 952-955, 959, 961-964, 964 [3]; 965 [30]; 966 [44]; 966 [57]; 967 [58]; 967 [59]; 967 [60]; 967 [61]; 967 [62]; 967 [63]; 967 [64]; 967 [65]; 968 [100]; 969 [120]; 970 [135] Eckhoff, J. 835, 872 [51] Edelsbrunner, H. 24-28, 30, 35-37, 40, 42 [21]; 43 [35]; 43 [43]; 43 [54]; 43 [55]; 43 [56]; 43 [57];
43 [58]; 43 [59]; 43 [60]; 44 [61]; 44 [62]; 52, 53, 55, 57, 60, 65, 68, 70, 71, 74-79, 81, 86-98, 102, 103, 105, 106,108 [46]; 108 [48]; 770 [102]; 770 [103]; 770 [104]; 770 [105]; 770 [106]; 770 [107]; 777 [121]; 777 [135]; 777 [141]; 777 [142]; 777 [143]; 777 [144]; 777 [145]; 777 [146]; 772 [147]; 772 [148]; 772 [149]; 772 [150]; 772 [151]; 772 [152]; 772 [153]; 772 [154]; 772 [155]; 772 [156]; 772 [157]; 772 [158]; 772 [159]; 772 [160]; 772 [161]; 772 [162]; 772 [163]; 772 [164]; 772 [165]; 150, 757 [40]; 757 [42]; 163, 189, 797 [124]; 203, 217, 221, 226, 228, 230, 231, 233-237, 247, 260, 265, 271-273, 278, 281, 287 [3]; 282 [28]; 283 [59]; 285 [104]; 285 [105]; 285 [106]; 285 [107]; 285 [108]; 285 [109]; 285 [110]; 285 [111]; 285 [112]; 285 [113]; 285 [114]; 285 [115]; 285 [116]; 285 [117]; 285 [118]; 285 [119]; 304, 314, 321, 328 [23]; 329 [50]; 329 [51]; 329 [52]; 329 [53]; 340, 345, 346, 351, 353, 355, 366, 367, 373, 374, 378 [30]; 378 [31]; 380 [79]; 380 [80]; 380 [81]; 380 [82]; 380 [83]; 380 [84]; 430,434, 447, 450,451, 456 [2]; 457 [22]; 458 [58]; 459 [59]; 459 [60]; 465, 471, 475, 476, 483, 488 [15]; 488 [34]; 488 [35]; 488 [36]; 512, 574 [38]; 532, 533, 549, 550, 556 [26]; 556 [27]; 556 [28]; 566, 573, 577, 581, 586-590, 597 [24]; 597 [25]; 597 [26]; 597 [27]; 597 [28]; 597 [29]; 592 [54]; 608, 623, 628 [40]; 628 [41]; 643, 672, 686 [5]; 690 [93]; 715, 722 [7]; 740, 759 [38]; 773, 783, 801, 802, 827 [35]; 827 [36]; 850, 872 [52]; 882, 891, 900, 908, 909, 920, 928, 929,930 [2]; 930 [3]; 932 [52]; 932 [60]; 932 [61]; 984, 991, 992, 998, 7025 [44] Edward R. 415, 416, 422 [38] Efrat, A. 34, 38, 41, 42 [7]; 44 [63]; 44 [64]; 82, 83, 86, 87, 96, 102, 103, 707 [14]; 707 [15]; 708 [49]; 772 [166]; 772 [167]; 772 [168]; 772 [169]; 772 [170]; 127, 130, 757 [27]; 757 [39]; 435, 456 [3]; 659, 692 [147]; 896, 932 [62] Egecioglu, O. 865, 877 [1] Egenhofer, M. 337, 341, 380 [85]; 380 [86]; 380 [87]; 338, 383 [157] Egyed, R 36, 44 [65]; 549, 556 [29]; 686, 697 [126]; 1010, 7024 [33] Ehrlich, RE. 250, 251, 285 [120] Eijkhout,V. 298, 327 [17] Eisner, M. 590, 592 [57] Eklundh, L. 355, 380 [88] Elfes, A. 665, 695 [225] ElGindy, H.A. 797 [125]; 493, 574 [39]; 523, 525, 556 [30]; 556 [31]; 642, 649, 692 [148]; 692 [149]; 844, 845, 856, 864, 872 [53]; 872 [54]; 872 [55]; 872 [56]; 977, 7023 [5]; 7025 [45]
Author Elkerton, J. 419, 421 [23] Emiris, I. 55,112 [171]; 113 [172]; 609, 613, 623, 624, 627 [17]; 628 [42]; 628 [43]; 628 [44]; 628 [45] Enbody,RJ. 741, 759 [39] Eppstein, D. 27, 37, 39, 42 [30]; 42 [31]; 44 [66]; 58, 75, 76, 103, 108 [45]; 111 [119]; 775 [173]; 113 [174]; 247, 269, 282 [37]; 2^2 [38]; 254 [91]; 295, 296, 304, 308, 309, 312-314, 319, 323, 324, 327 [2]; 328 [22]; 525 [23]; 328 [24]; 525 [25]; 328 [26]; 529 [54]; 427, 432, 435-438, 440, 442, 444, 450, 451, 455, 457 [22]; 457 [23]; 457 [24]; 457 [25]; 457 [26]; 459 [61]; 459 [62]; 459 [63]; 459 [64]; 459 [65]; 459 [66]; 459 [67]; 459 [68]; 459 [69]; 459 [70]; 459 [71]; 493, 574 [17]; 573, 597 [30]; 637, 646, 647, 659, 671, 672, 674, 676, 689 [65]; 692 [150]; 692 [151]; 692 [152]; 895, 897, 957 [26]; 932 [54]; 932 [63] Epstein, P. 393, 427 [15]; 626, 628 [46] Erdos, P. 29, 44 [67]; 73, 74, 79, 775 [175]; 775 [176]; 566, 592 [56]; 994, 1025 [46] EricW. 131,757 [38] Erickson, J. 97, 98,107 [16]; 107 [6]; 775 [177]; 440, 459 [68]; 578, 597 [3]; 740, 757 [5]; 897, 932 [63] Ernst, R. 963, 969 [111] EstiviU-Castro, V. 984, 997-999, 1018, 7025 [2]; 7024 [22]; 7025 [47]; 7025 [48]; 7025 [49] Eu, D. 143, 757 [41] Evangelidis, G. 759 [40] Evans, R 356, 380 [89] Evans, W. 361, 380 [90]; 659, 689 [79] Even, G. 570, 592 [55] Even, S. 950-952, 967 [66]; 967 [67]; 969 [119] Everett, H. 29, 37, 43 [51]; 44 [68]; 96, 775 [178]; 500, 574 [40]; 686, ^97 [126]; 864, 866, 872 [58]; 873 [59]; 1003, 1010, 1015, 7024 [33]; 7025 [50]; 7025 [51]; 7025 [52] Fabri, A. 794 [39]; 196 [106]; 796 [115]; 626, 628 [47] Facello, M. 52, 105, 106, 777 [146]; 772 [147] Fackerell, E.D. 612, 632 [137] Fagin, R. 746, 759 [41] Falcidieno, B. 228, 284 [81]; 293, 328 [44]; 366, 370, 379 [57]; 380 [91] Falk, M. 52, 775 [179] Faloutsos, C. 344, 345, 380 [92]; 380 [93]; 386 [250]; 743, 752, 759 [42]; 759 [43]; 759 [44]; 759 [45]; 760 [84]; 763 [155] Fang, 8.621,622,(529 [48] Fanto, J. 962, 965 [21] Farin, G. 228, 285 [121] Fary, I. 466, 488 [37]
index
1-9
Faugeras, O.D. 374, 377 [21] Faust, N. 361, 384 [178] Feder, T. 144, 757 [44] Feiner, S.K. 343, 354, 380 [98] Fejes Toth, L. 980, 7025 [53] Fekete, S.P 680-683, 687 [24]; 687 [25]; 692 [153]; 692 [154]; 692 [155]; 692 [156]; 692 [157] Felsner, S. 53, 75, 108 [38]; 775 [180] Feng, H.Y.R 493, 496, 498, 500, 574 [41]; 577 [113] Femandez-Baca, D. 437, 459 [71] Ferrari, L. 493, 502-504, 574 [42] Ferreira, A. 196 [107]; 648, 692 [158] Fiat, A. 661, 662, 688 [54]; 689 [62] Field, D.A. 230, 285 [122]; 312, 329 [55] Finke, U. 339, 341, 344-346, 380 [94]; 380 [95] Finkel, R.A. 736, 748, 759 [46]; 917, 928, 932 [64]; 932 [68] Fischer, D. 131, 133, 755 [77] Fischer, M.J. 160, 180,198 [164] Fischetti, M. 676, 692 [159] Fisher, RF 365, 380 [96] Fisk, S. 978, 7025 [54] Fix, G.J. 296, 297, 557 [125] Flaherty, J.E. 323, 557 [116] Flajolet, R 343, 380 [97]; 756, 759 [47] Fleischer, R. 82,108 [39]; 614, 615, 628 [20] Floyd, R.W. 191, 794 [57] Foley, D.J. 343, 354, 380 [98] Formaggia, L. 322, 330 [101] Formann, M. 350, 380 [99]; 948, 951, 967 [68] Forrest, A.R. 599, 622, 629 [49]; 629 [50] Fortune, S. 30, 44 [69]; 55, 92, 775 [181]; 775 [182]; 203, 214, 216, 218, 222, 241, 257, 285 [123]; 285 [124]; 285 [125]; 305, 329 [56]; 375, 380 [100]; 607, 609, 610, 615, 616, 622, 626, 627, 629 [51]; 629 [52]; 629 [53]; 629 [54]; 629 [55]; 629 [56]; 629 [57]; 629 [58]; 643, 655, 687 [33]; 692 [160]; 888, 932 [65] FoBmeier, U. 960, 962, 967 [69]; 967 [70]; 9<57 [71] Foumier, A. 844, 865, 873 [60] Fowler, G. 414, 427 [16] Fowler, R.R 357, 362, 380 [101] Pranciosa, R 98, 707 [6]; 622, 629 [59]; 751, 752, 755 [15]; 755 [32] Frank, A. 338, 339, 341, 370-372, 550 [102]; 557 [103]; 557 [106]; 557 [107]; 759 [48] Franklin, W.R. 344, 346, 358, 557 [104]; 557 [105]; 557 [108]; 627, 629 [60] Franzblau, D. 508, 575 [43]; 575 [44] Franzosa, R. 337, 550 [85] Frederickson, G.N. 101, 775 [183]; 794 [40]; 797 [126]; 927, 952 [66]
I-10
Author
Fredman, M. 428, 459 [72]; 636, 644, 692 [161]; 888, 932 [67] Freeman, H. 349, 379 [70] Freeston, M. 748, 751, 759 [49]; 759 [50]; 759 [51]; 759 [52] Freitag, L. 313, 324, 329 [57]; 329 [58] Frey, PJ. 322, 329 [59] Frick, A. 954, 967 [72] Friedell, M. 963, 966 [42] Friedman, J. 88, 92,110 [108]; 110 [109]; 189, 195 [66]; 566, 574, 578, 581, 585, 592 [31]; 705, 710,722, 722 [8]; 928, 932 [68] Friedman, S.J. 275, 284 [98]; 449, 450, 458 [55]; 924, 927, 932 [58] Fruchterman, T. 954, 955, 963, 967 [73] Fu, J.-J. 37, 44 [70]; 81,113 [184] Fu, P. 52, 106, 111 [146] Fuchs, H. 146, 757 [43]; 355, 381 [109] Fuchs, U. 141, 150 [7] Fukuda, K. 55, 56, 91, 95,109 [61]; 109 [62]; 109 [82]; 773 [185]; 113 [186]; 773 [187] Furedi, Z. 41, 44 [71]; 76, 79, 108 [36]; 709 [64]; 773 [188]; 992, 7025 [55] Furer, M. 953, 967 [74] Fussell, D. 427, 459 [80] Gabow, H.N. 428, 459 [73]; 644, 673, 692 [142]; 692 [162]; 852, 873 [61]; 910, 915, 932 [69] Gabriel, K.R. 274, 285 [126] Gabrielov, A. 52, 773[189] Gaede, V. 740, 759 [53]; 759 [54] Gafni, E. 198 [172] Gahegan, M.N. 370, 371, 384 [190] Gaibisso, C. 622, 629 [59] Galil, Z. 428, 435, 459 [69]; 459 [73] Gamble, B. 1001,1024 [29] Gambosi, G. 622, 629 [59] Ganapathy, S. 355, 387 [111] Gansner, E.R. 957, 963, 967 [75]; 967 [76] Gao, R 146, 148, 753 [84]; 756, 763 [160] Gao, S. 643, 692 [163] Garcia, A.B. 355, 387 [110] Garcia-Lopez, J. 1003, 1018, 7023 [1]; 7025 [56] Gardy,D. 31,44[72] Garey, M. 228, 285 [127]; 445, 459 [74]; 493, 499, 575 [45]; 657, 674, 692 [164]; 692 [165]; 843, 873 [62]; 952, 958, 967 [77]; 967 [78]; 976, 7025 [58] Garey, R. 983, 7025 [57] Garg, A. 939, 944-948, 950-955, 960, 962-964, 964 [2]; 965 [20]; 965 [21]; 966 [36]; 966 [45]; 966 [46]; 967 [79]; 967 [80]; 967 [81]; 968 [82]; 968 [83]; 968 [84]; 968 [85]; 968 [86]
index Garg, N. 440, 459 [75]; 675, 676, 679, 693 [166]; 693 [167]; 693 [168] Garland, M. 358, 382 [135] Gartner, B. 244, 287 [8] Garvan, R 962, 967 [59] Gatti, R. 364, 387 [122] Gaujal, B. 1003, 7025 [41] Gavril, F 554, 555 [15] Geiger, B. 273, 282 [44]; 285 [128] George, R-L. 296, 322, 329 [59]; 329 [60]; 329 [61] Georges, M. 323, 337 [115] Gewali, L. 351, 387 [112]; 512, 513, 575 [46]; 575 [47]; 650, 658, 667, 685, 693 [169]; 693 [170]; 693 [171]; 698 [305]; 995, 1007-1010, 1019, 7025 [59]; 7025 [60]; 7025 [61]; 7025 [62]; 7025 [63]; 7025 [64]; 7026 [97] Ghosh, S. 194 [62]; 348, 387 [113]; 501, 573 [3]; 575 [48]; 523, 526, 530, 540-542, 550, 551, 553, 554, 555 [10]; 556 [32]; 556 [33]; 556 [34]; 556 [35]; 556 [36]; 556 [37]; 644, 645, 664, 688 [41]; 693 [172]; 693 [173]; 693 [174]; 843-845, 856, 857, 860, 863-865, 867, 877 [16]; 873 [63]; 873 [64]; 873 [65]; 873 [66]; 873 [67]; 983, 1021, 7023 [3]; 7025 [65] Ghouse, M. 188-190, 192, 797 [127]; 797 [140]; 825, 827 [37] Gibbons, A. 161, 797 [128]; 207, 285 [129] Giezeman, G.-J. 626, 628 [47]; 629 [61] Gilbert, E.N. 674, 693 [175] Gilbert, J. 269, 282 [38]; 308, 309, 323, 328 [25]; 895, 937 [26] Gilbert, RD. 448, 459 [76] Gill, J. 194 [50] Gidin, C. 146, 752 [50] Glassner, A. 150, 752 [47]; 293, 329 [62] Godau, M. 139, 141, 750 [4]; 750 [8]; 750 [9]; 959, 962, 964 [1] Goel, A. 675, 690 [88]; 690 [89] Goemans, M. 671, 679, 681, 689 [70]; 693 [176]; 693 [177]; 707 [389] Gold, C. 241, 285 [130]; 342, 343, 387 [114]; 387 [115]; 387 [116]; 387 [117] Goldberg, D. 603, 604, 629 [62] Goldberg, K. 105, 777 [311] Goldreich, O. 570, 597 [6]; 592 [55] Goldschlager, L.M. 163, 797 [129] Golin, M.J. 268, 274, 283 [60]; 286 [131]; 928, 890, 891, 907-909, 932 [70]; 933 [71]; 933 [72] Gomez, D. 360, 387 [118] Gonnet, G.H. 343, 380 [97] Gonzalez, T. 504, 505, 575 [49]; 575 [50]; 575 [51]; 575 [52]; 575 [53]
Author index Goodchild, M.F. 335, 336, 360, 381 [119]; 381 [120]; 599, 629 [63]; 759 [55] Goodman, J.E. 36, 44 [73]; 53, 73, 74, 106,113 [190]; 113 [191]; 113 [192]; 636, 695 [178] Goodrich, M. 26, 42 [18]; 92,113 [193]; 130, 134, 136, 143, 145,151 [23]; 151 [29]; 752 [48]; 152 [49]; 157, 159, 163, 165, 166, 168, 169, 172, 176, 179, 180, 188-192, 193 [18]; 193 [19]; 193 [28]; 194 [37]; 794 [41]; 794 [42]; 794 [43]; 794 [47]; 795 [88]; 795 [89]; 797 [125]; 797 [127]; 797 [130]; 797 [131]; 797 [132]; 797 [133]; 797 [134]; 797 [135]; 797 [136]; 797 [137]; 797 [138]; 797 [139]; 797 [140]; 797 [141]; 797 [142]; 797 [143]; 241, 286 [132]; 367, 375, 377 [2]; 381 [121]; 481, 487, 488 [12]; 488 [20]; yif^Q [^81- 4^0 RQl- 4^0 [J^OV ^4^ 55^ [38]; 570,
573, 574, 575, 578, 580, 581, 585, 586, 588, 589, 597 [7]; 597 [8]; 597 [21]; 592 [58]; 592 [59]; 625, 626, 627 [1]; 629 [64]; 636, 639, 641, 642, 692 [148]; 693 [179]; 693 [180]; 693 [181]; 693 [182]; 693 [183]; 768, 805, 823-825, 826 [4]; 826 [5]; 826 [6]; 826 [7]; 827 [37]; 827 [38]; 827 [39]; 827 [40]; 827 [41]; 827 [42]; 827 [43]; 928, 950 [7]; 944, 945, 950, 952, 955, 962, 965 [22]; 965 [26]; 966 [37]; 967 [80] Goresky, M. 104, 775 [194] Gorpinevich, A. 504, 577 [131] Gossard, D.C. 304, 557 [120] Gourley, K.D. 503, 504, 575 [54] Goumay, L. 89, 104, 775 [195] Gouyou-Beauchamps, D. 31, 44 [72] Graf, T. 929, 933 [73]; 933 [74] Graham, R.L. 674, 692 [164]; 827 [44] Granlund, T. 607, 629 [65] Granot, G. 950, 967 [66] Greasley, J. 338, 383 [157] Green, D.M. 503, 504, 575 [54] Green, PJ. 211, 286 [133] Greene, D. 92, 775 [196]; 497, 498, 575 [55]; 622, 625, 629 [66]; 752, 759 [56] Greenwood, E. 146, 755 [83] Gregori, A. 952, 955, 968 [87] Grice, K.R. 308, 327 [8] Grigni, M. 465, 488 [15]; 643, 690 [93] Grigoriev, D. 89, 770 [94]; 775 [197]; 429, 459 [77] Grimson,L. 131,757 [38] Gropp, W. 298, 557 [122] Gross, M.H. 364, 587 [122] Grosse,E. 315, 527 [9] Grossman, R. 39, 42 [30] Grove, E.F. 487, 488 [20] Gruber, P.M. 834, 873 [68] Grunbaum, B. 52, 775 [198]; 775 [199]; 138, 752 [52]; 962, 968 [88]
I-ll
Gschwind, S. 752, 756, 758 [15]; 758 [16] Guay, M.D. 841, 873 [80] Gudmundsson, J. 682, 693 [184] Guerinoni, F. 323, 557 [116] Guerra, C. 165, 180, 794 [53] Guevara, J.A. 357, 378 [33] Guha, S. 165, 190, 192, 795 [76]; 797 [143]; 797 [144]; 797 [145]; 642, 675, 690 [88]; 690 [89]; 693 [181]; 693 [182] Guibas, L. 21-28, 30, 32, 37, 39, 40, 42 [8]; 42 [21]; 43 [35]; 43 [36]; 43 [43]; 43 [51]; 43 [55]; 43 [56]; 43 [57]; 43 [58]; 44 [74]; 44 [75]; 52, 53, 65, 66, 68, 71, 76-79, 81, 86-95, 97, 98, 102, 105, 708 [41]; 708 [46]; 708 [48]; 708 [58]; 770 [103]; 770 [104]; 770 [105]; 770 [106]; 770 [107]; 770 [110]; 777 [121]; 777 [129]; 777 [130]; 777 [136]; 772 [148]; 772 [149]; 772 [150]; 772 [151]; 772 [152]; 772 [153]; 775 [200]; 774 [201]; 774 [202]; 774 [203]; 774 [204]; 774 [205]; 774 [206]; 774 [207]; 141, 143, 144, 148, 150, 757 [28]; 757 [45]; 752 [46]; 752 [51]; 165, 172, 792 [4]; 795 [67]; 209, 211, 214, 216, 238, 241, 245, 265, 277, 278, 287 [4]; 284 [97]; 285 [108]; 285 [109]; 286 [134]; 286 [135]; 286 [136]; 293, 329 [63]; 340, 345-348, 366, 367, 375, 378 [31]; 380 [80]; 587 [123]; 587 [124]; 587 [125]; 587 [126]; 434, 436, 437, 456 [5]; 457 [19]; 457 [20]; 458 [58]; 459 [78]; 465, 467, 469, 471, 475, 476, 482, 486, 488 [15]; 488 [16]; 488 [17]; 488 [36]; 489 [40]; 489 [41]; 493, 575 [4]; 521, 522, 525, 530, 532, 533, 548, 549, 556 [27]; 556 [39]; 556 [40]; 556 [41]; 566, 581, 586, 588-590, 597 [25]; 597 [26]; 597 [27]; 597 [28]; 597 [29]; 593 [60]; 601, 616, 618, 619, 622, 625, 627, 629 [64]; 629 [67]; 629 [68]; 629 [69]; 629 [70]; 641-644, 649, 655, 685, 688 [38]; 690 [93]; 693 [185]; 693 [186]; 693 [187]; 694 [202]; 715-717, 722 [7]; 723 [16]; 783, 824, 825 [1]; 827 [36]; 845, 849, 850, 853, 856, 860, 877 [12]; 872 [30]; 872 [31]; 873 [69]; 896, 897, 899, 903, 904, 917, 930 [4]; 957 [39]; 932 [57]; 933 [75]; 996, 7024 [13] Gunther, O. 506, 575 [56]; 740, 750, 756, 759 [54]; 759 [57]; 759 [58]; 759 [59]; 759 [60]; 759 [61]; 759 [62]; 759 [63]; 760 [65] Gunther, R 760 [64] Gupta, N. 192, 797 [146]; 825, 827 [45]; 827 [46] Gupta, P 37, 44 [76] Gusfield, D. 74, 75, 774 [208]; 437, 459 [79]; 578, 583, 590, 593 [61] Giiting, R.H. 340, 382 [128]; 382 [129]; 760 [66] Gutldn, E. 870, 873 [70] Guttman, A. 345, 587 [127]; 752, 760 [67]
1-12
Author index
Gutwin, C.A. 275, 286 [159]; 449, 460 [89]; 924, 925, 933 [84] Guyder, M.K. 683, 693 [188] Guzman, A. 360, 5S7 [118] Gyori, E. 29, 41, 42 [16]; 43 [32]; 73,108 [37]; 506, 508, 575 [57]; 575 [58]; 554, 556 [42]; 989, 995, 1025 [66]; 7025 [67] Hastad, J. 570, 597 [6] Hadwiger, H. 56, 774 [209] Hadzilacos, T. 337, 349, 379 [67]; 382 [130] Hagenip, T. 92,114 [210]; 160, 797 [147]; 825, 826 [13]; 827 [34]; 827 [48]; 827 [49]; 827 [50]; 888, 932 [55]; 948, 951, 967 [68] Hajnal, P. 41, 44 [71]; 79, 772 [154] Hakimi, S.L. 142, 752 [57] Halperin, D. 4, 22, 33, 42 [20]; 44 [77]; 44 [79]; 51-53, 58, 60, 66, 67, 71, 78, 83, 86-89, 91, 92, 95, 99, 100, 104-106, 707 [30]; 108 [49]; 709 [77]; 777 [129]; 777 [130]; 777 [131]; 774 [201]; 774 [202]; 774 [211]; 774 [212]; 774 [213]; 774 [214]; 774 [215]; 774 [216]; 774 [217]; 774 [218]; 774 [219]; 774 [220]; 774 [221]; 774 [222]; 774 [223]; 624, 629 [71] Hamacher, H.W. 676, 692 [159] Hambrusch, S.E. 179, 794 [44]; 794 [45] Hamidoune, Y. 959, 966 [56] Hamman, B. 3S2[131] Hammar, M. 684, 693 [189]; 1007, 7025 [68] Hammer, P.L. 276, 283 [47] Han, J.C.X. 756, 764 [176]; 952, 968 [89] Han, Y. 34, 43 [38]; 372, 378 [34]; 667, 690 [100]; 775, 827 [47] Handler, G.Y 657, 693 [190] Hansen, M. 265, 281 [5] Hansen, P. 657, 693 [191] Har-Peled, A. 372, 377 [3] Har-Peled, S. 11, 22, 26, 28, 33, 44 [78]; 44 [79]; 75, 88, 96,108 [42]; 774 [224]; 774 [225]; 372, 382 [133]; 659, 669, 670, 686 [6]; 692 [147]; 694 [192]; 694 [193]; 694 [194] Haralambides, J. 948, 951, 967 [68] Haralick, R.M. 357, 370, 382 [132]; 387 [283]; 860, 875 [130] Harary, F. 466, 489 [42] Harding, E.F. 756, 760 [68] Harel, D. 954, 955, 963, 966 [38]; 968 [90] Haring, G. 900, 909, 932 [61] Harrington, L. 12, 46 [121] Harris, J. 52, 54, 774 [226]; 578, 593 [62] Harrison, J. 346, 377 [7] Hart, D. 659, 692 [152] Hart, RE. 348, 379 [74]
Hart, S. 3, 7, 10, 11, 14-16, 19, 44 [80] Hartigan, J.A. 275, 286 [137]; 880, 933 [76] Hartvigsen, D. 222, 286 [138] Haruyama, S. 427, 459 [80] Hashemi, S.M. 962, 968 [91] Hassan, O. 304, 321, 322, 329 [64]; 329 [65]; 332 [137] Hassenklover, A.-L. 796 [108]; 796 [109] Hassin, R. 679, 682, 687 [26]; 694 [195] Hastad, J. 825, 826 [14] Haussler, D. 77, 88, 772 [155]; 775 [227]; 189, 797 [148]; 566, 570, 572, 578, 585, 597 [9]; 593 [63]; 705, 709, 711, 723 [17]; 824, 827 [51] He, W. 963, 968 [92] He, X. 953, 967 [74] Hebert,D.J. 361,382[134] Hecht, F. 296, 299, 304, 310, 328 [36]; 329 [61] Heckbert, R358,3«2[135] Hecker, H. 501, 575 [59]; 983, 1021, 7025 [69]; 7027 [107] Heep, R 756, 767 [96] Heep, S. 756, 767 [96] Heerdegen, R.G. 371, 384 [200] Heffernan, R 127, 752 [59]; 444, 453, 454,456, 458 [44]; 458 [45]; 844, 845, 856, 872 [44]; 872 [45]; 857, 873 [71]; 873 [72]; 873 [73]; 875 [148]; 929, 932 [47]; 928, 932 [46]; 1013, 7025 [70] Hegedus, A. 507, 575 [60] Heiden, W. 880, 933 [77] Heintz, J. 54, 58, 89, 104, 775 [228]; 775 [229]; 775 [230]; 775 [231] Held, M. 241, 286 [139]; 683, 684, 687 [27]; 694 [196] Hellen, M. 364, 388 [286] Helttula, E. 427 [18] Helvig, C.S. 675, 688 [59] Henig, M. 657, 694 [197] Henrich, A. 746, 750, 756, 760 [69]; 760 [70]; 760 [71]; 760 [72] Henzinger, M.R. 435, 459 [81]; 636, 659, 694 [198] Hernandez, A. 312, 327 [3] Hernandez, G. 262, 281 [1] Hemandez-Penalver, G. 1017, 7026 [73]; 7026 [74] Herring, J. 341, 352 [136] Hershberger, J. 8, 9, 37,40, 42 [8]; 43 [55]; 44 [81]; 81, 89, 777 [136]; 772 [149]; 77, 775 [232]; 143, 144, 148, 757 [45]; 752 [46]; 752 [58]; 752 [60]; 752 [61]; 163,198 [149]; 198 [150]; 347, 348, 368, 381 [125]; 382 [137]; 382 [138]; 382 [139]; 437, 457 [19]; 465, 482, 488 [15]; 489 [40]; 489 [43]; 521, 522, 525, 530, 548, 549, 554, 556 [39]; 556 [40]; 556 [41]; 556 [43]; 625, 629 [64]; 641-647, 649, 655, 669, 685, 688 [38]; 690 [93];
Author 693 [185]; 693 [186]; 693 [187]; 694 [199]; 694 [200]; 694 [201]; 694 [202]; 694 [203]; 694 [204]; 694 [205]; 694 [206]; 694 [207]; 694 [208]; 694 [209]; 845, 849, 853, 856, 860, 871 [12]; 873 [69]; 873 [74]; 903, 95J [75]; 977, 1009,1026 [71]; 7026 [72] Hertel, S. 497, 575 [61]; 844, 873 [75] Hertz, J. 275, 286 [140] Herve, J.C. 607, 631 [129] Herwing, D. 501, 575 [59]; 1021, 7025 [69] Herzberger, J. 612, 627 [3] Herzog, H. 743, 763 [167] Heusinger, H. 277, 286 [141] Hilbert, D. 900, 909, 932 [61] Himsolt, M. 955, 964, 965 [19]; 968 [93]; 968 [94] Hinrichs, K. 268, 286 [142]; 339, 341, 344-346, 380 [94]; 380 [95]; 604, 620, 629 [72]; 6i7 [108]; 747, 750, 760 [73]; 884, 891, 928, 929, 931 [17]; 931 [18]; 955 [73]; 933 [74]; 955 [78]; 955 [79] Hinterberger, H. 731, 747, 767 [112]; 767 [113] Hintz, E. 903, 933 [80] Hipke, C.A. 664, 697 [128] Hirata, T. 684, 686, 700 [370]; 700 [371]; 700 [372]; 700 [373]; 841, 875 [141]; 875 [142]; 1007, 7027 [120]; 7027 [121] Hirsch,M. 622, 627 [11] Himkawa, H. 78, 105, 774 [201] Hjaltason, G.R. 343, 382 [140] Ho, J.-M. 442, 459 [82] Hobby, J.D. 625, 629 [73] Hochbaum, D. 440, 459 [75]; 637, 676, 693 [167]; 694 [210] Hodges, L.F. 361, 384 [178] Hodgson, CD. 962, 968 [95] Hoel, E.G. 343, 382 [141] Hoey, D. 203, 215, 264, 269, 270, 277, 289 [232]; 429,467 [122]; 883, 954 [113] Hoffmann, C. 371, 375, 382 [142]; 382 [143]; 618, 622, 626, 630 [74]; 630 [75]; 630 [76] Hoffmann, F. 276, 282 [29]; 506, 575 [58]; 554, 556 [42]; 665, 694 [211]; 694 [212]; 985, 986, 989, 993, 995, 7025 [67]; 7026 [75]; 7026 [76]; 7026 [77] Hogg, J. 370, 371, 5^4 [190] Holey, J.A. 795 [151] Homem de Mello, L.S. 105, 775 [233] Hong, J. 198 [152]; 445, 460 [112]; 498, 577 [114] Hong, S.J. 828 [69] Hopcroft, J. 125, 750 [10]; 794 [58]; 547, 548, 556 [44]; 556 [45]; 609, 618, 622, 627 [2]; 630 [74]; 630 [75]; 630 [77]; 888, 932 [65]; 951, 952, 962, 968 [96]; 968 [97] Hoppe, H. 362, 374, 382 [144]; 382 [145]; 382 [146] Homiaza,M.V. 312, 527 [3]
index
1-13
Horn, A. 842, 873 [76] Homick, S.W. 962, 970 [134] Hoyle, B.S. 370, 371, 384 [190] Hrechanyk, L.D. 355, 386 [255] Hsu, D. 104, 775 [234] Hu,X. 181, 795 [77] Huang, M.-D. 792 [5] Huang, N.-R 271, 286 [143]; 1016, 7026 [87] Hughes, J.F. 343, 354, 380 [98] Hughes, T.J.R. 316, 329 [66]; 329 [67] Huhdanpaa, H. 321, 327 [15]; 622, 627 [10] Hunter, G.M. 736, 760 [80] Hurkens, C. 677, 694 [213] Hurtado, R 75,108 [38]; 994, 1018, 7025 [1]; 7026 [78] Hutchinson, J.R 959, 966 [41] Hutflesz, A. 741, 743, 749, 754, 760 [74]; 760 [75]; 760 [76]; 760 [77]; 760 [78]; 760 [79] Huttenlocher, D. 11, 37, 38, 44 [82]; 44 [83]; 44 [84]; 128-131, 134, 136, 140, 141, 750 [6]; 757 [29]; 752 [53]; 752 [54]; 752 [55]; 752 [56]; 752 [62]; 278, 286 [144] Hutton, M.D. 951, 952, 968 [98] Hwang, RK. 253, 271, 286 [145]; 427, 458 [57]; 674, 692 [143]; 692 [144]; 694 [214] Hwang, H. 37, 44 [85] Hyrskykari, A. 427 [18] Ibarra, O.H.79S [151] Icking, C. 252, 255, 286 [146]; 656, 663-665, 697 [129]; 694 [211]; 694 [212]; 694 [215]; 694 [216]; 694 [217]; 1013, 7026 [79] lerardi, D. 656, 690 [101] Igarashi, Y. 661, 697 [275]; 697 [276] Ihler, E. 675, 676, 694 [218]; 695 [219]; 695 [220]; 695 [221] Im Hof, H.-C. 250, 251, 285 [120] Imai, H. 34, 37, 42 [19]; 44 [86]; 128, 142, 752 [63]; 752 [64]; 752 [66]; 233, 234, 242, 276, 277, 281 [6]; 282 [30]; 282 [32]; 286 [147]; 347, 348, 382 [147]; 382 [148]; 582 [149]; 493, 496, 499, 504, 575 [6]; 575 [62]; 538, 556 [46]; 644, 649, 688 [38]; 695 [222]; 845, 849, 860, 865, 871 [12]; 874 [120]; 896, 897, 930 [5] Imai, K. 34, 37, 42 [19]; 44 [86]; 128, 752 [66] Imai, T. 241, 290 [243]; 619, 622, 632 [146] Imase, M. 675, 695 [223] Inaba, M. 276, 286 [147] Inagaki, H. 230, 286 [148]; 619, 622, 630 [78]; 650 [79] Inagaki, Y. 684, 700 [372]; 700 [373]; 841, 875 [142]; 1007, 7027 [120]; 7027 [121]
1-14
Author index
Incerpi, J. 844, 872 [32] Irani, S. 133,152 [65] M, M. 142,152 [63]; 152 [64]; 211, 222, 225, 288 [209]; 290 [242]; 290 [245]; 347, 348, 382 [147]; 382 [148]; 382 [149]; 619, 622, 652 [143]; 632 [144]; 652 [145]; 649, 695 [222] Itai, A. 127,151 [39]; 569, 590 [2] Italiano, G.F. 435, 436, 459 [69]; 459 [70] Iwano, K. 37, 45 [88]; 437, 459 [86]; 683, 695 [224]; 928, 933 [83] Iyengar, S. 508-510, 514 [30]; 577 [125]; 665, 695 [225]; 695 [226]; 699 [329]; 699 [330]; 740, 760 [81] Jackson, M.A.B. 427,459 [83] Jacobs, P. 653, 655, 695 [227]; 695 [228]; 696 [250] Jacometti, W. 397, 413, 421 [28]; 626, 628 [32] Jagadish, H.V. 743, 750, 760 [82]; 760 [83] Jaillon,R 611, 627 [12] Jaja, J. 157, 162, 798 [153]; 799 [203]; 825, 827 [52] Jameson, A. 321, 329 [68] Janardan, R. 37, 44 [76]; 481, 488 [18] Jard, C. 962, 968 [99] Jaromczyk, J.W. 274, 286 [149]; 622, 630 [80] Jennings, G.R 1005, 7026 [80] Jensen, K. 603, 650 [81] Jenson, S.K. 371,582[150] Jeong, C.S. 798 [154]; 798 [166] Jeron, T. 962, 968 [99] Jermm,M. 643, 692 [163] Joe, B. 214, 230, 231, 281, 286 [150]; 286 [151]; 286 [152]; 320, 321, 325, 329 [69]; 329 [70]; 329 [74]; 329 [75]; 529 [76]; 373, 582 [151]; 845, 846, 873 [77]; 873 [78]; 875 [79] Joffe, A. 569, 574, 575, 583, 585, 593 [64] Johansson, R 652, 695 [229] Johnson, C.R. 356, 384 [180] Johnson, D.B. 101, 775 [183]; 797 [126]; 885, 955 [81]; 983, 7025 [57] Johnson, D.S. 228, 285 [127]; 445, 459 [74]; 493, 499, 575 [45]; 657, 674, 680, 688 [57]; 692 [164]; 692 [165]; 843, 873 [62]; 952, 958, 967 [77]; 967 [78]; 976, 7025 [58] Johnson, W.A. 235, 286 [153] Johnsson, S.L. 798 [155] Jones, C. 104, 708 [40]; 348, 349, 373, 382 [152]; 383 [153]; 383 [154]; 387 [281] Jones, M.T. 310, 313, 325, 329 [58]; 329 [71] Jones, S. 964, 968 [100] Jonsson, H. 684-686, 689 [84]; 690 [85]; 841, 872 [28]; 1014,1024 [17] Jorge, J.A. 337, 383 [155] Jorgensen, C.C. 665, 695 [226]; 699 [329]
J0msten, K. 676, 692 [159] Joseph, D. 145, 757 [36]; 275, 284 [78]; 449, 451^54, 457 [8]; 457 [9]; 458 [46]; 547, 548, 556 [44]; 556 [45] Joshi, S. 1014, 7025 [43] Jung, H. 92, 774 [210]; 825, 827 [49] Junger, M. 214, 286 [154]; 677, 695 [230]; 958, 963, 964, 968 [101]; 968 [102] Jungert, E. 347, 385 [214] Kahan, S. 538, 556 [47]; 609, 630 [82] Kahn, J. 505, 575 [63]; 984, 7026 [82] Kahn, RJ. 618, 622, 630 [77]; 962, 968 [97] Kahng, A. 427, 459 [84] Kainz, W. 337, 338, 383 [156]; 383 [157] Kak, A. 339, 386 [234] Kakouhs, K.G. 940, 968 [103] Kalai, G. 566, 593 [65]; 825, 827 [56] Kaldewaij, A. 504, 514 [36] Kalyanasundaram, B. 665, 672, 675, 677, 688 [50]; 695 [231]; 695 [232]; 695 [233] Kamada, T. 954, 962, 963, 968 [104]; 968 [105] Kameda, T. 665, 697 [136]; 697 [137] Kamel, I. 344, 345, 380 [92]; 380 [93]; 760 [84] Kamps, T. 963, 968 [106] Kanade,T. 370, 585 [169] Kankanhalli, M. 344, 346, 587 [105] Kant, G. 945-954, 959, 961, 963, 965 [11]; 969 [107]; 969 [108]; 969 [109]; 969 [110] Kao, M.-Y. 662, 695 [234]; 953, 967 [74] Kao, T.C. 242, 247, 286 [155]; 286 [156] Kapoor, S. 429, 458 [47]; 644, 646, 648, 650, 667, 671-673, 677, 697 [122]; 697 [127]; 695 [235]; 695 [236]; 695 [237]; 695 [238]; 814, 827 [55]; 909, 910, 916, 917, 919, 933 [82] Karasick, M. 609, 610, 612, 618, 622, 630 [74]; 650 [75]; 650 [83]; 650 [84] Karger, D. 428, 459 [85]; 570, 575, 593 [67] Karlin, A. 818, 820, 827 [54]; 908, 932 [56] Karloff, H. 569, 570, 593 [68]; 593 [71]; 661, 662, 673, 677, 689 [62]; 689 [68] Karp, R. 159, 798 [156]; 539, 556 [48]; 566, 569, 573, 593 [66]; 593 [74]; 789, 827 [53] Karpinski, M. 429, 459 [77]; 662, 689 [63] Kashyap, R. 508, 574 [30]; 665, 699 [330]; 740, 760 [81] Katajainen, J. 798 [168]; 217, 286 [157]; 888, 932 [55] Katchalski, M. 36, 45 [87] Katoh, N. 37, 45 [88]; 75, 76, 775 [235]; 775 [236]; 228, 276, 277, 287 [6]; 287 [10]; 286 [147]; 437, 459 [86]; 896, 897, 928, 930 [5]; 933 [83] Katz, M. 40, 42 [9]; 45 [89]; 82, 101, 102, 772 [167]; 775 [237]; 775 [238]; 366, 367, 383 [158]; 569, 590, 593 [72]; 593 [73]
Author index Kaufman, A.E. 357, 386 [253] Kaufmann, M. 82, 108 [39]; 643, 692 [163]; 948, 951, 960, 962, 965 [12]; 967 [68]; 967 [70]; 967 [71]; 985, 1026 [76] Kaul, A. 146, 149, 752 [68]; 153 [81] Kavanagh, J. 393, 421 [15]; 626, 628 [46] Kavraki, L.E. 104, 105, 114 [214]; 775 [234]; 775 [239]; 775 [240] Kawaguchi, K. 191, 795 [75]; 795 [79]; 795 [80]; 622, 628 [28] Kawai, S. 954, 963, 968 [105] Kay, D.C. 841, 573 [80] Ke, Y. 528, 552, 556 [49]; 556 [50] Keating, M. 758 [29] Kedem, G. 753, 760 [85] Kedem, K. 11, 22, 33, 34, 37, 38, 40, 42 [20]; 43 [40]; 44 [82]; 44 [83]; 44 [84]; 45 [90]; 45 [91]; 45 [92]; 51, 80, 81, 83, 102, 104, 770 [115]; 775 [241]; 775 [242]; 775 [243]; 126-130, 134, 136, 140, 141, 750 [6]; 750 [11]; 757 [27]; 757 [29]; 752 [53]; 752 [54]; 752 [56]; 256, 278, 283 [67]; 286 [144] Kedem, Z.M. 146, 757 [43] Keil, J.M. 274, 275, 277, 281 [18]; 286 [158]; 286 [159]; 427, 437, 448-450, 452, 457 [16]; 460 [87]; 460 [88]; 460 [89]; 493, 497-499, 506, 509-512, 513 [8]; 575 [46]; 575 [64]; 575 [65]; 575 [66]; 575 [67]; 575 [68]; 575 [69]; 673, 688 [39]; 869, 873 [81]; 924, 925, 933 [84]; 1021, 7026 [81] Keirsey, D.M. 665, 697 [293] Kela, A. 323, 330 [102] Kemp, K.K. 335, 336, 381 [119] Kemper, A. 760 [86] Kendall, D.G. 756, 760 [68] Kendall, W.S. 756, 763 [161] Kennie, TJ.M. 351, 385 [215] Kent, J. 146, 149, 150, 752 [67] Keppel, E. 355, 383 [159] Kemighan, B.W. 399, 415, 420 [3]; 420 [4] Ketonen, J. 12, 45 [93] Kettner, L. 88, 775 [244]; 626, 628 [47] Khaira, M.S. 298, 329 [72] Khanna, S.681,dSd[9] Khovanskii, A.G. 52, 775 [245] KhuUer, S. 439, 444, 460 [90]; 460 [91]; 889, 933 [85] Kim, H.-J. 361, 382 [134] Kim, J.-H. 664, 700 [362] Kim, S.-H. 856, 873 [82] Kindl, M. 652, 695 [239]; 695 [240] King, V. 435, 459 [81] Kirk, D. 870, 871 [10] Kirkpatrick, D. 84, 95, 777 [137]; 775 [246]; 161, 180, 187, 792 [1]; 796 [100]; 796 [101]; 196 [116]; 196 [117]; 196 [118]; 198 [157]; 219, 228, 239,
1-15
241, 242, 265, 266, 272-274, 280, 285 [110]; 287 [160]; 287 [161]; 287 [162]; 287 [163]; 287 [164]; 288 [191]; 348, 358, 361, 380 [90]; 383 [160]; 383 [161]; 434, 460 [92]; 465, 471, 477, 483, 488 [23]; 488 [24]; 488 [25]; 488 [28]; 488 [29]; 489 [44]; 525, 537, 553, 556 [51]; 557 [52]; 656, 659, 688 [40]; 689 [79]; 783, 825, 526 [32]; 827 [57]; 527 [58]; 844, 857, 871 [17]; 57i [83]; 959, 969 [111]; 1015, 7024 [14] Klanderman, G.A. 130, 131, 752 [55] Klawe, M. 20, 45 [94]; 74, 775 [247]; 181, 792 [6]; 505, 575 [63]; 844, 873 [83]; 984, 7026 [82] Klazar, M. 11, 15, 31, 41 [2]; 45 [95]; 45 [96]; 45 [97]; 45 [98]; 45 [99] Klee, V. 80, 775 [248]; 233, 287 [165]; 870, 873 [84]; 975, 7026 [83] Klein, P. 428, 459 [85]; 636, 659, 675, 694 [198]; 695 [241] Klein, R. 241, 247, 249, 252, 255, 257-260, 262, 257 [1]; 254 [83]; 254 [84]; 256 [146]; 257 [166]; 257 [167]; 257 [168]; 257 [169]; 257 [170]; 257 [171]; 362, 383 [162]; 542, 553, 554, 557 [53]; 557 [54]; 608, 630 [85]; 639, 663-665, 674, 655 [46]; 694 [211]; 694 [212]; 694 [216]; 695 [242]; 1013, 7026 [79] Kleinberg, J.M. 11, 37, 38, 44 [83]; 129, 134, 136, 757 [29]; 752 [54]; 662-665, 681, 693 [177]; 695 [243] BQeinz, J. 963, 965 [106] Kleitman, D. 76, 705 [36]; 505, 507, 508, 574 [23]; 575 [43]; 575 [63]; 984, 992, 7025 [55]; 7026 [82] Klenk, K.S. 181, 795 [35]; 646, 648, 649, 651, 658, 690 [95]; 690 [97]; 690 [98]; 690 [99] Klincsek, G.T. 447, 451, 460 [93]; 496, 575 [70] Klinger, A. 736, 760 [87] Knight, A. 393, 427 [15]; 626, 625 [46] Knupp, P. 300, 329 [73] Knuth, D.E. 214, 238, 265, 256 [135]; 436, 459 [78]; 609, 616, 630 [86]; 630 [87]; 716, 717, 723 [16]; 730, 760 [88]; 760 [89]; 880, 933 [86] Kodiyalam, S. 312, 313, 330 [100] Koenderik, J.J. 370, 371, 383 [163]; 383 [164] Kolarov,K. 521, 557 [55] KoUer, D. 361, 554 [178]; 570, 575, 593 [67]; 593 [69] Komjath, P 16, 45 [100] Komlos, R 888, 932 [67] Komlos, J. 160, 795 [12]; 566, 572, 593 [70]; 776, 526 [9] Kong, T.Y. 336, 339, 555 [165] Konjevod, G. 675, 693 [168] Konnemann, J. 124, 757 [24] Konstantinides, K. 415, 427 [19]
1-16
Author index
Koparkar, P.A. 612, 631 [106] Koppinen, M. 217, 286 [157] Kom, D. 414, 421 [16] Korstein, R. 760 [65] Kosak,C. 963, 9(59 [112] Kosaraju, S. 161, 181, 183, 184, 188, 192,194 [40]; 194 [46]; 194 [47]; 194 [48]; 198 [158]; 375, 377 [2]; 432, 457 [32]; 626, 627 [1]; 646, 672, 679, 689 [80]; 696 [244]; 891, 893, 911, 926-928, 931 [32]; 931 [33]; 931 [34]; 937 [35]; 944, 945, 950, 952, 955, 965 [22] Koutsofios, E. 414, 421 [16]; 421 [22]; 957, 967 [75] Kowaluk, M. 274, 286 [149] Kozen, D. 660, 689 [75] Kramer, M.R. 952, 955, 969 [113] Kranakis, E. 554, 555 [16]; 959, 969 [114] Krasnosel'skii, M.A. 834, 873 [85] Kravets, D. 134, 136, 151 [29]; 187,192 [7] Kriegel, H.-R 345, 377 [17]; 383 [166]; 383 [167]; 741, 742, 747-749, 751, 752, 756, 758 [18]; 758 [21]; 758 [23]; 758 [24]; 758 [25]; 761 [90]; 767 [91]; 767 [92]; 767 [93]; 767 [94]; 767 [95]; 767 [96]; 763 [150]; 763 [153]; 763 [154] Kriegel, K. 506, 575 [58]; 554, 556 [42]; 665, 694 [211]; 694 [212]; 985, 986, 989, 993, 995, 1025 [67]; 1026 [76]; 7026 [77] Krishnamurthy, R. 747, 767 [97] Krithivasan, K. 660, 697 [130] Krizanc, D. 554, 555 [16]; 959, 969 [114] Krogh, A. 275, 286 [140] Kruskal, C.R 160, 163, 180, 798 [159]; 798 [160] Kruskal,J.B. 954, 969 [115] Kruskal, J.B., Jr. 270, 277, 287 [172] Krznaric, D. 228, 278, 287 [173]; 287 [185]; 445, 446, 450, 460 [96]; 498, 576 [76]; 672, 673, 696 [245]; 696 [257] Kuc, R. 833, 873 [86] Kucera,L. 350, 383 [168] Kuh, E.S. 427, 459 [83] Kuhn,W. 339, 380 [102] Kumar, A. 441, 458 [37] Kumar, K. 645, 686 [1]; 865, 877 [1]; 877 [2] Kumar, R 685, 696 [246]; 1009, 7026 [84] Kumar, V. 798 [161] Kunde, M. 798 [162] Kung, H.T. 176, 178, 798 [152]; 798 [163]; 200 [217]; 731, 767 [98] Kweon,I.S. 370, 383 [169] Ladner, R.E. 160, 180, 798 [164] Laffey, T.J. 357, 370, 387 [283] LaFlamme, R.A. 351, 384 [193] Lai, W. 961, 970 [135]
Lam, T.W. 661, 662, 690 [87] Lambert, T. 227, 228, 287 [174]; 287 [175] Lamdan, Y. 132, 133, 752 [70]; 752 [71]; 752 [72] Landis,Y.M. 731, 757 [3] Lanthier, M. 372, 383 [170]; 651, 652, 670, 687 [11]; 687 [12]; 696 [247] La Poutre, J.A. 952, 969 [116] Larman, D. 1000, 1024 [16] Larmore, L. 183-185, 793 [25]; 194 [48] Las Vergnas, M. 52, 53, 56, 106, 709 [74]; 775 [249] Laszlo, M.J. 89, 777 [138]; 229, 284 [99]; 483, 488 [30]; 608, 630 [88] Latombe, J.-C. 51, 78, 104, 105, 709 [66]; 774 [201]; 114 [214]; 114 [215]; 775 [234]; 775 [239]; 775 [240]; 775 [250]; 149, 752 [69]; 652, 653, 688 [56]; 696 [248]; 833, 873 [87] Laumond, J.-R 655, 696 [249]; 696 [250] Laurini,R. 335, 383 [171] Lawler, E. 427, 460 [94]; 677, 680, 696 [251] Lawson, C.L. 211, 226, 287 [176]; 341, 353, 383 [172] Lazard, S. 554, 556 [37]; 654, 686 [4]; 689 [78] Le Bras-Mehlman, E. 374, 377 [21] Le, N.-M. 252, 255, 256, 263, 286 [146]; 287 [111]; 287 [MS] Leblond, J. 653, 689 [76] Lee, B. 51, 775 [251] Lee, D.T. 27, 37, 43 [37]; 45 [101]; 52, 68, 98, 770 [110]; 163, 189, 798 [154]; 798 [165]; 798 [166]; 237, 239, 241, 247, 253, 257, 280, 287 [179]; 287 [180]; 287 [181]; 287 [182]; 287 [183]; 287 [184]; 288 [212]; 348, 351, 353, 355, 383 [173]; 442, 459 [82]; 465, 471, 474, 489 [45]; 501, 575 [71]; 522, 525, 536, 537, 554, 555 [4]; 555 [5]; 555 [24]; 557 [56]; 557 [57]; 641, 642, 644, 650, 658, 685, 687 [18]; 687 [19]; 696 [252]; 696 [253]; 696 [254]; 696 [255]; 698 [320]; 707 [390]; 840, 841, 843-845, 849, 850, 856, 857, 860, 865, 877 [7]; 872 [31]; 873 [88]; 873 [89]; 874 [90]; 874 [91]; 874 [92]; 874 [93]; 875 [148]; 983, 1017, 1020, 7026 [85]; 7026 [86] Lee, J. 358, 366, 369, 383 [174]; 383 [175] Lee, R.C.T. 37, 44 [70]; 81, 773 [184]; 502, 504, 508, 576 [84]; 576 [85]; 1016, 7026 [87] Lee, S.H. 844, 874 [94] Lehman, RL. 731, 767 [98] Leifker, D. 345, 386 [235]; 752, 763 [141] Leighton, T. 74, 775 [252]; 798 [167]; 265, 287 [5]; 818, 819, 827 [59]; 946, 948, 951, 952, 955, 965 [8]; 966 [55]; 967 [68]; 969 [117] Leiserson, C.E. 143, 147, 757 [31]; 191, 796 [95]; 636, 643, 697 [124]; 696 [256]; 945, 946, 950, 969 [118] Lempel, A. 951, 952, 969 [119]
Author index Lengauer, T. 105,115 [253] Lenhart, W. 500, 514 [40]; 527, 528, 542, 557 [58]; 683, 701 [376]; 842, 869, 874 [95]; 959, 965 [15]; 966 [47]; 1001, 1005, 1010, 1024 [29]; 1024 [33]; 1026 [80] Lenhof, H.-P. 440, 458 [50]; 880, 885, 895-897, 903, 906, 932 [51]; 933 [87]; 955 [88] Lennes, NJ. 838, 874 [96] Lenstra, J.K. 427, 460 [94]; 677, 680, 696 [251] Levcopoulos, C. 198 [168]; 228, 278, 287 [173]; 257 [185]; 445, 446, 450^52, 460 [95]; 460 [96]; 460 [97]; 4(50 [98]; 498, 500, 502, 504, 505, 516 [72]; 516 [73]; 57(5 [74]; 516 [75]; 576 [76]; 576 [77]; 576 [78]; 576 [79]; 576 [82]; 542, 544, 555 [17]; 555 [18]; 672, 673, 682, 693 [184]; 696 [245]; 696 [257]; 924, 955 [89] Leven, D. 30, 33, 34, 45 [102]; 45 [103]; 51, 775 [254]; 482, 489 [40]; 522, 525, 556 [41]; 641, 693 [186]; 845, 853, 856, 873 [69]; 903, 955 [75] Levin, C 325, 557 [110] Levin, D. 353, 355, 380 [78] Levoy, M. 833, 874 [97] Lewis, B.A. 838, 874 [98] Lewis, C. 419, 422 [34] Lewis, P.M. 271, 289 [222]; 677, 700 [348] Lewis, T. 36, 45 [87] Li, M. 675, 690 [88] Li,T.S. 318, 527 [4] Li, Z. 192,198 [169]; 347, 585 [176]; 622, 630 [89]; 652, 696 [258]; 1015, 7024 [14] Liang, J. 52, 105, 106, 777 [146]; 772 [147] Liaw, B.-C. 1016, 7026 [87] Lieber, D. 609, 610, 612, 630 [84] Liebling, T. 95, 775 [185] Lienhardt, P. 89, 776 [255]; 776 [256]; 340, 383 [177] Lim, A. 675, 690 [103] Lin, A. 247, 287 [183]; 348, 351, 353, 355, 383 [173]; 501, 575 [71]; 840, 845, 865, 874 [90]; 874 [91]; 983, 1017, 7026 [85] Lin, S.L. 133, 755 [78] Lin, S.Y. 865, 874 [100]; 874 [99] Lin, T. 952, 955, 962, 963, 965 [30]; 967 [60]; 969 [120] Lin, X. 661, 692 [146]; 952, 955, 967 [60] Lindenbaum, M. 756, 767 [99] Lindstrom, R 361, 384 [178] Lingas, A. 164, 796 [114]; 198 [168]; 198 [170]; 210, 241, 247, 274, 284 [96]; 287 [167]; 287 [168]; 287 [169]; 287 [186]; 446, 451, 452, 460 [97]; 460 [98]; 493, 496^98, 500, 502-504, 576 [77]; 576 [78]; 576 [79]; 576 [80]; 576 [81]; 576 [82]; 576 [83]; 521, 528, 530, 535, 536, 542, 544-547, 552, 556 [25]; 557 [54]; 557 [59]; 648, 696 [259];
1-17
842, 869, 870, 872 [47]; 872 [48]; 924, 933 [89]; 1021, 7026 [88] Liotta, G. 375, 384 [179]; 603, 607, 608, 630 [91]; 945, 946, 951, 952, 954, 959, 960, 962, 964, 964 [2]; 964 [5]; 965 [15]; 966 [45]; 966 [46]; 966 [47]; 966 [48]; 969 [110]; 969 [121] Liou, W.T. 502, 504, 508, 576 [84]; 576 [85] Lipski, W., Jr. 503, 504, 576 [86]; 576 [87]; 576 [88] Lipton, R.J. 163, 796 [119]; 265, 284 [100]; 434, 460 [99]; 465, 471, 488 [31]; 488 [32]; 826 [33]; 942, 946, 969 [122]; 969 [123] Little, J.J. 357, 362, 580 [101] Litwin, W. 741, 767 [100] Liu, A. 36, 45 [87]; 320, 325, 329 [74]; 329 [75]; 329 [76] Liu, R. 499, 506, 576 [89]; 576 [90]; 1021, 7026 [89] Liu, Y. 949, 950, 969 [124]; 969 [125] Livnat, Y. 356, 384 [180] Livne, R. 33, 40, 45 [90]; 81, 83, 775 [241] Lloyd, E.L. 445, 460 [100] Lo, C.-Y 103, 776 [257]; 566, 573, 593 [75] Lo, M. 767 [101] Lo, S.H. 312, 321, 322, 330 [77]; 330 [78] Lodi, E. 493, 503, 504, 507, 576 [88]; 576 [91] Lohmann, F. 767 [102] Lohner, R. 321, 322, 330 [79]; 330 [80] Lombardo, R. 1008, 7025 [60] Lomet, D.B. 732, 744, 745, 767 [103]; 767 [104] London, R.L. 393, 427 [20] Lopez-Ortiz, A. 663, 664, 696 [260]; 696 [261]; 696 [262]; 696 [263]; 696 [264] Lorensen, W. 386 [249] Louis, S. 758 [29] Lounsbery, M. 364, 384 [181] Lovasz, L. 29, 44 [67]; 45 [104]; 73-76, 709 [64]; 775 [176]; 776 [258] Lozano-Perez, T. 833, 860, 874 [101] Lozevanu, D.D. 440, 441, 467 [133] Lozito, J. 942, 969 [130] Lu, W. 756, 764 [176] Lubiw, A. 493, 500, 505, 508, 576 [92]; 576 [93]; 864, 865, 872 [41]; 872 [42]; 951, 952, 968 [98]; 984, 996, 7024 [13]; 7026 [90] Luby, M. 566, 569, 570, 589, 592 [55]; 593 [76]; 593 [77] Luccio, R 176, 178,198 [163]; 493, 503, 504, 507, 576 [88]; 576 [91]; 959, 969 [126] Luders, P 963, 969 [127] Ludwig, A. 954, 967 [72] Ludwig, R.A. 323, 557 [116] Lueker, G. 481, 489 [46]; 489 [66]; 903, 904, 916, 933 [90]; 935 [128]; 951, 952, 965 [14] Lukatela, H. 337, 384 [182]
1-18
Author index
Lumelsky, V.J. 660, 696 [265]; 696 [266]; 696 [267]; 696 [268]; 697 [269] Lund, C. 675, 683, 697 [270] Lundell, A.T. 340, 384 [183] Lyons, K. 157,193 [15]; 1003, 1010,1024 [33]; 1025 [50] Lyustemilc, L.A. 149,152 [73] Ma, L. 252, 255, 286 [146] MacDonald, G. 865, 874 [102] Macdonald, S. 10, 43 [53] MacKenzie, P. 198 [171]; 787, 825, 827 [62] Mackinlay, J.D. 962, 970 [152] MacPhedran, I. 296, 332 [145] MacPherson, R. 104, 113 [194] Madhavan, C.E.V. 1009, 1026 [84] Maffioli, F. 676, 692 [159] Maggs,B. 818, 819,527 [59] Magillo, P. 345, 352, 358, 359, 363, 368, 379 [60]; 379 [62]; 379 [63]; 379 [64]; i79 [65]; 379 [66]; 554 [184]; i54 [185] Magnanti, T.L. 636, 686 [10] Mahajan, S. 570, 575, 594 [91] Maheshwari, A. 164,194 [62]; 196 [102]; 796 [114]; 795 [170]; 362, 372, 383 [170]; 384 [186]; 521, 526, 530, 535, 540-542, 544^547, 551, 555 [9]; 555 [10]; 556 [32]; 556 [33]; 557 [59]; 557 [60]; 557 [61]; 648, 649, 651, 652, 670, 687 [11]; 687 [12]; 696 [247]; 696 [259]; 697 [271]; 844, 856, 873 [65]; 57J [66] Maheshwari, S.N. 644, 646, 695 [237]; 695 [238] Maire,F. 513,576[94] Maley, FM. 643, 696 [256] Malitz, S. 948, 949, 951, 969 [128] Manacher, G.K. 446, 460 [101] Manber, U. 827 [63] Manjuathaiah, M. 501, 576 [95] Manning, J. 942, 951, 953, 969 [129]; 969 [130]; 969 [131] Mannino, C. 951, 952, 964 [5]; 964 [6] Manocha, D. 378 [44] Manola, F 743, 767 [105] Mansour, Y. 569, 593 [68] Mantyla, M. 340, 373, 384 [187] Marathe, M.V. 440, 441, 460 [113]; 676, 699 [332] Marberg, J.M. 198 [172] Marchioro, R 949, 969 [124] Marcum, D.L. 323,550[81] Margot, F. 95, 773 [185] Marimont, D. 92,113 [200]; 375, 381 [126]; 625, 629 [68] Mark, D.M. 371, 384 [188]; 743, 757 [2] Marks, J. 349, 355, 378 [38]; 940, 961, 963, 965 [25]; 966 [42]; 969 [112]; 969 [132]; 970 [154]
Marriott, K. 963, 968 [92] Martensson, U. 355, 380 [88] Marzano, R 337, 341, 342, 369, 379 [58]; 379 [59]; 555 [225] Marzetta, M. 95, 709 [82] Masek, W.J. 507, 576 [96] Mastin, C.W. 296, 301, 330 [82]; 331 [130] Mata, C. 351, 384 [189]; 440, 460 [102]; 651, 652, 670, 676, 678, 682, 684, 697 [272]; 697 [273]; 1008, 7026 [91] Matheron, G. 756, 767 [106] Matias, Y. 825, 527 [61]; 889, 933 [85] Matousek, J. 22, 29, 40, 42 [6]; 45 [105]; 45 [106]; 68, 70, 75, 77, 78, 82, 86-88, 92, 94-99, 101-103, 105, 707 [13]; 707 [17]; 707 [18]; 707 [19]; 707 [20]; 707 [30]; 705 [50]; 709 [85]; 770 [111]; 114 [202]; 776 [257]; 776 [259]; 776 [260]; 776 [261]; 776 [262]; 776 [263]; 776 [264]; 776 [265]; 776 [266]; 776 [267]; 776 [268]; 776 [269]; 776 [270]; 776 [271]; 776 [272]; 189, 795 [173]; 236, 237, 242, 270, 257 [2]; 284 [80]; 255 [187]; 438, 456 [4]; 566, 570, 572-575, 578, 581, 585, 586, 588-590, 597 [11]; 597 [12]; 597 [20]; 592 [42]; 592 [43]; 593 [75]; 593 [78]; 593 [79]; 593 [80]; 593 [81]; 593 [82]; 593 [83]; 593 [84]; 593 [85]; 594 [92]; 594 [93]; 594 [94]; 594 [95]; 594 [101]; 672, 674, 656 [7]; 705, 710, 711, 715, 722, 722 [2]; 723 [18]; 723 [19]; 723 [20]; 723 [21]; 723 [22]; 723 [23]; 723 [24]; 723 [25]; 825, 527 [60]; 896, 933 [91]; 933 [92] Matula, D.W.274,255[188] Maubach, J.M. 325, 330 [83] Maurer, H.A. 35, 43 [59] Maus, A. 214,255[189] Mavriplis, D.J. 296, 304, 322, 330 [84]; 330 [85]; 330 [86] Maxwell, J.C. 962, 970 [133] May, J. 393, 421 [15]; 626, 625 [46] Mayr, E. 540, 555 [6] Mazon, M. 249, 250, 253, 254, 284 [76]; 255 [190] Mazzone,S. 959, 969 [126] McAllister, M. 219, 242, 265, 280, 255 [191]; 659, 659 [79] McCallum, D. 445, 460 [103] McCallum, S. 90, 705 [43] McCormack, J.E. 370, 371, 384 [190] McCreight, C. 731, 744, 757 [11] McCreight, E.M. 481, 459 [47] McDonald, J. 374, 382 [144] McDonald, K.M. 547, 557 [62]; 648, 697 [274] McDonell, K.J. 751, 762 [121] McFaddin, H.S. 183-185, 193 [25] McKeag,R.M. 318, 527 [4]
Author index McKeima, M. 366, 384 [191]; 833, 845, 874 [103] McLain, D.H. 226, 288 [192] McMaster, R. 347, 384 [192]; 521, 557 [63] McMuUen, P. 64,116 [273]; 233, 288 [193] Mecke, J. 56, 776 [274]; 756, 757 [6]; 763 [161] Meertens, L. 554, 555 [16] Megiddo, N. 37, 45 [107]; 101, 103,116 [275]; 776 [276]; 130, 136,153 [74]; 191,193 [13]; 193 [16]; 79<S [174]; 224, 270, 288 [194]; 549, 557 [64]; 566, 569, 570, 587-590, 597 [10]; 592 [41]; 593 [69]; 595 [86]; 595 [87]; 593 [88]; 825, 526' [3] Mehl, R.F. 235, 256 [153] Mehldau, H. 954, 967 \12\ Mehlhom, K. 55, 82,108 [39]; 110 [88]; 124-127, 150 [13]; 757 [24]; 214, 241, 262, 283 [51]; 254 [73]; 287 [170]; 255 [195]; 434, 460 [104]; 481, 455 [10]; 489 [48]; 459 [49]; 497, 575 [61]; 599, 606-608, 610-612, 614, 615, 624, 626, 625 [20]; 625 [21]; 625 [22]; 625 [23]; 630 [92]; 630 [93]; 630 [94]; 630 [95]; 630 [96]; 643, 692 [163]; 715, 723 [26]; 843, 844, 873 [75]; 574 [104]; 900, 906, 908, 909, 917, 932 [56]; 933 [93]; 955 [94]; 933 [95] Mei, A. 661, 697 [275]; 697 [276] Meijer, H. 1013, 7024 [27] Meiser, S. 241, 261, 262, 257 [170]; 255 [195]; 255 [196]; 434, 436,455 [51]; 460 [104]; 715, 716, 721, 723 [15]; 723 [26] Meisters, G. 838, 574 [105] Melhom, M. 350, 555 [168] MeUanan, A. 143, 755 [75] Melton, J. 317, 327 [1] Melvin, R.G. 317, 332 [144] Meng, A. 351, 557 [112]; 650, 658, 685, 693 [169]; 1009,1025 [61] Menger, K. 258, 255 [197] Mere, J.B.O. 355, 557 [110] Merkley,K. 318, 527 [19] Merrett, T.H. 743, 762 [125] Meshkat, S.N. 318, 557 [124] Meyer auf der Heide, F. 429, 459 [111, 908, 932 [56] Meyniel, H. 959, 966 [56] Mezey, RG. 52, 105, 776 [277] Michelucci, D. 611, 627 [12] Middleditch, A.E. 493, 501, 575 [132] Mignotte, M. 614, 630 [97]; 630 [98] Milenkovic, V. 92, 775 [182]; 776 [278]; 776 [279]; 776 [280]; 192, 795 [169]; 242,255 [198]; 609, 616, 618, 622, 625, 625 [27]; 629 [55]; 630 [89]; 630 [99]; 630 [100]; 630 [101]; 657 [102] MiUer, C. 351, 554 [193] MiUer, G. 103, 777 [119]; 160, 161, 184, 795 [24]; 794 [48]; 795 [175]; 217, 252 [41]; 298, 300, 304,
1-19
312, 320, 329 [72]; 330 [87]; 330 [88]; 330 [89]; 573, 597 [30]; 775, 526 [10] Miller, M.C. 361, 379 [73] Miller, R. 794 [38]; 794 [59]; 795 [85]; 795 [176]; 799 [177]; 799 [178]; 799 [179]; 799 [180] Miller, S.E. 795 [176] Mills, W. 10,45 [108] Milnor, J.W. 58, 67, 106, 776 [281]; 776 [282] Minakawa, T. 619, 622, 657 [103] Mineed-Weinstein, M.B. 361, 379 [73] Miriyala, K. 962, 970 [134] Mirtich, B. 654, 697 [277] Mirzaian, A. 210, 290 [262] Mishra, B. 106, 776 [283] Misue, K. 954, 961, 970 [135]; 970 [161] Misund, G. 356, 554 [194] Mitchell, J.S.B. 22, 34, 37,42 [20]; 44 [74]; 45 [109]; 81, 101, 774 [203]; 775 [333]; 126, 127, 130, 140, 143-145, 750 [6]; 750 [11]; 752 [46]; 752 [48]; 755 [76]; 241, 247, 251, 280, 256 [134]; 255 [199]; 255 [200]; 347, 348, 350, 351, 357, 372, 557 [112]; 557 [125]; 554 [189]; 554 [195]; 554 [196]; 554 [197]; 556 [253]; 440-442, 460 [102]; 460 [105]; 521, 530-533, 548-550, 555 [7]; 556 [40]; 557 [65]; 557 [66]; 557 [67]; 636, 644-646, 648-652, 657-659, 665, 667, 668, 670, 674-676, 678-680, 682-685, 657 [22]; 657 [23]; 657 [24]; 657 [25]; 657 [28]; 657 [29]; 657 [30]; 657 [31]; 690 [108]; 693 [169]; 693 [187]; 695 [238]; 697 [272]; 697 [273]; 697 [278]; 697 [279]; 697 [280]; 697 [281]; 697 [282]; 697 [283]; 697 [284]; 697 [285]; 697 [286]; 697 [287]; 697 [288]; 697 [289]; 697 [290]; 697 [291]; 697 [292]; 697 [293]; 697 [294]; 695 [295]; 695 [296]; 695 [297]; 845, 575 [73]; 1009, 7025 [61]; 1008, 7026 [91] MitcheU, S. 306, 308, 314-316, 318, 319, 323, 324, 525 [23]; 525 [27]; 330 [90]; 330 [91]; 330 [92]; 330 [93]; 330 [94]; 557 [127]; 451, 457 [22] Mitra, R 649, 692 [149]; 695 [298] Miyano, S. 163, 799 [181] Mizoguchi, T. 885, 933 [81] Moen, S. 961, 970 [136] Mohammadi, B. 299, 304, 310, 525 [36] Moitra, D. 493, 510, 576 [97]; 576 [98] Molenaar, M. 341, 554 [198]; 555 [219] Monma, C. 37,45 [110]; 437-439, 460 [106]; 460 [107]; 674, 695 [299] Montague, M. 315, 525 [46]; 448, 455 [53]; 455 [54] Montani, C. 231, 255 [70]; 575 [39] Montuno, D.Y. 844, 865, 575 [60]
1-20
Author index
Moore, R.E. 612, 631 [104]; 631 [105] Moran, A. 964, 968 [100] Moran, S. 181,192 [6] Moreau,J.-M. 611, (527 [12] Moret, B.M.E. 554, 555 [14] Morgan, K. 322, 329 [64]; 329 [65]; 330 [101] Morgana, A. 950, 969 [125] Morin, P. 362, 384 [186] Morris, D.G. 371, 384 [200] Morrison, J.L. 347, 386 [232] Mortenson, M.E. 373, 384 [199] Morton, G.M. 743, 767 [107] Motwani, R. 104, 775 [234]; 775 [239]; 144, 757 [44]; 189,199 [182]; 510-512, 576 [99]; 576 [100]; 593 [89]; 593 [90]; 681, 686 [9]; 868, 874 [106]; 874 [107] Mount, D. 34, 45 [109]; 45 [111]; 130, 750 [12]; 226, 242, 247, 251, 286 [155]; 286 [156]; 285 [200]; 288 [201]; 372, 584 [195]; 384 [201]; 455, 457 [13]; 457 [15]; 590, 592 [51]; 644, 645, 667, 668, 693 [173]; 697 [291]; 698 [300]; 843, 860, 863, 873 [67]; 881, 911, 915, 918, 919, 921, 922, 924^927, 929, 930 [9]; 930 [10]; 930 [11]; 930 [12]; 930 [U]; 930 [14] Mu, H. 146, 148, 755 [84] Mucke, E. 55, 772 [156]; 150, 757 [40]; 273, 285 [111]; 623, 628 [41]; 374, 380 [84] Mudur, S.R 612, 657 [106] Muehrclce, RC. 347, 386 [232] Mueller, H. 799 [183] Mugnai, C. 493, 503, 504, 507, 576 [88]; 576 [91] Mukherjee, A. 325, 327 [5] Mukhopadhyay, A. 856, 857, 866, 877 [18]; 877 [19]; 875 [137] MuUer, D.E. 209, 288 [202]; 467, 489 [50] MUUer, J.-D. 304, 330 [95] MuUer, R. 760 [65] MuUin, R. 10, 31, 45 [112] Mulmuley, K. 23, 28, 29, 39, 45 [113]; 45 [114]; 46 [115]; 91, 92, 96, 776 [284]; 776 [285]; 776 [286]; 777 [287]; 799 [184]; 236, 288 [203]; 288 [204]; 375, 384 [202]; 435, 460 [108]; 566, 570, 572, 574, 594 [96]; 594 [97]; 594 [98]; 594 [99]; 594 [100]; 608, 657 [107]; 705, 709, 712-721, 723 [27]; 723 [28]; 723 [29]; 723 [30]; 723 [31]; 723 [32]; 723 [33]; 723 [34]; 723 [35]; 725 [36]; 725 [37]; 791, 793, 824, 828 [64]; 828 [65]; 828 [66]; 828 [67]; 926, 955 [96] Munro, J.L 869, 874 [108] Murota,K. 211, 288 [209] Murray, R.M. 655, 696 [250] Musin, O.R. 227, 288 [205] Mutzel, R 958, 963, 964, 968 [101]; 968 [102] Myers, B.A. 427 [21]
Nackman, L.R. 304, 318, 330 [96]; 557 [124]; 609, 610, 612, 625, 630 [84]; 657 [102] Naddor, D. 493, 577 [109] Nagy, G. 228, 284 [81]; 364, 366, 369, 379 [57]; 384 [203] Nahar, S. 493, 502, 504, 577 [101] Naher, S. 82, 708 [39]; 124, 757 [24]; 375, 384 [204]; 481, 489 [49]; 599, 610, 630 [93]; 630 [94]; 607, 611, 612, 615, 626, 630 [95]; 630 [96]; 900, 906, 909, 917, 933 [95] Najork, M.A. 427 [11]; 427 [12] Nakano, S. 946, 965 [27] Naor, J. 189, 799 [182]; 593 [89]; 594 [103] Naor, M. 189, 799 [182]; 593 [89]; 594 [103] Naor, N. 22,42 [20] Narasimhan, G. 275, 283 [57]; 453^56, 458 [34]; 458 [45]; 458 [48]; 458 [49]; 537, 552, 555 [20]; 555 [21]; 679, 687 [28]; 856, 857, 872 [44]; 872 [45]; 926, 929, 957 [37]; 932 [47]; 932 [48]; 932 [49] Narayanaswami, C. 344, 346, 587 [105] Nassimi, D. 799 [185] Natarajan,B. 521, 557 [68] Naylor, B. 344, 384 [205] Nelson, R.C 751, 756, 767 [108]; 767 [109]; 763 [157] Netanyahu, N.S. 130, 750 [12]; 590, 592 [51]; 921, 922, 924, 950 [12] Neumann, K. 767 [102] Neumann-Lara, V. 262, 287 [1] Newborn, M. 74, 708 [31] Nguyen, T. 393, 427 [15]; 626, 628 [46] Nguyen, V.H. 751, 758 [34]; 767 [110] Nguyen-Van-Phai 322, 330 [97] Niciera,C.G. 355,587[110] Nicolau, A. 160, 794 [54] Nicole, D. 501, 576 [95] Nielson, G. 353, 385 [206] Niemeyer,D.R. 351, 579 [71] Nievergelt, J. 268, 286 [142]; 344-346, 385 [207]; 481, 489 [51]; 604, 620, 626, 629 [72]; 657 [108]; 657 [109]; 657 [110]; 731, 743, 746, 747, 754, 759 [41]; 767 [111]; 767 [112]; 767 [113]; 762 [114]; 762 [115]; 884, 891, 933 [78]; 933 [79] Nilsson, B. 501, 513, 574 [22]; 577 [102]; 536, 546, 547, 557 [69]; 557 [70]; 658, 671-673, 684, 685, 690 [85]; 690 [86]; 697 [133]; 697 [134]; 693 [189]; 696 [245]; 698 [301]; 698 [302]; 1007, 1010, 7024 [18]; 7025 [68]; 7026 [92]; 7026 [93] Nisan, N. 570, 592 [55] Nishizeki, T. 951-953, 965 [23]; 965 [24]; 977, 7026 [94]
Author index Nissan, N. 569, 575, 594 [102] Nissenzweig, A. 435, 459 [69] Nodine, M.H. 487, 489 [52] Noltemeier, H. 277, 284 [85]; 286 [141] Norel, R. 131, 133,153 [77]; 153 [78] North, S. 414, 421 [16]; 421 [22]; 942, 957, 961, 963, 967 [75]; 967 [76]; 969 [122]; 970 [137]; 970 [138] Norton, C.H. 589, 590, 594 [104] Noy, M. 75, 108 [38] Ntafos, S. 351, 381 [112]; 499, 506, 512, 513, 514 [22]; 575 [46]; 575 [47]; 516 [89]; 516 [90]; 650, 658, 667, 684-686, 690 [86]; (590 [111]; 691 [112]; 697 [113]; 693 [169]; (59i [170]; 695 [171]; 698 [303]; 69^ [304]; 698 [305]; 841, 872 [35]; 872 [36]; 872 [37]; 874 [109]; 995, 1006-1010, 1019, 1021,1024 [18]; 1024 [23]; 7024 [24]; 1024 [25]; 7025 [61]; 7025 [62]; 7025 [63]; 1026 [89]; 1026 [95]; 7026 [96]; 7026 [97]; 7026 [98] Nurmi, O. 367, 385 [208] Nussinov, R. 131, 133, 153 [77]; 75i [78] Oden, J.T. 296, 328 [34] 6'Dunlaing, C. 165, 192, 792 [4]; 795 [89]; 797 [141]; 241, 262, 279, 280, 286 [132]; 288 [195]; 288 [206]; 288 [207]; 288 [208]; 427, 434, 460 [104]; 460 [109]; 652, 698 [306]; 715, 72i [26]; 824, 825 [1] Ogawa, T. 230, 290 [247] Ogita, W. 230, 290 [247] Ohler, T. 752, 756, 758 [15]; 758 [16]; 762 [116]; 762 [111]; 762 [118] Ohsawa,Y. 752, 762 [119] Ohtsuki, T. 493, 502-504, 577 [103] Ohya,T. 211, 288 [209] Oishi, Y. 619, 622, 657 [111] 0'Keefe,CJ. 510,575[5] Okabe, A. 203, 280, 288 [210] 01ariu,S. 445,460 [110] Oleinik, O.A. 58, 777 [303] Oliger, J. 317, 527 [21] Ollivier-Gooch, C. 311, 324, 329 [57]; 330 [98] Olson, T. 493, 577 [109] Ong, H.L. 682, 698 [307] Onn, S. 962, 970 [139] Onoguchi, K. 952, 953, 965 [24] Ooi, B.C. 751, 762 [120]; 762 [121] Ooishi, Y. 241, 290 [243]; 619, 622, 632 [146] Oommen, B.J. 665, 699 [330] Openshaw, S. 347, 383 [176]; 756, 758 [27] Orenstein, J. 344, 385 [210]; 743, 767 [105]; 762 [122]; 762 [123]; 762 [124]; 762 [125] Orletsky, M.W. 130, 752 [48]
1-21
Orlik, P. 52, 106, 777 [288]; 777 [289]; 777 [290]; 777 [291] Orlin, J.B. 636, 686 [10] O'Rourke, J. 27, 34, 47 [4]; 43 [60]; 46 [133]; 46 [134]; 68, 90, 92, 772 [157]; 142, 143, 146, 750 [5]; 752 [50]; 755 [75]; 163, 799 [186]; 799 [187]; 799 [188]; 236, 285 [112]; 493, 500-502, 506, 507, 510, 512, 575 [8]; 574 [31]; 574 [32]; 574 [38]; 577 [104]; 577 [105]; 577 [106]; 577 [107]; 577 [108]; 577 [109]; 577 [110]; 530, 532, 540, 550, 551, 554, 555 [2]; 557 [71]; 557 [79]; 558 [82]; 608, 657 [112]; 636, 645, 656, 667, 668, 682, 686 [3]; 687 [34]; 693 [178]; 698 [308]; 698 [309]; 698 [310]; 698 [311]; 698 [312]; 700 [351]; 840, 845, 850, 865, 872 [52]; 874 [110]; 874 [111]; 874 [112]; 874 [113]; 874 [114]; 875 [140]; 975, 983-993, 998, 999, 1004, 1005, 1021, 1022, 7024 [28]; 7025 [44]; 7025 [47]; 7026 [99]; 7026 [100]; 7027 [101]; 7027 [102] Otoo, E.J. 748, 762 [126]; 762 [127] Ottmann, T. 20, 37, 42 [29]; 46 [116]; 91, 709 [72]; 217, 282 [34]; 345, 346, 377 [18]; 610, 611, 622, 627 [13]; 657 [113] Ouchi, K. 615, 628 [38]; 657 [114] Ouksel, M. 748, 762 [128]; 762 [131] Overmars, M. 52, 58, 77, 79, 93, 98, 99, 100-106, 707 [29]; 777 [129]; 777 [131]; 777 [132]; 774 [204]; 774 [216]; 775 [240]; 777 [292]; 130, 755 [79]; 796 [103]; 342, 366, 367, 372, 375, 379 [52]; 379 [53]; 383 [158]; 385 [211]; 385 [212]; 481, 483, 486, 487,489 [53]; 489 [54]; 500, 574 [40]; 548, 555 [1]; 608, 626, 628 [31]; 657 [115]; 644, 655, 658, 671, 697 [134]; 698 [313]; 700 [369]; 732, 740, 762 [129]; 762 [130]; 860, 869, 874 [108]; 874 [115]; 874 [116]; 899, 903, 904, 920, 933 [97]; 934 [98]; 934 [99]; 996, 7024 [13] Owen, S. 296, 330 [99] Ozawa, T. 951, 952, 965 [23] Ozkarahan, E.A. 748, 762 [131] Pach, J. 27-29, 33, 40, 41, 43 [55]; 43 [56]; 45 [90]; 45 [105]; 46 [117]; 46 [118]; 53, 60, 66, 71, 74, 77, 79, 81-83, 92, 106, 772 [149]; 772 [150]; 775 [241]; 776 [270]; 777 [293]; 777 [294]; 777 [295]; 777 [296]; 777 [297]; 777 [298]; 566, 572, 593 [70]; 946, 948, 949, 951-953, 966 [39] Pacheco, R. 942, 969 [130] Pagel, B.-U. 750, 756, 762 [132]; 762 [133]; 762 [134] Pagli, L. 493, 503, 504, 507, 576 [88]; 576 [91] Pal, S. 844, 856, 870, 877 [8]; 877 [9]; 873 [65]; 875 [66]; 874 [117] Palazzi, L. 345, 346, 385 [213]
1-22
Author index
Palmer, B. 370-372, 381 [103] Palmer, R.G. 275, 286 [140] Palmiteer, S. 419,421 [23] Pan, V.Y. 609, 613, 627 [17] Papadakis, N. 652, 698 [314]; 698 [315] Papadimitriou, C. 34, 35,45 [109]; 46 [119]; 46 [120]; 251, 271, 288 [200]; 288 [211]; 440, 460 [111]; 645, 650, 651, 656, 661, 662, 665, 667, 668, 670, 677, 691 [136]; 691 [137]; 697 [291]; 697 [292]; (598 [316]; 698 [317]; 698 [318]; 698 [319] Papadopoulou, E. 247, 280, 288 [212]; 642, 698 [320] Papakostas, A. 947-952, 954, 961, 962, 964, 969 [128]; 970 [140]; 970 [141]; 970 [142]; 970 [143]; 970 [144]; 970 [145]; 970 [146]; 970 [147]; 970 [148]; 970 [149] Papamitridiou, C.H. 351, 372, 384 [195]; 384 [196] Parberry, I. 159,199 [189] Parent, R. 146, 149, 150,152 [67] Parikh, P 321, 322, 330 [79] Paris, J. 12,46 [121] Parise, A. 964, 966 [45] Park, J. 181, 184, 185, 187, 792 [7]; 193 [8]; 679, 696 [244] Parker, R. 680, 698 [321] Parthasarathy, V.N. 312, 313, 330 [100] Paschinger, I. 233, 288 [213] Pascucci,V. 356,577 [13] Paterson, M. 74,115 [247]; 437,438, 460 [106]; 674, 698 [299] Paul, W. 188, 799 [190]; 821, 828 [68] PavUdis, T. 361, 386 [246]; 493,496,498, 500, 514 [41]; 577 [111]; 577 [112]; 577 [113] Payne, T. 946, 952, 953, 965 [28] Payton, D.W. 665,697 [293] Pearl, J. 644, 698 [322] Peck, G.W. 73, 777 [299] Peiro, J. 322, 330 [101] Pellegrini, M. 52, 68, 70, 71, 101, 708 [51]; 777 [300]; 777 [301]; 777 [302]; 589, 594 [105]; 750, 758 [26] Penttonen, M. 888, 932 [55] Peraire, J. 322, 329 [64]; 329 [65]; 330 [101] Perakis, A. 652, 698 [314]; 698 [315] Peralta, R. 570, 597 [6] Perry, E. 318, 527 [19] Persson, J. 347, 385 [214] Pemcchio, R. 323, 330 [102] Peshkin, M.A. 833, 874 [118] Peterkin, C. 10,46 [122] Peters, J.G. 547,557 [62]; 648, 692 [158]; 697 [274] Petersson, O. 544, 555 [18] Petre, M. 421 [24] Petreschi, R. 949, 969 [124] Petrie, G. 351, 352, 354, 355, 385 [215]; 385 [216] Petrovskii, LG. 58, 777 [303]
Peucker, T.K. 143, 757 [37]; 347, 357, 370, 371, 379 [72]; 385 [217] Piatico, C. 550, 557 [65]; 657-659, 685, 687 [29]; 687 [30]; 697 [294] Pienovi, C. 228, 284 [81]; 366, 379 [57] Pigot, S. 340, 385 [218] Hlouk, M. 385 [219] Pin, E.G. 656, 699 [343] Pinter, R. 493, 497, 503, 504, 576 [83]; 843, 877 [11] Pion,S. 609, 613, 627 [17] Pipemo, A. 944, 945, 950, 952, 955, 966 [33]; 966 [34] Pippenger, N. 74, 775 [247]; 746, 759 [41] Plaisted, D. 445,460 [112]; 498, 577 [114] Plantinga, H. 99, 100, 777 [304] Plassmann, P 27,42 [31]; 310, 313, 325, 329 [58]; 329 [71]; 638, 675,689 [66]; 689 [67] Plaxton, C.G. 796 [96]; 799 [191]; 799 [192] Plotkin, S.A. 589, 590, 594 [104] Pocchiola, M. 644, 646,699 [323]; 699 [324]; 860, 874 [119] Poiker, T.K. 335, 336, 587 [119] Polimenis,V.G.91, 708[41] Pollack, R. 21, 23, 27, 28, 36,40,43 [55]; 43 [56]; 44 [73]; 46 [123]; 53-55, 58, 71,73, 74,77, 81, 89, 90, 92, 93, 104, 106, 709 [68]; 709 [69]; 709 [70]; 709 [71]; 772 [149]; 772 [150]; 775 [190]; 775 [191]; 775 [192]; 777 [305]; 527, 528,542, 557 [58]; 643, 699 [325]; 828 [80]; 842, 869, 874 [95]; 946, 948,949, 951-953, 966 [39] PoUak, H.O. 674, 693 [175] Postnikov, A. 53, 777 [306] Pouly, L. 325, 327 [5] Powar, PL. 227, 288 [214] Powell, K.G. 317, 528 [42] Pozo, R. 298, 327 [17] Prasad, D. 870, 877 [8]; 877 [9] Pratt, V.R. 191,194 [57] Pratt, W.K. 339, 385 [220] Preis,B. 350, 585 [168] Preparata, E 21, 23, 27, 35,42 [14]; 42 [15]; 43 [59]; 46 [124]; 95, 98, 770 [112]; 777 [307]; 163,176, 178, 189, 191, 192, 795 [20]; 795 [21]; 798 [163]; 798 [165]; 798 [166]; 799 [193]; 799 [194]; 203, 209, 211, 221, 253, 288 [202]; 289 [215]; 293, 306, 330 [103]; 340, 344-346, 353, 366, 367, 375, 377 [2]; 384 [179]; 385 [207]; 385 [221]; 385 [222]; 465,467,471,473,474,480,483, 489 [45]; 489 [50]; 489 [55]; 489 [56]; 489 [57]; 489 [58]; 489 [59]; 493, 499,575 [45]; 577 [115]; 522, 550,556 [26]; 557 [56]; 610, 626, 627 [1]; 603, 607, 608, 613, 626, 627, 627 [5]; 627 [15]; 628 [34]; 630 [91]; 657 [116]; 657 [117]; 638, 641,
Author index 642, 690 [109]; 690 [110]; 696 [253]; 699 [326]; 740, 762 [135]; 826 [11]; 528 [69]; 828 [70]; 525 [71]; 843, 856, 857, 873 [62]; 574 [92]; 874 [93]; 882, 909, 928, 934 [100]; 976, 1020, 1025 [58]; 7026 [86] Price, B.A. 393, 421 [24]; 427 [25]; 421 [26]; 427 [27] Priest, D.M. 611, 631 [118]; 631 [119] Prim, R.C. 270, 259 [216] Probert, E.J. 322,329 [64]; 329 [65] Pruhs, K. 665, 672, 675, 677, 688 [50]; 695 [231]; 695 [232]; 695 [233] Przeslawski, K. 138,153 [80] Przytycka, T. 161,192 [1] Puech, C. 343,380 [97]; 756, 759 [47] Pugh, W. 719, 723 [38]; 919, 925, 934 [101] PuUar, D. 621, 631 [120] PuUeyblank, B. 681,689 [72] Pulleyblank, W. 681, 692 [156]; 1001,1024 [29] Puppo, E. 337, 341, 342, 349, 352, 358, 359, 361, 363, 369,377 [19]; 575 [40]; 379 [58]; 379 [59]; 379 [61]; 379 [62]; 579 [63]; 579 [64]; 379 [65]; 579 [68]; 384 [185]; 555 [223]; 555 [224]; 555 [225]; 555 [226]; 635, 691 [135] Quak, W. 351,557 [266] Raab, S. 92, 777 [308] Rabin, M.O. 705, 723 [39]; 888, 934 [102] Rademacher, H. 962, 970 [159] Radke, J.D. 273, 274,257 [164] Rafferty, C.S. 315,327 [9] Raghavachari, B. 439,444,460 [90]; 460 [91]; 953, 967 [74] Raghavan, R 104, 775 [239]; 133, 752 [65]; 570, 593 [71]; 593 [90]; 594 [106]; 654, 661, 662, 673, 677,681, 683,686 [8]; 689 [68]; 689 [72]; 689 [74]; 695 [224]; 882, 929, 930 [3] Raghunathan, A. 510-512, 516 [99]; 576 [100]; 577 [116]; 868,574 [106]; 574 [107] Raiha, K.-J. 427 [18] Rajagopalan, S. 439,440,456 [7]; 680, 657 [17] Rajan, V.T. 794 [62]; 227, 230, 231, 281,259 [217]; 321,557 [104]; 353, 555 [227]; 526, 530, 540-542, 551,555 [10] Rajasekaian, S. 241,259 [218]; 825, 525 [72]; 525 [73] Ramachandran, V. 159, 795 [156]; 539,556 [48] Ramaiyer, K. 487,455 [12]; 639, 641, 693 [180] Ramamohanarao, K. 754, 762 [136] Raman, R. 192, 799 [195]; 268,256 [131]; 481, 455 [27]; 636, 699 [327]; 825, 527 [50]; 890, 891, 907-909, 933 [71]; 933 [72] Ramanan, R 814,527 [55]
1-23
Ramaswami, S. 241, 259 [218]; 500, 577 [117]; 825, 525 [73] Ramaswamy, S. 749, 763 [162] Ramesh, H. 676, 679, 655 [37] Ramos, E. 26, 30, 42 [18]; 46 [125]; 102, 777 [309]; 777 [310]; 189-192, 795 [18]; 795 [19]; 795 [22]; 797 [142]; 799 [196]; 234, 257 [15]; 570, 575, 578, 580, 581, 585, 586, 588, 589, 597 [7]; 597 [8]; 594 [91]; 594 [107]; 594 [108]; 594 [109]; 594 [110]; 825, 526 [7]; 928, 930 [7] Ramos, R 500, 577 [117] Ramshaw,L. 150, 752[51] Ranade, A. 818, 525 [74] Randell, R. 52, 775 [179] Ranjan, D. 743, 757 [10] Rao,A. 105, 777[311] Rao, N.S.V. 660, 665, 699 [328]; 699 [329]; 699 [330]; 740, 760 [81] Rao, S. 636, 659, 694 [198]; 818, 819, 527 [59] Rao, S.B. 678, 699 [331] Rao, S.V.N. 665, 695 [226] Raper, J. 375, 555 [228] Rappaport, D. 686, 697 [126]; 865, 577 [14]; 574 [120]; 1010, 1013,1024 [27]; 7024 [33] Rappoport, A. 149, 755 [86]; 499, 577 [126] Rardin, R. 680, 695 [321] Rasch, R. 263,259 [219] Rau-Chaplin, A. 794 [38]; 796 [106]; 796 [107]; 796 [110] Ravi, R. 440, 441, 457 [28]; 460 [113]; 675, 676, 693 [168]; 695 [241]; 699 [332] Ravi, S.S. 440, 441, 460 [113]; 676, 699 [332] Raviart, RA. 300, 525 [40] Ravishankar, C. 767 [101] Rawlins, G. 661, 662, 682, 655 [49]; 697 [125]; 868, 575 [121]; 575 [122]; 575 [128] Razzazi, M. 505, 575 [49]; 575 [50] Read, J. 963, 965 [106] Recio, T. 249, 250, 253, 254, 254 [76]; 255 [190] Reckhow, R. 501, 508, 510-512, 574 [33]; 574 [34]; 574 [35]; 577 [118]; 577 [119]; 868, 572 [43]; 575 [123]; 1021, 7024 [30]; 7024 [31] Reed, B. 1003, 7025 [50] Reeds, J.A. 653, 699 [333] Rege, A. 652, 659 [82] Regnier, M. 747,756, 762 [137] Reich, G. 675, 695 [221]; 699 [334] Reico, T. 54, 775 [228] Reif, J. 34, 43 [34]; 104, 777 [312]; 161, 180, 795 [175]; 799 [197]; 799 [198]; 799 [199]; 799 [200]; 799 [201]; 366, 367, 555 [229]; 521, 523, 548, 557 [72]; 557 [73]; 557 [74]; 636, 652, 653, 655, 659, 662, 666, 659 [82]; 659 [83]; 692 [141]; 695 [234]; 699 [335]; 699 [336];
1-24
Author index
699 [337]; 699 [338]; 699 [339]; 699 [340]; 699 [341]; 722, 723 [40]; 776, 816, 819, 824, 825, 828 [75]; 828 [76]; 828 [77]; S28 [78]; 870, 875 [124] Reinelt, G. 214, 286 [154]; 677, 695 [230]; 699 [342] Reingold, E. 481, 489 [51]; 944, 950, 952, 954, 955, 963, 967 [73]; 970 [150]; 977 [163] Reischuk, R. 776, 816, 819, 828 [79] Reiss, S. 163, 79(5 [119]; 796 [120]; 962, 970 [151] Reister, D.B. 656, 699 [343] Remmele, RM. 241, 285 [130] Rezende, RJ. 393, 397, 413, 420 [1]; 421 [28] Rheinboldt, W.C. 309, 327 [7] Ribarsky,W.361,584[178] Richards, D.S. 444, 461 [118]; 675, 699 [344] Richards, RM. 51, 775 [251]; 777 [313] Richter-Gebert, J. 52, 777 [314] Ridder,T.340,582[129] Rinaldi, G. 677, 695 [230] Rinnooy Kan, A.H.G. 427, 460 [94]; 677, 680, 696 [251] Rippa, S. 227, 289 [220]; 299, 314, 331 [105]; 331 [106]; 353, 355, 358, 380 [78]; 386 [230]; 586 [231] Rippel, J. 865,874[112] Risler, J.-J. 89, 104,113 [195]; 256, 282 [33] Rival, I. 163, 796 [98]; 962, 968 [91]; 1005, 1006, 1024 [34] Rivara, M.-C. 310, 325, 331 [107]; 331 [108]; 357 [109]; 337 [110] Rivera-Campo, E. 979, 997, 1001-1003, 1005, 1015, 1016,1024 [35]; 1024 [36]; 1024 [37]; 1024 [38]; 1024 [39]; 7025 [40]; 7025 [41]; 7025 [51] Rivest, R. 143, 147, 757 [31]; 191, 79^ [57]; 796 [95]; 493, 497, 503, 504, 576 [83]; 636, 697 [124] Riviere, S. 644, 699 [345] Rivin, I. 962, 968 [95] Robbins, S. 654, 686 [4] Robert, J.-M. 29, 36, 42 [25]; 44 [68]; 77, 79, 96, 773 [178]; 77^ [204]; 654, 689 [77] Roberts, S. 52, 56, 777 [315]; 370, 371, 384 [190] Robertson, G.G. 962, 970 [152] Robins, G. 427, 439, 459 [84]; 460 [114]; 675, 688 [59] Robinson, A.H. 347, 386 [232] Robinson, DJ. 318, 327 [4] Robinson, J.S. 838, 874 [98] Robinson, J.T. 744, 762 [138] Robinson, V.B. 370-372, 387 [103] Robison, A.D. 549, 556 [28] Robson, J.M. 343, 380 [97] Rogers, H. 12, 46 [126] Rohnert, H. 644, 699 [346]; 699 [347]; 908, 932 [56]
Rohrer, C. 955, 964, 965 [19] Rokne, J.G. 386 [233] Roman, G.-C. 762 [139] Romine, C. 298, 327 [17] Rompel, J. 189,194 [51]; 570, 597 [22]; 597 [23]; 594 [111] Roos, T. 37, 42 [13]; 44 [74]; 46 [127]; 46 [128]; 46 [129]; 81,114 [203]; 241, 285 [130]; 286 [134]; 289 [221]; 342, 343, 372, 379 [52]; 387 [117]; 743, 751, 757 [10]; 758 [33]; 758 [34]; 767 [110] Roselle, D. 10, 30, 31, 46 [130]; 46 [131]; 46 [132]; 47 [148] Roseman, S. 743, 759 [44] Rosen, A. 661, 662, 689 [62] Rosenberg, A.L. 35,43 [59] Rosenfeld, A. 336, 339, 383 [165]; 386 [234]; 509, 578 [136] Rosenkrantz, D.J. 271, 289 [222]; 440, 441, 460 [113]; 676, 677, 699 [332]; 700 [348] Rosenstiehl, R 946, 947, 951-953, 959, 966 [40]; 970 [153] Rossignac, J. 146, 149, 752 [68]; 753 [81]; 356, 387 [262] Rote, G. 82, 772 [168]; 138, 141, 750 [1]; 750 [7]; 228, 276, 277, 287 [10]; 283 [55]; 448, 456 [6]; 531-533, 557 [66]; 643, 656, 694 [217]; 699 [325]; 997, 7027 [103] Rotem, D. 758 [29] Roth, B. 521, 557 [55] Rottke,T. 756, 763 [140] Roussopoulos, N. 345, 386 [235]; 386 [250]; 752, 759 [45]; 763 [141]; 763 [155] Rowe, N. 651, 652, 687 [14]; 687 [15]; 695 [239]; 695 [240] Rowe, N.C. 658, 700 [349] Roy, M.-F 52, 54, 55, 58, 89, 90, 93, 104, 709 [68]; 709 [69]; 709 [70]; 709 [71]; 709 [76]; 775 [228]; 775 [229]; 775 [230]; 775 [231]; 777 [305]; 828 [80] Rub, C. 160, 190, 192, 797 [147]; 799 [202] Rubinstein, S. 679, 694 [195] Rucklidge, W.J. 130, 131, 752 [55] Rudolph, L. 160, 163, 180, 798 [159]; 798 [160] Rulling,W. 643, 692 [163] Ruppert, J. 306, 315, 319, 328 [22]; 328 [27]; 337 [111]; 374, 386 [236]; 452, 455, 460 [115]; 911,925, 934 [103] Ruskey, R 962, 965 [30] Ryall,K. 961, 963, 970 [154] Rytter, W. 161, 797 [128] Ryu, K.W. 799 [203]
Author Saalfeld, A. 226, 288 [201]; 304, 331 [112]; 340, 348, 350, 353, 355, 386 [237]; 386 [238]; 386 [239]; 386 [240]; 386 [241] Sack, J.-R. 47 [152]; 196 [102]; 79(5 [108]; 796 [109]; 196 [111]; 795 [170]; 268, 284 [90]; 372, 555 [170]; 362, 384 [186]; 393, ^27 [15]; 466, 489 [60]; 493, 500, 505, 506, 512, 575 [68]; 516 [79]; 516 [82]; 577 [120]; 577 [121]; 577 [122]; 577 [123]; 521-523, 525, 527, 528, 530, 535, 536, 539, 542, 544-547, 551-553, 555 [3]; 556 [25]; 557 [58]; 557 [59]; 557 [61]; 557 [75]; 557 [76]; 626, 628 [46]; 648, 649, 651, 652, 670, 687 [11]; 657 [12]; 696 [247]; 696 [259]; 697 [271]; 842, 856, 869, 870, 872 [47]; 572 [48]; 574 [95]; 575 [126]; 894-896, 932 [53]; 984, 1027 [104]; 7027 [105]; 7027 [106] Saclcs-Davis, R. 751, 754, 762 [121]; 762 [136] Sagan, H. 763 [142] Sahni, S. 799 [185]; 493, 502, 504, 577 [101] Sairam, S. 181, 799 [204] Saito, S. 56, 91,113 [186]; 775 [187] Sakamoto, M. 235, 259 [223] Sakauchi, M. 752, 762 [119] Saks, M. 507, 508, 574 [23]; 661, 662, 659 [62] Sale, R.D. 347, 556 [232] Salesin, D. 364, 557 [259]; 557 [260]; 618, 619, 622, 629 [69]; 629 [70] Salowe, J. 101, 777 [122]; 432, 439, 444, 453, 455, 456, 457 [13]; 454, 455 [49]; 460 [114]; 467 [116]; 467 [117]; 467 [118]; 590, 592 [47]; 646, 675, 699 [344]; 700 [350]; 891, 895, 926-929, 930 [9]; 932 [49]; 934 [104]; 934 [105]; 934 [106]; 934 [107] Saltel, E. 296, 329 [61] Saluja, S. 794 [62]; 526, 530, 540-542, 551, 553, 554, 555 [10]; 556 [34]; 664, 693 [174]; 844, 856, 575 [65]; 575 [66] Salza, S. 165, 180, 794 [53] Salzberg, B. 732, 744, 745, 767 [103]; 767 [104] Samet, H. 339, 343, 344, 346, 360, 361, 373, 377 [8]; 552 [140]; 552 [141]; 556 [242]; 556 [243]; 556 [244]; 484, 459 [61]; 459 [62]; 736, 740, 743, 748, 751, 756, 757 [7]; 757 [8]; 767 [99]; 767 [108]; 767 [109]; 763 [143]; 763 [144]; 763 [145]; 763 [146]; 763 [156]; 763 [157] Sandberg, J.S. 942, 969 [122] Sander, G. 963, 970 [155] Sanderson, A.C. 105, 775 [233]; 833, 574 [118] Sankar, RV. 493, 502-504, 574 [42] Santalo, L.A. 756, 763 [147] Santoro, N. 796 [109]; 927, 957 [30]; 979, 1003, 1024 [39] Santos, E 253, 254,254 [76] Sanz, J.L.C. 796 [97]; 799 [205]
index
1-25
Saran, H. 510-512, 576 [100]; 576 [99]; 868, 574 [106]; 574 [107] Saranak, N. 783, 525 [81] Sardas, M. 954, 965 [90] Samak, N. 188, 796 [121]; 434, 467 [119]; 465, 471, 479, 486, 455 [33]; 459 [63] Sarraf, E.M. 795 [85] Sarrafzadeh, M. 427, 455 [43] Saxe, J. 245, 257 [4]; 434, 436, 456 [5]; 457 [21]; 486, 457 [9]; 459 [64]; 493, 575 [4]; 904, 930 [4] Saxena, M. 323, 330 [102] Scarlatos, L.L. 357, 361, 556 [245]; 556 [246] Schachter, B. 496, 497, 577 [124] Schaffier, M. 948, 970 [156] Schaukelaars, V. 341, 557 [275] Schek, H.-J. 743, 751, 755 [36]; 763 [148]; 763 [149] Schevon, C.A. 34, 47 [4]; 46 [133]; 46 [134]; 668, 656 [3]; 695 [311]; 7(90 [351] Schieber, B. 181, 795 [9]; 794 [52]; 799 [206]; 544, 555 [8]; 661, 662, 673, 677, 681, 656 [9]; 659 [68]; 659 [74]; 927, 930 [6] Schikore, D.R. 356, 374, 377 [13]; 377 [14] Schinzel, A. 3, 5, 9, 10,43 [49] Schirra, S. 55, 82,108 [39]; 110 [88]; 124, 127, 138, 144, 757 [24]; 757 [35]; 752 [59]; 755 [82]; 241, 255 [51]; 606, 608, 611, 614, 615, 624, 626, 625 [20]; 625 [21]; 625 [22]; 625 [23]; 625 [47]; 636, 700 [352] Schiwietz, M. 756, 767 [93]; 767 [96]; 763 [150] Schkolnick, M. 731, 757 [12] Schlenkrich, M. 880, 933 [77] Schmeichel, E.E 142, 752 [57] Schmidt, J. 594 [119] Schmidt, R 760 [65] Schmitt, A. 366, 367, 556 [247] Schneider, M. 340, 552 [128]; 552 [129] Schneider, R. 56, 777 [316]; 345, 377 [17]; 555 [166]; 555 [167]; 752, 756, 755 [18]; 755 [24]; 755 [25]; 767 [93]; 767 [95]; 767 [96]; 763 [151] Schneiders, R. 296, 557 [113] Schnorr, C.R 799 [207] Schnyder, W. 946, 948, 949, 951-953, 970 [157] Schonherr, S. 626, 625 [47] Schom, R 268, 286 [142]; 393, 401, 427 [29]; 604, 620, 622, 624, 626, 629 [72]; 657 [109]; 657 [110]; 657 [121]; 657 [122]; 657 [123]; 657 [124]; 884, 891, 933 [78]; 933 [79] Schorr, A. 34, 46 [143]; 666, 667, 700 [361]; 860, 575 [131] Schott, R. 214, 241, 252 [43]; 345, 346, 377 [22] Schroeder, WJ. 323, 557 [114]; 556 [249] Schubert, L. 247, 290 [255]; 348, 353, 354, 556 [248] Schuchardt, D. 983, 7027 [107]
1-26
Author index
Schuierer, S. 535, 536, 546, 547, 557 [69]; 557 [70]; 557 [77]; 648, 663, 664, 691 [128]; 696 [260]; 696 [261]; 696 [262]; 696 [263]; 696 [264]; 700 [353]; 700 [354]; 868, 875 [127]; 875 [128] Schwartz, J.T. 21, 22,46 [135]; 63, 90,104,117 [317]; 118 [318]; 77S [319]; 132, 133,152 [70]; 752 [71] Schwarz, C. 268, 286 [131]; 440,458 [50]; 890, 891, 897-900, 902, 903, 906-909, 932 [51]; 933 [71]; 933 [72]; 934 [108]; 95^ [109]; 934 [110] Schwarzenecker, E. 350, 383 [168] Schwarzkopf, O. 25, 29, 42 [6]; 43 [50]; 65, 86-88, 93-97, 99, 100, 102, 104, 105, 707 [13]; 707 [20]; 707 [21]; 707 [30]; 777 [128]; 777 [129]; 777 [132]; 777 [133]; 776 [271]; 776 [272]; 118 [320]; 141, 757 [34]; 796 [103]; 236-238, 242, 265, 271, 281, 281 [2]; 287 [3]; 287 [12]; 282 [31]; 284 [80]; 430, 435,456 [2]; 461 [120]; 578, 581, 586, 588, 597 [12]; 592 [50]; 594 [92]; 594 [93]; 608, 628 [31]; 672, 686 [5]; 715, 716, 718, 720-722, 722 [3]; 723 [21]; 723 [41]; 928, 930 [2] Scopigno, R. 231, 283 [70]; 358, 363, 378 [39]; 378 [40]; 385 [226] Scot Drysdale, R.L. 894^896, 932 [53] Scott, D.S. 509, 510, 577 [125] Sederberg, T. 146, 148, 755 [83]; 153 [84] Sedgewick, R. 395, 421 [5]; 421 [6]; 461 [121] Seeger, B. 345, 377 [17]; 741, 742, 747-752, 756, 758 [16]; 758 [18]; 758 [21]; 758 [25]; 767 [90]; 767 [91]; 767 [92]; 767 [93]; 767 [94]; 763 [152]; 763 [153]; 763 [154] Seery,J.B. 954, 969 [115] Segal, M.G. 621, 622, 631 [125]; 631 [126]; 637 [127] Seidel, R. 23, 27, 28, 40, 43 [55]; 43 [56]; 43 [60]; 44 [61]; 46 [136]; 55, 68, 70, 71, 75, 77, 79-81, 90, 92, 95, 708 [42]; 709 [60]; 772 [149]; 772 [150]; 772 [157]; 772 [158]; 772 [159]; 773 [172]; 775 [246]; 778 [321]; 778 [322]; 778 [323]; 778 [324]; 778 [325]; 149, 750 [15]; 210, 214, 218, 221, 233-236, 247, 260, 272, 284 [73]; 285 [110]; 285 [112]; 285 [113]; 285 [114]; 289 [224]; 289 [225]; 289 [226]; 289 [227]; 289 [228]; 289 [229]; 289 [230]; 345, 346, 374, 387 [124]; 386 [236]; 452, 455, 460 [115]; 527, 528, 542, 557 [58]; 566, 588, 594 [94]; 594 [113]; 594 [114]; 594 [115]; 594 [116]; 623, 624, 628 [45]; 637 [128]; 705, 715, 716, 723 [42]; 723 [43]; 724 [44]; 724 [45]; 724 [46]; 827 [58]; 842, 844, 850, 869, 872 [52]; 874 [95]; 875 [129]; 890, 911, 925, 934 [103]; 934 [111] Selfridge, J.L. 566, 592 [56] SeUen, J. 34,43 [41]; 372, 378 [35]; 654, 655, 658, 669, 697 [114]; 697 [115]; 700 [355]; 700 [356]; 700 [357]
SelUs, T. 345, 386 [250]; 752, 759 [45]; 763 [155] Semrau, I. 663, 700 [358] Sen, S. 92, 777 [287]; 180, 187, 192, 792 [7]; 797 [146]; 799 [197]; 799 [198]; 799 [199]; 200 [208]; 200 [209]; 366, 367, 385 [229]; 636, 699 [335]; 712, 713, 719, 720, 722, 723 [37]; 723 [40]; 724 [47]; 824, 825, 827 [45]; 827 [46]; 828 [72]; 828 [75]; 828 [76]; 828 [77]; 828 [82]; 828 [83] Sequin, C.H. 622, 637 [126]; 637 [127] Serpette, B. 607, 637 [129] Serra, O. 994, 7026 [78] Sevcik, K.C. 731, 747, 767 [112]; 767 [113] Severance, D. 590, 592 [57] Shaffer, C.A. 756, 763 [156]; 763 [157] Shah, N.R. 230, 231, 234, 281, 285 [115]; 321, 329 [50]; 373, 380 [81] Shamir, A. 799 [207]; 493, 497, 503, 504,576 [83] Shamos, M.I. 21, 23, 46 [124]; 163, 189, 191, 799 [193]; 203, 209, 211, 215, 221, 253, 264, 268-270, 277, 282 [35]; 289 [215]; 289 [231]; 289 [232]; 293, 306, 330 [103]; 340, 353, 385 [221]; 429, 467 [122]; 467, 489 [57]; 493, 577 [115]; 608, 626, 637 [117]; 638, 699 [326]; 740, 762 [135]; 828 [71]; 828 [84]; 879, 882-884, 909, 928, 937 [23]; 934 [100]; 934 [112]; 934 [113] Shapira, M. 149, 753 [86]; 499, 577 [126] Shapiro, L.G. 860, 875 [130] Sharir, M. 3, 4, 7, 10, 11, 14^17, 19, 21-30, 32-^1, 47 [3]; 47 [5]; 42 [7]; 42 [9]; 42 [10]; 42 [11]; 42 [12]; 42 [21]; 42 [28]; 43 [35]; 43 [43]; 43 [47]; 43 [55]; 43 [56]; 43 [58]; 44 [61]; 44 [62]; 44 [64]; 44 [75]; 44 [77]; 44 [80]; 44 [84]; 45 [90]; 45 [91]; 45 [92]; 45 [102]; 45 [103]; 45 [105]; 46 [117]; 46 [123]; 46 [135]; 46 [137]; 46 [138]; 46 [139]; 46 [140]; 46 [141]; 46 [142]; 46 [143]; 46 [144]; 47 [154]; 51-54, 60, 62, 63, 65-68, 70, 71, 74-84, 86-88, 90-106, 707 [5]; 707 [8]; 707 [9]; 707 [10]; 707 [11]; 707 [12]; 707 [14]; 707 [15]; 707 [21]; 707 [22]; 707 [23]; 707 [24]; 707 [25]; 707 [26]; 707 [27]; 707 [28]; 708 [46]; 708 [48]; 708 [49]; 708 [50]; 708 [51]; 708 [52]; 708 [53]; 708 [54]; 708 [55]; 708 [56]; 708 [57]; 709 [80]; 770 [103]; 770 [104]; 770 [105]; 770 [106]; 770 [107]; 770 [113]; 770 [115]; 777 [121]; 777 [123]; 777 [129]; 772 [149]; 772 [150]; 772 [151]; 772 [152]; 772 [153]; 772 [159]; 772 [160]; 772 [168]; 772 [169]; 772 [170]; 774 [202]; 774 [205]; 774 [206]; 774 [217]; 774 [218]; 774 [219]; 774 [220]; 774 [221]; 775 [237]; 775 [238]; 775 [241]; 775 [242]; 775 [243]; 775 [254]; 776 [270]; 777 [295]; 777 [296]; 777 [297]; 777 [317]; 778 [318]; 778 [319];
Author index 118 [320]; 118 [326]; 118 [327]; 118 [328]; 118 [329]; 775 [330]; 118 [331]; 775 [333]; 779 [357]; 128, 129, 133, 134, 136, 137, 146, 147, 150 [16]; 757 [25]; 752 [56]; 200 [210]; 214, 236, 238, 242, 255-257, 260, 265, 270, 278, 280, 283 [45]; 283 [67]; 285 [108]; 285 [114]; 286 [135]; 286 [144]; 255 [187]; 255 [206]; 255 [207]; 259 [233]; 259 [234]; 345, 346, 365-369, 372, 377 [3]; 378 [31]; 378 [45]; 380 [80]; 382 [133]; 555 [158]; 555 [211]; 556 [251]; 386 [252]; 435, 436, 456 [3]; 459 [78]; 465, 482, 455 [15]; 489 [40]; 522, 525, 527, 528, 532, 533, 542, 556 [27]; 556 [41]; 557 [58]; 566, 569, 581, 586, 588-590, 590 [1]; 597 [13]; 597 [15]; 597 [16]; 597 [25]; 597 [26]; 597 [27]; 597 [28]; 597 [29]; 592 [48]; 593 [60]; 593 [72]; 593 [73]; 594 [95]; 594 [112]; 641, 643, 656, 659, 666, 667, 669, 686 [2]; 686 [6]; 690 [93]; 695 [186]; 699 [325]; 699 [336]; 700 [359]; 700 [360]; 700 [361]; 715-717, 722 [7]; 725 [16]; 723 [22]; 825, 527 [60]; 842, 845, 853, 856, 860, 869, 870, 577 [4]; 577 [5]; 575 [69]; 874 [95]; 575 [131]; 896, 897, 903, 928, 929, 930 [1]; 932 [62]; 933 [75]; 934 [114]; 934 [115] Shauck, S. 190, 192, 797 [143]; 642, 693 [181]; 693 [182] Shearer, J. 507, 508, 574 [23]; 577 [127] Sheffler, TJ. 298, 329 [72] Shelton, C. 52, 92, 106, 774 [222]; 624, 629 [71] Shen, H.W. 356, 554 [180] Shen, X. 549, 556 [28] Shephard, G.C. 64, 776 [273]; 138, 755 [85] Shephard, M. 308, 323, 327 [8]; 557 [114]; 557 [115]; 557 [116]; 332 [142]; 332 [143] Shepp, L.A. 653, 699 [333] Sherman, A.H. 310, 327 [12] Shermer, T. 369, 377 [24]; 500, 506, 512, 574 [21]; 574 [40]; 575 [58]; 493, 501, 502, 577 [128]; 577 [129]; 577 [130]; 554, 556 [42]; 645, 686, 655 [41]; 697 [126]; 840, 841, 865, 868, 869, 577 [23]; 574 [102]; 575 [132]; 575 [133]; 575 [134]; 575 [135]; 975, 984, 988, 989, 993-995, 998, 999, 1010, 1011, 1015, 1021, 7025 [2]; 7024 [15]; 7024 [33]; 7025 [67]; 7027 [102]; 7027 [108]; 7027 [109]; 7027 [110]; 7027 [111]; 7027 [112] Shenvani, N. 427, 467 [123] Shewchulc, J.R. 296, 306, 557 [117]; 557 [118]; 600, 611, 613, 616,657 [130]; 632 [131]; 632 [132] Shi, W. 217, 255 [116] Shieber, S. 940, 961, 963, 965 [25]; 969 [112]; 970 [154] Shiloach, Y. 160, 185, 200 [211]; 944, 945, 950, 952, 955, 970 [158] Shimada, K. 304, 310, 557 [119]; 557 [120]
1-27
Shin, C.-S. 664, 700 [362] Shin, S. 664, 700 [362]; 844, 856, 865, 572 [38]; 575 [82]; 575 [136]; 576 [152] Shing, M. 505, 575 [49]; 652, 695 [239]; 695 [240] Shiraishi, S. 163, 799 [181] Shiren, Y. 360, 557 [120] Shirra,S. 348, 579 [51] Shmoys, D.B. 427, 460 [94]; 677, 680, 696 [251] Shor, P. 3, 10, 11, 16, 19, 20, 42 [11]; 28, 29, 43 [46]; 47 [145]; 47 [146]; 53, 72, 91, 95, 101, 102, 777 [120]; 777 [302]; 775 [332]; 181, 792 [6]; 189, 794 [51]; 795 [84]; 214, 234, 236, 245, 257 [4]; 254 [74]; 345, 346, 575 [41]; 436, 456 [5]; 493, 575 [4]; 566, 570, 581, 587-589, 597 [23]; 592 [45]; 592 [46]; 705, 711, 713-715, 722 [13]; 793, 824, 526 [30]; 904, 930 [4] Shorr, A. 372, 556 [251] Shoshani, A. 755 [29] Shoudai,T. 163, 799 [181] Shrairaman, R. 644, 692 [142] Shyamasundar, R. 501, 575 [3]; 1021, 7025 [3] Sibson, R. 211, 226, 228, 256 [133]; 259 [235]; 259 [236] Siegel, A. 594 [119]; 643, 697 [123] Siegel, M. 833, 575 [86] Sifrony, S. 21-23, 25, 26, 32, 40, 44 [75]; 45 [105]; 46 [123]; 66, 82, 95, 774 [206]; 776 [270] Sigeti,D.E. 361, 579 [73] Silva, C.T. 357, 556 [253] Silver, D. 599, 627, 625 [36] Silverberg, E.B. 35, 46 [120]; 656, 695 [318] Silverman, R. 130, 750 [12]; 921, 922, 924, 930 [12] Simchi-Levi, D. 679, 659 [70] Simeone, B. 949, 950, 969 [124]; 969 [125] Simmons, A. 29,44 [67]; 73, 74, 775 [176] Simpson, R.B. 227, 254 [79]; 299, 304, 525 [43]; 557 [121]; 353, 575 [48]; 845, 846, 575 [78]; 575 [79] Simvonis, A. 948, 951, 967 [68] Sinch, V. 795 [161] Six, H.-W. 741, 743, 746, 749-754, 756, 755 [14]; 760 [70]; 760 [71]; 760 [72]; 760 [74]; 760 [75]; 760 [76]; 760 [77]; 760 [78]; 762 [133]; 762 [134]; 763 [140]; 763 [158]; 763 [159] Six, J.M. 962, 964, 970 [142] Sjaardema, G. 318, 327 [19] Skidmore, A.K. 370, 556 [254] Skiena, S. 356, 550 [89]; 676, 680, 657 [22]; 657 [23]; 865, 574 [100] Sklansky, J. 493, 502-504, 574 [42] Skyum, S. 253, 259 [237] Slavik, R 675, 676, 682, 700 [363]; 700 [364]
1-28
Author index
Sleator, D.D. 188,196 [121]; 435, 461 [124]; 473, 480-482, 486,487 [4]; 488 [33]; 489 [65]; 903, 954 [116] Sloan, K.R. 355, 386 [255] Sloan, S.W. 214, 289 [238] Slutski,G. 437, 459 [71] Small, I.S. 393,421 [26]; 421 [27] Smid, M. 37, 44 [76]; 268,286 [131]; 259 [239]; 429, 440, 451, 452, 454, 455, 457 [10]; 457 [13]; 457 [14]; 457 [15]; 455 [35]; 458 [47]; 458 [50]; 646, 673, 677, 690 [96]; 691 [127]; 880, 881, 885, 890, 891, 894-904, 906-911, 916, 917, 919, 924-927, 929, 930 [9]; 930 [13]; 930 [14]; 930 [15]; 952 [50]; 952 [51]; 933 [71]; 955 [72]; 933 [82]; 955 [87]; 955 [88]; 934 [109]; 954 [110]; 934 [117]; 954 [118]; 954 [119]; 934 [120]; 954 [121]; 934 [122]; 954 [123]; 954 [124] Smid, M.H.M. 647, 649, 687 [21] Smith, B. 298, 557 [122] Smith, C.L. 684, 687 [27] Smith, J.L. 743, 753, 757 [1] Smith, J.M. 672, 700 [365] Smith, RW. 302, 557 [123] Smith, R.K. 299, 327 [13] Smith, T.R. 756, 763 [160] Smith, W.D. 678, 699 [331]; 962, 968 [95] Smolensky, R. 429, 459 [77] Smorodinsky, S. 101, 118 [333] Snir, M. 160, 163, 180,198 [159]; 198 [160] Snoeyink, J. 24-26, 28, 33,40, 43 [35]; 43 [55]; 44 [79]; 81, 89, 91, 92, 94, 95, 97, 770 [106]; 110 [99]; 777 [133]; 777 [136]; 772 [149]; 77, 775 [232]; 143, 144, 752 [46]; 752 [58]; 752 [60]; 219, 234, 241, 242, 247, 265, 266, 280, 283 [56]; 283 [68]; 287 [160]; 288 [191]; 345-348, 356, 371, 372, 377 [7]; 379 [52]; 381 [125]; 382 [138]; 382 [139]; 385 [213]; 386 [256]; 388 [294]; 465, 488 [15]; 497, 575 [69]; 521, 538, 548, 549, 553, 554, 555 [1]; 556 [40]; 556 [43]; 556 [47]; 557 [52]; 581, 589, 597 [26]; 609, 630 [82]; 641, 643, 659, 685, 689 [79]; 690 [93]; 649, 695 [187]; 694 [203]; 694 [204]; 715, 722 [7]; 902, 915, 920, 928, 957 [36]; 934 [110]; 1009,1026 [72] Snyder, T.L. 444, 467 [125] Soares, J. 275, 283 [57]; 451^56, 457 [9]; 458 [34]; 926, 957 [37] Soille, R 371, 387 [276] Sokal, R.R. 274, 285 [126]; 288 [188] Solemo, R 58, 89, 104, 775 [229]; 775 [230]; 775 [231] Solomon, L. 52, 777 [290] Solovay, R. 12, 45 [93] Soltan,V. 504,577[131] Sommerville, D.M.Y. 52,118 [334]
Sorkin, S. 104, 775 [234] Southard, D.A. 357, 358, 386 [257] Souvaine, D. 91, 772 [161]; 149,150 [15]; 497, 574 [37]; 686, 697 [126]; 985, 996, 1003, 1010, 7024 [11]; 7024 [12]; 7024 [13]; 7024 [33]; 7025 [50] Spagnuolo, M. 370, 380 [91] Spencer, J. 78, 79,118 [335]; 561, 569, 570, 573, 597 [14]; 594 [117] Spencer, T. 428, 459 [73] Spinrad, J. 865, 872 [41] Sprinzak, J. 125-127, 750 [11]; 755 [88] Srinivasan, A. 427, 459 [83]; 594 [119] Srinivasan, V. 304, 318, 330 [96]; 557 [124] Srinivasaraghavan, G. 866, 875 [137] Sritharan, S.S.302,557[123] Srivastav, A. 575, 594 [118] Staadt, O.G. 364, 381 [122] Stanley, R. 53, 777 [306]; 118 [336] Stanton, R. 10, 31, 45 [112]; 46 [131]; 46 [132]; 47 [147]; 47 [148] Stasko, J.T. 398, 414, 415,419, 427 [30]; 427 [31]; 427 [32]; 422 [34]; 422 [35] Steams, R.E. 271, 289 [222]; 677, 700 [348] Steel, J.M. 444, 467 [125] Steele,!. 814, 828 [85] Steiger, W, 29,46 [118]; 74, 75, 101, 103, 709 [65]; 777 [122]; 776 [257]; 777 [298]; 590, 566, 573, 592 [47]; 593 [75]; 997, 7027 [114]; 7027 [115] Steiglitz, K. 736, 760 [80] Stein, C. 679, 696 [244] Steinberg, S. 300, 329 [73] Steiner, J. 52, 55,118 [337] Steinitz,E. 962, 970 [159] Stepanov, A.A. 660, 696 [268]; 697 [269] Stephenson, M. 312, 313, 328 [33] Stewart, A.J. 618, 622, 632 [134]; 632 [135]; 652 [136] Stille, S. 963, 969 [127] Stirk,C. 962, 967 [61] Stojmenovic, I. 796 [HI]; 796 [112]; 200 [212]; 1010, 7025 [64] Stolfi, J. 52, 88, 770 [107]; 774 [207]; 150, 752 [51]; 209, 211, 216, 265, 285 [109]; 286 [136]; 293, 329 [63]; 340, 381 [123]; 434, 458 [58]; 465, 467, 469, 471, 475, 476, 488 [36]; 489 [41]; 612, 618, 619, 622, 628 [30]; 629 [69]; 629 [70]; 783, 827 [36] Stollnitz, E.J. 364, 387 [259]; 387 [260] Storb, C. 643, 692 [163] Storer, J.A. 521, 523, 557 [72]; 666, 699 [339]; 952, 955, 970 [160]
Author index Stout, Q. 195 [85]; 198 [171]; 199 [177]; 199 [178]; i99 [179]; 199 [180]; 799 [200]; 200 [213]; 787, 825, 827 [62] Stoyan, D. 756, 757 [6]; 763 [161] Strang, G. 296, 297, 331 [125] StraBer, W. 362, 383 [162] Straus, E. 29, 44 [67]; 73, 74,113 [176] Streinu, I. 645, 698 [312]; 865, 874 [113]; 874 [114]; 575 [138]; 997, 998,1027 [102]; 7027 [113]; 1027 [114]; 1027 [115] Strong, H.R. 746, 759 [41] Stuart, S. 349, 355, 378 [38] Stuetzle, W. 374, 382 [144] Sturmfels, B. 52, 53, 106, 709 [74]; 962, 970 [139] Sturtivant, C. 103, 111 [119]; 573, 597 [30] Su, P. 214, 289 [240] Subrahmanyam, K.V. 570, 575, 594 [91] Subramanian, S. 749, 763 [162] Subramanian, V. 146, 752 [50] Sudan, M. 681, 689 [72] Suffem, K.G. 612, 632 [137] Sugie, N. 230, 286 [148]; 619, 622, 630 [79] Sugihara, K. 203, 211, 214, 230, 241, 280, 286 [148]; 288 [210]; 289 [241]; 290 [242]; 290 [243]; 616, 619, 622, 624, 625, 628 [35]; 630 [78]; 630 [79]; 631 [103]; 631 [111]; 652 [138]; 632 [139]; 652 [140]; 632 [141]; 652 [142]; 652 [143]; 632 [144]; 652 [145]; 632 [146]; 1019, 1020, 7027 [116]; 7027 [117] Sugiyama, K. 954, 957, 961, 970 [135]; 970 [161]; 977 [162] Sumino, S. 34, 37, 44 [86]; 128, 752 [66] Sundaram, R. 440,441, 460 [113]; 676, 699 [332] Supowit, KJ. 274, 275, 284 [98]; 290 [244]; 449, 450, 458 [55]; 500-502, 577 [110]; 880, 903, 924, 927, 932 [58]; 934 [125]; 952, 955, 977 [163] Suri, S. 37,45 [110]; 102, 707 [12]; 142, 145, 148, 750 [5]; 150 [14]; 752 [61]; 755 [76]; 755 [87]; 181, 795 [10]; 277, 281 [6]; 348, 350, 357, 377 [1]; 377 [4]; 384 [197]; 387 [258]; 437^W0, 456 [4]; 456 [7]; 460 [106]; 460 [107]; 465, 489 [43]; 521, 523, 525-528, 530-532, 540, 542, 549-552, 555 [2]; 555 [7]; 557 [58]; 557 [67]; 557 [76]; 557 [78]; 557 [79]; 558 [80]; 558 [81]; 558 [82]; 590, 590 [1]; 643, 645-647, 649, 654, 657, 669, 672, 674, 680, 686 [4]; 686 [7]; 687 [17]; 687 [31]; 694 [205]; 694 [206]; 694 [207]; 694 [208]; 694 [209]; 698 [295]; 698 [296]; 698 [299]; 700 [366]; 842, 845, 856, 865, 869, 877 [3]; 874 [95]; 875 [126]; 875 [139]; 875 [140]; 896, 897, 900, 928, 930 [1]; 930 [5]; 952 [59] Sussman, HJ. 653, 655, 700 [367]; 700 [368] Suzuki, A. 222, 225, 290 [245]
1-29
Suzuki, I. 1011, 1019, 1020, 7027 [116]; 7027 [117]; 7027 [118] Symvonis, A. 962, 967 [62] Szekely, L. 78, 79, 778 [338] Szekeres, G. 994, 7025 [46] Szemeredi, E. 3, 10, 11, 29, 46 [118]; 47 [149]; 74, 78, 79, 101, 708 [31]; 777 [122]; 777 [298]; 778 [335]; 778 [339]; 778 [340]; 160, 795 [12]; 590, 592 [47]; 776, 826 [9]; 888, 932 [67] Svestka, R 104, 775 [240]; 655, 700 [369] Tagansky, B. 60, 66, 80, 81, 83, 86, 87, 98, 708 [57]; 709 [80]; 770 [115]; 778 [341]; 778 [342]; 256, 283 [45]; 283 [67] Tagawa, S. 957, 977 [162] Tailland, M. 345, 346, 377 [22] Taix, M. 655, 696 [250] Takagi, M. 235, 289 [223] Tal, A.Y. 393, 403, 413-415, 422 [36]; 422 [37] Talamo, M. 622, 629 [59] Talmor, D. 217, 282 [41]; 300, 304, 312, 320, 550 [87]; 550 [88] Tamaki, H. 29, 37, 47 [150]; 75, 76, 775 [235]; 778 [343]; 778 [344]; 125, 757 [20]; 437, 467 [126]; 654, 683, 686 [8]; 695 [224] Tamassia, R. 95, 777 [307]; 163, 180, 181, 799 [194]; 799 [204]; 200 [214]; 200 [215]; 375, 377 [2]; 384 [179]; 387 [261]; 436, 459 [70]; 480, 481, 487, 488 [20]; 488 [21]; 489 [38]; 489 [58]; 489 [59]; 521, 531, 555 [13]; 558 [83]; 603, 607, 608, 626, 627 [1]; 627 [8]; 630 [91]; 642, 690 [109]; 690 [110]; 693 [183]; 903, 932 [45]; 939, 944-955, 958-964, 964 [2]; 964 [3]; 964 [4]; 964 [6]; 965 [20]; 965 [21]; 965 [22]; 965 [26]; 965 [29]; 966 [44]; 966 [45]; 966 [46]; 966 [49]; 966 [50]; 966 [51]; 966 [52]; 967 [80]; 967 [81]; 968 [82]; 968 [83]; 968 [84]; 968 [85]; 968 [86]; 968 [100]; 969 [110]; 970 [134]; 977 [164]; 977 [165]; 977 [166]; 977 [167]; 977 [168]; 977 [169]; 977 [170]; 977 [171]; 977 [172]; 977 [173] Tamir, A. 20, 47 [151] Tamminen, M. 746, 747, 751, 763 [163]; 763 [164]; 763 [165]; 763 [166] Tamura, A. 56, 91, 775 [186]; 775 [187] Tan, JJ,M. 502, 504, 576 [84] Tan, T-S. 228, 247, 285 [111]; 285 [118]; 285 [119]; 290 [246]; 304, 314, 316, 328 [23]; 329 [51]; 329 [52]; 329 [53]; 557 [126]; 355, 380 [83]; 447, 450, 451, 457 [22]; 459 [59]; 459 [60] Tan, X. 684, 686, 700 [370]; 700 [371]; 700 [372] Tan, X.-H. 684, 700 [373]; 841, 875 [141]; 875 [142]; 1007, 7027 [119]; 7027 [120]; 7027 [121] Tanemura, M. 230, 290 [247]
1-30
Author index
Tanenbaum, P. 625, 629 [64] Tang, C.-K. 675, 690 [104] Tang, C.Y. 508, 516 [85] Tang, G. 653, 700 [368] Tang, J.-M. 318, 3 i i [124] Tardos, E. 589, 590, 594 [104] Tarjan, R. 162, 188, 191, 192,194 [57]; 195 [83]; 196 [121]; 200 [216]; 428, 429, 434^36, 458 [36]; 459 [70]; 459 [73]; 459 [85]; 460 [99]; ^67 [119]; 461 [124]; 465, 471, 473, 479^82, 486,487 [4]; 458 [33]; 489 [40]; 489 [63]; 489 [65]; 493,499, 575 [45]; 522, 525, 556 [41]; 636, 641, 644, 672, 673, 690 [105]; 692 [142]; (592 [161]; 692 [162]; 69i [186]; 783, 824, 826 [29]; 828 [81]; 843-845, 852, 853, 856, 872 [40]; 873 [61]; 873 [62]; 873 [69]; 875 [83]; 875 [143]; 903, 908, 910, 915, 932 [56]; 952 [69]; 933 [75]; 954 [116]; 946, 947, 951-953, 959, 967 [67]; 968 [89]; 968 [96]; 969 [123]; 970 [153]; 976, 983, 7025 [58]; 1027 [122] Taschwer, M. 228, 287 [10]; 448, 456 [6] Tassinari, E. 964, 964 [2]; 966 [45]; 966 [46] Tate, S.R. 653, 662, 695 [234]; 699 [340] Taubin, G. 356, 387 [262] Tautges,TJ.318,557[127] TeiUaud, M. 105, 777 [129]; 141, 757 [34]; 213, 214, 241, 273, 282 [42]; 282 [43]; 283 [46]; 436, 458 [51]; 715-717, 721, 722 [4]; 722 [5]; 725 [15] Tel, G. 927, 957 [30] Teller, S. 52, 777 [139] Tempfli, K. 385 [219] Teng,S. 184, 794 [48] Teng, S.-H. 103, 777 [119]; 298, 300, 304, 312, 320, 330 [87]; 330 [88]; 330 [89]; 432, 457 [26]; 573, 597 [30] Terao,H.52, 106, 777[291] TeWinlcel, L.E. 179, 794 [45] Thibault, W. 344, 384 [205] Thiemt, G. 611, 622, 657 [113]; 752, 758 [15] Thorn, R. 58, 779 [345] Thomas, J.W. 296, 557 [128] Thomassen, C. 959, 977 [174] Thompson, CD. 200 [111] Thompson, D. 335, 585 [171] Thompson, J.E 296, 300, 303, 557 [129]; 557 [130]; 332 [131] Thorup, M. 636, 707 [374] Thurston, W. 205, 290 [248]; 319, 332 [132] Tietze, H. 834, 875 [144] Tilford, J. 944, 950, 952, 955, 970 [150] Timpf, S. 341, 587 [107] Tiwari, R 882, 929, 930 [3] Toben, H. 750, 756, 762 [133]; 762 [134] Tobler, W.R. 351, 387 [263]
Toda, M. 957, 977 [162] Toida,S. 445,460 [110] Tolcarslcy, G.T. 975, 7027 [123] Tolcuyama, T. 29, 37,42 [19]; 45 [88]; 47 [150]; 56, 75, 76, 91, 708 [58]; 775 [187]; 775 [235]; 775 [236]; 778 [343]; 778 [344]; 125, 757 [20]; 181, 795 [9]; 437, 459 [86]; 467 [126] Toledo, S. 34, 38, 42 [7]; 42 [12]; 45 [92]; 46 [144]; 51, 102, 103, 707 [15]; 707 [28]; 775 [243]; 778 [331]; 133, 134, 136, 137, 750 [16]; 589, 590, 597 [15]; 597 [16] ToUis, I.G. 667, 693 [170]; 939, 940, 945-954, 959-964, 964 [3]; 964 [4]; 965 [29]; 966 [44]; 966 [51]; 966 [52]; 968 [103]; 959, 969 [110]; 970 [142]; 970 [143]; 970 [144]; 970 [145]; 970 [146]; 970 [147]; 970 [148]; 970 [149]; 977 [167]; 977 [168]; 977 [169]; 977 [170]; 977 [171]; 977 [172]; 977 [173] Tompa, M. 827 [63] Tor, S.B. 493, 501, 578 [132] Toth, G. 74, 779 [346]; 1000, 7024 [32] Toussaint, G. 142, 750 [17]; 143, 757 [41]; 200 [218]; 270, 274,282 [40]; 290 [249]; 369, 377 [24]; 493, 496, 498, 500, 501, 505, 512, 575 [9]; 574 [18]; 574 [39]; 577 [117]; 577 [122]; 577 [123]; 578 [133]; 578 [134]; 578 [135]; 522, 527, 528, 542, 557 [58]; 558 [84]; 643, 686, 688 [42]; 697 [126]; 837, 842, 844, 845, 856, 857, 865, 869, 877 [15]; 877 [17]; 877 [19]; 877 [20]; 872 [55]; 874 [95]; 874 [120]; 833, 875 [145]; 875 [146]; 875 [147]; 983, 984, 1001, 1003, 1010, 1015, 1018, 7025 [6]; 7025 [7]; 7024 [15]; 7024 [29]; 7024 [33]; 7025 [52]; 7027 [105]; 7027 [106] Townsend,G. 361, 580 [90] Trefethen, L.N. 303, 332 [133] Trevisan, L. 678, 707 [375]; 944, 977 [175] Trickey, H. 952, 955, 966 [55] Tropf, H. 743, 763 [167] Trotter, W.T 78, 79, 778 [335] Trotter, W., Jr. 78, 79, 778 [339]; 778 [340] Tryfona,N. 337, 582 [130] Tsai, V.J.D. 354, 387 [264] Tsang, J.C.E 274, 283 [60] Tsay, J.-J. 794 [38]; 794 [49]; 200 [219]; 200 [220]; 487, 489 [39] Tsay, R. 427, 467 [127] Tseng, L.H. 857, 875 [148] Tsoulcalas, M. 1019, 7026 [98] Tu, H. 37,44 [85]; 648, 649, 651, 690 [98]; 690 [99] Tufte 415, 416,422 [38] Turk, G. 378 [44]; 387 [265] Turner, C.R. 415, 422 [35] Turner, G.A. 361, 384 [178]
Author index Tutte, W.T. 952, 953, 955, 962, 977 [176]; 971 [177]; 977,1027 [124] Tygar, J. 870, 875 [124] Uhrig, C. 82,108 [39]; 124,151 [24]; 607, 611, 612, 615, 626, 630 [96] Ullman, J.D. 125,150 [10]; 609, 627 [2] Ullman,S. 131, 752 [62] Ullrich, C. 611, 622, 631 [113] Umans, C. 683, 701 [376] Upfal,E. 818, 820, 527 [54] Urrutia, J. 47 [152]; 163,196 [98]; 262, 281 [1]; 466, 489 [60]; 500, 574 [40]; 521-523, 525, 539, 557 [75]; 686, 691 [126]; 959, 969 [114]; 979, 984, 994,996-999, 1001-1003, 1005, 1006, 1010, 1016, 1018,1023 [2]; 1023 [9]; 1024 [13]; 1024 [22]; 1024 [33]; 1024 [34]; 7024 [35]; 7024 [36]; 7024 [37]; 7024 [38]; 7024 [39]; 7025 [40]; 7025 [41]; 7025 [42]; 7025 [47]; 7025 [48]; 7025 [49]; 7025 [78]; 7027 [125]; 7027 [126] Uselton, S.P. 146, 757 [43]; 355, 381 [109] Vaida, D. 337, 383 [155] Vaidya, P. 103, 779 [347]; 159, 200 [221]; 275, 281, 290 [250]; 290 [251]; 432, 453, 455, 461 [128]; 461 [129]; 648, 650, 671, 673, 691 [122]; 707 [377]; 707 [378]; 707 [379]; 707 [380]; 707 [381]; 891, 895, 926, 935 [126]; 935 [127] Vaishnavi, V.K. 740, 760 [81] Valentine, F. 835, 842, 873 [76]; 875 [149]; 876 [150] VaUant, L. 160, 799 [201]; 200 [222]; 768, 776, 816, 818, 819, 828 [78]; 828 [86]; 828 [87]; 945-948, 950, 977 [178] Vallejo, D. 104,108 [40] Valtr, P. 11, 22, 30, 41, 47 [2]; 45 [99]; 45 [106]; 47 [153]; 75, 78, 772 [162]; 779 [348] Van, M. 371, 372, 388 [294] van Bemmelen, J. 351, 387 [266] Van Dam, A. 343, 354, 380 [98] Van der Vorst, H. 298, 327 [17] van Doom, AJ. 370, 371, 383 [163]; 383 [164] van Hekken, M. 351, 387 [266] van Kreveld, M. 29, 44 [68]; 58, 82, 93, 96, 97, 99, 100, 707 [29]; 777 [131]; 777 [132]; 777 [133]; 775 [178]; 779 [349]; 141, 144, 757 [34]; 757 [35]; 196 [103]; 342, 348, 350, 352, 356, 366, 372, 377 [4]; 379 [51]; 379 [52]; 379 [53]; 379 [54]; 386 [256]; 387 [268]; 387 [269]; 387 [270]; 387 [271]; 387 [272]; 608, 628 [31]; 658, 668, 671, 691 [132]; 691 [133]; 691 [134]; 740, 764 [169] van Leeuwen, J. 483, 487, 489 [54]; 920, 934 [99]; 952, 955, 969 [113]
1-31
van Oosterom, R 341, 343, 344, 346, 351, 387 [266]; 387 [273]; 387 [274]; 387 [275]; 743, 750, 764 [168]; 764 [170] van Oostrum, R. 342, 356, 379 [53]; 387 [272] van Wyk, C. 375, 380 [100]; 497, 574 [37]; 607, 609, 610, 629 [56]; 629 [57]; 629 [58]; 844, 872 [40]; 875 [143]; 976, 983, 7027 [122] Vapnik, VN. 189, 200 [223]; 595 [120] Varadarajan, K. 103, 779 [350]; 144,153 [89]; 372, 377 [3]; 377 [5]; 382 [133]; 669, 670, 686 [6]; 707 [382] Vargiu, F. 945, 946, 952, 954, 960, 964, 964 [2]; 966 [45]; 966 [46]; 966 [48] Varshney, A. 105, 106, 779 [351]; 356, 362, 378 [44]; 380 [89]; 388 [293] Vavasis, S. 298, 330 [89]; 303, 315, 328 [48]; 308, 323, 324, 330 [91]; 330 [92]; 352 [134]; 332 [135] Vazirani, U.V 440,460 [111] Vazques-Gomez, J. 372, 377 [15] Veach, E. 37,42 [8] Vegter, G. 644, 646, 699 [323]; 699 [324]; 860, 874 [119] Velikovic, B. 570, 592 [55] Veltkamp, R.C. 374, 387 [267] Vempala, S. 440, 441, 457 [17]; 457 [27]; 457 [28]; 676, 678, 679, 688 [47]; 689 [73]; 697 [290] Vengroff, D.E. 487, 488 [20]; 489 [39] Veni Madhavan, C. 551, 555 [22]; 685, 696 [246]; 844, 856, 875 [65]; 873 [66] Vergnas, M.L. 959, 966 [56] Vincent, I. 371, 387 [276] Vishkin, U. 160-162, 185, 188, 190, 192, 794 [52]; 795 [90]; 795 [91]; 795 [92]; 799 [190]; 799 [195]; 200 [211]; 200 [216]; 544, 555 [8]; 775, 821, 825, 826 [12]; 826 [24]; 827 [61]; 828 [68] Vismara, L. 626, 627 [8]; 952, 953, 962, 964, 965 [21]; 966 [45]; 966 [53] Viswanathan, S. 988, 7027 [127] Vitter, J. 98, 707 [6]; 180, 181, 795 [11]; 799 [204]; 200 [214]; 200 [215]; 366, 367, 375, 377 [2]; 385 [222]; 467 [121]; 487, 488 [20]; 489 [39]; 489 [52]; 626, 627 [1]; 949, 950, 960, 977 [172]; 977 [173] Vo, K-R 414, 427 [16]; 957, 963, 967 [75]; 967 [76] Vocca, R 962, 968 [86] Von Herzen, B. 361, 387 [278] von Zulow, M.H. 896, 935 [130] Vorobjov, N. 52, 89, 770 [94]; 775 [189]; 775 [197] Voronoi, G.F. 203, 290 [252] Voronoi, G.M. 203, 290 [253] Vranch, J.K. 229, 284 [89] Vrecica, S. 76, 779 [352] Vuillemin, J. 607, 657 [129]
1-32
Author
Wada, K. 191,195 [75]; 195 [79]; 195 [80]; 622, 628 [28] Wagener, H. 125-127, 141,150 [4]; 150 [13]; 159, 165, 166, 168, 188,193 [36]; 199 [190]; 200 [224]; 200 [225]; 821, 828 [68] Wagner, R 350, 380 [99]; 587 [279]; 387 [280] Wagon, S. 870, 873 [84] Walldngton, N. 300, 304, 320, 330 [88] Wallrath, M. 760 [86] Wang, C.-A. 241, 247, 283 [68]; 290 [254]; 290 [255]; 348, 353, 354, 386 [248]; 551, 558 [85] Wang, G. 146, 148, 755 [84] Wang, H. 653, 655, 662, 699 [337]; 699 [338]; 699 [341]; 707 [383] Wang, J.-H. 743, 76^ [171] Ward, N. 964, 968 [100] Ware, J.M. 348, 383 [154]; 387 [281] Wamock,J.E.751, 76^[173] Wamtz, W 650, 707 [384] Warren, H.E. 58, 779 [353] Warren, J. 364, 584 [181] Warsi, Z.U.A. 296, 331 [130] Wasilkowsld, G.W 622, 630 [80] Waterfeld, W 751, 763 [148]; 764 [172] Watson, D.F. 230, 290 [256]; 321, 332 [136]; 373, 387 [282] Watson, L.T. 357, 370, 387 [283] Waupotitsch, R. 150, 757 [42]; 228, 285 [119]; 314, 329 [53]; 351, 380 [82]; 450, 451, 459 [60] Waxman, B.M. 675, 695 [223] WeatheriU, N.R 296, 304, 321, 323, 329 [68]; 550 [81]; 552 [131]; 552 [137] Webb, H. 354, 388 [284] Webber, R.E. 751, 763 [146] Weber, G. 141, 750 [7] Weber, H. 378 [44] Wee, Y.C. 180, 200 [226] Weibel, R. 348, 364, 388 [286]; 388 [287] Weide, B.W 214, 282 [36]; 928, 957 [24] Weiler, K. 88, 779 [354]; 340, 388 [285] Weingram, S.340,584[183] Weisbin, C.R. 665, 695 [226]; 699 [329] Weiser, A. 310, 327 [12]; 332 [138] Welch, W 310, 312, 332 [139] Welzl, E. 28, 35, 40, 43 [43]; 43 [59]; 45 [105]; 74, 75, 77-80, 82, 88, 92, 96, 99,108 [42]; 770 [113]; 770 [115]; 777 [121]; 772 [162]; 772 [163]; 772 [164]; 772 [165]; 774 [210]; 775 [227]; 776 [270]; 779 [355]; 125-127, 146, 750 [13]; 755 [90]; 189, 797 [148]; 256, 270, 271, 281, 287 [3]; 283 [67]; 288 [187]; 290 [257]; 430, 456 [2]; 512, 574 [38]; 566, 570, 572, 578, 585, 597 [9]; 597 [25]; 592 [49]; 593 [63]; 594 [94]; 594 [95]; 594 [101]; 644, 645, 656, 672, 686 [5];
index 687 [20]; 694 [217]; 698 [313]; 707 [385]; 705, 709-711, 715, 723 [17]; 723 [22]; 723 [23]; 743, 757 [10]; 824, 825, 827 [49]; 827 [51]; 827 [60]; 860, 874 [115]; 876 [151]; 897, 928, 930 [2]; 934 [115]; 948, 951, 9(57 [68]; 984, 991, 992, 998, 7025 [44] Wenger, R. 36, 42 [25]; 42 [26]; 42 [27]; 44 [65]; 44 [73]; 76,108 [46]; 549, 556 [29] Werman, M. 125-127, 750 [11]; 755 [88] Wemecke, J. 358, 388 [288] Wemisch, L. 594 [101]; 705, 710, 723 [23] Wesley, M.A. 833, 860, 874 [101] Westbrook, J. 436,459 [70] Wetzel, J.E. 52, 56, 708 [32]; 708 [33]; 708 [34]; 779 [356] Whale, G. 422 [39] Whang, K.-Y. 747, 767 [97] White, N. 52, 53, 106, 709 [74] Whiteley, W. 225, 282 [19]; 284 [77] Whitely, W. 962, 965 [32] Whitesides, S. 527, 528, 542, 547, 548, 556 [44]; 556 [45]; 557 [58]; 654, 686 [4]; 842, 869, 874 [95]; 952, 955, 959, 962, 964 [1]; 967 [61]; 967 [62]; 967 [63]; 1010, 7024 [33] Whitney, W. 962, 977 [179] Widmayer, R 253, 290 [258]; 648, 675, 695 [221]; 699 [334]; 707 [386]; 741, 743, 746, 749-754, 756, 757 [10]; 758 [14]; 758 [15]; 758 [16]; 758 [33]; 758 [34]; 760 [71]; 760 [72]; 760 [74]; 760 [75]; 760 [76]; 760 [77]; 760 [78]; 760 [79]; 767 [110]; 762 [114]; 762 [115]; 762 [118]; 762 [134]; 765 [140]; 763 [158]; 765 [159]; 764 [174] Wiemik, A. 16, 17, 19, 21, 47 [154]; 60, 81, 779 [357] Wigderson, A. 566, 569, 593 [77]; 595 [122] Wigderson, M. 569, 573, 593 [74] Wilber, R. 181, 792 [6] Wilfong, G. 643, 654, 655, 687 [33]; 692 [160]; 707 [387]; 707 [388] Wiilard, D.E. 103, 779 [358]; 180, 200 [226]; 428, 459 [72]; 481, 489 [46]; 489 [66]; 578, 595 [121]; 732, 764 [175]; 904, 916, 935 [128] Wiihamson, D. 679, 689 [70]; 693 [176]; 671, 707 [389] Wills, J.M. 834, 873 [68] Wilson, R.H. 78, 105, 774 [201]; 774 [215] Winter, R 672, 700 [365] Wirth,N. 603, 650 [81] Wismath, S.K. 959, 969 [111]; 977 [180] Wittchen, S.L. 308, 327 [8] Woeginger, G. 276, 277, 283 [55]; 531-533, 557 [66]; 566, 572, 593 [70]; 680, 682, 688 [57]; 692 [157]; 948, 951, 967 [68] Wolf, A. 763 [149] Wolf, G.W. 370, 388 [289]
Author index Wolfers, B. 146, 755 [90] Wolff, A. 350, 387 [279]; 387 [280] Wolfson, H. 131, 132, 133, 152 [70]; 152 [71]; 152 [72]; 153 [77]; 153 [78] Wolinsky,M. 361, 579 [73] Wong, C. 253, 287 [184]; 290 [258]; 427, 442, 458 [43]; 459 [82]; 648, 658, 696 [255]; 707 [386]; 701 [390]; 959, 969 [126] Woo, T.C. 340, 388 [290]; 844, 856, 875 [136]; 57(5 [152] Wood, D. 35, 37, 43 [59]; 46 [116]; 257, 287 [171]; 685, 695 [302]; 868, 869, 874 [108]; 574 [116]; 875 [122]; 575 [127]; 575 [128]; 876 [153]; 1007, 1026 [93] Woodroofe, R. 680, 688 [57] Worboys, M.F. 337, 339, 340, 555 [291]; 555 [292] Wormald, N. 661, 692 [146]; 952, 953, 967 [64]; 967 [65] Wrege, D.E. 444, 467 [118] Wright, W. 105, 106, 779 [351]; 575 [44] Wu, A. 130,150 [12]; 509, 575 [136]; 921, 922, 924, 930 [12] Wu, C.-T. 675, 690 [103] Wu, X. 556 [233] Wu, Y.R 253, 290 [258]; 536, 537, 555 [24]; 648, 701 [386] Wyllie, J. 775, 525 [88] Wymer, C. 756, 755 [27] Wynters, E.L. 685, 695 [297] Wyvill, B. 556 [233] Xavier, P. 652, 653, 692 [140]; 692 [141] Xia, J.C. 362, 555 [293] Xu, D. 999,1025 [47]; 7027 [101] Xu, J. 191, 192, 795 [78]; 298, 300, 332 [140]; 332 [141] Xu, X. 756, 764 [176] Xu, Y. 228, 274, 257 [10]; 255 [61]; 448, 450, 455 [38] 467 [131] Yachida, M. 833, 576 [154] Yamamoto, P. 868, 576 [153] Yamashita, M. 1011, 1019, 1020, 7027 [116]; 7027 [117]; 7027 [118] Yan,P661,655[54] Yang, B.-T. 448, 450, 467 [130]; 467 [131] Yang, CD. 650, 658, 696 [254]; 696 [255]; 707 [390] Yang, T. 680, 657 [23] Yannakakis, M. 661, 662, 675, 683, 697 [270]; 695 [319] Yao, A.C. 99, 779 [359]; 214, 271, 281, 252 [36]; 290 [259]; 429, 430, 467 [132]; 578, 595 [123]; 672, 707 [391]; 814, 525 [85]; 525 [89]; 911, 920, 925, 928, 957 [24]; 935 [129]
1-33
Yao, F. 27, 42 [31]; 92, 99, 775 [196]; 779 [359]; 274, 277, 257 [18]; 256 [149]; 304, 525 [26]; 427, 437, 438, 457 [16]; 460 [106]; 578, 595 [123]; 622, 625, 629 [66]; 673, 674, 655 [39]; 695 [299] Yap, C. 34, 43 [41]; 83, 95, 96, 98, 103, 770 [99]; 777 [123]; 774 [223]; 777 [292]; 130, 142, 750 [5]; 755 [79]; 165, 179, 792 [4]; 797 [141]; 200 [227]; 234, 241, 242, 279, 280, 257 [13]; 257 [14]; 255 [56]; 256 [132]; 255 [206]; 255 [207]; 255 [208]; 290 [260]; 290 [261]; 372, 575 [35]; 427, 460 [109]; 527, 528, 530, 540, 542, 550, 551, 555 [2]; 557 [58]; 588, 590, 592 [48]; 602, 605, 607, 608, 611, 612, 614, 615, 623, 626, 627, 625 [38]; 625 [39]; 632 [147]; 632 [148]; 632 [149]; 632 [150]; 632 [151]; 656, 655 [40]; 669, 671, 697 [114]; 697 [115]; 697 [116]; 697 [117]; 656, 694 [217]; 774, 823, 824, 525 [1]; 525 [90]; 842, 869, 574 [95] Yerry, M.A. 308, 323, 327 [8]; 332 [142]; 332 [143] Yiu,S.M. 991, 7027 [129] Yiu, S.N. 992, 7027 [128] Yoshida, A. 870, 575 [124] Yost, D. 138, 755 [80] You, Z.-Y 448, 467 [131] Young, D.R 317, 552 [144] Young, N. 439, 444, 460 [90]; 460 [91] Young, R. 296, 332 [145] Yu, S. 371, 372, 379 [52]; 555 [294] Yuen, T.-S. 743, 764 [171] Yung, M. 436, 459 [70] Yvinec, M. 80, 81, 83, 709 [80]; 214, 241, 256, 252 [43]; 255 [45]; 345, 346, 366-368, 377 [22]; 379 [69]; 608, 613, 627 [5]; 627 [16]; 627 [18]; 654, 659 [77] Zajicek, O. 180, 795 [93] Zaks, J. 979, 1001, 1003, 1005, 1016, 1018, 7025 [9]; 7024 [36]; 7024 [37]; 7024 [38]; 7024 [39]; 7025 [41]; 7027 [126] Zang, I. 657, 693 [190] Zarge, J.A. 556 [249] Zaroliagis, C D . 451, 457 [10]; 647, 649, 657 [21] Zaslavsky, T. 52, 56, 779 [360]; 779 [361] Zedem, Z. 355, 557 [109] Zelikovsky, A. 675, 655 [59] Zelikovsky, A.A. 440, 441, 467 [133] Zelikovsky, A.Z. 674, 707 [392]; 707 [393] Zepf, D. 214, 256 [154] Zhang, L. 437, 457 [20] Zheng, S.-Q. 504, 505, 575 [49]; 575 [50]; 575 [51]; 575 [52]; 575 [53] Zhu, B. 210, 290 [262]; 369, 377 [24]; 555 [295]; 1015, 7024 [15] Zhu, C 346, 377 [7]
1-34
Author index
Ziegler, G.M. 52, 53, 60, 64, 106, 709 [74]; 109 [75]; 117 [314]; 119 [362] Zieniewicz, O.C. 322, 330 [101] Zikatanov, L. 300, 332 [141] Zimmeraiann, C. 754, 760 [79] Ziv, A. 896, 932 [62]
Zobrist, A.L. 446, 460 [101] Zoraster, S. 349, 388 [296] Zubair, M. 445,460 [110] Zuckerman, D. 595 [122] Zivaljevic, R. 76,119 [352]
Subject Index Q?-shape, 272
absolute error, 603 abstract furthest-site Voronoi diagram, 263 abstract Voronoi diagram, 244, 261 Ackermann's function, 11 adaptive evaluation, 610, 611 additive complexity, 256 additive weight, 235, 242, 257, 261 Voronoi diagram, 669 aesthetics, 942 affine arithmetic, 612 affine transformations, 124, 125 air-lift metric, 256 algebraic framework, 669 computation tree model, 882 decision tree model, 429 distance functions, 435 algebraically independent, 54 alignment and geometric hashing, 131 all-nearest-neighbors, 190, 267, 643, 673 problem, 880 angle-restricted tour, 682 angular bisector, 242 plane sweep, 849 resolution, 942 bounds on the, 948 -metric TSP, 681 AnimA, 397 animating proofs, 406 Apollonius model, 235, 261 approximate, 654 compaction, 788 decision algorithms, 127 independence, 568, 570 link diameter, 526 matching, 136 point pattern matching, 126 RSGs, 357 shortest path map, 669 terrain model, 356 TIN, 357
approximation, 647 algorithms, 439, 637, 646, 649, 653, 668, 673, 674 aquarium keeper's problem, 686, 1010 arbitrary precision, 124 integer, 607 area bounds, 943 minimization problems, 181 optimization problems, 681 areal features, 370 arithmetic expression, 602 arrangement, 20, 644, 659 of cones, 260 ofsegments, 587, 589 of lines and hyperplanes, 189 array-of-trees, 188 art gallery, 975 problems, 554 theorem, 978 aspect graph, 99 aspect ratio, 299, 942 assembly planning, 104 assignment, 866 asteroid avoidance problem, 659 axiomatic approach, 620 B(p,q), 204 backward analysis, 214 BALSA, 395 BANG file, 748 bank robber problem, 679 bend, 940 bichromatic closest pair, 431, 433-435, 455 problem, 672 bichromatic nearest neighbor, 430, 438 bicriteria, 656 shortest path problems, 549 biggest stick, 103 bilinear functions, 530, 551 binary floating-point computation, 603 binary space partitioning, 344
1-35
1-36 bisecting curve, 260 bisector, 205, 219, 229, 248, 255 curve, 257, 638 bit interleaving, 743 blocking vertex, 866 Boruvka's algorithm, 429 bottleneck matching, 127 bottleneck shortest path, 433,444 bottleneck TSP, 680 bottom-up sampling, 712 bottom-vertex, 582 triangulation, 84 bounded curvature paths, 554 valence, 708 Voronoi diagram, 246 -degree maximum spanning tree, 440 bounding box, 750 box, 667 boxes, 671 braided lines, 604 Brent's lemma, 779 Brent's theorem, 161 butterfly network, 817 bv-triangulation, 808 C-oriented, 648, 649 paths, 548 c-approximation algorithm, 637 canonical triangulation, 582 carpenter's ruler, 548 cartogram, 351 cascading, 168, 169, 176, 180, 182, 183 merge, 177, 178 sort, 169 cell, 66, 76, 95, 97 complex, 229, 339, 349 center of gravity, 137 center point, 103 central diagonal, 547 central link segment, 552 centroid, 237 decomposition, 902 true, 190 certified epsilons, 613 CGAL, 626 chain simplification, 143 Chebyshev metric, 142 Chemoff bounds, 771, 772 circular visibility, 870 circumcircle, 211, 221 class Steiner problem, 675 clean history, 721 clear visibility, 867
Subject index clipping, 751 clique ordering, 864 closed polygonal curve, 831 closest pair, 268 problem, 879 clustering, 275,427, 437, 453 problem, 880, 906 coarseness, 227 collision-free motion, 279 color encode directions, 417 time, 417 color used to match related elements, 417 comb polygon, 978 combination lemma, 25 combinatorial complexity, 20, 53, 59 rank, 440 structure, 253 combined metric, 671 combined objective, 657 competitive ratio, 553, 661, 675 complete geometric graph, 427, 428, 430, 440, 450, 452, 453 complete visibility polygon, 835 complete-linkage distance, 278 completely visible, 835, 845 composite metric, 258 computational complexity bounds on the, 951 computing visibility graphs, 860 concave, 370 cone, 248 configuration space, 31,51, 578, 655, 706 conflict, 705 change, 714 list, 564,713 size, 791 conflicting triangle, 213 conformal mapping, 301 conforming Delaunay triangulation, 247 conforming subdivision, 645 congruent, 124 computing the Hausdorff distance, 133 consecutive vertex guards, 992 constrained Delaunay triangulation, 246, 275 constrained spanning tree, 439 constraint, 962 satisfaction, 962 construction cind conversion between terrain models, 354 constructive geometric problem, 601
Subject continuous Dijkstra algorithm, 650 method, 645, 667 technique, 251 contour maps, 352 convex, 370,493, 831,834 components, 496, 497 covering of polygons, 1020 distance function, 251, 254, 258, 266, 434, 449 drawing, 941 huU, 164,165,206, 233,237,436,437,441,445, 451, 586, 588, 601, 622 3-dimensional, 189, 190, 192 J-dimensional representation of, 482 dynamic maitenance (2-d), 483 layers problem, 164 partition, 222, 447 of polygons, 1021 polygon, 245, 261 polytopes, 483 subdivision hierarchies for static data structure, 483 J-dimensional representation of, 482 dynamic maitenance (3-d), 483 set, 980 subpolygons, 500 cooperative guards, 1016 correctness, 599, 616, 617 corridor, 644 counter walk, 1013 cover, 496 covering eccentricity, 552 covering radii, 528 covering radius, 552, 841 CRCW (Concurrent Read Concurrent Write), 158 CREW (Concurrent Read Exclusive Write), 158 CREW PRAM, 187,539 critical curvature, 655 crossing, 940 number, 576 CSG evaluation, 189 curvature, 653 curvature-constrained shortest paths, 653 curve compression, 521 cutting, 88, 581 and seminet, 583, 585 CW-complex, 340 cylindrical algebraic decomposition, 85 5-relative ^-approximation, 575 Dip, q), 205 DS(n, 2)-cycle, 9 DT(S, L), 246 DT(5), 208
index
1-37
J-dimensional convex hull, 189 J-dimensional linear programming, 189 J-neighborhood polygon, 528 data normalization, 622 data structure, 725 Davenport-Schinzel sequence, 3, 219 DCEL, 209 decomposable search problems, 434 decomposition, 84 defining, 579 degeneracy, 616, 623 degraded grid, 886 degree, 705 of polynomial expression, 602, 607 Delaunay diagram, 622, 672 edges, 208 neighbor, 228 tessellation, 203, 207, 208, 229 tetrahedralization, 373, 374 tree, 213, 717 triangulation, 37, 203, 221, 225, 268, 300, 303, 320, 353, 428, 429, 434, 436, 447, 449452,470, 894 depth of an expression, 602 derandomization, 189, 561 derefinement, 311 Descartes, 203 descent structure, 712 diagonal guarding, 1021 diameter, 102, 427, 438, 442, 443, 587, 588 circle, 429 diamond property, 449^51, 454 digital terrain model, 351 Dijkstra's algorithm, 644 dilation, 274, 427, 444, 448, 450, 451, 453, 455 dimension of configuration space, 579 directed graphs, 956 direction-dependent, 658 directional relations, 338 Dirichlet tessellation, 203 discrepancy, 573 discrete group, 250 discretization, 653 discretizing, 651 disk accesses, 730 distance functions, 139 distance selection, 102 divide and conquer, 176, 883 algorithm, 215, 253 approach, 262 technique, 260 domain decomposition, 298
1-38
Subject index
domains of action, 203 dominance counting 2-set, 180 dominance drawing, 941 doubly connected edge list, 209 drainage network, 371 dual graph, 208, 531,838 dual transform, 801 dual tree, 838 duaUty, 52, 234, 644 transformation, 850 dynamic, 642 z-hashing, 742 algorithms, 717 graph algorithm, 434 graph drawing, 961 history, 720 minimum spanning tree, 434 point location, 480 inter-laced trees technique for, 481 programming, 439, 441, 442, 447, 448,451 sampHng, 719 shuffling, 721 trees, 903 Voronoi diagrams, 80, 129 ^-approximation, 189, 572, 585, 710 computation, 573, 576 size, 572 e-closeness problem, 210, 268 ^-cutting, 582 e-net, 189, 571, 710 computation, 573 size, 571, 573 £-seminet, 580 eave, 540 edge, 229 flip, 211, 225 flipping, 305 guards, 983 insertion, 314,451 sequence, 666, 668 visibihty graph, 840 element distinctness, 429, 445, 452 eUipse, 253 embedded planar graphs, 466 empty circle property, 247 enhanced visibihty graph, 863 epsilon geometry, 618 epsilon-tweaking, 605, 615 equiangularity, 226 EREWPRAM, 158, 180, 181, 187, 191, 539 errand scheduling problem, 682 essential cuts, 664, 684
estimation lemma, 782 EucUdean distance, 204 EucUdean transformations, 124 Euler formula, 207 path, 162 tour, 161,162,439 technique, 160, 161 event, 218 queue, 219 evolutionary models, 360, 361 exact geometric computation, 606 exact point pattern matching, 124 EXCELL, 746 expanded doubles, 611 expander, 568, 569 expanding circle, 205, 221 expanding waves, 244 expected size, 229 explore, 664 expressive power, 360 extendible hashing, 746 external storage, 725 external watchman route, 1007 external-memory techniques for large input data, 487 externally visible, 856 face, 243 facet, 229 fair split, 439 tree, 432, 433 farthest neighbor forest, 438 point Delaunay triangulation, 437 point Voronoi diagram, 438 -visible neighbors, 187 fat objects, 754 father, 213 fatness, 227,651,670 finger search tree, 853 finite difference method, 296 element method, 226, 297 precision arithmetic, 538 volume method, 297 Voronoi diagram, 206 fixed orientation, 648 distances, 646 fixed-radius near neighbors problem, 880 Flashsort, 819 flat, 370 flip, 230 floating-point arithmetic, 603
Subject index computation, 603 filter, 610 floodlight, 981 illumination problem of the plane, 997 fluorescent lights, 983 forbidden region, 447 force-directed approach, 953 fortress problem, 990 Fortune's sweepline algorithm for planar Voronoi diagrams, 410 four color theorem, 1015 Frechet-distance, 139 fractal, 450 fractional cascading, 172, 175, 180, 899, 906, 917 fractional independent set, 783, 785 fractional linear transform, 540 free configuration space, 31 free space, 638 fuel-consuming problem, 659 fiiUy dynamic, 435 fiilly polynomial approximation scheme, 668 fimdamental domain, 250 funnel, 641 sequence, 861 sh^)ed polygons, 865 furthest neighbor, 643, 648, 674 site, 270 -site Voronoi diagram, 234, 235, 273 -point Delaunay diagram, 674 Gabriel graph, 273, 450 gap property, 454 GASP, 403 general graphs, 947, 953 general position, 54 general walk, 1013 generalized street, 664 generahzed TSP, 679 generic algorithm, 589 geodesic center, 639 center/diameter, 647 diameter, 639, 643, 648 distance, 275, 637 Voronoi diagram, 247, 280, 639, 643, 647, 667 geographical information systems (GIS), 335, 635 GeoLab, 398 geometric algorithms, 599 hbraries, 625 computation, 597 with imprecision, 615 graph, 74
hashing, 132 hierarchies, 187 matching, 103 network design, 427, 452 partition, 189, 576, 578 permutation, 36 predicates, 602 primitives, 602 problem, 601, 616 sampling, 189 transformation, 220 traveling salesman, 1006 visualization, 391, 406 GeomLib, 626 Geomview, 402 gerrymander problem, 222 golden ratio, 449 good flip, 226 good polygon property, 449, 451 graph drawing, 937 service, 939 great circle, 248 greedy algorithm, 454, 455, 926 convex partition, 446 path, 541 triangulation, 228, 275, 446, 450, 451 grid drawing, 940 grid file, 746 grid squares, 508 gridded elevation models, 352 group Steiner tree problem, 675 group TSP, 682 guard, 976 allocation problem, 369 file, 754 set, 840 guillotine subdivision, 441, 442, 678 hB-tree, 745 ham-sandwich cut, 103, 572 Hamiltonian cycle, 271 Hausdorff distance, 37, 123, 133, 278 Voronoi diagram, 262 heuristic epsilons, 605 hidden set, 841, 993 surface removal (HSR), 364 variable method, 618 surface elimination, 189, 190 hierarchical clusterings, 277 hierarchical grid files, 747
1-39
1-40 hierarchical models, 368 high probabiUty bounds, 770 high-dimensional spanners, 455 higher-order Voronoi diagrams, 235 Hilbert's curve, 743 histogram, 247, 543 partition, 542 partitioning, 543 history, 716 dag, 24 holonomic constraints, 652 homogeneous coordinates, 608 homothetic triangles, 1002 homotheties, 124, 125 homotopy, 548 class, 554 type, 643 horizon, 365, 368 horizontal decompositions, 838 hunter's problem, 1011 hv-drawing, 941 HyperTriangulation, 363 IEEE standard 754, 603 illuminates, 976 illuminating free space, 1003 illuminating line segments, 1004 illumination edges, 532 illumination in higher dimensions, 1022 implementation of geometric algorithms, 599 in-front/behind relation, 228 inaccurate data, 624 incidence graph, 89 incidence problem, 78 incidences, 76 incremental algorithm, 213 data structure, 434 insertion, 211,229 search, 214 induced set system, 571 infinite triangle, 211 inflection edge, 540 information visualization, 939 insertion methods, 677 integral polynomial expression, 602 interactive drawing system, 961 interesting event, 395 intersection detection, 180 graph, 538 of balls, 587 of halfplanes, 211,224 of hne segments, 189
Subject index of planar Une segments, 189,190 interval allocation, 788 interval arithmetic, 612 invisible pair, 866 isolation property, 454 isothetic, 648 polygon, 533 rectangles, 1002 Java, 393 Johnson-Mehl model, 242, 257 Jordan arc, 20 k closest pairs, 268 it-center, 276 /:-centroid, 276 A;-clustering, 276 A:-floodUght illumination problem, 998 /:-guarding, 1018 it-level, 71 ^it-level, 71,96 ^-minimum spanning tree, 440, 676 A:-searcher, 1011 it-set, 29, 72 ^it-set, 72 k-TSP, 679 ^-visibility problem, 552 it-visible, 552 A:-wise independent distribution, 568, 569, 575 it-d-B-tree, 744 Karlsruhe metric, 258 kernel, 834, 857, 1020 kinetic geometry, 437 kinodynamic motion planning, 652 kissing number, 439 Li-metric, 247, 256, 648 Loo-metric, 244, 256 Ly-visibility, 994 Ly-convex, 994 L^-metric, 252, 648, 657, 672 largest empty circle, 269 largest empty rectangle, 181 largest-area empty rectangle, 187 lawnmowing problem, 683 layered drawing, 941 layered network, 818 layering approach, 956 layering problems, 163 layers of maxima problem, 164, 181 lazy guard, 1013 lazy history, 720 lazy randomized incremental construction, 716
Subject LEA, 611 leapfrog property, 455 LEDA, 124, 611 level, 28, 71, 96 curve, 83 -k cells, 235 lexicographic optimization, 650 lifting map, 233 lifting mapping, 221 light edge, 448 limiting randomness, 570 line arrangements, 469 line segment, 261 arrangement, 832 intersection, 601 line sweep algorithm, 217 line Voronoi diagram, 239 line-of-sight communication, 369 lineal features, 370 linear hashing, 741 linear programming, 192, 566, 587, 589 problem, 222 linear separability, 549 linearization, 63, 577, 578 link, 685 center, 527, 547, 841 diameter, 526, 841 problem, 546 distance, 521, 649, 657, 841 queries, 530 query problem, 523 eccentricity, 841 radius, 527, 841 sequence, 541 visibility, 869 linkage, 547 Hst ranking, 160, 162 load balancing, 779 local feature size, 308 local robustness, 618 locally Delaunay, 225, 230 equiangular, 226 minimal triangulation, 448 short, 228 locus approach, 264, 265 LOD (level-of-detail), 358 longest increasing chains, 181 lower convex hull, 220 lower envelope, 4, 58, 93, 189, 190, 242, 260, 263, 589 sequence, 5 lowest common ancestor, 162 LP-type problems, 897 LR-visibility polygons, 857
index
1-41
lune, 428, 447 MST(5), 270 m-star-shaped, 258 m-straight path, 258 machine epsilon, 603 Manhattan distance, 252 Manhattan metric, 648 map conflation, 350 data, 335, 336 generalization, 347 labeling, 349 overlay, 343 Markov inequality, 771 matching, 671, 977 of curves and areas, 133 of line segment patterns, 133 parenthesis algorithm, 544 matrix searching, 181, 643 MAX TSP, 679 maxima 3-dimensional, 180 problem, 176 maximal outerplanar graph, 864 maximization diagram, 5, 60 maximizing visibility, 1019 maximum concealment path, 658 non-crossing traveling salesman problem, 440 planar spanning tree, 439 scatter TSP, 680 spanning tree, 427, 437, 438, 673 traveling salesman problem, 440 MAXSNP-hard, 675 mazes, 662 medial axis, 203, 239, 241, 244, 245, 318 merging, 160 mesh, 294, 318 advancing front, 322 Cartesian, 317 hexahedral, 318 improvement, 312, 324 Laplacian smoothing, 312 multiblock, 316 octree, 323 quadtree, 308 refinement, 309, 324 structured, 294, 300 tetrahedral, 319 unstructured, 294 generation, 427 method of conditional probabilities, 566 method of pessimistic estimators, 567
1-42
Subject index
metric relations, 337 milling problem, 683 min-Unk s-t path, 649 min max angle triangulation, 450, 451 min max weight triangulation, 447, 450, 451 minidisk, 270 minimal invisible pairs, 866 minimal nested polygon, 550 minimization diagram, 5, 59, 93 minimizes visibility, 1019 minimum angle, 226 area routing, 427 diameter spanning tree, 427, 442 dilation planar graph, 451 dilation spanning trees, 444 dilation triangulation, 451 edge length, 498 latency problem, 681 length matching, 271 link length watchman tour, 554 Unk path, 521 problem, 523 nested polygon, 551 skew spanning trees, 427 spanning tree, 270,427^32,434^36,438^140, 443,444, 450, 451, 453, 455, 672 approximation, 432 Steiner spanning trees, 674 weight stars, 445 weight triangulation, 228, 274, 275, 445, 447, 448,450,451,671 hnk subdivision problem, 548 time paths, 652 width annulus, 103 Minkowski sum, 33, 83 mobile guarding, 1021 mobile guards, 983, 988 model of computation, 124 model-based recognition, 131 modeUng and computational issues in GIS, 335 modular arithmetic, 609 molecular docking, 131 monotone components, 499 matrices, 181 polygons, 993 subpolygons, 499 morphing, 146 Morse decomposition, 67 motion planning, 31, 104 Movie and Stills, 399 multi-triangulation, 363 multidimensional linear hashing, 742
multigrid methods, 298 multilayer technique, 753 multilocation, 175 multiple criteria, 656 precision integer, 607 range-counting problem, 179 representations, 341 multiplicative weights, 235, 261 multiresolution modeling, 341 multiresolution terrain models, 358 multisearching, 821 MX-CIF quad tree, 753 navigation strategy, 660 NC, 159, 163 nearest neighbor, 180, 435, 880 forest, 456 nearest-visible neighbors, 187 nearly parallel, 455 nested polygon problems, 550 network optimization, 671 nice metric, 257, 261 non-holonomic motion planning, 652 norm, 251 Not Knot, 406 NP-complete, 443 NP-hard, 439,440, 445 number of bounds bound on the, 949 O-visibility, 868 objects, 123 obstacle, 246, 280, 638 octree, 373 on-line, 675 algorithms, 659, 716 one-of-a-set Steiner problem, 675 TSP, 682 one-to-one matching, 126 operations on polygonal objects, 622 optimal clusterings, 275 control theory, 653 floodlight illumination of stages, 997 path, 635, 637 sweepline algorithm for general line-segment intersections, 407 optimization properties, 225 orbit, 250
Subject order relations, 338 order-A: power diagram, 235 order-A: Voronoi diagram, 235, 237, 238, 260, 265, 277 ordered cycle, 865 oriented matroids, 52 orienteering problem, 679 orthoconvex problem, 993 orthogonal, 976 drawing, 940, 960 floodlights, 984 partition trees, 130 polygon, 502, 533, 867, 984 polygons with holes, 986 range searching, 452 orthogonally convex, 508, 510-512 orthohedral, 666 outHers, 131 output-sensitive, 644, 666, 860 algorithms, 189 PRAM algorithms, 192 outside in, 406 outward convex, 854 overlay of minimization diagrams, 65 TT-floodlights, 999 TT-vertex floodlights, 999 PDkiS), 235 P-complete, 159, 163, 164 padded-sorting, 787 paraboloid, 220 parallel algorithm, 241, 642, 649, 1010 derandomization, 568, 575, 578, 589 bounded degree decision tree, 812 comparison tree, 787 divide and conquer, 164 merge sort, 191 prefix, 160, 775 quicksort, 776 random access machine, 539 reducible, 773 parallehzation, 280 parameter space, 750 parameterizations, 139 parametric search, 136, 140, 588, 589 parametric searching, 101 Pareto optimal, 656 parsimonious algorithm, 616 partial matching, 123 partition, 496 into convex polygons, 445 passes, 370 pafli, 637 planning, 350
index
1-43
preserving graph, 648 problems, 372 path-preserving graph, 651 pathnet, 651,670 pathwise connected, 262, 264 pattern recognition, 493 peaks, 370 percentile-based Hausdorff distance, 130 perfect matchings, 977 perimeter minimization, 181 periscope visibility, 995 perturbation, 606, 618 piecewise-linear approximation, 280 pits, 370 planar digraphs, 946 drawing, 940 graph, 427, 436, 444, 446, 448, 450,451, 945, 959 linkages, 547 point location, 179, 434 problem "slab" method solution for, 471 chain method solution for, 474 chain method with fractional cascading, 475 trapezoid method solution for, 473 straight line graph, 240, 466 doubly-connected edge list representation of, 467 quad-edge representation of, 469 winged-edge representation of, 468 straight-line graph, 445, 446 subdivision, 843 visibility graphs, 865 planarization approach, 957 plane illumination problem, 996 plane sweep, 219, 843, 884 algorithm, 241, 247 triangulation, 860 pocket machining, 241 point features, 370 floodhghts, 983, 1000 guards, 982 location, 265, 639, 647 pattern, 123 matching, 124 with respect to Hausdorff-distance, 128 visibihty graph, 840, 865 visibihty polygon, 855, 857 polarity, 233, 237 polling, 796 lemma, 797
1-44
Subject
polygon interpolation, 148 polygon placement, 102 polygon with holes, 531, 831, 985 polygonal chain, 215 polygonal cutting theorem, 534 polygonal domain, 638, 643 polyhedral domain, 665 polyhedral surface, 666 polyhedral terrain, 145, 352, 1015 polyhne drawing, 940 polynomial expression, 602 polynomial time approximation scheme (PTAS), 637, 678 polytope, 666, 668 post office problem, 264, 265, 880 power and ground networks, 427 cell, 231 diagram, 231, 233, 260, 261, 273, 277 function, 231 hyperplane, 231 PRAM (Parallel Random Access Machine), 157, 539, 767 precision, 599 problem, 601 precision-sensitivity, 669 Prison problem, 993 Prison yard problem, 990, 992 prize-coUecting salesperson, 679 probabihstic learning paradigm, 655 probabiUstic roadmap, 104 progressive meshes, 362 properties of geographic data, 335 protected, 1016 proximity, 725 drawing, 941,959 prune-and-search, 191 pseudo-random generator, 561 Puiseux series, 54 Qk(S),231 quad edge, 209 data structure, 216 quad-CIF tree, 753 quadrilaterals, 500, 505 quadtree, 344, 442, 360, 653, 917 quasi-robust algorithm, 616 quaternary triangulation, 360 query processing, 725 quota-driven salesperson, 679 quotient space, 250 R-file, 754 R-tree, 345, 752
index R+-tree, 752 radii graph, 271 random mate, 783 point sets, 453 sample higher moments, 563 pointwise bound, 563 sampling, 189,711,888 higher moments, 566 update sequence, 718 randomization, 212 randomized algebraic decision tree model, 445, 452 algorithm, 672, 678 divide-and-conquer, 562, 566, 705, 797 incremental algorithm, 242, 245, 435, 713 incremental construction, 260, 262, 564, 566, 890 incremental insertion, 241 strategies, 661 symmetry breaking, 783 range minima, 162 searching, 98 space, 571,709, 572 tree, 909, 919 raster model, 339 rational expression, 603 ray shooting, 38, 365, 471 reachability problem, 548 realizable sign sequences, 58 reciprocal figure, 225 recognition of Voronoi diagrams, 222 recognizing visibility graphs, 864, 865 recognizing visibility polygons, 855 rectangle, 502-504, 507, 508 cover, 1021 rectangular art gallery, 979 rectangular visibility, 869 rectanguloid polygon, 533 rectiUnear, 648, 650, 663, 675 L\ and Loo metrics, 431 data structures k-D, 484 quad trees, 484 range trees, 485 segment trees, 485 Delaunay triangulation, 449 hnk distance, 649, 658, 664 hnk radius, 547 metric, 435, 449 polygon, 533
Subject shortest paths, 181 reference point, 136, 141 refinement methods, 357 reflections, 125 reflex, 831 regions, 579 regular polygon, 444 regular square grid (RSG), 352 regular triangulation, 234 relative convex hull, 532 relative error, 603 relative neighborhood graph, 274, 429, 447, 450 representation and model approach, 616 resemblance, 123 restricted star-shaped polygons, 1021 retraction approach, 279 ridges, 370 Riemann mapping theorem, 301 Riemannian manifold, 251 rigid motions, 124 ring heuristic, 445 roadmap, 89, 104 robber route, 1009 problem, 685 robot, 655 motion planning, 427 navigation, 279 robust algorithms, 192 robustness, 599, 615, 617 rootish divide and conquer, 165, 166, 185 rotating caliper algorithm, 438 rotational motions, 280 rotations, 721 roughness, 227 rounding geometric objects, 625 rounding mode, 603 row minima, 181, 192 row maxima, 187 5(G), 242 safari route, 1009 problem, 685 sailor's problem, 658 sampling from £-approximation, 581 scaling, 125 search version, 662 searching and updating data structures fractional cascading transformation technique, 486 fully (or partially) persistent structure maintenance, 486 static data structures to dynamic conversion techniques, 486 searchlight problem, 1019
index
1-45
searchlight scheduling, 1019 segment arrangements, 587, 589 center, 102 intersection, 179 tree, 909 selection, 191, 778 selective geometric problem, 601 selective refinement, 358, 363 semantic zooming, 416 semi-Pfaffian sets, 52 semialgebraic set, 53 seminet and cutting, 585, 583 semisorting, 780, 781 sensitive £-approximation, 575 separable invisible pairs, 866 separating family, 549 separation bound, 613 set partition, 548 shallow e-cutting, 585 shape, 123 interpolation, 123, 146 simplification and approximation, 142 shatter function, 571 shattered, 710 shortest A:-Hnk path, 550 shortest geodesic path, 372 shortest path, 134, 190, 248, 251, 444 in graphs, 636 map, 639 map, SPM(5), 638 metric, 637 problem, 635 tree, 853 SPT(5, P), 638 shortest-path edge sequence, 34 sign of determinant, 612 similarities, 124 simple polygon, 638, 639 simplicial complexes, 339 simplification, 123 line, 347 methods, 358 single-linkage distance, 277 single-source multiple-destination minimum link path problem, 523 single-source query, 638 single-source shortest path tree, 444 site, 205 skeleton, 239 y6-skeleton, 273, 450 1-skeleton, 89
1-46 skewer tree, 900, 909 skip Ust, 919, 925 slab method, 265 slow-down lemma, 769 smallest, 648 enclosing circle, 269 Snell's law of refraction, 650 solvent accessible model, 51 sorting, 160 out sorting, 393 space-filling curves, 743 spanner, 432,451-453,455, 647, 881, 895,924 spanning trees, 672 sparse subgraph, 428 spatial data, 725 spatial join, 343 spatial queries, 342,725 spike, 219 spiral components, 498 spiral polygon, 494,502, 864 splitter directed routing, 819 spring embedder, 954 squares, 509, 510 stabbing region, 35 stability, 615 stage illumination problem, 995 staircase monotone matrices, 187 staircase polygons, 865 staircase visibility, 867 star topology, 439 star unfolding, 667,668 star-sh^)ed, 252,493,512, 638, 834, 857 components, 498 polygons, 663, 1020 subpolygons, 501 star-skeleton, 149 static-to-dynamic transformation, 434 Steiner min-max spanning trees, 427 minimal tree, 455 points, 427,497,674 spanning tree, 674 tree, 427,440,441 triangulation, 427 point, 138 stepfather, 213 stochastic properties, 280 stoppers, 579, 705 straight skeleton, 242 straight walk, 1013 straight-line drawing, 940 stratified decomposition tree, 190 street, 663 polygons, 554
Subject index strictly convex, 252 strong visibiUty, 1018 structural change, 714 sublogarithmic algorithms, 810 subsystem oracle, 573 supporting line segment, 550 surface patch, 54 sweep, 644 approach, 263 line, 217, 259 approach, 266 symbolic perturbation, 623 synunetric difference, 141 synunetry breaking, 783 ©graph, 925 Tifc-guard, 554,995 /-banyan, 678 r-spanner, 274, 646,678 tactile robot, 660 tangent visibility graph, 860 Tango, 398 telescoping manipulators, 521 tentative prune and search, 266 terrain data, 335, 351 generalization, 356, 370 modelling, 226 surfaces, 668 tetrahedral tesselation, 231 tetrahedralizations, 373 tetrahedron, 229 shape of space, 406 Thiessen polygons, 203 three-dimensional drawings, % 2 three-dimensional GIS, 373 three-floodlight iUumination problem, 998 tight floodUght wedge illumination proUem, 997 TIN, 357, 371 tolerance-based approach, 620 top-down sampling, 710 topographic features, 370 topological complexity, 67 data structures, 340 relations, 337 sorting, 179 sweep, 91 topology-oriented approach, 619 torus, 250 total turn, 657, 659 totally monotone, 181 trade-off between area and aspect-ratio, 950
Subject index traditional art gallery, 978 trajectory, 652 transformations, 123 translations, 123, 125 transversal, 35, 100 trapezoid, 499 trapezoidal decomposition, 179, 345 trapezoidation, 837 trapezoided polygon, 533 trapezoidization, 838, 842 traveling salesman problem, 427,439, 444, 454 traveling salesman tour, 271 traveling salesperson problem, 676 treasures in art galleries, 1014 tree contraction, 160 tree cover problem, 675 tree-like models, 360 trees, 943 triangle inequality, 251 triangulated irregular networks (TINs), 352 triangulation, 30, 163, 190, 207, 226, 582, 638, 837, 842, 976 conforming Delaunay, 304 constrained Delaunay, 300, 306 Delaunay, 303, 320 minimum weight, 315 minmax angle, 314 nonobtuse, 315 optimal, 314 graph, 988 triangle guarding, 1021 trigger, 579, 705 TSP, 655 with neighborhoods, 682 tube minima, 184 turning function, 140 two-floodUght illumination problem, 997 two-guard problem, 1013 two-point query, 639, 641, 646, 648, 651, 668, two-set dominance counting, 178,179 two-variable linear programming, 191 two-way divide and conquer, 164, 166 Ulam's problem, 656 unfolded cone, 248 unfolding a cone, 249 uniform grid, 344 union of geometric objects, 81 union of Jordan regions, 39 union of objects, 97 unit circle, 251 unit distances, 79 unknown environments, 553 upper envelope, 5, 59, 233, 237, 366
1-47
upward drawing, 940 y(5), 205 V{S, L), 246 VR(p, 5), 205 valleys, 370 Van der Waals model, 51, 105 Vapnik-Chervonenkis dimension, 571 variance, 276, 277 VC dimension, 709, 710, 571 vector model, 338 Veronese map, 578 vertex, 229 degree, 455 floodhghts, 983 guards, 982 visibility graph, 839 vertex-edge visibiUty graph, 840, 865 vertical decomposition, 23, 85, 578 viewpoint placement problems, 369 viewshed, 365 visibihty, 165,180, 190, 364, 831 complex, 646 drawing, 941 graph, 190, 369, 638, 639, 644, 658, 839, 860, 865 layers, 163 paths, 369 polygon, 835, 844, 845, 849, 850 query, 852 problem, 165 representation, 959 with reflection, 870 visibihty-related problems, 368 visible, 831, 976 vision points, 1010 vision-based robot, 660 visual organization features, 963 visually dominating, 840 visually independent set, 841 VLSI, 427 Voronoi diagram, 30, 37, 79, 189, 190, 192, 203, 205, 434,470, 622, 883, 896 abstract, 244, 261 abstract fiirdiest-site, 263 additive weight, 669 bounded, 246 for spheres, 235 ofUnes, 279 edge, 205 region, 205
1-48 surface, 37, 128 vertex, 205 VRML, 393 watched guards, 1017 watchman route, 554, 841, 1006 (path) problem, 684 wavefront, 218, 242, 645 wavelets, 363 weak Chemoff inequality, 569 weak visibility, 165, 854, 1018 polygon, 835, 853, 855 weakly edge visible, 856 externally visible, 856 internally visible, 856 polygon, 856 segment visible, 856 polygon, 856 visible, 835, 845 weighted a-shapes, 273 planar partitioning, 163
Subject index region metric, 650 region problem, 650 selection, 191 well-separated pair decomposition, 431-433,453, 891 width, 102 Wigner-Seitz zones, 203 window, 523 partition, 525 polygon, 525 tree, 525 Workbench, 401 X-shaped polygon, 553 X-ray visibility, 870 XYZ Geobench, 401 Yao graph, 429, 434, 435, 437, 452,455 z-buffer, 221 Zeus, 396 zone, 27, 68 zookeeper routes, 1009 zookeeper's problem, 685