Efficient Algorithms for Common Transversals - Semantic Scholar

Report 10 Downloads 114 Views
Purdue University

Purdue e-Pubs Computer Science Technical Reports

Department of Computer Science

1985

Efficient Algorithms for Common Transversals Mikhail J. Atallah Purdue University, [email protected]

Chanderjit Bajaj Report Number: 85-549

Atallah, Mikhail J. and Bajaj, Chanderjit, "Efficient Algorithms for Common Transversals" (1985). Computer Science Technical Reports. Paper 468. http://docs.lib.purdue.edu/cstech/468

This document has been made available through Purdue e-Pubs, a service of the Purdue University Libraries. Please contact [email protected] for additional information.

EFFICIENT ALGORmlMS FOR COMMON lRANSVERSALS

Mikhail J. AtaIlah Chanderjit Bajaj CSD-1R-549 August 1985

Efficient Algorithms For Common Transversals Mikho.il AlaJlah~ Chanderjil Bajaj+ Departmenc of Computer Science, Purdue University, West Lafayette, m 47907

ABSTRACT

Suppose we are gIven a set S of n (possibly intersecting) simple objects in the plane, such that for every pair of objects in S, the intersection of the boundaries of these two objects has at most a connected components. The integer a is independent of n, Le. a.=O (1). \Ve consider the problem of detennining whether there exists a straight line that goes through every object in S. We give an 0 (n logn)'(n)) time algorithm for this problem, where y(n) is a very slowly growing function of n. If a~---_-> >'-

Figure 1 Geometric Transformation

We illustrate our method by first giving an 0 (n logn) time algorimm for the case of a set S consisting of n arbitrary circles in the plane (in [2] only the case where all the radii are equal was considered). To determine whether they permit a common transversal or stabbing line we use the above geometric transformation as follows. Each circle Cj is defined by a radius rj and a center whose polar coordinates are (Pi ,8 i ). To obtain all possible stabbing lines for C i consider a general line defined by the pair (p,8). As shown in Figure

2,

this

line

stabs

Ci

iff

Pi Cas (8

- 8 1)

- rj

:5: p:5:

Pi Cas (8

- 8 i ) + rj'

-5-

Figure 2 Stabbing Line

Furthermore, the line defined by (p,S) is a stabbing line to all n circles or a common

transversal iff

P2Cos(8 - 82) - '2'; p,; P2Cos(8 - 82) -;- '2

which implies that (p,e) is a common transve['jal iff M=I,(8)'; p,; Min g;(8) ISiSn

l:s:i:S:n

where

1,(8) = p,Cos(8 - 8,) -

'i

g,(8) = Pi Cos (8 - 8,) + 'i

- 6-

Now, observe that every point (p,8) in the intersection of

Ii and Ij (i.e.

p=fiCe)=fjC e )) defines a line which is tangent to both Ci and Cj , and is such that Ci and Cj are on the same side of that common tangent. If Ci and Cj are distinct circles, then there are at most two such common tangents, and hencefi andfj intersect at most twice.

If C j and Cj coincide, then ji=fj and hence Ii and Ij intersect once. Hence by Lemma

1, the description of the pointwise Max of the Ii's (call it /) can be computed in

o (n logn) time.

Similar remarks holds for g i and gj J and the pointwise l'rfin of the g i 's

(call it g). Once! and.if are known, we have a complete description of all the stabbing

lines of L1.e Ci '5, viz., every point (p,S) in the region below the graph of i and above that of f defines a stabbing line of the C i 's (if that region is empty then there is no stabbing line).

The above method generalizes for planar objects such as ellipses, ovals,etc., whose boundaries consist of a single smooth closed curve. The method also generalizes for a larger variety of planar objects whose boundary consists of piecewise smooth curves, such as sectors of discs, k-gons etc. Tne only restriction is that the intersection of any connected components, wher~

pair of object boundaries must have no more than

Ct

(1=0(1).

time perfonnance (rather than

When (Q3, we obtain OCnlogn'iCn»

o (n logn )).

The rest of this section sketches this generalization when each object is a

convex k-gon, where k=O (1). For a set S of n convex k-gons consider again the i'h object of the set, OJ. We need to obtain the functions

Ii and

gj for every object 0i (as for the circles before).

These functions are still continuous, but they are no longer smooth everywhere; instead they are piecewise smooth, with angular points separating the smooth pieces. The descriptions of Ii and gi are computed as follows. We first compute, for every OJ, the set Pi of all antipodal pairs of vertices [13]. This takes 0 (1) time per object. Corresponding to each antipodal pair (P ,q )EP i there exists a range of angles [8 1,82] such that any line L =(p,8) for which 8 1$8:::;8 2 stabs 0i iff it stabs the straight-line segment pq. Therefore within each such range [8 1,82] the functions

Ii

and gj are smooth and easily

defined. Since 0i has 0 (k) antipodal pairs, each of Ii and gi consists of 0 (k) such

- 7-

smooth pieces.

As before, a straight line defined by (p,S) in parameter space is a stabbing line for the object 0, iff fiCe) ,; p ,; 8,(e). Further the line (p, e) intersects all n objects iff "il'i,i = 1, ..

,n,

we have

f i (8)

~ P $gj(8). Again, this implies that line (p,8) is a

transversal of the n objects iff Max fiCe) ,; p'; Min 8, (e)

lSiSn

ls:i:Sn

The piecewise smooth envelope M~ I j (8) is compmed using Lemma 1. However, l:S;JSn

in order to be able ~o use this lemma, we must first show th.at Ii and

Ij

intersect 0 (1)

times. Actually, r.hey intersect at most 2k times. To see this, note that mere are as many

Such inteosections as there are COITHilan tai1.gents berW'een OJ and OJ. and that mere are at most 2k such common tangents (where by common tangent we mean one. such that both objects are on the same side of it).

The other piecewise continuous envelope Min gl(e) is computed analogously. The l:;;iSn

region below the Min envelope and above the Max envelope describes all the transversals of S.

3. References [1]

M. J. Arnllah, "Some Dynamic Computational Geometry Problems,"

Computers and

Mathematics with Applications, Vol. 11, No. 12, 1985, 1171-1181. [2]

C. Bajaj and M. Li, "On Th~ Duality of Intersection and Closest Points," Proc. 21 st Annual Allerton Conference, 1983,459-461.

[3]

L. Danzer, B. Gruenbaum and V. Klee, "Helly's Theorem and its Relatives," Proceedings of

Symposia in Pure Mathematics Vfl, Convexity, 1961, 101-180. [4]

H. Davenport and A. Schinzel, "A Combinatorial Problem Connected with Differential Equations," Amer. 1. ofMa/h., 1965,684-694.

[5]

H. Edelsbrunner, "Finding Transversals for Sets of Simple Geometric Figures," Theoretical

Computer Science, vol. 35, 1985,55·69. [6]

H. Edelsbrunner, H. Maurer, F. Preparata, A. Rosenberg, E. Welzl, and D. Wood "Stabbing Line Segments," BIT, vol. 22,1982,274-281.

- B-

[7]

H. Edelsbrunner, M. Overrnars, and D. Wood, "Graphics in Flatland: A Case Srudy," Technical University of Graz, Institute Fur lnformarionsverarbeitung, Tech. Rept F79, 19BI.

[8]

B. Gruenbaum, "On Common Transversals," Archiv der Mathematik 9, 1958,465-469.

[9]

H. Hadwiger and H. Debrunner (Translated by V. Klee), "Combinatorial Geometry in the Plane," Holt, Rhinehan, Wlllffiron, 1964.

[10] S. Han, M. Sharif, "Nonlinearity ofDavenport~Schinzei Sequences and of Generalized Path Compression Schemes", The Eskenasy Insrirue of Computer Sciences, Tel Aviv University, Tech. Report 11/84, 1984.

[11] J. O'Rourke, "An On-Line Algorithm for Fitting Straight Lines Between Data Ranges,"

CACM,24, 19B1, 574-578, [12] M.H. Overmars and J. Van Leeuwen, "Maintenance of Configurations in the Plane", Journal of Compurer ar.d Sysrerr.s Sciences, Vol. 23, 1981, 166-104.

[13] M. 1. Shamos, "Computational Geomeay", Ph.D. Thesis, Yale University, 1978. [14] M. Sharir and R. Livne, "On Minima of Functions, Intersection Patterns of Curves, and Davenpon-Schinzel Sequences," Proc. 26th Annuall££E Symposium on Theory of Compuring, 1985,312-320,

[15] E. Szemeredi, "On a Problem of Davenpon and Schinzel," Acta Arithmetica, 1974,213224.