You are on page 1of 17

Locafim Science, Vol.

Pergamon

PII:SO966-8349(98)00032-l

5, No. 3, pp. 147-163 1997


0 1998 Elsevier Science Ltd
All rights reserved. Printed in Great Britain
0966-8349/9&l $19.00 -1 0.00

THE SINGLE FACILITY LOCATION PROBLEM


MINIMUM DISTANCE CONSTRAINTS

WITH

YAEL KONFORTY and ARIE TAMIR*


Department

of Statistics and Operations

Research, School of Mathematical


Tel-Aviv 69978. Israel

Sciences, Tel-Aviv

University,

(Revised version received 10 November 1997)

Abstract-We
consider the problem of locating a single facility (server) in the plane, where the
location of the facility is restricted to be outside a specified forbidden region (neighborhood)
around each demand point. Two models are discussed. In the restricted l-median model, the
objective is to minimize the sum of the weighted rectilinear distances from the n customers to the
facility. We present an O(n log n) algorithm for this model, improving upon the O(n) complexity
bound of the algorithm by Brimberg and Wesolowsky (1995). In the restricted l-center model the
objective is to minimize the maximum of the weighted rectilinear distances between the customers
and the serving facility. We present an O(n logn) algorithm for finding an optimal i-center. We
also discuss some related models, involving the Euclidean norm. 0 1998 Elsevier Science Ltd. All
rights reserved

Key words: Planar location problems, undesirable facilities, location with forbidden regions, center
and median problems.

1. INTRODUCTION

One of the most active research areas within location theory in recent years has been the
location of undesirable
or obnoxious facilities. Facilities of this nature, such as nuclear
reactors, garbage depots and chemical plants, may cause lower quality of life or even pose a
severe danger to people living nearby. The location models that are mostly used in this
context are those which maximize a weighted sum of the distances between the facilities and
the demand points, (maxisum criterion), or the minimum of the distances between the
obnoxious facilities and the customers, (maximin criterion); see Erkut and Neuman (1985)
for a literature review. These models focus only on the costs associated with the obnoxious
nature of the facilities, the social costs, which decrease with the distances from the facilities,
but ignore the service or transportation
costs, which usually increase with these distances. For
example, in the case of electrical power plants the costs of transmission (including loss of
power) are not represented by the above criteria.
The recent paper by Brimberg and Wesolowsky (1995) present a different approach. They
describe a model for locating a single facility (server) in the plane, which considers transportation or service costs between the facility and a given set of n demand points, as well as
social costs arising from the undesirable
characteristics
of the facility. Their model has a
standard minisum objective to minimize transportation
costs. These costs are assumed to be
linearly dependent on the rectilinear distances between the facility and the demand points.
The social costs are included implicitly in the form of constraints forcing the location of the
*To whom correspondence

should be addressed.
147

148

Y. KONFORTY

and A. TAMIR

facility to be outside a specified forbidden region around each demand point. Using the
rectilinear norm, each forbidden region is expressed as an open neighborhood
around a
demand point. Thus, the problem amounts to a planar single facility location model in the
presence of forbidden regions. Location models with forbidden regions have been recently
discussed in Aneja and Parlar (1994), Hamacher and Nickel (1994), Hamacher and Nickel
(1995). and references therein.
Brimberg and Wesolowsky present an O(n) algorithm for solving the above rectilinear
distance minisum problem with infeasible regions. In this paper, we study their model as well
as other related restricted planar location problems. Our main goal is to obtain more
efficient algorithms by using computational
geometry methods.
In Section 2, we focus on the above restricted l-median model of Brimberg and Wesolowsky. We identify additional properties of an optimal solution, and use them to derive an
O(n log n) algorithm.
In Section 3, we describe the l-center version of the rectilinear problem, where the
minisum objective is replaced by a standard minimax objective. We present an O(n logn)
algorithm for solving this restricted l-center problem.
In Section 4.1, we comment on the complexity of the Euclidean restricted l-median and
l-center problems. In particular, we note that the restricted Euclidean l-center problem has
an 0(nlog4n) algorithm. Finally, in Section 4.2, we cite some known complexity results on a
maximin model, which can be interpreted as a dual of the restricted l-center problem.

2. THE RESTRICTED

RECTILINEAR

l-MEDIAN

MODEL

Given is a set ofn points {a,...~},a=(af,a,),i=l


, . . . ,n, in the plane, representing a set
of n customers. Each point (customer) ai, i = 1, . . . ,n, is associated with a non-negative weight
w,, and a positive radius ri. For each pair of points x = (x,,x~) and y = (v,JQ in the plane let
d&y) denote the rectilinear distance between them, i.e.,
&,y)=

1x1 -Yll+l~*-Y*l

For i=l , . . . ,n, the set Si = {xld(x,ui) <ril is called the (open) neighborhood square of ui.
Let S*i denote the closure of Si. The rectilinear (weighted) l-median problem with minimum
distance constraints is to find a point x = (x,,Q) in the plane, which is outside of all the n
open neighborhood
squares, and minimizes the sum of weighted distances to the n customers. Formally,
Minimize

W(x) = ( , <Fcn) wid(x,d)

d(X,d)>ri,

i= I ,..., n...

We refer to the above problem as the restricted l-median problem. This problem has
been studied by Brimberg and Wesolowsky (1995), who observed several properties of an
optimal solution and used them to design an algorithm that finds such a solution in O(n)
time. In this section we identify some additional properties and present an O(n log n) algorithm for solving the problem.
The
objective
function,
W(X), is separable,
and
can
be
represented
as
W(X) = W,(xI)+W&&
where

Single facility location problem

149

and
W&2) =

z W;lX*--a;1

sisn

Let x* be an optimal solution to the unrestricted median problem, i.e. x* is a minimizer


of the function W(x). Since W(x) is separable, x can be found in 0(n) time by solving two
one-dimensional
(weighted) l-median problems (Aho et al., 1974). If x* is outside all the
open neighborhood squares, x* is an optimal solution to the restricted model. Otherwise, due
to the convexity of the objective function W(x), there is an optimal solution to the restricted
problem which is located on the boundary of the union of {&I. More precisely, there is an
optimal point lying on the boundary of the connected component
of the union, which
contains x*. Let S = S,US,. . . US,, and let Bd(S) denote the boundary of S. S is called the
forbidden region. Since S is the union of squares, it follows from the general theorem in
Kedem et al. (1986) that Bd(S) consists of 0(n) closed segments. In degenerate cases Bd(S)
might also contain 0(n) isolated points. Let V(S) be the set of vertices of Bd(S), i.e. V(S)
consists of the endpoints of the segments and the isolated points of Bd(S). Consider the cell
partition of the plane induced by the set of 2n vertical and horizontal lines passing through
the n points {a). The function W(x) is linear over each of the 0(n) rectangles (cells) of the
partition. Therefore, there exists an optimal solution to the restricted l-median problem,
which is either a vertex of Bd(S), or an intersection point of this boundary with one of the
2n vertical and horizontal lines passing through the points {a). Since the boundary consists
of O(n) segments, the above observation
identifies a set of O(n) points containing
an
optimal solution. (We note that the above reasoning has already been used in Hamacher and
Nickel (1994).) See Fig. 1 for an illustration; the points {a} are indicated by the black dots.
We now refine the argument to identify a set of linear cardinality containing an optimal
point. Specifically, we will show that each one of the above 2n horizontal and vertical lines
contributes at most 2 points to such a set.
Let x* be an optimal solution to the unrestricted problem, and suppose that x* is in S.
Without loss of generality, assume that x* is the origin. Let S(x*) denote the connected
component of S containing the origin, and let Bd(S(x*)) denote the boundary of S(x*). As
noted above, Bd(S(x*)) contains an optimal solution to the restricted median problem.
Consider a vertical line L which passes through some point ai, i = l,.. .,n. This line
intersects Bd(S). Since the origin is a global minimizer of W(x), an optimal point of W(x) on
the intersection of Bd(S) with the positive (negative) ray of L is the point of this intersection
which is closest to the horizontal axis. A similar observation holds for any horizontal line.
Therefore, each one of the 2n vertical and horizontal lines passing through the original set
of points defines at most 2 points suspected for optimality. The above is formally summarized
in the next lemma.
Let V(S) denote the set of vertices of Bd(S), and let V(S(x*)) denote the set of vertices of
Bd(S(x*)). For each i = 1,. . . ,n, define
x;(i)=min(x,:(x,,u:)

E Bd(S),x, 2x*,)

x;(i)=max{x,:(x,,&

E Bd(S),x, Ix*,)

x$(i) = min(x2:(u~,x,)

E Bd(S),x, 2x**]

Y. KONFORTY and A. TAMIR

150

Fig. 1. An example problem.

x;(i)

maxlx2:(al,xz> E B~(S),X~IX*~)

and let
Vi= i (xt(i),a:),(xI(i),al),(al

&(OMal ,x2(i)) 1

(If some points in vi are not well-defined they should be omitted. For example, if there is no
point ((xi,a$ E Bd(S),xr 2x)*, [x:(i),&)] is deleted from K.) vi defines the set of at most
4 points suspected of optimality, that correspond to the pair of horizontal and vertical lines
passing through the point u. We note that in the above definition [x:(i)~~(i)~X;(i)~:2(i)],
i=l , . . . ,n, the set M(S) can be replaced by Bd(S(x*)), since the latter is a subset containing
an optimal solution. However, doing this will require the extra effort to identify the segments
and isolated points of M(S) which also belong to B&7(x*)).
Lemma. Let x* = (x*,,x*~) be an optimal solution to the unrestricted problem, and suppose
that x* is in S. Then, either V(S(X*)) contains an optimal solution to the restricted problem, or
there exists a set Vl i = 1, . . . , n, such that one of the points in Vi optimally solves the restricted
problem.

The lemma suggests a three-step algorithm to find an optimal solution to the restricted
median problem.
Algorithm
??Step

1.

I: Construct Bd(S), the boundary of the union of the n open neighborhood


squares, {Si} .
??Step II: For each i = 1, . . . ,n, generate the set Vi.

Single facility location problem

151

o Step III: Compute the objective value W(n) at each vertex of Bd(S), and at each point
in V,UV,... UP,. A solution to the restricted l-median problem is a point with the
smallest objective value among these O(n) computed values.
In the next subsections,
above three steps.

we elaborate

and explain how to execute efficiently

each of the

2.1. Computing the boundary


For illustration purposes, we rotate each neighborhood
square by 45 to obtain a set of
squares, with edges parallel to the axes.
We now use the results in Cheng and Janardan (1991) on maintaining
dynamically the
union of intervals, to show that all the horizontal segments of the boundary of the union of
the (open) squares can be generated in O(n log n) time. (A similar procedure can be applied
to the vertical segments of the union.)
For each real b, let L(b) denote the horizontal line defined by L(b) = {$x2 = b}, and let
S(b) denote the intersection of the horizontal line L(b) with the union of the closures of the
(rotated) neighborhood
squares. S(b) is a union of intervals. S,(b) will denote the projection
of S(b) on the horizontal axis, L(0).
To simplify the presentation
and to avoid a messy technical discussion, we will focus only
on a nondegenerate
problem. Specifically, for each pair of neighborhood squares, we assume
that the intersection
of their boundaries is either empty or consists of a finite number of
points. Moreover, we assume that if this intersection
is nonempty, it has more than one
point. (To handle degenerate situations where the intersection
is either a single point or
contains a segment of positive length, a perturbation
argument can be used.)
Since the edges of all the (rotated) squares are parallel to the axes, it is easy to check that
the nondegeneracy
assumption implies that the intersection of the boundaries of any pair of
squares is either empty or consists of exactly two points. Each (rotated) square S*i has two
horizontal edges on its boundary, Ui and Lie They are called the upper and lower edges,
respectively. Let L&5?) denote the projection of U&L,) on the horizontal axis. Suppose that
LIi(Li) is contained in L(b). Then, Ui(Li) contains some horizontal segments of Bd(S) if and
only if the intersection of S,(b) with L$(Lp) properly contains the intersection of &(b+&),
(S,(b -E)) with @(Lp) f or some positive E. Therefore, in order to generate the horizontal
segments on the boundary of the union of the (rotated) neighborhood squares, it is sufficient
to keep track and record the changes in S,(b), when the parameter b varies from +rx, to
- co. The paper by Cheng and Janardan (1991) presents an efficient method to perform this
task. Using their data structure, we can maintain the union of intervals S,(b) dynamically as
follows. We first order all the horizontal edges {Vi} and {Li} in a decreasing order of their
abscissa values. For each value of 6, the data structure will contain the collection of the
projections
on the horizontal axis of all squares intersecting L(b). Following the above
ordering, the edge corresponding
to the i-th square will enter the collection when we arrive
at Ui, and depart when Li is reached. (Note that Ui preceded Li in the above ordering). As
explained in Cheng and Janardan (1991) an insertion or deletion of an edge takes O(log n)
time when we use their data structure. After every insertion or deletion, the changes in S,(b),
(the union of the current subcollection),
define the horizontal segments of Bd(S), corresponding to some edge of a square. Moreover, the time to report these changes is
proportional to the number of new segments. As noted above, the general theorem in Kedem
et al. (1986) ensures that the total number of horizontal segments on the boundary is O(n).

Su!sea.Iaapuou

u! 13 [ {tf~p>(53) swqodpua JO jas aq$ %I!~IOSLq ampaaold

aql azgeyg

??

J uo!pnqg ay3 Eh~anqsuo~


epasn aq uea ampaao.td IaIduqs q3nt.u E asm mo u! IaaaMoH *sadols
hw!q.Ia
q3!~ suopaun3 .n?aug (pauyap Llle!ved) 30 uo!$aalloa e 01 sa!lddE qa!q~ (6861)
la%aqysraH 30 wqy~o@e aql lcq auqi (24Bol U)CI u! pawaua% aq ue3 (1~)s uopaun3 aqL
+&JO sanleh aapaadsar aq$
pue sw!odyeaIq 30 aauanbas SI! 1(q pa1uasalda.I aq II!M (1x)$ *[py lenraw! auos 30 w!od
auIaJ3xa ue s! vr!odyealq qaeg wqodyealq
(24)~ ]sour le qyM uopauy n?aug as!Maaa!d e s!
(x)+j leql SMO~[OJJ! adop aules aq$ aAt?q uo!$aa[[oa aql u! suogauy reaug aql 11~ aau!s
aq plnoqs lay1 h s!ql uo
((I),zx@ = ((:4+&D) 4 uaa$l s! Dgeu.ydo 103 pau!urexa laqvy
ju!od @IO ayl lsql aas 01 ha s! I! ewura~ aql IIIOJ~ 0 z !,o { !?ZI= I+) = (!&7 Lq pauyap
(!,0)7 au!1 Iea!]larl e 30 LI?.I aag!Sod aql Jap!suo3 .suo!puy
leaug (pauyap @plvd)
30
uo!~aa~~oa s!ql30 uogaun3 tunur!u!w as!.wqod aql aiouap (rx)$lay
.s!xe [ev~oz!roq (aag!sod)
aql 30 [1~C2]pwalu! awos ma0 pauyap (x)y uopaun3 reau!I e se $ wawflas qat?a May
4xaN ~uopaalloa Bu!u!wal
aqi alouap f3 .I {I> ~q wopaalloa aql ~0~3 I! alalap 4ueqvo
wg aq$ ap!slno @adoId s! wat.uSas e 31 (($)A 01 11 ~uau.rZhw lu!od e s! luau.C?asqns s!ql
31) weql.xO wj aq$ u! pau!e)uoa s! qa!qM luauI%asqns ~XI~DXLIsy I(q 11 aaqdal vn?qllo WJ
aq$ slaas.IaJu! luau.t%as I? qms 31 -adois I- 1?qJ!M sluaur%as 111~
30 uo!Pal[oa aqJ .Iap!suo3
Q)/i saalgaa 30 *as aql
01 pa)uaurihl! uaql s! qa!qM Q)x $u!od SJ! Lq paaElda1 s! 1 $uaurklas qaea @aypads
*adop
I+ e aAeq pue lueqlJ0 3s.y aql Jaaslalu! qa!qM (s)pg uo swat&as aq4 ~[a alo&! ahi uI~q~.Io
wy aql u! yjn . Z/in _,I las aql 30 sju!od lueaalal aqj %.u~ndwoa 30 aqes aql 105
%tl~
(Wh
5 (*$I4
sa!ldw! rC~(&r *X 611eay!aads *u@po aql s! *x wql $3~3 aql pue ($A
uogaun3
aql 30 hg!qe.wdas
pw O!xaAuoa aql u1o.13 l(paaJ!p SMO~~OJur!ep aql 30 3ooJd aqL

w!od a@!s 6q r.uaql30 qaea aae1da.t


put? adop I+ e ql!M sluatu8as asoy] jje I!WO ~aq].In3 uea aM v?qi urp?p &NJ aM weqlro
1sq.j aql 3aaaalu! leqj (s)pg 30 s$uauGas aql Quo Iap!suoa 01 wa!ag3ns s! 41 weqbro wy
aqg u! slu!od uo!yaslavq
aql 61~0 Bu!ssnmp are aM ams 1 dais ~11013a1qelym Lppeaqe s!
swat&as asaql ~]a 30 uog3alloD aqlwql asoddns (I- .IO I+ .xaqlla s! waur8as qxa 30 adols
aqL) xayraa
pue sluaru8as (u)~ 30 sqsuog (s)pg Ir?ql aAoqe palou dpea.qe aAeq aM
0 z :v %.1!4s!p
{ !v} slu!od qBno.Iql ssed qa!qa
say lexyaa 30 sh aapfsod aql Icq pa$erauaB a.n? slu!od asaqL weq].to wy aql u! ale wql
/in z/in l/i 30 svqod aql lap!suoD &IO [I!M ati h~auuuds 01 ana TI$!!IO aq$ s! TualqoJd
pap!.warun
aql 04 uogfqos u~ouy e .g ]eq$ hgelaua% 30 SSOI lnoql!M asoddns .awg
(U 801 u)o II! U 1 = ! {!A} slas aq] 11~ awaua8 01 Moq hioqs ah4 I dais ~013 a[qpl!er\e
dpeaqk? s! (s)pg leg] %&unssjf *ICl!leugdo .103 salep!pueD lepualod ale q%qM {!A} slas
aql u! sw!od aql awaua% aM alaqM 1 ruq$goZw 30 11 dais upqdxa ah uogaasqns s!q~ UI
uoynlos pxu~ydouv BU~U~VPOS
las v 8u~hIjlyuapIzz

aql (s)pg 30 sluaur%as leluoz!loq

.(u 201 u)o s! salenbs aql30 uo!un aql30 Oepunoq


aql lit! 1JodaJ pw aleraua8 01 aurg ~ZIOI aql alo3aJaqL

Wb'W.LV P"e LLtlOdNOX A

ZSI

Single facility

location

problem

153

??Let

c be the smallest element in T. Let Jo be the subset of all intervals whose left
endpoint is equal to c. Maintain the subset of functions cJ;.(Xi)>,j EJ~ in a heap, (Aho
et al., 1974) using their values at c as the key for comparisons. (The top element in the
heap is the function with the smallest value at c.)
??At each step consider the first element, say t, in the (remaining)
list T. If f is a right
endpoint, delete the respective function from the heap. If t is a left endpoint of an
interval, insert it into the heap (using the function values at t as the key for comparisons). Delete t from the list T.

Since it takes O(logn) time to delete or insert an element from the heap, (Aho et al.,
1974), the total running time will be U(n log n).
It is clear that the above procedure will generate the sequence of breakpoints ofr,
and
their respective function values.
Using a binary search over the breakpoints
of F(x,),
it now takes U(logn)
time to
compute F(x,) for any specified value of x i. Hence, in O(n log n) time we can compute all
the suspected points corresponding
to all the positive rays of the vertical lines passing
through the points {a) that are right of the vertical axis. A similar procedure can be applied
to the positive rays of vertical lines that are left of the vertical axis; to the negative rays of
the n vertical lines, as well as to the 2n rays associated with the n horizontal lines passing
through the points {a). If we now augment to the set of points generated above, the O(n)
vertices of Bd(S), we have a set of O(n) cardinal@ containing an optimal solution. We
summarize the above in the following proposition.
Proposition. Let {h}, j = I,. . ., q; q = O(n), denote the set of segments on Bd(S). Suppose
that each segment 4 is explicitly specified in terms of its two endpoints. There is an O(n log n)
algorithm that constructs a set of points, OPT of O(n) cardinal@ which contains an optimal
solution to the restricted (weighted) l-median problem.
To prove our claim that there is an O(n logn) algorithm for the restricted l-median
problem, it is sufficient to show how to evaluate the objective function W at all the points in
OPT in O(n log n) time.
2.3. Computing the objective
Let {bk = (b:,bk,)), k = 1,. . .,m, be a set of m points in R. We show that the total effort to
Due to the separability of
compute W(bk) for all k = 1,. . .,m, is O((m+n)min(logn,logm)).
the objective, it is sufficient to show that the one-dimensional
components
{W,(b:)}
({ W,(b;)}) are computable with the specified effort. Suppose first that m <n. In this case we
start by sorting the set {b:}. Without loss of generality assume that bi <b:< . . . <b/. Next,
time to find the two
for each i = 1, ., .,n, if we use a binary search it takes O(logm)
consecutive elements in the sequence {bi,. . . ,by}, which bound ai.
For each k = 1,. . .,m, define Ak = &ila;5h:~~,u<, and I@ = Z~ic;5~~~~i. Also, let
With the above preprocessing
it now takes
A= C (,~~~~w~ail, and W=C(~~i~~)wi.
O(n+m) = O(n) time to compute Ak and I@ for all k = 1,.. .,m. It is now easy to see that for
each k = 1,. . . ,m,
W, (6:) = Wkb; - Ak+(A - Ak) - (W - W)b;.
Thus, the total effort to compute W,(b$) for all k = 1,. . .,m, in the case where m _<n is
O(m log m+n log m+m+n) = O(n log m).

154

Y. KONFORTY

and A. TAMIR

A similar procedure can be applied in the case where n cm. In this case, we start by
sorting the set {a:,.. .,a;}. Next, for each k = l,.. . pz, it takes O(logn) time to find the two
consecutive elements in the set {a ), . . . p?> which bound b$. We then proceed as above. The
= O(m logn). We have shown that the
total effort in this case is O(n log n+m log n+m+n)
total time to evaluate the objective W at m points, where m = O(n), is O(n log n).
2.4. Summary
To summarize, we have presented an O(n log n) algorithm to solve the rectilinear weighted
l-median problem with minimum distance constraints. If the solution to the unrestricted
problem satisfies the distance constraints, it is trivially an optimal solution to the restricted
version. Otherwise, the algorithm consists of three major steps.
In the first step, we compute Bd(S), the boundary of the union of the n open neighborhood squares, {Si}. &f(S) consists of O(n) segments and isolated points. We implemented
the approach in Cheng and Janardan (1991). With this approach &f(S) can be constructed in
O(n log n) time.
In the second step, we implement an O(n logn) algorithm to generate a set of points
A * = V, U . . . VI,,, of O(n) cardinality, which consists of some intersection points of M(S)
with vertical and horizontal lines passing through the original set of points {a}. An optimal
solution to the restricted l-median problem is either a vertex of Bd(S) or a point in A *.
In the third and last step, we compute the objective function at all the vertices of M(S),
and at all the points in A*, and select the best value. This step can also be executed in
O(n log n) time.
Remark. In the above model, the forbidden region, S, is defined as the union of n open
neighborhood squares. However; the complexity of the algorithm will not be affected even if we let
S be the interior of any given compact polygon with O(n) edges. Knowing the edges of such a
polygon we can skip Step I of the above algorithm. In Step II we will implement the procedure
of Hershberger (1989), since the edges might have arbitraryslopes.
2.5. Example I
To illustrate the main three steps of our algorithm we use the following example from
Brimberg and Wesolowsky (1995). (See Fig. 1.) There are five demand points defined by
(a,a2,a,a4,~) = ((2,3),(4,4),(5.5,3.75),(7,6),(8.25,2.25)}
These five points are indicated by the black dots in Fig. 1. The respective radii of the
forbidden
neighborhood
squares
are
{r1,r2,r3,r4,rs) = {2,1.5,2.25,1.5,1.25>,
and
w1=w2=wj=w4=w5=1.

The unrestricted
l-median
for this example is x* = a3 = (5.5,3.75). In Step I of the
algorithm we use the data structure in Cheng and Janardan (1991) and compute Bd(S), the
boundary of the union of the five forbidden squares. The outcome is depicted in Fig. 2.
In Step II we identify a set of points containing the optimal solution. Since there is an
optimal solution on Bd(S(x*)), the boundary of the component containing x*, the set of
points suspected for optimaility will consist of the vertices of Bd(S(x*)), and some relevant
intersection points of the five pairs of vertical and horizontal lines passing through the five
demand points. Those intersection points that are not vertices of Bd(S(x*)) are depicted in
Fig. 3 by the white (i.e. circled) dots. For example, the horizontal line passing through
a5 = (8.25,2.25) intersects Bd(S(x*)) at four points. However, as explained above, the only

Single facility location problem

155

Fig. 2. Bd(S), the boundary of the forbidden

Fig. 3. The set of points that are potential

region.

7
candidates for optimality.

Y. KONFORTY

156

and A. TAMIR

pair of points that are relevant on this line are those that are circled in Fig. 3, since their x1
components are the closest to x*, from both sides.
In Step III of the algorithm we compute the objective at each vertex of Bd(S(x*)), and at
each white (circled) dot. We find that the circled point (7,3) is optimal.

3. THE RESTRICTED

RECTILINEAR

l-CENTER

MODEL

In this section, we consider the minimax version of the above model. Formally,
(weighted) l-center problem with minimum distance constraints is:

the rectilinear

Minimize
G(x)= ( ,m~n~I wiqx,d)
s.t.
d(X*U)2ri*

It is more convenient

to reformulate

i= l,..., n

the above restricted

l-center

model as:

Minimize z
s.t.

d(X,U)SZ/Wi, i = 1,. . . ,n
d(X,U)>ri, i= I ,..., n
For each value of t, let B&z) = {xld(xp)Iz/wi},
i = 1 ,.. .,n, be the i-th closed neighborhood square of radius z/wi. Define B(z) to be the intersection
of all these neighborhood
squares. B(z) is a rectangular whose dimensions depend monotonically
on the parameter z.
The unrestricted
l-center problem is to find the smallest value of z such that B(z) is
nonempty. (We note that the rectilinear unrestricted l-center problem can be solved in O(n)
time by the algorithm in Megiddo (1983a). The restricted l-center problem is to find the
smallest value of z, such that B(z) intersects the complement of S. Let x* and x** denote the
solutions to the unrestricted and restricted l-center problems, respectively. Let z* and z** be
the respective optimal values of these problems. If x* is feasible to the restricted problem, i.e.
x* is not in S, thenx =x*, and z** =z*. Otherwise, z** is the smallest value of z such that
B(z) intersects &f(S). More exactly, z** is the smallest value of z such that B(z) intersects the
boundary of the connected component of S, say S(x*), which contains x*. (Note that x* is in
B(z**).) Let the boundary of this component be denoted by Bd(S(x*)).
We rotate the plane by 45, and assume that the segments on the boundary of &f(S) and
the boundary of B(z) are parallel to the axes. The four edges on the boundary of B(z) will be
referred to as the right, left, upper and lower edges. The four lines containing the four edges
of B(z) can be given an explicit representation.
For each i = 1,. . . ,n, define bi = &/(2w,), and
ci = (c,,c,) = (l/&)(u;
-&~~+a$.
With the rotated axes, the four lines are specified by the
following expressions:
L,(Z)= [XIX, =

min
(C{+biz))
1I <izznl

L,(Z)

max (C;+biz)]
(I X?Gi5ttl

= (~1x1=

Singlefacilitylocation problem

157

Suppose that x* is in S. (Otherwise, x** =x*.) As noted above, our task now is to find the
smallest value of .z such that B(Z) intersects Bd(S(x*)). We start by using the O(nlogn)
algorithm of the previous section to construct all the O(n) segments and isolated ponts of
&f(S). Note that B(Z) depends monotonically
on z, but Bd(S) and Bd(S(x*)) are both fixed
and independent of z.
3.1. Computing the restricted l-center
We will present two O(n log n) algorithms to find x ** . We start by describing an efficient
procedure to test whether a given value of z satisfies z&z**. If z&z** we will say that z is
feasible. Suppose that z>z*. Then, Z~Z ** if and only if B(z) contains an isolated point of
Bd(S), or B(z) intersects a segment of Bd(S).
Given is a value of z, satisfying z >z*.
Feasibility Test for z.
??First

we compute the four edges of B(z). From the above expressions for the four lines,
we observe that with a single processor it takes O(n) serial time to compute the four
edges of B(z). Moreover, since the computation
is based on finding the minima and
maxima of it numbers, O(n) processors will need only O(log log n) parallel time to
perform this task (Valiant, 1975).
??Next we associate a single processor with each one of the O(n) segments and isolated
points of Bd(S). Each processor will test (in constant time) whether the respective
segment or isolated point intersects B(z). Since these O(n) processors can work in
parallel, it takes them a constant (parallel) time to test whether B(z) intersects Bd(S).
The serial time to perform this task by a single processor is clearly O(n).
To summarize, we have shown that for each value of z, there is an O(n) processor,
O(loglogn) parallel time algorithm to test whether z>z ** . The serial time for such a test is
O(n).
The first algorithm to compute z**, which we call Algorithm 2, is a direct application of
a general method. With the above parallel version of the feasibility test we can now directly
apply the general parametric approach in Megiddo (1983b), which converts multi-processor
parallel algorithms into single processor serial algorithms. Specifically, we can convert the
above parallel testing algorithm into a procedure to find z**, the smallest value of z such that
B(z) intersects Bd(S(x*)) in O(n log n log log n) (serial) time. This bound can be further
reduced to O(n log n) if we implement
the improvement
in Cole (1987). The reader is
referred to these two papers for a detailed description of the general parametric procedures.
We now describe a different O(n log n) algorithm to find z**, which avoids the parametric

approach of Megiddo (1983b).


Using the expressions for the four lines bounding
functions.

B(z), we define

(c{+b,z)
f,(z) = , I min
<i<n)

the following

four

Y. KONFORTY

158

and A. TAMIR

fz(Z)=

(,y$ I

(cl+b;z)

f3(z)=

(l5i<n)

(c:+b,z)

min

The functions f, and f3 are concave and f2 and f4 are convex. Moreover, each one of them
is piecewise linear and has at most n breakpoints. There are standard procedures to compute
the breakpoints of each such function in O(n log n) time; see for example, Megiddo (1983b).
Next we merge the four sets of breakpoints of these functions into a sorted sequence having
at most 4n elements. Let {z, . . . ,zk}, k 14n, denote the elements of the combined list.
denote the pair of adjacent elements of the sorted list bounding the
Let 2 and i
optimal value z**, i.e. tiIz** <zi+. Then, since each one of the four functions is linear in
the interval [#$+I, there exist indices i(l), i(2), i(3), i(4), such that for each value of z in this
interval,
f , (z) = ci: +b;, , )z
f2(Z)

= Cli(2) -

biC2)z

f4(z)

= C i(4)
I

biC4)z

We conclude that the four lines,


L,(z)= lxlx, =f,(z)l
L2(z)

= ( XIX I = f2(z)

L,(z)

= (XIX2

= fdz)

354(z)

= (XIX2

= f4(z)

defining B(z) vary linearly with z over the interval


second algorithm to find z**.
Algorithm 3.

[2$+i].

We are now ready to present

the

Compute and sort the sequence of all breakpoings of the functions fi, f2, f3, f4. Let
{z, . . . $1 be the sorted list of these breakpoints.
Apply a binary search on the sequence {z,. . .#I, using the above feasibility test, to
find the pair of consecutive elements i and _$+I satisfying i<z** <z?. Identify the
indices i(l), i(2), i(3), i(4), such that f,(z) = &)+bicl)z, f2(z) = c1(*)-biC2g, f3(z) =
c1(3)+bi(3g, f4(Z) = Cic4) -biC4gr for all z in [j,~+ I.
Let {Ii}, t = 1,...,q, be the set of all segments and isolated points of Bd(S). For each Z,
compute .zl, the smallest value of z in [z$] such that B(z) intersects 1,.
z, = minlz:fz(z)

Ix1 (fl(z),f4(z)

where fi, f2, f3, f4 are the linear functions


B(P) does not intersect Ii.)

Ix, I fJz),zI
defined

z 5 zj+,(x, .x2) E I,)

in the previous

step. (Set z, = $+ if

Single facility location problem

Setz** =

159

min
{z,>.
1= I,...,y

The validity of the algorithm follows from the above discussion. To evaluate the complexity
of the algorithm, we show that the effort in each step is dominated by O(n log n).
We have already noted above that the time to compute and sort all the breakpoints of the
functions fr, f2,f3,f4 is O(n log n). In the second step, we apply a binary search using the
linear time feasibility test. Thus, the total time needed to identify the adjacent breakpoints 2
and $+I, and the indices i(l), i(2), i(3), i(4) is also O(n log n). We observe that for each Z, the
effort to compute z, is constant. Since the number of segments and isolated points of Bd(S)
is linear, the effort of the last two steps is O(n).
To summarize, we have shown that there is an O(n log n) time algorithm to solve the
rectilinear (weighted) l-center problem with minimum distance constraints. The above algorithm simplifies considerably for the unweighted case defined by wj = 1, for i = 1,. . . ,n. In this
case, the first two steps of Algorithm 3 can be skipped since the functions fi, f2,f3,f4 are
linear over their entire domain of definition. In particular, if &f(S) is given the additional
effort needed to find the restricted unweighted l-center is O(n).
Finally, we note that the complexity of Algorithm 2 and Algorithm 3 will not be affected
if we replace the assumption that the location of the center be outside a specified open
neighborhood
around each point, by the assumption that the location shou.ld not be inside
some specified compact polygon P, which has O(n) edges. The latter version of the problem
was recently solved in Nickel (1995) in O(n2 logn) time. Our algorithm improves the complexity of this problem by a factor of n.

3.2. Example 2
Consider the following example where the data refer to the rotated plane in order to be
consistent with the above notation. Specifically, there are three demand points given by
{c,c2,c3} = {(2,2),(4,4),(6,2)).
The (rotated) forbidden squares are of sizes 2,4 and 2, respectively. The weights of the points are given by bi = b2 = 1, and b3 = 4. See Fig. 4.
We apply Algorithm 3 to this problem. First we find that x* = (3,3) is a solution to the
unrestricted problem with an optimal value z* = 1. Next we compute the functions fi, f2,f3,
f4 in the range 220.
f,(z) = min{ 2+z,4+z,,6+4z] = 2+z.f2(z) = max{2-z,4-z,6-4~1

= max{ 4-z,6-4zl,f~(z.)

= min (2+z,4+z,2+4z) = 2+z, and ,f4(z) = max( 2 - z,4 - z,2 -4~) = 4 - z


The only proper breakpoint of the above functions corresponds to f2,and this is the point
z = 2/3. In the next step, we have to apply the feasibility test to 2. However, since
z <z* = 1, and z*<z**, we conclude that z** >z. Therefore, f,(z) = 2+z, f2(z) = 4 -z,
f3(z) = 2+z, and f4(z) = 4 -z in the relevant range z 2 2/3.
From Fig. 5 we note that the boundary of the forbidden region consists of six horizontal
segments and six vertical segments. For each segment Z,, we need to compute z,, the smallest
value of z such that B(z) intersects Z,. Since each segment is parallel to one of the axes, z, has
a simple expression. For example, if Z, is a vertical segment and Z, = {(dr,~)ld21~2Id3),
for
some constants d,, dZ, dj, then
z,=min(z:4-z<d,

12+2,4-z~x,12+z,d,Ix,Id,}

160

Y. KONFORTY and A. TAMIR

Fig. 4. An example problem.

3
Fig. 5. Bd(S) and B(z**).

Single facility location problem

161

Computing z, for all 12 segments we find that z**, the smallest value of {z,), is given by
z ** = 2. The solution to the restricted l-center problem is attained at each point of the
segments {(2,xK2)13
5x244}
and {(x1,2)13 <xi 24). (The optimal set is the intersection
of
B(z**), the black square in Fig. 5, with the boundary of the forbidden region.)

4. RELATED

MODELS

In this section, we comment on some related variations


discussed in Sections 2 and 3.

of the single facility location

models

4.1. The Euclidean models


We have presented above O(n log n) algorithms for the planar rectilinear
l-median
and
l-center location problems with minimum distance constraints. We note that the Euclidean
versions of these problems are considerably more difficult. For example, even the unrestricted Euclidean median problem, known as the Weber problem, has no efficient finite
algorithm. (It has a polynomial time &-approximation scheme; see, for example, Chandrasekaran and Tamir, 1990.)
The unrestricted Euclidean center problem has an O(n) algorithm. The unweighted version was first solved in O(n) time by Megiddo (1983a), while the weighted version was solved
in linear time by Dyer (1986).
The Euclidean l-center location problem with minimum distance constraints can be solved
in polynomial time. For the sake of brevity, we only provide a general description of an
0(n2 log n) algorithm. We then comment on the main features of a subquadratic algorithm.
Let x* be the solution to the unrestricted Euclidean l-center problem. If x* is outside of
all the (open) neighborhood
discs, it optimally solves the restricted problem as well. Otherwise, a solution to the restricted
problem is on the boundary
of the union of the
neighborhood
discs. It is shown in Kedem et al. (1986) that this boundary, which consists of
at most 6n circular arcs and isolated points, can be constructed in O(n log *n) total time. A
more recent algorithm by Aurenhammer
(1988) constructs all the circular arcs on the
boundary in an optimal O(n log n) time and O(n) space. To obtain an O(n*log n) algorithm,
we show that the optimum value along each circular arc of the boundary can be found in
O(n log n) time.
Consider a circular arc of the boundary. Without loss of generality assume that no vertical
line intersects the arc at more than one point. (Otherwise, represent the arc as the union of
two subarcs with this property.) If we represent the given arc in terms of the single parameter
(variable) x,, the objective can be viewed as the pointwise maximum function of n algebraic
functions (g,(x,)}. For each i = 1, , , .,n, gi(x,) will denote the weighted squared Euclidean
distance from the point ai to a point (.x,J~) on the given circular arc. Each function gi(x,) can
be represented as g&x,) = I,(x,)+c,,~h(xl), where ci is a constant, Ii is a linear function and h
is a quadratic function. Moreover, since h(x,) is nonnegative over its respective domain, it
can easily be verified that the sign of the second derivative of gi(Xl) is constant over this
domain. In particular, gi(xl) is either convex or concave.
Let F(x,) denote the objective function, i.e. F(x,) = max(s,(x,), . . . gn(x,)}. Based on the
nature of the functions (g,(x,)}, it can be shown that each pair of them intersects at most
twice. Therefore, from the results in Sharir and Agarwal (1995) it follows that F(x,) has at

162

Y. KONFORTY

and A. TAMIR

most 2n breakpoints. (Note that between each pair of consecutive breakpoints, F coincides
with one of the (gi(x,)> functions.) Using a standard divide and conquer alogrithm (see, for
example, Sharir and Agarwal, 199.5) it takes O(n log n) time to find the sequence of breakpoints of F, and the respective sequence of functions defining F, between each pair of
consecutive breakpoints.
With this representation
of F, it now takes O(n) time to find a
minimum point of F.
We note that there is a subquadratic
algorithm for the restricted Euclidean l-center
problem, which can be obtained by applying the general parametric approach of Megiddo
(1983b), mentioned in Section 3. The implementation
in the Euclidean case is technically
much more complicated than the rectilinear case. The details will be presented in a separate
paper. We only point out the main reason for the additional complications we have in the
Euclidean case. We adopt the same notation as in Section 3, and let B(z) denote the
intersection of the it neighborhood
discs {Bi(z)}. In the rectilinear case B(z) is rectangular,
and therefore its boundary has a very simple representation.
With such a representation,
it
was possible for each value of z to construct the boundary of B(z), and check whether it
intersects &f(S) in O(loglogn)
parallel time and O(n) processors. That was the main tool
used to obtain the subquadratic serial time algorithm. In the Euclidean case the boundary of
B(z), which has a linear complexity, does not have a simple and explicit representation
in
terms of linear functions of the parameter z. Hence, more complex procedures are needed to
test whether B(z) intersects &f(S). Using the approach in Follert et al. (1995) for each value
of z, we can develop an O(log*n) parallel time algorithm to perform such a test. The
implementation
will require O(n) processors. With this machinery, we can directly apply the
general parametric approach in Megiddo (1983b) to solve the restricted Euclidean l-center
problem in O(n log4n) (serial) time.
4.2. Maximin location models
In the l-center models of Sections 3 and 4.1, the costs arising from the undesirable characteristics of the facility are included implicitly in the form of constraints forcing the location of
the facility to be outside a specified forbidden region around each demand point. Given this
constraint, the objective is to minimize the maximum (weighted) distance from the facility to
the II customers. There are some papers in the literature that study a somewhat dual
problem, a maximin model. In this dual model, the location of the facility is restricted to be
within some given compact region P. The undesirable
characteristics
of the facility are
captured by the objective function, which seeks for the location within P maximizing the
minimum (weighted) distance from the facility to the II customers. Typically, P is taken to be
the intersection
of II neighborhood
squares (discs) centered, respectively, around the 12
customers, or P is a simple polygon with O(n) edges. We cite some of the most recent
references that discuss the Euclidean version of this maximin problem.
Ranagan and Govindan (1992) consider the unweighted case, where P is the intersection
of n discs. In the unweighted case, the problem seeks to find the largest circle that does not
contain any of the IZ points in its interior and whose center is located in P. Their paper
presents an O(n logn) algorithm. Melachrinoudis
and Smith (1995) develop an O(n) algorithm for the weighted case, when P is a convex polygon with O(n) edges. Follert et al. (1995)
consider the weighted case, and provide O(n log4n) algorithms for both cases, i.e. when P is
either the intersection of n discs, or a simple polygon with O(n) edges. (They also provide
O(n log3n) algorithms for the rectilinear models.)

Single facility location problem

163

REFERENCES
Aho, A. V., Hopcroft, J. E. & Ullman, J. D. (1974) The Design and Analysis of Computer Algorithms, AddisonWesley, Reading, MA.
Aneja, Y. P. & Parlar, M. (1994) Algorithms for the Weber facility location in the presence of forbidden regions
and/or barriers to travel. Transportation Science, 28, 10-76.
Aurenhammer,
F. (1988) Improved algorithms for discs and balls using power diagrams. Journal of Algotithms,
9, 151-161.
Brimberg, J. & Wesolowsky, G. 0. (1995) The rectilinear distance minisum problem with minimum distance
constraints. Location Science, 3, 203-215.
Chandrasekaran,
R. & Tamir, A. (1990) Algebraic optimization: the Fermat-Weber
location problem. Mathe-

matical Programming, 46, 219-224.


Cheng, S. W. & Janardan,

R. (1991)

Efficient

maintenance

of the union of intervals on a line, with applications.

Journal of Algorithms, 12,57-14.


Cole, R. (1987) Slowing down sorting networks to obtain faster sorting algorithms. J. ACM., 34, 200-208.
Dyer, M. E. (1986) On a multidimensional
search procedure and its application to the Euclidean one-centre
problem. SIAM Journal on Computing, 15, 725-738.
Erkut, E. & Neuman, S. (1985) Analytical models for locating undesirable facilities. European Journal of

Operational Research, 40, 275-291.


Follert, F., Schemer, E. & Sellen, J. (1995) Subquadratic algorithms for the weighted maximin facility location
problem, Technical Report, Universitat des Saarlands, Saarbrucken, Germany; presented at the 7th Canadian
Conference on Computational Geometry, 1995.
Hamacher, H. & Nickel, S. (1994) Combinatorial algorithms for some l-facility median problems in the plane.
European Journal of Operational Research, 79, 340-35 1.
Hamacher,
H. & Nickel, S. (1995) Restricted planar location problems and applications. Naval Research

Logistics, 42, 967-992.


Hershberger,

J. (1989)

Finding the upper envelope of n line segments in O(n log n) time. Information Processing

Letters, 33, 169- 174.


Kedem, K., Livne, R., Path, J. & Sharir, M. (1986) On the union of Jordan regions and collision-free
translational motion amidst polyhedral obstacles. Discrete Computational Geometry, 1, 59-71.
Megiddo, N. (1983a) Linear-time algorithms for linear programming in R and related problems. SIAM Journal

on Computing, 12, 759-776.


Megiddo,

N. (1983b)

Applying

parallel

computation

algorithms

in the design of serial algorithms. Journal of

ACM, 30,852-865.
E. & Smith, J. M. (1995) An O(mn) algorithm for the maximin problem in Z?. Operations
Research Letters, 18, 25-30.
Nickel, S. (1995) Discretization of Planar Location Problems, Verlag Shaker, Aachen, Germany.
Ranagan, C. P. & Govindan, R. (1992) An O(n log n) algorithm for a maxmin location problem. Discrete Applied
Mathematics, 36, 203-205.
Sharir, M. & Agarwal, P. K. (1995) Davenport-Schinzel Sequences and their Geometric Applications, Cambridge
Melachrinoudis,

University Press, Cambridge, UK.


Valiant, L. S. (1975) Parallelism in comparison problems. SIAM Journal on Computing, 4, 348-355.

You might also like