Perfect Matchings with Crossings

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 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_{n/2}$$\end{document}Cn/2 different plane perfect matchings, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$C_{n/2}$$\end{document}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 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k\le \frac{1}{64}n^2-\frac{35}{32}n\sqrt{n}+\frac{1225}{64}n$$\end{document}k≤164n2-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 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\frac{5}{72}n^2-\frac{n}{4}$$\end{document}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 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k=0,1,2$$\end{document}k=0,1,2, and maximize the number of perfect matchings with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left( {\begin{array}{c}n/2\\ 2\end{array}}\right) $$\end{document}n/22 crossings and with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\left( {\begin{array}{c}n/2\\ 2\end{array}}\right) }\!-\!1$$\end{document}n/22-1 crossings.


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 [3][4][5][6][7].It is known that n = 2m points in general position admit at least C m plane perfect matchings, where (n) is the m-th Catalan number.This bound is tight, as point sets 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]. of size n in convex position (for short, convex point sets) allow exactly C n/2 = C m 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.05 n ) [6].Finally, there exist point sets which allow (3.09 n ) 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 (n log n) such matchings [8], each having at most n/2 2 ∈ O(n 2 ) crossings.Given n, the question of the existence of perfect matchings with exactly μ = n/ 2  2 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 n 1−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 [13][14][15].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 pm k (P) the number of k-crossing matchings on a point set P, by pm max k (n) the maximum of pm k (P), taken over all sets P of n points, and by pm min k (n) the minimum of pm k (P), also taken over all sets P of n points.Similarly, we denote with pm ≤k (P) the number of (≤ k)-crossing matchings on a point set P and define pm max ≤k (n) and pm min ≤k (n) analogously as before.Finally, pm conv k (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 k ≤ 1 64 n 2 − 35 32 n √ n + 1225 64 n, 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 5  72 n 2 − n 4 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 ).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 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 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 0 ≤ k ≤ For even values of n ≤ 10, 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/2 2 crossings.We obtain the following observation.
Observation 1 For any k ≤ 3, 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 77 76 1 64 n 2 crossings.
Proof Consider the straight-line drawing of K n on P. Let M be a random perfect matching of K n chosen uniformly from the set of all perfect matchings of K n .Let M be the corresponding straight-line drawing of M on P. For every set T of 4 points in P, let X T 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 X T = 0. Let C be the set of subsets of P of four points in convex position.If T ∈ C, then the expected value of X T is equal to the probability that M contains the only two crossing edges with endpoints in T .Hence, E(X T ) = 1 (n−1)(n−3) .Let X be the number of pairs of edges of M that cross.We have that .
Further, |C| is also equal to the number of pairs of edges of K n that cross.The minimum number, cr(K n ), of pairs of edges that cross in any straight-line drawing of K n is called the rectilinear crossing number of K n .It is known that lim n→∞ = q * , for some positive constant q * .Ábrego et al. [17] showed that q * > 0.379972.Thus, we have 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 0 ≤ k ≤ 1 64 n 2 − 35 32 n √ n + 1225 64 n, 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 < k ≤ cr(M).Then P has a perfect matching M with k − n + 3 ≤ cr(M ) ≤ k crossings.
Proof Let M 0 := M and let p 0 , . . ., p n−1 be the points of P ordered from top to bottom.We obtain a matching M i+1 from matching M i as follows.If p 2i is matched to p 2i+1 , then M i+1 = M i .Otherwise, let q 2i , q 2i+1 be the points of P matched to p 2i and p 2i+1 , respectively, in M i .We replace the edges ( p 2i , q 2i ) and ( p 2i+1 , q 2i+1 ) by the edges ( p 2i , p 2i+1 ) and (q 2i , q 2i+1 ).Note that the edges ( p 0 , p 1 ), . . ., (p 2i , p 2i+1 ) have no crossing in M i+1 .Furthermore, the number of crossings of the edges ( p 2i , q 2i ) and ( p 2i+1 , q 2i+1 ) is at most n − 2i − 3 in M i : in the worst case, each edge crosses all ((n − 2i)/2) − 1 other edges, but the crossing between ( p 2i+1 , q 2i+1 ) and ( p 2i , q 2i ) is counted twice.Hence, we have cr Lemma 2 For any sufficiently large even n and 0 ≤ k ≤ 64 crossings, where the last inequality holds for n > 1330.By Lemma 1, P 1 has a matching M 1 with k − n 1 + 3 ≤ cr(M 1 ) ≤ k crossings, which we aim to extend to a k-crossing matching of P. To achieve this, we need to add exactly = k − cr(M 1 ) crossings during the completion.As k − cr(M 1 ) ≤ n 1 − 3, we have ≤ 3  13 n − 1 − 3 < 3 13 n − 3. Next, we linearly separate P 2 into 1  13 n 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 P 2 with exactly x crossings for every 0 ≤ x ≤ 3 1  13 n .Since 3 √ n points.Note that n 1 is even since n is even.Let M 1 be the matching of P 1 with the largest number of crossings; then M 1 has more than 77 76 By Lemma 2, P 2 has a matching with exactly x crossings for every 0 ≤ x ≤ 9 Hence, there is a matching M 2 of P 2 with exactly crossings.This implies that there is a matching Proof For every n ≡ (0 mod 6), 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 I i we denote the collection of interior matching edges of wing i, that is, edges that match two points of this wing.With O i 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 = |I i | and o i = |O i | denote the cardinalities of these sets.
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 I i and O i 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 2 So we have six parameters to maximize this sum.We get three equations for these parameters from the size of the wings, namely , and can thus express the number of crossings only using the numbers of interior matching edges, where 0 ≤ ι i ≤ n 6 .For the crossings formed by I i ∪ O i , this gives Summing over all three wings gives 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 o i have to be non-negative, the unique maximum is obtained for ι 0 = n 6 and 72 − n 4 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 k ≤ k, 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/2 2 .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
Proof Let P be a set of n points in convex position.Label the points in cyclic order from p 1 to p n .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)

2
≤ k.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 p i and p c +i+1 , for i ∈ {1, . . ., x}, and by connecting the points p i and p c +i+2 , for i ∈ {x + 1, . . ., c }. See Fig. 2 for a depiction.Next we connect points p c +1 and p c +x+2 which were not yet connected within the crossing family and contribute the remaining x crossings.Finally, we match  3 A set of 30 points with a perfect matching with 15  2 = 105 crossings, but with no perfect matching with k ∈ {103, 104} crossings.This result is obtained by direct computation all remaining points (if any, with indices 2c + 3 to n) without crossings.Then M has in total k crossings as desired.
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.

Proposition 2
For infinitely many values of n, there exists a set of n points which admits a matching with μ = n/2 2 crossings, but does not admit a matching with μ − i crossings for any Proof We construct a point set P g with n = 4g 2 + 6g + 2 points, where g ≥ 2 is an integer, as follows.Consider a regular n-gon centered at the origin with points p 0 , . . ., p n−1 .We consider all indices modulo n.Let C ε be a circle centered at origin and small enough such that no line spanned by p i and p n 2 +i±1 for 1 ≤ i ≤ n from the origin through p (2g+2)•i ; see Fig. 3  Proof of Claim.We determine the maximal number of crossings of ( p x , p y ).To do this, we count the number of points in the half planes H 1 and H 2 defined by the line spanned by p x and p y .By construction, all points on C ε are in the half plane which contains more points of P g , say H 2 .Let H be the open half plane with H 1 ⊂ H that has the origin on its boundary (that is, the boundary of H is parallel to the line spanned by p x and p y ).Note that H contains at most n 2 points of P g .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 . We prove by contradiction that there exists no matching with μ − i crossings for any 1 ≤ i < 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 ( p x , p x + n 2 ) if M has more than μ − g + 1 crossings.Moreover, since there are 2g + 1 points on C ε and 4g 2 + 4g + 1 points on the boundary of the convex hull of P g , there are at least 2g 2 + g long edges of the form ( p x , p x + n 2 ).Since there are only 2g 2 + g long edges of the form ( p x , p x + n 2 ), 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 ( p x , p y ) with p y = p x+ n 2 , 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

3 Perfect 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.
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 n 2 k groups P i , with i = 1, 2, . . ., n 2 k 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 k n is even, then each group is of size k n ; otherwise it is of size k n − 1.Consider first such a group P i .As mentioned in the introduction, we can draw 2 ( k n log( k n )) perfect matchings on P i , and each of them has at most k/n 2 < k 2 n 2 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 P i or in M is Further, each such matching has at most 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 pm max ≤k (n) as stated below in Corollary 1.

Theorem 4
For any set P of n points, n even, and 0 ≤ x ≤ n, x even, let pm x (n) be the number of perfect matchings whose crossing edges are incident to at most x points.Then pm x (n) ∈ 2 O(n+x log x) .
Proof Consider some subset P ⊂ P 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 (x log x) 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 Thus there are at most 2 O(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 n x ≤ 2 n .Hence, we get pm

Corollary 1 For any even n and any k, it holds that pm
For k ∈ (n), this bound is worse than the trivial upper bound from the number of all perfect matchings.For k ∈ O( n log n ) we get a bound of 2 O(n) , which is asymptotically tight.

Points in Convex Position
In this section, we study the number pm conv k (n) of k-crossing matchings on a set of n points in convex position.Obviously, pm min It is well known that convex sets minimize the number of plane perfect matchings; see for example [5,18].Hence, we have pm min 0 (n) = pm conv 0 (n).On the other hand, considering the maximum number μ = n/2 2 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 n 2 halving edges (edges that have n−2 2 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 (ne ln n / ln n) by Nivasch [19] and the current best upper bound is O(n 4/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 μ
Proof Let P be a set of n points in convex position labelled in cyclic order from p 0 to p n−1 .By Theorem 5, a point set P admits a μ-crossing matching if and only if P has exactly n 2 halving edges.Thus, we construct our matching M to entirely consist of halving edges by connecting the points p i and p n 2 +i , for i ∈ {0, . . ., n 2 − 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.

) Any set P of n points with exactly n
2 halving edges has pm μ−1 (P) ≤ n 2 .(3) Any set P of n points with more than n 2 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 n 2 halving edges or has more than n 2 halving edges and pm μ−1 (P) ≤ 2.Then, to complete the proof, we will show that any point set P with exactly n 2 halving edges has pm μ−1 (P) ≤ n 2 and that n 2 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 p c .
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 p c is in the interior of the convex hull of e and f : We assume w.l.o.g. that e is horizontal and that p c is the left endpoint of e.Moreover, f is vertical and to the left of p c , 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.

Claim
The point p c 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 p c 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 p c and the endpoints of f are also halving edges of P.This shows that p c 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 M e = M\{e}, M f = M\{ f }, and M e, f = M\{e, f }.Similarly, let P e , P f , and P e, f be the point sets obtained from P by removing the endpoints of e, f , or e and f , respectively.Note that M e , M f , and M e, f are pairwise crossing perfect matchings of P e , P f , and P e, 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 P e (or P f or P e, f ) and hence an edge of M e (or M f or M e, f ) contained in M. If e and f lie in the same closed halfspace of g then each edge of M e, f must have at least one endpoint in that halfspace as well, which gives a count of at least 2 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 p c ).Let p g be the endpoint of g that is not incident to e and f .The edge in M incident to p g 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 p c has to be the same for every matching of P with μ−1 crossings.Further, in any such matching p c 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 p c , 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 p c 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 n ≥ 6 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 e i and e i+1 be two 5 The pink shaded area represents the butterfly region of e i and e i+1 .If the butterfly region is empty of points, then any edge that crosses e i and e i+1 also crosses e i and e i+1 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 e i and e i+1 by considering the convex quadrilateral Q formed by the endpoints of e i and e i+1 .Seen from x there are four wedges within Q.If for every edge of the perfect crossing family, except e i and e i+1 , we translate its supporting line such that it passes through x, then there are two wedges W 1 and W 2 where all these lines go trough -the other two wedges are empty since e i and e i+1 are neighbored in the rotational order by slope.The union of the interior of W 1 and W 2 is the butterfly region of e i and e i+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 e i , e i+1 with the two non-crossing edges that still cross all other edges (e i and e i+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 n ≥ 8 there are also non-convex point sets with n/2 perfect matchings with μ − 1 crossings.
It is natural to ask for which values of k and n it holds that pm conv k (n) ∈ {pm min k (n), pm max k (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 pm conv k (n) = pm max k (n) for 4 ≤ k ≤ 10, 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 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, pm conv ≤k (n) = pm min ≤k (n)?In the following, we prove the statement for any n and k ≤ 2. 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 = S 1 ∪ S 2 be a point set in general position in which S 1 and S 2 are separated by a line h.W.l.o.g.let h be horizontal, S 1 above h and S 2 below h.Then Proof Consider the points of S 1 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 S 1 in the required way.If has c points of S 2 to its left, we are done.W.l.o.g.assume that has more than c points of S 2 to its left, and start rotating clockwise around p.
(The case that has less than c points of S 2 to its left can be handled analogously by rotating counterclockwise around p.) Whenever touches a point q ∈ S 1 , we set p = q and continue the rotation around the new point p.Note that the splitting of S 1 remains a : b.If touches a point q ∈ S 2 , then the number of points of S 2 to the left of is reduced by 1.If this number is c, then we stop the process and set p 1 = p and p 2 = q.Otherwise, we continue the rotation.Before becomes horizontal, there are no points of S 2 to the left of , so the process terminates.We now show that there is only one pair of points p 1 and p 2 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 S 2 to its left, then has at least c + 1 points to its left, as also the point q ∈ S 2 which spans is to the left of ; a contradiction.Theorem 8 For any even n and any k ∈ {0, 1, 2}, it holds that pm min ≤k (n) = pm conv ≤k (n).
Proof Let P C 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 P C to those on P. Let M be a perfect matching with at most k crossings on P C .From M we will construct a perfect matching If the edge vw is not crossed in M, then we treat the smaller sets U and L of P C and their corresponding sets U and 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 P C , 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 u ∈ U and l ∈ L. By Lemma 4, there is a unique pair of points u ∈ U and l ∈ L such that the supporting line of u l intersects the supporting line of v w in P and the four resulting quadrants in P have the same cardinality as the corresponding quadrants in P C .Note, however, that the edges v w and u l 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 k ≤ 2 (see Fig. 7).
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 P C 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.
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 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.)

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 k ≤ 1 64 n 2 − 35 32 n √ n + 1225 64 n, 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-edgecoloring 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/2 2 , n/2 2 − 1}.As we have mentioned before it could be also true for k > (n−2)(n−4) 8 .

Fig. 1
Fig. 1 Illustration for the proof of Theorem 2: A point set P for which every perfect matching has ≤ 5n 2 72 − n 4

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

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

Fig. 6
Fig. 6 Comparison of pm min k (n), pm max k (n), and pm conv k (n) for n = 10 and 0 ≤ k ≤ 10

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

Table 1
Numbers of k-crossing matchings for n = 6, 8, 10 points − 1 otherwise.Note that n 1 + n 2 ≤ n, since n is even.We linearly separate the point set P into a point set P 1 consisting of the leftmost n 1 points and a point set P 2 consisting of the rightmost n 2 points.Let M 1 be the matching of P 1 with the largest number of crossings.Then, by Propo- 113 n ≥313 n − 3 ≥ , we can find a matching M 2 of P 2 with exactly crossings.By combining M 2 and M 1 , we get a matching M = M 1 ∪ M 2 of P with exactly cr(M) = cr(M 1 ) + cr(M 2 ) = k − + = k crossings.Finally, if n 1 + n 2 < n, we match the remaining points (which lie between P 1 and P 2 ) without additional crossings.
for a depiction with g = 2.Note that the points p (2 g+2)•i with 0 ≤ i ≤ 2g form a regular (2g + 1)-gon and are on C ε .The set P g consists of those 2g + 1 points plus the remaining n − 2g − 1 vertices of the regular n-gon we started with.Obviously, P g spans a crossing family of size n 2 , formed by the edges ( p i , p i+ n 2 ), 0 ≤ i < n 2 , and hence admits a matching with μ crossings.An edge connecting two points in P g is called long if it connects two points on the boundary of the convex hull of P g .Otherwise it is called short.
Claim If M has a long edge ( p x , p y ) with p y = p x+ n 2 , then M has at most μ − g + 1 crossings.
then M has exactly μ crossings.Hence M contains a short edge ( p x , p y ) with p x ∈ C ε and y = x + n 2 ± r for some 1 ≤ r < n 2 .We consider p y = p x+ n 2 +r ( p y = p x+ n 2 −r follows analogously).Since ( p x , p x+ n 2 ) is a short edge and all long edges of the form ( p x , p x+ n 2 ) were forced in M , r > 2g + 1.So the edge ( p x , p y ) does not cross any of the line segments ( p x+i , p x+ n 2 +i ) with 1 ≤ i ≤ 2 g +1.On the other hand, 2g of the line segments ( p x+i , p x+ n 2 +i ) correspond to the forced long edges.So ( p x , p y ) has at most n 2 − 2 g crossings.Similar as above, it follows that M has at most μ − g + 1 crossings, a contradiction.