Long non-crossing configurations in the plane
We revisit several maximization problems for geometric networks design under the non-crossing constraint, first studied by Alon, Rajagopalan and Suri (ACM Symposium on Computational Geometry, 1993). Given a set of points in the plane in general position (no three points collinear), compute a longest non-crossing configuration composed of straight line segments that is: (a) a matching (b) a Hamiltonian path (c) a spanning tree. Here we obtain new results for (b) and (c), as well as for the Hamiltonian cycle problem:
(i) For the longest non-crossing Hamiltonian path problem, we give an approximation algorithm with ratio . The previous best ratio, due to Alon et al., was . Moreover, the ratio of our algorithm is close to on a relatively broad class of instances: for point sets whose perimeter (or diameter) is much shorter than the maximum length matching. The algorithm runs in time.
(ii) For the longest non-crossing spanning tree problem, we give an approximation algorithm with ratio which runs in time. The previous ratio, , due to Alon et al., was achieved by a quadratic time algorithm. Along the way, we first re-derive the result of Alon et al. with a faster -time algorithm and a very simple analysis.
(iii) For the longest non-crossing Hamiltonian cycle problem, we give an approximation algorithm whose ratio is close to on a relatively broad class of instances: for point sets with the product diameter convex hull size much smaller than the maximum length matching. The algorithm runs in time. No previous approximation results were known for this problem.
Key words and phrases:Longest non-crossing Hamiltonian path, longest non-crossing Hamiltonian cycle, longest non-crossing spanning tree, approximation algorithm.
Adrian Dumitrescu \@ifemptylab1
Csaba D. Tóth \@ifemptylab2
Self-crossing in planar configurations is typically an undesirable attribute. Many structures studied in computational geometry, in particular those involving a minimization condition, have the non-crossing attribute for free, for instance minimum spanning trees, minimum length matchings, Voronoi diagrams, etc. The non-crossing property usually follows from the triangle inequality. Alon et al.  have considered the problems of computing (i) the longest non-crossing matching, (ii) the longest non-crossing Hamiltonian path and (iii) the longest non-crossing spanning tree, given points in the plane. Although they were unable to prove it, they suspected that all these problems are -hard. The survey articles by Eppstein [8, pp. 439] and Mitchell [14, pp. 680] list these as open problems in the area of geometric network optimization. The problem of approximating the longest non-crossing Hamiltonian cycle is also of interest and wide open [4, pp. 338].
Without the non-crossing condition explicitly enforced, the problem of minimizing or maximizing the length of a spanning tree, Hamiltonian cycle or path, perfect matching, triangulation, etc. has a rich history. However if such structures are required to be non-crossing much less is known, in particular for the maximization variants. While for minimization problems, the non-crossing property comes usually for free via the triangle inequality, in contrast, for maximization problems, the non-crossing property conflicts directly with the length maximizing objective. This is another reason why these problems are interesting to study.
Related work. The existence of non-crossing Hamiltonian paths and cycles in geometric graphs has been studied in [2, 5]. Various Ramsey-type results for non-crossing spanning trees, paths and cycles have been obtained in  and . The Euclidean MAX TSP, the problem of computing a longest straight-line tour of a set of points, has been proven -hard in dimensions three or higher , while its complexity in the Euclidean plane remains open . In contrast, the shortest non-crossing matching and the shortest non-crossing spanning tree are both computable in polynomial time [8, 14], as they coincide with the shortest matching and the shortest spanning tree respectively.
Definitions and notations. A set of points in the plane is said to be in general position if no three points are collinear. General position will be assumed throughout this paper. Given a set of points in the plane, the results of Alon al. are as follows: (i) A non-crossing matching whose total length is at least of the longest (possibly crossing) matching can be computed in time. (ii) A non-crossing Hamiltonian path whose total length is at least of the longest (possibly crossing) Hamiltonian path can be computed in time. (iii) A non-crossing spanning tree whose total length is at least of the longest (possibly crossing) spanning tree can be computed in time. The running times have been adjusted to reflect the current best upper bound of on the number of halving lines as established by Dey .
A geometric graph is a pair where is a finite set of points in general position in the plane, and is a set set of segments (edges) connecting points in . The length of , denoted , is the sum of the Euclidean lengths of all edges in . The graph is said to be non-crossing if its edges have pairwise disjoint interiors (collinear triples of points are forbidden in order to avoid overlapping collinear edges).
For a point set , let be the convex hull of , and let denote the perimeter of . Denote by the diameter of and write . Let be a longest (possibly crossing) matching of , and let be a longest non-crossing matching of ; observe that for odd , is a nearly perfect matching, with edges. Let be a longest (possibly crossing) Hamiltonian path of , and let be a longest non-crossing Hamiltonian path of . Let be a longest (possibly crossing) spanning tree of , and let be a longest non-crossing spanning tree of . Finally, let be a longest (possibly crossing) Hamiltonian cycle of , and let be a longest non-crossing Hamiltonian cycle of . The following inequalities are obvious: .
Given a set of points in the plane, a line going through two points of is called a halving line if there are points on one side and points on the other side . A bisecting line of is any line that partitions the point set evenly, i. e., neither of the two open halfplanes defined by contains more than points of . Observe that any halving line of is also a bisecting line of . Any bisecting line of yields (perhaps non-uniquely) a bipartition , with , , with contained in one of the closed halfplanes determined by , and contained in the other. We call a linearly separable bipartition, or balanced partition of . Observe that for any non-zero direction vector , there is a bisecting line orthogonal to , see [7, Lemma 4.4]. Two bisecting lines are called equivalent if they can yield the same balanced partition of . It is well known that the number of non-equivalent bisecting lines of a set is of the same order as the number of halving lines of the set, and any balanced bipartition can be obtained from a halving line [7, pp. 67].
Our results are summarized in the following three theorems111Due to space limitations, some proofs are omitted..
(i) For the longest non-crossing Hamiltonian path problem,
there is an approximation algorithm with ratio
that runs in time.
(ii) Given a set of points in the plane, one can compute a non-crossing Hamiltonian path in time such that . In particular, if the point set satisfies the condition for some small , then .
(iii) Alternatively, one can compute a non-crossing Hamiltonian path in time, such that .
For the longest non-crossing spanning tree problem for a given set of points in the plane, there is an approximation algorithm with ratio and running time. More precisely, the algorithm computes a non-crossing spanning tree such that .
Given a set of points in the plane, with :
(i) One can compute a non-crossing Hamiltonian cycle in time such that . In particular, if the point set satisfies the condition for some small , then .
(ii) Alternatively, one can compute a non-crossing Hamiltonian cycle in time such that .
(iii) Alternatively, one can compute a non-crossing Hamiltonian cycle in time, such that .
section1[The Hamiltonian path]The Hamiltonian path
In this section we prove Theorem 0.1. Let . We follow an approach similar to that of Alon et al. using projections and an averaging argument, in conjunction with a result on bipartite embeddings of spanning paths in the plane. Abellanas et al. [1, Theorem 3.1] showed that every linearly separable bipartition with , admits an alternating non-crossing spanning path such that the edges cross any separating line at points ordered monotonically along . Such a Hamiltonian path can be computed in time. Their algorithm computes the same Hamiltonian path for any two equivalent halving lines, that is, the alternating path depends on the bipartition only rather than the separating line.
We now recall the algorithm of Abellanas et al. ; see Fig. 4 for an example. Let with be the red-blue bipartition given by a vertical line : on the left, on the right. Their algorithm constructs an alternating path in the following way: Let be the top red-blue edge of the convex hull , called the top bridge. If , set , if , set , else set to or arbitrarily. At every step, recompute the top bridge of , and add to if the last point in was blue, or add to if the last point in was red. As pointed out by the authors, the resulting path is non-crossing because is disjoint from the convex hull of at each step.
We improve the lower bound of Alon et al. by computing the longest Hamiltonian path corresponding to a bipartition and a Hamiltonian path of length at least the perimeter of the convex hull, and returning the longest of the two.
For a point set , , a non-crossing Hamiltonian path of length at least can be computed in time. The bound on the length is best possible.
Consider a geometric graph , and a point , so that is in general position. We say that sees a vertex if the segment does not intersect any edge of . Similarly, we say that sees an edge , if the triangle formed by and does not intersect any other edge of . We make use of the fact that if is even then the two endpoints of an alternating path are on opposite sides of the separating line . If is odd, we first construct an alternating path for a specific subset of points, and then augment it to a Hamiltonian path on all points using the following lemma.
Let with , be a linearly separable bipartition given by line . Let , and be a non-crossing alternating path on such that its consecutive edges cross at points ordered monotonically along . Then sees one edge of and consequently, can be extended to a Hamiltonian path on , with . The path can be computed in time, given .
Fix a Cartesian coordinate system . Let be the number of halving lines of , denote the angles they make with the -axis of by . By relabeling the points assume that the optimal path is . For two points , let be the angle in formed by the line through and the -axis. If is odd, then a bisecting line of direction (for any ) must be incident to at least one point of , and denote an arbitrary such point by .
Step 1. Compute a non-crossing Hamiltonian path of length at least , by Lemma 0.4.
Step 2. If is even, then for all non-equivalent bisections of (i.e., for all balanced bipartitions of ), compute a non-crossing alternating path using the algorithm of Abellanas et al. , and let the longest such path be . If is odd, then for all non-equivalent bisections of , compute a non-crossing alternating path of the even point set using the algorithm of  and let the longest such path be . Augment with vertex by Lemma 0.5 to a Hamiltonian path .
Step 3. Output the longest of the two paths and .
By Lemma 0.4, the running time of Step 1 is . Since the number of halving lines of an -element point set is and all can be generated within this time , the running time of Step 2 is , consequently the total running time of A1 is also .
We proceed with the analysis of the approximation ratio. For simplicity, we assume that is even. The case of odd is slightly different. For each , let be a (rotated) coordinate system, obtained from via a counterclockwise rotation by , and with the -axis dividing evenly the point set . Let be the -coordinate of point with respect to . For a given , let be a non-crossing alternating path with respect to a balanced bipartition induced by the -axis of , as computed by the algorithm. There are balanced bipartitions given by any halving line of . Recall that does not depend continuously on ; it depends only on the discrete bipartition. However, the coordinates of the points depend continuously on . Assume that , where is a permutation of ; here depends on the bipartition (hence also on ). Let denote the width of in direction , that is, the width of the smallest parallel strip of direction that contains . By projecting on the -axis of , we get
In the 2nd line of the above chain of inequalities, we use the fact that and lie on opposite sides of , since is even, hence , In the 3rd line, we make use of the following inequality: for any two points , , with equality if and only if the two points lie on opposite sides of the -axis of . Recall: for even , is the longest of the Hamiltonian non-crossing paths over all balanced bipartitions of . (A given angle yields balanced partitions, and corresponding alternating paths denoted here .) We thus have for each :
and according to Cauchy’s surface area formula, we have . By integrating both sides of the previous inequality over the -interval , we obtain
We now improve the old approximation ratio of to , by balancing the lengths of the two paths computed in Step 1 and Step 2. Set .
Case 1: . By considering the path computed in Step 1, we get a ratio of at least
Case 2: . By considering the path computed in Step 2 (inequality (0.2)), we get a ratio of at least
Observe that if the point set satisfies the condition , then by (0.2), we have
This concludes the proofs of parts (i) and (ii) of Theorem 0.1.
(iii) With the same approach as in , a Hamiltonian path of length at least can be found by considering only angles , for , where is a suitable absolute constant. The resulting running time is . This concludes the proof of Theorem 0.1.
section1[The spanning tree]The spanning tree
In this section we prove Theorem 0.2. Let , where . Given a point , the star centered at , denoted , is the spanning tree on whose edges join to all the other points. Since is in general position, is non-crossing for any . An extended star centered at is a spanning tree of consisting of paths of length or (edges) connecting to all the other points. See Fig. 1. While the star centered at a point is unique, there may be many extended stars centered at the same point, and some of them may be self-crossing. In particular is also an extended star.
The algorithm of Alon et al. computes the stars centered at each of the points, and then outputs the longest one. The algorithm takes quadratic time, and the analysis shows a ratio of (which tends to in the limit). Their algorithm works in any metric space. As pointed out by Alon et al., the ratio is best possible (in the limit) for this specific algorithm. We first re-establish the approximation ratio using a faster algorithm, and also with a simpler analysis. Our algorithm works also in any metric space; however in this general setting, the running time remains quadratic.
Algorithm A2: Compute a diameter of the point set, and output the longest of the two stars centered at one of its endpoints.
Obviously the algorithm runs in time, with bottleneck being the diameter computation . Let be a diameter pair, and assume w.l.o.g. that . The ratio (or even ) follows from the next lemma in conjunction with the obvious upper bound (or ).
Let and be the stars centered at the points and , respectively. Then .
Assume that , . For each , the triangle inequality for the triple gives
By summing up we have
We now continue with the new algorithm that achieves a (provable) approximation ratio within the same running time .
Algorithm A3: Compute a diameter of the point set, and output the longest of the 5 non-crossing structures , , , , , described below.
Assume w.l.o.g. that the is a horizontal unit segment, where and . Let be a point in with a largest value of . By symmetry, we can assume that . , , and are the 3 stars centered at , , and respectively. , resp. , are two non-crossing extended stars centered at , resp, ; details to follow. Each of the five structures can be computed in time, so the total execution time is also .
Set , , and , and refer to Fig. 2. Let , , , and , be four parallel vertical lines: , , , . Obviously, all points in lie in the strip bounded by and . Let be the vertical parallel strip symmetric about the midpoint of and of width . We refer to as the middle strip; is bounded by the vertical lines and . Let and be the two vertical strips of width bounded by and , and by and respectively. Let be the intersection point between and the circular arc of unit radius centered at and sub-tending an angle of . We have and
We now describe the two extended star structures and . See also Fig. 3 for an example. To construct , first compute the order of visibility of the points in from point by sorting. Then connect with each point in the right strip . Note that , thus . Call the resulting star. The edges of this star together with the vertical line divide into convex regions (wedges with a common apex ) ordered top-down. The subset of points in each wedge can be computed using binary search in overall time (over all wedges). is extended (augmented) as follows. In each wedge, say , all points are connected either to or to , depending on the best (longest) overall connection cost. We denote the resulting extended star structure by . The construction of is analogous. It is clear by construction that both and are non-crossing.
For each , let denote the maximum distance from to other points in . Then
Consider rooted at and drawn as an abstract tree with the root at the top in the usual manner. Let denote the parent of a (non-root) vertex . Uniquely assign each edge of to vertex . Obviously, holds for each edge in the tree. By adding up the above inequalities, and taking into account that , the lemma follows.
Assume that for some positive constant . Then
Let and denote the number of points in the left and right vertical strips and . Then , and similarly . Consequently . and can be constructed in time.
The distance between and is . By an argument similar to that in the proof of Lemma 0.6, the connection cost for a wedge with points is at least . Therefore the total length of is
The estimation of is analogous. The running time has been established previously.
Assume that and . Then .
Assume that . Let be a point in the middle strip , with -coordinate satisfying . Then .
It is straightforward to check that the maximum distance is attained for a point on with -coordinate . The furthest point from in the allowed region is . Hence
We now distinguish the following four cases to complete our estimation of the approximation ratio.
Case 1: . The algorithm outputs222Here and in other instances it is meant that the algorithm outputs a structure at least as long as these. or . By Lemma 0.8, the approximation ratio is at least
Case 2: and . The algorithm outputs . By Lemma 0.10, the approximation ratio is at least .
Case 3: and and . The algorithm outputs or . We only need the last inequality in estimating the length. By Lemma 0.9, the approximation ratio is at least
Case 4: and and . The algorithm outputs or . There are at least points in the middle strip . Observe that at most points in have ; otherwise we would have
The approximation ratio is at least
This completes the list of cases and thereby the proof of Theorem 0.2.
Remark. The example in Fig. 3 with points ( even) equally spaced along a circle shows that the constant measuring the approximation ratio achieved by our algorithm A3 cannot be improved to anything larger than . Indeed the lengths of the five structures computed by the algorithm are , while .
section1[The Hamiltonian cycle]The Hamiltonian cycle
In this section we present the proof of Theorem 0.3, which is similar (including notation) to that of Theorem 0.1. The rotated coordinate system , and the -coordinates with respect to this system are denoted in the same way. By relabeling the points assume that the optimal cycle is (with the convention that ). We approximate by constructing a non-crossing alternating path on a subset of , and then completing it to a non-crossing cycle using convex hull vertices. We need to observe that the alternating path on the subset of interior (non-hull) vertices of produced by the algorithm of Abellanas et al.  is not good enough for this strategy: even though one endpoint of (the first computed by the algorithm) is always on the convex hull of , the other endpoint might be blocked by edges of , so that might not be extendible to a non-crossing Hamiltonian cycle (an example is shown in Fig. 4). Here, we give a stronger result that fits our purpose (for an even number of points).
Let with with , be a linearly separable bipartition given by line . Then admits an alternating non-crossing spanning path such that (1) the edges of cross at points ordered monotonically along ; and (2) the two endpoints of are incident to the two distinct edges of the convex hull that connect and (the two red-blue bridges). Such a Hamiltonian path can be computed in time. We refer to the underlying procedure as the two-endpoint path construction algorithm.
We modify the algorithm of Abellanas et al. for path construction, so that the path is grown from the two endpoints and the two sub-paths merge ”in the middle”. Recall that , and , thus is even. Let and be the top and bottom red-blue edges of the convex hull , respectively, called top and bottom bridges; it is possible that or but not both. One endpoint of is an endpoint of the top bridge, and the other endpoint of is an endpoint of the bottom bridge, and they are chosen of opposite colors. Let or arbitrarily, containing two endpoints of the path. At every step, recompute the top and bottom bridges of , and append either the red or the blue vertex of each bridge to such that the appended edges cross the separating line . In the last step, the convex hull of is a red-blue segment that merges the two sub-paths. The two new edges added simultaneously at each step cannot cross each other; and they cannot cross previous edges, since they are separated from them by the convex hull of . Finally, they cannot extend the two sub-paths by the same point either, because is even.
(). Let be a simple polygon (with the convention that ) and be a point in the exterior of the convex hull of , where is in general position. Then sees one edge of . Such an edge can be found in time.
Let be a simple polygon (with the convention that ) and be a point in the exterior of the convex hull of , where is in general position. Then the polygonal cycle can be extended to include so that is still a simple polygon. More precisely, there exists , so that is a simple polygon. Moreover, . The extension can be computed in time.
By Lemma 0.13, sees one edge of . Replacing this edge of by the two edges and results in a simple polygon . By the triangle inequality, . The extension can be computed in time, as determined by the time needed to find a visible edge.
Note that the condition in the lemma that lies in the exterior of the convex hull of , is indeed necessary. Otherwise one cannot guarantee that sees an edge of .
(i) Let , where is the set of convex hull vertices and is the set of interior points. Let . Put , , thus . Assume first for simplicity that is even. An easy modification of the algorithm, explained below, is used for odd.
Step 1. For all non-equivalent bisections of (i.e., for all balanced bipartitions of ): 1. Compute a non-crossing alternating path by using the two-endpoint path construction algorithm (Lemma 0.12). 2. Extend to a cycle by connecting its endpoints to (one or two) convex hull vertices. 3. Further extend this cycle to include the remaining hull vertices, by repeated invocation of Lemma 0.14.
Step 2. Output the longest such cycle (containing all points of ).
Observe that after Step 1.1, the two endpoints of the path are vertices of , hence they can be connected to hull vertices to make a cycle. If is odd, then there is a point on the line . Use the two-endpoint path construction algorithm for , and the same bisecting line . If is in the interior of , then extend the path with point , using Lemma 0.5. Otherwise, sees the top or bottom bridge of , so the path can be extended by connecting to the endpoint visible to . The two endpoints of the extended path are on , hence they can be connected to hull vertices to make a cycle, as in the case of even .
-  M. Abellanas, J. Garcia, G. Hernández, M. Noy, and P. Ramos: Bipartite embeddings of trees in the plane, Discrete Applied Mathematics, 93 (1999), 141–148.
-  O. Aichholzer, S. Cabello, R. Fabila-Monroy, D. Flores-Peñaloza, T. Hackl, C. Huemer, F. Hurtado, and D. R. Wood: Edge-removal and non-crossing configurations in geometric graphs, Proc. 24th European Workshop on Computational Geometry, Nancy 2008, pp. 119–122.
-  N. Alon, S. Rajagopalan and S. Suri: Long non-crossing configurations in the plane, Fundamenta Informaticae 22 (1995), 385–394. Also in Proc. 9th ACM Sympos. on Comput. Geom., 1993, 257–263.
-  M. Bern and D. Eppstein: Approximation algorithms for geometric problems, in Approximation Algorithms for -hard Problems (D. S. Hochbaum, editor), PWS, Boston, 1997, pp. 296–345.
-  J. Černý, Z. Dvoŕák, V. Jelínek, and J. Kára: Noncrossing Hamiltonian paths in geometric graphs, Discrete Applied Mathematics, 155 (2007), 1096–1105.
-  T. K. Dey: Improved bounds on planar -sets and related problems, Discrete & Computational Geometry, 19 (1998), 373–382.
-  H. Edelsbrunner: Algorithms in Combinatorial Geometry, Springer-Verlag, Heidelberg, 1987.
-  D. Eppstein: Spanning trees and spanners, in Handbook of Computational Geometry (J.-R. Sack and J. Urrutia, editors), Elsevier Science, Amsterdam, 2000, pp. 425–461.
-  S. P. Fekete: Simplicity and hardness of the maximum traveling salesman problem under geometric distances, Proceedings of the 10th ACM-SIAM Symposium on Discrete Algorithms, 1999, pp. 337–345.
-  F. Hurtado, M. Kano, D. Rappaport, and Cs. D. Tóth: Encompassing colored planar straight line graphs, Computational Geometry: Theory and Applications, 39 (1) (2008), 14–23.
-  G. Károlyi, J. Pach and G. Tóth: Ramsey-type results for geometric graphs. I, Discrete and Computational Geometry 18 (1997), 247-255.
-  G. Károlyi, J. Pach, G. Tóth and P. Valtr: Ramsey-type results for geometric graphs. II, Discrete and Computational Geometry, 20 (1998), 375–388.
-  L. Lovász: On the number of halving lines, Ann. Univ. Sci. Budapest, Eötvös, Sec. Math., 14 (1971), 107–108.
-  J. S. B. Mitchell: Geometric shortest paths and network optimization, in Handbook of Computational Geometry (J.-R. Sack and J. Urrutia, editors), Elsevier Science, Amsterdam, 2000, pp. 633–701.
-  F. Preparata and M. Shamos: Computational Geometry: An Introduction, Springer, New York, 1985.