Manuscript Offprint
arXiv:2610.23130Online geometric matching and segments block points
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Given a sequence of online points in general position in the plane, the geometric matching problem asks to match as many points as possible, subject to segment crossing constraints. We initiate the study of online geometric matching with limited crosses. In the k-crossing model each matched segment is allowed to have at most k crosses, where k = 0 corresponds to the online noncrossing matching model for which Bose et al. proved that Greedy is an optimal deterministic algorithm achieving a competitive ratio of 2/3. In the triangle-free-crossing model no three matched segments are allowed to pairwise cross each other. Interestingly, we show in both cases the performance of Greedy does not improve by allowing crosses, and in fact, becomes worse in the k-crossing setting for . In the triangle-free-crossing model, we propose a simple two-layer-Greedy deterministic algorithm achieving a competitive ratio 4/5. More interestingly, we propose and study the underlying segments blocking points extremal problem, and discuss its connection to vertex cover numbers and Ramsey numbers, with interesting open problems that might be of independent interest.
We revisit the noncrossing model. We give a randomized algorithm which is an asymmetric version of Kamali et al., improving the competitive ratio from 0.66952 to 0.67034. We also show, via a conceptually simple construction, that no randomized algorithm can match more than 6/7 fraction of points, improving the previous 16/17 by Boyar et al.
1 Introduction
This work generalizes the online noncrossing matching problem to the more general online geometric matching problem, where limited crosses are allowed. The online geometric matching problem differs from online matching of a graph: for the geometric problem, the matching needs to satisfy a certain geometric property, while for the graph problem, the matching needs to satisfy a combinatorial property (i.e., be a subset of predetermined edges). For online matching of a graph, see a recent survey by Huang et al. [HTW24].
The online geometric matching problem is defined as follows. An online instance is a finite sequence of points in in general position; in particular no three input points are collinear, no three lines intersect at one point, etc. The value of is not announced in advance. When arrives, an online algorithm may match it to one earlier unmatched point or leave it unmatched. A match is represented by the closed straight-line segment between its endpoints, and all decisions are irrevocable. Throughout, for two points and , we write for the closed line segment joining them. The matched segments form a matching denoted by . For a given geometric
suat25000108@stu.suat-sz.edu.cn property, one asks: what is the largest asymptotic competitive ratio that can be achieved by an online algorithm respecting the given property?
In this work, the property we consider is whether two line segments cross or not, i.e., whether their interiors intersect. The crossing graph has one vertex for every segment of and one edge for every crossing pair. We consider two scenarios.
• In the k-crossing model, every vertex of has degree at most the fixed integer .
• In the triangle-free-crossing model, is triangle-free; equivalently, no three matching segments pairwise cross.
The 0-crossing model is precisely the noncrossing model. For , every -crossing matching is triangle-free-crossing. For , the two crossing models are incomparable: a triangle-free crossing graph may have arbitrarily large maximum degree, whereas a -crossing graph may contain a triangle.
Let ALG denote an arbitrary online algorithm, and OPT an optimal offline algorithm, respectively. For a given instance I, let and denote the number of matched points, respectively. We are only concerned about the asymptotic performance of algorithms, so without loss of generality we assume n is even. Because a minimum-total-length perfect matching is non-crossing, we have for all three models we consider. If is the matching obtained by ALG, then , where denotes the number of matched segments. A deterministic algorithm has asymptotic competitive ratio at least if a constant C exists such that for every input I. For a randomized algorithm the corresponding requirement is , where the expectation is over the algorithm's internal randomness. Its adversary is oblivious: the entire input, including its length, is fixed before the random bits are exposed. Since in all three models, the asymptotic competitive ratio coincides with the asymptotic fraction of input points matched (or the expected fraction for a randomized algorithm).
A deterministic algorithm is Greedy if it always matches the current point whenever that point can be matched to an existing unmatched point. Its tie-breaking rule is arbitrary.
- We initiate the study of the k-crossing and the triangle-free-crossing matching. Intuitively, by allowing crosses it seems Greedy may match more points. We show this is false: for k-crossing matching Greedy has a competitive ratio of at most , which becomes strictly worse compared to the noncrossing model for every . For triangle-free-crossing matching Greedy has a competitive ratio of at most 2/3, and we show this by presenting an elegant construction. Surprisingly, proving a matching lower bound seems difficult and is left as the main open problem of this work. Furthermore, for triangle-free-crossing matching, we introduce a simple deterministic two-layer-Greedy online algorithm with competitive ratio 4/5 which strictly improves Greedy's performance in the noncrossing setting.
Perhaps more interestingly, the performance of Greedy in both settings can be understood through a common geometric extremal problem. In particular, for the triangle-free-crossing matching, our study of the corresponding geometric extremal problem indicates a potential connection to Ramsey theory.
• We give a refined randomized algorithm based on [KNS22] with an expected competitive ratio 0.67034, improving their 0.66952. We also show, via a conceptually simpler construction than that of Boyar et al. [BKL 26], that no randomized algorithm can have competitive ratio greater than , improving their .
We proceed to define the mathematical extremal problem in its general form, which we believe may also be of independent interest.
Definition 1.1. Let be a family of line segments having some geometric property . Let be a set of points such that its points and the endpoints of are jointly in general position. The family blocks , if violates for every two distinct points . Write
The blocking number is the largest cardinality of a point set blocked by , and define
In this work, P is either the k-crossing, or the triangle-free-crossing property. We write for the k-crossing property, including , and for triangle-free crossing. See Figure 1 for an illustration, which shows .

Figure 1: Left: a configuration of segments that is not triangle-free. Right: a triangle-free-crossing family of five segments blocks four points, hence .
The connection between segments blocking points and Greedy algorithms is exhibited in the following. We remark that this connection can be stated for any other geometric property P, but we need to determine the corresponding OPT for the property P. We only state this connection for the properties that concern us in this work, because OPT in our case is particularly simple.
Theorem 1.2. Let P be k-crossing or triangle-free-crossing.
(1) If , then on every input on which Greedy creates segments, Greedy matches at least fraction of the input points.
(2) If , then there exists an input on which Greedy creates segments and matches at most fraction of the input points.
Proof. (1) At the end of an online instance on which Greedy creates segments, let be the family of segments matched by Greedy and let be the set of unmatched points. Because of the greedy nature of Greedy, blocks . Hence, . The total number of points is at most , hence the claimed bound.
(2) In this case, there exists a family of segments that blocks a set containing at least points; choose of those points and call the resulting set . Present the endpoints of pair by pair, with the endpoints of each prescribed segment presented consecutively, followed by the points of . Because satisfies property P, Greedy matches all endpoints into the prescribed segments. Since blocks , none of the points in can be matched by Greedy. The claim follows.
Because of Theorem 1.2, to understand the performance of Greedy it suffices to study the following extremal problem.
Problem: determine , and understand the extremal configuration .
The rest of the paper is organized as follows. Section 2 studies Greedy in the k-crossing model, where we determine its exact competitive ratio . Section 3 studies Greedy in the triangle-free-crossing model, including the two-layer-Greedy algorithm with ratio 4/5 and the connection to the vertex cover number and to Ramsey numbers. Section 4 revisits the noncrossing model, that is, the 0-crossing case, where we improve the randomized lower bound of Kamali et al. [KNS22] and prove the 6/7 upper bound. Section 5 lists several open problems.
1.2 Related work
Given 2n points in in general position, the basic noncrossing matching (NM) problem is to find a noncrossing matching with the largest possible number of segments. Observe that the minimum-length Euclidean matching is noncrossing. Hence, a perfect NM always exists. The NM problem and its variants have been extensively studied in the offline setting.
A closely related line of research relaxes the noncrossing constraint and allows certain crossings. An important problem is to understand the size of a crossing family, that is, matching segments that are pairwise crossing. A breakthrough by Pach et al. [PRT19] showed that the largest crossing family has almost linear size. Aichholzer et al. [AFMK 23] studied the counting problem of perfect matchings when at most k crossing points are allowed. Note that this differs from our k-crossing matching: their k denotes the global number of crossings. In contrast, the online models studied in this paper control the crossings per segment: in the k-crossing model every matched segment may cross at most k other segments (Section 2), while in the triangle-free-crossing model no three matched segments pairwise cross (Section 3).
The interest in geometric settings, particularly the Euclidean plane setting, for the matching problem stems from applications in image processing Cohen [Coh99] and circuit board design Hershberger and Suri [HS97]. In such applications, one is often required to construct a matching between various geometric shapes, such as rectangles or circles, representing vertices, using straight-line segments or, more generally, curves. Geometry enters the picture due to constraints on the segments, such as avoiding intersections among the segments.
Hershberger and Suri [HS92] gave an algorithm that finds a perfect NM in time . First Atallah [Ata85] and then Dumitrescu and Steiger [DS00] gave efficient algorithms for the bichromatic version of the problem, where the points are divided into two subsets, and matching segments can only be formed between the two subsets. Other versions of the problem considered in the literature include requiring the NM to be stable [RI19, HMO21], requiring two NMs to be compatible (segments in two NMs are also noncrossing if they only share endpoints) [ABD 09], and requiring compatible NMs to satisfy a certain diversity constraint [MMN22]. Noncrossing matching consisting of hyperedges in hypergraphs has also been studied [KS11].
Several studies considered optimization problems over all NMs. The objective functions include maximizing the sum of the Euclidean lengths of the matching segments [ARS93], minimizing the length of the longest matching segment [AACKT14], and other similar combinations of minimization and maximization [MSS24].
At least two works [BPS05, SU11] considered weighted NM on n points, where every point has weight in . Balogh et al. [BPS05] considered the weight of a segment to be the sum of the weights of the two endpoints modulo n, and studied the typical size of an NM with distinct segment weights (this is called noncrossing harmonic matching). Sakai and Urrutia [SU11] considered the weight of a segment to be the minimum weight of the two endpoints, and they studied lower and upper bounds for the maximum weighted NM.
In pure mathematics, NM has been studied as a tool to understand the representation theory of groups [AST13, PPS22]. A tuple of NMs (a so-called necklace) satisfying a specific property is used to study the topology of harmonic algebraic curves associated with a polynomial over C [Sav09]. Extremal graph problems where an NM of size k plays the role of a forbidden subgraph are studied in [ACFM 10, Gyá11].
Besides the application in image processing and circuit design, as mentioned in the introduction, NM has also found other applications. One major application is in computational biology. A restricted version of NM (the points are all on a circle), and k-noncrossing matchings (no k pairwise intersecting segments, which reduces to the standard NM when k = 2) have been studied to understand RNA structures [BMR95, CHR09, Vla13]. In applications that are related to visibility problems (such as robotics) and geometric shape matching, one replaces all or a subset of the points in question by geometric objects [Rap02, AAB 15]. For example, when the question is to match objects to objects, then a segment pq between two objects A and B can be formed by choosing arbitrary points p from A and q from B, conditioned on the segment pq not crossing other objects.
The online NM has only been studied very recently. Bose et al. [BCD 20] initiated the study of online (unweighted) NM and showed that the competitive ratio of deterministic algorithms is 2/3, while Kamali et al. [KNS22] gave a randomized algorithm with expected competitive ratio approximately 0.6695. The online bichromatic NM has also been studied in [BCD 20, Saj21]. Boyar et al. [BKL 26] initiated the study of weighted online noncrossing matching where weights are put on points; among other results, they gave a randomized algorithm that matches in expectation at least 1/3 fraction of all points even when points have weights, and proved that no randomized algorithm can have competitive ratio greater than 16/17. Finally, the advice complexity has also been studied in several works [BCD 20, MP23, BKL 26].
2 Greedy in the k-crossing model
2.1 Determine
We first use Euler’s formula for planar graphs to establish a cell-counting formula for arrangements of segments in terms of the total number of intersections.
Lemma 2.1. Let be a family of line segments with total intersections. Then, the arrangement creates at most cells inside a sufficiently large bounding box.
Proof. The idea is to construct a planar graph by properly extending the segments and then applying Euler's formula. Let B be a sufficiently large rectangular bounding box, chosen generically so that no extended segment meets a corner of B. Extend each segment in both directions until it meets the boundary of B or other (extended) segments, see Figure 2 for an illustration. When an extended

Figure 2: a, p, q are boundary points for segments r, s, t respectively, while a, p are both meet points of segment t. The edges of the graph include both the solid and dashed edges.
segment s meets either the boundary of B or another segment t at a point p, we say that p is a boundary point of s; in the latter case, p is called a meet point of t. This creates a connected planar graph. Next, we count the number of vertices, edges and faces.
The vertices of this graph are: (1) m original intersection points; (2) meet points, which we divide into two types. Let A denote the set of meet points that are generated when a segment meets another segment, and let C denote the set of meet points on the boundary of B. We have because all meet points are also all the boundary points of segments. So, if we let , then ; (3) the 4 corner points of B. Thus, the total number of vertices is
Now, we count edges. For the -th extended segment, let be the number of intersection points and meet points of type on it, that is, we do not include its two boundary points. These divide the segment into edges. Hence, the segments contribute edges. Since each intersection point lies on exactly two segments, and each meet point belongs to exactly one segment (e.g., is a meet point of segment , not a meet point of segment , in Figure 2), by double counting we have . Hence, the segments contribute edges.
The boundary of is subdivided by the boundary points, yielding additional boundary edges. Thus, the total number of edges is
The graph is connected, so Euler's formula applies. The exterior of B is one face, so the number of cells inside B is F - 1. Therefore, .
Proposition 2.2. , and this bound is asymptotically attained.
Proof. Let L be a family of segments satisfying k-crossing property. By double counting the point-segment incidences, the number of intersections is at most . Applying Lemma 2.1, we obtain that the number of cells is at most . We first justify that every cell of this arrangement is convex, and hence can contain at most one blocked point. Since every extension is stopped as soon as it meets an obstacle, every end of every segment lies either on the boundary of B or in the interior of another segment, where it terminates (at a meet point one segment passes straight through while the other one ends, cf. Figure 2). Hence no cell boundary makes a reflex turn, and no cell is bounded twice by segments lying on the same supporting line: a cell containing points on both sides of one of its boundary segments would have to go around an end of that segment, but every end is supported, either by or by the segment on which it terminates. Therefore every cell is an intersection of open half-planes with B, and is so convex. In particular, two points lying in the same cell are joined by a segment that remains inside the cell, and thus crosses no segment of ; so the points of a blocked set occupy pairwise distinct cells, and the upper bound for follows.
For the lower bound, we distinguish two cases. For the assertion is exactly the noncrossing case of [BCD20]; our construction below therefore only concerns . Consider the following construction: the grid formed by horizontal segments and vertical segments gives a family of segments satisfying -crossing property. Note that it blocks points. One can then recurse this construction: in each cell one adds a copy of this construction. This yields the effect of adding new blocked points by adding segments. Hence, in the limit, the number of blocked points would be times the number of segments, as desired.
2.2 Implication for Greedy
Theorem 1.2 together with Proposition 2.2 immediately yields the following.
Theorem 2.3. For every fixed , the exact asymptotic competitive ratio of Greedy for the online k-crossing matching is .
Setting , this recovers the competitive ratio of Greedy for online noncrossing matching established previously by Bose et al. [BCD 20].
3 Greedy in the triangle-free-crossing model
3.1 A construction for
Let be two parameters. We say a pair is admissible if there is a triangle-free-crossing family of segments blocking points, equivalently, .

Figure 3: is admissible; the figure shows the case .
Proposition 3.1. .
Proof. Since the supporting lines can determine at most convex regions (see [Szi07, Problem 3.2]), and clearly each convex region can contain at most one blocked point, this shows the upper bound.
For the lower bound, we exhibit an explicit construction, see an illustration in Figure 3. The construction is to give horizontal and vertical segments forming a grid, and in each row add segments in a wave form as indicated in the illustration for . One can directly verify that the family of segments is triangle-free, and all the black points are indeed blocked by the configuration. There are line segments and blocked points, i.e., is admissible for every . This implies for of the form , one has . For that is not of the form , one may consider the for which . For such , one also has is admissible because trivially is non-decreasing. Hence, the claimed lower bound holds for every .
We remark that the elegant construction in Figure 3 comes from dogged work of trial and error based on the observation of the smaller configuration in Figure 1.
3.2 Implication for Greedy
Theorem 1.2 together with Proposition 3.1 immediately yields the following.
Theorem 3.2. The asymptotic competitive ratio of Greedy for the online triangle-free-crossing matching is at most 2/3.
3.3 Two-layer-Greedy
In this section we introduce a simple deterministic two-layer-Greedy algorithm that achieves an asymptotic competitive ratio of for online triangle-free-crossing matching. The idea is to maintain a partition in which each layer is noncrossing. When an online point arrives, it scans the earlier unmatched points in arrival order. If the scan finds a point such that is noncrossing within , it matches and and adds to . Otherwise, it performs the same process for . If neither scan succeeds, it leaves unmatched. Since both and are noncrossing, is bipartite and therefore triangle-free.
Theorem 3.3. The asymptotic competitive ratio of the two-layer-Greedy is exactly 4/5.
Proof. Let be its unmatched point set, put , and write and . By the property of the two-layer-Greedy, each layer blocks with respect to the noncrossing property. Applying Proposition 2.2 with separately to the two layers gives for . Since , a direct simple calculation gives the lower bound.
To see the tightness, consider the following construction. Let be a noncrossing family of segments blocking a set of points. By Proposition 2.2, such a configuration exists. Now, rotate each segment of slightly about its own midpoint, with the rotations sufficiently small to preserve all required and forbidden crossings, to obtain another configuration . Clearly, is also noncrossing, and by the construction, a segment necessarily intersects its counterpart , and does not intersect any other segment in both and . In other words, is triangle-free-crossing. Clearly, also blocks (under the noncrossing property). Now, we claim that as a triangle-free-crossing family blocks under the triangle-free-crossing property. Indeed, any two points necessarily intersect a segment , and hence will also intersect the segment because is only a small perturbation of , and we know segment and are intersecting, hence, and and form a triangle. Since and , this proves the asymptotic upper bound.
3.4 Vertex cover number and explicit constructions for small Ramsey numbers
We proved a lower bound for by an explicit construction in Section 3.1. Below we provide another possible route that is via the vertex cover number of a graph; this also leads to an interesting possible connection to Ramsey theory. These connections might become more essential when one considers a generalization of the triangle-free-crossing matching, such as online -free-crossing matching for . In such a case, an explicit construction like in Figure 3 might become much harder.
Let denote a triangle-free-crossing family of line segments. Let denote the size of a minimum vertex cover of the associated graph . Let
Conjecture 3.4. For every , .
A stronger conjecture might be true: for every triangle-free-crossing family of line segments, . Our lower bound in Proposition 3.1 implies Conjecture 3.4 holds asymptotically.
Theorem 3.5. Conjecture 3.4 holds for sufficiently large .
Proof. Since every triangle-free graph on vertices has an independent set of size (see, e.g., [Kim95]), by Proposition 3.1, for sufficiently large we have, .
One reason to consider the graph parameter is that results from there can be applied to help study the Greedy algorithm. Indeed, Walczak [Wal15] constructed a triangle-free family of line segments for which , where denotes the size of a maximum independent set. Hence, . If Conjecture 3.4 were true, then, , which is also sufficient to imply Theorem 3.2.
Having established Conjecture 3.4 for large , it remains to check it for small . Below, we give explicit constructions for cases corresponding to some Ramsey numbers, all supporting Conjecture 3.4.
The Ramsey number is the minimum integer such that every red-blue coloring of the edges of contains either a red clique or a blue clique . Alternatively, if a graph on vertices is -free, then it must contain an independent set of size at least . We will mainly be interested in . By the Ramsey property, for , we have . This simple bound for is the reason we choose as our target family size.
Table 1 is the current knowledge of for , see [Rad26]. The case for is still undetermined, , see [Ang25]. We will establish the lower bound for in Table 1, thus establishing the following.
Table 1: for .
| t | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
|---|---|---|---|---|---|---|---|---|---|
| 6 | 9 | 14 | 18 | 23 | 28 | 36 | 40? | 41? | |
| 3 | 5 | 9 | 12 | 16 | 20 | 27 | 30 or 31 | 31 | |
| 4 | 7 | 11 | 14 | 18 | 22 | 28 | 31 | 32 | |
Theorem 3.6. Conjecture 3.4 holds for for .
The constructions will use some simple gadgets in Figure 4, i.e., the admissible small gadgets (3, 2), (4, 3), (5, 4), and (8, 6). One can see that (8, 6) is the merge of (3, 2) and (5, 4).

(3,2)
(4,3)
(5,4)

(8,6)
Figure 4: Admissible small gadgets used in constructions
The case In this case, . Since is admissible as shown in Figure 4, is also admissible.
The case In this case, . Figure 4 shows (8,6) is admissible, hence (9,6) is also admissible. We give a better construction in Figure 5 showing that (9,7) is admissible. One can directly check that the construction is triangle-free. Note that the construction can be viewed as merging (4,3) and (5,4), while removing one cross of blue segments in (4,3) to be triangle-free.

(9,7)
Figure 5: 9 segments block 7 points.
The case In this case, . In Figure 6, the first red and blue block gives a construction that merges (5,4) and (8,6), which results in an admissible pair , hence (14,10) is also admissible. One can directly verify that this construction in Figure 6 is triangle-free and all the points are indeed blocked. In fact, (14,11) is also admissible as shown in Figure 7, which is obtained by adding the green segment and the green blocked point in the (13,10) construction.
Furthermore, Figure 6 shows that the admissible pair can copy itself, i.e., is admissible for all .

Figure 6: Admissible pairs .
The case In this case, . Note that in Figure 6, one can choose the part , as desired.

(14, 11)
(23, 18)
Figure 7: Left: 14 segments block 11 points. Right: 23 segments block 18 points.
The case In this case, . On the right of Figure 7, we merge the construction in Figure 5 and the left of Figure 7. One can check this construction is triangle-free and all the points are indeed blocked. Hence, is admissible.
The case In this case, . Firstly, we have that is admissible. Based on this construction, one can add two segments, adding two blocked points, as shown in Figure 8. Hence, (28,22) is admissible. Note that one green segment and point are added to the red block (5,4), while the other green segment and point are added to the blue block (8,6).

(28, 22)
Figure 8: 28 segments block 22 points.
The case In this case, . Firstly, we have that is admissible. We can remove a from it and get that is admissible, as follows. Consider the construction in Figure 6. In the first red block on the left, remove the horizontal segment, the left vertical segment, and the left slanted segment, and remove the leftmost red point and the bottom red point. Observe that the remaining configuration is still a correct construction.
The case In this case, .
Consider . Since , we know . Firstly, we have that is admissible. Similarly, as in Figure 8, we can add two green segments and two green blocked points, which gives that is admissible.
Consider now . If , then . If , then there exists some triangle-free graph on 40 vertices that does not contain an independent set of size 10 (but does contain an independent set of size 9 since ), hence, . In both cases, we have . The construction for admissible (41,32) implies that (40,31) is also admissible.
4 Randomized algorithms in the noncrossing model
We now turn to the noncrossing model, that is, the case k = 0 of the k-crossing model, and revisit upper and lower bounds of randomized algorithms.
4.1 An asymmetric randomized algorithm
Without loss of generality we assume all online points lie in a big rectangular region. Our algorithm maintains a partition into convex regions. A region is partitioned into smaller sub-regions when a line segment appears (as a result of matching two online points inside this region): extend the segment in both directions until it hits the boundary of the region. Each region has type A or B, and the root region (the big rectangle) has type A. For type-T, associate a probability distribution , whose meaning will be explained shortly, and whose values will be determined later.
An inherited unmatched point, if present, is the first point of the new region. Let be the first four points assigned to a type-T region. The local rule is as follows. For notation simplicity, we say match to mean match the point to .
-
At the arrival of , match with probability .
-
If is not matched, then at the arrival of match or , each with probability .
-
Suppose one segment among has been matched and u is the remaining point. At the arrival of , match deterministically when it does not cross the existing segment.
-
If no segment has been matched before , match deterministically to a point so that it separates the two unmatched points on different sides.
Now, the intuitive meaning of the distribution should be clear: are respectively the probabilities that segments are matched, and is the probability that none of them is matched.
There are two outcomes of the four points, see an illustration in Figure 9. A single-pair outcome leaves two points on opposite sides of the supporting line of the matched segment; the two sub-regions are assigned type B. A double-pair outcome matches all four points, resulting in three sub-regions that are assigned type A. The algorithm then repeats the above rules in each sub-region, using independent random bits. Clearly, the algorithm correctly outputs a noncrossing matching.

(a) Single-pair

(b) Double-pair
Figure 9: The recursive partition rule. Dashed segments indicate the extensions used as new boundaries.
Our algorithm can be viewed as an asymmetric version of Kamali, Nikbakht, and Sajadpour [KNS22]: in their algorithm the sub-region has no type and y and z are equal; specifically, their algorithm uses uniform probability and . The new aspects of our algorithm are that we let the probability depend on the types of sub-regions depending on whether a single-pair or a double-pair has been matched, and secondly, we allow y and z to be unequal. The analysis of the performance of the algorithm follows similar steps as in [KNS22]. For completeness, we give the details of the algorithm and its analysis.
4.1.1 A structure lemma
For the analysis, we say a single-pair outcome is good if both children (i.e., the sub-regions) contain at least two points, including their inherited points. A double-pair outcome is good if at least one of its three children is empty. Otherwise, we say they are bad. For a type-T region, we call the event that is matched the -branch, and we call the events that and are matched the two -branches. The remaining event, in which no segment is matched before , is the -branch. These four branches have probabilities , , , , respectively.

(a) is interior

(b) is interior
Figure 10: The two triangular-hull cases. Unlabeled points represent later points. A bad double pair supplies, in particular, the two depicted later-point witnesses on opposite sides of the dashed line, making the corresponding single pair good.

(a) The two diagonal single pairs

(b) The complementary pair is good
Figure 11: The convex-position case. Unlabeled points represent later points. If both diagonal single pairs are bad, all later points lie in one quarter-plane (shaded), so the complementary boundary pairing is a good double pair.
Lemma 4.1. For the first four points of a region, the following cases exhaust all possibilities.
(1) The -branch always produces a single-pair outcome.
(2) If the convex hull of the four points is a triangle, the -branch and both -branches produce double-pair outcomes. Moreover, either the -branch is a good single-pair outcome or one of the other three branches is a good double-pair outcome.
(3) If the four points are in convex position, exactly one among the -branch and the two -branches produces a single-pair outcome. Either this branch or the -branch is a good single-pair outcome, or one of the other two branches is a good double-pair outcome.
Proof. (1) In the -branch, no segment is matched among . The last step of the local rule matches exactly one segment incident to , so this branch always produces a single pair.
(2) Suppose first that the convex hull of the four points is a triangle. Then, every perfect pairing is noncrossing. Hence, the -branch and both -branches produce double pairs. Let be the segment selected in the -branch, where . Its supporting line separates and , and the branch whose first segment is completes its matching with . Figure 10 uses the representative labeling : panel (a) shows the case in which is the interior point, while panel (b) shows, up to symmetry, the case in which an earlier point, represented by , is interior.
If this double pair is good, the claim follows. Otherwise, each of its three children contains a later point. In particular, a later point lies on each side of the dashed supporting line of e, as illustrated in both panels of Figure 10. Each side also contains one of the unmatched points , inherited by the single-pair outcome e. Therefore, both children of this single pair have size at least two, and the -branch is good.
(3) Suppose now that the four points are in convex position and are labeled as in Figure 11. Exactly one of the three perfect pairings crosses. Therefore, exactly one among the -branch and the two -branches produces only one pair. The two single pairs are the diagonals and , shown dashed in Figure 11(a).
If either diagonal single pair is good, the claim follows. If both are bad, all later points lie in one open quarter-plane determined by their supporting lines. After a reflection if necessary, this is the shaded quarter-plane in Figure 11(b). One of the two boundary pairings has a child outside this quarter-plane; the illustrated pairing is . That child contains no later point and is therefore empty. Hence, the corresponding branch is a good double-pair outcome.
4.1.2 The optimization problem
For , let be the supremum, over all fixed r-point inputs assigned to a type-T region, of the expected number of unmatched points. An inherited unmatched point, when present, is included in this count. We set . For example, and . The goal is to find constants , preferably small , such that
We will first describe sufficient constraints on the variables and for , then we show that a specific choice of numerical values for these variables gives the improved performance of our algorithm.
(A) The constraints on distributions.
We require the probability variables to satisfy
Here, we require for easier analysis. In particular, this condition implies that every branch that matches a segment before has probability at least . Among these three branches, at most one produces a single-pair outcome. Thus, at least two produce double-pair outcomes, and their total probability is at least .
(B) The constraints on the first seven points.
We already saw and . On a three-point input, an earlier segment is matched with probability , leaving one point unmatched, whereas the -branch leaves all three points unmatched. Hence,
For four points, let denote the probability of a double-pair outcome. At most one of the three branches that matches a segment before can correspond to the crossing perfect pairing. Since each of the other two branches has probability at least , we have . Consequently,
Since a single-pair outcome creates type-B children, define
Thus, for . Introduce auxiliary variables satisfying
We next calculate the bounds for five, six, and seven points. For five points, a single-pair outcome has two type-B children of sizes , so its cost (i.e., expected unmatched points) is at most . A double-pair outcome matches four points and leaves one point unmatched, so its cost is one. Using and , we obtain
For six points, the two type-B child sizes of a single-pair outcome sum to four. The possible patterns are and , whose costs are at most and , respectively. Thus, the single-pair cost is at most . The three type-A child sizes of a double-pair outcome sum to two, so the possible nonzero patterns are and , both of cost at most two. Moreover, . Therefore,
For seven points, the two type-B child sizes of a single-pair outcome sum to five. The possible patterns are and , whose costs are at most and , respectively. Thus, the single-pair cost is at most . For a double-pair outcome, the three type-A child sizes sum to three. Its possible patterns are , , , and their costs are at most , , , respectively. Hence, a double-pair outcome costs at most three, and either kind of outcome costs at most . The -branch, of probability , always produces a single-pair outcome and therefore costs at most . Every other branch, of total probability , costs at most . Consequently,
Combining these calculations with (2), we impose the following six base inequalities for each :
(6)
For the remaining constraints, fix and suppose that (2) holds for both types at every smaller argument of size at least two.
(C) The constraints on single-pair outcomes
A single-pair outcome has two positive type-B child sizes summing to . If the outcome is bad, one child has size one and the other has size . Using and the inductive hypothesis for the other child gives . If the outcome is good, let its child sizes be , where . Applying the inductive hypothesis to both children gives . Accordingly, define the bad and good single-pair intercepts by
(D) The constraints on double-pair outcomes
A double-pair outcome has three type-A child sizes summing to . A bad double-pair outcome has no empty child. We distinguish the possible numbers of singleton children.
If there are two singleton children, the third child has size , and the cost is at most . If there is exactly one singleton child, the other two children have sizes with . Their total cost is at most . If there is no singleton child, all three child sizes are at least two and sum to . Thus, . We therefore introduce satisfying
A good double-pair outcome has at least one empty child. If two children are empty, the remaining child has size , and its cost is at most . If exactly one child is empty and one of the remaining children is a singleton, the last child has size , and the cost is at most . Finally, if exactly one child is empty and the other two have sizes with , then . We therefore introduce satisfying
(E) The ordering constraints.
We impose
This ordering also lets us replace the probability of a favorable branch by its lower bound : the remaining probability can be assigned to the more expensive category , producing a valid upper bound.
(F) The recurrence constraints
We now translate the structured alternatives in Theorem 4.1 into constraints. In every calculation below, the coefficients of cr sum to one, so the common term is exactly cr.
First, suppose that the four points have a triangular convex hull and the -branch is a good single-pair outcome. Every other branch is a double-pair outcome, which we upper-bound as bad. The expected cost is at most
Second, suppose that the triangular-hull -branch is bad. By Theorem 4.1, some other branch is a good double-pair outcome. Let be the probability of such a branch. Charging all remaining branches as bad double pairs gives
where the inequality follows from and .
Third, suppose that the four points are in convex position and the -branch is a good single-pair outcome. Let be the probability of the unique other single-pair branch. Charging that branch as bad and the two remaining branches as bad double pairs gives
where we use .
Fourth, suppose that the unique non- single-pair branch is good, while the -branch is bad. If the good branch has probability , then
where we use .
Finally, suppose that both single-pair outcomes are bad and some double-pair branch is good. Let be the probability of the non- single-pair branch and let be the probability of a good double-pair branch. Then the expected cost is at most
The last inequality follows from , , and .
Consequently, for each , we impose the five recurrence inequalities
All coefficients in (11) are nonnegative by constraint set (A).
A tuple
is called feasible if it satisfies the constraint sets (A)–(F) above. The optimization problem is to minimize c over all feasible tuples.
Proposition 4.2. Every feasible tuple satisfies , for and .
Proof. The calculations in constraint set (B), together with the six base inequalities in (6), prove the assertion for both types and every .
Now let and assume simultaneously that the assertion holds for both types at every smaller argument of size at least two. By the calculations in constraint sets (C) and (D), a bad single-pair, good single-pair, bad double-pair, and good double-pair outcome has expected cost at most
respectively. The exact cost of every singleton child has already been included in these expressions.
By Theorem 4.1, every configuration satisfies one of the five alternatives calculated in constraint set (F). For the applicable index , (11) gives . Hence, .
Theorem 4.3. The asymmetric randomized algorithm proposed in Section 4.1 has an asymptotic competitive ratio
Proof. Choose the probability parameters
| T | |||
|---|---|---|---|
| A | 193567 | 40101 | 13241 |
| 500000 | 200000 | 62500 | |
| B | 37163 | 25337 | |
| 250000 | 125000 |
(12)
and choose
For the auxiliary variables, take
One can directly verify that these values satisfy all the constraints in (A)-(F). Thus, they form a feasible tuple. Proposition 4.2 then finishes the proof.
□
4.2 A 6/7 upper bound for randomized algorithms
Theorem 4.4. No randomized online algorithm for noncrossing matching has asymptotic competitive ratio greater than 6/7. This holds even when all input points lie on one circle.
Proof. We apply Yao's principle; the task is to construct an oblivious random input with all points on a circle. Let be even. Place seed points clockwise on a circle and reveal them first in that order. With probability , these are all the points, and with probability , the points will be extended randomly as follows. For each open circular arc from to , independently toss a fair bit . If , place one point in . Reveal successively.
Fix a deterministic algorithm and suppose it matches segments on the seed points. The noncrossing chords divide the disk into regions, which we call faces. Every face contains at least one open arc . Now, with probability , the instance has ended and the algorithm has unmatched points. With probability , the instance continues with random points . We will show the following
Claim: at the end of the instance, every face contains in expectation at least unmatched points.
Assume the Claim. By linearity of expectation, the number of unmatched points is in expectation at least . Hence, overall, the expected number of unmatched points is at least . Since the expected number of online points is , and OPT can match all of them (let us ignore the parity issue which is insignificant to the analysis), the number of unmatched points is at least asymptotically as claimed.
It remains to prove the Claim. For a face , let be its number of unmatched seed points and let be its nonempty set of boundary-arc indices. Hence, the number of points available for further matching in is . Observe that this number is even or odd with equal probability. In the case when it is odd, trivially, at least one point cannot be matched. This proves the Claim.
5 Open problems
Our work leaves many problems open. We list, in particular, the following:
-
For online k-crossing matching with , is there a deterministic algorithm with asymptotic competitive ratio strictly greater than 2/3?
-
For online triangle-free-crossing matching, does Greedy have asymptotic competitive ratio at least 2/3? We believe it does. This is equivalent to the following.
Conjecture 5.1. For every , .
Perhaps the more general version of is also worth studying, such as when is the -free property, i.e., no line segments pairwise crossing.
• Prove or disprove Conjecture 3.4.
- Is there a deeper connection between and ? An interesting feature of our constructions in Section 3.4 is that larger constructions share simpler admissible gadgets, essentially only those listed in Figure 4, of size 3, 4, 5, 8, respectively. Incidentally, the gaps between Ramsey numbers also satisfy for (either or 41). Is this a coincidence?
This also points to the question of better understanding of the sequence of Ramsey gaps . By Kim [Kim95], , hence, the Ramsey gap has average of order . Is there any pattern for the sequence , and does it connect to a possible sequence of basic building blocks (e.g., those admissible simple gadgets) in our geometric problem? One may also ask the Ramsey gap problem for general Ramsey numbers.
- For online noncrossing matching, what is the optimal competitive ratio of randomized algorithms?
Declaration of AI Usage
No AI tool is used for the proposal of the model and analysis of the results for matching with limited crosses, i.e., Section 2 and Section 3.
The AI Tool ChatGPT is used to develop the results in Section 4. Initially, AI's solution and presentation for Section 4.1 are filled with optimization with specific numerical numbers. The authors have changed the presentation to its current form: a structure lemma followed by the optimization problem with a clear separation of different groups of constraints, and replaced specific numerical values by variables. We hope this facilitates the understanding. The authors have verified the proofs and take full responsibility for the contents of this article.
Acknowledgment. The authors thank the reviewers' advice that helps improve the presentation.
References
[AAB 15] Greg Aloupis, Esther M. Arkin, David Bremner, Erik D. Demaine, Sándor P. Fekete, Bahram Kouhestani, and Joseph S. B. Mitchell. Matching regions in the plane using non-crossing segments. XVI Spanish Meeting on Computational Geometry, 2015.
[AACKT14] A. Karim Abu-Affash, Paz Carmi, Matthew J. Katz, and Yohai Trabelsi. Bottleneck non-crossing matching in the plane. Computational Geometry, 47(3):447–457, 2014.
[ABD 09] Oswin Aichholzer, Sergey Bereg, Adrian Dumitrescu, Alfredo García, Clemens Huemer, Ferran Hurtado, Mikio Kano, Alberto Márquez, David Rappaport, Shakhar Smorodinsky, Diane Souvaine, Jorge Urrutia, and David R. Wood. Compatible geometric matchings. Computational Geometry, 42(6-7):617–626, 2009.
[ACFM 10] Oswin Aichholzer, Sergio Cabello, Ruy Fabila-Monroy, David Flores-Penaloza, Thomas Hackl, Clemens Huemer, Ferran Hurtado, and David R. Wood. Edge-removal and non-crossing configurations in geometric graphs. Discrete Mathematics & Theoretical Computer Science, 12(1), 2010.
[AFMK 23] Oswin Aichholzer, Ruy Fabila-Monroy, Philipp Kindermann, Irene Parada, Rosna Paul, Daniel Perz, Patrick Schnider, and Birgit Vogtenhuber. Perfect matchings with crossings. Algorithmica, pages 1–20, 2023.
[Ang25] Vigleik Angeltveit. . The Electronic Journal of Combinatorics, 32(4):P4.30, 2025.
[ARS93] Noga Alon, Sridhar Rajagopalan, and Subhash Suri. Long non-crossing configurations in the plane. In 9th Annual Symposium on Computational Geometry (SoCG), pages 257–263, 1993.
[AST13] Drew Armstrong, Christian Stump, and Hugh Thomas. A uniform bijection between nonnesting and noncrossing partitions. Transactions of the American Mathematical Society, 365(8):4121–4151, 2013.
[Ata85] Mikhail J. Atallah. A matching problem in the plane. Journal of Computer and System Sciences, 31(1):63–70, 1985.
[BCD 20] Prosenjit Bose, Paz Carmi, Stephane Durocher, Shahin Kamali, and Arezoo Sajadpour. Non-crossing matching of online points. In 32nd Canadian Conference on Computational Geometry (CCCG), pages 233–239, 2020.
[BKL 26] Joan Boyar, Shahin Kamali, Kim S Larsen, Ali Mohammad Lavasani, Yaqiao Li, and Denis Pankratov. On the online weighted non-crossing matching problem. Information and Computation, page 105440, 2026.
[BMR95] Vineet Bafna, S. Muthukrishnan, and R. Ravi. Computing similarity between rna strings. In 6th Annual Symposium on Combinatorial Pattern Matching (CPM), volume 937 of Lecture Notes in Computer Science, pages 1–16. Springer, 1995.
[BPS05] József Balogh, Boris Pittel, and Gelasio Salazar. Near-perfect non-crossing harmonic matchings in randomly labeled points on a circle. Discrete Mathematics & Theoretical Computer Science Proceedings, AD:17–26, 2005.
[CHR09] William Y. C. Chen, Hillary S. W. Han, and Christian M. Reidys. Random k-noncrossing rna structures. Proceedings of the National Academy of Sciences, 106(52):22061–22066, 2009.
[Coh99] Scott Cohen. Finding color and shape patterns in images. PhD dissertation, Stanford University, 1999.
[DS00] Adrian Dumitrescu and William Steiger. On a matching problem in the plane. Discrete Mathematics, 211(1-3):183–195, 2000.
[Gyá11] András Gyárfás. Ramsey and turán-type problems for non-crossing subgraphs of bipartite geometric graphs. In Annales Univ. Sci. Budapest, volume 54, pages 47–56, 2011.
[HMO21] Koki Hamada, Shuichi Miyazaki, and Kazuya Okamoto. Strongly stable and maximum weakly stable noncrossing matchings. Algorithmica, 83(9):2678–2696, 2021.
[HS92] John Hershberger and Subhash Suri. Applications of a semi-dynamic convex hull algorithm. BIT Numerical Mathematics, 32(2):249–267, 1992.
[HS97] John Hershberger and Subhash Suri. Efficient breakout routing in printed circuit boards. In 5th International Workshop on Algorithms and Data Structures (WADS), volume 1272 of Lecture Notes in Computer Science, pages 462–471. Springer, 1997.
[HTW24] Zhiyi Huang, Zhihao Gavin Tang, and David Wajc. Online matching: A brief survey. ACM SIGecom Exchanges, 22(1):135–158, 2024.
[Kim95] Jeong Han Kim. The ramsey number r (3, t) has order of magnitude t2/log t. Random Structures & Algorithms, 7(3):173–207, 1995.
[KNS22] Shahin Kamali, Pooya Nikbakht, and Arezoo Sajadpour. A randomized algorithm for non-crossing matching of online points. In 34th Canadian Conference on Computational Geometry (CCCG), pages 198–204, 2022.
[KS11] Marcos Kiwi and José A Soto. Generalizations and variants of the largest non-crossing matching problem in random bipartite graphs. arXiv preprint arXiv:1105.0474, 2011.
[MMN22] Neeldhara Misra, Harshil Mittal, and Saraswati Nanoti. Diverse non-crossing matchings. In 34th Canadian Conference on Computational Geometry (CCCG), pages 249–256, 2022.
[MP23] Ali Mohammad Lavasani and Denis Pankratov. Advice complexity of online non-crossing matching. Computational Geometry, 110:101943, 2023.
[MSS24] Ioannis Mantas, Marko Savić, and Hendrik Schrezenmaier. New variants of perfect non-crossing matchings. Discrete Applied Mathematics, 343:1–14, 2024.
[PPS22] Rebecca Patrias, Oliver Pechenik, and Jessica Striker. A web basis of invariant polynomials from noncrossing partitions. Advances in Mathematics, 408:108603, 2022.
[PRT19] János Pach, Natan Rubin, and Gábor Tardos. Planar point sets determine many pairwise crossing segments. In 51st Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 1158–1166, 2019.
[Rad26] Stanisław Radziszowski. Small Ramsey numbers. The Electronic Journal of Combinatorics, page DS1, 2026. Dynamic Survey, revision 18, April 24, 2026.
[Rap02] David Rappaport. Tight bounds for visibility matching of f-equal width objects. In Japanese Conference on Discrete and Computational Geometry, pages 246–250. Springer, 2002.
[RI19] Suthee Ruangwises and Toshiya Itoh. Stable noncrossing matchings. In International Workshop on Combinatorial Algorithms (IWOCA), volume 11638 of Lecture Notes in Computer Science, pages 405–416. Springer, 2019.
[Saj21] Arezoo Sajadpour. Non-crossing matching of online points. Master's thesis, University of Manitoba, 2021.
[Sav09] David Savitt. Polynomials, meanders, and paths in the lattice of noncrossing partitions. Transactions of the American Mathematical Society, 361(6):3083–3107, 2009.
[SU11] Toshinori Sakai and Jorge Urrutia. Heavy non-crossing increasing paths and matchings on point sets. In XIV Spanish Meeting on Computational Geometry, pages 209–212, 2011.
[Szi07] András Szilárd. Elementary Combinatorial Geometry: Problems and Solutions. GILPublishing House, 2007.
[Vla13] Alexander A Vladimirov. Non-crossing matchings. Problems of Information Transmission, 49(1):54–57, 2013.
[Wal15] Bartosz Walczak. Triangle-free geometric intersection graphs with no large independent sets. Discrete & Computational Geometry, 53:221–225, 2015.