Efficient for Geometric Optimization PANKAJ K. AGARWAL Duke University AND MICHA SHARIR Tel Aviv University

We review the recent progress in the design of efficient algorithms for various problems in geometric optimization. We present several techniques used to attack these problems, such as parametric searching, geometric alternatives to parametric searching, prune-and-search techniques for linear programming and related problems, and LP-type problems and their efficient solution. We then describe a wide range of applications of these and other techniques to numerous problems in geometric optimization, including facility location, proximity problems, statistical estimators and metrology, placement and intersection of and polyhedra, and ray shooting and other query-type problems.

Categories and Subject Descriptors: A.1 [General]: Introductory and Survey; F.2.2 [Theory of Computation]: Analysis of Algorithms and Problems—Geometrical problems and computations; I.1.2 [Computing Methodologies]: Algorithms—Analysis of algorithms General Terms: Algorithms, Design Additional Key Words and Phrases: Clustering, collision detection, linear programming, matrix searching, parametric searching, proximity problems, prune- and-search, randomized algorithms

1. INTRODUCTION variables subject to a large number of inequality (and equality) constraints. Combinatorial optimization typically Many problems can be formulated as deals with problems of maximizing or combinatorial optimization problems, minimizing a function of one or more which has made this a very active area

Both authors are supported by a grant from the U.S.-Israeli Binational Science Foundation. P. K. Agarwal has also been supported by National Science Foundation Grant CCR-93-01259, Army Research Office MURI grant DAAH04-96-1-0013, a Sloan fellowship, and an NYI award and matching funds from Xerox Corp. M. Sharir has also been supported by NSF Grants CCR-94-24398 and CCR-93-11127, a Max-Planck Research Award, and a grant from the G.I.F., the German-Israeli Foundation for Scientific Research and Development. A preliminary version of this article appeared as: P. K. Agarwal and M. Sharir, Algorithmic techniques for geometric optimization, in Computer Science Today: Recent Trends and Developments, LNCS 1000, J. van Leeuwen, Ed., 1995, pp. 234–253. Authors’ addresses: P. K. Agarwal, Center for Geometric Computing, Department of Computer Science, Box 90129, Duke University, Durham, NC 27708-0129; M. 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. Permission to make digital/hard copy of part or all of this work for personal or classroom use is granted without fee provided that the copies are not made or distributed for profit or commercial advantage, the copyright notice, the title of the publication, and its date appear, and notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. © 1999 ACM 0360-0300/99/1200–0412 $5.00

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 413 of research during the past half century. attempts to replace parametric search- In many applications, the underlying ing by alternative techniques, including optimization problem involves a con- randomization,1 expander graphs,2 geo- stant number of variables and a large metric cuttings [Agarwal et al. 1993c; number of constraints that are induced Bro¨nnimann and Chazelle 1994], and by a given collection of geometric ob- matrix searching.3 We present these al- jects; we refer to such problems as geo- ternative techniques in Section 3. metric-optimization problems. In such Almost concurrently with the develop- cases one expects that faster and sim- ment of the parametric-searching tech- pler algorithms can be developed by ex- nique, Megiddo [1983b, 1984] devised ploiting the geometric nature of the another ingenious technique for solving problem. Much work has been done on linear programming and several related geometric-optimization problems during optimization problems. This technique, the last 20 years, and many new elegant now known as decimation or prune-and- and sophisticated techniques have been search, was later refined and extended developed and successfully applied to by Dyer [1984], Clarkson [1986], and them. The aim of this article is to sur- others. The technique can be viewed as vey the main techniques and applica- an optimized version of parametric tions of this kind. searching, in which certain special The first part of this survey describes properties of the problem allow one to several general techniques that have improve further the efficiency of the led to efficient algorithms for a variety . For example, this technique of geometric-optimization problems, the yields linear-time deterministic algo- most notable of which is linear pro- rithms for linear programming and for gramming. The second part lists many several related problems, including the geometric applications of these tech- smallest-enclosing-ball problem, when niques and discusses some of them in the dimension is fixed. (However, the more detail. dependence of the running time of these The first technique that we present is algorithms on the dimension is at best called parametric searching. Although exponential.) We illustrate the tech- restricted versions of parametric nique in Section 4 by applying it to searching existed earlier (see, e.g., Eis- linear programming. ner and Severance [1976]), the full-scale In the past decade, randomized algo- technique was presented by Megiddo rithms have been developed for a vari- [1979, 1983a] in the late 1970s and ety of problems in computational geom- early 1980s. The technique was origi- etry and in other fields; see, for nally motivated by so-called parametric- example, the books by Mulmuley [1994] optimization problems in combinatorial and by Motwani and Raghavan [1995]. optimization, and did not receive much Clarkson [1995] and Seidel [1991] give attention by the computational geome- randomized algorithms for linear pro- try community until the late 1980s. In gramming, whose expected time is lin- the last decade, though, it has become ear in any fixed dimension, which are one of the major techniques for solving much simpler than their earlier deter- geometric-optimization problems effi- ministic counterparts. The dependence ciently. We outline the technique in de- on the dimension of the running time of tail in Section 2, first exemplifying it on the slope-selection problem [Cole et al. 1 Please see Agarwal and Sharir [1996a], Chan 1989], and then presenting various ex- [1998], Clarkson and Shor [1989], and Matous˘ek tensions of the technique. [1991b]. Despite its power and versatility, 2 Please see Ajtai and Megiddo [1996], Katz [1995], and Katz and Sharir [1993, 1997]. parametric searching has certain draw- 3 Please see Frederickson [1991], Frederickson backs, which we discuss next. Conse- and Johnson [1982, 1983, 1984], and Glozman et quently, there have been several recent al. [1995].

ACM Computing Surveys, Vol. 30, No. 4, December 1998 414 • P. K. Agarwal and M. Sharir these algorithms is better (although contains a given planar point set), still exponential). Actually, Clarkson’s placement and intersection of polygons technique is rather general, and is also and polyhedra (e.g., finding the largest applicable to a variety of other geomet- similar copy of a convex that ric-optimization problems. We describe fits inside a given polygonal environ- this technique in Section 5. ment), and query-type problems (e.g., Further significant progress in linear the ray-shooting problem, in which we programming was made in the begin- want to preprocess a given collection of ning of the 1990s, when new random- objects, so that the first object hit by a ized algorithms for linear programming query ray can then be determined effi- were obtained independently by Kalai ciently). [1992], and by Matous˘ek et al. [1996; Numerous nongeometric-optimization Sharir and Welzl 1992] (these two algo- problems have also benefited from the rithms are essentially dual versions of techniques presented here (see Agar- the same technique). The expected num- wala and Ferna´ndez-Baca [1996], Co- ber of arithmetic operations performed hen and Megiddo [1993], Frederickson by these algorithms is subexponential [1991], Gusfield et al. [1994], and Nor- in the input size, and is still linear in ton et al. [1992] for a sample of such any fixed dimension, so the operations applications), but we focus only on geo- constitute an important step toward the metric applications. still open goal of obtaining strongly Although the common theme of most algorithms for linear pro- of the applications reviewed here is that gramming. (Recall that the polynomial- they can be solved efficiently using time algorithms by Khachiyan [1980] parametric-searching, prune-and-search, and by Karmarkar [1984] are not LP-type, or related techniques, each of strongly polynomial, as the number of them requires a problem-specific, and arithmetic operations performed by often fairly sophisticated, approach. For these algorithms depends on the size of example, the heart of a typical applica- the coefficients of the input con- tion of parametric searching is the de- straints.) This new technique is pre- sign of efficient sequential and parallel sented in Section 6. The algorithm in algorithms for solving the appropriate Matous˘ek et al. [1996] and Sharir and problem-specific “decision procedure” Welzl [1992] is actually formulated in a (see the following for details). We pro- general abstract framework, which fits vide details of these solutions for some not only linear programming but many of the problems, but omit them for most other problems. Such LP-type problems of the applications due to lack of space. are also reviewed in Section 6, including the connection, recently noted by PART I: TECHNIQUES Amenta [1994a,b], between abstract lin- ear programming and Helly-type theo- The first part of the survey describes rems. several techniques commonly used in In the second part of this article, we geometric-optimization problems. We survey many geometric applications of describe each technique and illustrate it the techniques described in the first by giving an example. part. These applications include prob- lems involving facility location (e.g., 2. PARAMETRIC SEARCHING finding p congruent disks of smallest possible radius whose union covers a We begin by outlining the parametric- given planar point set), geometric prox- searching technique, and then illustrate imity (e.g., computing the diameter of a the technique by giving an example point set in three dimensions), statisti- where this technique is applied. Finally, cal estimators and metrology (e.g., com- we discuss various extensions of para- puting the smallest width annulus that metric searching.

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 415

2.1 Outline of the Technique sequence of progressively smaller inter- vals, each known to contain ␭*, until we The parametric-searching technique of either reach the end of As with a final Megiddo [1979, 1983a] can be described I, or hit ␭* at one of the com- ٪ in the following general terms (which ᏼ parisons of As. Since the value of ( ) are not as general as possible, but suf- changes at ␭*, the generic algorithm fice for our purposes). Suppose we have ᏼ ␭ will always make a comparison whose a decision problem ( ) that depends on associated polynomial vanishes at ␭*, a real parameter ␭, and is monotone in ␭ ᏼ ␭ which will then cause the overall algo- , meaning that if ( 0) is true for some ␭ ᏼ ␭ ␭ Ͻ ␭ rithm to terminate with the desired 0, then ( ) is true for all 0. Our ␭ ␭ ␭ value of *. goal is to find *, the maximum for If A runs in time T and makes C ᏼ ␭ s s s which ( ) is true, assuming such a comparisons, then, in general, the cost maximum exists. Suppose further that of the procedure just described is O(C T ), ᏼ ␭ s s ( ) can be solved by a (sequential) and is thus generally quadratic in the ␭ algorithm As that takes and a set of original complexity. To speed up the ␭ data objects (independent of )asthe execution, Megiddo proposes to imple- input, and that, as a byproduct, As can ment the generic algorithm by a parallel also determine whether the given ␭ is algorithm Ap (under Valiant’s [1975] equal to, smaller than, or larger than comparison model of computation; see ␭ the desired value * (in general, the the following). If A uses P processors monotonicity of ᏼ(␭) makes this a p and runs in Tp parallel steps, then each rather easy task). Assume moreover parallel step involves at most P inde- that the control flow of As is governed pendent comparisons; that is, we do not by comparisons, each of which amounts need to know the outcome of such a to testing the sign of some low-degree comparison to be able to execute other polynomial in ␭. comparisons in the same batch. We can Megiddo’s technique then runs As ge- then compute the O(P) roots of all the nerically at the unknown optimum ␭* associated with these com- and maintains an open interval I that is parisons, and perform a binary search known to contain ␭*. Initially, I is the to locate ␭* among them, using (the whole line. Whenever A reaches a s nongeneric) As at each binary step. The branching point that depends on some cost of simulating a parallel step of Ap comparison with an associated polyno- ϩ is thus O(P Ts log P) (there is no mial p(␭), it computes all the real roots need to sort the O(P) roots; instead, one ␭ ␭ ᏼ ␭ 1, 2, ... of p and computes ( i)by can use repeated median finding, whose running (the standard, nongeneric ver- overall cost is only O(P)), for a total ␭ ϭ ␭ sion of) As with the value of i.If running time of O(PT ϩ T T log P). ␭ ␭ p p s one of the i is equal to *, we stop, In most cases, the second term domi- since we have found the value of ␭*. nates the running time. Otherwise, we have determined the This technique can be generalized in ␭ ␭ ␭ open interval ( i, iϩ1) that contains *. many ways. For example, given a con- Since the sign of p(␭) remains the same cave function f(␭), we can compute the ␭ ʦ ␭ ␭ for all ( i, iϩ1), we can compute value ␭*of␭ that maximizes f(␭), pro- the sign of p(␭*) by evaluating, say vided we have sequential and parallel ␭ ϩ ␭ ␭ p(( i iϩ1)/2). The sign of p( *) also algorithms for the decision problem (of determines the outcome of the compari- comparing ␭* with a specific ␭); these ␭ പ ␭ son at *. We now set I to be I ( i, algorithms compute f(␭) and its deriva- ␭ iϩ1), and the execution of the generic tive, from which the relative location of As is resumed. As we proceed through the maximum of f is easy to determine. this execution, each comparison that we We can compute ␭* even if the decision ␭ resolve constrains the range where * algorithm As cannot distinguish be- can lie even further. We thus obtain a tween, say, ␭ Ͻ ␭* and ␭ ϭ ␭*; in this

ACM Computing Surveys, Vol. 30, No. 4, December 1998 416 • P. K. Agarwal and M. Sharir case we maintain a half-closed interval [1987] and Sharir and Agarwal [1995] I containing ␭*, and the right endpoint for more details concerning arrange- of the final I gives the desired value ␭*. ments. See Agarwal and Sharir [1994], Cole et We define ᏼ(␭) to be true if the x-co- al. [1987], and Toledo [1991, 1993a] for ordinates of at most k vertices of Ꮽ(L) these and some other generalizations. are smaller than or equal to ␭. Obvi- It is instructive to observe that paral- ously, ᏼ(␭) is monotone, and ␭*, the lelism is used here in a very weak maximum value of ␭ for which ᏼ(␭)is sense, since the overall algorithm re- true, is the x-coordinate of the desired mains sequential and just simulates the vertex. After having computed ␭*, the parallel algorithm. The only feature actual vertex is rather easy to compute, that we require is that the parallel algo- and in fact the algorithm described in rithm perform only a small number of the following can compute the vertex batches of comparisons, and that the without any additional work. In order to comparisons in each batch are indepen- apply the parametric-searching tech- dent of each other. We can therefore nique, we need an algorithm that, given assume that the parallel algorithm runs a vertical line ᐉϺx ϭ ␭, can compare ␭ in the parallel comparison model of Val- with ␭*. Let k␭ be the number of verti- iant [1975], which measures parallelism Ꮽ only in terms of the comparisons being ces of (L) whose x-coordinates are less ␭ Ͻ made, and ignores all other operations, than or equal to .Ifk␭ k, then ␭ Ͻ ␭ Ն ␭ Ͼ ␭ such as bookkeeping, communication clearly *. If k␭ k, then * ␭ ϭ ␭ between the processors, and data alloca- (respectively, *) if and only if no tion. Moreover, any portion of the algo- (respectively, one) vertex lies on the rithm that is independent of ␭ can be vertical line x ϭ ␭. ᐉ ᐉ ᐉ performed sequentially in any manner Let ( 1, 2, ..., n) denote the se- we like. These observations simplify the quence of lines in L sorted in the de- technique considerably in many cases. creasing order of their slopes, and let ᐉ ᐉ ᐉ ( ␲(1), ␲(2), ..., ␲(n)) denote the se- quence of these lines sorted by their 2.2 An Example: The Slope-Selection intercepts with x ϭ ␭. An easy observa- ᐉ ᐉ Ͻ Problem tion is that two lines i, j, with i j, intersect to the left of x ϭ ␭ if and only As an illustration, consider the slope- if ␲(i) Ͼ ␲(j). In other words, the num- selection problem: given a set of n points ber of intersection points to the left of in the plane and an integer k Յ (n), 2 x ϭ ␭ can be counted, in O(n log n) determine a segment connecting two in- time, by counting the number of inver- put points that has the kth smallest sions in the permutation ␲, using a slope among all such segments. Using the duality transform [Edelsbrunner straightforward tree-insertion proce- 1987], we can formulate this problem as dure [Knuth 1973]. Moreover, we can follows. We are given a set L of n non- implement this inversion-counting pro- vertical lines in the plane and an inte- cedure by a parallel sorting algorithm Յ Յ n that takes O(log n) parallel steps and ger 1 k (2), and we wish to find an intersection point between two lines of uses O(n) processors (e.g., the one in L that has the kth smallest x-coordi- Ajtai et al. [1983]). Hence, we can count nate. (We assume, for simplicity, gen- the number of inversions in O(n log n) eral position of the lines, so that no time sequentially or in O(log n) parallel three lines are concurrent, and no two time using O(n) processors. Plugging intersection points have the same x-co- these algorithms into the parametric- ordinate.) We are thus seeking the kth searching paradigm, we obtain an O(n leftmost vertex of the arrangement log3 n)-time algorithm for the slope-se- Ꮽ(L) of the lines in L; see Edelsbrunner lection problem.

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 417

2.3 Improvements and Extensions is the sorting that produces ␲. The sub- sequent inversion-counting step is inde- Cole [1987] observed that in certain ap- pendent of ␭, and can be executed se- plications of parametric searching, in- quentially. In fact, this step can be cluding the slope-selection problem, the totally suppressed in the generic execu- running time can be improved to ϩ tion, since it does not provide us with O((P Ts)Tp), as follows. Consider a any additional information about ␭.) Us- parallel step of the preceding generic ing additional machinery, Cole et al. algorithm. Suppose that, instead of in- [1989] gave an optimal O(n log n)-time voking the decision procedure O(log P) solution. They observe that one can times in this step to resolve all compar- compare ␭* with a value ␭ that is far isons, we call it only O(1) times, say, away from ␭* in a faster manner, by three times. This will determine the counting inversions only approximately. outcome of 7/8 of the comparisons, and This approximation is progressively re- will leave 1/8 of them unresolved (we fined as ␭ approaches ␭* in subsequent assume here, for simplicity, that each comparisons. Cole et al. show that the comparison has only one critical value overall cost of O(log n) calls to the ap- ␭ of where its outcome changes; this is proximating decision procedure is only the case in the slope-selection problem). O(n log n), so this also bounds the run- Suppose further that each of the unre- ning time of the whole algorithm. This solved comparisons can influence only a technique was subsequently simplified constant (and small) number, say, two, in Bro¨nnimann and Chazelle [1994]. of comparisons executed at the next par- Chazelle et al. [1994] have shown that allel step. Then 3/4 of these compari- the algorithm of Cole et al. [1989] can sons can still be simulated generically be extended to compute, in O(n log n) with the currently available informa- time, the kth leftmost vertex in an ar- tion. This leads to a modified scheme rangement of n line segments. that mixes the parallel steps of the algo- The slope-selection problem is only rithm, since we now have to perform one of many problems in geometric opti- together new comparisons and yet unre- mization that have been efficiently solved old comparisons. Nevertheless, solved using parametric searching. See Cole shows that if carefully imple- Agarwal et al. [1993a,c], Agarwal and mented (by assigning an appropriate Matous˘ek [1993], Agarwal and Sharir time-dependent weight to each unre- [1994], Chazelle et al. [1993], and Pelle- solved comparison, and by choosing the grini [1996] for a sample of other prob- weighted median at each step of the lems, many of which are described in binary search), the number of parallel Part II, that benefit from parametric steps of the algorithm increases only by searching. an additive logarithmic term, which The parametric-searching technique leads to the stated improvement. An can be extended to higher dimensions in ideal setup for Cole’s improvement is a natural manner. Suppose we have a when the parallel algorithm is described d-variate (strictly) concave function as a circuit (or network), each of whose F(␭), where ␭ varies over ޒd. We wish gates has a constant fanout. Since sort- to compute ␭* ʦ ޒd at which F(␭) at- ing can be implemented efficiently by tains its maximum value. Let As, Ap be, such a network [Ajtai et al. 1983], Cole’s as previously, sequential and parallel ␭ technique is applicable to problems algorithms that can compute F( 0) for ␭ whose decision procedure is based on any given 0. As previously, we run Ap sorting. generically at ␭*. Each comparison in- Cole’s idea therefore improves the volving ␭ now amounts to evaluating ␭ running time of the slope-selection algo- the sign of a d-variate polynomial p( 1, 2 ␭ rithm to O(n log n). (Note that the only ..., d), and each parallel step re- step of the algorithm that depends on ␭ quires resolving P such independent

ACM Computing Surveys, Vol. 30, No. 4, December 1998 418 • P. K. Agarwal and M. Sharir

comparisons at ␭*. Resolving a compar- the roots of p(␭) and to determine ␭ ␭ ison is now more difficult because p( 1, the sign of p( *) without computing ␭ ϭ Ϫ ..., d) 0isnowa(d 1)-dimen- the roots explicitly. These tech- sional variety. Cohen and Megiddo niques are rather expensive. [1993] described a recursive procedure (3) Finally, from an aesthetic point of to execute a parallel step for the case in view, the execution of an algorithm which the polynomial corresponding to based on parametric searching may each of the comparisons is a linear func- appear to be somewhat chaotic. tion. The total running time in simulat- Such an algorithm neither gives any ing Ap, using their procedure, is insight into the problem, nor does O(d2) d 2 Ts(Tp log P) . Agarwala and Fer- its execution resemble any “intui- na´ndez-Baca [1996] improved the run- tive” flow of execution for solving ning time slightly by extending Cole’s the problem. idea to multidimensional parametric searching; see also Megiddo [1984] and These shortcomings have led several Papadimitriou [1981]. The running time researchers to look for alternative ap- was further improved by Agarwal et al. proaches to parametric searching for O(d) d geometric-optimization problems. [1993c] to d Ts(Tp log P) . Later, To- ledo [1993b] extended these techniques Roughly speaking, parametric searching to comparisons involving nonlinear effectively conducts an implicit binary ⌳ϭ ␭ ␭ polynomials, using Collins’s [1975] cy- search over a set { 1, ..., t}of ␭ lindrical algebraic decomposition. The critical values of the parameter ,to ␭ total running time of his procedure is locate the optimum * among them. 2dϪ1 (For example, in the slope-selection O(Ts(Tp log P) ). For the sake of completeness, we present these rather problem, the critical values are the ⌰ 2 technical higher-dimensional extensions (n ) x-coordinates of the vertices of Ꮽ in the Appendix. the arrangement (L).) The power of the technique stems from its ability to perform the binary search by generating 3. ALTERNATIVE APPROACHES TO only a small number of critical values PARAMETRIC SEARCHING during the search, without computing ⌳ Despite its power and versatility, the the entire explicitly. In this section parametric-searching technique has we describe some alternative ways of some shortcomings. performing such a binary search, which also generates only a small set of criti- (1) Parametric searching requires the cal values. design of an efficient parallel algo- rithm for the generic version of the decision procedure. This is not al- 3.1 Randomization ways easy, even though it only Randomization is a natural approach to needs to be done in the weak com- performing an implicit binary search parison model, and it often tends to over the critical values [Matous˘ek make the overall solution quite com- 1991b; Varadarajan 1996; Zemel 1987]. plicated and impractical. Suppose we know that ␭* lies in some (2) The generic algorithm requires ex- interval I ϭ [␣, ␤]. Suppose further act computation of the roots of the that we can randomly choose an ele- ␭ ␭ ʦ പ ⌳ polynomials p( ) whose signs deter- ment 0 I , where each item is mine the outcome of the compari- chosen with probability 1/͉I പ ⌳͉. Then sons made by the algorithm. In gen- it follows that, by comparing ␭* with a eral, the roots of a polynomial few randomly chosen elements of I പ ⌳ cannot be computed exactly; there- (i.e., by executing the decision algo- fore, one has to rely on computa- rithm at these values), we can shrink I tional algebra techniques to isolate to an interval IЈ that is guaranteed to

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 419 contain ␭* and that is expected to con- ber of inversions approximately, they tain significantly fewer critical values. determine in O(n log n) time the verti- The difficult part is, of course, choos- cal strip W(ai, aiϩ1) that contains the ing a random element from I പ ⌳.In kth leftmost vertex of Ꮽ(L). They prove many cases, a procedure for computing that, with high probability, W(ai, aiϩ1) ͉I പ ⌳͉ can be converted into a proce- contains only O(n) vertices of Ꮽ(L), and dure for generating a random element therefore the desired vertex can be com- of I പ ⌳. For example, in the slope- puted in an additional O(n log n) time selection problem, given a set L of n by a sweep-line algorithm. See Dillen- lines in the plane and a vertical strip court et al. [1991] for yet another ran- W ϭ (l, r) ϫ ޒ, an inversion-counting domized slope-selection algorithm. In algorithm for computing the number of the following we mention a few more vertices of Ꮽ(L) within W can be used to applications of this randomized ap- generate a multiset of q random verti- proach. Ꮽ പ ϩ ces of (L) W in time O(n log n q) Clarkson and Shor [1989] gave an- [Matous˘ek 1991b]. Based on this obser- other randomized technique for solving vation, Matous˘ek [1991b] obtained the a variety of geometric-optimization following simple slope-selection algo- problems. Originally, they had proposed rithm. Each step of the algorithm main- the algorithm for computing the diame- tains a vertical strip W(a, b) ϭ ޒ3 ͉ Յ Յ ter of a set of points in (see Section {(x, y) a x b} that is guaranteed to 8.1). Their algorithm was extended by contain the kth leftmost vertex; initially Agarwal and Sharir [1996a]. Chan a ϭϪϱand b ϭϩϱ. Let m be the Ꮽ [1998] used a different randomized number of vertices of (L) lying inside technique, based on the following sim- W. We repeat the following step until ple observation. Suppose we wish to the algorithm terminates. compute the minimum of n given num- If m Յ n, the kth leftmost vertex of bers. If we examine these numbers in a Ꮽ(L) can be computed in O(n log n)bya random order, then, whereas each num- sweep-line algorithm (through W). Oth- erwise, set k* to be the number of verti- ber needs to be compared in turn ces lying to the left of the line x ϭ a. Let against the current minimum, the cur- ϭ  Ϫ ⅐  ϭ Ϫ  ͌  rent minimum will be reset only j (k k*) n/m , ja j 3 n , and ϭ ϩ  ͌  O(log n) expected number of times. jb j 3 n . We choose n random vertices of Ꮽ(L) lying inside W(a, b). If Chan used this simple observation to the kth leftmost vertex lies in W( j , j ) solve combinatorial optimization prob- a b lems whose input can be decomposed and the vertical strip W( ja, jb) contains at most cm/͌n vertices, for some appropri- into a collection of subproblems of Ͼ ϭ ϭ smaller size so that the optimal value ate constant c 0, we set a ja, b jb, and repeat this step. Otherwise, we dis- for the whole problem is the minimum card the random sample of vertices, and of the values of the subproblems. His draw a new sample. It can be shown, algorithm processes the subproblems in using Chernoff ’s bound [Motwani and a random order. For each subproblem Raghavan 1995], that the expected run- the algorithm compares its optimal ning time of the preceding algorithm is value with the current minimum; this, O(n log n). however, amounts to solving the corre- Shafer and Steiger [1993] give a sponding decision problem. The ex- slightly different O(n log n) expected- pected number of subproblems for time algorithm for the slope-selection which the optimum value is actually problem. They choose a random subset computed (to reset the current mini- of u ϭ O(n log n) vertices of Ꮽ(L). Let mum) is only O(log n). Each of these a1, a2, ..., au be the x-coordinates of values is computed recursively. Chan these vertices. Using the algorithm by showed that in many instances the ex- Cole et al. [1989] for counting the num- pected running time of this technique is

ACM Computing Surveys, Vol. 30, No. 4, December 1998 420 • P. K. Agarwal and M. Sharir

asymptotically the same as that of the O(n log2 n)-time deterministic algorithm decision procedure. for the slope-selection problem, using cuttings.4 The bound was subsequently 3.2 Expanders and Cuttings improved by Bro¨nnimann and Chazelle [1994], to O(n log n). For the sake of In many cases, the preceding random- completeness, we give a brief sketch of ized approach can be derandomized, the algorithm by Chazelle et al. [1993]. without affecting the asymptotic run- The algorithm works in O(log n) stages. ning time, using techniques based on In the beginning of the jth stage, we expanders or on geometric cuttings. Ex- have a vertical strip Wj, which contains ␭ pander graphs are special graphs that *, and a triangulation Tj of Wj. For ⌬ ʦ can be constructed deterministically (in each triangle Tj, we store the ver- a rather simple manner), have a linear tices of ⌬, the subset L⌬ of lines in L number of edges, and share many prop- that intersect the interior of ⌬, and the erties with random graphs; see Alon intersection points of L⌬ with the edges ⌬ and Spencer [1993] for more details. For of . We refer to the vertices of Tj and example, in the slope-selection problem, the intersection points of L⌬ with the ⌬ ⌬ ʦ we can construct expander graphs edges of , over all Tj,ascritical whose vertices are the given lines and points. The algorithm maintains the fol- whose edges correspond to appropriate lowing two invariants. vertices of the arrangement (each edge (C1) The total number of critical points corresponds to the intersection of the is at most c n, for some constant two lines that it connects). If we search 1 c Ͼ 0. among these vertices for the optimal ␭*, 1 ⌬ ʦ ͉ ͉ Յ we obtain a slab that contains the ver- (C2) For every triangle Tj, L⌬ j Ն tex of Ꮽ(L) whose x-coordinate is ␭* and n/c 2 lines of L, where c2 2isa that does not contain any of the expand- constant. er- induced vertices. One can then show, By (C1) and (C2), Wj contains O(n) vertices using properties of expander graphs, of Ꮽ(L) for j Ͼ log n, so we can find ␭* that the number of vertices of Ꮽ(L) by a sweep-line algorithm. We set W1 to within the slab is rather small, so that be a vertical strip containing all the ␭ the search for * within the slab can vertices of Ꮽ(L), and T consists of a proceed in a more efficient manner. 1 single unbounded triangle, namely, W1 This is similar to the randomized solu- itself. Suppose we are in the beginning tion in Matous˘ek [1991b]. (The con- of the jth stage. For every triangle ⌬ struction of the specific expander graph ͉ ͉ Ͼ j with L⌬ n/c 2, we compute a (1/4c)- is somewhat involved, and is described cutting ⌶⌬ of L⌬, clip each triangle ␶ ʦ in Katz and Sharir [1993].) ⌶⌬ within ⌬, retriangulate ␶ പ ⌬, and Although expanders have been exten- compute the critical points for the new sively used in many areas, including triangulation of Wj. If the total number parallel computation, complexity the- of critical points after this refinement is ory, communication networks, and VLSI at most c n, we move to the next stage. routing, their applications in computa- 1 Otherwise, we shrink the strip Wj as tional geometry have been rather sparse follows. We choose a critical point with so far. Ajtai and Megiddo [1996] gave an the median x-coordinate, say x ϭ ␭ , efficient parallel linear-programming m algorithm based on expanders, and later Katz [1995] and Katz and Sharir [1993, 4 A (1/r)-cutting for a set H of n hyperplanes in ޒd 1997] applied expanders to solve several is a partition ⌶ of ޒd into O(rd) simplices with geometric-optimization problems, in- pairwise disjoint interiors so that the interior of each simplex intersects at most n/r hyperplanes of cluding the application to the slope-se- H. For any given r,a1/r-cutting of size O(rd) lection problem, as just mentioned. always exists and can be computed in time Chazelle et al. [1993] developed an O(nrdϪ1) [Chazelle 1993].

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 421

and, using the decision algorithm de- teed to be an element of one of these scribed in Section 2.2, determine submatrices. In the beginning of the ith whether ␭* is greater than, smaller step, for i Ն 0, the algorithm has at ␭ ␭ ϭ ␭ ϭ iϩ2 Ϫ than, or equal to m.If * m, then most Bi 2 1 matrices, each of kϪiϩ1 ϫ kϪiϩ1 we stop; otherwise we shrink Wj to ei- size 2 2 . The ith step splits ␭ ϫ ޒ ␭ ϫ ޒ ther (l, m) or ( m, r) , depend- every such matrix into four square ing on whether ␭* is smaller or larger submatrices, each of size 2kϪi ϫ 2kϪi, ␭ than m. In any case, the new strip and discards some of these submatrices, contains only half of the critical points. so as to be left with only Biϩ1 matrices. After repeating this procedure for a con- After the kth step, we are left with O(n) stant number of times, we can ensure singleton matrices, so we can perform a that the number of critical points in the binary search on these O(n) critical val- ␭ current strip is at most c1n/4. We set ues to obtain *. Ј Wjϩ1 to this strip, clip T j within Wjϩ1, The only nontrivial step in the pre- retriangulate every clipped triangle, ceding algorithm is determining which and merge two triangles if their union is of the submatrices should be discarded j a triangle intersecting at most n/c2 in each step of the first phase, so that at lines of L. The total number of critical most Biϩ1 matrices are left after the ith points after these steps can be proved to step. After splitting each submatrix, we be at most c1n. As shown in Chazelle et construct two sets U and V: U is the set al. [1993], each stage takes O(n log n) of the smallest (i.e., upper-leftmost) ele- time, so the overall running time is O(n ment of each submatrix, and V is the set log2 n). Using the same idea as in Cole of largest (i.e., bottom-rightmost) ele- et al. [1989] (of counting the number of ment of each submatrix. We choose the ␭ ␭ inversions approximately), Bro¨nnimann median elements U and V of U and V, and Chazelle [1994] managed to im- respectively. We run the decision algo- ␭ ␭ prove the running time to O(n log n). rithm at U and V, to compare them with ␭*. If any of them are equal to ␭*, 3.3 Matrix Searching we are done. Otherwise, there are the following cases to consider. An entirely different alternative to ␭ Ͻ ␭ parametric searching was proposed by (1) If U *, we discard all those Frederickson and Johnson [Frederick- matrices whose largest elements are ␭ son 1991; Frederickson and Johnson smaller than U. ␭ Ͼ ␭ 1983, 1984], which is based on search- (2) If U *, we discard all those ing in sorted matrices. It is applicable matrices whose smallest elements ⌳ ␭ in cases where the set of candidate are larger than U; at least half of critical values for the optimum parame- the matrices are discarded in this ter ␭* can be represented in an n ϫ n case. matrix A, each of whose rows and col- ␭ Ͻ ␭ (3) If V *, we discard all those umns is sorted. The size of the matrix is matrices whose largest elements are too large for an explicit binary search ␭ smaller than V; at least half of the through its elements, so an implicit matrices are discarded in this case. search is needed. Here we assume that ␭ Ͼ ␭ (4) If V *, we discard all those each entry of the matrix A can be com- matrices whose smallest elements puted in O(1) time. We give a brief are larger than ␭ . sketch of this matrix-searching tech- V nique. It can be shown that this pruning step ϭ k Let us assume that n 2 for some retains at most Biϩ1 submatrices [Fred- k Ն 0. The algorithm works in phases. erickson 1991; Frederickson and John- The first phase, which consists of k son 1983, 1984], as desired. In conclu- steps, maintains a collection of disjoint sion, we can find the optimum ␭*by submatrices of A so that ␭* is guaran- executing only O(log n) calls to the deci-

ACM Computing Surveys, Vol. 30, No. 4, December 1998 422 • P. K. Agarwal and M. Sharir sion procedure, so the running time of extended the approach to obtain an d this matrix-searching technique is O(22 n)-time algorithm for linear pro- O(log n) times the cost of the decision gramming in ޒd. Since then the prune- procedure. The technique, when appli- and-search technique has been applied cable, is both efficient and simple com- to many other geometric-optimization pared to the standard parametric problems. We illustrate the technique searching. by describing Megiddo’s two-dimen- Aggarwal et al. [Aggarwal and Klawe sional linear-programming algorithm. ϭ 1987; Aggarwal et al. 1987, 1990; Ag- We are given a set H {h1,...,hn} garwal and Park 1988] studied a differ- of n halfplanes and a vector c, and we ent matrix-searching technique for opti- wish to minimize cx over the feasible ϭ പn mization problems. They gave a linear- region K iϭ1 hi. Without loss of time algorithm for computing the generality, assume that c ϭ (0, 1) (i.e., minimum (or maximum) element of ev- we seek the lowest point of K). Let L ery row of a totally monotone matrix; a denote the set of lines bounding the ϭ ϩ matrix A {ai, j} is called totally mono- halfplanes of H, and let L (respective- Ͻ Ͻ Ϫ ᐉ ʦ tone if ai , j ai , j implies that ai , j ly, L ) denote the subset of lines i L 1 i Յ1 2 Ͻ Յ Յ2 1 Ͻ ai , j , for any 1 i1 i2 m,1 j1 whose associated halfplane hi lies below 2Յ2 ᐉ j2 n. Totally monotone matrices arise (respectively, above) i. For simplicity, in many geometric, as well as nongeo- we assume that L contains no vertical metric, optimization problems. For ex- lines; nevertheless, it is easy to modify ample, the farthest neighbors of all ver- the algorithm to handle vertical lines as tices of a convex polygon and the well. The algorithm pairs up the lines of ᐉ ᐉ ᐉ ᐉ geodesic diameter of a simple polygon L into disjoint pairs ( 1, 2), ( 3, 4),..., can be computed in linear time, using so that either both the lines in a pair such matrices [Aggarwal et al. 1987; belong to Lϩ, or both belong to LϪ. The Hershberger and Suri 1993]. algorithm computes the intersection points of the lines in each pair, and 4. THE PRUNE-AND-SEARCH TECHNIQUE chooses the median, xm, of their x-coor- AND LINEAR PROGRAMMING dinates. Let x* denote the x-coordinate of the optimal (i.e., lowest) point in K (if Like parametric searching, the prune- such a point exists). The algorithm then and-search (or decimation) technique uses a linear-time decision procedure also performs an implicit binary search (whose details are omitted here, al- over the finite set of candidate values though some of them are discussed in for ␭*, but while doing so, it also tries to the following), that determines whether ϭ Ͻ Ͼ ϭ eliminate input objects that are guaran- xm x*, xm x*, or xm x*. If xm teed not to affect the value of ␭*. Each x*, we stop, since we have found the Ͻ phase of the technique eliminates a con- optimum. Suppose that xm x*. If stant fraction of the remaining objects. (ᐉ, ᐉЈ) is a pair of lines, both of which Therefore, after a logarithmic number belong to LϪ and whose intersection of steps, the problem size becomes a point lies to the left of xm, then we can constant, and the problem can be solved discard the line with the smaller slope in a final, brute-force step. Because of from any further consideration, because the “decimation” of input objects, the that line is known to pass below the overall cost of the resulting algorithm optimal point of K. All other cases can remains proportional to the cost of the be treated in a fully symmetric manner, first pruning phase. The prune-and- so we have managed to discard about search technique was originally intro- n/4 lines. duced by Megiddo [1983b, 1984], in de- We have thus computed, in O(n) time, veloping a linear-time algorithm for a subset HЈ ʕ H of about 3n/4 con- linear programming with n constraints straints so that the optimal point of Јϭപ in two and three dimensions. Later he K hʦHЈ h is the same as that of K.

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 423

We now apply the whole procedure once more complicated, and requires recur- again to HЈ, and keep repeating this (for sive invocations of the algorithm on sub- O(log n) stages) until either the number problems in lower dimensions. It yields of remaining lines falls below some a deterministic algorithm for linear pro- small constant, in which case we solve gramming that runs in O(Cdn) time, the problem by brute force (in constant where Cd is a constant depending on d. time), or the algorithm has hit x* acci- One of the difficult steps in higher di- dentally, in which case it stops right mensions is to develop a procedure that away. (We omit here the description of can discard a fraction of the input con- the linear-time decision procedure, and straints from further consideration by of handling cases in which K is empty or invoking the (d Ϫ 1)-dimensional linear unbounded; see Edelsbrunner [1987] programming algorithm a constant and Megiddo [1983b, 1984] for details.) number of times; the value of Cd de- It is now easy to see that the overall pends on this constant. The original ap- running time of the algorithm is O(n). proach by Megiddo [1984] gives C ϭ d d 22 , which was improved by Clarkson Remark. It is instructive to compare 2 this method to the parametric searching [1986] and Dyer [1986] to 3d . Their technique, in the context of two-dimen- procedure can be simplified and im- sional linear programming. In both ap- proved using geometric cuttings as fol- proaches, the decision procedure aims to lows (see Agarwal et al. [1993c] and compare some given x0 to the optimal Dyer and Frieze [1989]). Let H be the value x*. This is done by computing the set of hyperplanes bounding the input maximum and minimum values of the constraints. Choose r to be a constant, intercepts of the lines in LϪ and in Lϩ, and compute a 1/r-cutting ⌶ for H.By ϭ Ϫ respectively, with the line x x0.A invoking the (d 1)-dimensional lin- trivial method for computing the maxi- ear-programming algorithm recursively mum and minimum in parallel is in a O(rd) times (at most three times for binary-tree manner, computing the each hyperplane h supporting a facet of maximum or minimum of pairs of lines, a simplex in ⌶:onh itself, and on two then of pairs of pairs, and so on. Both parallel hyperplanes parallel to h, one techniques begin by implementing ge- on each side and lying very close to h), nerically the first parallel step of this one can determine the simplex ⌬ of ⌶ decision procedure. The improved per- that contains x*. The constraints whose formance of the prune-and-search algo- bounding hyperplanes do not intersect ⌬ rithm stems from the realization that can be discarded because they do not (a) there is no need to perform the full determine the optimum value. We solve binary search over the critical values of the problem recursively with the re- the comparisons in that stage—a single maining n/r constraints. Dyer and binary search step suffices (this is simi- Frieze [1989] (see also Agarwal et al. lar to Cole’s enhancement of parametric [1993c]) have shown that the number of searching, mentioned previously), and calls to the recursive algorithm can be (b) this single comparison allows us to reduced to O(dr). This yields an dO(d)n- discard a quarter of the given lines, so time algorithm for linear programming there is no point in continuing the ge- in ޒd. An entirely different algorithm neric simulation, and it is better to start with a similar running time was given the whole algorithm from scratch, with by Chazelle and Matous˘ek [1996]. It is the surviving lines. From this point of an open problem whether faster deter- view, the prune-and-search technique ministic algorithms that are linear in n can be regarded as an optimized variant can be developed. Although no progress of parametric searching. has been made on this front, there have This technique can be extended to been significant developments on ran- higher dimensions, although it becomes domized algorithms for linear program-

ACM Computing Surveys, Vol. 30, No. 4, December 1998 424 • P. K. Agarwal and M. Sharir

Fig. 1. Clarkson’s randomized LP algorithm. ming, which we discuss in the next two gramming by Clarkson [1995], based on sections. random sampling, which is actually Recently there has been considerable quite general and can be applied to any interest in parallelizing Megiddo’s geometric set-cover and related prob- prune-and-search algorithm. Deng lems [Agarwal and Desikan 1997; Bro¨n- [1990] gave an O(log n)-time and O(n)- nimann and Goodrich 1995; Clarkson work algorithm for two-dimensional lin- 1993]. Other randomized algorithms for ear programming, under the CRCW linear programming, which run in ex- model of computation. His algorithm, pected linear time for any fixed dimen- however, does not extend to higher di- sion, are proposed by Dyer and Frieze mensions. Alon and Megiddo [1990] [1989], Seidel [1991], and Matous˘ek et gave a randomized algorithm under the al. [1996]. CRCW model of computation that runs, Clarkson’s algorithm proceeds as fol- with high probability, in O(1) time us- lows. Let H be the set of constraints. We ing O(n) processors. Ajtai and Megiddo assign a weight ␮(h) ʦ ޚ to each con- d [1996] gave an O((log log n) )-time de- straint; initially ␮(h) ϭ 1 for all h ʦ H. terministic algorithm using O(n) pro- ʕ ␮ ϭ͚ ␮ For any A H, let (A) hʦA (h). cessors under Valiant’s model of compu- The algorithm works in rounds, each of tation. Goodrich and Ramos [1997] and dϩ2 which consists of the following steps. Sen [1996] gave an O((log log n) )- Set r ϭ 6d2.If͉H͉ Յ 6d2, we compute time, O(n)-work algorithm under the the optimal solution using the simplex CRCW model; see also Dyer [1995]. algorithm. Otherwise, choose a random sample R ʚ H such that ␮(R) ϭ r. (We 5. RANDOMIZED ALGORITHMS FOR can regard H as a multiset in which LINEAR PROGRAMMING each constraint h appears ␮(h) times, ʦ H Random sampling has become one of the and we choose a multiset R (r )ofr most powerful and versatile techniques constraints.) We compute the optimal ʚ in , so it is no solution xR for R and the subset V گ surprise that this technique has also H R of constraints that xR violates been successful in solving many geomet- (i.e., the subset of constraints that do ϭ À ric-optimization problems. See the book not contain xR). If V , the algorithm ␮ Յ ␮ by Mulmuley [1994] and the survey pa- returns xR.If (V) 3 (H)/d, we dou- pers by Clarkson [1992] and Seidel ble the weight of each constraint in V; [1993] for applications of the random- in any case, we repeat the sampling sampling technique in computational procedure. See Figure 1 for a geometry. In this section, we describe a pseudocode of the algorithm. randomized algorithm for linear pro- Let B be the set of d constraints

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 425 whose boundaries are incident to the first subexponential “combinatorial” optimal solution. A round is called suc- bound for linear programming (a bound cessful if ␮(V) Յ 3␮(H)/d. Using the that counts the number of arithmetic fact that R is a random subset, one can operations and is independent of the bit argue that each round is successful with complexity of the input), and is a first probability at least 1/2. Every success- step toward the major open problem of ful round increases ␮(H) by a factor of obtaining a strongly polynomial algo- at most (1 ϩ 1/3d), so the total weight rithm for linear programming. The pa- ␮(H) after kd successful rounds is at pers by Ga¨rtner and Welzl [1996] and most n(1 ϩ 1/3d)kd Ͻ nek/3. On the Goldwasser [1995] also survey the other hand, each successful iteration known results on LP-type problems. A doubles the weight of at least one con- dual version of the algorithm was inde- straint in B (it is easily verified that V pendently obtained by Kalai [1992], but must contain such a constraint), which only in the context of linear program- implies that after kd iterations ␮(H) Ն ming. ␮(B) Ն 2k. Hence, after kd successful k Յ ␮ Յ k/3 rounds, 2 (H) ne . This implies 6.1 An Abstract Framework that the preceding algorithm terminates in at most 3d ln n successful rounds. Let us consider optimization problems Since each round takes O(dd) time to specified by a pair (H, w), where H is a Ϻ H 3 ᐃ compute xR and O(dn) time to compute finite set, and w 2 is a function V, the expected running time of the into a linearly ordered set (ᐃ, Յ); we algorithm is O((d2n ϩ ddϩ1)log n). By assume that ᐃ has a minimum value combining this algorithm with a ran- Ϫϱ. The elements of H are called con- domized recursive algorithm, Clarkson straints, and for G ʕ H, w(G) is called improved the expected running time to the value of G. Intuitively, w(G) de- O(d2n) ϩ dd/2ϩO(1) log n. notes the smallest value attainable by a certain objective function while satisfy- 6. ABSTRACT LINEAR PROGRAMMING ing all the constraints of G. The goal is to compute a minimal subset BH of H ϭ In this section we present an abstract with w(BH) w(H) (from which, in framework that captures linear pro- general, the value of H is easy to deter- gramming, as well as many other geo- mine), assuming the availability of metric-optimization problems, including three basic operations, which we specify computing smallest enclosing balls (or in the following. ellipsoids) of finite point sets in ޒd, Such a minimization problem is called computing largest balls (ellipsoids) cir- LP-type if the following axioms are sat- cumscribed in convex polytopes in ޒd, isfied. computing the distance between polyto- pes in ޒd, general convex programming, Axiom 1 (Monotonicity). For any F, and many other problems. Sharir and G with F ʕ G ʕ H, we have Welzl [1992] and Matous˘ek et al. [1996] ͑ ͒ Յ ͑ ͒ presented a randomized algorithm for w F w G . optimization problems in this frame- Axiom 2 (Locality). For any F ʕ G ʕ work, whose expected running time is H with Ϫϱ Ͻ w(F) ϭ w(G) and any h ʦ linear in terms of the number of con- H, straints whenever the combinatorial di- mension d (whose precise definition, in w͑G͒ Ͻ w͑G ഫ ͕h͖͒ f this abstract framework, is given in the following) is fixed. More important, the w͑F͒ Ͻ w͑F ഫ ͕h͖͒. running time is subexponential in d for many of the LP-type problems, includ- Linear programming is easily shown ing linear programming. This is the to be an LP-type problem: Set w(G)to

ACM Computing Surveys, Vol. 30, No. 4, December 1998 426 • P. K. Agarwal and M. Sharir

Fig. 2. A randomized algorithm for LP-type problems.

be the vertex of the feasible region that tial basis B0 with exactly minimizes the objective function and dim(H, w) elements is available. that is coordinate-wise lexicographically smallest (this definition is important to For linear programming, the first oper- satisfy Axiom 2), and extend the defini- ation can be performed in O(d) time, by tion of w(G) in an appropriate manner substituting the coordinates of the ver- to handle empty or unbounded feasible tex w(B) into the equation of the hyper- regions. plane defining h. The second operation A basis B ʕ H is a set of constraints can be regarded as a dual version of the Ϫϱ Ͻ Ј Ͻ pivot step in the simplex algorithm, and satisfying w(B), and w(B ) 2 w(B) for all proper subsets BЈ of B. For can be implemented in O(d ) time. The G ʕ H, with Ϫϱ Ͻ w(G), a basis of G is third operation is also easy to imple- a minimal subset B of G with w(B) ϭ ment. w(G). (For linear programming, a basis We are now in position to describe the of G is a minimal set of halfspace con- algorithm. Using the initial-basis prim- straints in G such that the minimal itive, we compute a basis B0 and call vertex of their intersection is the mini- SUBEX_1p(H, B0), where SUBEX_1p is mal vertex of G.) A constraint h is vio- the recursive algorithm, given in Figure lated by G if w(G) Ͻ w(G ഫ {h}), and it 2, for computing a basis BH of H. is extreme in G if w(G Ϫ {h}) Ͻ w(G). A simple inductive argument shows The combinatorial dimensions of the expected number of primitive opera- (H, w), denoted as dim(H, w), is the tions performed by the algorithm is ␦ ϭ ͉ ͉ ␦ ϭ maximum cardinality of any basis. We O(2 n), where n H and call an LP-type problem basis regular if dim(H, w) is the combinatorial dimen- for any basis with ͉B͉ ϭ dim(H, w) and sion. However, using a more involved for any constraint h, every basis of B ഫ analysis, which can be found in Ma- {h} has exactly dim(H, w) elements. tous˘ek et al. [1996], one can show that (Clearly, linear programming is basis- basis-regular LP-type problems can be regular, where the dimension of every solved with an expected number of at basis is d.) most We assume that the following primi- 2 ͱ␦ ln͑͑nϪ␦͒/ ͱ␦ ϩ ͑ ͱ␦ ϩ ͒ tive operations are available. e O ln n

(Violation test) h is violated by violation tests and basis computations. B: for a constraint h and a basis This is the subexponential bound to B, tests whether h is violated by B. which we alluded. (Basis computation) basis(B, h): Matous˘ek [1994] has given examples for a constraint h and a basis B, of abstract LP-type problems of combi- computes a basis of B ഫ {h}. natorial dimension d with 2d con- (Initial basis) initial(H): An ini- straints, for which the preceding algo-

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 427

͌ rithm requires ⍀(e 2d/4͌d) primitive and each violation test or basis compu- operations. Here is an example of such a tation can be implemented in time O(d) problem. Let A be a lower-triangular or O(d2), respectively. In summary, we d ϫ d {0, 1}-matrix, with all diagonal obtain a randomized algorithm for lin- ʦ entries being 0; that is, ai,j {0, 1} for ear programming, which performs Յ Ͻ Յ ϭ Յ Յ 1 j i d and aij 0 for 1 i ͱ Յ 2 d ln͑n/ ͱd͒ ϩ ͑ ͱ ϩ ͒ j d. Let x1, ..., xd denote variables e O d ln n ޚ over 2, and suppose that all additions and multiplications are performed mod- expected number of arithmetic opera- ulo 2. We define a set of 2d constraints tions. Using SUBEX_1p instead of the simplex algorithm for solving the small- ͑ ͒ ϭ ͕ c͉ Յ Յ ʦ ͕ ͖͖ size problems in the RANDOM_1p algo- H A hi 1 i d,c 0, 1 , rithm (given in Figure 1), the expected where number of arithmetic operations can be ͌ reduced to O(d2n) ϩ eO( d log d). iϪ1 In view of Matous˘ek’s lower bound, cϺ Ն ͸ ϩ hi xi aij xj c. one should aim to exploit additional jϭ1 properties of linear programming to ob- tain a better bound on the performance ϭ That is, xi 1 if the right-hand side of of the algorithm for linear program- ʦ the constraint is 1 modulo 2 and xi ming; this is still a major open problem. {0, 1} if the right-hand side is 0 modulo 2. For a subset G ʕ H, we define w(G) 6.3 Extensions to be the lexicographically smallest പ point of hʦG h. It can be shown that Recently, Chazelle and Matous˘ek [1996] the preceding example is an instance of gave a deterministic algorithm for solv- a basis-regular LP-type problem, with ing LP-type problems in time O(␦O(␦)n), combinatorial dimension d. Matous˘ek provided an additional axiom holds (to- showed that if A is chosen randomly gether with an additional computa- Յ Ͻ Յ (i.e., each entry aij, for 1 j i d,is tional assumption). Still, these extra re- ϭ chosen independently, with Pr[aij 0] quirements are satisfied in many ϭ ϭ ϭ Pr[aij 1] 1/2) and the initial natural LP-type problems. Matous˘ek basis is also chosen randomly, then the [1995b] has investigated the problem of expected number of primitive opera- ͌ finding the best solution, for an abstract tions performed by SUBEX_1p is ⍀(e 2d/ LP-type problem, that satisfies all but k 4͌d). of the given constraints. He proved that the number of bases that violate at most 6.2 Linear Programming k constraints in a nondegenerate in- stance of an LP-type problem is O((k ϩ We are given a set H of n halfspaces in 1)␦), where ␦ is the combinatorial di- ޒd. We assume that the objective vector ϭ mension of the problem, and that they is c (1, 0, 0, . . . , 0), and the goal is can be computed in time O(n(k ϩ 1)␦). to minimize cx over all points in the പ In some cases the running time can be common intersection hʦH h. For a ʕ improved using appropriate data struc- subset G H, define w(G)tobethe tures. For example, given a set H of n lexicographically smallest point (vertex) halfplanes in the plane and an integer of the intersection of halfspaces in G. k Յ n, the point with the smallest y- (As noted, some care is needed to handle coordinate that lies in at least n Ϫ k unbounded or empty feasible regions; halfplanes can be computed in time we omit here details concerning this issue.) O͑n log k ϩ k3 log2 n͒ As noted previously, linear program- ming is a basis-regular LP-type prob- [Matous˘ek 1995b; Roos and Widmayer lem, with combinatorial dimension d, 1994]. For larger values of k, the run-

ACM Computing Surveys, Vol. 30, No. 4, December 1998 428 • P. K. Agarwal and M. Sharir

ning time is O(n log n ϩ nk) [Chan LP-type problem, whose combinatorial 1998]. If the intersection of the half- dimension is at most t. spaces is nonempty, the running time As an illustration, consider the small- ϩ ␧ ϭ can be improved to O(n k(n/k) log n) est-enclosing-ball problem. Let P {p1, ␧ Ͼ for any 0. ..., pn} be the given set of n points in ޒd ␭ ␭ Amenta [1994a] considers the follow- , and let Ki( ) be the ball of radius ϭ ing extensions of the abstract frame- centered at pi, for i 1,..., n. Since work. Suppose we are given a family of the Kis are convex, the collection in LP-type problems (H, w␭), monotoni- question has Helly number d ϩ 1. It is cally parameterized by a real parameter easily seen that the minimal ␭ for which ␭ ␭; the underlying ordered value set ᐃ the Ki( )s have nonempty intersection has a maximum element ϩϱ represent- is the radius of the smallest enclosing ing infeasibility. The goal is to find the ball of P. This shows that the smallest- smallest ␭ for which (H, w␭) is feasible enclosing-ball problem is LP-type, and (i.e., w␭(H) Ͻϩϱ). See Amenta can thus be solved in O(n) randomized [1994a,b] for more details and related expected time in any fixed dimension. work. See the following for more details. There are several other examples where Helly-type theorems can be 6.4 Abstract Linear Programming and turned into LP-type problems. They in- Helly-Type Theorems clude computing a line transversal to a family of translates of a convex object in In this subsection we describe an inter- the plane and of certain families of con- esting connection between Helly-type vex objects in ޒ3, and computing a theorems and LP-type problems, as smallest homothet of a given convex set originally noted by Amenta [1994a]. that intersects (or contains, or is con- Let K be an infinite collection of sets tained in) every member in a given col- in ޒd, and let t be an integer. We say lection of n convex sets in ޒd. We refer that K satisfies a Helly-type theorem, the reader to Amenta [1994a,b] for more with Helly number t, if the following details and for additional examples. holds. If ᏷ is a finite subcollection of K with the property that every subcollec- tion of t elements of ᏷ has a nonempty PART II: APPLICATIONS intersection, then പ ᏷ Þ À. (The best known example of a Helly-type theorem In the first part of the article we focused is Helly’s [1930] theorem itself, which on general techniques for solving geo- applies for the collection K of all convex metric-optimization problems. In this sets in ޒd, with the Helly number d ϩ second part, we list numerous problems 1; see Danzer et al. [1963] and Eckhoff in geometric optimization that can be et al. [1993] for excellent surveys on attacked using some of the techniques this topic.) Suppose further that we are reviewed in the foregoing. For the sake given a collection ᏷(␭), consisting of n of completeness, we also review vari- ␭ ␭ ants of these problems for which the sets K1( ),...,Kn( ) that are parame- trized by some real parameter ␭, with preceding techniques are not applicable. ␭ ʕ ␭Ј ϭ the property that Ki( ) Ki( ), for i 1,..., n and for ␭ Յ ␭Ј, and that, for ␭ ␭ 7. FACILITY-LOCATION PROBLEMS any fixed , the family {K1( ), ..., ␭ Kn( )} admits a Helly-type theorem, A typical facility-location problem is de- ϭ with a fixed Helly number t. Our goal is fined as follows. Given a set D {d1, ␭ ޒd to compute the smallest for which ..., dn}ofn demand points in ,a പn ␭ Þ À ␦ iϭ1 Ki( ) , assuming that such a parameter p, and a distance function , minimum exists. Amenta proved that we wish to find a set S of p supply this problem can be transformed to an objects (points, lines, segments, etc.) so

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 429 that the maximum distance between a sought.5 Although many of these prob- demand point and its nearest supply lems can be solved in polynomial time object is minimized. That is, we mini- for a fixed value of p, some of them still mize, over all possible appropriate sets remain intractable. In this section we S of supply objects, the following objec- review efficient algorithms for a few tive function: specific facility-location problems, to which the techniques introduced in Part I can be applied; in these applications, p c͑D, S͒ ϭ max min ␦͑di, s͒. 1ՅiՅn sʦS is usually a small constant.

Instead of minimizing the preceding 7.1 Euclidean p-Center quantity, one can choose other objective ޒd functions, such as Given a set D of n demand points in , we wish to find a set S of p supply

n points so that the maximum Euclidean Ј͑ ͒ ϭ ͸ ␦͑ ͒ distance between a demand point and c D, S min di, s . sʦS its nearest neighbor in S is minimized. iϭ1 This problem can be solved efficiently, when p is small, using the parametric In some applications, a weight wi is searching technique. The decision prob- ʦ assigned to each point di D, and the lem in this case is to determine, for a ʦ ޒd distance from di to a point x is given radius r, whether D can be cov- ␦ defined as wi (di, x). The book by ered by the union of p balls of radius r. Drezner [1995] describes many other In some applications, S is required to be variants of the facility-location problem. a subset of D, in which case the problem ϭ is referred to as the discrete p-center The set S {s1, ..., sp} of supply problem. objects partitions D into p clusters, D1, ...,Dp, so that si is the nearest supply General Results. A naive procedure object to all points in Di. Therefore, a for the p-center problem runs in time facility-location problem can also be re- O(ndpϩ2), observing that the critical ra- garded as a clustering problem. These dius r* is determined by at most d ϩ 1 facility-location (or clustering) problems points, which also determine one of the arise in many areas, including opera- balls; similarly, there are O(nd(pϪ1)) tions research, shape analysis [Han and choices for the other p Ϫ 1 balls, and it Myaeng 1996; Meghini 1995; Schroeter takes O(n) time to verify whether a and Bigu¨ n 1995], data compression and specific choice of balls covers D. For the vector quantization [Makhoul 1985], in- planar case, Drezner [1981] gave an im- 2pϩ1 formation retrieval [Cutting et al. 1993, proved O(n )-time algorithm, which was subsequently improved by Hwang 1992], drug design [Finn et al. 1997], ͌ et al. [1993b] to nO( p). Hwang et al. and data mining [Agrawal et al. 1992; O(͌p) Brinkhoff and Kriegel 1994; Shafer et [1993a] have given another n -time al. 1996]. A useful extension of the facil- algorithm for computing a discrete p- ity-location problem, which has been center. Recently, Agarwal and Pro- copiuc [1998] extended and simplified widely studied, is the capacitated facili- the technique by Hwang et al. [1993b] ty-location problem, in which we have 1Ϫ1/d to obtain an nO(p )-time algorithm for an additional constraint that the size of computing a p-center of n points in ޒd. each cluster should be at most c for Therefore, for a fixed value of p, the Ն some parameter c n/p. Euclidean p-center (and also the Euclid- If p is considered as part of the input, most facility-location problems are NP- 5 Please see Feder and Greene [1988], Gonzalez hard, even in the plane or even when [1985], Ko et al. [1990], Maass [1986], Megiddo only an approximate solution is being [1990], and Megiddo and Supowit [1984].

ACM Computing Surveys, Vol. 30, No. 4, December 1998 430 • P. K. Agarwal and M. Sharir

Fig. 3. Greedy algorithm for approximate p-center.

ean discrete p-center) problem can be and the minimum weight. Plesnik solved in polynomial time in any fixed [1987] improved the approximation fac- dimension. However, either of these tor to 2, as in the unweighted case. problems is NP-complete for d Ն 2, if p Bar-Ilan et al. [1993] proposed a polyno- is part of the input [Fowler et al. 1981; mial-time approximation algorithm for Megiddo and Supowit 1984]. This has the capacitated p-center problem that led researchers to develop efficient algo- computes a solution within a constant rithms for approximate solutions and factor. The approximation factor was for small values of p and d. later improved in Khuller and Suss- Approximation Algorithms. Let r* mann [1996]. See Gonzalez [1991] and be the minimum value of r for which p Ko et al. [1990] for other approximation disks of radius r cover D. Feder and algorithms. Greene [1988] showed that computing a Another way of seeking an approxi- set S of p supply points so that c(D, S) mation is to find a small number of Յ 1.822r* under the Euclidean distance balls of a fixed radius, say r, that cover function, or c(D, S) Ͻ 2r* under the all demand points. Computing k*, the minimum number of balls of radius r Lϱ-metric, is NP-hard. The greedy algo- rithm described in Figure 3, originally that cover D, is also NP-complete [Fowl- proposed by Gonzalez [1985] and by er et al. 1981]. A greedy algorithm can Hochbaum and Shmoys [1985, 1986], construct k* log n balls of radius r that computes in O(np) time a set S of p cover D. Hochbaum and Maass [1985] points so that c(D, S) Յ 2r*. gave a polynomial-time algorithm to This algorithm works equally well for compute a cover of size (1 ϩ ␧)k*, for any metric and for the discrete p-center any ␧ Ͼ 0 [1985]; see also Bro¨nnimann problem. The running time was im- and Goodrich [1995], Feder and Greene proved to O(n log p) by Feder and [1988], and Gonzalez [1991]. No con- Greene [1988]. Agarwal and Procopiuc stant-factor approximation algorithm is [1998] showed that, for any ␧ Ͼ 0, a set known for the capacitated covering S of p supply points with c(D, S) Յ (1 ϩ problem with unit-radius disks, that is, ␧)r* can be computed in O(n log p) ϩ the problem of partitioning a given 1Ϫ1/d (p/␧d)O(p ) time. point set S in the plane into the mini- Dyer and Freeze [1985] modified the mum number of clusters, each of which greedy algorithm to obtain an approxi- consists of at most c points and can be mation algorithm for the weighted p- covered by a disk of unit radius. Never- center problem, in which a weight w(p) theless, the greedy algorithm can be is associated with each demand point modified to obtain an O(log n)-factor ap- u ʦ D and the objective function is proximation for this problem [Bar-Ilan ៮ ϭ ␦ c(D, S) maxuʦD minvʦS w(u) (u, v). et al. 1993]. Their algorithm computes a solution The general results reviewed so far do with approximation factor min{3, 1 ϩ not make use of parametric searching: ␤}, where ␤ is the ratio of the maximum since there are only O(ndϩ1) candidate

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 431 values for the optimum radius r*, one tous˘ek 1995a]. Matous˘ek [1995b] also can simply enumerate all these values showed that the smallest disk covering and run a standard binary search all but k points can be computed in among them. The improvement that one time6 O(n log n ϩ k3n␧). Chan [1998] can gain from parametric searching is presented a randomized algorithm for significant only when p is relatively computing the discrete 1-center in ޒ3 small, which is what we discuss next. whose expected running time is O(n log n). Euclidean 1-Center. The 1-center The smallest-enclosing-ball problem problem is to compute the smallest ball is an LP-type problem, with combinato- enclosing D. The decision procedure for rial dimension d ϩ 1 [Sharir and Welzl the 1-center problem is thus to deter- 1992; Welzl 1991]. Indeed, the con- mine whether D can be covered by a ball straints are the given points, and the of radius r. For d ϭ 2, the decision function w maps each subset G to the problem can be solved in O(log n) paral- radius of the smallest ball containing G. lel steps using O(n) processors (e.g., be Monotonicity of w is trivial, and locality testing whether the intersection of the follows easily from the uniqueness of disks of radius r centered at the points the smallest enclosing ball of a given set of D is nonempty). This yields an O(n of points. The combinatorial dimension log3 n)-time algorithm for the planar is d ϩ 1 because at most d ϩ 1 points Euclidean 1-center problem. Using the are needed to determine the smallest prune-and-search paradigm, one can, enclosing ball. This problem, however, however, solve the 1-center problem in is not basis regular (the smallest enclos- linear time [Dyer 1986], and this ap- ing ball may be determined by any num- proach extends to higher dimensions, ber, between 2 and d ϩ 1, of points), where, for any fixed d, the running time and a naive implementation of the ba- is dO(d)n [Agarwal et al. 1993c; Chazelle sis-changing operation may be quite and Matous˘ek 1996; Dyer and Frieze costly (in d). Nevertheless, Ga¨rtner 1989]. Megiddo [1989; Megiddo and Ze- [1995] showed that this operation can mel 1986] extends this approach to ob- be performed in this case using expected ͌ tain a linear-time algorithm for the eO( d) arithmetic operations. Hence, the weighted 1-center problem. Dynamic expected running time of the algorithm ͌ data structures for maintaining the is O(d2n) ϩ eO( d log d). smallest enclosing ball of a set of points, There are several extensions of the as points are being inserted and de- smallest-enclosing-ball problem. They leted, are given in Agarwal and Ma- include (i) computing the smallest en- tous˘ek [1995] and Bar-Yehuda et al. closing ellipsoid of a point set,7 (ii) com- [1993]. See Drezner [1981, 1989], puting the largest ellipsoid (or ball) in- Drezner et al. [1992], Follert et al. scribed inside a convex polytope in ޒd [1995], and Megiddo [1983c] for other [Ga¨rtner 1995], (iii) computing a small- variants of the 1-center problem. A nat- est ball that intersects (or contains) a ural extension of the 1-center problem is given set of convex objects in ޒd (see to find a disk of the smallest radius that Megiddo [1989]), and (iv) computing a contains k of the n input points. The best known deterministic algorithm ϩ 6 In this article, the meaning of complexity bounds runs in time O(n log n nk log k) ␧ Ͼ ϩ 2 that depend on an arbitrary parameter 0, using O(n k log k) space [Datta et al. such as the one stated here, is that given any ␧ Ͼ 1995; Eppstein and Erickson 1994] (see 0, we can fine-tune the algorithm so that its also Efrat et al. [1994]), and the best complexity satisfies the stated bound. In these known randomized algorithm runs in bounds the constant of proportionality usually ϩ depends on ␧, and tends to infinity when ␧ tends O(n log n nk) expected time using to zero. O(nk) space, or in O(n log n ϩ nk log k) 7 Please see Chazelle and Matous˘ek [1996], Dyer expected time using O(n) space [Ma- [1992], Post [1984], and Welzl [1991].

ACM Computing Surveys, Vol. 30, No. 4, December 1998 432 • P. K. Agarwal and M. Sharir smallest area annulus containing a best near-quadratic solution, by Jarom- given planar point set. All these prob- czyk and Kowaluk [1994], which runs in lems are known to be LP-type, and thus O(n2 log n) time; see also Jaromczyk can be solved using the algorithm de- and Kowaluk [1995a]. scribed in Section 6. However, not all of Major progress on this problem was them run in subexponential expected recently made by Sharir [1997], who time because they are not all basis reg- gave an O(n log9 n)-time algorithm, by ular. Linear-time deterministic algo- combining the parametric-searching rithms, based on the prune-and-search technique with several additional tech- technique, have also been developed for niques, including a variant of the ma- many of these problems in two dimen- trix-searching algorithm of Frederick- sions.8 son and Johnson [1984]. Eppstein [1997] has simplified Sharir’s algo- Euclidean 2-Center. In this problem rithm, using randomization and better we want to cover a set D of n points in data structures, and obtained an im- ޒd by two balls of smallest possible proved solution, whose expected run- common radius. There is a trivial 2 ϩ ning time is O(n log n). d 1)-time algorithm for the 2-center O(n Recently Agarwal et al. [1997] have problem in ޒd, because the clusters D 1 developed an O(n4/3 log5 n)-time algo- and D in an optimal solution can be 2 rithm for the discrete 2-center problem. separated by a hyperplane [Drezner The decision problem in this case asks 1984b]. Faster algorithms have been de- whether, given a radius r Ͼ 0, there veloped for the planar case using para- exist two points p, q ʦ D so that the metric searching. Agarwal and Sharir disks of radius r centered at p and q [1994] gave an O(n2 log n)-time algo- cover all the points in D.IfweletB(p) rithm for determining whether D can be denote the disk of radius r centered at a covered by two disks of radius r. Their point p, then the problem is equivalent algorithm proceeds as follows. There are to determining whether all disks in the O(n2) distinct subsets of D that can be set Ꮾ ϭ {B(p)͉p ʦ D} can be hit by two covered by a disk of radius r, and these points of D. For a point p ʦ D, let K ϭ 2 log n) p subsets can be computed in O(n പ{B ʦ Ꮾ͉p ʦ͞ B}. If p is one of the two time, by processing the arrangement of points in a solution to the hitting set the n disks of radius r, centered at the problem, then the other point has to lie points of D. For each such subset D1, in Kp. Hence, two points of D hit all the گ the algorithm checks whether D D1 can Ꮾ ഫ disks of if and only if pʦD Kp con- be covered by another disk of radius r. tains at least one point of D. Exploiting Using a dynamic data structure, the 2 several geometric and topological prop- total time spent is shown to be O(n erties of ഫ K , Agarwal et al. pre- log n). Plugging this algorithm into the pʦD p sented an O(n4/3 log4 n)-time algorithm parametric searching machinery, one for deciding whether ഫ K പ D ϭ À, 2 log3 n)-time algorithm pʦD p obtains an O(n which leads to the overall performance for the Euclidean 2-center problem. Ma- of the algorithm as stated previously. It tous˘ek [1991b] gave a simpler random- is an open question whether a near- ized algorithm with O(n2 log2 n) ex- linear algorithm exists for this problem. pected time by replacing parametric searching with randomization. The run- Rectilinear p-Center. In this problem ning time of the decision algorithm was the metric is the Lϱ-distance, so the improved by Hershberger [1993] to decision problem is now to cover the 2), which has been utilized in the O(n given set D by a set of p axis-parallel cubes, each of length 2r. The problem is 8 Please see Bhattacharya et al. [1991a,b], Bhatta- NP-hard if p is part of the input and charya and Toussaint [1991], and Jadhav et al. d Ն 2, or if d is part of the input and [1996]. p Ն 3 [Fowler et al. 1981; Megiddo

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 433

1990]. Ko et al. [1990] showed that com- [1986]. They also gave an O(n2 log n)- puting a solution set S with c(D, S) Ͻ time algorithm for the weighted case, 2r* is also NP-hard. which was improved to O(n log n)by The rectilinear 1-center problem is Houle et al. [1989]. trivially solved in linear time, and a For the 2-line-center problem in the polynomial-time algorithm for the recti- plane, Agarwal and Sharir [1994] (see linear 2-center problem, even if d is also Agarwal and Sharir [1991]) gave an unbounded, is given in Megiddo [1990]. O(n2 log5 n)-time algorithm, using A linear-time algorithm for the planar parametric searching. This algorithm is rectilinear 2-center problem is given by very similar to their 2-center algorithm; Drezner [1987] (see also Ko and Ching that is, the decision algorithm finds all [1992]); Ko and Lee [1991] give an O(n subsets of S that can be covered by a log n)-time algorithm for the weighted strip of width w and for each such sub- گ case. Recently, Sharir and Welzl [1996] set S1, it determines whether S S1 can have developed a linear-time algorithm be covered by another strip of width w. for the rectilinear 3-center problem by The heart of this decision procedure is showing that it is an LP-type problem an efficient algorithm for the following (as is the rectilinear 2-center problem). offline width problem. Given a sequence ⌺ϭ ␴ ␴ They have also obtained an O(n log n)- ( 1, ..., n) of insertions and time algorithm for computing a rectilin- deletions of points in a planar set D and ear 4-center, using the matrix-searching a real number w, is there an i such that technique by Frederickson and Johnson; after performing the first i updates, the they have shown that this algorithm is width of the current point set is at most optimal in the worst case. Recently w? A solution to this off-line width prob- Chan [1998] developed an O(n log n) lem, that runs in O(n2 log3 n) time, is expected time randomized algorithm for given in Agarwal and Sharir [1991]. The computing a rectilinear 5-center. See running time for the optimization prob- Katz and Nielsen [1996] and Sharir and lem was improved to O(n2 log4 n)by Welzl [1996] for additional related re- Katz and Sharir [1993] and Glozman et sults. al. [1995], using expander graphs and the Frederickson–Johnson matrix 7.2 Euclidean p-Line-Center searching technique, respectively. The best known algorithm, by Jaromczyk Let D be a set of n points in ޒd and ␦ be and Kowaluk [1995b], runs in O(n2 the Euclidean distance function. We log2 n) time. It is an open problem wish to compute the smallest real value whether a subquadratic algorithm ex- w* so that D can be covered by the ists for computing a 2-line center. union of p strips of width w*. Megiddo and Tamir [1982] showed that the prob- 7.3 Euclidean p-Median lem of determining whether w* ϭ 0 (i.e., D can be covered by p lines) is Let D be a set of n points in ޒd.We NP-hard, which not only proves that the wish to compute a set S of p supply p-line-center problem is NP-complete, points so that the sum of distances from but also proves that approximating w* each demand point to its nearest supply within a constant factor is NP-complete. point is minimized (i.e., we want to min- Approximation algorithms for this prob- imize the objective function cЈ(D, S)). lem are given in Hassin and Megiddo This problem can be solved in polyno- [1991]. mial time for d ϭ 1 (for d ϭ 1 and p ϭ The 1-line center is the classical 1 the solution is the median of the given width problem. For d ϭ 2, an O(n points, whence the problem derives its log n)-time algorithm was given by name), and it is NP-hard for d Ն 2 Houle and Toussaint [1988]. A matching [Megiddo and Supowit 1984]. The spe- lower bound was proved by Lee and Wu cial case of d ϭ 2, p ϭ 1 is the classical

ACM Computing Surveys, Vol. 30, No. 4, December 1998 434 • P. K. Agarwal and M. Sharir

Fermant–Weber problem, and it goes back to the seventeenth century. It is known that the solution for the Fer- mant–Weber problem is unique and al- gebraic provided that all points of D are not collinear. Several numerical ap- proaches have been proposed to com- pute an approximate solution. See Chandrasekaran and Tamir [1990] and Fig. 4. The segment-center problem. Wesolowsky [1993] for the history of the problem and for the known algorithms, and Papadimitriou [1981] for some heu- H. Using Davenport–Schinzel sequences ristics for the p-median problem that [Sharir and Agarwal 1995], Agarwal et work well for a set of random points. al. [1993b] showed that the complexity Recently, Arora et al. [1998] described of FP is O(n22␣(n)), and that it can be ϩ ␧ ␣ an (1 )-approximation algorithm for computed in time O(n22 (n) log n). By the p-median problem in the plane exploiting various geometric and combi- O(1/␧) Ͼ whose running time is n . For d natorial properties of FP and using 2, the running time of their algorithm is O((log n/␧)dϪ1) some elegant results from combinatorial n . geometry, Efrat and Sharir [1996] showed that the complexity of FP is 7.4 Segment-Center only O(n log n), and that one can deter- mine in time O(n1ϩ␧) whether FP Þ À. ޒ2 Given a set D of n demand points in Plugging this into the parametric and a segment e, we wish to find a searching technique, one obtains an translated and rotated copy of e so that O(n1ϩ␧)-time solution to the segment- the maximum distance from each point center problem. of D to this copy is minimized. This problem was originally considered by 7.5 Other Facility-Location Problems Imai et al. [1992], who had given an O(n4log n)-time algorithm. An improved In addition to the problems discussed, solution, based on parametric search- several other variants of the facility- ing, with O(n2␣(n)log3 n) running time, location problem have been studied. For was later obtained by Agarwal et al. example, Hershberger [1992] described [1993b] (here ␣(n) denotes the ex- an O(n2/log log n)-time algorithm for tremely slowly growing inverse of Ack- partitioning a given set S of n points ermann’s function). The decision prob- into two subsets so that the sum of their lem in this case is to determine whether diameters is minimized. If we want to there exists a translated and rotated minimize the maximum of the two di- ϭ Q copy of the hippodrome H e Br, the ameters, the running time can be im- Minkowski sum of the segment e with a proved to O(n log n) [Hershberger and disk of radius r, which fully contains D. Suri 1991]. Glozman et al. [1995] have Since H is convex, this is equivalent to studied problems of covering S by sev- H containing P ϭ conv(D). Hence, the eral different kinds of shapes. Maass decision procedure can be stated as fol- [1986] showed that the problem of cov- lows. Given a convex polygon P and the ering S with the minimum number of hippodrome H, does H contain a trans- unit-width annuli is NP-hard even for lated and rotated copy of P? See Figure d ϭ 1 (a unit-width annulus in ޒ1 is a 4. Note that placements of P can be union of two unit-length intervals), and specified in terms of three parameters, Hochbaum and Maass [1987] gave an two for the translation and one for the approximation algorithm for covering rotation. Let FP ʕ ޒ3 denote the set of points with annuli. There has been placements of P at which P lies inside some work on hierarchical clustering

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 435

rithm takes O(͉S͉ log ͉S͉) expected time. ͉ ͉ Յ Since p is chosen randomly, S1 2͉S͉/3 with high probability, which im- plies that the expected running time of the overall algorithm is O(n log n). It was a challenging open problem Fig. 5. A randomized algorithm for computing whether an O(n log n)-time determinis- the diameter in 3-D. tic algorithm can be developed for com- puting the intersection of n congruent balls in ޒ3. This has been answered in [Eppstein 1998; Yianilos 1993] and on the affirmative by Amato et al. [1994], dynamic algorithms for clustering [Can following a series of near-linear, but 1993; Charikar et al. 1997]. weaker, deterministic algorithms [Cha- zelle et al. 1993; Matous˘ek and Schwar- 8. PROXIMITY PROBLEMS zkopf 1996; Ramos 1997b]. Amato et al. derandomized the Clarkson–Shor algo- 8.1 Diameter in ޒ3 rithm, using several sophisticated tech- niques.9 Their algorithm yields an O(n Given a set S of n points in ޒ3, we wish log3 n)-time algorithm for computing to compute the diameter of S, that is, the diameter. Recently, Ramos [1997a] the maximum distance between any two and Bespamyatnikh [1998] obtained points of S. The decision procedure here O(n log2 n)-time algorithms for comput- is to determine, for a given radius r, ing the diameter. Obtaining an optimal whether the intersection of the balls of O(n log n)-time deterministic algorithm radius r centered at the points of S for computing the diameter in ޒ3 still contains S. The intersection of congru- remains elusive. ent balls in ޒ3 has linear complexity [Gru¨ nbaum 1956; Heppes 1956], there- 8.2 Closest Line Pair fore it is natural to ask whether the inter- ޒ3 section of n congruent balls can be com- Given a set L of n lines in , we wish to compute a closest pair of lines in L. puted in O(nlog n) time. (Checking Ј whether all points of S lie in the intersec- Let d(L, L ) denote the Euclidean dis- tance between the closest pair of lines tion can then be performed in additional ϫ Ј Ј O(nlog n) time, using straightforward in L L , for two disjoint sets of L, L point-location techniques.) Clarkson and of lines. Two algorithms for this prob- Shor [1989] gave a simple randomized lem, both based on parametric search- algorithm with O(nlog n) expected time ing, were given independently by Cha- zelle et al. [1993] and by Pellegrini (which is worst-case optimal) for com- 8/5ϩ␧ puting the intersection, and then used a [1994]; both algorithms run in O(n ) randomized prune-and-search algo- time. Using Plu¨ cker coordinates [Chazelle rithm, summarized in Figure 5, to com- et al. 1996; Sommerville 1951] and range- pute the diameter of S. searching data structures, the algorithms construct, in O(n8/5ϩ␧) time, a family of The correctness of the preceding algo- Ј Ј rithm is easy to check. The only non- pairs {(L1, L1), ..., (Lk, Lk)}, so that every line in Li lies below (in the z-direc- trivial step in the algorithm is comput- Ј Ј ϭ ␦ tion) all the lines of Li and d(L, L ) ing I and S1.If is the Euclidean Ј ͉ ͉ min1ՅiՅk d(Li, Li). Hence, it suffices to metric, I can be computed in O( S ex- ϫ Ј pected time, using the ball-intersection compute a closest pair in Li Li, for each i Յ k, which can be done using paramet- algorithm. S1 can then be computed in additional O(͉S͉ log ͉S͉) time, using any optimal planar point-location algorithm 9 An earlier attempt by Bro¨nnimann et al. [1993] (see, e.g., Sarnak and Tarjan [1986]). to derandomize the Clarkson–Shor algorithm had Hence, each recursive step of the algo- an error.

ACM Computing Surveys, Vol. 30, No. 4, December 1998 436 • P. K. Agarwal and M. Sharir

ric searching. The decision procedure can with combinatorial dimension at most be stated as follows. For a given real d ϩ 2 (or d ϩ 1, if the polytopes do not Ј Յ number r, determine whether d(Li, Li) intersect). It is also shown there that r, for each i Յ k. Since lines in ޒ3 have the primitive operations can be per- ͌ four degrees of freedom, each of these formed with expected eO( d) arithmetic subproblems can be transformed to the operations. Hence, the problem can be following point-location problem in ޒ4. solved by the general LP-type algo- Given a set S of n points in ޒ4 (represent- rithm, whose expected number of arith- ing the lines in L ) and a set ⌫ of m metic operations is O(d2n) ϩ i ͌ surfaces, each being the graph of an alge- eO( d log d), where n is the total number ᏼ ᏼ ϭ braic trivariate function of constant de- of facets in 1 and 2. For d 2, the gree (each surface is the locus lines in ޒ3 maximum and the minimum distance Ј that pass above a line of Li at distance r between two convex polygons can be from it), determine whether every point computed in O(log n) time, assuming ⌫ in S lies below all the surfaces of .Itis that the vertices of each Pi are stored in shown in Chazelle et al. [1993] that this an array, sorted in a clockwise order point-location problem can be solved in [Edelsbrunner 1985]. time O(n4/5ϩ␧ m4/5ϩ␧), which implies an ϩ␧ O(n8/5 )-time algorithm for computing 8.4 Selecting Distances d(L, LЈ). Agarwal and Sharir [1996a] have shown that d(L , LЈ) can be com- Let S be a set of n points in the plane, ϩ␧ iϩ␧ i Յ Յ n puted in O(n3/4 m3/4 ) expected time, and let 1 k (2) be an integer. We by replacing parametric searching with wish to compute the kth smallest dis- randomization and by exploiting certain tance between a pair of points of S. This geometric properties that the surfaces in can be done using parametric searching. ⌫ possess. Roughly speaking, this is ac- The decision problem is to compute, for complished by generalizing the Clarkson– a given real r, the sum Shor algorithm for computing the diame- ͸ ͉D ͑ p͒ പ ͑S Ϫ ͕ p͖͉͒, ter, described in Figure 5. However, this r algorithm does not improve the running pʦS time for computing d(L, LЈ), because we 8/5ϩ␧ where Dr(p) is the closed disk of radius still need O(n ) time for constructing r centered at p. (This sum is twice the Ј the pairs (Li, Li). number of pairs of points of S at dis- If we are interested in computing a tance Յr.) Agarwal et al. [1993a] gave pair of lines with the minimum vertical a randomized algorithm, with O(n4/3 distance, the running time can be im- 4/3 4/3ϩ␧ log n) expected time, for the decision proved to O(n ) [Pellegrini 1994]. problem, using the random-sampling technique of Clarkson and Shor [1989], 8.3 Distance Between Polytopes which yields an O(n4/3 log8/3 n) expected- time algorithm for the distance-selection We wish to compute the Euclidean dis- problem. Goodrich [1993] derandomized ᏼ ᏼ tance d( 1, 2) between two given con- this algorithm, at a cost of an additional ᏼ ᏼ ޒd vex polytopes 1 and 2 in . If the polylogarithmic factor in the running polytopes intersect, then this distance is time. Katz and Sharir [1997] obtained an 0. If they do not intersect, then this expander-based O(n4/3 log3ϩ␧ n)- time distance equals the maximum distance (deterministic) algorithm for this prob- between two parallel hyperplanes sepa- lem. See also Salowe [1989]. rating the polytopes; such a pair of hy- perplanes is unique, and they are or- 8.5 Shape Matching thogonal to the segment connecting two ʦ ᏼ ʦ ᏼ ϭ points a 1 and b 2 with d(a, b) Let P and Q be two polygons with m ᏼ ᏼ d( 1, 2). It is shown by Ga¨rtner and n edges, respectively. The problem [1995] that this problem is LP-type, is to measure the resemblance between

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 437

P and Q, that is, to determine how well to higher dimensions at a polylogarithmic a copy of P can fit Q, if we allow P to cost, using parametric searching. translate or to both translate and ro- tate. The is one of 8.6 Surface Simplification the common ways of measuring resem- blance between two (fixed) sets P and A generic surface-simplification prob- lem is defined as follows. Given a poly- Q [Huttenlocher and Kedem 1990]; it is ޒ3 defined as hedral object P in and an error pa- rameter ␧ Ͼ 0, compute a polyhedral H͑P, Q͒ ϭ max͕max min d͑a, b͒, approximation ⌸ of P with the mini- aʦP bʦQ mum number of vertices, so that the ⌸ ͑ ͖͒ maximum distance between P and is max min d a, b , at most ␧. There are several ways of aʦQ bʦP defining the maximum distance be- where d(⅐, ⅐) is the underlying metric, tween P and ⌸, depending on the appli- usually the Euclidean distance. cation. We refer to an object that lies If we allow P to translate only, then within ␧ distance from P as an ␧-approx- ϩ imation of P. Surface simplification is a we want to compute minv H(P v, Q). The problem has been solved by Agar- central problem in graphics, geographic wal et al. [1994], using parametric information systems, scientific comput- searching, in O((mn)2 log3 (mn)) time, ing, and visualization. which is significantly faster than the One way of solving the problem is to previously best known algorithm by Alt run a binary search on the number of et al. [1995]. If P and Q are finite sets of vertices of the approximating surface. points, with ͉P͉ ϭ m and ͉Q͉ ϭ n,a We then need to solve the decision prob- more efficient solution, not based on lem of determining whether there exists ␧ parametric searching, is proposed by an -approximation with at most k ver- Huttenlocher et al. [1993]. Their solu- tices, for some given k. Unfortunately, tion, however, does not apply to the case this problem is NP-hard [Agarwal and of polygons. If we measure distance by Suri 1994], so one seeks efficient tech- niques for computing an ␧-approxima- the Lϱ-metric, faster algorithms, based on parametric searching, are developed tion of size (number of vertices) close to in Chan [1998], Chew et al. [1995], and kOPT, where kOPT is the minimum size ␧ Chew and Kedem [1992]. of an -approximation. Although several If we allow P to translate and rotate, ad hoc algorithms have been developed ␧ 10 then computing the minimum Haus- for computing an -approximation, dorff distance becomes significantly none of them guarantees any reasonable harder. Chew et al. [1997] gave an bound on the size of the output, and O(m2n2log3 mn)-time algorithm when many of them do not even ensure that both P and Q are finite point sets, and the maximum distance between the in- an O(m3n2 log3 mn)-time algorithm when put and the output surface is indeed at ␧ P and Q are polygons. most . There has been some recent Another way of measuring the resem- progress on developing polynomial-time blance between two polygons P and Q is approximation algorithms for comput- ␧ by computing the area of their intersec- ing -approximations in some special tion (or, rather, of their symmetric dif- cases. ference). Suppose we wish to minimize The simplest, but nevertheless an in- the area of the symmetric difference teresting, special case is when P is a between P and Q, under translation of convex polytope (containing the origin). P. For this case, de Berg et al. [1996] ϩ ϩ gave an O((m n)log(m n))-time algo- 10 Please see De Floriani [1987], DeHaemer and rithm, using the prune-and-search par- Zyda [1991], Hoppe et al. [1993, 1994], and adigm. Their algorithm can be extended Magillo and De Floriani [1996].

ACM Computing Surveys, Vol. 30, No. 4, December 1998 438 • P. K. Agarwal and M. Sharir

In this case we wish to compute another Clarkson’s randomized algorithm can be convex polytope Q with the minimum extended to compute a polyhedral ter- Ϫ ␧ ʕ 2 2 number of vertices so that (1 )P rain of size O(kOPT log kOPT)inex- ʕ ϩ ␧ ʕ ʕ 2ϩ␦ ϩ 3 3 Q (1 )P (or so that P Q pected time O(n kOPT log kOPT). (1 ϩ ␧)P). We can thus pose a more The survey paper by Heckbert and Gar- general problem: given two convex poly- land [1995] summarizes most of the ʕ ޒ3 topes P1 P2 in , compute a convex known results on terrain simplification. polytope Q with the minimum number Instead of fixing ␧ and minimizing the ʕ ʕ of vertices such that P1 Q P2. Das size of the approximating surface, we and Joseph [1990] have attempted to can fix the size and ask for the best prove that this problem is NP-hard, but approximation. That is, given a polyhe- their proof contains an error, and it still dral surface P and an integer k, com- remains an open problem. Mitchell and pute an approximating surface Q that Suri [1995] have shown that there ex- has at most k vertices, whose distance ists a nested polytope Q with at most from P is the smallest possible. Very 3kOPT vertices, whose vertices are a little is known about this problem, ex- subset of the vertices of P2. The problem cept in the plane. Goodrich [1995] can now be formulated as a hitting-set showed that, given a set S of n points in problem, and, using a greedy approach, the plane, an x-monotone polygonal they presented an O(n3)-time algorithm chain Q with at most k vertices that for computing a nested polytope with minimizes the maximum vertical dis- O(kOPT log n) vertices. Clarkson [1993] tance between Q and the points of S can showed that the randomized technique be computed in time O(nlog n). His al- described in Section 5 can compute a gorithm is based on the parametric- nested polytope with O(kOPT log kOPT) searching technique and uses Cole’s im- vertices in O(nlogcn) expected time, for provement of parametric searching. some constant c Ͼ 0. Bro¨nnimann and (See Goodrich [1995] for related work on Goodrich [1995] extended Clarkson’s al- this problem). If the vertices of Q are gorithm to obtain a polynomial-time de- required to be a subset of S, the best terministic algorithm that constructs a known algorithm is by Varadarajan nested polytope with O(kOPT) vertices. [1996]; it is based on parametric search- A widely studied special case of sur- ing, and its running time is O(n4/3ϩ␧). face simplification, motivated by appli- cations in geographic information sys- 9. STATISTICAL ESTIMATORS AND tems and scientific computing is when P RELATED PROBLEMS is a polyhedral terrain (i.e., the graph of a continuous piecewise-linear bivariate 9.1 Plane Fitting function). In most of the applications, P is represented as a finite set of n points, Given a set S of n points in ޒ3, we wish sampled from the input surface, and the to fit a plane h through S so that the goal is to compute a polyhedral terrain maximum distance between h and the Q with the minimum number of verti- points of S is minimized. This is the ces, such that the vertical distance be- same problem as computing the width tween any point of P and Q is at most ␧. of S (the smallest distance between a Agarwal and Suri [1994] showed that pair of parallel supporting planes of S), this problem is NP-hard. They also gave which is considerably harder than the a polynomial-time algorithm for com- two-dimensional variant mentioned in puting an ␧-approximation of size Section 7.2. Houle and Toussaint [1988] 2 O(kOPT log kOPT), by reducing the prob- gave an O(n )-time algorithm for com- lem to a geometric set-cover problem, puting the width in ޒ3. This can be but the running time of their algorithm improved using parametric searching. is O(n8), which is rather high. Agarwal The decision procedure is to determine, and Desiken [1997] have shown that for a given distance w, whether the

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 439 convex hull of S has two antipodal date intersection points explicitly; their edges, such that the two parallel planes algorithm runs in O(n8/5ϩ␧) time; see containing these edges are supporting also Agarwal et al. [1997a] for an im- planes of S and lie at distance Յw. (One proved solution. Using randomization also needs to consider pairs of parallel and an improved analysis, the expected planes, one containing a facet of conv(S) running time was improved to O(n3/2ϩ␧) and the other passing through a vertex. by Agarwal and Sharir [1996a]. Finding However, it is easy to test all these an annulus of minimum area that con- pairs in O(nlog n) time.) The major tains S is a simpler problem, since it technical issue here is to avoid having can be formulated as an instance of to test quadratically many pairs of an- linear programming in ޒ4, and can thus tipodal edges, which may exist in the be solved in O(n) time [Megiddo 1984]. worst case. Chazelle et al. [1993] gave Recently, researchers have studied the an algorithm that is based on parametric problem of fitting a circle of a given sesearching and runs in time O(n8/5ϩ␧) radius through S so that the maximum (see Agarwal et al. [1997a] for an im- distance between S and the circle is proved bound). They reduced the width minimized. This problem is consider- problem to the problem of computing a ably simpler and can be solved in O(n closest pair between two sets L, LЈ of log n) time [de Berg et al. 1997; Duncan lines in ޒ3 (each line containing an edge et al. 1997]. In certain applications of the convex hull of S), such that each [Hocken 1993; Roy and Zhang 1992; line in L lies below all the lines of LЈ. Voekker 1993], one wants to fit a circle The fact that this latter problem now C through S so that the sum of dis- has an improved O(n3/2ϩ␧) expected- tances between C and the points of S is time solution (see Section 8.2 and Agar- minimized. No algorithm is known for wal and Sharir [1996a]) implies that the computing an exact solution, although width can also be computed in expected several numerical techniques have been time O(n3/2ϩ␧). See Korneenko and proposed; see Berman [1989], Landau Martini [1993], Matous˘ek et al. [1993], [1987], and Thomas and Chen [1989]. Stein and Werman [1992a,b], and Vara- See Garcı´a-Lopez and Ramos [1997], Le darajan and Agarwal [1995] for other and Lee [1991], Mehlhorn et al. [1997], results on hyperplane fitting. and Swanson [1995] for other variants of the circle-fitting problem and for 9.2 Circle Fitting some special cases.

Given a set S of n points in the plane, 9.3 Cylinder Fitting we wish to fit a circle C through S so that the maximum distance between the Given a set S of n points in ޒ3, we wish points of S and C is minimized. This is to find a cylinder of the smallest radius equivalent to finding an annulus of min- that contains S. Using parametric imum width that contains S. Ebara et searching, the decision problem in this al. [1989] observed that the center of a case can be rephrased as; given a set Ꮾ minimum-width annulus is either a ver- of n balls of a fixed radius r in ޒ3, tex of the closest-point Voronoi diagram determine whether there exists a line of S, a vertex of the farthest-point that intersects all the balls of Ꮾ (the Voronoi diagram, or an intersection balls are centered at the points of S and point of a pair of edges of the two dia- the line is the symmetry axis of a cylin- grams. Based on this observation, they der or radius r that contains S). Agar- obtained a quadratic-time algorithm. wal and Matous˘ek [1994] showed that Using parametric searching, Agarwal et finding such a line can be reduced to al. [1994] showed that the center of the computing the convex hull of a set of n minimum-width annulus can be found points in ޒ9, which, combined with without checking all of the O(n2) candi- parametric searching, leads to an O(n4

ACM Computing Surveys, Vol. 30, No. 4, December 1998 440 • P. K. Agarwal and M. Sharir

O(1) log n)-time algorithm for finding a separating K1 and K2. This implies that smallest cylinder enclosing S; see, for the set of center points is a convex poly- example, Schomer et al. [1996]. The gon with at most 2n edges. bound was recently improved by Agar- Cole et al. [1987] gave an O(n log3 n)- wal et al. [1997b] to O(n3ϩ␧), by show- time algorithm for computing a center ing that the combinatorial complexity of point, using a multidimensional para- the space of all lines that intersect all metric searching. Using the prune-and- the balls of Ꮾ is O(n3ϩ␧), and by design- search paradigm, Matous˘ek [1991a] ob- ing a different algorithm, also based on tained an O(n log3 n)-time algorithm for parametric searching, whose decision computing K1 and K2, which in turn procedure calculates this space of lines yields the set of all center points. Re- and determines whether it is nonempty. cently, Jadhav and Mukhopadhyay Faster algorithms have been developed [1994] gave a linear-time algorithm for for some special cases [Follert et al. computing a center point, using a direct 1995; Scho¨mer et al. 1996]. Agarwal et and elegant technique. al. [1997b] also gave an O(n/␦2)-time Near-quadratic algorithms for com- algorithm to compute a cylinder of ra- puting a center point in three dimen- dius Յ (1 ϩ ␦)r* containing all the sions were developed in Cole et al. points of S, where r* is the radius of the [1987] and Naor and Sharir [1990]. smallest cylinder enclosing S. Clarkson et al. [1996] gave an efficient Note that this problem is different algorithm for computing an approxi- from those considered in the two previ- mate center point in ޒd. ous subsections. The problem analogous to those studied would be to find a cylin- 9.5 Ham-Sandwich Cuts drical shell (a region enclosed between two concentric cylinders) of smallest Let S1, ..., Sd be d (finite) point sets width (difference between the radii of in ޒd.Aham-sandwich cut is a hyper- the cylinders), which contains a given plane h such that each of the two open point set S. This problem is consider- halfspaces bounded by h contains at ͉ ͉  Յ ably harder, and no solution for it that most Si /2 points of Si, for each 1 improves upon the naive brute-force i Յ d. The ham-sandwich theorem (see, technique is known. e.g., Edelsbrunner [1987]) guarantees the existence of such a cut. For d ϭ 2, 9.4 Center Points there is always a ham-sandwich cut whose dual is an intersection point of Given a set S of n points in the plane, the median levels of Ꮽ(L ) and Ꮽ(L ), we wish to compute a center point ␴ ʦ 1 2 2 where Li is the set of lines dual to the ޒ , such that any halfplane containing ϭ ␴   points in Si, for i 1, 2. It can be also contains at least n/3 points of shown that the number of intersection S. It is a known consequence of Helly’s points between the median levels of Theorem that ␴ always exists [Edels- Ꮽ Ꮽ (L1) and of (L2) is always odd. brunner 1987]. In a dual setting, let L Several prune-and-search algorithms be the set of lines dual to the points in have been proposed for computing a S, and let K1, K2 be the convex hulls of     ham-sandwich cut in the plane. the n/3 and 2n/3 levels of the ar- Megiddo [1985] gave a linear-time algo- Ꮽ 11 rangement (L), respectively. The rithm for the special case in which S dual of a center point of S is a line 1 and S2 are linearly separable. Modify- ing this algorithm, Edelsbrunner and 11 The level of a point p with respect to Ꮽ(L) is the Waupotitsch [1986] gave an O(n log n)- number of lines lying strictly below p. The k-level time algorithm when S and S are not of Ꮽ(L) is the closure of the set of edges of Ꮽ(L) 1 2 whose level is k (the level is fixed over an edge of necessarily linearly separable. A linear- Ꮽ(L)); each k-level is an x-monotone connected time, recursive algorithm for this gen- polygonal chain. eral case is given by Lo and Steiger

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 441

[1990]. It works as follows. At each level tains a vertical strip W bounded by two ʕ of recursion, the algorithm maintains vertical lines bl, br, such that I W. two sets of lines, R and B, and two Let k be the total number of vertices Յ integers p, q, such that any intersection of all the Pis lying inside W.Ifk m p Ꮽ point between KR, the p-level of (R), log n, the algorithm explicitly computes q Ꮽ 2 and KB, the q-level of (B), is dual to a I പ W in O(m log n) time. Otherwise, ham-sandwich cut of the original sets; it finds a vertical line ᐉ inside W such moreover, the number of such intersec- that both Wϩ and WϪ contain at least tions is guaranteed to be odd. The goal k/4 vertices, where Wϩ (respectively, is to compute an intersection point of WϪ) is the portion of W lying to the p q KR and KB. Initially R and B are the right (respectively, to the left) of ᐉ.To ϭ sets of lines dual to S1 and S2, and p do so, it finds the vertex with the me- ͉S ͉/2, q ϭ ͉S ͉/2. Let r be a suffi- 1 2 dian x-coordinate of each Pi, and takes ciently large constant. One then com- ᐉϺx ϭ x , where x is an appropriately ⌶ ഫ m m putes a (1/r)-cutting of R B.At weighted median of these median coor- ⌶ least one of the triangles of contains dinates. and odd number of intersection points of By running a binary search on each the levels. By computing the intersec- P , one can determine whether ᐉ inter- tion points of the edges of ⌶ with R ഫ i sects Pi and, if so, obtain the top and B, such a triangle ⌬ can be found in ᐉ ʕ ʕ bottom edges of Pi intersecting . This linear time. Let R⌬ R and B⌬ B be allows us to compute the intersection the subsets of lines in R and B, respec- I പ ᐉ as the intersection of m intervals, tively, that intersect ⌬, and let pЈ (re- Ј in O(m) time. If this intersection is non- spectively, q ) be the number of lines in empty, we stop, since we have found a R (respectively, B) that lie below ⌬.We point in I. Otherwise, if one of the poly- then solve the problem recursively for gons of ᏼ lies fully to the right (respec- R and B with the respective levels ⌬ ⌬ tively, to the left) of ᐉ, then I cannot lie p* ϭ p Ϫ pЈ and q* ϭ q Ϫ qЈ. It easily Ϫ ϩ in W (respectively, in W ); if one poly- follows that the p*-level of Ꮽ(R ) and Ϫ ⌬ gon lies fully in W and another lies the q*-level of Ꮽ(B⌬) intersect at an odd ϩ ͉ ͉ ϩ ͉ ͉ ϭ fully in W , then clearly I ϭ À. Finally, number of points. Since R⌬ B⌬ ᐉ if intersects all the Pis, but their O(n/r), the total running time of the ᐉ recursive algorithm is O(n). Lo et al. intersection along is empty, then, [1994] extend this approach to ޒ3, and following the same technique as in obtain an O(n3/2)-time algorithm for Megiddo’s [1983b] two-dimensional lin- computing ham-sandwich cuts in three ear-programming algorithm, one can de- dimensions. termine, in additional O(m) time, which of Wϩ, WϪ can be asserted not to con- tain I. Hence, if the algorithm has not 10. PLACEMENT AND INTERSECTION stopped, it needs to recourse in only one of the slabs Wϩ, WϪ. Since the algo- 10.1 Intersection of Polyhedra rithm prunes a fraction of the vertices ᏼ ϭ in each stage, it terminates after Given a set {P1,...,Pm}ofm con- vex polyhedra in ޒd, with a total of n O(log n) stages, from which the as- facets, is their common intersection I ϭ serted running time follows easily. പm iϭ1 Pi nonempty? Of course, this is an Reichling [1988b] and Eppstein [1992] instance of linear programming in ޒd extended this approach to d ϭ 3, but with n constraints, but the goal is to their approaches do not extend to obtain faster algorithms that depend on higher dimensions. However, if we have m more significantly than they depend a comparison-based data structure that on n. Reichling [1988a] presented an can determine in O(log n) time whether 2 O(m log n)-time prune-and-search al- a query point lies in a specified Pi, then, gorithm for d ϭ 2. His algorithm main- using multidimensional parametric

ACM Computing Surveys, Vol. 30, No. 4, December 1998 442 • P. K. Agarwal and M. Sharir

searching, we can determine in time an O(m logO(1) n) whether I Þ À. 2 3 O͑m n␭6͑mn͒log mn log log mn͒

10.2 Polygon Placement time deterministic algorithm, or an ␭ 4 O(mn 6(mn)log mn) expected-time Let P be a convex m-gon, and let Q be a randomized algorithm, for computing a closed planar polygonal environment largest similar placement of P inside Q. with n edges. We wish to compute the Faster algorithms are known for com- largest similar copy of P (under transla- puting a largest placement of P inside Q tion, rotation, and scaling) that can be in some special cases. If both P and Q placed inside Q. Using generalized are convex, then a largest similar copy Delaunay triangulation induced by P of P inside Q can be computed in time within Q, Chew and Kedem [1993] ob- O(mn2 log n) [Agarwal et al. 1998]; if P 4 2 ␣(n) tained a O(m n 2 log n)-time algo- is not allowed to rotate, then the run- rithm. Faster algorithms have been de- ning time is O(m ϩ n log2 n) [Toledo veloped using parametric searching 1991]. [Agarwal et al. 1997c; Sharir and Toledo The biggest-stick problem is another 1994]. The decision problem in this case interesting special case of the largest- can be defined as follows. Given a con- placement problem; here Q is a simple vex polygon B with m edges (a scaled polygon and P is a line segment. In this copy of P) and a planar polygonal envi- case, we are interested in finding the ronment Q with n edges, can B be longest segment that can be placed in- placed inside Q (allowing translation side Q. This problem can be solved us- and rotation)? Each placement of B can ing a divide-and-conquer algorithm, de- be represented as a point in ޒ3, using veloped in Agarwal et al. [1994], and two coordinates for translation and one later refined in Agarwal et al. [1997a] for rotation. Let FP denote the resulting and Agarwal and Sharir [1996a]. It pro- three-dimensional space of all free ceeds as follows. Partition Q into two ᐉ placements of B inside Q. FP is the simple polygons Q1, Q2 by a diagonal union of a collection of cells of an ar- so that each of Q1 and Q2 has at most rangement of O(mn) contact surfaces in 2n/3 vertices. Recursively compute the ޒ3. Leven and Sharir [1987] have shown longest segment that can be placed in that the complexity of FP is each Q , and then determine the longest ␭ ␭ i O(mn 6(mn)), where s(n) is the maxi- segment that can be placed in Q and mum length of a Davenport–Schinzel that intersects the diagonal ᐉ. The deci- sequence of order s composed of n sym- sion algorithm for the merge step is to bols [Sharir and Agarwal 1995] (it is determine whether there exists a place- almost linear in n for any fixed s). ment of a line segment of length w that Sharir and Toledo [1994] gave an lies inside Q and crosses ᐉ. Agarwal et 2 ␭ O(m n 6(mn)log mn)-time algorithm to al. [1994] have shown that this problem determine whether FP Þ À: they first can be reduced to the following. We are compute a superset of the vertices of FP, given a set S of points and a set ⌫ of ␭ 4 in O(mn 6(mn)log mn) time, and then algebraic surfaces in ޒ , where each spend O(m log n) time for each of these surface is the graph of a trivariate func- vertices to determine whether the corre- tion, and we wish to determine whether sponding placement of B is free, using a every point of S lies below all the surfaces triangle range-searching data structure. of ⌫. Agarwal and Sharir [1996a] gave a Recently, Agarwal et al. [1997c] gave an randomized algorithm with O(n3/2ϩ␧) ex- ␭ O(mn 6(mn) log mn) expected-time ran- pected running time for this point-loca- domized algorithm to compute FP. Plug- tion problem. Using randomization, in- ging these algorithms into the paramet- stead of parametric searching, they ric-searching machinery, one can obtain obtained an O(n3/2ϩ␧) expected-time pro-

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 443

cedure for the overall merge step (finding example, they given an O(n5/3 log6/5 n)- the biggest stick that crosses ᐉ). The total time algorithm for determining whether running time of the algorithm is therefore a collision occurs in a set of points, each also O(n3/2ϩ␧). Finding a longest segment moving in the plane along a line with inside Q whose endpoints are vertices of constant velocity. Q is a simpler problem, and can be solved by a linear-time algorithm due to Hersh- 11. QUERY-TYPE PROBLEMS berger and Suri [1993b]. Parametric searching has also been suc- cessfully applied in designing efficient 10.3 Collision Detection data structures for a number of query- Let P and Q be two (possibly nonconvex) type problems. In this section we dis- polyhedra in ޒ3. P is assumed to be cuss a few of these problems, including fixed and Q to move along a given tra- ray shooting and linear-optimization jectory ␲. The goal is to determine the queries. first position on ␲, if any, at which Q intersects P. This problem can be solved 11.1 Ray Shooting using parametric searching. Suppose, The general ray-shooting problem can for example, that Q is only allowed to be defined as follows. Preprocess a given translate along a line. Then the decision set S of objects in ޒd (usually d ϭ 2or problem is to determine whether Q in- 3), so that the first object hit by a query tersects P as it translates along a seg- ray can be computed efficiently. The ޒ3 ϭ Q ment e in . Let Qe Q e be the ray-shooting problem arises in com- Minkowski sum of Q and e. Then Q puter graphics, visualization, and in intersects P as it translates along e if many other geometric problems [Agar- and only if Qe intersects P. This inter- 8/5ϩ␧ wal and Matous˘ek 1993, 1994, 1995; section problem can be solved in O(n ) Pellegrini 1996]. The connection be- time using simplex range-searching data tween ray shooting and parametric structures [Pellegrini 1993; Scho¨mer and searching was observed by Agarwal and Thiel 1995]. Plugging this into the para- Matous˘ek [1993]. Here the decision metric-searching machinery, we can com- 8/5ϩ␧ problem is to determine, for a specified pute, in O(n ) time, the first intersec- point ␴ on the query ray ␳, whether the tion of Q with P as Q moves along a line. initial segment s␴ of ␳ intersects any ᐉ If Q rotates around a fixed axis , object in S (where s is the origin of ␳). then the decision problem is to deter- Hence, we need to execute generically, mine whether Q intersects P as it ro- in the parametric-searching style, an ␪ tates by a given angle from its initial appropriate intersection-detection query position. In this case, each edge of procedure on the segment s␴, where ␴ is Q sweeps a section of a hyperboloid. the (unknown) first intersection point of ␳ Scho¨mer and Thiel [1995] have shown and the objects in S. Based on this tech- that, using a standard linearization nique, several efficient ray-shooting data technique (as described in Agarwal and structures have been developed.12 We il- Matous˘ek [1994] and Yao and Yao lustrate this technique by giving a simple [1985]), the intersection-detection prob- example. lem can be formulated as an instance of Let S be a set of n lines in the plane, simplex range searching in ޒ5, and can 8/5ϩ␧ and let S* be the set of points dual to be solved in time O(n ). Plugging the lines of S. A segment e intersects a this algorithm into the parametric- line of S if and only if the double-wedge searching technique, we can also compute the first intersection in time O(n8/5ϩ␧). Gupta et al. [1994] have studied vari- 12 Please see Agarwal et al. [1997a], Agarwal and ous collision-detection problems for a Matous˘ek [1993], and Agarwal and Sharir set of moving points in the plane. For [1996b,c].

ACM Computing Surveys, Vol. 30, No. 4, December 1998 444 • P. K. Agarwal and M. Sharir

Fig. 6. A ray-shooting query.

e* dual to e contains a point of S*. dure (nv is the size of S*v). By construc- Hence, a segment intersection-detection tion, a line intersects at most c͌r trian- ⌸ query for S can be answered by prepro- gles of v (the partition constructed at cessing S* into a triangle (or a wedge) v), so Ѩe* intersects at most 2c͌r trian- ⌸ range-searching structure; see, for ex- gles of v. Hence, we obtain the follow- ample, Matous˘ek [1992, 1993]. Roughly ing recurrence: speaking, we construct a partition tree ͱ T on S* as follows. We fix a sufficiently Q͑nv͒ Յ 2c rQ͑2nv/r͒ ϩ O͑r͒. large constant r.If͉S*͉ Յ 2r, T consists of a single node storing S*. Otherwise, The solution of the preceding recurrence using a result of Matous˘ek [1992], we is O(n1/2ϩ␧), for any ␧ Ͼ 0, provided r is construct, in O(n) time, a family of chosen sufficiently large (as a function ⌸ϭ ⌬ ⌬ ␧ pairs {(S*1, 1),...,(S*u, u)} such of ). Since the height of T is O(log n), that (i) S*1, ..., S*u form a partition of we can answer a query in O(log n) par- Յ ͉ ͉ Յ 1/2ϩ␧ S*, (ii) n/r S*i 2n/r for each i, (iii) allel time, using O(n ) processors, ⌬ each i is a triangle containing S*i, and by visiting the nodes of the same level (iv) every line intersects at most c͌r in parallel. ⌬ ⌸ triangles i of , for some absolute con- Returning to the task of answering a stant c (independent of r). We recur- ray-shooting query, let ␳ be a query ray ␴ sively construct a partition tree Ti on with origin s, and let be the (un- ␳ each S*i, and attach it as the ith subtree known) first intersection point of with ␴ of T. The root of Ti stores the simplex a line of S. We compute by running ⌬ i. The size of T is linear, and the time the parallel version of the segment in- spent in constructing T is O(n log n). tersection-detection procedure generi- Let e be a query segment, and let e* cally, in the parametric-searching style, be its dual double wedge. To determine on the segment ␥ ϭ s␴. At each node v whether e intersects any line of S (i.e., that the query procedure visits, it tests ⌬ ʕ ␥ ⌬ പ Ѩ␥ Þ À whether e* contains any point of S*), whether v *or v * . Since we traverse T in a top-down fashion, ␴ is the only indeterminant in these starting from the root. Let v be a node tests, the tests reduce to determining, ⌬ visited by the algorithm. If v is a leaf, for each vertex p of v, whether p lies we explicitly check whether any point of above, below, or on the line ␴* dual to ␴; ␰ S*v lies in the double wedge e*. Suppose see Figure 6. Let p be the intersection ⌬ ʕ then that v is an internal node. If v point of the dual line p* and the line പ Þ À ␳ ␥ ϭ ␰ e*, then clearly e* S , and we stop. containing ; and set p s p. By deter- ⌬ പ ϭ À ␥ If v e* , then we stop processing mining whether the segment p inter- v and do not visit any of its children. If sects a line of S, we can determine Ѩ ⌬ ␴ e* intersects v, we recursively visit whether p lies above or below *. all the children of v. Let Q(nv) denote Hence, using this parametric-searching the number of nodes in the subtree approach, a ray-shooting query can be rooted at v visited by the query proce- answered in O(n1/2ϩ␧) time.

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 445

Several other ray-shooting data struc- tures based on this technique have been developed in Agarwal et al. [1997a], Agarwal and Matous˘ek [1993, 1994, 1995], Mohaban and Sharir [1997], and Pellegrini [1996].

11.2 Linear-Optimization Queries We wish to preprocess a set H of half- spaces in ޒd into a linear-size data structure so that, for a linear objective Fig. 7. An extremal-placement query. function c, we can efficiently compute the vertex of പ H that minimizes c. Using multidimensional parametric tained by scaling ⌬ by a factor of t.We searching and data structures for an- thus want to find the largest dilated swering halfspace-emptiness queries, copy of ⌬ that does not contain any Matous˘ek [1993] presented an efficient ᐉ d/2 point of S. As another example, let 1, algorithm that, for any n Յ m Յ n , ᐉ 2 be two lines, and let m be a constant. can answer linear-optimization queries ⌬ 1/d/2 2dϪ1 Define (t) to be the triangle formed by in O(n/m log n) time using ᐉ ᐉ O(1) 1, 2, and the line with slope m and at O(m log n) space and preprocessing. ᐉ distance t from the intersection point 1 A simpler randomized algorithm with പ ᐉ 1Ϫ1/d/2 O(log* n) 2; see Figure 7. These problems arise O(n) space and O(n 2 ) ex- in many applications, including hidden pected query time was proposed by surface removal [Pellegrini 1996] and Chan [1996]. Linear-optimization que- Euclidean shortest paths [Mitchell 1993]. ries can be used to answer many other By preprocessing S into a simplex queries. For example, using Matous˘ek’s range-searching data structure, we can technique and a dynamic data structure ⌬ പ ϭ À determine whether (t0) S , for for halfspace range searching, the any given t , and then plug this query ޒd 0 1-center of a set S of points in can be procedure into the parametric-searching maintained dynamically, as points are machinery, thereby obtaining the de- inserted into or deleted from S. See sired tmax. The best known data struc- Agarwal et al. [1995], Agarwal and Ma- ture for simplex range searching can tous˘ek [1995], and Matous˘ek [1993] for answer a query in time O(m/n1/d additional applications of multidimen- logdϩ1 n), using O(m) space, so an ex- sional parametric searching for query- tremal placement query can be an- type problems. swered in time O(m/n1/d log2(dϩ1) n).

11.3 Extremal Placement Queries 12. DISCUSSION Let S be a set of n points in ޒd. We wish In this survey we have reviewed several to preprocess S into a data structure so techniques for geometric optimization, that queries of the following form can be and discussed many geometric problems answered efficiently. Let ⌬(t), for t ʦ ޒ, that benefit from these techniques. ⌬ ʕ be a family of simplices so that (t1) There are, of course, quite a few nongeo- ⌬ Յ (t2), for any t1 t2, and such that for metric-optimization problems that can any t, ⌬(t) can be computed in O(1) also be solved efficiently using these time. The goal is to compute the largest techniques. For example, parametric ϭ value t tmax for which the interior of searching has been applied to develop ⌬ (tmax) does not contain any point of S. efficient algorithms for these problems: For example, let ⌬ be a fixed simplex (i) let G be a directed graph, in which and let ⌬(t) ϭ t⌬ be the simplex ob- the weight of each edge e is a d-variate

ACM Computing Surveys, Vol. 30, No. 4, December 1998 446 • P. K. Agarwal and M. Sharir

linear function we(x), and let s and t be not well defined. See Mitchell [1996] for two vertices in G; find the point x ʦ ޒd, an excellent survey on this topic. so that the maximum flow from s to t is The second class of problems that we maximized over all points x ʦ ޒd [Co- want to mention can be called geometric hen and Megiddo 1993]; (ii) compute the graph problems. Given a set S of points minimum edit distance between two in ޒd, we can define a weighted com- given sequences, where the cost of per- plete graph induced by S, where the forming an insertion, deletion, and sub- weight of an edge (p, q) is the distance stitution is a univariate linear function between p and q under some suitable [Gusfield et al. 1994]. metric (two of the most commonly used This survey mostly reviewed theoreti- metrics are the Euclidean and the recti- cal results in geometric optimization. linear metrics). We can now pose many Many of the algorithms discussed here optimization problems on this graph, are relatively simple and are widely including the Euclidean traveling sales- used in practice, but some of the algo- person, Euclidean matching, Euclidean rithms, especially those that involve (rectilinear) Steiner trees, and mini- computing the roots of polynomials of mum weight triangulation. Although all degree greater than four, are quite so- these problems can be solved using phisticated and have little practical techniques known for general graphs, value. Much work has been done on the hope is that better and/or simpler developing heuristics for clustering algorithms can be developed by exploit- [Agrawal et al. 1998; Jain and Dubes ing the geometry of the problem. There 1988; Kaufman and Rousseeuw 1990], have been several significant develop- shape analysis [Eric and Grimson 1990; ments on geometric graph problems over the last few years, of which the Goodrich et al. 1994; Huttenlocher et al. most exciting are the (1 ϩ ␧)-approxi- 1993], surface simplification [Cohen et al. mation algorithm for the Euclidean 1996; Hoppe 1997; Luebke and Erikson traveling salesperson and related prob- 1997], and ray tracing [Foley et al. 1990; lems [Arora 1996, 1997; Rao and Smith Mitchell et al. 1994; Whang et al. 1995]. 1988]. The best known algorithm, due to There are several other geometric-op- Rao and Smith, can compute a (1 ϩ timization problems that are not dis- ␧)-shortest tour of a set of n points in ޒd cussed here. We conclude by mentioning in time two classes of such problems. The first O͑d͒ one is the optimal motion-planning O͑2͑d/␧͒ n ϩ ͑d/␧͒dn log n͒. problem, where we are given a moving robot B, an environment with obstacles, We refer the reader to Bern and Epp- and two placements of the robot, and we stein [1997] for a survey on approxima- want to compute an “optimal” collision- tion algorithms for such geometric-opti- free path for B between the given place- mization problems. ments. The cost of a path depends on B and on the application. In the simplest case, B is the point robot, O is a set of APPENDIX: MULTIDIMENSIONAL polygonal obstacles in the plane or poly- PARAMETRIC SEARCHING hedral obstacles in ޒ3, and the cost of a In this appendix we describe how to path is its Euclidean length. We then extend the parametric-searching tech- face the Euclidean shortest-path prob- nique to higher dimensions. Suppose we lem, which has been studied intensively have a d-variate (strictly) concave func- in the past decade; see Canny and Reif tion F(␭), where ␭ varies over ޒd.We [1987], Hershberger and Suri [1993a], wish to compute the point ␭* ʦ ޒd at and Reif and Storer [1994]. The problem which F(␭) attains its maximum value. becomes much harder if B is not a point, Let As be, as before, an algorithm that ␭ ␭ because even the notion of optimality is can compute F( 0) for any given 0.As

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 447

in the parametric searching, we assume for some arbitrarily small constant ␧, that the control flow of As is governed we can determine, exploiting the con- by comparisons, each of which amounts cavity of F, whether ␭* ʦ h, ␭* ʦ hϩ, to computing the sign of a d-variate or ␭* ʦ hϪ, where hϩ and hϪ are the polynomial p(␭) of a constant maximum two open halfspaces bounded by h. degree. We also need a few additional (Technically, one can, and should, treat ␧ assumptions on As. We call a variable in as an infinitesimal quantity; see ␭ As dynamic if its value depends on . Megiddo [1984] for details. Also, a simi- The only operations allowed on dynamic lar perturbation scheme works when ϭ variables are: (i) evaluating a polyno- ad 0.) We solve the following more mial p(␭) of degree at most ␦, where ␦ is general problem. Let g be a k-flat in ޒd a constant, and assigning the value to a contained in a (k ϩ 1)-flat ␩, and let dynamic variable; (ii) adding two dy- gϩ ʚ ␩ (resp., gϪ ʚ ␩) be the halfspace namic variables; and (iii) multiplying a of ␩ lying above (resp., below) g, relative dynamic variable with a constant. to a direction in ␩ orthogonal to g.We ␭ ␭ ʦ These assumptions imply that if is wish to compute the point *g g such ␭ ϭ ␭ indeterminant, then each dynamic vari- that F( *g) max␭ʦg F( ). Denote by ␭ (k) able is a polynomial in of degree at As an algorithm for solving this prob- ␦ (k) most ; and that F is a piecewise poly- lem. As previously, by running As on g nomial, each piece being a polynomial of and on two infinitesimally shifted copies degree at most ␦. of g within ␩, we can determine whether ␭ ␭ We run As generically at *. Each the point *␩ where F attains its maxi- comparison involving ␭ now amounts to mum on ␩ lies in g,ingϩ,oringϪ. 0 ϭ (dϪ1) evaluating the sign of a d-variate poly- Notice that As As, and that As is ␭ ␭ ␭ ␭ nomial p( 1,..., d)at *. the algorithm for computing *h. Induc- First consider the case where p is a tively, assume that we have an algo- (kϪ1) linear function of the form rithm As that can solve this problem for any (k Ϫ 1)-dimensional flat. We a ϩ ͸ a ␭ , ␭ ␭ 0 i i run As generically at *g, where varies 1ՅiՅd over g. Each comparison involves the determination of the side of a (k Ϫ such that a Þ 0. Consider the hyper- Ј ʚ ␭ d 1)-flat g g that contains *g. Running plane (kϪ1) Ј As on g and on two other infinitesi- mally shifted copies, gЈ␧ϩ and gЈ␧Ϫ,ofgЈ dϪ1 within g, we can perform the desired hϺ␭ ϭ Ϫ͑a ϩ ͸ a ␭ ͒/a . ␭Ј Ј d 0 i i d location of g with respect to g , and iϭ1 thereby resolve the comparison. When ␭ the simulation of As terminates, *g will It suffices to describe an algorithm for be found. ␭ ʦ computing the point *h h such that The total running time of the algo- ϩ F(␭*) ϭ max␭ʦ F(␭). By invoking this (k) k 1 h h rithm As is O(Ts ). The details of algorithm on h and two other hyper- this approach can be found in Agarwal planes h␧ϩ and h␧Ϫ, where et al. [1993c], Cohen and Megiddo [1993], Matous˘ek [1993], and Norton et dϪ1 al. [1992]. If we also have a parallel h␧ϩϺ␭ ϭ Ϫ͑a ϩ␧ϩ ͸ a ␭ ͒/a ␭ d 0 i i d algorithm Ap that evaluates F( 0)in ϭ i 1 time Tp using P processors, then the (k) running time at As can be improved, and as in the one-dimensional case, by exe- ␭ cuting Ap generically at *g in each re- dϪ1 cursive step. A parallel step, however, ϪϺ␭ ϭ Ϫ͑ Ϫ␧ϩ ͸ ␭ ͒ h␧ d a0 ai i /ad requires resolving P independent com- iϭ1 parisons. The goal is therefore to re-

ACM Computing Surveys, Vol. 30, No. 4, December 1998 448 • P. K. Agarwal and M. Sharir

ϭ ␥ Fig. 8. (i) Roots of p; (ii) cylindrical algebraic decomposition of p; (iii) curves g 0 and 1. kϪ1) ٚ) solve, by invoking As a constant a point of vertical tangency of p; see number of times, a fixed fraction of Figure 8. For each vertical line ᐉ,we these P comparisons, where each com- run the standard one-dimensional para- ␭ parison requires the location of *g with metric-searching procedure to deter- respect to a (k Ϫ 1)-flat gЈ ʚ g. Cohen mine which side of ᐉ contains ␭*. If any and Megiddo [1993] developed such a of these substeps returns ␭*, we are procedure that yields a done. Otherwise, we obtain a vertical

2 strip ␴ that contains ␭*. We still have to O͑d ͒ ͑ ͒d s Ts Tp log P search through the cells of ⌸ within ␴, time algorithm for computing ␭*; see which are stacked one above the other also Megiddo [1984]. Agarwala and Fer- in the y-direction, to determine which of ␭ na´ndez-Baca [1996] extended Cole’s im- them contains *. We note that the provement of Megiddo’s parametric number of roots of p along any vertical ᐉϺ ϭ ␴ searching to multidimensional paramet- line x x0 within is the same, that ric searching, which improves the each root varies continuously with x0, running time of the Cohen–Megiddo al- and that their relative y-order is the gorithm in some cases by a polylogarith- same for each vertical line. In other mic factor. Agarwal et al. [1993c] words, the roots of ٚp in ␴ constitute a showed that these procedures can be collection of disjoint, x-monotone arcs ␥ ␥ simplified and improved, using (1/r)- 1, ..., t whose endpoints lie on the cuttings, to dO(d)T (T log P)d. boundary lines of ␴. We can regard each s p ␥ Toledo [1993b] extended the preced- i as the graph of a univariate function ␥ ing approach to resolving the signs of i(x). ␥ nonlinear polynomials, using Collins’s Next, for each i, we determine ␭ ␥ [1975] cylindrical algebraic decomposi- whether * lies below, above, or on i. tion. We describe his algorithm for d ϭ Let x* be the x-coordinate of ␭*, and let 2. That is, we want to compute the sign ᐉ be the vertical line x ϭ x*. If we knew ␥ പ ᐉ of a bivariate, constant-degree polyno- x*, we could have run As at each i , mial p at ␭*. Let ٚp denote the set of and could have located ␭* with respect ␥ roots of p. We compute Collins’ cylindri- to i, as desired. Since we do not know cal algebraic decomposition ⌸ of ޒ2 so x*, we execute the one-dimensional that the sign of p is invariant within parametric-searching algorithm generi- each cell of ⌸ [Arnon et al. 1984; Collins cally, on the line ᐉ, with the intention of ␭ ϭ 1975]. Our aim is to determine the cell simulating it at the unknown point i ␥ പ ᐉ ␶ ʦ ⌸ that contains ␭*, thereby deter- i . This time, performing a compar- mining the sign of p at ␭*. ison involves computing the sign of The cells of ⌸ are delimited by O(1) some bivariate, constant-degree polyno- ␭ y-vertical lines—each passing through a mial g at i (we prefer to treat g as a self-intersection point of ٚp or through bivariate polynomial, although we could

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 449

have eliminated one variable, by re- one-dimensional procedure requires ␭ ␥ 3 stricting to lie on i). We compute the O(Ts ) time. The total time spent in re- ␥ ␭ roots r1,...,ru of g that lie on i, and solving the sign of p at * is therefore 3 set r0 and ruϩ1 to be the left and right O(Ts ). Hence, the total running time of ␥ 4 endpoints of i, respectively. As previ- the two-dimensional algorithm is O(Ts ). ously, we compute the index j so that ␭* As before, using a parallel version of the lies in the vertical strip ␴Ј bounded be- algorithm for the generic simulation tween rj and rjϩ1. Notice that the sign reduces the running time considerably. ␥ of g is the same for all points on i In d dimensions, the running time of ␴Ј within the strip , so we can now com- Toledo’s original algorithm is O(Ts(Tp ␭ 2dϪ1 pute the sign of g at i. log P) ), which can be improved to O(d2) When the generic algorithm being Ts(Tp log P) ), using the result by ␭ simulated on i terminates, it returns a Chazelle et al. [1991] on vertical decom- constant-degree polynomial Fi(x, y), position of arrangements of algebraic ␭ corresponding to the value of F at i surfaces. ␭ ϭ ␭ (i.e., Fi( i) F( i)), and a vertical strip ␴ ʕ ␴ ␭ ␳ ϭ i that contains *. Let i(x) REFERENCES ␥ ␥ϩ ␥Ϫ Fi(x, i(x)). Let i (resp., i ) be the copy ␥ AGARWAL,P.K.AND DESIKAN, P. K. 1997. An of i translated by an infinitesimally approximation algorithm for terrain simplifi- small amount in the (ϩy)-direction (resp., cation. In Proceedings of the Eighth ACM- Ϫ ␥ϩ ϭ ␥ ϩ ␧ ( y)-direction); that is, i (x) i(x) SIAM Symposium on Discrete Algorithms, ␥Ϫ ϭ ␥ Ϫ ␧ ␧ Ͼ 139–147. (resp., i (x) i(x) ), where 0is an infinitesimal. We next simulate the AGARWAL,P.K.AND MATOUS˘EK, J. 1993. Ray ␭ϩ ϭ ␥ϩ പ ᐉ ␭Ϫ ϭ shooting and parametric search. SIAM algorithm at i i and i ␥Ϫ പ ᐉ J. Comput. 22, 794–806. i . We thus obtain two functions ˘ ␳ϩ ␳Ϫ ␴ϩ AGARWAL,P.K.AND MATOUSEK, J. 1994. On i (x), i (x) and two vertical strips i , range searching with semialgebraic sets. Dis- ␴Ϫ ␴ ϭ ␴ പ ␴ϩ പ ␴Ϫ i . Let ˆ i i i i . We need to crete Comput. Geom. 11, 393–418. ␳ Ϫ ␳ϩ ˘ evaluate the signs of i(x*) i (x*) and AGARWAL,P.K.AND MATOUSEK, J. 1995. Dy- ␳ Ϫ ␳Ϫ namic half-space range reporting and its i(x*) i (x*) to determine the location ␭ ␥ applications. Algorithmica 13, 325–345. of * with respect to i (this is justified by the concavity of F). We compute the x-co- AGARWAL,P.K.AND PROCOPIUC, C. M. 1998. Exact and approximation algorithms for clus- ordinates of the intersection points of (the tering. In Proceedings of the Ninth ACM- ␳ ␳ϩ ␳Ϫ ␴ graphs of) i, i , i that lie inside ˆ i. Let SIAM Symposium on Discrete Algorithms, Յ Յ ...Յ x1 x2 xs be these x-coordinates, 658–667. and let x0, xsϩ1 be the x-coordinates of the AGARWAL,P.K.AND SHARIR, M. 1991. Off-line left and right boundaries of ␴ˆ , respec- dynamic maintenance of the width of a planar i point set. Comput. Geom. Theor. Appl. 1, 65– tively. By running As on the vertical lines ϭ Յ Յ 78. x xj, for 1 j s, we determine the ϭ ϫ ޒ AGARWAL,P.K.AND SHARIR, M. 1994. Planar vertical strip Wi [xj, xjϩ1] that geometric location problems. Algorithmica 11, contains ␭*. Notice that the signs of poly- 185–195. ␳ Ϫ ␳ϩ ␳ Ϫ ␳Ϫ nomials i(x) i (x), i(x) i (x) are AGARWAL,P.K.AND SHARIR, M. 1996a. Efficient ʦ randomized algorithms for some geometric op- fixed for all x [xj, xjϩ1]. By evaluating ␳ ␳ϩ ␳Ϫ ʦ timization problems. Discrete Comput. Geom. i, i , i for any x0 [xj, xjϩ1], we can ␳ Ϫ ␳ϩ 16, 317–337. compute the signs of i(x*) i (x*) and ␳ Ϫ ␳ϩ AGARWAL,P.K.AND SHARIR, M. 1996b. Ray of i(x*) (x*). shooting amidst convex polygons in 2D. J. ␥ Repeating this procedure for all is Alg. 21, 508–519. we can determine the cell of ⌸ that AGARWAL,P.K.AND SHARIR, M. 1996c. Ray contains ␭*, and thus resolve the com- shooting amidst convex polyhedra and polyhe- parison involving p. We then resume dral terrains in three dimensions. SIAM the execution of the generic algorithm. J. Comput. 25, 100–116. The execution of the one-dimensional AGARWAL,P.K.AND SURI, S. 1994. Surface ap- 2 proximation and geometric partitions. In Pro- procedure takes O(Ts ) steps, which im- ceedings of the Fifth ACM-SIAM Symposium plies that the generic simulation of the on Discrete Algorithms, 24–33.

ACM Computing Surveys, Vol. 30, No. 4, December 1998 450 • P. K. Agarwal and M. Sharir

AGARWAL,P.K.,AMENTA, N., AND SHARIR, M. 1998. ings of the Second ACM Symposium on Paral- Placement of one convex polygon inside an- lel Algorithms Architecture, 259–268. other. Discrete Comput. Geom. 19, 95–104. AGRAWAL, R., GEHRKE, J., GUNOPULOS, D., AND AGARWAL,P.K.,ARONOV, B., AND SHARIR, RAGHAVAN, P. 1998. Automatic subspace M. 1997a. Computing envelopes in four di- clustering of high dimensional data for data mensions with applications. SIAM J. Comput. mining applications. In Proceedings of the 26, 1714–1732. ACM SIGMOD Conference on Management of AGARWAL,P.K.,ARONOV, B., AND SHARIR, M. 1997b. Data, 94–105. Line traversals of balls and smallest enclosing AGRAWAL, R., GHOSH, A., IMJELINSKI, T., IYER, B., cylinders in three dimensions. In Proceedings of AND SWAMI, A. 1992. An interval classifier the Eighth ACM-SIAM Symposium on Discrete for database mining applications. In Proceed- Algorithms, 483–492. ings of the Eighteenth International Confer- AGARWAL,P.K.,ARONOV, B., AND SHARIR, M. 1997c. ence on Very Large Databases. Motion planning for a convex polygon in a po- AJTAI,M.AND MEGIDDO, N. 1996. A determinis- lygonal environment. Tech. Rep. CS-1997-17, tic poly(log log n)-time n-processor algorithm Dept. of Computer Science, Duke University. for linear programming in fixed dimension. AGARWAL,P.K.,ARONOV, B., SHARIR, M., AND SURI, SIAM J. Comput. 25, 1171–1195. S. 1993a. Selecting distances in the plane. AJTAI, M., KOMLO´ S, J., AND SZEMERE´ DI, E. 1983. Algorithmica 9, 495–514. Sorting in c log n parallel steps. Combinatorica AGARWAL,P.K.,EFRAT, A., AND SHARIR, M. 1995. 3, 1–19. Vertical decomposition of shallow lengths in ALON,N.AND MEGIDDO, N. 1990. Parallel linear 3-dimensional arrangements and its applica- programming in fixed dimension almost tions. In Proceedings of the Eleventh Annual surely in constant time. In Proceedings of the ACM Symposium on Computational Geome- 31st Annual IEEE Symposium on the Founda- try, 39–50. tions of Computer Science, 574–582. AGARWAL,P.K.,EFRAT, A., SHARIR, M., AND TO- ALON,N.AND SPENCER, J. 1993. The Probabilis- LEDO, S. 1993b. Computing a segment cen- tic Method. Wiley, New York. ter for a planar point set. J. Alg. 15, 314–323. ALT, H., BEHRENDS, B., AND BLO¨ MER, J. 1995. AGARWAL,P.K.,SHARIR, M., AND TOLEDO,S. Approximate matching of polygonal shapes. 1993c. An efficient multi-dimensional search- Ann. Math. Artif. Intell. 13, 251–266. ing technique and its applications. Tech. Rep. CS-1993-20, Dept. of Computer Science, Duke AMATO,N.M.,GOODRICH,M.T.,AND RAMOS, University. E. A. 1994. Parallel algorithms for higher- dimensional convex hulls. In Proceedings of AGARWAL,P.K.,SHARIR, M., AND TOLEDO,S. the 35th Annual IEEE Symposium on the 1994. Applications of parametric searching in geometric optimization. J. Alg. 17, 292– Foundations of Computer Science, 683–694. 318. AMENTA, N. 1994a. Bounded boxes, Hausdorff distance, and a new proof of an interesting AGARWAL,P.K.,SHARIR, M., AND WELZL,E. 1997. The discrete 2-center problem. In Pro- Helly theorem. In Proceedings of the Tenth ceedings of the Thirteenth Annual ACM Sym- Annual ACM Symposium on Computational posium Computer Geometry, 147–155. Geometry, 340–347. AGARWALA,R.AND FERNA´ NDEZ-BACA, D. 1996. AMENTA, N. 1994b. Helly-type theorems and Weighted multidimensional search and its ap- generalized linear programming. Discrete plications to convex optimization. SIAM Comput. Geom. 12, 241–261. J. Comput. 25, 83–99. ARNON,D.S.,COLLINS,G.E.,AND MCCALLUM, AGGARWAL,A.AND KLAWE, M. M. 1987. Appli- S. 1984. Cylindrical algebraic decomposi- cations of generalized matrix searching to tion I: The basic algorithm. SIAM J. Comput. geometric algorithms. Discrete Appl. Math. 13, 865–877. 27, 3–23. ARORA, S. 1996. Polynomial time approxima- AGGARWAL,A.AND PARK, J. K. 1988. Notes on tion schemes for Euclidean TSP and other searching in multidimensional monotone ar- geometric problems. In Proceedings of the rays. In Proceedings of the 29th Annual IEEE 37th Annual IEEE Symposium on the Foun- Symposium on the Foundations of Computer dations of Computer Science, 2–11. Science, 497–512. ARORA, S. 1997. Nearly linear time approxima- AGGARWAL, A., KLAWE,M.M.,MORAN, S., SHOR, tion schemes for the Euclidean TSP and other P. W., AND WILBER, R. 1987. Geometric ap- geometric problems. In Proceedings of the plications of a matrix-searching algorithm. 38th Annual IEEE Symposium on the Foun- Algorithmica 2, 195–208. dations of Computer Science, 554–563. AGGARWAL, A., KRAVETS, D., PARK,J.K.,AND SEN, ARORA, S., RAGHAVAN, P., AND RAO, S. 1998. Ap- S. 1990. Parallel searching in generalized proximation schemes for Euclidean k-median Monge arrays with applications. In Proceed- and related problems. In Proceedings of the

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 451

30th Annual ACM Symposium on the Theory bound techniques for robot motion planning of Computation, 106–113. problems. In Proceedings of the 28th Annual BAR-ILAN, J., KORTSARZ, G., AND PELEG, D. 1993. IEEE Symposium on the Foundations of Com- How to allocate network centers. J. Alg. 15, puter Science, 49–60. 385–415. CHAN, T. M. 1996. Fixed-dimensional linear BAR-YEHUDA, R., EFRAT, A., AND ITAI, A. 1993. A programming queries made easy. In Proceed- simple algorithm for maintaining the center ings of the Twelfth Annual ACM Symposium of a planar point-set. In Proceedings of the on Computational Geometry, 284–290. Fifth Canadian Conference on Computational CHAN, T. M. 1998. Geometric applications of a Geometry, 252–257. randomized optimization technique. In Pro- BERMAN, M. 1989. Large sample bias in least ceedings of the Fourteenth Annual ACM Sym- squares estimators of a circular arc center posium on Computational Geometry (to ap- and its radius. Comput. Vis. Graph. Image pear). Process. 45, 126–128. CHANDRASEKARAN,R.AND TAMIR, A. 1990. Alge- BERN,M.AND EPPSTEIN, D. 1997. Approx- braic optimization: The Fermat–Weber loca- imation algorithms for geometric problems. In tion problem. Math. Program. 46, 219–224. Approximation Algorithms for NP-Hard Prob- CHARIKAR, M., CHEKURI, C., FEDER, T., AND MOT- lems, D. S. Hochbaum, Ed., PWS Publishing, WANI, R. 1997. Incremental clustering and Boston, MA, 296–345. dynamic information retrieval. In Proceedings BESPAMYATNIKH, S. 1998. An efficient algorithm of the 29th Annual ACM Symposium on the for the three-dimensional diameter problem. Theory of Computation, 626–635. In Proceedings of the Ninth Annual ACM- CHAZELLE, B. 1993. Cutting hyperplanes for di- SIAM Symposium on Discrete Algorithms, vide-and-conquer. Discrete Comput. Geom. 9, 137–146. 145–158. BHATTACHARYA,B.K.AND TOUSSAINT, G. 1991. CHAZELLE,B.AND MATOUS˘EK, J. 1996. On-lin- Computing shortest transversals. Computing ear-time deterministic algorithms for optimi- 46, 93–119. zation problems in fixed dimensions. J. Alg. BHATTACHARYA,B.K.,CZYZOWICZ, J., EGYED, P., 21, 579–597. TOUSSAINT, G., STOJMENOVIC´, I., AND URRUTIA, CHAZELLE, B., EDELSBRUNNER, H., GUIBAS,L.J., J. 1991a. Computing shortest transversals AND SHARIR, M. 1991. A singly-exponential of sets. In Proceedings of the Seventh Annual stratification scheme for real semi-algebraic ACM Symposium on Computational Geome- varieties and its applications. Theor. Comput. try, 71–80. Sci. 84, 77–105. BHATTACHARYA,B.K.,JADHAV, S., MUKHOPADHYAY, CHAZELLE, B., EDELSBRUNNER, H., GUIBAS,L.J., A., AND ROBERT, J.-M. 1991b. Optimal algo- AND SHARIR, M. 1993. Diameter, width, rithms for some smallest intersection radius closest line pair and parametric searching. problems. In Proceedings of the Seventh An- Discrete Comput. Geom. 10, 183–196. nual ACM Symposium on Computational Ge- CHAZELLE, B., EDELSBRUNNER, H., GUIBAS,L.J., ometry, 81–88. AND SHARIR, M. 1994. Algorithms for BRINKHOFF,T.AND KRIEGEL, H.-P. 1994. The bichromatic line segment problems and poly- impact of global clusterings on spatial data- hedral terrains. Algorithmica 11, 116–132. base systems. In Proceedings of the Twentieth CHAZELLE, B., EDELSBRUNNER, H., GUIBAS,L.J., International Conference on Very Large Data- SHARIR, M., AND STOLFI, J. 1996. Lines in bases. space: Combinatorics and algorithms. Algo- BRO¨ NNIMANN,H.AND CHAZELLE, B. 1994. Opti- rithmica 15, 428–447. mal slope selection via cuttings. In Proceed- CHEW,L.P.AND KEDEM, K. 1992. Improve- ings of the Sixth Canadian Conference on ments on geometric pattern matching prob- Computational Geometry, 99–103. lems. In Proceedings of the Third Scandina- BRO¨ NNIMANN,H.AND GOODRICH, M. T. 1995. vian Workshop on Algorithm Theory, LNCS Almost optimal set covers in finite VC-dimen- 621, Springer-Verlag, 318–325. sion. Discrete Comput. Geom. 14, 263–279. CHEW,L.P.AND KEDEM, K. 1993. A convex BRO¨ NNIMANN, H., CHAZELLE, B., AND MATOUS˘EK, polygon among polygonal obstacles: Place- J. 1993. Product range spaces, sensitive ment and high-clearance motion. Comput. sampling, and derandomization. In Proceed- Geom. Theor. Appl. 3, 59–89. ings of the 34th Annual IEEE Symposium on CHEW,L.P.,DOR, D., EFRAT, A., AND KEDEM, the Foundations of Computer Science, 400– K. 1995. Geometric pattern matching in d- 409. dimensional space. In Proceedings of the Sec- CAN, F. 1993. Incremental clustering for dy- ond Annual European Symposium on Algo- namic information retrieval. ACM Trans. Inf. rithms, LNCS 979, Springer-Verlag, 264–279. Syst. 11, 143–164. CHEW,L.P.,GOODRICH,M.T.,HUTTENLOCHER, CANNY,J.AND REIF, J. H. 1987. New lower D. P., KEDEM, K., KLEINBERG,J.M.,AND

ACM Computing Surveys, Vol. 30, No. 4, December 1998 452 • P. K. Agarwal and M. Sharir

KRAVETS, D. 1997. Geometric pattern ument collections. In Proceedings of the Six- matching under Euclidean motion. Comput. teenth Annual International ACM SIGIR Con- Geom. Theor. Appl. 7, 113–124. ference on Research and Development in CLARKSON, K. L. 1986. Linear programming in Information Retrieval, 318–329. d2 O(n3 ) time. Inf. Process. Lett. 22, 21–24. DANZER, L., GRU¨ NBAUM, B., AND KLEE, V. 1963. CLARKSON, K. L. 1992. Randomized geometric Helly’s theorem and its relatives. In Convex- algorithms. In Computing in Euclidean Geom- ity, Proceedings of the Symposium on Pure etry, D.-Z. Du and F. K. Hwang, Eds., World Mathematics, Vol. 7, American Mathematical Scientific, Singapore, 117–162. Society, Providence, RI 101–180. CLARKSON, K. L. 1993. Algorithms for polytope DAS,G.AND JOSEPH, D. 1990. The complexity of covering and approximation. In Proceedings of minimum convex nested polyhedra. In Pro- the Third Workshop on Algorithms Data ceedings of the Second Canadian Conference Structures, LNCS 709, Springer-Verlag, 246– on Computational Geometry, 296–301. 252. DATTA, A., LENHOF, H.-P., SCHWARZ, C., AND SMID, CLARKSON, K. L. 1995. Las Vegas algorithms M. 1995. Static and dynamic algorithms for linear and integer programming. J. ACM for k-point clustering problems. J. Alg. 19, 42, 488–499. 474–503. CLARKSON,K.L.AND SHOR, P. W. 1989. Appli- DE BERG, M., BOSE, J., BREMNER, D., RAMASWAMI, cations of random sampling in computational S., AND WILFONG, G. 1997. Computing con- geometry, II. Discrete Comput. Geom. 4, 387– strained minimum-width annuli of point sets. 421. In Proceedings of the Fifth Workshop on Algo- CLARKSON,K.L.,EPPSTEIN, D., MILLER,G.L., rithms Data Structure, LNCS 1272, Springer- STURTIVANT, C., AND TENG, S.-H. 1996. Ap- Verlag, 3–16. proximating center points with iterative Ra- DE BERG, M., DEVILLERS, O., VAN KREVELD, M., don points. Int. J. Comput. Geom. Appl. 6, SCHWARZKOPF, O., AND TEILLAUD, M. 1996. 357–377. Computing the maximum overlap of two con- COHEN,E.AND MEGIDDO, N. 1993. Maximizing vex polygons under translation. In Proceed- concave functions in fixed dimension. In Com- ings of the Seventh Annual International plexity in Numeric Computation (P. Pardalos, Symposium on Algorithms Computation. Ed., World Scientific, Singapore, 74–87. DE FLORIANI, L. 1984. A graph based approach COHEN, J., VARSHNEY, A., MANOCHA, D., TURK, G., to object feature recognition. In Proceedings of WEBER, H., AGARWAL, P., BROOKS,F.P.,JR., the Third Annual ACM Symposium on Com- AND WRIGHT, W. V. 1996. Simplification en- putational Geometry, 100–109. velopes. In Proceedings of SIGGRAPH ’96, DEHAEMER,M.J.,JR. AND ZYDA, M. J. 1991. 119–128. Simplification of objects rendered by polygo- COLE, R. 1987. Slowing down sorting networks nal approximations. Comput. Graph. 15, 175– to obtain faster sorting algorithms. J. ACM 184. 34, 200–208. DENG, X. 1990. An optimal parallel algorithm COLE, R., SALOWE, J., STEIGER, W., AND SZEMERE´ DI, for linear programming in the plane. Inf. Pro- E. 1989. An optimal-time algorithm for cess. Lett. 35, 213–217. slope selection. SIAM J. Comput. 18, 792– DILLENCOURT,M.B.,MOUNT,D.M.,AND NETAN- 810. YAHU, N. S. 1992. A randomized algorithm COLE, R., SHARIR, M., AND YAP, C. K. 1987. On for slope selection. Int. J. Comput. Geom. k-hulls and related problems. SIAM J. Com- Appl. 2, 1–27. put. 16, 61–77. DREZNER, Z. 1981. On a modified 1-center prob- COLLINS, G. E. 1975. Quantifier elimination for lem. Manage Sci. 27, 838–851. real closed fields by cylindrical algebraic de- DREZNER, Z. 1984a. The p-centre problems— composition. In Proceedings of the Second GI Heuristic and optimal algorithms. J. Oper. Conference on Automata Theory and Formal Res. Soc. 35, 741–748. Languages, LNCS 33, Springer-Verlag, Ber- DREZNER, Z. 1984b. The planar two-center and lin, 134–183. two-median problem. Transp. Sci. 18, 351– CUTTING,D.R.,KARGER,D.R.,AND PEDERSEN, 361. J. O. 1993. Constant interaction-time scat- DREZNER, Z. 1987. On the rectangular p-center ter/gather browsing of very large document problem. Naval Res. Logist. Q. 34, 229–234. collections. In Proceedings of the Sixteenth Annual International ACM SIGIR Conference DREZNER, Z. 1989. Conditional p-centre prob- on Research and Development in Information lems. Transp. Sci. 23, 51–53. Retrieval, 126–134. DREZNER, Z., ED. 1995. Facility Location. CUTTING,D.R.,KARGER,D.R.,PEDERSEN,J.O., Springer-Verlag, New York. AND TUKEY, J. W. 1992. Scatter/gather: A DREZNER, Z., MEHREZ, A., AND WESOLOWSKY, cluster-based approach to browsing large doc- G. O. 1992. The facility location problems

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 453

with limited distances. Transp. Sci. 25, 183– linear programming. ORSA J. Comput. 4, 187. 360–368. DUNCAN,C.A.,GOODRICH,M.T.,AND RAMOS, EPPSTEIN, D. 1997. Faster construction of pla- E. A. 1997. Efficient approximation and nar two-centers. In Proceedings of the Eighth optimization algorithms for computational ACM-SIAM Symposium on Discrete Algo- metrology. In Proceedings of the Eighth ACM- rithms, 1997. SIAM Symposium on Discrete Algorithms, EPPSTEIN, D. 1998. Fast hierarchical clustering 121–130. and other applications of dynamic closest DYER, M. E. 1984. Linear time algorithms for pairs. In Proceedings of the Ninth Annual two- and three-variable linear programs. ACM-SIAM Symposium on Discrete Algo- SIAM J. Comput. 13, 31–45. rithms, 619–628. DYER, M. E. 1986. On a multidimensional EPPSTEIN,D.AND ERICKSON, J. 1994. Iterated search technique and its application to the nearest neighbors and finding minimal poly- Euclidean one-centre problem. SIAM J. Com- topes. Discrete Comput. Geom. 11, 321–350. put. 15, 725–738. ERIC,W.AND GRIMSON, L. 1990. Object Recogni- DYER, M. E. 1992. A class of convex programs tion by Computer: The Role of Geometric Con- with applications to computational geometry. straints. MIT Press, Cambridge, MA. In Proceedings of the Eighth Annual ACM FEDER,T.AND GREENE, D. H. 1988. Optimal Symposium on Computational Geometry, algorithms for approximate clustering. In Pro- 9–15. ceedings of the Twentieth Annual ACM Sym- DYER, M. E. 1995. A parallel algorithm for lin- posium on the Theory of Computation, 434– ear programming in fixed dimensions. In Pro- 444. ceedings of the Eleventh Annual ACM Sympo- FINN, P., KAVRAKI,L.E.,LATOMBE, J.-C., MOTWANI, sium on Computational Geometry, 345–349. R., SHELTON, C., VENKATASUBRAMANIAN, S., DYER,M.E.AND FRIEZE, A. M. 1985. A simple AND YAO, A. 1997. Rapid: Randomized heuristic for the p-centre problem. Oper. Res. pharmacophore identification for drug design. Lett. 3, 285–288. In Proceedings of the Thirteenth Annual ACM Symposium on Computational Geometry, DYER,M.E.AND FRIEZE, A. M. 1989. A random- ized algorithm for fixed-dimension linear pro- 324–333. gramming. Math. Program. 44, 203–212. FOLEY,J.D.,VAN DAM, A., FEINER,S.K.,AND HUGHES, J. F. 1990. : EBARA, H., FUKUYAMA, N., NAKANO, H., AND NA- Principles and Practice. Addison-Wesley, KANISHI, Y. 1980. Roundness algorithms using the Voronoi diagrams. In Abstracts of Reading, MA. the First Canadian Conference on Computa- FOLLERT, F., SCHO¨ MER, E., AND SELLEN,J. tional Geometry, 41. 1995. Subquadratic algorithms for the weighted maximum facility location problem. ECKHOFF, J. 1993. Helly, Radon, and Carath- e´odory type theorems. In Handbook of Convex In Proceedings of the Seventh Canadian Con- Geometry, P. M. Gruber and J. Wills, Eds., ference on Computational Geometry,1–6. North-Holland, 389–448. FOLLERT, F., SCHO¨ MER, E., SELLEN, J., SMID, M., AND THIEL, C. 1995. Computing a largest EDELSBRUNNER, H. 1985. Computing the ex- empty anchored cylinder, and related prob- treme distances between two convex polygons. lems. In Proceedings of the Fifteenth Confer- J. Alg. 6, 213–224. ence on Foundations of Software Technology EDELSBRUNNER, H. 1987. Algorithms in Combi- Theoretical Computer Science, LNCS 1026, natorial Geometry. Springer-Verlag, Heidel- Springer-Verlag, 428–442. berg. FOWLER,R.J.,PATERSON,M.S.,AND TANIMOTO, EDELSBRUNNER,H.AND WAUPOTITSCH, R. 1986. S. L. 1981. Optimal packing and covering Computing a ham-sandwich cut into two di- in the plane are NP-complete. Inf. Process. mensions. J. Symbol. Comput. 2, 171–178. Lett. 12, 133–137. EFRAT,A.AND SHARIR, M. 1996. A near-linear FREDERICKSON, G. N. 1991. Optimal algorithms algorithm for the planar segment center prob- for tree partitioning. In Proceedings of the lem. Discrete Comput. Geom. 16, 239–257. Second Annual ACM-SIAM Symposium on EFRAT, A., SHARIR, M., AND ZIY, A. 1994. Com- Discrete Algorithms, 168–177. puting the smallest k-enclosing circle and re- FREDERICKSON,G.N.AND JOHNSON, D. B. 1982. lated problems. Comput. Geom. Theor. Appl. The complexity of selection and ranking in 4, 119–136. X ϩ Y and matrices with sorted rows and EISNER,M.AND SEVERANCE, D. 1976. Mathe- columns. J. Comput. Syst. Sci. 24, 197–208. matical techniques for efficient record seg- FREDERICKSON,G.N.AND JOHNSON, D. B. 1983. mentation in large shared databases. J. ACM Finding kth paths and p-centers by generat- 23, 619–635. ing and searching good data structures. J. EPPSTEIN, D. 1992. Dynamic three-dimensional Alg. 4, 61–80.

ACM Computing Surveys, Vol. 30, No. 4, December 1998 454 • P. K. Agarwal and M. Sharir

FREDERICKSON,G.N.AND JOHNSON, D. B. 1984. ganization and retrieval with automatically Generalized selection and ranking: Sorted constructed feature vectors. In Proceedings of matrices. SIAM J. Comput. 13, 14–30. the Sixteenth Annual International ACM SI- GARC´ıA-LOPEZ,J.AND RAMOS, P. 1997. Fitting a GIR Conference on Research and Development set of points by a circle. In Proceedings of the in Information Retrieval, 157–165. Thirteenth Annual ACM Symposium on Com- HASSIN,R.AND MEGIDDO, N. 1991. Approxi- putational Geometry, 139–146. mation algorithms for hitting objects by GA¨ RTNER, B. 1995. A subexponential algorithm straight lines. Discrete Appl. Math. 30,29– for abstract optimization problems. SIAM 42. J. Comput. 24, 1018–1035. HECKBERT,P.S.AND GARLAND, M. 1995. Fast GA¨ RTNER,B.AND WELZL, E. 1996. Linear pro- polygonal approximation of terrains and gramming—randomization and abstract height fields. Tech. Rep. CMU-CS-95-181, frameworks. In Proceedings of the Thirteenth Carnegie Mellon University. Symposium on Theoretical Aspects of Com- HELLY, E. 1930. U¨ ber Systeme von abges- puter Science, LNCS 1046, Springer-Verlag, chlossenen Mengen mit gemeinschaftlichen 669–687. Punkten. Monaths. Math. und Physik 37, GLOZMAN, A., KEDEM, K., AND SHPITALNIK,G. 281–302. 1995. On some geometric selection and opti- HEPPES, A. 1956. Beweis einer Vermutung von mization problems via sorted matrices. In A. Va´zonyi. Acta Math. Acad. Sci. Hungar. 7, Proceedings of the Fourth Workshop on Algo- 463–466. rithms Data Structures, LNCS 955, Springer- HERSHBERGER, J. 1992. Minimizing the sum of Verlag, 26–37. diameters efficiently. Comput. Geom. Theor. GOLDWASSER, M. 1995. A survey of linear pro- Appl. 2, 111–118. gramming in randomized subexponential HERSHBERGER, J. 1993. A faster algorithm for time. SIGACT News 26, 96–104. the two-center decision problem. Inf. Process. GONZALEZ, T. 1985. Clustering to minimize the Lett. 47, 23–29. maximum intercluster distance. Theor. Com- HERSHBERGER,J.AND SURI, S. 1991. Finding put. Sci. 38, 293–306. tailored partitions. J. Alg. 12, 431–463. GONZALEZ, T. 1991. Covering a set of points in HERSHBERGER,J.AND SURI, S. 1993a. Efficient multidimensional space. Inf. Process. Lett. 40, computation of Euclidean shortest paths in 181–188. the plane. In Proceedings of the 34th Annual GOODRICH, M. T. 1993. Geometric partitioning IEEE Symposium on the Foundations of Com- made easier, even in parallel. In Proceedings puter Science, 508–517. of the Ninth Annual ACM Symposium on HERSHBERGER,J.AND SURI, S. 1993b. Matrix Computational Geometry, 73–82. searching with the shortest path metric. In GOODRICH, M. T. 1995. Efficient piecewise-lin- Proceedings of the 25th Annual ACM Sympo- ear function approximation using the uniform sium on Theory Computation, 485–494. metric. Discrete Comput. Geom. 14, 445–462. HOCHBAUM,D.S.AND MAAS, W. 1985. Approxi- GOODRICH,M.T.AND RAMOS, E. A. 1997. mation schemes for covering and packing Bounded-independence derandomization of problems in image processing and VLSI. J. geometric partitioning with applications to ACM 32, 130–136. parallel fixed-dimensional linear program- HOCHBAUM,D.S.AND MAAS, W. 1987. Fast ap- ming. Discrete Comput. Geom. 18, 397–420. proximation algorithms for a nonconvex cov- GOODRICH,M.T.,MITCHELL,J.S.B.,AND OR- ering problem. J. Alg. 8, 305–323. LETSKY, M. W. 1994. Practical methods for HOCHBAUM,D.S.AND SHMOYS, D. 1985. A best approximate geometric pattern matching un- possible heuristic for the k-center problem. der rigid motion. In Proceedings of the Tenth Math. Oper. Res. 10, 180–184. Annual ACM Symposium on Computational HOCHBAUM,D.S.AND SHMOYS, D. 1986. A uni- Geometry, 103–112. fied approach to approximation algorithms for GRU¨ NBAUM, B. 1956. A proof of Va´zsonyi’s con- bottleneck problems. J. ACM 33, 533–550. jecture. Bull. Res. Council Isr., Sect. A, 6, HOCKEN,R.J.,RAJA, J., AND BABU, U. 1993. 77–78. Sampling issues in coordinate metrology. GUPTA, P., JANARDAN, R., AND SMID, M. 1994. Man. Rev. 6, 282–294. Fast algorithms for collision and proximity HOPPE, H. 1997. View-dependent refinement of problems involving moving geometric objects. progressive meshes. In Proceedings of SIG- Rep. MPI-I-94-113, Max-Planck-Institut In- GRAPH ’97, 189–198. form., Saarbru¨ cken, Germany. HOPPE, H., DEROSE, T., DUCHAMP, T., HALSTEAD, GUSFIELD, D., BALASUBRAMANIAN, K., AND NAOR, M., JIN, H., MCDONALD, J., SCHWEITZER, J., D. 1994. Parametric optimization of se- AND STUETZLE, W. 1994. Piecewise smooth quence alignment. Algorithmica 12, 312–326. surface reconstruction. In Proceedings of SIG- HAN, K.-A. AND MYAENG, S.-H. 1996. Image or- GRAPH ’94, 295–302.

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 455

HOPPE, H., DEROSE, T., DUCHAMP, T., MCDONALD, new algorithm and data structure. In Proceed- J., AND STUETZLE, W. 1993. Mesh optimiza- ings of the Fourth Workshop on Algorithms tion. In Proceedings of SIGGRAPH ’93, 19–26. Data Structures, LNCS 955, Springer-Verlag, HOULE,M.E.AND TOUSSAINT, G. T. 1988. Com- 13–25. puting the width of a set. IEEE Trans. Patt. KALAI, G. 1992. A subexponential randomized Anal. Mach. Intell. PAMI-10, 761–765. simplex algorithm. In Proceedings of the 24th HOULE,M.E.,IMAI, H., IMAI, K., AND ROBERT, Annual ACM Symposium on the Theory of J.-M. 1989. Weighted orthogonal linear Lϱ- Computation, 475–482. approximation and applications. In Proceed- KARMARKAR, N. 1984. A new polynomial-time ings of the First Workshop on Algorithms Data algorithm for linear programming. Combina- Structures, LNCS 382, Springer-Verlag, 183– torica 4, 373–395. 191. KATZ, M. J. 1995. Improved algorithms in geo- HUTTENLOCHER,D.P.AND KEDEM, K. 1990. metric optimization via expanders. In Pro- Computing the minimum Hausdorff distance ceedings of the Third Israel Symposium on for point sets under translation. In Proceed- Theory of Computing and Systems, 78–87. ings of the Sixth Annual ACM Symposium on KATZ,M.J.AND NIELSEN, F. 1996. On piercing Computational Geometry, 340–349. sets of objects. In Proceedings of the Twelfth HUTTENLOCHER,D.P.,KEDEM, K., AND SHARIR, Annual ACM Symposium on Computational M. 1993. The upper envelope of Voronoi Geometry, 113–121. surfaces and its applications. Discrete Com- KATZ,M.J.AND SHARIR, M. 1993. Optimal slope put. Geom. 9, 267–291. selection via expanders. Inf. Process. Lett. 47, HUTTENLOCHER,D.P.,KLANDERMAN,G.A.,AND 115–122. RUCKLIDGE, W. J. 1993. Comparing images KATZ,M.J.AND SHARIR, M. 1997. An expander- using the Hausdorff distance. IEEE Trans. based approach to geometric optimization. Patt. Anal. Mach. Intell. 15, 850–863. SIAM J. Comput. 26, 1384–1408. HWANG,R.Z.,CHANG,R.C.,AND LEE, KAUFMAN,L.AND ROUSSEEUW, P. J. 1990. Find- R. C. T. 1993a. The generalized searching ing Groups in Data: An Introduction to Clus- over separators strategy to solve some NP- ter Analysis. Wiley, New York. hard problems in subexponential time. Algo- rithmica 9, 398–423. KHACHIYAN, L. G. 1980. Polynomial algorithm in linear programming. U.S.S.R. Comput. HWANG,R.Z.,LEE,R.C.T.,AND CHANG, Math. Math. Phys. 20, 53–72. R. C. 1993b. The slab dividing approach to solve the Euclidean p-center problem. Algo- KHULLER,S.AND SUSSMANN, Y. J. 1996. The rithmica 9, 1–22. capacitated k-center problem. In Proceedings of the Fourth Annual European Symposium of IMAI, H., LEE, D., AND YANG, C. 1992. 1-segment Algorithms, LNCS 1136, Springer-Verlag, center covering problems. ORSA J. Comput. 152–166. 4, 426–434. KNUTH, D. E. 1973. Sorting and Searching. Ad- JADHAV,S.AND MUKHOPADHYAY, A. 1994. Com- puting a centerpoint of a finite planar set of dison-Wesley, Reading, MA. points in linear time. Discrete Comput. Geom. KO,M.T.AND CHING, Y. T. 1992. Linear time 12, 291–312. algorithms for the weighted tailored 2-parti- tion problem and the weighted rectilinear JADHAV, S., MUKHOPADHYAY, A., AND BHATTA- 2-center problem under L -distance. Discrete CHARYA, B. K. 1996. An optimal algorithm ϱ for the intersection radius of a set of convex Appl. Math. 40, 397–410. polygons. J. Alg. 20, 244–267. KO,M.T.AND LEE, R. C. T. 1991. On weighted rectilinear 2-center and 3-center problems. JAIN,A.K.AND DUBES, R. C. 1988. Algorithms for Clustering Data. Prentice-Hall, Englewood Inf. Sci. 54, 169–190. Cliffs, NJ. KO,M.T.,LEE,R.C.T.,AND CHANG, J. S. 1990. JAROMCZYK,J.W.AND KOWALUK, M. 1994. An An optimal approximation algorithm for the efficient algorithm for the Euclidean two-cen- rectilinear m-center problem. Algorithmica 5, ter problem. In Proceedings of the Tenth An- 341–352. nual ACM Symposium on Computational Ge- KORNEENKO,N.M.AND MARTINI, H. 1993. Hy- ometry, 303–311. perplane approximation and related topics. In JAROMCZYK,J.W.AND KOWALUK, M. 1995a. A New Trends in Discrete and Computational geometric proof of the combinatorial bounds Geometry, J. Pach, Ed., Algorithms and Com- for the number of optimal solutions to the binatorics, Springer-Verlag, Heidelberg, 135– 2-center Euclidean problem. In Proceedings of 161. the Seventh Canadian Conference on Compu- LANDAU, U. M. 1987. Estimation of circular arc tational Geometry, 19–24. and its radius. Comput. Vis. Graph. Image JAROMCZYK,J.W.AND KOWALUK, M. 1995b. The Process 38, 317–326. two-line center problem from a polar view: A LE,V.B.AND LEE, D. T. 1991. Out-of-round-

ACM Computing Surveys, Vol. 30, No. 4, December 1998 456 • P. K. Agarwal and M. Sharir

ness problem revisited. IEEE Trans. Patt. MATOUS˘EK, J., SHARIR, M., AND WELZL, E. 1996. Anal. Mach. Intell. PAMI-13, 217–223. A subexponential bound for linear program- LEE,D.T.AND WU, Y. F. 1986. Geometric com- ming. Algorithmica 16, 498–516. plexity of some location problems. Algorith- MEGHINI, C. 1995. An image retrieval model mica 1, 193–211. based on classical logic. In Proceedings of the LEVEN,D.AND SHARIR, M. 1987. On the number Sixteenth Annual International ACM SIGIR of critical free contacts of a convex polygonal Conference on Research and Development in object moving in two-dimensional polygonal Information Retrieval, 300–308. space. Discrete Comput. Geom. 2, 255–270. MEGIDDO, N. 1979. Combinatorial optimization LO, C.-Y. AND STEIGER, W. 1990. An optimal- with rational objective functions. Math. Oper. time algorithm for ham-sandwich cuts in the Res. 4, 414–424. plane. In Proceedings of the Second Canadian MEGIDDO, N. 1983a. Applying parallel compu- Conference on Computational Geometry, 5–9. tation algorithms in the design of serial algo- LO, C.-Y., MATOUS˘EK, J., AND STEIGER, W. L. 1994. rithms. J. ACM 30, 852–865. Algorithms for ham-sandwich cuts. Discrete MEGIDDO, N. 1983b. Linear-time algorithms for Comput. Geom. 11, 433–452. linear programming in R3 and related prob- LUEBKE,D.AND ERIKSON, C. 1997. View-depen- lems. SIAM J. Comput. 12, 759–776. dent simplification of arbitrary polygonal en- MEGIDDO, N. 1983c. The weighted Euclidean vironments. In Proceedings of SIGGRAPH ’97, 1-center problem. Math. Oper. Res. 8, 498– 199–208. 504. MAASS, W. 1986. On the complexity of noncon- MEGIDDO, N. 1984. Linear programming in lin- vex covering. SIAM J. Comput. 15, 453–467. ear time when the dimension is fixed. J. ACM MAGILLO,P.AND DE FLORIANI, L. 1996. Main- 31, 114–127. taining multiple levels of detail in the overlay MEGIDDO, N. 1985. Partitioning with two lines of hierarchical subdivisions. In Proceedings of in the plane. J. Alg. 6, 430–433. the Eighth Canadian Conference on Computa- MEGIDDO, N. 1989. On the ball spanned by tional Geometry, 190–195. balls. Discrete Comput. Geom. 4, 605–610. MAKHOUL, J., ROUCOS, S., AND GISH, H. 1985. MEGIDDO, N. 1990. On the complexity of some Vector quantization in speech coding. In Pro- geometric problems in unbounded dimension. ceedings of the IEEE 73, 1551–1588. J. Symbol. Comput. 10, 327–334. MATOUS˘EK, J. 1991a. Computing the center of MEGIDDO,N.AND SUPOWIT, K. J. 1984. On the planar point sets. In Computational Geome- complexity of some common geometric loca- try: Papers from the DIMACS Special Year, tion problems. SIAM J. Comput. 13, 182–196. J. E. Goodman, R. Pollack, and W. Steiger, MEGIDDO,N.AND TAMIR, A. 1982. On the com- Eds., American Mathematical Society, Provi- plexity of locating linear facilities in the dence, 221–230. plane. Oper. Res. Lett. 1, 194–197. ˘ MATOUSEK, J. 1991b. Randomized optimal algo- MEGIDDO,N.AND ZEMEL, E. 1986. A random- rithm for slope selection. Inf. Process. Lett. 39, ized O(n log n) algorithm for the weighted 183–187. Euclidean 1-center problem. J. Alg. 7, 358– MATOUS˘EK, J. 1992. Efficient partition trees. 368. Discrete Comput. Geom. 8, 315–334. MEHLHORN, K., SHERMER, T., AND YAP, C. 1997. MATOUS˘EK, J. 1993. Linear optimization que- A complete roundness classification proce- ries. J. Alg. 14, 432–448. dure. In Proceedings of the Thirteenth Annual MATOUS˘EK, J. 1994. Lower bound for a subexpo- ACM Symposium on Computational Geome- nential optimization algorithm. Random try, 129–138. Struct. Alg. 5, 591–607. MITCHELL, J. S. B. 1993. Shortest paths among MATOUS˘EK, J. 1995a. On enclosing k points by a obstacles in the plane. In Proceedings of the circle. Inf. Process. Lett. 53, 217–221. Ninth Annual ACM Symposium on Computa- tional Geometry, 308–317. MATOUS˘EK, J. 1995b. On geometric optimiza- tion with few violated constraints. Discrete MITCHELL, J. S. B. 1996. Shortest paths and Comput. Geom. 14, 365–384. networks. Tech. Rep., University at Stony Brook. MATOUS˘EK,J.AND SCHWARZKOPF, O. 1996. A de- terministic algorithm for the three-dimen- MITCHELL,J.S.B.AND SURI, S. 1995. Separa- sional diameter problem. Comput. Geom. tion and approximation of polyhedral objects. Theor. Appl. 6, 253–262. Comput. Geom. Theor. Appl. 5, 95–114. MATOUS˘EK, J., MOUNT,D.M.,AND NETANYAHU, MITCHELL,J.S.B.,MOUNT,D.M.,AND SURI, N. S. 1993. Efficient randomized algo- S. 1994. Query-sensitive ray shooting. In rithms for the repeated median line estima- Proceedings of the Tenth Annual ACM Sympo- tor. In Proceedings of the Fourth ACM-SIAM sium on Computational Geometry, 359–368. Symposium on Discrete Algorithms, 74–82. MOHABAN,S.AND SHARIR, M. 1997. Ray shoot-

ACM Computing Surveys, Vol. 30, No. 4, December 1998 Algorithms for Geometric Optimization • 457

ing amidst spheres in three dimensions and ROOS,T.AND WIDMAYER, P. 1994. k-Violation related problems. SIAM J. Comput. 26, 654– linear programming. Inf. Process. Lett. 52, 674. 109–114. MOTWANI,R.AND RAGHAVAN, P. 1995. Random- ROY,U.AND ZHANG, X. 1992. Establishment of ized Algorithms. Cambridge University Press, a pair of concentric circles with the minimum New York. radial separation for assessing roundness er- ror. Comput. Aided Des. 24, 161–168. MULMULEY, K. 1994. Computational Geometry: An Introduction Through Randomized Algo- SALOWE, J. 1989. Lϱ Interdistance selection by rithms. Prentice-Hall, Englewood Cliffs, NJ. parametric search. Inf. Process. Lett. 30, 9–14. NAOR,N.AND SHARIR, M. 1990. Computing a SARNAK,N.AND TARJAN, R. E. 1986. Planar point in the center of a point set in three point location using persistent search trees. dimensions. In Proceedings of the Second Ca- Commun. ACM 29, 669–679. nadian Conference on Computational Geome- ¨ try, 10–13. SCHOMER,E.AND THIEL, C. 1995. Efficient colli- sion detection for moving polyhedra. In Pro- NORTON,C.H.,PLOTKIN,S.A.,AND TARDOS, ceedings of the Eleventh Annual ACM Sympo- ´ E. 1992. Using separation algorithms in sium on Computational Geometry, 51–60. fixed dimensions. J. Alg. 13, 79–98. SCHO¨ MER, E., SELLEN, J., AND TEICHMANN, M., AND PAPADIMITRIOU, C. H. 1981. Worst-case and YAP, C. 1996. Efficient algorithms for the probabilistic analysis of a geometric location smallest enclosing cylinder problem. In Pro- problem. SIAM J. Comput. 10, 542–557. ceedings of the Eighth Canadian Conference PELLEGRINI, M. 1993. Ray shooting on triangles on Computational Geometry, 264–269. in 3-space. Algorithmica 9, 471–494. SCHROETER,P.AND BIGU¨ N, J. 1995. Hierarchical PELLEGRINI, M. 1994. On collision-free place- image segmentation by multi-dimensional ments of simplices and the closest pair of clustering and orientation-adaptive boundary lines in 3-space. SIAM J. Comput. 23, 133– refinement. Patt. Recogn. 28, 695–709. 153. SEIDEL, R. 1991. Small-dimensional linear pro- gramming and convex hulls made easy. Dis- PELLEGRINI, M. 1996. Repetitive hidden surface crete Comput. Geom. 6, 423–434. removal for polyhedra. J. Alg. 21, 80–101. SEIDEL, R. 1993. Backwards analysis of ran- PLESNIK, J. 1987. A heuristic for the p-center domized geometric algorithms. In New Trends problem in graphs. Discrete Appl. Math. 17, in Discrete and Computational Geometry,J. 263–268. Pach, Ed., Springer-Verlag, Heidelberg, 37– POST, M. J. 1984. Minimum spanning ellip- 68. soids. In Proceedings of the Sixteenth Annual SEN, S. 1996. Parallel multidimensional search ACM Symposium on the Theory of Computa- using approximation algorithms: With appli- tion, 108–116. cations to linear-programming and related RAMOS, E. 1997a. Construction of 1-d lower en- problems. In Proceedings of the Eighth ACM velopes and applications. In Proceedings of Symposium on Parallel Algorithms and Archi- the Thirteenth Annual ACM Symposium on tectures, 251–260. Computational Geometry, 57–66. SHAFER, J., AGRAWAL, R., AND MEHTA, M. 1996. RAMOS, E. 1997b. Intersection of unit-balls and Sprint: A scalable parallel classifier for data diameter of a point set in R3. Comput. Geom. mining. In Proceedings of the 22nd Interna- Theor. Appl. 8, 57–65. tional Conference on Very Large Databases. SHAFER,L.AND STEIGER, W. 1993. Randomizing RAO,S.AND SMITH, W. D. 1988. Improved ap- optimal geometric algorithms. In Proceedings proximation schemes for geometric graphs via of the Fifth Canadian Conference on Compu- “spanners” and “banyans.” In Proceedings of tational Geometry, 133–138. the Thirtieth Annual ACM Symposium Theory SHARIR, M. 1997. A near-linear algorithm for of Computation (to appear). the planar 2-center problem. Discrete Comput. REICHLING, M. 1988a. On the detection of a Geom. 18, 125–134. common intersection of k convex objects in the SHARIR,M.AND AGARWAL, P. K. 1995. Daven- plane. Inf. Process. Lett. 29, 25–29. port–Schinzel Sequences and Their Geometric REICHLING, M. 1988b. On the detection of a Applications. Cambridge University Press, common intersection of k convex polyhedra. New York. In Computational Geometry and its Applica- SHARIR,M.AND TOLEDO, S. 1994. Extremal tions, LNCS 333, Springer-Verlag, 180–186. polygon containment problems. Comput. REIF,J.H.AND STORER, J. A. 1994. A single- Geom. Theor. Appl. 4, 99–118. exponential upper bound for finding shortest SHARIR,M.AND WELZL, E. 1992. A combinato- paths in three dimensions. J. ACM 41, 1013– rial bound for linear programming and re- 1019. lated problems. In Proceedings of the Ninth

ACM Computing Surveys, Vol. 30, No. 4, December 1998 458 • P. K. Agarwal and M. Sharir

Symposium on Theoretical Aspects of Com- VALIANT, L. 1975. Parallelism in comparison puter Science, LNCS 577, Springer-Verlag, problems. SIAM J. Comput. 4, 348–355. 569–579. VARADARAJAN, K. R. 1996. Approximating mono- SHARIR,M.AND WELZL, E. 1996. Rectilinear and tone polygonal curves using the uniform met- polygonal p-piercing and p-center problems. ric. In Proceedings of the Twelfth Annual In Proceedings of the Twelfth Annual ACM ACM Symposium on Computational Geome- Symposium on Computational Geometry, 122– try, 311–318. 132. VARADARAJAN,K.R.AND AGARWAL, P. K. 1995. SOMMERVILLE, D. M. Y. 1951. Analytical Geom- Linear approximation of simple objects. In etry in Three Dimensions. Cambridge Univer- Proceedings of the Seventh Canadian Confer- sity Press, Cambridge, UK. ence on Computational Geometry, 13–18. STEIN,A.AND WERMAN, M. 1992a. Finding the VOELCKER, H. 1993. Current perspective on tol- repeated median regression line. In Proceed- erancing and metrology. Man. Rev. 6, 258– ings of the Third ACM-SIAM Symposium on 268. Discrete Algorithms, 409–413. WELZL, E. 1991. Smallest enclosing disks (balls STEIN,A.AND WERMAN, M. 1992b. Robust sta- and ellipsoids). In New Results and New tistics in shape fitting. In Proceedings of the Trends in Computer Science, H. Maurer, Ed., IEEE International Conference on Computer LNCS 555, Springer-Verlag, 359–370. Vision Pattern Recognition, 540–546. WESOLOWSKY, G. 1993. The Weber problem: His- SWANSON,D.T.,LEE,D.T.,AND WU, V. L. 1995. tory and perspective. Loca. Sci. 1, 5–23. An optimal algorithm for roundness determi- WHANG,K.Y.,SONG,J.W.,CHANG,J.W.,KIM, nation on convex polygons. Comput. Geom. J. Y., CHO,W.S.,PARK,C.M.,AND SONG, Theor. Appl. 5, 225–235. I. Y. 1995. Octree-R: An adaptible octree THOMAS,S.M.AND CHEN, Y. T. 1989. A simple for efficient ray tracing. IEEE Trans. Vis. approach for the estimation of circular arc Comput. Graph. 1, 343–349. and its radius. Comput. Vis. Graph. Image YAO,A.C.AND YAO, F. F. 1985. A general ap- Process. 45, 362–370. proach to D-dimensional geometric queries. In TOLEDO, S. 1991. Extremal polygon contain- Proceedings of the Seventeenth Annual ACM ment problems and other issues in parametric Symposium on the Theory of Computation, searching. M.S. Thesis, Dept. of Computer 163–168. Science, Tel Aviv University, Tel Aviv. YIANILOS, P. N. 1993. Data structures and algo- TOLEDO, S. 1993a. Approximate parametric rithms for nearest neighbor search in general search. Inf. Process. Lett. 47,1–4. metric spaces. In Proceedings of the Fourth TOLEDO, S. 1993b. Maximizing non-linear con- ACM-SIAM Symposium on Discrete Algo- cave functions in fixed dimension. In Com- rithms, 311–321. plexity in Numerical Computations,P.M. ZEMEL, E. 1987. A linear time randomizing al- Pardalos, Ed., World Scientific, Singapore, gorithm for searching ranked functions. Algo- 429–447. rithmica 2, 81–90.

Received November 1996; revised April 1998; accepted June 1998

ACM Computing Surveys, Vol. 30, No. 4, December 1998