Shortest Paths in Two Intersecting Pencils of Lines

Shortest Paths in Two Intersecting Pencils of Lines

CCCG 2003, Halifax, Nova Scotia, August 11–13, 2003 Shortest Paths in Two Intersecting Pencils of Lines David Hart∗ Abstract q Suppose one has a line arrangement and one wants to find a shortest path from one point lying on a line of the arrangement to another such point. We look at a spe- cial case: the arrangement consists of two intersecting s t pencils (sets of lines where all intersect in a point), and the path endpoints are at opposite corners of the largest quadrilateral formed. The open problem was to find a shortest path in o(n2) time. We prove here that there are only two possible shortest paths, and the shortest p path can thus be computed in O(n) time. Figure 1: Illustration of the problem input, showing two 1 Introduction intersecting pencils of lines, the path endpoints s and t, and a possible path (but not the shortest) between In this paper, we look at finding shortest paths in an them. arrangement of lines, a problem that combines two ar- eas of research—arrangements of lines and shortest path problems. We have a line arrangement and two points s The work in getting this result is the mathematics and t lying on lines; we would like to find a shortest path that proves such a simple choice of paths always gives traveling on lines of the arrangement and going from s the correct shortest path. to t. The best algorithm for solving this, known for a 2 decade, has a worst case time of Θ(n ). It is an open 1.2 Background problem to find the shortest path in line arrangements in o(n2) time. The more general problem, of shortest paths in a line ar- In 1996, Jeff Erickson posed a problem [7] of finding rangement, has been an open problem for 10 years and the shortest path in a line arrangement with strong con- is listed in several sources: Marc van Kreveld listed it straints: the lines belong to two subsets, and all lines of eight years ago in a collection of open problems [11], Jeff each subset intersect in a single point (a set of such lines Erickson has listed it on a web page [7], and Joe Mitchell is a pencil ). The lines radiate out from the points and lists it in a survey paper [12]. We (with David Eppstein) intersect each other to form a grid of quadrilaterals. We have discussed the problem and made progress on sev- would like to find a shortest path from a near corner to eral special cases (listed below). the opposite corner of the largest quadrilateral formed The known way to solve this is to apply two algo- by the intersecting lines. See Figure 1. rithms as subroutines. First compute the arrangement, and then apply the linear time, planar graph, shortest 1.1 Results path algorithm of Klein, et al [9]. The computation of the arrangement produces a graph with as many as We show in this paper that, for the problem posed by Θ(n2) edges and vertices, so this approach takes worst Erickson, the shortest path always follows the outermost case times and space Θ(n2). The space requirement was lines bounding the largest quadrilateral, giving only two improved in 1998 to O(n) by Chen, et al [2], but the best choices of path, and thus making it easy to find the known time bound remains O(n2). shortest path in O(n) time. Also, the mathematics that Even for the problem posed by Erickson, no faster we develop has application in simplifying the problem algorithm was known. of shortest paths in general line arrangements (though The first result on exact shortest paths in a line ar- it does not give an asymptotic time improvement). rangement is due to C. Davis [3] in 1948. He proves that ∗Department of Computer Science, University of Aarhus, Den- a shortest path would not travel on certain segments of mark. Email: [email protected] the arrangement. 1 15th Canadian Conference on Computational Geometry, 2003 David Eppstein and the present author looked at spe- Erickson’s open problem is to find a shortest path, cial cases of arrangements. We first looked at an ar- from s to t in the intersecting pencils of lines, in time rangement that consists only of vertical and horizontal o(n2). segments [5] and showed that one can compute a short- We define boundary lines for any shortest path prob- est path in O(n1.5 log n) time and O(n1.5) space. M. lem to be lines bounding a convex region which entirely van Kreveld [10] then improved this time to O(n log n). contains the shortest path. By our problem definition, We next looked at line arrangements where we specify the lines are p0, pn, q0,andqn are boundary lines. that the number of different line orientations is only k We summarize some facts that are intuitively obvious. (that is, many of the lines are parallel). Our algorithm We have the path endpoints lying on the corners of a finds the shortest path in O(n log k + k2) time. large quadrilateral bounded by the boundary lines, and In the latter paper, we also discovered a theorem that the path does not travel outside the quadrilateral. The applies to general line arrangements and makes it pos- simple cells in the large quadrilateral are all themselves sible to considerably simplify the structure of the ar- quadrilaterals. rangement. Using this simplification of the structure of the arrangement as a starting point, the present au- 3 Theorem and Proof thor described an algorithm [8] for approximating the shortest path with an error bound in time O(n log n + We here state the solution to the problem. 1 1 1 1 (min{n, 2 log }) log ). This improved on a fixed fac- tor of 2 approximation algorithm by Bose, et al [1]. Theorem 1 The shortest path of Erickson’s problem travels only on the boundary lines and can be computed in O(n) time. 2 Intersecting Pencils To prove this, we next look at a trigonometric expres- We begin formal treatment of this problem with some sion for a useful number we define below. definitions. 3.1 Definition of D Definition 1 Define a pencil to be a set of two or more lines that intersect in a single point. Suppose we have a single quadrilateral, with path end- points s and t at opposite corners. We label the four Let one pencil be the set of lines P intersecting in sides as in Figure 2. Then a and b are one path and c and − − point p and the second be the set of lines Q intersecting d are a second path from s to t. Define D = a+b c d. in point q. Define an open half plane bounded by the Clearly, if D is positive, then the upper sides are the line through p and q. We require (as part of the def- shorter path from s to t along quadrilateral edges, and inition) that every line of P intersects every line of Q if negative then the lower sides are the shorter path. within this half plane (that is, the rays, starting at p and Much of the usefulness of D comes from the follow- contained in the half plane, intersect all rays starting at ing property. Suppose we divide a quadrilateral into q.) This gives a grid of quadrilaterals (see Figure 1). two adjacent quadrilaterals by adding a segment across (We note that our solution applies to any intersection it. Let A and B be the two smaller quadrilaterals and of two pencils, not just the quadrilateral grid we discuss AB be the enclosing quadrilateral, where we define path here.) endpoints for each quadrilateral to be at the opposite corners of that particular quadrilateral, similar to the left in Figure 2. We define DA, DB,andDAB for each 2.1 Preliminaries of these quadrilaterals as described above. Then we have this lemma: We will use the notation pi and qj for lines through points p and q; that is, the subscripts imply we are re- Lemma 1 DAB = DA + DB ferring to lines. The line through p that makes smallest angle w.r.t. segment pq we call p0 and the line with Proof. The sum DA + DB adds all the segments (with greatest angle we call pn. We similarly define q0 and correct sign) we need to obtain DAB, and the segment qn . The remaining lines of each of P and Q are in- crossing the middle of the enclosing quadrilateral AB dexed according to the size of angle, from smallest to has opposite signs in the two addends and cancels out. largest. 2 We next find a trigonometric expression for D in Definition 2 Let the intersection of p0 and q0 be point terms of angles between lines. See Figure 2 (right). We s—the starting point for the path, and let the intersec- first give some simple equations for various distances. tion of pn and qn be point t—the ending point of the Solving these to eliminate some variables and simplify- path. ing gives the expression for D. 2 CCCG 2003, Halifax, Nova Scotia, August 11–13, 2003 q q q q k l 2 θ2 α−θ q 2 q j B ρ 0 − t 2 c d c d α s t s A s t s + b b a a ρ1 α−θ pp θ 1 0l 1 l1 D=a+b−c−d D = D + D p p AB AB p Figure 2: Definition of D (Left).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 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