Skip to main content
Springer logoLink to Springer
. 2023 Jul 18;86(3):697–716. doi: 10.1007/s00453-023-01147-7

Perfect Matchings with Crossings

Oswin Aichholzer 1, Ruy Fabila-Monroy 2, Philipp Kindermann 3, Irene Parada 4, Rosna Paul 1,, Daniel Perz 1, Patrick Schnider 5, Birgit Vogtenhuber 1
PMCID: PMC10927806  PMID: 38481794

Abstract

For sets of n points, n even, in general position in the plane, we consider straight-line drawings of perfect matchings on them. It is well known that such sets admit at least Cn/2 different plane perfect matchings, where Cn/2 is the n/2-th Catalan number. Generalizing this result we are interested in the number of drawings of perfect matchings which have k crossings. We show the following results. (1) For every k164n2-3532nn+122564n, any set with n points, n sufficiently large, admits a perfect matching with exactly k crossings. (2) There exist sets of n points where every perfect matching has at most 572n2-n4 crossings. (3) The number of perfect matchings with at most k crossings is superexponential in n if k is superlinear in n. (4) Point sets in convex position minimize the number of perfect matchings with at most k crossings for k=0,1,2, and maximize the number of perfect matchings with n/22 crossings and with n/22-1 crossings.

Keywords: Perfect matchings, Crossings, Geometric graphs, Combinatorial geometry, Order types

Introduction

The question of how many different plane (that is, crossing-free) straight-line perfect matchings can be drawn on a point set P in general position (that is, no three points are colinear) has been extensively studied; see for example [37]. It is known that n=2m points in general position admit at least Cm plane perfect matchings, where Cm=1m+12mm2Θ(n) is the m-th Catalan number. This bound is tight, as point sets of size n in convex position (for short, convex point sets) allow exactly Cn/2=Cm plane straight-line perfect matchings, and (almost) all other point sets allow strictly more [3, 5]. On the other hand, the number of plane straight-line perfect matchings of any set of n points is bounded from above by O(10.05n) [6]. Finally, there exist point sets which allow Ω(3.09n) plane straight-line perfect matchings [4].

If we allow crossings, then we can draw every possible perfect matching. On n vertices there exist (n-1)!!2Θ(nlogn) such matchings [8], each having at most n/22O(n2) crossings. Given n, the question of the existence of perfect matchings with exactly μ=n/22 crossings belongs to an active area of research around the so-called crossing family problem (see for example [9, 10]). A crossing family of a point set is a set of pairwise crossing straight-line edges spanned by the point set. Only recently, it was shown that any set of n points in general position contains a crossing family of almost linear size, more precisely, of size n1-o(1) [11]. This was the first substantial improvement after 25 years. The previously best known bound was n/12, published in 1994 [9]. As a related result, Pach and Solymosi [12] gave a complete characterization of point sets admitting a perfect crossing family, that is, a perfect matching of pairwise crossing edges. If we restrict considerations to convex point sets, there are several results on the distribution of crossings over all perfect matchings; see for example [1315]. However, not much is known about the existence or number of straight-line perfect matchings with k crossings for 0<k<μ. In this work, we make a substantial step towards filling this gap.

We analyze the number of straight-line perfect matchings with exactly or at most k crossings that a point set can admit. All considered point sets are in general position and have an even number of points. Additionally, we also assume that no two points lie on the same vertical or horizontal line. For brevity, we will from now on mostly omit the term straight-line. Further, k-crossing matchings and (k)-crossing matchings refer to perfect matchings with exactly k and at most k crossings, respectively.

We denote by pmk(P) the number of k-crossing matchings on a point set P, by pmkmax(n) the maximum of pmk(P), taken over all sets P of n points, and by pmkmin(n) the minimum of pmk(P), also taken over all sets P of n points. Similarly, we denote with pmk(P) the number of (k)-crossing matchings on a point set P and define pmkmax(n) and pmkmin(n) analogously as before. Finally, pmkconv(n) is the number of k-crossing matchings on a set of n points in convex position.

Contribution. We start by investigating matchings with exactly k crossings in Sect. 2. There we prove that for every k164n2-3532nn+122564n, any set of n points with n sufficiently large admits a perfect matching with exactly k crossings (Theorem 1) and that there exist sets of n points where every perfect matching has at most 572n2-n4 crossings (Theorem 2). We also investigate point sets where the possible numbers of crossings in perfect matchings are not consecutive. In Sect. 3 we then consider matchings with at most k crossings. We show that the number of perfect matchings with at most k crossings is superexponential in n if k is superlinear in n (Theorem 3), but only exponential if k is in O(nlogn) (Corollary 1). Finally, in Sect. 4, we show that convex point sets are extremal in several aspects. More specifically, we show that convex point sets minimize the number of perfect matchings with at most k crossings for k=0,1,2 (Theorem 8), and maximize the number of perfect matchings with μ crossings and with μ-1 crossings (Theorem 7).

Perfect Matchings with Exactly k Crossings

In this section, we show that every set P of n points (with n sufficiently large) admits a k-crossing matching for every 0k164n2-3532nn+122564n, while this is not the case for k>5n272-n4.

For even values of n10, we have computed the numbers of perfect matchings with k crossings for all combinatorially different sets of n points using the order type data base; see [16] for details on order types. Table 1 lists the obtained numbers for sets of n=6,8, and 10 points, from 0 up to the maximum number of n/22 crossings. We obtain the following observation.

Table 1.

Numbers of k-crossing matchings for n=6,8,10 points

n=6 n=8 n=10
k min conv max k min conv max k min conv max
0 5 5 12 0 14 14 56 0 42 42 311
1 2 6 10 1 20 28 60 1 120 120 442
2 0 3 3 2 4 28 33 2 135 180 350
3 0 1 1 3 0 20 28 3 39 195 308
4 0 10 10 4 0 165 165
5 0 4 4 5 0 117 117
6 0 1 1 6 0 70 72
7 0 35 35
8 0 15 15
9 0 5 5
10 0 1 1

For each number k of crossings, we display the minimum number of k-crossing matchings, the number of k-crossing matchings in the convex situation, and the maximum number of k-crossing matchings

Observation 1

For any k3, every set of at least 10 points admits a k-crossing matching.

For sufficiently large values of n we obtain the following result:

Proposition 1

For any sufficiently large even value of n, every set P of n points admits a straight-line perfect matching with more than 7776164n2 crossings.

Proof

Consider the straight-line drawing of Kn on P. Let M be a random perfect matching of Kn chosen uniformly from the set of all perfect matchings of Kn. Let M¯ be the corresponding straight-line drawing of M on P. For every set T of 4 points in P, let XT be the indicator random variable that has value equal to 1 if a pair of crossing edges of M¯ has all four endpoints in T and 0 otherwise. Note that if T is not in convex position then XT=0. Let C be the set of subsets of P of four points in convex position. If TC, then the expected value of XT is equal to the probability that M contains the only two crossing edges with endpoints in T. Hence, E(XT)=1(n-1)(n-3). Let X be the number of pairs of edges of M¯ that cross. We have that

E(X)=ETCXT=TCE(XT)=|C|(n-1)(n-3).

Further, |C| is also equal to the number of pairs of edges of Kn that cross. The minimum number, cr¯(Kn), of pairs of edges that cross in any straight-line drawing of Kn is called the rectilinear crossing number of Kn. It is known that limncr¯(Kn)n4=q, for some positive constant q. Ábrego et al. [17] showed that q>0.379972. Thus, we have

E(X)qn4(n-1)(n-3)0.379972n(n-2)24>7776n264 1

for any sufficiently large value of n. The result follows.

We next show two technical lemmas which we afterwards use to prove in Theorem 1 that for sufficiently large n and any 0k164n2-3532nn+122564n, there always exists a perfect matching with k crossings.

Lemma 1

Let P be a point set with n points and let M be a perfect matching on P with cr(M) crossings. Let 0<kcr(M). Then P has a perfect matching M with k-n+3cr(M)k crossings.

Proof

Let M0:=M and let p0,,pn-1 be the points of P ordered from top to bottom. We obtain a matching Mi+1 from matching Mi as follows. If p2i is matched to p2i+1, then Mi+1=Mi. Otherwise, let q2i,q2i+1 be the points of P matched to p2i and p2i+1, respectively, in Mi. We replace the edges (p2i,q2i) and (p2i+1,q2i+1) by the edges (p2i,p2i+1) and (q2i,q2i+1). Note that the edges (p0,p1),,(p2i,p2i+1) have no crossing in Mi+1. Furthermore, the number of crossings of the edges (p2i,q2i) and (p2i+1,q2i+1) is at most n-2i-3 in Mi: in the worst case, each edge crosses all ((n-2i)/2)-1 other edges, but the crossing between (p2i+1,q2i+1) and (p2i,q2i) is counted twice. Hence, we have cr(Mi+1)cr(Mi)-n+2i+3cr(Mi)-n+3 and cr(Mn/2)=0. Then, the bound follows from choosing M=Mi+1 such that kcr(Mi+1)cr(Mi)-n+3k-n+3.

Lemma 2

For any sufficiently large even n and 0k9169n264, it holds that pmkmin(n)1.

Proof

Let n2:=10113n, and let Inline graphic if Inline graphic is even, or Inline graphic otherwise. Note that n1+n2n, since n is even. We linearly separate the point set P into a point set P1 consisting of the leftmost n1 points and a point set P2 consisting of the rightmost n2 points.

Let M1 be the matching of P1 with the largest number of crossings. Then, by Proposition 1, M1 has more than Inline graphic crossings, where the last inequality holds for n>1330.

By Lemma 1, P1 has a matching M1 with k-n1+3cr(M1)k crossings, which we aim to extend to a k-crossing matching of P. To achieve this, we need to add exactly =k-cr(M1) crossings during the completion. As k-cr(M1)n1-3, we have Inline graphic.

Next, we linearly separate P2 into 113n sets of 10 points each. By Observation 1, every set of 10 points can be matched such that the matching has 0, 1, 2, or 3 crossings. Thus, we can find a matching of P2 with exactly x crossings for every 0x3113n. Since 3113n313n-3, we can find a matching M2 of P2 with exactly crossings. By combining M2 and M1, we get a matching M=M1M2 of P with exactly cr(M)=cr(M1)+cr(M2)=k-+=k crossings. Finally, if n1+n2<n, we match the remaining points (which lie between P1 and P2) without additional crossings.

Theorem 1

For any sufficiently large even n and 0k164n2-3532nn+122564n, it holds that pmkmin(n)1.

Proof

We linearly separate the point set P into two parts; a point set P1 consisting of the leftmost n1=n-2·523n points and a point set P2 consisting of the rightmost n2=2·523n points. Note that n1 is even since n is even.

Let M1 be the matching of P1 with the largest number of crossings; then M1 has more than

7776164n12>164n-2·523n2(n > 1225)164n-1053n2164n2-3532nn+122564n

crossings by Proposition 1.

By Lemma 1, P1 has a matching M1 with k-(n-2·523n)+3=k-n1+3cr(M1)k crossings. Let =k-cr(M1)n-2·523n-3.

By Lemma 2, P2 has a matching with exactly x crossings for every 0x9169n2264.

Note that

9169n2264=9169·642·523n29169·16523n-12=n-9169·162·523n-1n-9169·162·523n+1n-2·523n-3.

Hence, there is a matching M2 of P2 with exactly crossings. This implies that there is a matching M=M1M2 of P with exactly cr(M)=cr(M1)+cr(M2)=k-+=k crossings.

Theorem 2

For any n(0mod6) and k>5n272-n4, it holds that pmkmin(n)=0.

Proof

For every n(0mod6), we consider a specific set of n points, see Fig. 1. We call it a windmill consisting of three wings. Each wing is a set of n/3 points forming a flat convex chain that is arranged along a ray from the center of the windmill, where the rays for the three wings pairwise span angles of 2π/3. The three wings are rotational symmetric copies of each other, and any line spanned by two points of one wing passes between the other two wings. We label the wings with indices 0,1, and 2 in counterclockwise order. In the following we consider all indices modulo 3. With Ii we denote the collection of interior matching edges of wing i, that is, edges that match two points of this wing. With Oi we denote the collection of outgoing matchings edges of wing i, that is, edges that match a point of wing i to wing i+1. Let ιi=|Ii| and oi=|Oi| denote the cardinalities of these sets.

Fig. 1.

Fig. 1

Illustration for the proof of Theorem 2: A point set P for which every perfect matching has 5n272-n4 crossings (left). Interior (I1) and outgoing (O0,O1) matching edges for wing 1 of P (right)

As we aim for an upper bound on the maximal possible number of crossings, we distribute the edges to maximize the crossings. We thus can assume that, for each wing i, the edges in Ii and Oi are arranged to maximize the possible crossings between them as well as within each of them (cf. the drawing on the right in Fig. 1). The number of crossings we can get this way is i=02ιi2+oi2+ιioi. So we have six parameters to maximize this sum. We get three equations for these parameters from the size of the wings, namely 2ιi+oi+oi-1=n3, i{1,2,3}. From this, we derive that oi=n6+ιi-1-ιi-ιi+1, and can thus express the number of crossings only using the numbers of interior matching edges, where 0ιin6. For the crossings formed by IiOi, this gives

ιi2+oi2+ιioi=ιi2+n6+ιi-1-ιi-ιi+12+ιin6+ιi-1-ιi-ιi+1=n272-n12+n6(ιi-1-ιi+1)+12ιi+1-ιi-1+ιi-12+ιi+12-ιi-1ιi+1.

Summing over all three wings gives n224-n4+ι02+ι12+ι22-ι0ι1-ι0ι2-ι1ι2 crossings.

By symmetry, we can assume w.l.o.g. that in the maximizing solution ι0ι1,ι2 holds. Then, under the additional condition that all ιi and oi have to be non-negative, the unique maximum is obtained for ι0=n6 and ι1=ι2=0. This results in n224-n4+n236=5n272-n4 crossings, which completes the proof.

Gaps in the Number of Crossings

The above two theorems provide bounds on k such that for every point set and every kk, the point set admits a k-crossing matching. Now we are focusing on a fixed set P of n points and analyze for which values of k there exists a k-crossing matching on P. For some point sets P, there exist perfect matchings with all possible numbers k of crossings from 0 to n/22. The following lemma states that this property holds for convex point sets.

Lemma 3

Every set of n points in convex position admits a k-crossing matching for every 0kμ=n/22.

Proof

Let P be a set of n points in convex position. Label the points in cyclic order from p1 to pn. A crossing family of size c is a set of c edges which pairwise cross and thus has c(c-1)2 crossings. Let c be the largest integer such that c(c-1)2k. To obtain k crossings in total observe that the number of crossings we still need to add to a crossing family of size c is x=k-c(c-1)2<c. We first construct the crossing family of size c by connecting the points pi and pc+i+1, for i{1,,x}, and by connecting the points pi and pc+i+2, for i{x+1,,c}. See Fig. 2 for a depiction. Next we connect points pc+1 and pc+x+2 which were not yet connected within the crossing family and contribute the remaining x crossings. Finally, we match all remaining points (if any, with indices 2c+3 to n) without crossings. Then M has in total k crossings as desired.

Fig. 2.

Fig. 2

Proof of Lemma 3: Matching with 42 crossings obtained from a crossing family of size c=9 plus x=6 extra crossings

In contrast to Lemma 3, Fig. 3 gives an example of a set P of 30 points, that has a perfect matching with 105 crossings but does not have a perfect matching with 104 and 103 crossings. We say that P has a gap between 102 and 105, as it does not have a perfect matching with 103 and 104 crossings. The following proposition is inspired by the example in Fig 3. In its proof, we construct an infinite family of point sets with large gaps.

Fig. 3.

Fig. 3

A set of 30 points with a perfect matching with 152=105 crossings, but with no perfect matching with k{103,104} crossings. This result is obtained by direct computation

Proposition 2

For infinitely many values of n, there exists a set of n points which admits a matching with μ=n/22 crossings, but does not admit a matching with μ-i crossings for any 1i14(4n+1-11).

Proof

We construct a point set Pg with n=4g2+6g+2 points, where g2 is an integer, as follows. Consider a regular n-gon centered at the origin with points p0,,pn-1. We consider all indices modulo n. Let Cε be a circle centered at origin and small enough such that no line spanned by pi and pn2+i±1 for 1in2 intersects Cε. For 0i2g, we push the points p(2g+2)·i onto Cε along the ray from the origin through p(2g+2)·i; see Fig. 3 for a depiction with g=2. Note that the points p(2g+2)·i with 0i2g form a regular (2g+1)-gon and are on Cε. The set Pg consists of those 2g+1 points plus the remaining n-2g-1 vertices of the regular n-gon we started with. Obviously, Pg spans a crossing family of size n2, formed by the edges (pi,pi+n2), 0i<n2, and hence admits a matching with μ crossings.

An edge connecting two points in Pg is called long if it connects two points on the boundary of the convex hull of Pg. Otherwise it is called short.

Claim

If M has a long edge (px,py) with pypx+n2, then M has at most μ-g+1 crossings.

Proof of Claim. We determine the maximal number of crossings of (px,py). To do this, we count the number of points in the half planes H1 and H2 defined by the line spanned by px and py. By construction, all points on Cε are in the half plane which contains more points of Pg, say H2. Let H be the open half plane with H1H that has the origin on its boundary (that is, the boundary of H is parallel to the line spanned by px and py). Note that H contains at most n2 points of Pg. Since the points on Cε form a regular (2g+1)-gon, every half plane with the origin on its boundary contains at least g points of Pg on Cε. Since H1H and H1Cε=, H1 has at most n2-g points. Hence, (px,py) has at most n2-g crossings.

The matching M\{(px,py)} has at most (n/2-1)(n/2-2)2=(n/2)2-3(n/2)+22 crossings. Hence, M has at most (n/2)2-3(n/2)+22+n2-g=μ-g+1 crossings.

We prove by contradiction that there exists no matching with μ-i crossings for any 1i<g-1. Assume that there exists a matching M with k crossings where μ-g+1<k<μ. The claim shows that all long edges of M are of the form (px,px+n2) if M has more than μ-g+1 crossings. Moreover, since there are 2g+1 points on Cε and 4g2+4g+1 points on the boundary of the convex hull of Pg, there are at least 2g2+g long edges of the form (px,px+n2). Since there are only 2g2+g long edges of the form (px,px+n2), all those long edges are forced for any matching with more than μ-g+1 crossings.

If there exists an edge of M between two points on Cε, then there exists another long edge of the form (px,py) with pypx+n2, by the pigeonhole principle. It follows from the claim that any matching containing an edge between two points on Cε has at most μ-g+1 crossings.

The remaining case is that every point on Cε is connected by a short matching edge to a point on the convex hull. Note that if M contains all short edges of the form (px,px+n2), pxCε, then M has exactly μ crossings. Hence M contains a short edge (px,py) with pxCε and y=x+n2±r for some 1r<n2. We consider py=px+n2+r (py=px+n2-r follows analogously). Since (px,px+n2) is a short edge and all long edges of the form (px,px+n2) were forced in M, r>2g+1. So the edge (px,py) does not cross any of the line segments (px+i,px+n2+i) with 1i2g+1. On the other hand, 2g of the line segments (px+i,px+n2+i) correspond to the forced long edges. So (px,py) has at most n2-2g crossings. Similar as above, it follows that M has at most μ-g+1 crossings, a contradiction.

Perfect Matchings with at Most k Crossings

We next show that if k is superlinear in n, then the number of (k)-crossing matchings is superexponential for every set of n points.

Theorem 3

For any kω(n), it holds that pmkmin(n)2Ω(nlog(kn)).

Proof

Let P be a set of n points. By our assumption on point sets, no two points of P have the same x-coordinate. Process the points from left to right and partition them into n2k groups Pi, with i=1,2,,n2k of the same even number of points (plus one additional group P if n is not an even multiple of the number of groups). More exactly, if kn is even, then each group is of size kn; otherwise it is of sizekn-1.

Consider first such a group Pi. As mentioned in the introduction, we can draw 2Θ(knlog(kn)) perfect matchings on Pi, and each of them has at most k/n2<k2n2 crossings. Now let M be an arbitrary but fixed plane matching of P. Then the number of perfect matchings where all edges are either within some Pi or in M is

2Θ(knlog(kn))(n2k)=2Θ(nlog(kn)). 2

Further, each such matching has at most n2k·k2n2k crossings. Hence the number of k-crossing matchings of P is bounded from below by 2Ω(nlog(kn)).

Note that for a (k)-crossing matching, at most 4k points can be incident to crossing edges. Hence, the next theorem implies the upper bound on pmkmax(n) as stated below in Corollary 1.

Theorem 4

For any set P of n points, n even, and 0xn, x even, let pmx(n) be the number of perfect matchings whose crossing edges are incident to at most x points. Then pmx(n)2O(n+xlogx).

Proof

Consider some subset PP of size x. We want to count the number of perfect matchings on P whose crossing edges are incident to points in P. There are 2Θ(xlogx) perfect matchings on P. We extend the matching on P to P by adding matching edges of P\P such that the matching on P\P is plane. As mentioned in the introduction, any point set in general position with n points, the number of plane perfect matchings is in O(10.05n)2O(n).

Thus there are at most 2O(n-x) plane perfect matchings on P\P. Note, however, that edges of the matching on P\P might intersect with edges from the matching on P. But as we are only interested in an upper bound of the number of matchings where all edges with intersections are incident to points in P, it is sufficient that these matchings are a subset of the matchings we consider in our construction. Finally, the choices for P are nx2n. Hence, we get pmx(n)2n·2Θ(xlogx)·2O(n-x)2O(n+xlogx).

Corollary 1

For any even n and any k, it holds that pmkmax(n) 2O(n+klogk).

For kΩ(n), this bound is worse than the trivial upper bound from the number of all perfect matchings. For kO(nlogn) we get a bound of 2O(n), which is asymptotically tight.

Points in Convex Position

In this section, we study the number pmkconv(n) of k-crossing matchings on a set of n points in convex position. Obviously, pmkmin(n) pmkconv(n) pmkmax(n). It is well known that convex sets minimize the number of plane perfect matchings; see for example [5, 18]. Hence, we have pm0min(n) = pm0conv(n). On the other hand, considering the maximum number μ=n/22 of crossings, we can show that for k{μ,μ-1}, convex sets maximize the number of different k-crossing matchings. Precisely, the maximum number of μ-crossing matchings and (μ-1)-crossing matchings are 1 and n/2, respectively. Moreover, all sets of n points achieving these maximum numbers have exactly n2 halving edges (edges that have n-22 points of the set on each side of their supporting line). We remark that, given n points, it is folklore that the minimum number of halving edges is n/2. The exact maximum number of halving edges is still unknown. The current best lower bound for the maximum number of halving edges on a point set of size n is Ω(neln4lnn/lnn) by Nivasch [19] and the current best upper bound is O(n4/3) by Dey [20].

Next we state two results of Pach and Solymosi (adapted to our notation) that gives the existence and number of μ-crossing matching w.r.t. the number of halving edges of the given point set.

Theorem 5

(Theorem 1, [12]) A set of n points, n even, in general position in the plane admits a perfect crossing family if and only if it has precisely n/2 halving edges.

Theorem 6

(Theorem 2, [12]) Any set of an even number of points in general position in the plane admits at most one perfect crossing family.

The following result is a consequence of Theorems 5 and 6.

Corollary 2

For any even n and μ=n/22, it holds that pmμconv(n)=pmμmax(n)=1.

Proof

Let P be a set of n points in convex position labelled in cyclic order from p0 to pn-1. By Theorem 5, a point set P admits a μ-crossing matching if and only if P has exactly n2 halving edges. Thus, we construct our matching M to entirely consist of halving edges by connecting the points pi and pn2+i, for i{0,,n2-1}. Then any two edges of M cross and hence M has μ crossings. This is the only possible μ-crossing matching, as Theorem 6 states that every set P of n points has at most one μ-crossing matching.

Theorem 7

For any even n6 and μ-1=n/22-1, the following three statements hold.

  1. pmμ-1conv(n)=pmμ-1max(n)=n2.

  2. Any set P of n points with exactly n2 halving edges has pmμ-1(P)n2.

  3. Any set P of n points with more than n2 halving edges has pmμ-1(P)2.

Proof

We will first show that any point set P with pmμ-1(P)1 either has exactly n2 halving edges or has more than n2 halving edges and pmμ-1(P)2. Then, to complete the proof, we will show that any point set P with exactly n2 halving edges has pmμ-1(P)n2 and that n2 is attained for convex point set.

Consider a set P of n points with pmμ-1(P)1 and a perfect matching M with μ-1 crossings on P. Then M contains exactly one non-crossing pair of edges, say e and f. There are two ways on how the endpoints of e and f can be arranged: they can be in convex position (e and f are essentially “parallel”) or one endpoint is in the interior of the convex hull of the other three endpoints (one edge is “stabbing” the other). In this second case we denote the unique endpoint of e and f that is inside the convex hull as pc.

Case 1: The endpoints of e and f are in convex position: In this case, we remove the edges e and f and add the diagonals of the convex quadrilateral defined by their endpoints to find a matching M with μ crossings. Since all other edges crossed e and f, they also cross the diagonals of this convex quadrilateral and thus the new edges. So we do not lose any crossing, but gain a crossing between e and f. Thus, by Theorem 5, the underlying point set has exactly n/2 different halving edges.

Case 2: The point pc is in the interior of the convex hull of e and f: We assume w.l.o.g. that e is horizontal and that pc is the left endpoint of e. Moreover, f is vertical and to the left of pc, and no other edges are horizontal or vertical; see Fig. 4 for an illustration. By the following claim, the underlying point set P has more than n/2 different halving edges.

Fig. 4.

Fig. 4

The case where the non-crossing edges e and f are in non-convex position

Claim

The point pc in the interior of the convex hull of e and f is incident to exactly 3 halving edges of P and all other points are incident to exactly one halving edge of P.

Proof of Claim. There are two types of edges other than e and f in the matching M: a family A of edges that cross e from above (edges with negative slope) and a family B of edges that cross e from below (edges with positive slope), where each of A and B might be empty. Clearly, all edges of M except f are halving edges of P. Now consider the lines through pc and the endpoints of f. As both e and f cross all the other edges of M, so does each of these lines. Hence, the two edges between pc and the endpoints of f are also halving edges of P. This shows that pc is incident to at least 3 halving edges, and every point of P is incident to at least one halving edge. Next we show that no other edge is a halving edge of P. Assume for a contradiction that some other edge g spanned by P is a halving edge as well. Let Me=M\{e}, Mf=M\{f}, and Me,f=M\{e,f}. Similarly, let Pe, Pf, and Pe,f be the point sets obtained from P by removing the endpoints of e, f, or e and f, respectively. Note that Me, Mf, and Me,f are pairwise crossing perfect matchings of Pe, Pf, and Pe,f, respectively, and hence contain exactly all halving edges for their underlying point sets. Thus, g cannot cross e (or f or both), as otherwise g would be a halving edge of Pe (or Pf or Pe,f) and hence an edge of Me (or Mf or Me,f) contained in M. If e and f lie in the same closed halfspace of g then each edge of Me,f must have at least one endpoint in that halfspace as well, which gives a count of at least 2+n-42>n-22 points of P in the open halfspace, a contradiction to g being a halving edge. If e and f lie in opposite closed halfspaces of g, then at most one endpoint of g is incident to e or f (as otherwise, g would be one of the three halving edges incident to pc). Let pg be the endpoint of g that is not incident to e and f. The edge in M incident to pg lies in exactly one closed halfspace of g and hence crosses at most one of e and f, again a contradiction.

From this claim it follows that in Case 2 the point pc has to be the same for every matching of P with μ-1 crossings. Further, in any such matching pc must be incident to a halving edge. Thus, for matchings other than M, it can only be matched with one of the endpoints of f. In particular, to obtain a matching with μ-1 crossings, there are at most three choices for an edge incident to pc, each choice uniquely determines the whole matching, and the edges in A and B must appear in any such matching.

As the edge incident to pc must cross the edges in both A and B, a different matching exists exactly if A or B are empty. If both A and B are empty, there are three possible matchings, but the underlying point set has only 4 points. If for n6 only one of A and B is empty and there are more than n/2 different halving edges, it follows that there can be at most two matchings with μ-1 crossings.

It remains to show that if there are exactly n/2 different halving edges, then there are at most n/2 matchings with μ-1 crossings. As argued above, only Case 1 can occur now, as in Case 2 there must be strictly more than n/2 different halving edges. A perfect crossing family (a perfect matching of pairwise crossing edges) defines a natural rotational order on its edges by sorting them by slopes. We call two edges neighbored if they are neighbored in this cyclic order. Similar to Case 1 above we can, for any matching with μ-1 crossings, exchange the “parallel” edges with the diagonals of the corresponding convex quadrilateral. This gives a mapping from matchings with μ-1 crossings to perfect crossing families where two neighboring edges are marked. Clearly, this mapping is an injection, showing that there are at most n/2 matchings with μ-1 crossings. This mapping turns into a bijection when we have a convex point set and thus gives exactly n/2 such matchings.

Remark 1

While Fig. 3 gives an example of a point set of size n with exactly n/2 halving edges that does not admit a perfect matching with μ-1 crossings, we can characterize point sets that have exactly n/2 perfect matchings with μ-1 crossings as follows. From the proof of Theorem 7 it is clear that such point sets have exactly n/2 halving edges and thus admit a perfect crossing family. Let ei and ei+1 be two neighboring edges (w.r.t. the rotational ordering by the slope of the edges) of this perfect crossing family which cross at x. We construct the butterfly region of ei and ei+1 by considering the convex quadrilateral Q formed by the endpoints of ei and ei+1. Seen from x there are four wedges within Q. If for every edge of the perfect crossing family, except ei and ei+1, we translate its supporting line such that it passes through x, then there are two wedges W1 and W2 where all these lines go trough – the other two wedges are empty since ei and ei+1 are neighbored in the rotational order by slope. The union of the interior of W1 and W2 is the butterfly region of ei and ei+1, see Fig 5. If this butterfly region is empty of any points of the given point set, then we can obtain a (μ-1)-crossing matching by replacing ei,ei+1 with the two non-crossing edges that still cross all other edges (ei and ei+1 in Fig. 5). Consequently, if the butterfly regions of all pairs of neighboring edges of a perfect crossing family are empty, then the underlying point set has exactly n/2 perfect matchings with μ-1 crossings. So for n8 there are also non-convex point sets with n/2 perfect matchings with μ-1 crossings.

Fig. 5.

Fig. 5

The pink shaded area represents the butterfly region of ei and ei+1. If the butterfly region is empty of points, then any edge that crosses ei and ei+1 also crosses ei and ei+1

It is natural to ask for which values of k and n it holds that pmkconv(n){pmkmin(n),pmkmax(n)}; exhaustive computations for all point sets of small size indicate that this might be true for more than just k{0,μ-1,μ}. In Fig. 6, which is a graphical representation of Table 1 for n=10, we can see that pmkconv(n)=pmkmax(n) for 4k10, except for k=6. By analyzing this special case we found that the wheel set of size 10, where 9 points form a regular 9-gon with the remaining point in its center, is the unique point set that has the maximum of 72 perfect matchings with 6 crossings (whereas the convex set has only 70 perfect matchings with 6 crossings). By further examining wheel sets of small size we conjecture that they maximize the number of perfect matchings with (n-2)(n-4)8 crossings, and that this maximum is (n-1)2n2-2. For k>(n-2)(n-4)8 crossings it still might hold that pmkconv(n)=pmkmax(n).

Fig. 6.

Fig. 6

Comparison of pmkmin(n), pmkmax(n), and pmkconv(n) for n=10 and 0k10

As a variant of the above question, we consider for which values of n and k the convex set minimizes the number of matchings with at most k crossings, that is, pmkconv(n) = pmkmin(n)? In the following, we prove the statement for any n and k2. We start by showing a useful technical lemma.

We remark that the next lemma follows from variants of the Ham Sandwich Theorem. For self-containment, we give a short argumentation here.

Lemma 4

Let S=S1S2 be a point set in general position in which S1 and S2 are separated by a line h. W.l.o.g. let h be horizontal, S1 above h and S2 below h. Then for any a,b,c,dN0, a+b=|S1|-1 and c+d=|S2|-1, there is a unique pair of points p1S1 and p2S2 such that the supporting line spanned by p1 and p2 splits S1 such that there are a points to the left of and b points to the right of , and at the same time splits S2 so that there are c points to the left of and d points to the right of .

Proof

Consider the points of S1 ordered from left to right and let p be the point with index a+1 in this order. Let be the vertical line through p and note that splits S1 in the required way. If has c points of S2 to its left, we are done. W.l.o.g. assume that has more than c points of S2 to its left, and start rotating clockwise around p. (The case that has less than c points of S2 to its left can be handled analogously by rotating counterclockwise around p.) Whenever touches a point qS1, we set p=q and continue the rotation around the new point p. Note that the splitting of S1 remains a : b. If touches a point qS2, then the number of points of S2 to the left of is reduced by 1. If this number is c, then we stop the process and set p1=p and p2=q. Otherwise, we continue the rotation. Before  becomes horizontal, there are no points of S2 to the left of , so the process terminates.

We now show that there is only one pair of points p1 and p2 that spans a line  which splits the sets in the required way. Assume for the sake of contradiction that there are two such lines and . Then and intersect at most once, w.l.o.g. above h. Further assume that the notation is such that below h, line is to the left of . If has, as required, c points of S2 to its left, then has at least c+1 points to its left, as also the point qS2 which spans is to the left of ; a contradiction.

Theorem 8

For any even n and any k{0,1,2}, it holds that pmkmin(n)=pmkconv(n).

Proof

Let PC be a set of n points in convex position and let P be a set of n points in general position. We prove the theorem by establishing an injective mapping from perfect matchings with at most k crossings on PC to those on P. Let M be a perfect matching with at most k crossings on PC. From M we will construct a perfect matching M on P with at most k crossings. Let v be the leftmost point on PC and let w be the point of PC to which v is matched in M. The line =vw splits PC in an upper half U and a lower half L. Map v to the leftmost point v of P. Let wP be the unique point such that there are |U| points of P above the supporting line vw (call this subset U) and |L| points of P below it (call this subset L). Add vw as an edge to M.

If the edge vw is not crossed in M, then we treat the smaller sets U and L of PC and their corresponding sets U and L of P recursively. Note that each of these subsets has an even number of points and that they are linearly separated in both P and PC, and can thus be treated independently.

If the edge vw is crossed in M, then we consider the leftmost crossing on it. Note that there exists a unique leftmost crossing on vw, as it cannot be a vertical line by the assumption on the point set. Let the crossing edge be ul with uU and lL. By Lemma 4, there is a unique pair of points uU and lL such that the supporting line of ul intersects the supporting line of vw in P and the four resulting quadrants in P have the same cardinality as the corresponding quadrants in PC. Note, however, that the edges vw and ul might not intersect (which is why we can show the mapping only with an upper bound on the number of crossings, and not with an exact bound).

The resulting four quadrants are disjoint convex regions. Hence, if none of the edges vw and ul is involved in the potential second crossing in M, then the subsets of points in these regions can be treated independently. If the edge vw (or the edge ul) contains a second crossing in M, then we repeat the just described procedure once more for the convex region formed by the two quadrants whose union contains the crossing. This results in a partition of the plane into six convex regions, each of which can be treated independently as k2 (see Fig. 7).

Fig. 7.

Fig. 7

An illustration of the proof of Theorem 8 for k=2 crossings

Once all (at most two) crossings of the currently considered connected component of the matching M have been considered, we iterate on the remaining subsets as described above.

At the end of this construction, we obtain a perfect matching M in P which corresponds to the matching M in PC and has at most k crossings. As every step in this construction generated a unique matching edge, this gives the desired injective mapping.

Note that the above proof cannot be used to show the case for exactly k crossings. The reason is that if a matching of the convex set has a crossing, the according two edges might not cross in the matching of the general set. Moreover, the proof does also not work for k>2 crossings as it may contain cycles, where a cycle in a drawing is referred to as a closed region bounded by edge segments and crossings. Due to the presence of cycles, it might not be possible to treat the sub-quadrants independently. An example of such a situation is depicted in Fig. 8, where an additional crossing is generated. The crucial observation is that if only two crossings are allowed, such a situation cannot occur. (Actually, for the proof it is sufficient that any connected component of the drawing of the matching forms at most two crossings.)

Fig. 8.

Fig. 8

For k=3 crossings, the proof of Theorem 8 does not work: For the convex set (left) the given matching has three crossings. When drawing the edges on the second set (right) in the order given by the proof as indicated, an additional crossing occurs

Conclusion

We have shown bounds for the number of perfect matchings with k crossings on point sets with an even number n of points. As with many other counting problems in discrete geometry and some decision problems on point sets in the plane, the computational complexity of deciding the existence of and counting the number of perfect matchings with k crossings is in general unknown.

We have shown that if k164n2-3532nn+122564n, every set of n points, for n even and n sufficiently large, admits a perfect matching with k crossings. For those values of k, the existential question is therefore settled. On the other hand, as stated in [21], it is not even known whether counting the number of plane perfect matchings on a set of n points is hard, that is, #P-complete.

Given a set P of n points, the problem of deciding whether it admits a perfect matching with k crossings can be reformulated in terms of the intersection graph G of line segments connecting points in P. This graph contains a vertex for each segment connecting two points in P and edges connect intersecting segments, where an intersection is either a proper crossing or a common endpoint. We consider a 2-edge-coloring of this graph where edges corresponding to segments sharing an endpoint are colored blue and edges corresponding to crossing segments are colored red. The point set P admits a perfect matching with k crossings if and only if G has an induced subgraph with n/2 vertices, k red edges, and no blue edge. For general edge-colored segment intersection graphs, this problem is NP-complete by a reduction from the clique problem in such graphs [22]. However, the input parameters and the subclass of segment intersection graphs that we are interested in are very specific (though not so well understood), and it is therefore possible that the problem is polynomial-time solvable when restricted to these specific instances.

Open Problems

In light of the above discussion, we point out the following open problems.

Open Problem 1: Determine the computational complexity of deciding whether a given point set admits a perfect matching with k crossings.

Open Problem 2: Investigate whether the number of perfect matchings with exactly one crossing is minimized by point sets in convex position.

Open Problem 3: Determine for which values of k, the number of perfect matchings with exactly k crossings is maximized by point sets in convex position.

In this paper we have shown that Open Problem 3 is true for k{n/22,n/22-1}. As we have mentioned before it could be also true for k>(n-2)(n-4)8.

Acknowledgements

Research on this work was initiated at the 16th European Research Week on Geometric Graphs which was held from November 18 to 22, 2019, near Strobl (Austria). We thank all participants for the good atmosphere as well as for discussions on the topic. Further, we thank Clemens Huemer for bringing this problem to our attention in the course of a meeting of the H2020-MSCA-RISE Project 734922 - CONNECT. O. A. and R. P. supported by FWF Grant W1230. P. S. supported by ERC Grant ERC StG 716424-CASe. D. P., I. P., and B. V. supported by FWF Project I 3340-N35. I. P. supported by the Independent Research Fund Denmark Grant 2020-2023 (9131-00044B) “Dynamic Network Analysis” and by the Margarita Salas Fellowship funded by the Ministry of Universities of Spain and the European Union (NextGenerationEU).

Author Contributions

All authors contributed equally to this work.

Funding

Open access funding provided by Austrian Science Fund (FWF). Nothing other than that in Acknowledgements.

Availability of Data and Materials

Not applicable.

Code Availability

Not applicable.

Declarations

Conflict of interest

No competing interests.

Ethics Approval

Not applicable.

Consent to Participate

Not applicable.

Consent for Publication

Not applicable.

Footnotes

Some results of this work have been published in the proceedings of IWOCA 2022 [1]. Early results of this work have been presented at the “Computational Geometry: Young Researchers Forum” in 2021 [2].

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Aichholzer O, Fabila-Monroy R, Kindermann P, Parada I, Paul R, Perz D, Schnider P, Vogtenhuber B. Perfect matchings with crossings. In: Bazgan C, Fernau H, editors. Combinatorial Algorithms. Cham: Springer; 2022. pp. 46–59. [Google Scholar]
  • 2.Aichholzer, O., Fabila-Monroy, R., Kindermann, P., Parada, I., Paul, R., Perz, D., Schnider, P., Vogtenhuber, B.: In: Abstracts of the Computational Geometry: Young Researchers Forum, pp. 24–27 (2021). https://cse.buffalo.edu/socg21/files/YRF-Booklet.pdf#page=24
  • 3.Asinowski, A.:The number of non-crossing perfect plane matchings is minimized (almost) only by point sets in convex position. arXiv preprint arXiv:1502.05332 (2015)
  • 4.Asinowski A, Rote G. Point sets with many non-crossing perfect matchings. Comput. Geom. 2018;68:7–33. doi: 10.1016/j.comgeo.2017.05.006. [DOI] [Google Scholar]
  • 5.García A, Noy M, Tejel J. Lower bounds on the number of crossing-free subgraphs of Kn. Comput. Geom. 2000;16(4):211–221. doi: 10.1016/S0925-7721(00)00010-9. [DOI] [Google Scholar]
  • 6.Sharir M, Welzl E. On the number of crossing-free matchings, cycles, and partitions. SIAM J. Comput. 2006;36(3):695–720. doi: 10.1137/050636036. [DOI] [Google Scholar]
  • 7.You, C.: Improving Sharir and Welzl’s bound on crossing-free matchings through solving a stronger recurrence. arXiv preprint arXiv:1701.05909 (2017)
  • 8.Callan, D.: A combinatorial survey of identities for the double factorial (2009)
  • 9.Aronov B, Erdős P, Goddard W, Kleitman DJ, Klugerman M, Pach J, Schulman LJ. Crossing families. Combinatorica. 1994;14:127–134. doi: 10.1007/BF01215345. [DOI] [Google Scholar]
  • 10.Aichholzer O, Kynčl J, Scheucher M, Vogtenhuber B, Valtr P. On crossing-families in planar point sets. Comput. Geom. 2022;107:101899. doi: 10.1016/j.comgeo.2022.101899. [DOI] [Google Scholar]
  • 11.Pach J, Rubin N, Tardos G. Planar point sets determine many pairwise crossing segments. Adv. Math. 2021;386:107779. doi: 10.1016/j.aim.2021.107779. [DOI] [Google Scholar]
  • 12.Pach J, Solymosi J. Halving lines and perfect cross-matchings. Adv. Discrete Comput. Geom. 1999;223:245–249. doi: 10.1090/conm/223. [DOI] [Google Scholar]
  • 13.Flajolet P, Noy M. Analytic combinatorics of chord diagrams. In: Krob D, Mikhalev AA, Mikhalev AV, editors. Formal Power Series and Algebraic Combinatorics. Berlin: Springer; 2000. pp. 191–201. [Google Scholar]
  • 14.Pilaud V, Rue J. Analytic combinatorics of chord and hyperchord diagrams with k crossings. Adv. Appl. Math. 2014;57:60–100. doi: 10.1016/j.aam.2014.04.001. [DOI] [Google Scholar]
  • 15.Riordan J. The distribution of crossings of chords joining pairs of 2n points on a circle. Math. Comput. 1975;29(129):215–222. doi: 10.2307/2005477. [DOI] [Google Scholar]
  • 16.Aichholzer O, Aurenhammer F, Krasser H. Enumerating order types for small point sets with applications. Order. 2002;19:265–281. doi: 10.1023/A:1021231927255. [DOI] [Google Scholar]
  • 17.Ábrego BM, Fernández-Merchant S, Leaños J, Salazar G. A central approach to bound the number of crossings in a generalized configuration. Electron. Not. Discrete Math. 2008;30:273–278. doi: 10.1016/j.endm.2008.01.047. [DOI] [Google Scholar]
  • 18.Aichholzer O, Hackl T, Huemer C, Hurtado F, Krasser H, Vogtenhuber B. On the number of plane geometric graphs. Graphs Combin. 2007;23(1):67–84. doi: 10.1007/s00373-007-0704-5. [DOI] [Google Scholar]
  • 19.Nivasch G. An improved, simple construction of many halving edges. Contemp. Math. 2008;453:299–306. doi: 10.1090/conm/453/08804. [DOI] [Google Scholar]
  • 20.Dey TK. Improved bounds for planar k-sets and related problems. Discrete Comput. Geom. 1998;19:373–382. doi: 10.1007/PL00009354. [DOI] [Google Scholar]
  • 21.Eppstein D. Counting polygon triangulations is hard. Discrete Comput. Geom. 2020;64(4):1210–1234. doi: 10.1007/s00454-020-00251-7. [DOI] [Google Scholar]
  • 22.Cabello S, Cardinal J, Langerman S. The clique problem in ray intersection graphs. Discrete Comput. Geom. 2013;50(3):771–783. doi: 10.1007/s00454-013-9538-5. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Not applicable.

Not applicable.


Articles from Algorithmica are provided here courtesy of Springer

RESOURCES