For plane drawings of geometric graphs, the term compatible is used in two rather different interpretations. In the first variant, two plane drawings of geometric graphs are embedded on the same set of points. They are called compatible (to each other with respect to ) if their union is plane (see e.g. [3, 19]). Note that this is different to simultaneous planar graph embedding, as it is required not only that the two graphs are plane, but also that their union is crossing-free.
In the second setting, which is the one that we will consider in this work, one planar graph is drawn straight-line on two or more labeled point sets (with the same label set). We say that is compatible to the point sets if the drawing of is plane for each of them (where each vertex of is mapped to a unique label and thereby identified with a unique point of each point set). Note that the labelings of the point sets can be predefined or part of the solution. As an example, we mention the compatible triangulation conjecture :
For any two sets and with the same number of points and the same number of extreme points, there is a labeling of the two sets such that there exists a triangulation which is compatible to both sets, and .
Motivation and related work. The study of the type of compatibility considered in this work (the second type from above) is motivated by applications in morphing [7, 16, 17], 2D shape animation , or cartography .
Compatible triangulations were first introduced by Saalfeld  for labeled point sets, who studied the construction of compatible triangulations using Steiner points (compatible triangulations do not always exist for pairs of labeled point sets). Aronov et al.  and Babikov et al.  showed that Steiner points are always sufficient, while Pach et al.  showed that Steiner points are sometimes necessary. The compatible triangulation conjecture states that – in contrast to labeled point sets – two unlabeled point sets (in general position and with the same number of extreme points) can always be compatibly triangulated without using Steiner points. To date, the conjecture has only been proven for point sets with at most three interior points . Krasser  showed that more than two point sets cannot always be compatibly triangulated.
Concerning compatible paths, Hui and Schaefer  showed that it is NP-hard to decide whether two labeled point sets admit a compatible spanning path. Arseneva et al.  presented efficient algorithms for finding a monotone compatible spanning path, or a compatible spanning path inside simple polygons (if they exist). Czyzowicz et al.  showed that any two labeled point sets admit a compatible path of length at least and also presented an algorithm to find such a path for two convex point sets. In a similar direction, results from Czabarka and Wang  imply a lower bound of on the length of the longest cycle compatible to two convex point sets.
In this paper we will focus on compatible matchings. To the best of our knowledge, previous results on (geometric) matchings study only compatibility of the first type, that is, where two matchings are embedded on the same point set. A well-studied question in this setting is whether any two perfect matchings can be transformed into each other by a sequence of steps such that at every step the intermediate graph is a perfect matching and the union of any two consecutive matchings is plane. Aichholzer at al.  proved that such a sequence of at most steps always exists. Questions of whether any matching of a given point set can be transformed into any other and how many steps it takes (that is, the connectivity of and the distance in the so-called reconfiguration graph of matchings, as well as its other properties) have been investigated also for matchings on bicolored point sets and for edge-disjoint compatible matchings, see for example [5, 8, 19].
Our results. We study the second type of compatibility for matchings on two or more point sets. This is a setting for which no previous comprehensive theory appears to exist. Let us mention that throughout this paper we denote unlabeled point sets with and labeled point sets with . We start by considering convex point sets: given two unlabeled convex point sets , , both with points, we study the largest guaranteed size of a compatible matching across all pairs of labelings of and . More formally, is the minimum over all pairs of labelings of the maximum compatible matching size for the accordingly labeled -point set pairs. The largest compatible matching for two labeled point sets is not necessarily perfect, see Fig. 1. In Section 2 we present upper and lower bounds on . In particular, for any that is a multiple of 10, we construct two labeled convex sets of points each, for which the largest compatible matching has edges. Using probabilistic arguments, we obtain an upper bound of . For the lower bound, we show that for any pair of labeled convex point sets , there exists a compatible matching consisting of edges. This implies that .
We further extend our study to consider point sets in general position instead of just two point sets in convex position. Given unlabeled sets of points in general position, we denote by the largest guaranteed size of a compatible matching across all -tuples of labelings of . We remark that the size of the point sets is included in the notation only for the sake of clarity (since our bounds depend on ). In Section 3 we give bounds on for any sets of points in general position. Building on the ideas of the proofs for two convex sets, we show that and that .
Finally, we investigate the question of how many labeled copies of a given unlabeled point set are needed so that the largest compatible matching consists of a single edge. Already for four points in convex position, three different sets are needed (and sufficient, see Fig. 1). In Section 4 we prove that for any given set of points in general position, copies of it are necessary and sufficient for the existence of labelings forcing that the largest compatible matching consists of a single edge.
For brevity, a plane matching that consists of edges is called a -matching.
2 Two convex sets
Throughout this section we consider two labeled convex point sets , consisting of points each. Without loss of generality we assume that is labeled in clockwise order and that is labeled in clockwise order for some permutation .
In the following, we present lower and upper bounds on the largest guaranteed size of a compatible matching of any two such sets. Starting with lower bounds, we present four pairwise incomparable results (Theorem 2.1), each of them giving rise to a polynomial-time algorithm for constructing a compatible -matching with edges. The results are ordered by the size of the obtained compatible -matching, where the last one gives the best lower bound for , while the three other results yield compatible matchings of special structure. The second result can be generalized to any number of (not necessarily convex) sets (Theorem 3.1). We remark that  implies a lower bound of , which is weaker than the fourth result.
Before stating the theorem, we introduce the notion of a shape of a matching on a convex point set which, informally stated, captures “how the matching looks”. Consider a labeled point set and a plane matching on . Let be the points of that are incident to an edge of . The shape of is the combinatorial embedding111The combinatorial embedding fixes the cyclic order of incident edges for each vertex. of the union of and the boundary of the convex hull of . Further, is called non-nested if its shape is a cycle, that is, all edges of lie on the boundary of the convex hull of . Note that the shape of also determines the number of its edges (even though some or all of the edges might be “hidden” in the boundary of the convex hull of ). We say that two matchings have the same shape, if their shapes are identical, possibly up to a reflection.
Theorem 2.1 (Lower bound for two convex sets)
For any two labeled convex sets , of points each, it holds that: (i) If then for any shape of a -matching there exists a compatible -matching having that shape in both and . (ii) If then any maximal compatible matching consists of at least edges. (iii) If then there exists a compatible -matching that is non-nested in both and . (iv) If then there exists a compatible -matching.
By the circular Erdős-Szekeres Theorem , the permutation contains a monotone subsequence having length . The sequence of points whose labels belong to has the same cyclic order in both sets , (possibly once clockwise and once counter-clockwise), hence any plane matching on in is also plane in and has the same shape.
Suppose we have already found a compatible matching consisting of edges. This leaves at least points yet unmatched. The unmatched points are split by the matching edges into at most subsets, both in and in . Since there are at most different ways to choose one such subset from and one from , there exist two yet unmatched points , that lie in the same subset in and in the same subset in . Hence can be added to the matching .
This claim is equivalent to Problem 5 given at IMO 2017.222https://www.imo-official.org/problems/IMO2017SL.pdf, Problem C4. For completeness we sketch a proof (see Fig. 2): split the perimeter of into contiguous blocks consisting of points each (that is, block consists of points labeled and so on). We aim to draw one matching edge per block. We process points in order in which they appear in . Once some block, say , contains two processed points, say and , we draw edge , discard other already processed points and discard other points in . In this way, any time we draw an edge in some block, we discard at most one point from each other block. Since each block initially contains points, we will eventually draw one edge in each block. The produced matching contains one edge per block, hence it is non-nested in . Since points are processed in order , the matching is also non-nested in .
The idea is to find two points , that are close to each other in the cyclic order in both and . Then draw the edge , omit all points on the shorter arcs of in both and , and proceed recursively.
Consider the permutation matrix given by , that is, an matrix such that if and 0 otherwise. Given an integer and a cell containing a digit 1, the -ball centered at is a set of cells whose -distance from is at most , where all indices are considered cyclically modulo (see Fig. 2). Note that an -ball contains cells.
Now suppose and satisfy and consider -balls centered at all cells containing a digit 1. The balls in total cover cells, hence some two -balls intersect and their centers , have -distance at most . This means that the shorter arcs between points labeled and contain, together in both point sets and , at most other points. Drawing an edge and removing these other points leaves convex sets in both and whose convex hulls do not intersect the matched edge .
The rest is induction. The claim holds for . Suppose that is even and that . By the above argument, find a “short” edge and remove up to other points. This leaves () points, so find another edge and remove up to other points. This leaves points and the induction applies. Last, note that the above shows that having points implies a -matching. Since , the case of odd and is also settled.
For the remainder of this section, we consider upper bounds on the size of compatible matchings for pairs of convex point sets.
We first describe an explicit construction of two labeled point sets and , where is a multiple of 10, the set is labeled in clockwise order, and the set is labeled in clockwise order, by defining a specific permutation . We will show that any compatible matching of and misses at least of the points.
Our building block for is the permutation of five elements. For labeling the points of (with even) we use the permutation that yields blocks of 5 points each in both and (see Fig. 3).
Proposition 1 (Constructive upper bound for two convex sets)
The largest compatible matching of the two labeled -point sets and defined above contains edges.
We show that any compatible matching misses at least one point within each of the blocks. This gives unmatched points and thus at most edges in any compatible matching.
We classify the edges of any compatible matchinginto two types: those that connect two points in one block (that is, edges with both labels in for some ; we call them short edges) and all other edges, which connect two points from different blocks (we call them long edges). To show that misses at least one point of each block , we distinguish two cases:
- Case 1:
contains at least one short edge.
We show that there is always at least one unmatched point in . W.l.o.g., let be the block with labels . For each of the possible short edges, it is straightforward to see that if we include it, then we inevitably obtain a point of that can not be matched in either or (see Fig. 3). For example, (i) edge induces point to be unmatchable by ; (ii) edge induces point to be unmatchable due to ; (iii) edge forces edge by , which makes point unmatchable due to ; (iv) edge forces one of the points , and to be unmatched due to ; and so on.
- Case 2:
All five points in are matched by a long edge.
We argue that, under the assumption that all five points in are matched (by a long edge), all those five edges in fact must go to the same block , which we then show to be impossible. Consider a pair of numbers , that lie in the same block whose relative position within that block is different in and in (for example, 1 and 2 but not 1 and 3). Suppose is matched to . Then has to be matched to a point on the same side of the line as , in both and . This is impossible unless is matched to a point in the same block as that moreover happens to lie on the correct side of in both and . Hence for any such pair , , the points and are matched to the same block. It remains to notice that are all eligible pairs, hence all five edges go to the same block . However, there is only one non-crossing perfect matching of and in and we easily check that it is not compatible with .
To see that the bound is tight, note that within each block of we can match the first two points and the next two points. This yields a compatible matching of and with edges consisting only of short edges.
The above construction yields an upper bound of . However, this bound is not tight. We next show in a probabilistic way that there exists a permutation for which the largest compatible matching consists of edges. In Section 3, we will extend this approach to any number of point sets, not necessarily in convex position (Theorem 3.2).
Theorem 2.2 (Probabilistic upper bound for two convex sets)
Fix and let . Then two convex sets , of points each can be labeled such that the largest compatible matching consists of fewer than edges.
Let be with labeling in clockwise order and let not yet be labeled. The idea for this proof is that for large there are more ways to label than there are ways to draw a compatible -matching.
For any , let be the number of plane -matchings of , (that is, matchings leaving points unmatched). As there are ways to select the points to be matched and the number of plane perfect matching on those points is (the -th Catalan number), we obtain .
Given two plane -matchings, one of and one of , there are exactly labelings of for which those two matchings constitute a compatible -matching: there are ways to label the unmatched points of , ways to pair up the matching edges and ways to label their endpoints.
Therefore, is an upper bound for the number of labelings of such that there is a compatible -matching for and ( with labeling ). On the other hand, there are labelings of in total.
Our goal is to show that . If we succeed, then there exists a labeling of such that there is no compatible -matching for and ( with labeling ). Canceling some of the factorials and using standard bounds on the remaining ones (where denotes Euler’s number), we obtain
For , the above expression is less than one (we have ), which completes the proof.
3 Generalized and Multiple Sets
In this section we generalize our results in two ways, by considering point sets in general position and more than two sets. We again start with lower bounds. Theorem 3.1, which is a generalization of the second result of Theorem 2.1, implies that for any -tuple of point sets we have .
Theorem 3.1 (Lower bound for multiple sets)
Let be labeled sets of points each. If , then any maximal compatible matching consists of at least edges.
We extend the idea from the proof of Theorem 2.1, part (ii): suppose we have already found a compatible matching consisting of edges. This leaves at least points yet unmatched. Imagine the point sets live in different planes. We process the matching edges one by one. When an edge is processed, we extend it along its line in both directions until it hits another matching edge or an extension of a previously processed edge (in all planes). In this way, the lines partition each plane into convex regions. By simple counting (), there exist two yet unmatched points , that lie in the same region in each of the planes. Hence can be added to the matching .
Regarding upper bounds, the following theorem implies that for any fixed and any -tuple of point sets , we have .
Theorem 3.2 (Probabilistic upper bound for multiple sets)
Fix and and let . Then any sets of points each, where each is in general position, can be labeled such that the largest compatible matching consists of fewer than edges.
We extend the idea from the proof of Theorem 2.2. Let be with labeling in clockwise order and suppose that the remaining sets are not yet labeled. Let and let , , be the number of -matchings of . Sharir, Sheffer and Welzl showed in  that the number of plane perfect matchings of any set of points in general position is at most , where denotes the number of triangulations of . Sharir and Sheffer also showed in  that the number of triangulations of is at most . This implies that there are also at most different perfect matchings of . By counting this upper bound for every possible -point subset of , we obtain
Next, consider an -tuple of matchings on , respectively, consisting of edges each. Notice that any such -tuple forms a compatible matching for
combinations of labelings for .
On the other hand, there are such combinations of labelings for in total. It suffices to show that
for guaranteeing the existence of a combination of labelings for such that there is no compatible -matching for the resulting labeled sets . As before, we expand the binomials into factorials, cancel some of them and use standard bounds on the remaining ones (where again denotes Euler’s number) to obtain
When , then also holds. Further, the expression inside the brackets is less than (we have ). Since , this completes the proof.
We remark that the upper bound of for the number of plane perfect matchings of any set of points in the plane in general position is by far not tight. Actually, Sharir and Welzl  showed that this number can be bounded by . However, for the above proof, we require an explicit upper bound that holds for any value of and hence we did not use this result.
4 Forcing a single-edge compatible matching
In this section we consider the following question: Given an unlabeled point set with points, is there an integer such that there exist labelings of for which every compatible matching has at most one edge? If exists, we denote as the minimum number of copies of such that (where appears times). Otherwise, we set . In other words, we are asking for the existence (and minimal number) of labelings of the set so that any pair of labeled edges crosses for at least one labeling. We remark that, again, the size of the point sets is included in the notation only for the sake of clarity. Note that if and only if the straight-line drawing of on contains no crossing. Hence is finite for any set of points.
We first focus on upper bounds and on the case when is in convex position. We denote by the minimum number of copies of a convex set with points that need to be labeled so that the largest compatible matching consists of only a single edge.
Let , which is the number of bits that are needed to represent the labels 1 to . We construct a family of labeled convex -point sets such that all pairs of edges cross in at least one set. First consider three labeled convex point sets, which are obtained by partitioning the set of labels into four blocks , , , , and combining those blocks in different orders and orientations as depicted in Fig. 4. The order within a block is arbitrary, but identical for all three sets (up to reflection; those block orientations are indicated by arrows).
Lemma 1 ()
Consider three convex point sets , , and that are labeled as in Fig. 4 for some partition , , , and of their label set. Then any pair of independent333Two edges are independent if they do not share an endpoint. edges, where none of them has both labels in one of the blocks , , , and , forms a crossing in at least one of , , and .
We consider three cases, depending on the number of blocks containing endpoints of the edges and .
- Case :
Then and are spanned by the same two subsets. As any pair of blocks shows up in the same and in inverse orientation in at least one of the three drawings, this guarantees a crossing. For example, let the two subsets be and . They have the same orientation in Fig. 3(a) and 3(b), but inverse orientation in Fig. 3(c). An analogous property holds for the remaining five combinations.
- Case :
W.l.o.g. and have their starting point in the same subset, but the endpoints in different subsets. There are 12 possible configurations of one common and two disjoint subsets, and it is straightforward to check that each situation shows up in both possible orientations w.r.t. the common set. For example, let the common set be , and the other sets and . The orientation of is the same in all three drawings, but the order of and is inverted in Fig. 3(a) and 3(c). If the common set is and the two other sets are again and , then order of the three sets is the same in all three drawings, but the orientation of the common set is inverted in Fig. 3(a) and 3(c). Thus, in both cases a crossing is guaranteed.
- Case :
In this case the orientation of the subsets is not relevant. There are only three possible combinations of such edges ( with , with , and with ) and the three drawings cover one case each.
We next identify a small number of 4-partitions of the label set such that each edge pair fulfills the condition of Lemma 1 in at least one of the partitions (when the four subsets form blocks). This yields the following constructive upper bound for .
Proposition 2 (Constructive upper bound on )
For any and for , we can define labeled convex sets of points such that the largest matching compatible to all of them consists of a single edge.
Given a convex set of points, we construct 4-partitions of the labels and use each such partition to obtain three labeled point sets as depicted in Fig. 4. For any two bit positions , , of the labels, partition the label set so that contains all labels where those two bits are zero, those where the bits are zero-one, those with one-zero, and finally the ones with both one. This gives different partitions.
Now consider two arbitrary edges and . Then there is a bit position in which the two endpoints of have different values, and the same is true for . Let and , respectively, be those positions. If this would give , then choose arbitrarily but not equal to . By Lemma 1, the edges and cross in one of the three labeled point sets for the partition generated for and .
The upper bound of from Proposition 2 is constructive but it is not asymptotically tight. Next we present a probabilistic argument which shows that we actually have for any point set of points.
Lemma 2 (Probabilistic upper bound on )
Given a set of points in general position, there exists a constant such that .
Fix and let be the proportion of 4-tuples of points in that are in convex position. Note that since any 5-tuple of points contains at least one 4-tuple in convex position, we have (here we use ).
There are pairs of non-incident edges. Fix one of them, say and . Note that when is labeled uniformly at random, the edges ,
intersect with constant probability: indeed, the edges intersect if their 4 endpoints form a convex quadrilateral and the points , , , lie on its perimeter in two out of the six possible cyclic orders.
Now set and consider copies of labeled independently and uniformly at random. We say that a pair of edges is bad if it is non-crossing in all point sets. Then any one fixed pair of edges is bad with probability . By linearity of expectation, the expected number of bad pairs of edges is . Therefore there exists a labeling of the point sets for which no pair of edges is bad. In such a labeling, the largest compatible matching consists of a single edge.
We remark that for a fixed set , one can often obtain a better bound on parameter used in the proof and thus a better bound on , which then gives a constant factor improvement on . Specifically, for sufficiently large , finding the maximum constant is a topic of high relevance in connection with the rectilinear crossing number of the complete graph, see  for a nice survey of this area. The currently best known bounds are [1, 6]. Moreover, when is in convex position we have and thus the above proof implies . On the other hand, none of these observations leads to an asymptotic improvement on the upper bound of or . In the following we show that any such asymptotic improvement is in fact impossible.
Lemma 3 (Lower bound on )
Fix and let be any set of points in general position. Then .
We use a similar argument as the one used in Theorem 3.1. Denote by any labeled copies of . Take an arbitrary edge on the convex hull of . The line containing divides each of into two parts (one possibly empty). Since there are unmatched points, there exist two points, say , , that lie in the same part, for each . Thus the two edges and form a compatible 2-matching implying that .
For every set of points in general position, it holds that
5 Future Research
Besides the presented results there are several related directions of research. Below we list some of them, together with open questions emerging from the previous sections.
A natural open problem is the computational complexity of finding compatible matchings of a certain size or even deciding their existence: How fast can we decide if two (or more) given (general or convex) labeled point sets have a perfect compatible matching (or a compatible matching of size )?
Can we close the gaps between the lower and upper bounds, and respectively, for the size of the largest compatible matchings for two labeled point sets (general, convex, or of any other particular order type)?
Can we improve the constructions to match their according probabilistic bounds?
Consider the following game version: two players alternately add an edge which must not intersect any previously added edge. The last player who is able to add such an edge wins. It is not hard to see that for a single set of points in convex position, this is the well-known game Dawson’s Kayles, see e.g. . This game can be perfectly solved using the nimber theory developed by Sprague-Grundy, see also  for a nice introduction to the area. An interesting generalization of Dawson’s Kayles occurs when the players use two (or more) labeled (convex) point sets and add compatible edges.
-  (2008) A central approach to bound the number of crossings in a generalized configuration. In Proceedings of the 4th Latin and American Algorithms, Graphs and Optimization Symposium (LAGOS’07), Vol. 30, pp. 273–278. External Links: Cited by: §4.
-  (2013) The rectilinear crossing number of : closing in (or are we?). In Thirty Essays on Geometric Graph Theory, J. Pach (Ed.), pp. 5–18. External Links: Cited by: §4.
-  (2009) Compatible geometric matchings. Computational Geometry: Theory and Applications 42 (6–7), pp. 617–626. External Links: Cited by: §1, §1.
-  (2003) Towards compatible triangulations. Theoretical Computer Science 296 (1), pp. 3–13. External Links: Cited by: §1, §1.
-  (2018) Linear transformation distance for bichromatic matchings. Computational Geometry: Theory and Applications 68, pp. 77–88. Cited by: §1.
-  (2020) An ongoing project to improve the rectilinear and the pseudolinear crossing constants. ArXiv e-Prints. Cited by: §4.
-  (2017) How to morph planar graph drawings. SIAM Journal on Computing 46 (2), pp. 824–852. External Links: Cited by: §1.
-  (2015) Bichromatic compatible matchings. Computational Geometry: Theory and Applications 48 (8), pp. 622–633. External Links: Cited by: §1.
-  (1993) On compatible triangulations of simple polygons. Computational Geometry: Theory and Applications 3, pp. 27–35. External Links: Cited by: §1.
-  (2018) Compatible paths on labelled point sets. In Proceedings of the 30th Canadian Conference on Computational Geometry (CCCG), pp. 54–60. Cited by: §1.
-  (1997) Constructing piecewise linear homeomorphisms of polygons with holes. In Proceedings of the 9th Canadian Conference on Computational Geometry (CCCG), Cited by: §1.
-  (2009) Compatible embedding for 2d shape animation. IEEE Transactions on Visualization and Computer Graphics 15 (5), pp. 867–879. Cited by: §1.
-  (2001) Winning ways for your mathematical plays. Second edition, Vol. 1, A. K. Peters Ltd.. Cited by: item 4.
-  (2019) Erdős–Szekeres theorem for cyclic permutations. Involve, a Journal of Mathematics 12 (2), pp. 351–360. External Links: Cited by: §1, item i, item 5.
-  (1996) Maximal length common non-intersecting paths. In Proceedings of the 8th Canadian Conference on Computational Geometry (CCCG’96), pp. 185–189. Cited by: §1, §2, item 5.
-  (2004) Intersection-free morphing of planar graphs. In Proceedings of the 11th International Symposium on Graph Drawing (GD’03), G. Liotta (Ed.), LNCS, pp. 320–331. External Links: Cited by: §1.
-  (1999) How to morph tilings injectively. Journal of Computational and Applied Mathematics 101, pp. 117–129. External Links: Cited by: §1.
-  (2004) Paired pointset traversal. In Proceedings of the 15th International Symposium on Algorithms and Computation (ISAAC), R. Fleischer and G. Trippen (Eds.), LNCS, Vol. 3341, pp. 534–544. External Links: Cited by: §1.
-  (2013) Disjoint compatible geometric matchings. Discrete & Computational Geometry 49, pp. 89–131. External Links: Cited by: §1, §1.
-  (1999) Kompatible Triangulierungen ebener Punktmengen. Master’s Thesis, Graz University of Technology. Cited by: §1.
-  (1996) Applications of the crossing number. Algorithmica 16 (1), pp. 111–117. Cited by: §1.
-  (1987) Joint triangulations and triangulation maps. In Proceedings of the 3rd Annual Symposium on Computational Geometry (SCG’87), pp. 195–204. External Links: Cited by: §1, §1.
-  (2013) Counting plane graphs: perfect matchings, spanning cycles, and Kasteleyn’s technique. Journal of Combinatorial Theory, Series A 120 (4), pp. 777–794. External Links: Cited by: §3.
-  (2011) Counting triangulations of planar point sets. Electronic Journal of Combinatorics 18 (1). External Links: Cited by: §3.
-  (2006) On the number of crossing-free matchings, cycles, and partitions. SIAM Journal on Computing 36 (3), pp. 695–720. External Links: Cited by: §3.