International Journal of Computational Geometry & Applications c
World Scientic Publishing Company
AN OPTIMAL DATA STRUCTURE FOR SHORTEST
RECTILINEAR PATH QUERIES
IN A SIMPLE RECTILINEAR POLYGON
SVEN SCHUIERERInstitut fur Informatik, Universitat Freiburg, Am Flughafen 17 D-79110 Freiburg, Fed. Rep. of Germany,
email: [email protected] Received 1 September 1993
Revised 21 May 1994 Communicated by K. Mehlhorn
ABSTRACT
We present a data structure that allows to preprocess a rectilinear polygon withn vertices such that, for any two query points, the shortest path in the rectilinear link or L
1-metric can be reported in time
O(logn+k) wherek is the link length of the shortest path. If only the distance is of interest, the query time reduces to O(logn). Furthermore, if the query points are two vertices, the distance can be reported in time O(1) and a shortest path can be constructed in timeO(1 +k). The data structure can be computed in time O(n) and needsO(n) storage. As an application we present a linear time algorithm to compute the diameter of a simple rectilinear polygon w.r.t. the L
1-metric.
Keywords: Simple rectilinear polygons, shortest path query,L
1-metric, rectilinear link metric.
1. Introduction
In many applications such as VLSI-design1 rectilinear paths play an important
role. Usually one is interested in minimizing the length of a path between two points and numerous results have been obtained in this area.2;3;4A natural metric
to measure the length of a rectilinear path is theL1-metric but sometimes it is also
useful to take the number of turns on the path into account. This gives rise to the so called (rectilinear) link metric which is dened as the number of line segments a path consists of.
A variety of problems have been considered in this context. Das and Narasimh-man5 give an O(nlogn) algorithm to compute the shortest rectilinear link path
among a set of disjoint rectilinear polygons. As a by-product they also obtain a linear space data structure to answer shortest rectilinear link path queries in time
O(logn) if one of the query points is xed. Since it is often desirable to take also the
L1-distance into account, Yang et al.
preserves shortest rectilinear link andL1-paths and that can be used to compute the
L1-shortest path between two points with the least number of links or vice versa. de
Berg et al.7 consider a linear combination of the rectilinear link and theL
1-metric
and construct a data structure that answers shortest path queries according to this combined metric among rectilinear line segments that are allowed to intersect. Again one of the query points is xed. The time needed for the construction of the data structure isO(n2) while queries can be answered inO(logn) time. The storage
requirement is O(nlogn). If the L1-metric alone is considered, two types of data
structures have been developed for distance queries among rectangular obstacles given two arbitrary points. The rst one by Atallah and Chen8 answers queries
in time O(logn) and needs O(n2logn) preprocessing time and O(n2) space while
the second one by ElGindy and Mitra9 answers queries in time O( p
n) and needs
O(np
n) preprocessing time and space.
If we restrict ourselves to simple rectilinear polygons, the situation gets consid-erably simpler since it can be shown that there is always a rectilinear path between two points that is shortest w.r.t. both the rectilinear link and the L1-metric.
10;11
We call such a path a smallest path.12;13 In this setting de Berg10 presents a data
structure that allows to answer the following types of queries. If we are given two arbitrary points inside a polygon, the rectilinear link distance and theL1-distance
between the two points can be reported in time O(logn). If we are given two ver-tices of the polygon, both distances can be reported in constant time. Furthermore, a smallest path, i.e., a path that is optimal w.r.t. both metrics can be constructed in an additional number of steps proportional to its link length. His data struc-ture needs O(nlogn) space and preprocessing. We summarize the results in the following table (kis used to denote the link length of the shortest path).
Table 1. Time needed for L
1-, rectilinear link distance, and smallest path queries.
Distance Path
(L1- orrl-distance) (shortest w.r.t.L1- andrl-distance)
vertices O(1) O(1 +k)
points O(logn) O(logn+k)
In this paper we present a data structure that achieves the same time complexi-ties as shown in Table 1 but improves both the space and preprocessing requirements to linear in the number of vertices of the polygon. This should also be contrasted with the Euclidean world where there exists a data structure to answer shortest
L2-path queries in a simple polygon inO(logn) time with linear time preprocessing
and space requirements14 but to achieve the same query time for the link distance
O(n3) preprocessing time and space are needed.15
The paper is organized as follows. After introducing some of the denitions and notations that are needed in the rest of the paper in Section 2, we invesitgate in Section 3 the structure of shortest paths in the L1- and the rectilinear link
number of links and how to compute a smallest path fromptoH. In Section 5 we show how to connect two given smallest paths inside a histogram. In Section 6 we put the various results together and present the complete query algorithm. Finally, Section 7 deals with an application of our data structure where we show that it can be applied to compute the diameter of a polygon w.r.t. the L1-metric.
2. Denitions
LetC be a simple, closed curve consisting ofnaxes-parallel line segments such
that no two consecutive segments are collinear. We dene a simple rectilinear poly-gon P to be the union of C and the set of points that are enclosed by C. A
(rectilinear) path P is a curve that consists of axes-parallel line segments insideP.
From now on, whenever we talk of polygons, we mean simple rectilinear polygons and whenever we talk of paths, we mean rectilinear paths inP.
Leteande0 be two axes-parallel line segments inP. We say a polygonal path P
from line segmente to line segmente0 is admissible if it is rectilinear and the rst
link ofPis orthogonal toeand the last link is orthogonal toe
0. The (rectilinear) link
length of P, denoted byrl-length(P), is dened as the number of linksP consists
of. Arl-shortest pathis an admissible pathP from any point ofeto any point ofe 0
such that there is no other admissible path frometoe0 with fewer links. We dene
rl(e;e0) to be the number of links of anrl-shortest path from etoe0. A pointpis
considered a degenerate line segment and, hence, if P starts (or ends) atpand P
is admissible, then all axes-parallel directions are allowed for the rst (or last) link of P.
If p and q are two points in P and P is a rectilinear path between them, we
dene theL1-lengthof
P as the sum of the Euclidean lengths of its links and denote
it by L1-length(
P). A path P from p to q is called aL
1-shortest path if there is
no other path fromptoqwith lesserL1-length. TheL1-distancebetweenpandq,
denoted byL1(p;q), is dened as the L1-length of aL1-shortest path fromptoq.
As mentioned before it can be shown that there always exists a pathP fromptoq
that isL1-shortest andrl-shortest. Following McDonalds and Peters
13we call such
a path a smallest path.
A very important concept in the context of rectilinear link distance is that of a d-interval. If e is an axis-parallel line segment in P and p is a point in P, we dene thed-interval ofponeto be the set of points onethatpcan reach with an admissible path of length dor less and denote it bye(p;d). It is easy to show that
e(p;d) is either empty or a connected subsegment ofe(see Figure 1a). Note that if
rl(p;e) =d, thene(p;d+1) may properly containe(p;d) as illustrated in the gure. A histogram is a monotone rectilinear polygon with one of the monotone chains forming a single line segment called the base of the histogram. A horizontal (vertical) histogram is a histogram with a horizontal (vertical) base. An upper histogram is a horizontal histogram with its interior above the base. Similarly, lower, left, and right histograms are dened. We sayH is a maximal histogram ofbifbis the base ofH and there is no other histogram inP with the same base that properly contains
(a) (b) window P H e b e(p;2)e(p;3) p
Figure 1: The denition of an interval and a maximal histogram. one on each side.
A window is a maximal segment on the boundary of a histogram that is com-pletely contained in the interior ofPwith the exception of its end points. A vertical window is called a west (east) window if the interior of the histogram is to the right (left) of it. Note that every window splits P into two parts.
Since we will be dealing with trees quite a bit, we give short denitions of the standard terminology in connection with trees. A rooted tree T is a connected, planar, acyclic graph with one designated node, called the root rof T. The depth of a nodev is the length of the path fromr tov in T. We denote it by depth(v). The node v0 immediately beforev on the unique path
P from r to v is called the
parent ofv andvis called a child ofv0. The nodes on
P are called the ancestors of
v andvis called a descendant of a node onP. Ifv
1andv2 are two nodes, then the
lowest common ancestor, denoted by lca(v1;v2), is the node of T with the highest
depth that is an ancestor of bothv1andv2.
3. Smallest Paths in a Simple Rectilinear Polygon
The main structure that allows us to answer smallest path queries eciently is given by the histogram tree which is dened below.
3.1. The Histogram Tree
Let P be a simple rectilinear polygon and e some edge of P. We dene the histogram partition H(P;e) ofPw.r.t.einductively as follows.
16IfP is a histogram
with basee, thenH(P;e) =fPg. Otherwise, letH be the maximal histogram ofein
P andw1;:::;wk the windows ofH. Each windowwisplitsP into two subpolygons
one of which does not containH. We denote this subpolygon byPwi. The histogram
partition is now given by H(P;e) = S
1ik H(Pw
i;wi)
[fHg. For illustration see
Figure 2a. If a triangulation of the polygon is given|see (Ref. 17) for a linear time algorithm to compute a triangulation|a histogram partition can be computed in linear time.16
Note that each window of a histogram in H(P;e) is the base of some other
(a) e P (b) P e
Figure 2: The tree associated to the histogram partition of P.
Hence, we will use bases and windows interchangeably. Since a window splits P
into two subpolygons and every basebis a window, we can speak of the subpolygon
Pb ofbwhich is meant to denote the subpolygon ofP that contains the histogram
of H(P;e) with baseb. We also say thatbcuts o Pb in this case.
If we are given a pointpin P, we dene the histogram ofpto be the histogram of H(P;e) that contains pand denote it by Hp. If p is on the boundary between
two histograms, thenHpis dened as the one histogram of the two that is closer to
e. The base ofHp is denoted bybp.
There is a natural tree structure associated to the histogram partition. We call it the histogram tree of P and e and denote it by T(P;e) (see Figure 2b). It is
dened as follows. The nodes ofT(P;e) are the histograms ofH(P;e). There is an
edge between histogramH1andH2 in
T(P;e) if the base ofH
1is a window ofH2.
The root ofT(P;e) is the histogram with basee. If we use the terminology of trees
in connection with histograms, it is implied that we refer to the tree structure of
T(P;e). From now on we will assume that any histogram we refer to is an element
of H(P;e) if not explicitly stated otherwise.
The rst observation we make is that a subtree of H(P;e) that is rooted at
histogramHwith basebcontains exactly those histograms that form the subpolygon
Pb of b. Hence, if we are given two query points p1 and p2 in the histogramsH1
and H2, respectively, we conclude that a smallest path fromp1 to p2 has to pass
through the lowest common ancestorHlcaofH1andH2. This leads to a three step
procedure to answer a smallest path query. (i) FindH1andH2.
(ii) Compute the parts of the smallest path fromp1top2that start atp1andp2,
respectively, and end atHlca.
(iii) Connect the two parts in Hlca.
In the following we treat only the case that H1 and H2 are two histograms of H(P;e) such that neither H
histograms turns out to be an ancestor of the other, the results presented here can easily be adapted.
In the remainder of this section we denote the lowest common ancestor ofH1
and H2 by Hlca and the window of Hlca that cuts o the subpolygon containing
histogramH1 (H2) byw1(w2). For the ease of discussion we assume from now on
that Hlca is an upper histogram unless explicitly stated otherwise.
3.2. Shortest Paths in the L1-Metric
In order to construct a smallest path that goes throughHlcawe need to nd a
way to show that it indeed minimizes the distance. Since smallest paths are shortest w.r.t. both the L1- and the rectilinear link metric, two separate investigations have
to be carried out. We start with the following observation aboutL1-shortest paths.
Lemma 1
If pis a point in P and c a line segment that splits P into two parts, then there is one pointqoncsuch thatL1(p;q) =L1(p;c) andL1(p;p0) =L
1(p;q)+
L1(q;p
0), for all pointsp0 onc.
Proof:
Ifrl(p;c) = 1, then the claim is obvious. So assume thatrl(p;c)>1 and letp0 be some point on c. The line segmentcdivides P into two partsP1 andP2.
LetP1 be the subpolygon that containspandH the maximal histogram ofc that
is contained in P1. Furthermore, let
P be a L
1-shortest path frompto p
0. There
is one window wof H that is intersected byP. Note thatw is independent ofp 0.
Letpwbe the intersection point ofP andwand letqbe the orthogonal projection
of pw ontoc. Hence, we obtain
L1(p;p 0) = L 1(p;pw) +L1(pw;p 0) =L 1(p;pw) +L1(pw;q) +L1(q;p 0) L 1(p;q) +L1(q;p 0):
This immediately implies that L1(p;c) =L1(p;q) and that q is unique since q is
independent of the position ofpw onw. 2
In the following we denote the unique pointq on c withL1(p;q) =L1(p;c) as
the L1-projection ofp ontoc. With the help of the denition of the L1-projection
ofpontocwe can now characterize how aL1-shortest path between the two points
p1 andp2 can be constructed.
Lemma 2
If qi is dened as the L1-projection of pi onto wi, for i = 1;2, thenL1(p1;p2) =L1(p1;q1) +L1(q1;q2) +L1(q2;p2).
Proof:
Let P be aL1-shortest path between p1 and p2. Let r1 (r2) be the rst
intersection point of P withw 1 (w2). L1(p1;p2) = L1-length( P) =L 1(p1;r1) +L1(r1;r2) +L1(r2;p2) = L1(p1;q1) +L1(q1;r1) +L1(r1;r2) +L1(r2;q2) +L1(q2;p2) L 1(p1;q1) +L1(q1;q2) +L1(q2;p2)
which completes the proof. 2
The above lemma suggests to rst compute q1 and q2 and two L1-shortest paths
paths, we will not follow this idea directly. We rst have to consider shortest paths in the rectilinear link metric.
3.3. Shortest Paths in the Rectilinear Link Metric
We now consider the rectilinear link metric whered-intervalsplay a crucial role. Recall that the d-interval w(p;d) of a point pon a window w is the set of points on wsuch that there is an admissible path ofdlinks or less frompto w. Observe that the only interesting values for d are rl(p;w) and rl(p;w) + 1 since we have
w(p;d) =;ifd < rl(p;w) andw(p;d) =wifd > rl(p;w) + 1. We call the intervals
w(p;d) withd=rl(p;w) ord=rl(p;w) + 1 non-trivial. If we denoterl(pi;wi) by
i, then the above considerations lead to the following lemma.
Lemma 3
There is a rl-shortest pathP fromp1 top2 such that the rst link of P
that intersects w1 orthogonally is either the st
1 or the( 1+ 1)
st link of P.
We show that with the help of the non-trivial intervals of p1 onw1 and p2 on
w2 it is possible to compute the length of arl-shortest path fromp1top2. To this
end let Ii(d) be dened aswi(pi;d), fori = 1;2 and k(p1;p2) as the minimum of
rl(I1(d1);I2(d2)) + P
i=1;2di
?i where di ranges over the values in fi;i+ 1g.
The intuitive meaning behind this denition is that we have to consider the possibility that it might pay o to spend one more link on the path from p1 to
w1 or fromp2 to w2 than necessary if it is then easier to connect the two paths.
This can be seen if we expand the denition ofk(p1;p2). k(p1;p2) is dened as the
minimum of the four values (i) rl(I1(1);I2(2)),
(ii) rl(I1(1+ 1);I2(2)) + 1,
(iii) rl(I1(1);I2(2+ 1)) + 1, and
(iv) rl(I1(1+ 1);I2(2+ 1)) + 2.
Each link we spend more than necessary on the path fromp1 to w1 andp2 to
w2 is taken into account by adding it to the distance between the two intervals
that can be reached with the given number of links. As an example consider Fig-ure 3. Here 1 =2 = 2 and k(p1;p2) is the minimum of
f5;4;4;3gand, hence,
k(p1;p2) =rl(I1(3);I2(3)) + 2. As it is shown in the following lemma this implies
that rl(p1;p2) =1+2
?2 +k(p
1;p2) = 2 + 2
?2 + 3 = 5.
Lemma 4
If k(p1;p2) is dened as above, thenrl(p1;p2) =1+2
?2 +k(p 1;p2):
Proof:
To see that rl(p1;p2)1+2
?2 +k(p
1;p2) let
P be arl-shortest path
from p1 to p2. Let l1 be the rst horizontal link of
P that intersects w
1 as seen
from p1 andl2 the rst horizontal link that intersectsw2 as seen fromp2. Suppose
I2(2) I1(1+ 1) I1(1) I2(2+ 1) P Hlca p1 p 2
Figure 3: Illustrating that it may be useful to spend one more link on the paths from p1 andp2to w1 andw2.
Lemma 3 we can assume that i dii+ 1, fori= 1;2. Hence,
rl-length(P) = d 1+d2+rl(I1(d1);I2(d2)) ?2 = 1+2+ X i=1;2 di?i+rl(I 1(d1);I2(d2)) ?2 1+2 ?2 +k(p 1;p2) (1) since k(p1;p2) minimizes rl(I1(d1);I2(d2)) + P i=1;2di ?i, for i di i+ 1.
Note that we have to subtract two since we consider admissible paths and, therefore, the links that meet at w1 andw2 can be joined into one.
On the other hand, since there existd1andd2such that equality holds in (1) and P is arl-shortest path fromp
1top2we also haverl(p1;p2)
1+2
?2+k(p 1;p2)
which completes the proof. 2
In order to be able to compute k(p1;p2) we are left with the following
prob-lems.
(i) Find the intervalsI1(1),I1(1 + 1),I2(2), andI2(2 + 1).
(ii) Compute the distance rl(I1;I2) between each pair of intervals in Hlca, for
I1 2fI 1(1);I1(1+ 1) gandI 2 2fI 2(2);I2(2+ 1) g.
4. A Data Structure for Interval Queries
In this section we are concerned with a query problem of the following type. Given a point p and an ancestor H of Hp such that windoww of H cuts o the
subpolygon containing Hp report w(p;rl(p;w)) and w(p;rl(p;w) + 1). We will
reduce this problem to a tree problem.
The rst observation we need is that though there are a quadratic number of possible intervals on all windows of H(P;e), there are only a linear number of
(p) p bp(p,2) Hp H b b((p);2) p H b Hp H0 b0 (b) (a) "p bp
Figure 4: The denition of the parent(p) and the entry"p point ofp.
Lemma 5
Let pbe a point in P and H an ancestor of Hp with baseb. If d2,then the end points ofb(p;d) are orthogonal projections of two vertices of H ontob. Furthermore, ifrl(p;b)+1dandrl(p;b)2, then theL
1-projection ofponto
b is one of the end points of b(p;d).
Proof:
Assume for a contradiction and without loss of generality that H is an upper histogram and that the right end pointqofb(p;d) is not the vertical projection of a vertex of H. LetP be a path of rl-lengthdfrom pto b and let` be the lastlink of P. Because q is not the vertical projection of a vertex of H, ` does not
touch a vertical edge of P. Hence, ` can be moved slightly to the right to obtain an admissible path P
0 to a pointq0 on b to the right of q with rl-length( P
0) = d
contradicting the fact thatqis the right end point ofb(p;d).
Recall from the proof of Lemma 1 that the L1-projection of p onto b is the
projection of w ontob where w is the window of H that cuts o the subpolygon containingb. From this the second claim easily follows. 2
Since the total complexity of the histogram decomposition is linear as shown by Levcopoulos,16 there is only a linear number of possible interval end points in P.
We denote this set by I.
The second observation that allows for the ecient computation of intervals is that, for each interval, there is one end point that \dominates" all other points in the interval. This is stated more precisely in the next lemma.
Lemma 6
If H is an upper histogram with baseb andI a vertical interval on the boundary of H with lower end point pl, thenb(r;2)b(pl;2), for allr2I.Proof:
Letlbe the horizontal line segment inH thatplreaches with one link and P a two link path fromrto a pointpb onb. Sinceplis belowr, the vertical link of P intersectsland, hence, there is also a two-link path frompl topb. 2Lemma 6 in particular implies thatb(I;2) =S
r2Ib(r;2)
b(pl;2) and leads us
to the following denition which is illustrated in Figure 4a.
Denition 1
Letpbe a point inIandHthe parent ofHpwith baseb. By Lemma 6there is one end point pl of I =bp(p;2) with b(pl;2) =S
r2Ib(r;2). We call pl the
Note that(p) is only dened if the parent ofHp exists, that is, ifrl(p;e)>1.
The parent relation immediately induces a tree structure on the points inIand
we can now talk of the depth of point in I etc. Of course, we do not obtain one
tree but a forest of rooted trees. The roots of the trees are the points inI that are
on the windows of the root histogram ofT(P;e).
In order to compute this forest in linear time we proceed as follows. LetH be a horizontal histogram with windows w1;:::;wk and baseb. For each pointpof
I
onwi, 1ik, we compute the vertical edgeepofH which is horizontally visible
fromp. A vertical edgeev is said to be horizontally visible from a pointpif there is
a horizontal line segment that is contained in the interior ofH with the exception of its end points and that connectspto a point onev. By the triangulation algorithm
of Chazelle17this can be computed in time proportional to the size ofH andH \I.
Note that the x-coordinate of wi determines one end point of b(p;2) and the
x-coordinate of the corresponding edgeep the other end point. Note also that(p)
is the end point ofb(p;2) that is closer to the base of the parent ofH by Lemma 6. Hence, we can compute (p), for all points p2 I \H, in one scan of the upper
boundary ofH in timeO(jI\Hj+jHj) where j jdenotes the cardinality of a set.
So the total time used to perform this computation for all histogramsH2H(P;e)
is still linear.
As a by-product of the above algorithm we also obtain bp(p,2), for each point
p 2 I. Furthermore, if v is a vertex of P that is projected onto p, it is easily
seen thatbp(v;2) =bp(p;2) which we can also compute for each vertex. Hence, we
can introduce a notion for the vertices of P which is similar to the parent relation among the points of I by dening the \parent" of v to be the parent of p. This
idea is formalized and extended to arbitrary points in the following denition. For illustration refer to Figure 4b.
Denition 2
Letp be a point in P,H the parent of Hp with base b, and H0 theparent of H with baseb0. By Lemma 6 there is one end pointp
l ofI =b(p;2) with
b0(p
l;2) =S r2Ib
0(r;2). We callp
l the entry point ofpand denote it by"p.
There is one fundamental dierence between Denition 1 and Denition 2 which can best be seen if we consider a point p in I. The parent of pis a point on the
base of Hp while the entry point of pis a point on the base of the parent of Hp.
The reason for this dierence is that the parent relationship is designed to construct admissible paths frompto its ancestors while for the entry point it is not important whether the rst link is orthogonal to the windowpbelongs to or not.
The following lemma shows how the tree structure ofIcan be employed to nd
one non-trivial interval of point pinI on window wifrl(p;w) is known. In order
to do so we denek(p) =(k?1(p)), fork >0, and0(p) =p.
Lemma 7
Let p be a point in I and H an ancestor of Hp such that window wof H cuts o the subpolygon containing Hp. If = rl(p;w), then w(p;+ 1) =
w(?1(p);2).
Proof:
The proof is by induction on . It obviously holds if = 1. So assume that > 1. Let H0 be the child ofH that is also an ancestor of Hp and w0 the
window of H0 that cuts o the subpolygon containing H
w(p;+1)w(
?1(p);2). To this end letrbe some point inw(p;+1) and P an
admissible path of length+ 1 fromptor. The pathP intersectsw
0 in a pointp0.
By Lemma 6 we havew(p0;2) w(p
0
l;2) wherep0
lis the closest point ofw0(p;) tow.
On the other hand, we havew0(p;) =w0(?2(p);2) by the induction hypothesis.
Hence, by Denition 1p0
l is the parent of?2(p) andrbelongs tow(?1(p);2).
To see the reverse inclusion just note that there is an admissible path P 0 of
lengthfromptop0
l by the induction hypothesis and, hence, any point onwthat
is reachable from p0
l with an admissible path of length two can be reached from p
with+ 2?1 links. 2
If we consider arbitrary points inP, then we obtain the following result.
Lemma 8
Letpbe a point in P and H an ancestor of Hp such that window wofH cuts o the subpolygon containing Hp. If =rl(p;w) 3 and "p is the entry
point of p, thenw(p;) =w(?3(" p);2).
Proof:
Let"p be the entry point ofp. Sincerl("p;w) =?2, Lemma 7 impliesthatw("p;?1) =w( ?3("
p);2). Therefore, it suces to show thatw("p;?1) =
w(p;). To see this, rst note thatw("p;?1) w(p;) since there is a path of
two links frompto"p that is orthogonal to the windoww0 which"
pbelongs to and
the rst link of a path of?1 links from"p towis also orthogonal tow 0.
To see the reverse inclusion consider the baseb ofH"p. By the denition of "p
there is an admissible path of three links from pto any point of b(p;3) such that the middle link contains"p. This implies that any point that can be reached with
links frompcan be reached with ?1 links from"p which proves the claim. 2
In order to compute the+ 1-interval we just have to consider a dierent entry point (see Figure 4a).
Denition 3
Let p be a point in P and H the parent of Hp with base b. ByLemma 6 there is one end point pl of I =bp(p;2) withb(pl;2) =S
r2Ib(r;2). We
call plthe second entry point of pand denote it byp.
Note that ifpis in I, then the second entry pointp and the parent(p) of p
are identical. With the help of the second entry point of p there is an analogous result to Lemma 8 for the intervalw(p;+ 1).
Lemma 9
Letpbe a point in P and H an ancestor of Hp such that window wofH cuts o the subpolygon containing Hp. If =rl(p;w)2 and p is the second
entry point of p, thenw(p;+ 1) =w(?2( p);2).
Proof:
Similar to the proof of Lemma 8. 2Note that Lemma 9 is also a direct generalization of Lemma 7 since for a pointp
in I we havew(p;+ 1) =w( ?2(
p);2) =w(?2((p));2) by the remark before
the lemma.
Above we always assumed that rl(p;w) is already known. Hence, we also have to address the question how to compute rl(p;w) eciently which is dealt with in the following lemma.
Lemma 10
If p is a point in P and H an ancestor of Hp such that window wof H cuts o the subpolygon containing Hp, then the link distance from pto w is
Proof:
We prove the claim by induction on rl(p;w). First note that by the denition of Hp, rl(p;w) 1 ifH 6=Hp. Therefore, if w is the base ofHp, thenwe can reach a point on w with one link. Hence, the claim holds if depth(Hp)?
depth(H) = 1. Now let H0 be the histogram with base w and w0 the window of
H0 that cuts o the subpolygon containingH
p. Let=rl(p;w). Clearly, we have
rl(p;w0) =
?1 since any path from p to w intersects w
0 and w can be reached
with one link from w0; hence, depth(H0)
?depth(Hp) = ?1 by the induction
hypothesis. Since the base ofH0 is a window ofH,H0 is a child ofH, and we have
depth(H)?depth(Hp) =. 2
We now put together the various considerations of this section. So letpbe point in P andwthe window of the ancestor H ofHp that cuts o the subpolygon that
containsHp. We assume that therl-distancefrom pto wis at least three links.
The following algorithm outputs the-interval and (+ 1)-interval ofponw.
Algorithm Interval Query
Input
: A query pointpand the windowwof a histogramH which cuts o the subpolygon containingp.Output
: the two non-trivial intervals ofponw. 1. letHpbe the histogram containingp.2. let:= depth(Hp)?depth(H);
(computew(p;));
3. compute the ancestorof the entry point"p ofpat depth
depth("p)?(?3);
4. output w(;2) which isw(p;); (computew(p;+ 1));
5. compute the ancestor of the second entry pointp ofpat depth
depth(p)?(?2);
6. output w(;2) which is w(p;+ 1).
Since the algorithm works only for 3, the case= 2 remains to be considered.
If= 2, then the 2-interval ofponweither is already precomputed for vertices or can be found by point location for points. The 3-interval ofponwcan be computed as in the second part of Algorithm Interval Query.
In order to analyse the time needed to execute the above algorithm note that ifp
is an arbitrary point inP, then the histogramHpofp, the parent(p) ofp,bp(p,2),
and the entry and second entry point of pcan be easily computed in logarithmic time with the help of the point location data structure of Edelsbrunner et al. 18;
if p is vertex of P or belongs to I, then we can assume that Hp, (p), bp(p,2),
and the entry and second entry point of pare precomputed as mentioned before. This yields the time bounds for Steps 1, 4, 6, and the entry point computation in Steps 3 and 5. For Step 2 note that the distance from ptowcan be computed in constant time since we can assume the depth of a histogram is precomputed. Steps 3 and 5 can also be carried out in constant time by a result of Berkman and Vishkin on computing level ancestors in trees21 if
I is preprocessed appropriately in linear
4.1. Computing a Smallest Path to a Histogram
In the previous subsection we showed how to compute a data structure that allows ecient computation of the non-trivial intervals of a pointpon a windoww. In this subsection we show how to compute a smallest path fromptow. As before let=rl(p;w). It is easy to see that an admissiblerl-shortest path frompto any pointpwonw(p;) can be obtained by connectingpto the entry point"p ofp, the
ith parent of"
p to thei+ 1st parent of"
p with an admissible path of two links, for
0 i ?3 and, nally, by connecting ?3("
p) topw with two links. Let the
path constructed in this way be called P. We claim that P is also aL
1-shortest
path.
Lemma 11
If P is dened as above, thenL1-length( P) =L
1(p;pw).
Proof:
We prove the claim by induction. Observe that the path from pto the entry point "p of p is a L1-shortest path. Now let be rl(p;w). We prove theinduction basis = 3 and the induction step for > 3 simultaneously. Consider
?3("
p) and letw0 be the window it belongs to. Let qbe the L
1-projection ofp
ontowandq0 be theL
1-projection ofpontow
0. Since?3("
p) is the closest point
of w0(p;
?1) to wby denition andq
0 is one of the end points ofw0(p;
?1) by Lemma 5,L1(q 0;q) =L 1(q 0;?3(" p)) +L1( ?3(" p);q); furthermore,L1(p;pw) = L1(p;q 0) +L 1(q 0;q)+L
1(q;pw) by Lemma 2 which proves the claim if we apply the
above observation to"presp. the induction hypothesis to?3("
p). 2
A similar statement holds ifpw belongs tow(p;+ 1).
In order to compute the L1-distance from p
2I to some point pw we proceed
as follows. If r is the root of the tree containing p, we dene the L1-depth of a
point p2I to be the length of aL
1-shortest path
P fromptor and denote it by
L1-depth(p). As we have proved in Lemma 11,L1-length(
P) is equal to the sum of
the L1-distances between the nodes on the path in the tree betweenpand rand,
hence, can be precomputed for all nodes in one traversal of the tree. So in order to compute the L1-distance between pand a point pw on window w we have the
following algorithm.
Algorithm
L1-Distance to Histogram
Input
: A query pointpand a pointpw on the windowwof a histogramHthat cuts o the subpolygon containingp.
Output
: L1(p;pw)1. let"p be the entry point ofp;
2. compute=rl(p;w);
3. nd the ancestorof"p at depth (depth("p)?(?3));
4. computeL1("p;) =L1-depth("p) ?L
1-depth();
5. computeL1(;pw);
6. setL1(p;pw) =L1(p;"p) +L1("p;) +L1(;pw).
Figure 5: The tree associated to a histogram.
5. Connecting the Paths
As a last step we have to show how to compute theL1- andrl-distance between
two given intervals in an upper histogramH and how to connect the two intervals we choose by a subpath of a smallest path. In order to do so we subdivide H by extending the horizontal edges to the left or right until they meet another edge of
H. Thus, H is divided into a number of rectangles or cells. We denote this cell decomposition of H bySH. There is a natural tree structureTH associated toSH.
The nodes ofTH are the cells ofSH. There is an edge between two nodes if the two
cells are adjacent in the subdivision. The root of the tree is the cell adjacent to the base of H (see Figure 5).
For a pointpinH, we denote the cell ofSH (= node ofTH)pbelongs to byCp.
IfR is a rectangle, we denote its projection onto the basebofH byb(R). Clearly,
SH andTH can be computed in time proportional to the size ofH.
With the help of the above dened subdivision we can now give a characteriza-tion of therl-distance between two intervals.
Lemma 12
IfH is an upper histogram andI1andI2are two vertical line segmentson the boundary of H whose lower end points belong to the rectangles R1 and R2,
then rl(I1;I2) = 8 > < > :
1 if the two y-intervals of I1 and I2 overlap and R1 intersects
I2 or vice versa;
5 iflca(R1;R2) is dierent from R1 andR2;
3 otherwise.
Proof:
We rst note that an admissible path between two intervals that are both vertical always consists of an odd number of links since the rst and last link have to be horizontal.Let the lower end ofI1 (I2) be l1 (l2) and h1 (h2) the maximal horizontal line
segment incident tol1(l2).
To see the rst claim note that rl(I1;I2) = 1 if there is a horizontal line that
connects I1 and I2 in H. This implies that either h1 intersects I2 or vice versa
which in turn implies the conditions of the claim. If the conditions are met and, say,R1intersects I2, then eitherh1 orh2connectI1 toI2.
To see the second claim we rst observe that rectangle R is an ancestor of rectangleR0inT
;, for any two rectanglesR and R
0, then eitherb(R) containsb(R0) or vice versa.
Hence,lca(R1;R2) diers fromR1 andR2if and only ifb(R1) \b(R
2) =
;. Now if
there is a path of three or less links connecting I1 andI2, thenb(R1) \b(R
2)
6
=;
since the projection of the vertical link of the path onto the base is an intersection point. On the other hand, if there is an intersection point ofb(R1) andb(R2), we
can connecth1andh2with one vertical segment which yields a path of length three.
We nally note that we can connect any two points in a histogram with three links and we need at most two more to make the path admissible. Hence, any admissible path between two intervals inH has length at most ve which completes
the proof. 2
Now assume we are given two query pointsp1andp2inP such that the smallest
pathP fromp
1 top2 passes throughH. Let the windows that cut o the
subpoly-gons that containp1and p2, respectively, be denoted byw1 andw2. Furthermore,
let I1 be the smallest non-trivial interval ofp1 onw1 such that
P passes through
I1 and I2 the smallest non-trivial interval of p2 onw2 such that
P passes through
I2. We now describe an algorithm to connect the two intervals with a smallest path
which is part of a smallest path from p1 to p2. Let I1 = [l1;u1] and I2 = [l2;u2]
where u1 (u2) is the upper and l1 (l2) the lower end point ofI1 (I2). W.l.o.g. we
assume that l1 is belowl2.
Algorithm Connecting the Intervals
Input
: Two pointsp1 andp2 and their intervalsI1 andI2 on theboundary ofH;
Output
: The part of the smallest path from p1 top2that is contained in H.letqi be theL1-projection ofpi ontowi, fori= 1;2;
lethi be the maximal horizontal line segment inH incident toqi, for i= 1;2;
letR =lca(Cu1;Cu2) andhR the upper edge ofR;
lethu1 be the maximal horizontal line segment inH incident to u 1;
lethbe the lower of the two line segmentshR andhu1;
if
rl(I1;I2) = 1then if
h1intersects I2or
h2 intersectsI1then
connectI1 toI2 withh1orh2;else
connectI1 toI2 withh;if
rl(I1;I2) = 3then if
Cu1 =Cu2then
connectq1 toq2with a three link path in Cu 1;else
connectq2 tohwith one vertical link;if
rl(I1;I2) = 5then
connectq1 tohwith one vertical link;connectq2 tohwith one vertical link;
Figure 6 illustrates the dierent cases that can occur. Note that a path from a point p on I1 to a point q on I2 induces a path in TH from Cp to Cq and,
pint rl(I1;I2) = 5 rl(I1;I2) = 3 I1 I1 I2 I1 I2 rl(I1;I2) = 1 h I2 l1 l2 v u1 u2 h h
Figure 6: Several cases can occur when connecting two intervals.
rl(I1;I2) = 3 and = 5 is not admissible and actually a path of length 2 and 3,
respectively. But it is easy to see that we can construct an admissible path of length 3 and 5 by moving the vertical links a small enough amount to the left and right, respectively, and by adding a horizontal link to each vertical link.
In the following letPI
1I2 be the path constructed by Algorithm Connecting the
Intervals. In order to show that Algorithm Connecting the Intervals is correct we rst note that there is a rl-shortest path that contains PI
1I2 by our choice of I 1
andI2. So we only have to show that there is also aL1-shortest path that contains PI
1I2.
Letr1 be the end point of PI
1I2 onI
1 andr2 the end point of PI 1I2 onI 2. Let P 0 I1I2 be the path PI
1I2 augmented with the two vertical line segments from ri to
the L1-projection of pi ontowi which we denote byqi. With this notation we can
show the following result.
Lemma 13
P 0I1I2 is aL
1-shortest path fromq1 toq2.
Proof:
Letl1be belowl2,R=lca(Cu1;Cu2), andhas in the algorithm.
Further-more, letpint be the intersection point ofhandI1 if it exists. We distinguish three
cases according to the algorithm.
Case 1
rl(I1;I2) = 1.If h1 connectsI1 toI2, then P
0
I1I2 is a two link path and, hence, the L
1-length of P
0 I1I2 isL
1(q1;q2) as claimed; a similar statement holds, if h2 connectsI2 toI1. If
neither of this is true, thenq2=u2 sincel1 is belowl2. Ifq1=l1, then P
0 I1I2 is a
monotone path from q1 toq2, henceL1-shortest. Otherwise,q1=u1and any path
fromu1tou2 passes throughh. Sincehdirectly connectsI1toI2, P 0 I1I2 has length L1(q1;q2).
Case 2
rl(I1;I2) = 3. If Cq1 =Cq2, then q1 is connected to q2 by a monotone three link path of length
L1(q1;q2). Otherwise,R intersectsI1sincel1is below l2. Ifq1=l1, then the path
from l1 topint to q2 is monotone and, therefore, has lengthL1(q1;q2). Ifq1 =u1,
then any path fromu1to a point inI2intersectshandL1-length( P 0 I1I2) =L 1(q1;q2) as in Case 1.
Case 3
rl(I1;I2) = 5.q1andq2. Letvbe one vertex ofe. Clearly,L1-length( P
0
I1I2) =L
1(q1;v)+L1(v;q2).
Since every path P fromq
1 toq2has to intersect the vertical line segment starting
in vdownwards,L1(q1;v) +L1(v;q2) is a lower bound on the length of a path from
q1 toq2 and, hence, P 0 I1I2 is anL 1-shortest path. 2
Lemma 13 immediately implies that there is a L1-shortest path that contains PI
1I2 sinceL
1(p1;p2) =L1(p1;q1) +L1(q1;q2) +L1(q2;p2) by Lemma 2.
With the above result the task of nding the distance between two intervals essentially reduces to computing a number of interval intersection and containment queries and lowest common ancestor queries. A query can be carried out in constant time if the rectangle of the subdivision ofHthe lower end point of an interval belongs to is precomputed; otherwise it takes O(logn) time to locate the rectangles of the interval end points.
6. Smallest Path Queries in
PWe are now able to put the results together and obtain the following algorithm to compute a smallest path between two pointsp1 andp2in P.
Algorithm Smallest Path Query
Input
: Two pointsp1 andp2 inP;Output
: A smallest pathP fromp1 top2;
1. computeHp1 andHp2;
2. letHlca=lca(Hp1;Hp2);
3. leti= depth(Hpi)
?depth(Hlca);
4. computeIi(i) andIi(i+ 1), fori= 1;2;
5. computerl(I1(d1);I2(d2)), ford1 2f 1;1+ 1 gandd 2 2f 2;2+ 1 g; 6. computek(p1;p2);
7. letI1 andI2 be the two intervals associated tok(p1;p2);
8. compute the pathPI
1I2and letr
1 be the end point of PI
1I2 onI 1
andr2the end point of PI
1I2 onI 2;
9. compute a smallest pathPi frompito ri, fori= 1;2;
10. let P be the concatenation ofP 1 with
PI 1I2 and
P 2;
The correctness of the algorithm can now be easily shown.
Lemma 14
The pathP constructed by AlgorithmSmallest Path Query is a smallestpath from p1 top2.
Proof:
Clearly, P is a rl-shortest path by Lemma 4 since it hasrl-length 1+2+k(p1;p2)
?2. We now turn to proving thatP is also aL
1-shortest path. Letqi
again be dened as the L1-projection ofpi ontowi. Observe thatL1-length( Pi) =
L1(pi;qi) +L1(qi;ri) andL1-length( PI
1I2) +L
1(q1;r1) +L1(q2;r2) =L1(q1;q2) by
Lemma 13; hence, we immediately obtain thatL1(p1;p2) =L1(p1;r1)+L1(r1;r2)+
If we are only interested in the distance between the two points, then we can also use the above algorithm if we replace the last two steps as follows.
Algorithm Distance Query
90: computeL 1-length( Pi), fori= 1;2 andL 1-length( PI 1I2); 100a:letrl(p 1;p2) =d1+d2+k(p1;p2) ?2; 100b:letL 1(p1;p2) =L1-length( P 1) +L1-length( PI 1I2) +L 1-length( P 2).
The analysis of the Algorithm Smallest Path Query can be summarized as fol-lows. Steps 2, 3, 5, 6, 7, 8, and 10 take constant time. In Steps 1 and 4 point location has to be done if we are given two arbitrary points. In order to do so we can preprocessP in linear time such that point location queries can be answered in timeO(logn).18Clearly, Step 9 can be carried out in time proportional to the link
lengthkof the path and, thus, a smallest path query between two arbitrary points takes O(logn+k) time.
If, on the other hand, we take two vertices, point location can be avoided in Steps 1 and 4 by a linear time preprocessing phase as we pointed out before which implies that the query time isO(1 +k).
Finally, since Step 90 can be carried out in constant time by the Algorithms
L1-Distance to Histogram and Connecting the Intervals and Steps 10
0a and 100b
clearly need only constant time, Algorithm Distance Query can be executed in time
O(logn) for arbitrary points andO(1) for vertices. We have shown the following theorem.
Theorem 1
LetP be a simple rectilinear polygon with n edges. It is possible to preprocess P in linear time such that, for any two pointsp1 andp2 in P,(i) a smallest pathP betweenp
1 andp2 can be reported in timeO(logn+k) ifk
is therl-length ofP and therl-distance as well as theL
1-distance betweenp1
andp2 can be reported in time O(logn).
(ii) ifp1 andp2 are two vertices of P, then a smallest path
P betweenp
1 andp2
can be reported in timeO(1 +k) ifk is therl-length of P and the rl-distance
as well as theL1-distance betweenp1 andp2can be reported in constant time.
7. Applications
Though the data structure presented above has many potential applications, it is in particular interesting to look at the problem of computing the diameter of a simple rectilinear polygon. The diameter of a polygonP w.r.t. metricdis dened as the maximum valued(p1;p2) of two pointsp1andp2inP. The diameter problem
w.r.t. the rl-metric has been investigated before and a linear time algorithm was given.22 There is also a linear time algorithm to compute the diameter w.r.t. the
L1-metric. 23
In the following we are concerned with the problem of computing the diameter of P w.r.t. the L1-metric. Furthermore, we show how to compute a L1-furthest
that has the maximal L1-distance in P to p. In (Ref. 23) it is shown that a L1
-furthest neigbour of a point pis a convex vertex. This implies in particular that the diameter of P is spanned by two convex vertices.
ComputingL1-furthest neighbours is equivalent to computing the maximum of
each row of the nn matrixD = (dij) with dij =L
1(vi;vj) if v1;:::;vn are the
vertices of P ordered counterclockwise around the boundary of P. We have the following lemma.
Lemma 15
dij+dkl dik+djl, for all 1i < j < k < ln.Proof:
Let 1i < j < k < lnand consider the verticesvi,vj,vk, andvl. Let Pik be aL1-shortest path fromvi tovk.
Pik divides P into two parts one of which
containsvj and the other of which containsvl. Hence, aL1-shortest path
Pjl from
vj to vl intersects Pik in a pointpint. Let dm = L
1(vm;pint), for m
2fi;j;k;lg.
Then,dij di+djanddkl dk+dlby the triangle inequality ofL
1. Furthermore,
sincepintis on theL1-shortest path fromvi tovk, we obtaindik =di+dk and, by a
similar argument,djl=dj+dl which taken together with the previous inequalities
yields the claim. 2
Since dij+dkl dik+djl, for all 1i < j < k < ln, D can be transformed
into a n(2n?1) matrix D 0 = (d0 ij) with d0 i;i+j = dij, for 1 i;j n and d0
ij =?1, otherwise, which is totally monotone, i.e., if,dij< dij
0, thendi0j< di0j0,
for i < i0 andj < j0.24 By the well-known matrix-searching technique introduced
by Aggarwal et al. ,24it is possible to compute the row-wise maxima ofD0 in time
O(ne(n)) if it takese(n) time to evaluate one entry of the matrix. Sincee(n) =O(1) with the above data structure, the matrix-searching technique yields a linear time algorithm to compute aL1-furthest neighbours for all vertices ofP. We summarize
our considerations in the following theorem.
Theorem 2
IfP is a simple rectilinear polygon, then the L1-diameter of P and aL1-furthest neighbour for each vertex of P can be computed in time linear in the
number of vertices of P.
8. Conclusions
In this paper we presented a data structure for answering rectilinear link andL1
-distance queries between two points in a simple rectilinear polygon. The achieved query time as well as the preprocessing time and the space requirements are op-timal. The computed path is shortest w.r.t. both metrics. If we leave the setting of a simple polygon, the query problem becomes considerably harder. There is no known subquadratic algorithm to solve even the one shot problem for a metric that is a linear combination of the rectiliner link and the L1-metric among polygonal
obstacles.
As an application we were able to show that theL1-diameter of a polygon as
well as a L1-furthest neighbour of each vertex can be computed in linear time.
9. Acknowledgements
This work was supported by the Deutsche Forschungsgemeinschaft under Grant No. Ot 64/8-1. I would like to thank Bengt Nilsson for the many helpful discussions. I would also like to thank the two unknown referees who took great care in reading previous versions of this paper and whose valuable comments and suggestions have greatly improved the presentation of the results as well as lead to the correction of some erroneous statements.
References
1. P. Widmayer, \On Shortest Paths in VLSI design", Technical Report 19, Institut fur Informatik, Universitat Freiburg, Germany, 1990.
2. K.L. Clarkson, S. Kapoor, and P.M. Vaidya, \Rectilinear shortest paths through polygonal obstacles inO(nlog
2
n) time",Proc. 3rd Annual Symposium on Compu-tational Geometry, Waterloo, Ont., 1987, pp. 251{257.
3. P.J. de Rezende, D.T. Lee, and Y.F. Wu, \Rectilinear shortest paths with rectan-gular barriers",Journal of Discrete and Computational Geometry,4(1989) 41{53. 4. R.C. Larson and V.O. Li, \Finding minimum rectilinear distance paths in the
pres-ence of barriers",Networks,11(1981) 285{304.
5. G. Das and G. Narasimhan, \Geometric searching and link distance", inAlgorithms and Data Structures, Proc. 2nd Workshop on Algorithms and Data Structures, WADS'91, eds. F. Dehne, J.-R. Sack, F. Santoro, (Springer Verlag, Heidelberg, 1991) pp. 261{272.
6. C. D. Yang, D. T. Lee, and C. K. Wong, \On bends and lengths of rectilinear paths: a graph-theoretic approach", inAlgorithms and Data Structures, Proc. 2nd Workshop on Algorithms and Data Structures, WADS'91, eds. F. Dehne, J.-R. Sack, F. Santoro (Springer Verlag, Heidelberg, 1991) pp. 320{330.
7. M. de Berg, M. van Kreveld, B. Nilsson, and M. Overmars, \Finding shortest paths in the presence of orthogonal obstacles using a combined L1 and link metric", inSWAT'90, Proc. 2nd Scandinavian Workshop on Algorithm Theory, eds. J.R. Gilbert R. Karlsson (Springer Verlag, Heidelberg, 1990) pp. 213-224.
8. M. Atallah and D. Chen, \On parallel rectilinear obstacle-avoiding paths", Proc. 5th Canadian Conference on Computational Geometry, Waterloo, Ont., Aug. 1993, pp. 210{215.
9. H. ElGindy and P. Mitra, \Orthogonal shortest route queries among axes parallel rectangular obstacles", Technical Report No. SOCS 91.07 (July 1991), School of Computer Science, McGill University.
10. M. de Berg, \On rectilinear link distance", Computational Geometry: Theory and Applications,1(1991) 13{34.
11. J. Hershberger and J. Snoeyink, \Computing minimum length paths of a given homotopy class", inAlgorithms and Data Structures, Proc. 2nd Workshop on Al-gorithms and Data Structures, WADS'91, eds. F. Dehne, J.-R. Sack, F. Santoro, (Springer Verlag, Heidelberg, 1991), pp. 331{342.
12. A. Ferreira and J. Peters, \Finding smallest paths in rectilinear polygons on a hyper-cube multiprocessor",Proc. 3rd Canadian Conference on Computational Geometry, Vancouver, B.C., Aug. 1991, pp. 162{165.
IEEE Transactions on Computer Aided Design11, 1992, pp. 864{875.
14. L. Guibas and J. Hershberger, \Optimal shortest path queries in a simple polygon",
Journal of Computer Systems and Science,39(1989), pp. "50{63".
15. E. Arkin, J. Mitchell, and S. Suri, \Optimal link path queries in a simple polygon", InProc. 3rd Symposium on Discrete Algorithms, Jan. 1992, pp. 269-279.
16. Christos Levcopoulos, \Heuristics for Minimum Decompositions of Polygons", PhD thesis, University of Linkoping, Sweden, 1987.
17. Bernard Chazelle, \Triangulating a simple polygon in linear time",Discrete & Com-putational Geometry,61991, 485{524.
18. H. Edelsbrunner, L.J. Guibas, and J. Stol, \Optimal point location in a monotone subdivision",SIAM Journal of Computing,15(1986) 317{340.
19. D. Harel and R. E. Tarjan, \Fast algorithms for nding nearest common ancestors",
SIAM Journal on Computing,13(1984) 338{355.
20. B. Schieber and U. Vishkin, \On nding lowest common ancestors: simplication and parallelization",SIAM Journal of Computing,17(1988) 1253{1262.
21. O. Berkman and U. Vishkin, \Recursive*-tree parallel data-structure",Proc. 30th Annual Symposium on Foundations of Computer Science, Research Triangle Park, NC, Oct. 1989, pp. 196{202.
22. B.J. Nilsson and S. Schuierer. Computing the rectilinear link diameter of a poly-gon. In Computational Geometry{Methods, Algorithms, and Applications, Proc. Int. Workshop on Computational Geometry CG'91, eds. H. Bieri H. Noltemeier (Springer Verlag, Heidelberg, 1991) pp. 203{216.
23. S. Schuierer. An Optimal Algorithm to Compute the L
1-Diameter and Center of a Simple Rectilinear Polygon. Technical Report 49, Institut fur Informatik, Univer-sitat Freiburg, 1994.