Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

An Efficient Algorithm for the Euclidean Two-Center Problem

Jerzy W. .Jaromczyk* Miroslaw Kowalukt

Abstract 1 Introduction

We study the following geometric optimization

We present a new algorithm for the two-center problem (the “two-center problem” ): “Given a

problem: “Given a set S of n points in the real set S of n points in the real plane, find two closed
discs whose union contains all of the points and
plane, find two closed discs whose union contains
the radius of the larger disc is minimized.” The
all of the points and the radius of the larger disc
distance is measured with the Euclidean metric.
is minimized. ” An almost quadratic 0(n2 log n)
solution is given. The previously best known al- This is an instance of a well-known k-center

gorithms for the two-center problem have time problem, where the objective is to ~ind k clo-

complexity 0(n2 log3n). The solution is based sed discs minimizing the maximum radius. The
on a new geometric characterization of the op- problem stems from practice. For example, we
timal discs and on a searching scheme with so- want to place k emergency units so the worst-
called lazy evaluation. The algorithm is sim- case response time to each of n given sites will be

ple and does not assume general position of the minimized. The problem, specifically for k = 1,
input points. The importance of the problem is known under various names: minimum span-
is known in various practical applications inclu- ning circle, minimax location problem, minimax
ding transportation, station placement, and fa- detection station problem, Euclidean messenger

cility location. boy problem (see [Fl, F2, HM]). These names
tell more about potential applications.

In addition to having a practical flavor the


problem is known for its stimulating impact on
inventing new algorithmic techniques. Since the
*Department of Computer Science, University of Kentucky, Le-
xington, KY 40506 problem was posed by Sylvester in 1857 [S] se-
t ~~titute of ~formatic~, Warsaw University, Warsaw, Poland
veral algorithms for k = 1 have been presen-
ted. Recent computationally-efficient solutions
Permission to copy without fee all or part of this material is
granted provided that the copies are not made or distributed for include an O(n log n) time algorithm based on
direct commercial advantage, the ACM copyright notice and the the farthest Voronoi diagram (see S~hamos and
title of the publication and its date appear, and notice is given
that copying is by permission of the Association of Computing Hoey [SH]). An optimal O(n) algorithm based
Machinery. To copy otherwise, or to republish, requires a fee
on a powerful, and beautiful, prune-and-search
and/or specific permission.
strategy was given by Megiddo [M]. The pro-
10th Computational Geometry 94-6/94 Stony Brook, NY, USA
@ 1994 ACM 0-89791 -648-4/94/0006..$3 .50
blem becomes iV.P-complete when the parame-

303
ter k is a part of the input. Therefore it is in- the plane is endowed with a standard ortho-
teresting,
and again important in view of prac- gonal coordinate system. Consider a set of 12
tical applications, to look at fixed values of k. unit length vectors that form with the axis OX
Specifically, for k = 2 the problem was studied an angle ~, i = O.. . 11. Specifically, u~ =
by Drezner [D] in the context of efficient trans- [cos((zT)/6), sin((in)/6)]. With each point p in
portation. He gave an O(n3) time complexity S we associate the set of 12 cones determined
algorithm. Agarwal and Shamir [AS] provided by the pairs of orthogonal vectors from this set
the first algorithm with the cost close to qua- of vectors. Each cone has its apex at p. Intui-
dratic. Specifically, their methods based on in- tively, we can think about this cone as the first
teresting modifications and additions to the Me- quadrant (with the bounding half- lines) of the
giddo’s parametric search technique resulted in coordinate system centered at p and determined
a 0(n2 log3 n) algorithm. An essential part of by vectors [0, 1], [1, O]. All the other cones asso-
the algorithm is a decision procedure by Hersh- ciated with p can be obtained by consecutive
berger and Suri [HS]. This procedure, given a rotations of this quadrant by 7r/6 (30°) about p.
real number r > 0, determines in O(n log n) Clearly, the number of cones is O(n).
time if there are two closed discs of radius r Consider now the set S of n points. We say
whose union contains the given set of points. that a pair (~, ~) of two closed discs is optimal
Moreover, it tells if the radius of two minimal en- for S if all the points in S are contained in the
closing discs is larger or smaller than r. Another union d“ U ~, the larger of these two discs, say
algorithm with the same 0(n2 log3 n) time com- ~, has radius r’ minimal over all pairs of discs
plexity was presented by Katz and Sharir [KS] at whose union contains S, and ~ has the smallest
last year’s Symposium on Computational Geo- possible radius for r“. Disc a? will be called an
metry. Their paper brought out new ideas, ba- optimal disc. If S1 = {p ~ S : p c c?} and Sz =
sed on expander graphs, for this and other geo- S \ S1 then ~ is the minimal disc containing S2.
metric optimization problems. The complexity ~ will be called a complementary disc. Clearly,
of the resulting algorithm for the two-center pro- an optimal pair of discs is a solution to the two-
blem was the same 0(n2 log3 n), however. center problem.
In this paper we will present a new algorithm There are several simple and well-known pro-
for the two-center problem. The algorithm has perties of the two optimal circles. They will be
0(n2 log n) time complexity and is based on new useful through the rest of the paper and we will
observations regarding the geometry of the pro- list them below.
blem. They allow for an efficient search in the Each disc in the optimal pair is determined eit-
set of discs that are candidates for the opti- her by a pair of points in S or by some three of
mal solution. The algorithm provides more in- them. That is, the radius of a disc is determined
sight into the geometry of the problem than by half the distance between some two points, or
the previous ones. (In fact, a lack of a di- is equal to the radius of the circumscribing circle
rect geometric flavor is a known disadvantage for some three points in S. Note that, since we
of parametric-search based algorithms for geo- do not assume general position, the points deter-
metric problems. ) Due to this insight the resul- mining the optimal discs are not unique. Howe-
ting algorithm is simple, uniform, and works for ver, among the points determining the optimal
arbitrary sets of points. discs there are points with special properties.
We will formulate these for the case when both
discs are defined by three points. The same will
2 Geometric preliminaries hold true for discs defined by two points.
There exist determining points Al, BI, Cl for
Our algorithm is based on a new characteriza- d* that do not belong to the interior of ~, and
tion of the optimal discs. To proceed furt- there are A2, 132, C2 that are not in the interior
her we need some definitions. Assume that of @.

304
There exist points AI, B1, CI (and A2, B2, C’2, also consider the set of discs that pass through p,
respectively) such that all angles in the triangle that contain C17(Sc ), and whose circles contain
AA1131 (2’I are acute. In other words, there are at least one point in Sc beyond p. T;he locus of
such Al, I?l, (71 that the center of their circum- their centers is the boundary y of the intersec-
scribing circle is in the interior of AAll?l C1. tion of those halfplanes determined by the bisec-
The above facts are elementary and follow tors of the segments joining p with the vertices
from the observation that otherwise at least one of Cll(Sc) that do not contain p. This inters-
of the discs, contrary to their optimality, could ection, and the boundary, can be found with a
be made smaller. Hereafter, by the determining standard O(n log n) algorithm (see [E]). Another
points for & and Z we will mean points with way to see this is to view ~ as the envelope of the
the above properties. Note that one (or two) of set of the above described bisector wit,h the view
the points determining & (the optimal disc) can point at (+co, O). If the order of the segments
lie on the boundary of the complementary disc joining p with the vertices of CH(SC) is known
& (but that this point does not determine & in (that is, the order of the slopes of bisectors is
the above sense). known) then this envelope can be found in O(n)
From the above facts it is easy to derive that time with a modification of Keil’s algorithm for
the radius of ~ is not bigger than the radius the envelope of lines [K] (see also [V]).
of the optimal spanning circle (the solution to ~ is monotone with respect to the y-axis. This
the l-center problem) for a given set. To this follows from the fact that all bisectors of the seg-
end, consider the optimal disc containing S and ments for points in the first quadrant are mono-
split S into two sets using a line containing the tonic and that the intersection of halfplanes is a
center of this disc and not containing any points convex set.
in S. Each of these subsets can be enclosed in a Now consider the points ql, . . . . qm of S that
smaller disc. are in the second and fourth quadrants of the
As opposed to the l-center problem, which al- coordinate system (the quadrants are numbe-
ways has a unique solution, the 2-center problem red in the counterclockwise orientation, with the
can admit more than one optimal pair of discs. cone corresponding to the first quadrant). Each
For example, the set of vertices of a square have point q in these quadrants determines the mi-
two symmetric, optimal solutions. nimal disc, with respect to the radius, whose
Additionally to the above facts we will use a circle passes through p and q and which con-
non-trivial result due to Megiddo [M] that pro- tains CIf(Sc). It defines a sequence of di-
vides a linear time algorithm to construct the scs Ci(qi l),..., d(qim ) and the corresponding se-
minimal enclosing disc containing a given set of quence of radii ril, . . ., rim. We will show how
points. This algorithm will be useful for our the order of these radii can be found efficiently.
purposes. We wish to do so without explicitly finding the
discs; this would kill our hopes for im efficient
algorithm. Before showing the method, let us
3 Ordered sequences of discs for explain at this point what our goal is. This or-
cones dered sequence of radii will allow us to perform
a binary search provided that some kind of order
We will associate with each cone a fixed num- can simultaneously be obtained for the comple-
ber of sequences of discs. Consider a cone C for mentary discs (the disc for the complement of S
a point p from S. Without loss of generality, with respect to the points contained in the first
we may assume that p is at the origin of the disc. ) Consider a point q and the segment pq.
coordinate system and the cone coincides with The center of the disc with the circle passing
the first quadrant of this system. Otherwise we through p and q is located on the perpendicular
can apply an afine transformation. Consider bisector /Pg of pq. In order to find thle center of
Sc = S n C and its convex hull Cll(SC), and the smallest such circle that in addition contains

305
C17(Sc) we need to consider two cases that de- Q~ = S’fl quadranti (the first quadrant contains
penal on how the middle point ill of the segment the positive axis, i.e. is closed, the negative x-
pq is located with respect to ~. Its location de- axis belongs to quadrant2, and the negative y-
pends on whether the disc that we consider is axis belongs to quadrani4).
determined by three or by two points. If ill is
on that side of ~ that contains p then the cen- As we know, CP together with Q2 determines
ter is on the intersection of the bisector with y. a sequence of discs ordered with respect to non-
This intersection can be located, with the help decreasing radii. (Similarly, another sequence is
of binary search, in O(log n) time. The radius defined by CP with Q4. ) Instead of constructing
of the disc is equal to the distance of this inters- the sequence for all points in Qz (Q4) we will
ection to p. Otherwise, if M is on the opposite construct it only for those points in Q2 (Q4, re-
side of ~ from p then M is the required center. spectively) that are not in disc do which is the
Again, the radius is equal to the distance from minimum enclosing disc for Q1. Ignoring those
M to p. Clearly, M can be located with respect points will not affect the correctness of the over-
to ~ in O(log n) time. We put the centers of di- all algorithm for the 2-center problem. As we
scs based on triples of points or based on pairs will show later, points in the second and fourth
of points in different sequences. Sorting the di- quadrants will be examined as potential candi-
stances yields the increasing order of the discs. dates for the point that determines, together
Concluding, we have: - with the apex of the cone and another point
in C17( Sc ) an optimal circle. It follows from
LEMMA 3.1 The increasing order of the discs
the definition of the sequences and from simple
associated with the cone and determined by the
geometric facts that points that are inside do are
points in the second quadrant can be found in
not feasible candidates since they could not form
O(nlog n) time.
an acute triangle with the cone center and ano-
Similarly, we can find the order of discs determi- t her point in Cff(SC ) and simultaneously pass
ned by the points in the fourth quadrant. Note through the cone center and contain all points
that these centers of discs that are on ~ do not in C17(Sc ). Denote the obtained sequence by
need to be sorted since the distance of points on
(di)$c=(do,dl, . . . . dkc ), the corresponding radii
~ to p is a monotonic (unimodal, to be precise)
by r(d;), and the set of points of S in di by di(S).
function. The smallest radius corresponds to the
The sequence starts with disc do, the minimum
minimal enclosing disc do for C-H(SC ) and it
enclosing set for QI that can be found in O(n)
splits ~ into two monotonic subsequences corre-
time with Megiddo’s algorithm [M]. Others of
sponding to the second and the fourth quadrants
these sets are not explicitly known; they can be
respectively. We will consider each such part of
found with an additional O(n) time per set, but
the sequence separately. Note that the above
this is too costly an operation for us so we do not
construction works also if, instead of considering
intend to compute all of them, Each di determi-
the set of all the points in the second and fourth
nes its complementary disc ii which is the mini-
quadrants, we consider only their subsets.
mal enclosing disc for the complement ~i (S) of
di(S), i.e. for S \ di(S). Denote by ~; the radius
4 Monotone sequences of radii of ~i. It gives us a sequence of pairs of numbers
{(ri, F;)}. Let us emphasize that the first ele-
A cone CP associated with p determines an or- ments of the pairs are known from the algorithm
thogonal coordinate system centered at p with constructing the sequence (see the previous sec-
the axes corresponding to the vectors defining tion). However, it requires an extra effort (e.g.
Cp. The first quadrant quadrantl coincides running Megiddo’s algorithm), which we want
with the cone. Let quadrant2, quadrant3, and to avoid whenever possible, to find Ti. Direct
quadrant4 be the remaining quadrants (in coun- search of the sequence for the optimal pair of di-
terclockwise order). We will look at the points scs (passing through p) is not effective since (Fi )

306
is not monotonic in general, This stems from &. Let the projection of A on the line joining
the fact that, in general, the sequence of sets the centers of & and & be the clc)sest to the
di (S) is not monotone with respect to inclusion. center of &, and let the projection of C be the
Before proceeding further, in order to see where farthest (with ties broken arbitrarily). We will
the difficulty lies, let us analyze what happens to carry out the proof under the assumption that
the sets di(S) of points in the sequence (growing A is “below” the line joining the centers of the
with respect to the radius) of discs associated discs, and that we rotate cones in the clockwise
with the cone and Q2. To focus our attention, direction. Other cases are symmetric. We have
let us consider those sequences with discs whose the following three possibilities.
circles pass through at least one other point of 1. There exists a cone with p = A that contains
S in the cone beyond p. The growing discs con- both II and C such that no point in S \ cP(S)
tain more and more points (in the sense of set belongs to this cone. Then the minimal disk
inclusion) from Q2 and Q3. This follows from enclosing the points in this cone (and passing
the observation that their circles must intersect through A), that is do, is an optimal disk.
in Q1 in order to contain S1. Therefore, there is
no intersection in the third quadrant; this also
translates into the fact that all points in Q2 (and
Qs) that are in the smaller disc must be also in
the larger disc. By the same argument, the discs
can loose points from Q4 (the fourth quadrant)
as they grow. Because of these points in Ql,
the monotonicity (w.r.t. inclusion) of di(S), and
therefore the monotonicit y of S \ di (S), can be
lost. We will soon see that there are yet some
cones that give us control over the events occur-
ring in the fourth quadrant. We now have the 2. The above case does not hold true and one
following theorem, formulated here for the case of the angles BAC or ABC is small(er than 7r/6
of the optimal disc defined by some three points. (300). We will consider both cases.
The case of discs defined by some two points is a) BAC < 7r/6.
similar and will be discussed later.

THEOREM 4.1 Let & be an optimal disc (’the


larger of the two discs in an optimal pair) whose
/
circle passes through p. There exists a cone CP
for p such that (S n c,) c &(S) and one of the
following holds true:
1. All three points determining o? are in CP
(p being one of them)
2. CP contains two points determining d“ (p
being one of them), and no points of S that are
in the optimal disc are in Q4 (or, symmetrically,
in Q2). That is, 8 rl QA = 0.
3. C’P contains two points determining @ (p
being one of them), and the jirst disc dl (not do)
contains all the points in Qa (or in Q2, respec-
tively) that are in #. That is, (&(S) n Q4) c
Take the cone for A that contains 13 and such
all(S) (or, (&(S) n Q2) c all(S)), respectively.
that the next cone does not cent ain B. This
PROOF: Let A, 1?, C be points that determine cone contains some points in S \ cP(S). Now

307
take the similarly oriented cone CB for B and line of the tangent line to d* at A is in the first
consider the cone second next to it (i.e. rotate quaclrant. Also, no point in S \ &(S) is in the
the cone about B by 7r/3.) We will show that first quadrant (the cone) since it lies completely
this cone has the desired properties. This cone in the halfplane determined by the perpendicu-
determines four quadrants, as described earlier. lar to the segment joining the centers of&, and
First, note that C belongs to this cone (the first & through point A (which follows from the fact
quadrant) since the angle ABC is at least 7r/3, that angle ABC is less than 7r/6). Hence, the
and the angle between AB and one of the arms cone has the required properties.
of L7B is not smaller than 7/2 and not bigger 3. The first case does not hold and both the
than 2r/3. Note that no point of S in the op- angles ABC and BAC are at least n/6. Note
timal disc belongs to the fourth quadrant. This that at least one of the right angles centered at
follows from the fact that angle ABO, O being A or B, with one arm passing through C and
the center of &, is smaller than 7r/6 and there- the other not intersecting d*, does not contain
fore a half line of the tangent line to & at B is points in S \ cP(S). Assume that it is the right
in the first quadrant. Also, no point in S\&(S) angle centered at A; denote it by ~A. Take the
is in the first quadrant (the cone) since it lies cone determined by A that contains C and the
completely in the halfplane determined by the next one that does not have this property. We
perpendicular to the segment joining the cen- will show that this cone has the desired pro-
ters of &, and ~ through point B. Hence, the perties. First note that the first quadrant does
cone has the required properties. not contain points in S \ d*(S).
b) ABC < 7/6.

.,

Take the cone for A that contains B and such


that the next cone does not contain B. Now,
consider the cone second next to it (i.e. rotate
the cone about A by 7r/3. ) We will show that
this cone has the desired properties. This cone Those points that belong to d*(S) and are in
determines four quadrants, as described earlier. the fourth quadrant are contained in the disc
C belongs to this cone (the first quadrant) since dAC with the diameter AC. Furthermore, the in-
the angle BAC is smaller than 7r/2 and bigger tersection of the first disc dl in the sequence ge-
than 7/3. Note that no point of S in the optimal nerated by the second quadrant with the fourth
disc belongs to second quadrant. This follows quadrant does not contain any point in S\&(S)
from the fact that angle BAO, O being the cen- as it is completely included in right angle ~A.
ter of ti, is smaller than 7r/6 and therefore a half This follows from the fact that the circle of dl

308
intersects the circle of dAC at A and in the arc We will end this section with results for an
AC. This intersection also contains the inters- optimal disc that is determined by a, pair rather
ection of & and the fourth quadrant Q4. The- than a triple of points. In this case the segment
refore, dl contains all the points of S that are joining this pair of points is a diameter of the
in &(S) (l Q4. Hence, the cone has the required disc.
properties. ❑
THEOREM 4.2 Let & be an optimal disc whose
circle contains point p G S. There exists a cone
The immediate consequences of the above
CP for p such that S n Cp c d*(S) and one of
theorem are:
the following holds true:
COROLLARY 4.1 1. The optimal disc is defined 1. Both point determining & (p being one of
by the minimum spanning disc of the points in them) belong to CP; or
some cone; or 2. The other than p point determining @ is not
2. the optimal disc is in a trailing seg- in CP. Then &( S)n Q4 = @ or~(S)nQZ = 0.
ment d., . . . ,dkc of the sequence of discs
do, all,..., dkc for some cone. This segment con- PROOF: Let A and B be the points determining
sists of those d,’s that do not contain any points d*. Let A be this point whose projection on the
of Q4. Hence, we have ds(S) C . . . C dkc(s); or line joining the centers of d* and & is closer to
3. the optimal disc is in an initial segment the center of & than the projection of C. We
all, ..., dk; of the sequence dl, . . . . dkc for some will carry out the proof under the assumption
cone CP. (Note that we start this sequence at dl that A is “below” the line joining the centers
rather than at do). This initial segment consists of the discs, and that we rotate cones in the
of those da’s that contain the same points of Q4 clockwise direction. Other cases are symmetric.
(or Q,) as disc dl does. Hence, we have all(S) c Consider this cone CA that does not contain any
... c d,@). points in S\&(S) and the previous one does not
have this property. Such a cone always exists as
Note that the segments of the sequences from
there is a halfplane determined by a line passing
items 2 and 3 of the above corollary can be fo-
through A that do not contain any points in S \
und from the sequence of the discs in O(n log n)
a? ( S). CA determines four quadrants as usual,
time using a simple binary search. In later sec-
the cone itself being the first one. We have two
tions we will always assume that the sequences
cases:
of discs are shortened to appropriate segments,
1. 1? belongs to CA. Then the cone has the
as described above.
required properties.
Recall that the monotonicit y (w,r.t. set inclu-
2. B is not in CA. Assume that B is in Qz (the
sion) of di(S) implies the monotonicity (in the
second quadrant ). Then the tangent IIine to d* at
opposite direction) of the complements di(S) =
A passes through the first and third quadrants
S \ d~(S). This, in turn, implies the monoto-
and therefore no point in &(S) belongs to Q4.
nicity of the corresponding radii Pi. This holds
only for some cones, as described in the theo- ❑

rem. Nevertheless, we will soon see that it is


sufficient to find the optimal discs efficiently. Note that the above proof is significantly
We need to comment why the third quadrant simpler than its counterpart for discs determi-
is ignored in building sequences of candidate di- ned by triples of points. One of the reasons
scs. Clearly points in the third quadrant can be- is that we do not neecl to find a cone that ne-
long to ~. However, no point in the third qua- cessarily contains the second determining point
drant can determine an optimal disc together (beyond p) in its interior as it is required in the
with p (the center of the cone) and a point in case of triples.
the first quadrant as they form an obtuse tri- To gain a benefit from the above theorem we
angle. need another straightforward observation.

309
If N is an optimal circle determined by a pair The following simple binary-like search can ef-
of points p and q (with p’s projection on the ficiently locate (a*, &). For each sequence per-
segment joining the centers of & and & being form a binary search with respect to the a’s in
closer to the center of&) then at least one of the order to find the smallest a with b < a (a local
right angles centered at p with one arm including minimum). If the a‘s form a nondecreasing and
pq does not contain points in S \ &(S). This the b’s a nonincreasing sequence, a binary search
follows from the fact that p does not belong to will correctly locate the required pair. However,
the interior of ~ so > can not overlap these not all sequences are monotonic with respect to
both right angles at the same time. the a’s and b’s, and therefore the search can lead
Now, the above theorem leads to to one of two possible outcomes. Here the search
is guided by the result of comparing the current
COROLLARY 4.2 P is either identical with a with the corresponding b (that must be eva-
do or it belongs to the sequence of discs luated). For example, if b > a, the search will
dl, d2,. ... dc as defined in Section 2, continue in the right half. Either we will not
find any pair with b s a and no pair will be
4.1 Searching with lazy evaluations returned or the search will continue and a pair
will be returned. In this case the returned pair
The searching in the algorithm will be based on is not guaranteed to be the smallest in a given
the following general scheme. Assume that we sequence. Now, from all the returned pairs we
are given a family O of sequences of pairs of choose the lexicographically smallest. This must
numbers {(aj,lj)}, j = 1, ..mi, i = 1 . . . k, and be our (a*, ~) since it is an element of at least
set m = ~$rn~. Denote by O* the set of all one monotonic sequence; the binary search cor-
pairs (a, b) G O such that b < a. The searching rectly locates it. The tot al cost of the search is
problem is: “Find a lexicographically smallest bounded by 0(n2 log n). Concluding, we have:
pair (a*,&) G Q*.” That is, we want to find a
pair with the smallest a, b not greater than a, THEOREM 4.3 The lexicographically smallest
and with b as small as possible for a given a. pair (a*, b“), with b s a, of a quasi-monotonic
Assume that, in addition, the sequences in O collection of O(n) sequences, with O(n) pairs in
have the following properties. There exists iO the sequence and O(n) penalty to evaluate pairs,
such that {a;, ~} contains (a*, F); {a$} is a can be found in 0(n2 logn) time.

nondecreasing sequence; and {by} is a nonin-


creasing sequence. In other words, the optimal
5 Algorithm
(a*, N) is contained in some sequence of pairs
whose first elements form a monotonic sequence,
We will use the schema of searching with lazy
and whose second elements also form a monoto-
evaluations for locating the optimal solution
nic sequence (in the opposite direction). The
(&, ~). We have the following lemma
collection O with the above properties will be
called quasi-monotonic. LEMMA 5.1 The family Q of all the sequences
We are interested in the case when the a’s associated with the cones is quasi — monotone.
are known and the b’s can be computed with
PROOF: Follows directly from the construc-
a certain cost penalty. To make the discussion
tion of the sequences and from Corollary 4.1 and
more specific assume that the number of sequen-
ces k = O(n), the lengths of the sequences are 4.2. •1

O(n), and the cost to find each b is also O(n).


In this case a standard search for the maximum The algorithm works as follows. For all the
would result in 0(n3) time. Due to the special points in S construct the corresponding cones,
properties of quasi-monotonic families we can and the sets Q1, Q2, Q3, and Q4. Find the mi-

perform that search more efficiently. nimal enclosing disc do for Q1 and the minimal

310
disc ~0 for S\ d(S) and add it to the pool of can- hope that the geometric properties of the opti-
didates. Then construct ordered sequences ofdi- mal discs presented in this paper will find more
scsfor each cone as describedin Section2. This applications in geometric optimization.
takes O(nlogn) time per cone and 0(n210gn)
for all cones, From these sequences we can con- Acknowledgement: We thank Richard King for
struct those sequences described in items 2 and his help in the proofreading of this paper and
3 of Corollary 4.1 in an additional O(n log n) Dan Boylin for his help with preparing the figu-
time per cone. For example, with the help of a res.
binary search we can locate the last disc in the
sequence that contains the same points of Q4 as Bibliography
the first disc dl of this sequence does. Based on [AS1] P. K. Agarwal and M. Sharir. Planar geometric
location problems, Tech. Rep. 90-58, DIMACS, Rutgers
Theorem 4.1 and 4.2 the set of sequences con-
Uni., August 1990. (also to appear in the A lgorithmica)
tains an optimal disc. By virtue of Lemma 5.1
[D] Z. Drezner. The planar two-center and two-median
this set of sequences is quasi-monotone. Per- problems, Transportation Science, 18, 1984, pp.351-361.
form the lazy evaluations search on this set and [E] H. Edelsbrunner. Algorithms in Computational
return pairs of discs into the pool of candidates. Geometry, Springer Verlag, 1987.
This can be done by Theorem 4.3 in 0(n2 log n) [Fl] R. R. Francis. A note on the optimum location of
new machines in existing plant layouts. J. In dustr. Eng.
time. The penalty for each lazy evaluation is
12, 1961, pp.41-47.
O(n) if Megiddo’s algorithm is used to find the
[F2] R. R. L. Francis. Some aspects of minimax loca-
complementary discs. Finally, find the global tion problem, Oper. Res., 15 (1967), pp.1163-1168.
minimum (&, ~) (or all pairs of discs that are [HM] G. Y. Handler and P. B. Mirchandani. Loca-
optimal) in O(n) time. This leads to the follo- tion on Networks: Theory and Algorithms, MIT Press,

wing main result: Cambridge, MA., 1979.


[HS] J. Hershberger and S. Suri. Finding Tailored Par-
THEOREM 5.1 The pair Of discs (d”,&) that titions, J. of Algorithms 12 (1991), pp. 431-463.

solves the two-center problem for a set of n [K] M. Keil. A simple algorithm for determining the
envelope of a set of lines, Information Processing Letters,
points in the Euclidean plane can be found in
39 (1991), pp.121-124.
0(n2 logn) time.
[KS] M. J. Katz and M. Sharir. An Expander-Based
Approach to Geometric Optimization. Proc. of the
ninth Symposium on Computational Geometry, ACM,
pp. 198-207, 1993.
6 Conclusions
[M] N. Megiddo. Linear-time algorithms for linear pro-
gramming in R3 and related problems, SIAM J. Comp.,
We have presented a new algorithm for the two- 12 (1983), pp.759-776.
center problem. Its cost of 0(n2 log n) is the [RT] H. Rademacher and O. Toeplitz. The Enjoyment
best known to date. The algorithm is based of Mathematics, Princeton Univ. Press, Princeton, NJ,
1957.
on an interesting insight into the geometry of
[S] J. J. Sylvester. A question in geometry of situati-
the problem that leads to a simple searching
ons, Quart. J. Math. 1(1857), p.79.
scheme called searching with lazy evaluations. [SH] M. I. Shames and D. Hoey. Closest-Point Pro-
The algorithm is robust with respect to dege- blems, Proc. FOCS, IEEE (1975), pp.151-l 62.
nerat e configurations of points. It also handles [V] G. Vegter, Computing the bounded region deter-
uniformly optimal discs that are defined either mined by finitely many lines in the plane, Tech. Report
87-03, Dept. Math. and Comp. Sci., Rijlkuniversiteit,
by three or by two points. The searching scheme
Groningen, 1987.
is simple and therefore it will be interesting to
see whether or not there is some room for im-
provement in the time complexity. Interesting
directions of further research include studies on
more general k-cent er problems for a fixed va-
lue of k, and for non-Euclidean metrics. We

311

You might also like