Minimum weight pseudo-triangulations
Abstract
We consider the problem of computing a minimum weight pseudo-triangulation of a set S of n points in the plane. We first present an O(n log n)-time algorithm that produces a pseudo-triangulation of weight O(wt(M(S))· log n) which is shown to be asymptotically worst-case optimal, i.e., there exists a point set S for which every pseudotriangulation has weight Ω(log n·wt(M(S))), where wt(M(S)) is the weight of a minimum spanning tree of S. We also present a constant factor approximation algorithm running in cubic time. In the process we give an algorithm that produces a minimum weight pseudo-triangulation of a simple polygon.
Full text
Minimum weight pseudo-triangulations Joachim Gudmundsson a,1Christos Levcopoulos b aDepartment of Mathematics and Computing Science, TU Eindhoven, 5600 MB, Eindhoven, the Netherlands. bDepartment of Computer Science, Lund University, Box 118, 221 00 Lund, Sweden. Abstract We consider the problem of computing a minimum weight pseudo-triangulation of a set Sof npoints in the plane. We first present an O(nlog n)-time algorithm that produces a pseudo-triangulation of weight O(wt(M(S)) ·log n) which is shown to be asymptotically worst-case optimal, i.e., there exists a point set Sfor which every pseudotriangulation has weight Ω(log n·wt(M(S))), where wt(M(S)) is the weight of a minimum spanning tree of S. We also present a constant factor approximation algorithm running in cubic time. In the process we give an algorithm that produces a minimum weight pseudo-triangulation of a simple polygon. Pseudo-triangulations are planar partitions that recently received considerable attention mainly due to their applications in visibility [7], rayshooting [3], kinetic collision detection [4], rigidity [10], and guarding [9]. A pseudo-triangle is a planar polygon that has exactly three convex vertices, called corners, with internal angle less than π. A pseudo-triangulation of a set Sof npoints in the plane is a partition of the convex hull of Sinto pseudo-triangles whose vertex set is exactly S. A related problem is the problem of triangulating a point set. Minimizing the total length has been one of the main optimality criteria for triangulations and other kinds of partition. The complexity of computing a minimum weight triangulation is one of the most longstanding open problems in computational geometry and it is included in Garey and Johnson’s [1] list of problems from 1979 that neither are known to be NP-complete, nor known to be solvable in polynomial time. As a result approximation algorithms for the MWT-problem have been considered. In this paper we consider the problem of computing a pseudo-triangulation of minimum weight (MWPT) which was posed as an open problem by Email addresses: [email protected] (Joachim Gudmundsson), [email protected] (Christos Levcopoulos). 1Supported by the Netherlands Organisation for Scientific Research (NWO). Rote et al. in [8]. An interesting observation that makes the pseudo-triangulation favorable compared to a standard triangulation is the fact that there exists point sets where any triangulation, and also any convex partition (without Steiner points), has weight Ω(n·wt(M(S))), while there always exists a pseudo-triangulation of weight O(log n·wt(M(S))), where wt(M(S)) is the weight of a minimum spanning tree of the point set. We also present an approximation algorithm that produces a pseudo-triangulation whose weight is within a factor 27 times the weight of the MWPT. In comparison, the best constant approximation factor for the MWT-problem, Levcopoulos and Krznaric [6], which is proved to be achievable by a polynomial-time algorithm [6] is so much larger that it has not been explicitly calculated. An edge/segment with endpoints in two points uand vof Swill be denoted by (u, v) and its length |uv|is equal to the Euclidean distance between u and v. Given a graph Ton Swe denote by wt(T) the sum of all the edge lengths of T. The minimum spanning tree of Sand the convex hull of S, denoted M(S) and CH(S) respectively, will be used frequently throughout the paper. Both structures can be computed in O(nlog n) time. 1. A fast pseudo-triangulation As mentioned in the introduction there exist point sets Swhere any triangulation will have 20th EWCG Seville, Spain (2004)
20th European Workshop on Computational Geometry (a) (b) Fig. 1. (a) An example where any triangulation will have weight Ω(wt(M(S)) ·n). (b) An example where any pseudo-triangulation will have weight Ω(wt(M(S)) ·log n). weight Ω(n·wt(M(S))), an example is given in Fig. 1a. A natural question is whether there exists similar worst-case bounds for pseudotriangulations. In this section we show that one can always construct a pseudo-triangulation of weight O(log n·wt(M(S))), and this is asymptotically tight, i.e., there exists a point set S for which every pseudo-triangulation has weight Ω(log n·wt(M(S))). We start with the lower bound. Observation 1 There exists a point set Sin the plane such that any pseudo-triangulation has weight Ω(wt(M(S))·log n). Next we present an algorithm that produces a pseudo-triangulation whose weight asymptotically meets the lower bound, that is: Theorem 1 Given a set Sof npoints in the plane one can in time O(nlog n)produce a pseudotriangulation of Sof weight O(wt(M(S)) ·log n). The algorithm performs two main steps: first a partition of the convex hull of Sinto simple polygons P1,...,Pmfollowed by a pseudotriangulation of each polygon. In this section we first show how a visibility polygon Pcan be pseudo-triangulated in time O(nlog n) using edges of total weight O(wt(P)·log n). We also show how to pseudotriangulate a special polygon, called an hourglass polygon. Finally it is shown how one can construct a spanning graph of Sthat partitions the convex hull of Sinto empty polygons that either are visibility polygons, or hourglass polygons by using segments of small total weight. Combining these results gives us Theorem 1. 1.1. Pseudo-triangulating a visibility polygon We will show that a weak visibility polygons whose visibility edge has two convex vertices easily can be pseudo-triangulated. This result will be used in the algorithm that pseudo-triangulates a visibility polygon. First a simple observation. Observation 2 The geodesic shortest path between any pair of points pand qin a weak visibility polygon Pis a concave chain. Observation 3 A weak visibility polygon Pwhose visibility edge (p1, p2)has two convex vertices can be pseudo-triangulated in time O(nlog n)using edges of total weight O(wt(P)·log n). Now we are ready to consider visibility polygons. Assume that we are given a visibility polygon P with respect to qwith nvertices p1,...,pnordered clockwise around the perimeter of Pstarting with q. Let r1,...,rmbe the convex vertices of P. Observation 2 implies that we can partition P into one pseudo-triangle and a set of weak-visibility polygons by adding the pseudo-triangle with corners at p1, riand rj, where 1 < i < j. The two convex vertices riand rjare chosen in such a way that the two angles ∠p2, p1, riand ∠pn, p1, rjare less than π. Note also that p2and pnare convex vertices since Pis a visibility polygon. The pseudo-triangle will consist of the edges in the concave chain between riand rjplus the edges (p1, ri) and (p1, rj). The resulting subpolygons outside the pseudo-triangle are weak visibility polygons whose visibility edges have convex vertices. According to Observation 3 each of these subpolygons can be pseudo-triangulated in O(nlog n) time using edges of total weight O(wt(P)·log n). Hence we have showed the following lemma. Lemma 2 The algorithm produces a pseudotriangulation Tof a visibility polygon Pin O(nlog n)time whose weight is O(wt(P)·log n). We end this section by considering the pseudotriangulation of an hourglass polygon. A polygon Pis said to be an hourglass polygon if Pconsists of two concave chains connected by two edges. We will later need the following straight-forward observation: Observation 4 An hourglass polygon Pcan be pseudo-triangulated in linear time by adding one edge esuch that wt(e)⩽1/2·wt(P). 1.2. Partition a point set into simple polygons As input we are given a set Sof npoints in the plane, and as output we will produce a set of polygons that are either hourglass polygons or visibility polygons. The partition is done in two main steps. First construct the convex hull and the minimum spanning tree of S. This is done in O(nlog n) time and it partitions CH(S) into simple (maybe de-
March 25-26, 2004 Seville (Spain) generate) polygons, denoted P1,...,Pm. Secondly, each polygon Piis processed independently. The task at hand is to partition Piinto a set of hourglass polygons and “restricted” visibility polygons, which can be pseudo-triangulated as described in the previous section. Arestricted visibility polygon rvp(P, q) of a polygon Pwith respect to a vertex qis a visibility polygon of Pwith respect to qsuch that every vertex of P(q) also is a vertex of P. Definition 3 Every edge e= (u, v)of a restricted visibility polygon R(q)that short cuts exactly three edges of the maximal visibility polygon P(q)is said to be a split edge. Now, let v1,...,vnbe the vertices of Pin clockwise order, starting at q=v1. It remains to show how we can partition Pinto visibility polygons and hourglass polygons in O(nlog n) time. The idea is to recursively partition Pinto restricted visibility polygons and hourglass polygons. Consider one level of the recursion. If Pis not a restricted visibility polygon with respect to q, or an hourglass polygon then the following two steps are performed: (i) Build a restricted visibility polygon rvp(P, q) of P. (ii) For each split edge ein rvp(P, q) construct an hourglass polygon Hsuch that H∩R(q) = e. A more precise description on how this can be performed in time O(nlog n) can be found in the full version. 2. A MWPT of a simple polygon Even though the above algorithm is asymptotically worst-case optimal with respect to the weight of the minimum spanning tree it can be very far from the optimal solution. In the rest of this paper we will focus on developing a constant factor approximation algorithm for the MWPT-problem. As a subroutine we will also develop an algorithm that finds an optimal pseudo-triangulation of a simple polygon. Theorem 4 Given a simple polygon Pone can compute the minimum weight pseudo-triangulation of Pin O(n3)time using O(n2)space. We will use a similar dynamic programming method as proposed by Gilbert [2] and Klincsek [5] for finding a minimum weight triangulation of a simple polygon. The basic observation used is that once some (pseudo-)triangle of the (pseudo- )triangulation has been fixed the problem splits into subproblems whose solutions can be found recursively, hence avoiding recomputation of common subproblems. Let Pbe the simple polygon with nvertices p1,...,pnin clockwise order. Let δ(pi, pi+j) be the shortest geodesic path between piand pi+j. Define the order of a pair of points pi, pjto be the value (i−j−1) mod n, i.e., the number of vertices on the path from pito pjalong Pin clockwise order. Sort the pairs with respect on their order, ties are broken arbitrarily. Note that every pair of points piand pjwill occur twice; once as (pi, pj) and once as (pj, pi). Now we process each pair in sorted order as follows. Assume we are about to process (pi, pi+j) and that the path δ(pi, pi+j) goes through the vertices pi=pi+a0, pi+a1,...,pi+ak=pi+j. Note that the path partitions Pinto k+ 1 subpolygons. Let L[i, i +j] be the total edge length of an optimal pseudo-triangulation for the subpolygon (or subpolygons) containing the chain pi, pi+1,...,pi+jof the perimeter of P. Compute L[i, i +j] recursively as follows. If (pi, pi+j) is not a convex or concave chain then we set L[i, i+j] = ∞. In the case when the path is a concave or convex chain we obtain one polygon P′bounded by the path δ(pi, pi+j) and the path between piand pi+j, and kpolygons P1,...,Pkwhere each Plis bounded by the edge (pi+al, pi+al−1) and the edges from pi+al−1to pi+al along the perimeter of P. If the path is a concave or convex chain then we will have three cases. - If δ(pi, pi+j) contains more than one edge then we know that L[∗,∗] already has been computed for every edge along δ(pi, pi+j), hence we only have to add up the values of L[∗,∗] which can be done in linear time, i.e., calculating Pk−1 α=0 L[pi+aα, pi+aα+1 ]. - If δ(pi, pi+j) contains exactly one edge (pi, pi+j) then an optimal pseudo-triangulation of P1can be obtained in linear time as follows. We will have two cases; either piand pi+jare corners of the pseudo-triangle in P1containing (pi, pi+j) or not. In the case when both piand pi+jare convex vertices within P1then an optimal pseudotriangulation of P1can be obtained in linear time as follows. Any optimal pseudo-triangulation of P1that contains the edge (pi, pi+j) must have pi and pi+jas corners thus we can try all possible vertices pm,i < m < i +jas the third corner.
20th European Workshop on Computational Geometry Testing a pseudo-triangle with corners at pi, pi+j and pmtakes constant time since the L[∗,∗]-value of the paths between piand pm, and pmand pi+j already has been computed. Otherwise, if one or both of the points are not corners, it holds that there must be a pair of points pxand pyalong the perimeter of Pbetween piand pi+jwhose shortest geodesic path between them contains the edge (pi, pi+j). Hence, in this case the optimal solution has already been computed for P1. There are O(n2) pairs of points and each pair takes O(n) time to process. The space bound follows from the fact that for every pair of points pi and pjwe store L[pi, pj]. When all the L[∗,∗] have been computed we can easily test every possible pseudo-triangle in constant time, thus Lemma 4 follows. 3. A better approximation In this section we will give an approximation algorithm for the MWPT-problem. It is similar to the approximation algorithm presented in Section 1 in the sense that the two main steps are the same; first a partition of the convex hull of the point set into simple polygons followed by a pseudo-triangulation of each polygon. In the pseudo-triangulation step we will use the optimal algorithm presented in the previous section. As input we are given a set Sof npoints in the plane, and as output we will produce a pseudotriangulation Tof S. Algorithm PseudoTriangulate(S) (i) Construct the convex hull and the minimum spanning tree of S. This partitions CH(S) into simple (maybe degenerate) polygons denoted Q1,...,Qk. (ii) Apply Theorem 4 to each of the kpolygons. The pseudo-triangulation obtained together with the convex hull and the minimum spanning tree of Sis reported. The proof of the following theorem can be found in the full version of the paper. Theorem 5 Given a set of points Salgorithm PseudoTriangulate computes a pseudo-triang- ulation Tof Sin time O(n3)using O(n2)space such that wt(T) = 4(1+4√2)·wt(Topt), where Topt is a minimum weight pseudo-triangulation of S. 4. Open problems and Acknowledgement An obvious question is whether the minimum weight pseudo-triangulation problem is as hard as finding the minimum weight triangulation? The MWT-problem is one of the few open problems listed in Garey and Johnson’s 1979 book on NP- completeness [1] that remain open today. A second open problem concerning the weight of a pseudo-triangulation is if there exists a minimum pseudo-triangulation of low weight. It was shown by Streinu [10] that every point set allows a minimum planar pseudo-triangulation that has 2n−3 edges. Neither of the two algorithms presented in this paper produces minimum pseudo-triangulations, although the dynamic programming algorithm for simple polygons can be modified to compute a minimum weight minimum pseudo-triangulation. The first author would like to thank Mark de Berg and Bettina Speckmann for valuable discussions during the work on this paper. References [1] M. Garey and D. Johnson. Computers and Intractability. W. H. Freeman and Company, 1979. [2] P. D. Gilbert. New results in planar triangulations. Report R–850, Univ. Illinois Coord. Science Lab, 1979. [3] M. T. Goodrich and R. Tamassia. Dynamic Ray Shooting and Shortest Paths in Planar Subdivisions via Balanced Geodesic Triangulations. Journal of Algorithms, 23(1):51–73, 1997. [4] D. Kirkpatrick and B. Speckmann. Kinetic Maintenance of Context-Sensitive Hierarchical Representations for Disjoint Simple Polygons. Proc. 18th ACM Symp. on Computational Geometry, 2002. [5] G. Klincsek. Minimal triangulations of polygonal domains. Annals of Discrete Math., 9:121-123, 1980. [6] D. Krznaric and C. Levcopoulos. Quasi-Greedy Triangulations Approximating the Minimum Weight Triangulation. J. of Algorithms 27(2): 303-338. 1998. [7] M. Pocchiola and G. Vegter. Pseudo-triangulations: Theory and applications. In Proc. 12th ACM Symposium on Computational Geometry, 1996. [8] G. Rote, C. A. Wang, L. Wang, and Y. Xu. On constrained minimum pseudotriangulations. Proc. 9th Symposium on Computing an Combinatorics, 2003. [9] B. Speckmann and C. D. T´oth. Allocating Vertex piguards in Simple Polygons via Pseudo-Triangulations. Proc. 14th ACM-SIAM Symp. on Discrete Alg., 2003. [10] I. Streinu. A Combinatorial Approach to Planar Non- Colliding Robot Arm Motion Planning. Proc. 41st ACM Symposium on Found. of Comp. Sci., 2000.