Parallel Algorithms for Arrangements

Parallel Algorithms for Arrangements

Parallel Algorithms for Arrangements Richard Anderson* Paul Beame* Erik Brisson’ Department of Computer Science and Engineering, FR-35 University of Washington Seattle, Washington 98195 Abstract can be generalized to Rd. In lR2 this algorithm has worst case running time O(n2), which is obtained We give the first efficient parallel algorithms for by inserting the lines o’ne after another into the ar- solving the arrangement problem. We give a de- rangement produced so far. In lRd the algorithm terministic algorithm for the CREW PRAM which runs in O(nd) time. Since the problem generally re- runs in nearly optimal bounds of O(log n log* n) quires that Q(nd) values be produced, the output time and n2/ log n processors. We generalize this requirements alone show that this is optimal. to obtain an O(logn log* n) time algorithm using Computing arrangements is an important build- nd/logn processors for solving the problem in d ing block in several computational geometry al- dimensions. We also give a randomized algorithm gorithms. In two dimensions, arrangements are for the EREW PRAM that constructs an arrange- used during a pre-processing step in algorithms ment of n lines on-line, in which each insertion is for computing visibility graphs. They are also done in optimal O(logn) time using n/ log n pro- used by algorithms for finding shortest paths that cessors. Our algorithms develop new parallel data avoid polygonal obstacles. Furthermore, the worst- structures and new methods for traversing an ar- case optimal hidden surface removal algorithm of rangement . McKenna [12] first projects the 3-dimensional prob- lem (involving planes) onto a two-dimensional im- 1 Introduction age plane, then computes the 2-dimensional ar- rangement produced in the image plane, and finally The problem of determining the geometric struc- simplifies it to produce the viewed image. ture of the intersections of curves and surfaces has There is a substantial body of work on the sub- a long history in mathematics ([3], [5],[14]). For the ject of parallel algorithms for computational geom- purposes of computational geometry, a very impor- etry (e.g. [I], [4], [ll], [13]). Included in this work tant special case is that of determining this struc- are parallel algorithms for some problems related ture when the curves and surfaces being intersected to finding arrangements, such as computing visi- are lines in IR2 or, more generally, hyperplanes in bility from a point in 2 dimensions [4] and hidden IRd for d 1 2. In this context the problem is known surface removal in restricted 3-dimensional scenes as the arrangement problem. [13]. However, finding an optimal parallel algo- A simple and elegant sequential algorithm for rithm for computing arrangements has remained computing arrangements in lR2 was found by [7] an open problem ([2], [ll]). and [lo]; the latter also shows how the algorithm A fairly straightforward parallel algorithm for ‘This work was supported by the National Science computing arrangements can be constructed us- Foundation, under grants CCR-8657562 and CCR-8858799, ing n2/ logn processors, requiring @(log2 n) time. NSF/DARPA under grant CCR-8907960, and Digital Equip Goodrich in [ll], which was the starting point for ment Corporation. this research, gives an output-sensitive algorithm Permission to copy without fee all or part of this material is granted pro- for computing the intersections of line segments; vided that the copies are not made or distributed for direct commercial however when used to find arrangements of lines, advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the its running time is no better than that of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. straightforward algorithm. 0 1990 ACM 089791-370-1/90/0007/0298 $1 SO 298 We present two algorithms for the arrangement We will assume that the input set of hyper- problem. The first is a deterministic algorithm planes forms a simple arrangement, and in the 2- for the CREW PRAM which runs in near-optimal dimensional case contains no horizontal or vertical O(logn log* n) time using O(n2/ log n) processors lines. The latter assumption may be eliminated by for computing arrangements in R2. We also show making a small rotation of coordinates if the input how this generalizes to an O(log n log* n) time al- includes horizontal or vertical lines. gorithm using O(nd/ log n) processors in IRd. The second solves the on-line version of the arrangement For output we need to give a description of the problem, in which lines are only available as input arrangement. In the 2-dimensional case we will one after another. It is a randomized algorithm for produce, for each line in H, a sorted list of its inter- the EREW PRAM that constructs an arrangement sections with the other lines of A. The incidence of n lines on-line, so that each insertion is done graph may be produced within the same processor in optimal O(log n) time using n/ log n processors. and time bounds. In higher dimensions, the inci- Both of our algorithms develop new methods for dence graph will be produced as output. traversing an arrangement efficiently in parallel. Perhaps because of their perceived sequential na- ture, very little study has been made of parallel al- gorithms for on-line problems. However, efficient on-line parallel algorithms can be useful in a con- text where extremely fast response times are re- 2.2 The Sequential Algorithm quired in a dynamic environment. On-line prob- lems place unique demands on parallel algorithms because, unlike static problems, they can require ef- In lR2 the arrangement problem can be solved by ficient maintenance of data structures significantly brute force in O(n2 logn) time by computing all larger than the number of processors available. In the intersections along each line and then sorting our on-line algorithm for computing arrangements these n lists independently. The optimal sequential we encountered ,a problem requiring sophisticated algorithm for the arrangement problem in IR2 given data structures developed for sequential computa- in [7] and [lo] removes the logn factor, using an tion. on-line algorithm which inserts each line e into the existing arrangement of up to n lines in time O(n), 2 Background to achieve its running time. 2.1 Problem Statement For the purposes of illustration, view the line 1 to be inserted as being horizontal. The leftmost in- Given a set H of n hyperplanes in IRd, where d > 2, tersection of e with the arrangement is found and their arrangement A(H) is the subdivision of IRd e is inserted in the list of the line that it intersects. they create. That is, if A = {hl, . , h,}, and Then a left-to-right traversal of the arrangement is h; and hr are the open half-spaces defined by made along I! which discovers and adds each inter- h;, then the faces of A(H) are {n;f=,& : & = section point involving e. Given any intersection h;, h;, or hf}. A d escription of an arrangement point p on I!, let R be the region which fZ intersects must include an enumeration of the faces, along immediately to the right of p. The next intersection with their topological relationships, for instance an is found by traversing the portion of the boundary incidence graph. If the input hyperplanes are in of R lying above e by following the chain of edges general position, so that the intersection of any k incident to the boundary in clockwise order (this hyperplanes is a (d-k)-dimensional face, then A(H) ordering is extended to infinite faces in the obvious is simple. The number of k-faces in a general ar- way). Figure 1 gives an illustration of the traversal. rangement is O(nd), and the number of k-faces in a Although it is not immediately obvious, it can be simple arrangement is o(nd). In the 2:dimensiona.l shown that such a traversal never encounters .more case, the points, edges and regions of A(H) will be than 3n segments along the way and thus the time denoted by P(H), E(H) and R(H), respectively. for the insertion is O(n). 299 log n groups of n/ log n consecutive lines (taken in this slope ordering). Each line is then inserted into the group which contains it. Thus the setup step provides log n disjoint sub-arrangements, each of size n/ log n. Each phase takes as input a partition of Hi, into k disjoint sub-arrangements of size n/k (in this sec- tion, it will always be the case that k 5 logn). A phase runs in three steps. The first step divides the input into groups of k/ log k consecutive sub- arrangements (in the ordering of the lines they con- tain). It also computes two auxiliary data struc- tures, ‘splitters’ and ‘levels’ (which will be defined later) for each of the input sub-arrangements. Figure 1: Traversal during sequential line insertion Each line appears within exactly one sub- arrangement, and so appears in exactly one group, 3 Deterministic Algorithm for which we will call the line’s group. The second step Arrangements inserts every line into each of the sub-arrangements within the line’s group. Thus k/log k sorted lists are created for every line. 3.1 Overview In the third step the sorted lists for each line There are two key elements to the deterministic are merged into one sorted list.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    9 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us