Counting and Enumerating Crossing-free Geometric Graphs

We describe a framework for counting and enumerating various types of crossing-free geometric graphs on a planar point set. The framework generalizes ideas of Alvarez and Seidel, who used them to count triangulations in time $O(2^nn^2)$ where $n$ is the number of points. The main idea is to reduce the problem of counting geometric graphs to counting source-sink paths in a directed acyclic graph. The following new results will emerge. The number of all crossing-free geometric graphs can be computed in time $O(c^nn^4)$ for some $c<2.83929$. The number of crossing-free convex partitions can be computed in time $O(2^nn^4)$. The number of crossing-free perfect matchings can be computed in time $O(2^nn^4)$. The number of convex subdivisions can be computed in time $O(2^nn^4)$. The number of crossing-free spanning trees can be computed in time $O(c^nn^4)$ for some $c<7.04313$. The number of crossing-free spanning cycles can be computed in time $O(c^nn^4)$ for some $c<5.61804$. With the same bounds on the running time we can construct data structures which allow fast enumeration of the respective classes. For example, after $O(2^nn^4)$ time of preprocessing we can enumerate the set of all crossing-free perfect matchings using polynomial time per enumerated object. For crossing-free perfect matchings and convex partitions we further obtain enumeration algorithms where the time delay for each (in particular, the first) output is bounded by a polynomial in $n$. All described algorithms are comparatively simple, both in terms of their analysis and implementation.


Introduction
Let P be a set of n points in the plane.We assume P to be in general position, which means that no three points in P are collinear.A geometric graph on P is a simple graph with vertex set P , combined with an embedding into the plane where edges are drawn as straight segments between the corresponding endpoints.Two distinct edges are crossing if their drawings intersect in their respective relative interiors, otherwise they are non-crossing.A geometric graph on P is crossing-free if its edges are pairwise non-crossing.

CS(P )
T (P ) CP(P ) M(P ) ST (P ) SC(P ) Figure 1: The seven defined classes of crossing-free geometric graphs.
We define the set G(P ) of all crossing-free geometric graphs on P , the set CP(P ) of crossing-free convex partitions, the set M(P ) of crossing-free perfect matchings, the set CS(P ) of convex subdivisions, the set T (P ) of triangulations, the set ST (P ) of crossing-free spanning trees, and the set SC(P ) of crossingfree spanning cycles.Figure 1 shows one representative of each defined class on a fixed point set.Note that by a crossing-free convex partition we mean a partition of P in such a way that the convex hulls of individual parts are pairwise disjoint.Convex subdivisions are subdivisions of the convex hull of P into convex faces with points from P as vertices.Note that every crossingfree convex partition and every convex subdivision is represented uniquely by a crossing-free geometric graph which contains all the edges on the boundaries of individual parts and faces.Finally, a triangulation is an edge-maximal crossingfree geometric graph, which is a special case of a convex subdivision.
Following a common notation, we also define the numbers pg(P ) := |G(P )|, cp(P ) := |CP(P )|, pm(P ) := |M(P )|, cs(P ) := |CS(P )|, tr(P ) := |T (P )|, st(P ) := |ST (P )|, and sc(P ) := |SC(P )|.Some of these numbers have received considerable attention.In particular, exponential upper and lower bounds have been established and gradually improved over the past decades.Instead of listing all successive improvements, which are too numerous to count, we summarize the current state of affairs in Table 1.As a reading example, the top-left entry says that pg(P ) = O * (187.53 n ) holds for all point sets P , see [19] (the * indicates that any subexponential factors are ignored).For an always up-to-date list, which includes bounds for many other types of geometric graphs, we refer the interested reader to Sheffer's webpage [23].
In terms of counting, especially triangulations have been studied extensively [1,5,14].Furthermore, for counting many other types of geometric graphs there already exists a general framework [4], which is based on the onion layer structure of a point set.However, for a long time no counting algorithm was always provably faster than enumerating the set whose size was to be determined.For triangulations this changed with a remarkable paper by Alvarez and Seidel [6], who showed how to compute the number tr(P ) in time O(2 n n 2 ).This is always exponentially faster than enumeration because tr(P ) = Ω * (2.43 n ) holds for all sets P , see Table 1.An unrelated approach led to a similar result for the class of all crossing-free geometric graphs.Razen and Welzl [17] showed how to compute pg(P ) in time O * (tr(P )).Since they proved that pg(P ) = Ω * (2.82 n )•tr(P ) holds for all sets P , their algorithm also achieves an exponential speed-up over any procedure that counts by enumerating the whole set G(P ).Furthermore, after the first publication of the present paper [26], Marx and Miltzow discovered a new class of algorithms which make use of the so called cactus layer structure of a triangulation [16].These algorithms run in time n O( √ n) and are able to compute the number of triangulations and related structures exactly.
In the remainder of this paper we develop and make use of an abstract framework that generalizes ideas originally used by Alvarez and Seidel [6] for counting triangulations.Loosely speaking, the technique boils down to the following steps.Fix any set of crossing-free geometric graphs whose elements can be decomposed into reasonably small or simple pieces.For instance, every triangulation can be decomposed into a set of interior-disjoint triangles and, similarly, each crossing-free perfect matching can be decomposed into a set of non-intersecting segments.The aim then is to construct a directed acyclic graph Γ with the following properties.Firstly, each edge in Γ is labeled with one of the aforementioned pieces.Secondly, there exist distinguished source and sink vertices in Γ. Thirdly, there is a natural bijection between source-sink paths in Γ and the fixed set of geometric graphs.By this we mean that given any sourcesink path in Γ, we can collect all the labels appearing on that path and combine them to obtain the corresponding geometric graph.Clearly, given such a graph Γ for one particular class of geometric graphs, the corresponding counting and enumeration problems can be reduced to counting and enumerating source-sink paths in Γ.

Definitions and Results
Let G * P be the set of all crossing-free geometric graphs on all non-empty subsets of P .Elements of G * P are called units, and they can be thought of as the simple "pieces" from the informal introduction.For every unit u ∈ G * P we denote by pts(u) ⊆ P the set of vertex points of u.That is, if u is a geometric graph on a particular subset P ′ of P , then pts(u) = P ′ .
Let us now define a number of useful subsets of G * P .• Let S P be the set of segments with both endpoints in P .That is, each u ∈ S P is a geometric graph on exactly two points of P with the edge between them.
• Let CP P be the set of convex parts with vertex points in P .That is, for each u ∈ CP P the convex hull of pts(u) does not contain any points of Figure 2: The three defined types of crossing-free combinations of T P .The shaded regions represent the shapes of individual elements of T P .
P \ pts(u) (in words, interior points are also vertex points of u).Moreover, u contains all the edges along the boundary of the convex hull of the set pts(u).Observe that all isolated points and segments with endpoints in P are also elements of CP P .
• Let CF P be the set of convex faces with vertex points in P .That is, CF P contains all u ∈ CP P with | pts(u)| ≥ 3 and no interior vertices.The shape of any such u is the bounded and closed region delimited by its edges.
• Let T P be the set of empty triangles with vertex points in P .That is, T P contains all u ∈ CF P with | pts(u)| = 3.
Let us fix a subset U of G * P .For any units u 1 , u 2 ∈ U, if u 1 contains an edge e 1 and u 2 contains a different edge e 2 such that e 1 and e 2 are crossing, then we also say that u 1 and u 2 are crossing.Otherwise, u 1 and u 2 are non-crossing.A combination of U is a subset C of U, and C is crossing-free if the elements of C are pairwise non-crossing.
We denote by C cf (U) the set of all crossing-free combinations of U. Furthermore, a combination C ∈ C cf (U) is called a partition of P if the sets pts(u) of all u ∈ C are pairwise disjoint and if their union is equal to P .We denote by C pt (U) the set of all such partitions of P .Assuming U ⊆ CF P , a combination C ∈ C cf (U) is called a subdivision of the convex hull of P if the shapes of all u ∈ C are pairwise interior-disjoint and if their union is equal to the convex hull of P .We denote by C sd (U) the set of all such subdivisions of the convex hull of P .Figure 2 shows one representative of each type of crossing-free combinations for the special case U = T P .
From now on we will no longer consider the sets G(P ), CP(P ), and so on, as defined in the introduction.Instead, we will talk about crossing-free combinations of specific sets of units.For example, since there is an obvious bijection between the sets C cf (S P ) and G(P ), any counting or enumeration algorithm for one set can be adapted easily for the other.Similarly, there are bijections between the sets C pt (CP P ) and CP(P ), C pt (S P ) and M(P ), C sd (CF P ) and CS(P ), as well as C sd (T P ) and T (P ).
In the same spirit, we define the sets C st P , C sc P ⊆ C cf (S P ) of all crossing-free combinations of S P whose segments form spanning trees and spanning cycles on P , respectively.Definition 1.Let U ⊆ G * P .A combination graph (over U) is a directed and acyclic multigraph Γ with two distinguished vertices ⊥ and ⊤, called the source and sink of Γ, respectively.All edges in Γ, except for those ending in ⊤, are labeled with an element of U.Moreover, the sink ⊤ has no outgoing edges.The size of Γ is the number of vertices and edges in Γ.
For any combination graph Γ and any set C of combinations, we say that Γ represents C if there is a bijection between the set of directed ⊥-⊤ paths in Γ and the set C in the following sense.Taking any ⊥-⊤ path in Γ and building the set of labels on that path yields the corresponding combination in C.
The following are comparatively simple applications of an abstract framework developed in Section 3. The corresponding proofs can be found in Section 4.Many more, in some cases obvious, applications are possible.

Theorem 1 (All geometric graphs).
There exists a combination graph over S P of size O(c n n 3 ) with c < 2.83929 that represents C cf (S P ).

Theorem 2 (Convex partitions).
There exists a combination graph over CP P of size O(2 n n 3 ) that represents C pt (CP P ).

Theorem 3 (Perfect matchings).
There exists a combination graph over S P of size O(2 n n 3 ) that represents C pt (S P ).

Theorem 4 (Convex subdivisions). There exists a combination graph over CF
Theorem 5 (Triangulations; c.f. Theorem 3 in [6]).There exists a combination graph over T P of size O(2 n n 3 ) that represents C sd (T P ).
Within our framework we can explain similar results for spanning trees and spanning cycles.However, these two classes are substantially harder to deal with.Section 7 is devoted to the corresponding proofs.

Theorem 6 (Spanning trees).
There exists a combination graph over S P of size O(c n n 3 ) with c < 7.04313 that represents C st P .

Theorem 7 (Spanning cycles).
There exists a combination graph over S P of size O(c n n 3 ) with c < 5.61804 that represents C sc P .To get a bound on the running time for computing an explicit representation of any one of the combination graphs Γ in the above theorems, it suffices to add another factor n to the bound on the size of Γ. See Section 5 for details.
Given such a representation of Γ, the corresponding counting problem can be solved in time linear in the size of Γ by counting directed ⊥-⊤ paths using standard graph algorithms.After removing all dead ends in Γ, which is also possible in time linear in the size of Γ, enumeration of the corresponding set C requires time at most linear in the length of the longest ⊥-⊤ path per enumerated object.We will abstain from describing the required algorithms in detail, and instead refer to [6] for an example.
Observe that the exponential bases in Theorems 1 to 5 are not larger than the exponential bases of the corresponding lower bounds given in the third row of Table 1.As a corollary we therefore get enumeration algorithms for the sets G(P ), CP(P ), M(P ), CS(P ) and T (P ) whose overall running times are bounded by the length of the output times a polynomial in n.For CP(P ) and M(P ), a small adaptation, which is described in Section 6, results in enumeration algorithms with polynomial delay for each (in particular, the first) output.
Theorem 8.The sets CP(P ) and M(P ) can be enumerated such that the time delay for any output is bounded by a polynomial in n.
With the exception of M(P ), the lower bounds are even strictly larger, which means that our algorithms compute the numbers pg(P ), cp(P ), cs(P ) and tr(P ) with exponential speed-up over any procedures that count by enumerating the respective sets.For spanning trees it might as well be that the constant c in Theorem 6 is smaller than 6.75, but we were unable to prove it.For spanning cycles we cannot always hope for such an exponential speed-up because for a set P of n points in convex position we have sc(P ) = 1.

The Abstract Framework
As before, let P be a set of n points in general position.Furthermore, assume that no two points share the same x-coordinate, which means the points can be ordered as p 1 , . . ., p n from left to right in a unique way.If a point p i is to the left of another point p j , that is, if i ≤ j, then we write p i p j .Recall that pts(u) ⊆ P is the set of vertex points in any u ∈ G * P .We define lft(u) := min (pts(u)) and rgt(u) := max (pts(u)), the left-most and right-most point of u, respectively.For any u 1 , u 2 ∈ G * P , if rgt(u 1 ) lft(u 2 ) holds then we say that u 1 is to the left of u 2 and we also write u 1 u 2 .
For each u we define low(u) ⊆ P and upp(u) ⊆ P , the lower and upper shadow of u, respectively.The set low(u) contains all points in P from which a vertical ray shooting upwards intersects the relative interior of some segment of u.The set upp(u) is defined in an analogous way.Whenever we have either pts(u 1 ) ∩ low(u 2 ) = ∅ or upp(u 1 ) ∩ pts(u 2 ) = ∅ for any u 1 , u 2 , then we say that u 2 depends on u 1 and we write u 1 ⊏ u 2 .The following lemma aims at making this cryptic definition more intuitive.
Here, and only here, by a point on u we mean either a point in pts(u) or a point in the relative interior of some edge of u.
Lemma 1.Let u 1 , u 2 ∈ G * P be arbitrary.Then, u 2 depends on u 1 if and only if there exists a point on u 2 directly (that is, same x-coordinate) and strictly above a point on u 1 .In particular, if u 1 and u 2 are crossing then they are mutually dependent, that is, u 1 ⊏ u 2 and u 2 ⊏ u 1 .
Proof.The "only if" is immediate by definition of u 1 ⊏ u 2 .For the "if", let us fix two points on u 1 and u 2 , respectively, the one on u 2 directly and strictly above the one on u 1 .If either of those points is contained in pts(u 1 ) or pts(u 2 ), respectively, the conclusion u 1 ⊏ u 2 is again immediate.Otherwise, let e 1 and e 2 be the edges of u 1 and u 2 that contain the two respective fixed points in their relative interiors.Without loss of generality we assume that e 1 and e 2 diverge and thus do not intersect towards the left, as illustrated on the right.In case 1, the left endpoint of e 1 is below e 2 , which means pts(u 1 ) ∩ low(u 2 ) = ∅ and hence u 1 ⊏ u 2 .In case 2, the left endpoint of e 2 is above e 1 , which means upp(u 1 ) ∩ pts(u 2 ) = ∅ and hence again u 1 ⊏ u 2 .To ease notation throughout, we use pts(C) and low(C) to denote the sets u∈C pts(u) and u∈C low(u), respectively, where C is any combination.
Besides giving an intuition for the dependence relation, the above lemma turns out to be absolutely crucial for everything that follows.It suggests a safe and practical way of adding a new segment u ∈ S P , say, to a crossingfree combination C of S P .Safe means that we do not introduce any crossings, that is, C ∪ {u} is itself crossing-free.Practical means that we may, to a great extent, remain ignorant of the exact composition of C. Indeed, as long as we know the sets pts(C) and low(C), and provided that we choose u such that pts(u) ∩ low(C) = ∅ and upp(u) ∩ pts(C) = ∅, then no element of C can possibly depend on u and hence, by Lemma 1, C ∪ {u} is crossing-free.
By extension, this suggests a way of constructing a combination C by adding all elements in a succession where earlier occurrences do not depend on later occurrences.An apparent disadvantage is that this will not work for every conceivable subset U of G * P and every crossing-free combination C of U. Most importantly, for it to work, there must be no circular dependencies among elements of C. In the following we formalize this requirement.
Let U ⊆ G * P and let C ⊆ U be arbitrary.An element u of C is extreme (in C) if u ⊏ u ′ holds for all other elements u ′ of C. If it exists, the right-most extreme element in C is the unique extreme element u in C which satisfies u ′ u for all other extreme elements u ′ in C.

Definition 2. Let U ⊆ G *
P and let C be a set of combinations of U. We call C serializable if it is non-empty and if every non-empty C ∈ C contains a right-most extreme element, which we then denote by rex(C).Additionally, C \ {rex(C)} must itself be an element of C.
Let C be a serializable set of combinations of U, and let C, C ′ ∈ C. We will often write C u − → C ′ , which stands for C = C ′ \ {u} and u = rex(C ′ ).Observe that C naturally induces a directed and acyclic graph (actually, a tree) with vertex set C and edges with labels from the set U. Indeed, whenever C u − → C ′ holds we simply add an edge from vertex C to vertex C ′ with label u.A combination graph over U that represents an arbitrary subset of C is obtained by defining ⊥ := ∅ and by adding appropriate unlabeled edges which end in an additional vertex ⊤.However, the resulting combination graph is too large as its size is Θ(|C|).In the following we show how to compress it without losing too many of its nice properties.
Intuitively, to make our combination graph smaller we would like to merge two vertices C 1 and C 2 .This makes sense only if the subtrees rooted at C 1 and C 2 are identical when looking at edge labels.As will be proved later, if C 1 ∼ C 2 holds, coherency of ∼ enforces precisely what we want.
In the remainder of the paper we will always deal with a serializable set C of combinations of some U ⊆ G * P , and an equivalence relation ∼ on C. For any C ∈ C we then define the equivalence class [C] := {C ′ ∈ C : C ′ ∼ C}, where the relation ∼ will be obvious from the context.We also define the set and T is a subset of (C ∼).
As will be described below, the set T allows us to specify the subset of C we are actually interested in.
Every combination problem (U, C, ∼, T) induces a corresponding combination graph Γ = Γ(U, C, ∼, T) over U as follows.The vertices of Γ are all equivalence classes in (C ∼) plus one extra vertex denoted by ⊤.The vertex [∅] is also referred to by ⊥.Existence of ⊥ follows from ∅ ∈ C, an easy consequence of serializability of C. Whenever C u − → C ′ holds, then we add an edge from vertex [C] to vertex [C ′ ] with label u.We do not, however, add the same labeled edge more than once.Lastly, for every vertex [C] in T we add an unlabeled edge which starts in [C] and ends in ⊤.Observe that Γ does not contain any directed cycles because given any such cycle, it would be possible to construct an infinite sequence (C with label u.The following observations are straight-forward consequences of coherency of ∼ and of the way Γ is constructed. Observation 1.The combination graph Γ = Γ(U, C, ∼, T), defined as above, is By induction it can now be shown that for every vertex [C] there is a natural bijection from [C] to the set of directed ⊥-[C] paths in Γ, which implies the following lemma.Proof.The upper bound on the size of Γ holds because it has exactly |(C ∼)|+1 vertices and, since it is deterministic (as in Observation 1) and has no duplicate labeled edges, each vertex has at most |U| + 1 outgoing edges.It only remains to show that Γ represents T.
For each directed path R in Γ let C R denote the set of all labels on R, that is, C R is the combination of U corresponding to the path R.Moreover, for any C ∈ C, the canonical order of C is the unique sequence over all elements in C which is obtained by successively removing right-most extreme elements from C and then putting the removed elements in reverse order.
For every vertex [C] in Γ we now claim the following.Firstly, there exists Thirdly, the labels on any directed ⊥-[C] path R with C R = C appear in canonical order of C. The proof of these claims is by induction over an arbitrary topological ordering of the vertices in Γ.After that, the lemma follows by combining the claims with the fact that Γ is deterministic.
For the first part of the claim, if C = ∅, then [C] = ⊥ and the ⊥-⊥ path without edges works.Otherwise, if C = ∅, then we know that C ′ u − → C for some C ′ and u.By completeness, there is an edge For the second part of the claim, let R be a directed By induction, and without loss of generality, C R ′ = C ′ .By soundness, we have For the third part of the claim, simply observe that in the previous paragraph, the last label on the path R with C R = C ′′ is the right-most extreme element in C ′′ .Hence, this last claim also follows by induction.

Three Simple Applications
We present three generic kinds of combination problems.They directly correspond to the three types of crossing-free combinations depicted earlier in Figure 2.

All Crossing-free Combinations
The main aim of this subsection is to give a proof of Theorem 1.Still, some of the following insights are fairly general and can be used in many different settings.
Let us fix a set of units U ⊆ G * P .We make the explicit assumption that C cf (U), the set of crossing-free combinations of U, is serializable.Then, as follows, a combination C in C cf (U) can be described by a coloring of the point set P with three colors , , and a special marking, e.g., , on one of the points.A point p ∈ P is given the color if p ∈ low(C), it is given the color if p ∈ pts(C) \ low(C), and it is given the color in all other cases.The special marking is put on the left-most point of rex(C).Figure 3 shows, for the special case U = S P , that different crossing-free combinations can have identical such descriptions.Whenever that is the case, we consider two combinations equivalent.More formally, we put C ∼ C ′ if and only if 2 2 Of course, the third condition only makes sense if C and C ′ are non-empty.The goal now is to prove that ∼ is coherent, as in Definition 3. Unfortunately, this endeavor is doomed to fail because for some contrived choices of U we can have C u − → C ′ and, at the same time, C ∼ C ′ .In the language of combination graphs this means that we would have to introduce loops, which leads to a potentially infinite number of source-sink paths.To avoid this problem, we require for any both serializable and progressive.Then, the equivalence relation ∼ on C cf (U), as defined above, is coherent.
, which implies the lemma.
By assumption we have low(C 1 ) = low(C 2 ) and pts(C 1 )\low(C 1 ) = pts(C 2 )\ low(C 2 ).From this and from the fact that u is extreme in C ′ 1 , we first derive that u is also extreme in C ′ 2 .So, assume the opposite, that is, either pts(u) ∩ low(C 2 ) = ∅ or upp(u) ∩ pts(C 2 ) = ∅ holds.In the first case, we get pts(u In the second case, we get at least one of upp(u )), and consequently 2 ) and assuming that u ′ = u, we get u u ′ and thus also rex We define T := (C cf (U) ∼).With Lemma 3 we see that (U, C cf (U), ∼, T) is a combination problem as long as C cf (U) is serializable and progressive.The corresponding combination graph over U is referred to by Γ cf U .Proof (serializable).Let C ∈ C cf (S P ) be arbitrary but non-empty.We prove serializability by exhibiting a right-most extreme element u in C. For this, consider the relative interiors of all segments in C.These segments without endpoints are convex and pairwise non-intersecting.For a set of convex and non-intersecting shapes in the plane it is well known that at least one of them can be translated in the y-direction to infinity in a continuous motion, without intersecting any other segment in the process [24].Any segment with this property corresponds to an extreme element in C. The extreme elements in C now can be ordered from left to right according to their relative positions when projected orthogonally onto the x-axis.The segment u on the far right is a right-most extreme element in C.

Proof (progressive).
For the sake of contradiction, assume that we have C ′ u − → C and C ∼ C ′ for some C, C ′ ∈ C cf (S P ) and u ∈ S P .Let u ′ := rex(C ′ ) (note that the case where C ′ is empty is trivial).We have lft(u) = lft(u ′ ) and we have to distinguish the two cases illustrated on the right.In case 1, we see that rgt(u) ∈ pts(C) \ low(C) but also rgt(u) ∈ pts(C ′ ) \ low(C ′ ) since otherwise u ′ would not be extreme in C ′ .In case 2, we see that rgt(u ′ ) ∈ low(C) but also rgt(u ′ ) ∈ low(C ′ ) since otherwise u ′ would not be extreme in C ′ .Hence, in both cases we get a contradiction to the assumption C ∼ C ′ .The proof of Lemma 5 is a bit tedious.We only sketch the main idea here, and postpone a more careful analysis to Section 8.
Note that for any three consecutive points p i , p i+1 , p i+2 in P , the point p i+1 is either below or above the straight line through p i and p i+2 , as depicted in Figure 4.In both cases we can show that at least one of the 3 3 = 27 different ways of assigning colors to p i , p i+1 , p i+2 does not describe an actual element of C cf (S P ).A bound of O(26 n/3 n) = O(2.963n n) on the size of (C cf (S P ) ∼) then follows after partitioning P into n/3 consecutive triples.
In the first case, if we assign colors , , , there must be two distinct segments which pass over the points p i and p i+2 , respectively, and which pass under p i+1 .Clearly, any two such segments are crossing.In the second case, if we assign colors , , , there must be a segment that passes over p i+1 and under p i and p i+2 .Clearly, only a bent "segment" can achieve that. 3We write α β if a parameter α is approximately equal to β and also strictly smaller.

Note also that if the combination graph Γ cf
SP is constructed bottom-up, as will be explained in more detail in Section 5, then all these impossible colorings are avoided automatically.

Crossing-free Partitions
Let us again fix a set of units U ⊆ G * P .We define the set C pt (U) of all crossingfree combinations C of U for which the sets pts(u) of all u ∈ C are pairwise disjoint and for which low(C) ⊆ pts(C) holds.Figure 5 depicts three of these combinations for the special case U = CP P .Observe that C pt (U) and C pt (U) are different sets, and also observe that we have in fact Assume that C pt (U) is serializable.Similar to the previous subsection, we use two colors , and a special marking on the points in P to describe an element C of C pt (U).A point p receives the color if p ∈ pts(C), and otherwise.The marking is again put on the left-most point of rex(C).If two combinations have identical such descriptions, we consider them equivalent.Formally, we put C ∼ C ′ if and only if One peculiarity in Figure 5 is that some points have been given the color even though there are no incident segments.This is because the set CP P also contains all isolated points, that is, all is always a proper subset of pts(C ′ ).Consequently, an explicit notion of "progressive", as in the previous subsection, is not needed here.Lemma 6.Let U ⊆ G * P with C pt (U) serializable.Then, the equivalence relation ∼ on C pt (U), as defined above, is coherent.
Proof.Let C 1 , C 2 ∈ C pt (U) be non-empty (otherwise, the proof is trivial) with . By making use of the marking in the same way as in the proof of Lemma 3 we get rex(C ′ 2 ) = u, and it follows that Figure 5: Three elements of C pt (CP P ) that are considered equivalent.
We define the set T ⊆ (C pt (U) ∼) which contains all equivalence classes [C] for which pts(C) = P holds.Observe that then T = C pt (U).From Lemma 6 it follows that (U, C pt (U), ∼, T) is a combination problem provided that C pt (U) is serializable.We denote by Γ pt U the corresponding combination graph.
. Theorems 2 and 3 now follow from Corollary 2 and the following two lemmas.
Lemma 7.For any point set P and any subset U of CP P , it holds that C pt (U) is serializable.
Proof.The proof for the existence of right-most extreme elements is analogous to the first part of the proof of Lemma 4.However, proving that C ′ := C \ {u}, where u = rex(C), is also an element of C pt (U) is not completely trivial since we have to verify that low(C ′ ) ⊆ pts(C ′ ) holds.
For the sake of contradiction, let us assume that there exists a point p ∈ low(C ′ ) \ pts(C ′ ).From C ′ ⊆ C we get low(C ′ ) ⊆ low(C) and hence also p ∈ low(C).We now use low(C) ⊆ pts(C), which holds by definition of C pt (U), to obtain p ∈ pts(C).By combining this with the assumption p ∈ pts(C ′ ) we obtain p ∈ pts(u) because pts(C)\pts(C ′ ) = pts(u).It follows that low(C ′ )∩pts(u) is non-empty since it contains at least the point p.This, however, contradicts the fact that u is extreme in C.
Note that in the case of convex partitions, the general bound on the size of the resulting combination graph from Corollary 2 is insufficient to prove Theorem 2 because U = CP P alone can be of size Ω(2 n ).The following lemma is therefore really needed.Lemma 8.For any point set P of size n and any subset U of CP P , the size of Γ pt U is at most O(2 n n 3 ).Proof.We prove that the number of labeled edges in Γ pt U can be bounded by O(2 n n 3 ) from above, which then implies the lemma.
Fix p l , p r ∈ P with p l p r , and let P r l := {p l , p l+1 , . . ., p r−1 , p r } ⊆ P be the set of points between p l and p r .Observe that there are at most 2 r−l+1 convex parts u ∈ CP P for which p l = lft(u) and p r = rgt(u) holds.Let us also fix such a convex part u.Next, we will give a bound on the number of edges in Γ pt U with label u.This bound will only depend on the indices l and r.
Suppose that ] is an edge in Γ pt U and assume further that C u − → C ′ holds.Then, we easily see that low(u) = pts(C) ∩ P r l , where low(u) := low(u) \ pts(u).This means that for each point p ∈ P r l it is determined by u whether p ∈ pts(C) holds or not.For a point p ∈ P \ P r l there are at most two choices, either p ∈ pts(C) or p ∈ pts(C).It follows that there are at most 2 n−(r−l+1) n many vertices [C] with an outgoing edge that is labeled by u.As usual, the additional factor n comes from the special marking.
The total number of labeled edges in Γ pt U can therefore be bounded by

Subdivisions
Let U ⊆ CF P , which means in particular that the shape of each unit u is defined.We define the set C šd (U) which contains all combinations C of U for which the following holds.There exists an x-monotone polygonal chain, denoted by chn(C), which starts in p 1 , ends in p n , has only points from P as vertices, and satisfies the following with regard to C. The shapes of all u in C form a subdivision of the region between chn(C) and the lower convex hull of P , by which we mean that the shapes are pairwise interior-disjoint and each point of the plane in the interior of that region is contained in the shape of at least one element u of C. As depicted in Figure 6, we describe such a combination C by giving the vertex points of chn(C) the color , by giving all other points the color , and by adding the usual marking.Guided by this description, we put C ∼ C ′ if and only if • lft(rex(C)) = lft(rex(C ′ )).Lemma 9. Let U ⊆ CF P with C šd (U) serializable.Then, the equivalence relation ∼ on C šd (U), as defined above, is coherent.
From the definition of C šd (U), it is immediate that also Proof.The proof for the existence of right-most extreme elements is again analogous to Lemma 4.Moreover, it is not hard to see that C ′ := C \ {u}, where u = rex(C), is also an element of C šd (U).Simply observe that the upper convex hull of the shape of u must be contained in chn(C), which means that chn(C ′ ) is obtained from chn(C) by replacing the upper hull of u with its lower hull.

Using the usual argument involving the marking we see that rex(C
Similar to the previous subsection, the next lemma is not implied by the general bound from Corollary 3. Lemma 11.For any point set P of size n and any subset U of CF P , the size of Γ sd U is at most O(2 n n 3 ).Proof.Analogous to the proof of Lemma 8.

Representations of Combination Graphs
In the preceding sections, vertices of a combination graph Γ were always treated as equivalence classes over a set of combinations.Of course, this is a very inefficient way to represent them in an actual algorithm.However, in all cases we have seen how to describe these equivalence classes by an assignment of a constant number of colors to the points in P and an index to the point with the special marking.It is thus easy to encode vertices of Γ with a linear number of bits for the coloring and a logarithmic number of bits for the index.
As for the construction of Γ, this is most easily done bottom-up.That is, we start with the source ⊥, we enumerate all outgoing edges and add the corresponding new vertices to our representation of Γ.We continue this process, that is, pick a vertex and enumerate all outgoing edges, until we have done so for all vertices in Γ.
In all cases except for convex partitions and convex subdivisions, the enumeration of outgoing edges for a given vertex can be done in the most wasteful way while still staying within the required time bounds.For example, in the case of Theorem 1, for every vertex in Γ cf SP we can simply enumerate the whole set S P and check for each segment whether it corresponds to an outgoing edge in linear time.In the case of Theorems 2 and 4 we have to be more careful since we do not have the time to enumerate the whole set CP P , say, for every vertex in Γ pt CPP .A simple solution is to enumerate the set CP P only once at the beginning and to find for each enumerated u ∈ CP P all vertices in Γ pt CPP for which u corresponds to an outgoing edge.The running time of this approach can be bounded by using the same arguments as in the proof of Lemma 8.

Enumeration with Polynomial-Time Delay
In this section we sketch an additional trick4 , which allows us to enumerate the sets of crossing-free convex partitions and perfect matchings with polynomialtime delay.That is, we give algorithms which output the elements of CP(P ) or M(P ) in some order and without repetitions, and such that the time we have to wait for any new output is not larger than a polynomial.
As already discussed in Section 2, from Theorems 2 and 3 we get enumeration algorithms for these two sets that run in time O * (cp(P )) and O * (pm(P )), respectively.However, while the time delay between any two outputs is bounded by a polyomial, the time delay before the first output is exponential.Precisely, there is a preprocessing phase that might take time Θ * (2 n ) during which we construct representations of the respective combination graphs Γ pt CPP and Γ pt SP and during which we do not produce any outputs.The trick is to hide this preprocessing phase by outputting Θ * (2 n ) objects obtained by other means.
Theorem 8.The sets CP(P ) and M(P ) can be enumerated such that the time delay for any output is bounded by a polynomial in n.
Proof.We begin by defining a sufficiently large subset EM(P ) of CP(P ) and M(P ).Elements of this set are called easy perfect matchings, and they are constructed recursively.If P is the empty set, then EM(P ) = M(P ).Otherwise, let p 1 be the left-most point and let p i be any other point.Let P i be the set of points that are to the left of the directed line through p 1 and p i , and let P ′ i be the set of points that are to the right of that line.The set EM(P ) contains all perfect matchings that, for any choice of i, are composed of the edge p 1 p i and two easy perfect matchings on P i and P ′ i , respectively.It is clear that easy perfect matchings are crossing-free.Furthermore, note that efficient enumeration and recognition algorithms for the set EM(P ) are easy to obtain from the definition.Lastly, the number of easy perfect matchings on even-sized point sets satisfies the Catalan recurrence, and thus |EM(P )| = Θ(2 n /n 3/2 ).Refer to [11] for more details, where these objects are used to prove a corresponding lower bound on the number of perfect matchings.
We now have everything that we need.In order to enumerate the set M(P ), say, with polynomial-time delay, we start the construction of Γ pt SP .During this preprocessing phase, we output elements of EM(P ) in appropriate time intervals.Once we have an explicit representation of Γ pt SP , we continue the enumeration by outputting arbitrary elements of M(P ).Of course, whenever we have a new potential output, we have to check first whether it is an easy perfect matching, which means that it has been output before.If that is the case, then we simply discard it.One final caveat now is that there might be a long period where we have to discard all potential outputs, which might again lead to a delay that is no longer polynomially bounded.However, this is easily fixed for example by only using up half of the set EM(P ) during the preprocessing phase, and by using the other half as a substitute for every other discarded output during the second phase.

Spanning Trees and Spanning Cycles
In this section we show that it is possible to construct non-trivial combination graphs for the sets of crossing-free spanning trees and spanning cycles.
Spanning trees and spanning cycles are harder to deal with than anything that we have encountered before.The reason is that these graphs have properties which hold globally.For example, the construction of Γ pt SP in Section 4.2 can be adapted in such a way that source-sink paths correspond to 2-regular (instead of 1-regular) crossing-free geometric graphs.We simply would have to keep track of the degree of each vertex (whether it is currently 0, 1, or 2, which means we would need three instead of two colors) and in the end require that every vertex has degree 2. However, if we want that source-sink paths correspond only to crossing-free spanning cycles, then we also need that each such path corresponds to a connected geometric graph.Being connected is such a property that holds globally, and there seems to be no obvious and efficient way to deal with it.To get rid of this problem, at least in the case of spanning trees and spanning cycles, we next state an auxiliary lemma.It will allow us to translate connectivity into simpler features which can be enforced on a local level.
Let G be a directed multigraph 5 and let v be a vertex in G. G is rootoriented towards v if all vertices in G have exactly one outgoing edge, except for v, which has no outgoing edges.If G is root-oriented towards v, then v is called the root of G. Observe that being root-oriented implies that G has exactly n − 1 edges, where n is the number of vertices in G.It does however not imply that G is connected or, in other words, a tree.The reason is that there might be a connected component with a directed cycle.Such components are always disconnected from the root.
A plane drawing of G is a drawing which maps all vertices of G to distinct points in the plane and which draws all edges as simple curves such that no two edges intersect except possibly in a common endpoint.Given two respective plane drawings of directed multigraphs G 1 and G 2 , we say the drawings are disjoint if they do not use any common points in the plane.Moreover, the drawings are entangled if for each cycle in either drawing, both its interior and exterior contain a point used by the respective other drawing.Finally, for fixed vertices v 1 in G 1 and v 2 in G 2 we say the two drawings are tangent in v 1 and v 2 if the points corresponding to v 1 and v 2 can be connected by an additional curve without intersecting any points already used in either drawing.
Lemma 12. Let G 1 and G 2 be finite, directed multigraphs that are root-oriented towards v 1 and v 2 , respectively.Then, there exist plane drawings of G 1 and G 2 that are disjoint, entangled and tangent in v 1 and v 2 if and only if both G 1 and G 2 are trees.
Proof.If G 1 and G 2 are trees then the desired drawings clearly exist.To prove the other direction of the lemma, it suffices to show that both G 1 and G 2 do not contain any cycles.
Let us thus fix plane drawings of G 1 and G 2 with the desired properties and assume that G 1 contains a cycle C.Without loss of generality, the root v 2 of G 2 is contained in the exterior of C. Since the drawings of G 1 and G 2 are tangent in v 1 and v 2 , also the root v 1 of G 1 is contained in the exterior of C. Now, from all cycles of either G 1 or G 2 that are contained in the interior of C, let us select a minimal cycle C ′ .Minimal means that C ′ does itself not contain any other cycles in its interior.Such a cycle exists since G 1 and G 2 are finite.We assume that C ′ again belongs to G 1 , the other case being analogous.Since the drawings of G 1 and G 2 are entangled, we get a vertex of G 2 in the interior of C ′ .Starting from this vertex we now follow directed edges in G 2 .Since the drawings of G 1 and G 2 are disjoint, we never leave the interior of C ′ , which in particular means that we never reach v 2 .However, since G 2 only has a finite number of vertices and all except for v 2 have an outgoing edge, we are bound to get into a cycle eventually.Clearly, this new cycle of G 2 is still contained in the interior of C ′ , in contradiction to minimality.
We make two adaptations to the abstract framework from Section 3. Note that all definitions and lemmas from that section extend naturally to the following setting.
A set of units U is no longer understood as a simple subset of G * P .Firstly, in this section we restrict units to be segments from the set S P .Secondly, a unit can have additional information attached to it.As an example, U could be defined as the set of directed segments.That is, each u in U would correspond to an element of S P , but it would also have a direction.In particular, this means that multiple elements of U can correspond to the same geometric graph.
Moreover, a combination C of U is still understood as a subset of U.However, we do not allow the same geometric graph to appear twice in C. That is, in the above example, the elements of C must be pairwise distinct as segments.It is not sufficient if only their directions differ.
We conclude by giving some definitions and conventions that will be used in the following two subsections.We refer to Figure 7 for illustrations.
We assume there are unique points p, p ∈ P with largest and smallest ycoordinates, respectively.The horizontal line through p is called the bottom.
For every crossing-free combination C of some set of units U we define a set of faces as follows.From the endpoints of each segment u in C we draw vertical rays (called borders) downwards until we hit either the bottom or the relative interior of another segment in C.Then, a face in C is a maximal connected region in the plane.There is one unbounded region above the bottom, which is called the infinite face.The unbounded region below the bottom is not a face and will be ignored.Furthermore, we say that two faces in C are adjacent if they share a (vertical) border.
Borders are always directed either left-to-right or right-to-left.In a combination C, the out-degree of a face is the number of borders directed away from that face.We further say that a point p exposes a drain to the left if the border below p is directed left-to-right and the region directly to the left of that border belongs to the infinite face.An analogous definition is given for exposing a drain to the right.If a point exposes a drain either to the left or to the right, we simply say that it exposes a drain.

Spanning Trees
We define a very special set S st P of units.Each u in S st P is a segment from the set S P with a direction.Additionally, below either endpoint of u a border might be attached that is directed either left-to-right or right-to-left.
We also define the set C št P , which contains all crossing-free combinations C of S st P with the following additional properties. 6In what follows, the out-degree of a point p ∈ P in C denotes the number of segments in C that have p as an endpoint and are directed away from p.
• The point p has out-degree 0 in C.
• Every point p ∈ P has out-degree at most 1 in C.
• Every point p ∈ low(C) has out-degree 1 in C.
• Every finite face in C has out-degree 1.
Examples can be seen in Figure 8 (a), (b) and (c).The combination in (d) violates the last three properties.
Note that all of the above properties are maintained when removing the right-most extreme element from a combination from the set C št P .We thus get the following lemma.
Lemma 13.For any point set P , C št P is serializable.We reuse the three colors , , and the special marking from Section 4.1 with their original meaning to describe elements of C št P , as already depicted in Figure 8.However, that same figure illustrates that we cannot reuse the old equivalence relation because it is not coherent.There are three problems we have to deal with.Firstly, the out-degree of a point can become larger than 1.Secondly, a point with out-degree 0 can disappear in the lower shadow of a segment.Thirdly, a finite face with out-degree not equal to 1 can be created.To make the equivalence relation coherent, it suffices to partition the points with color into six smaller categories.That is, we have to replace the color with 6 new colors, resulting in a total of 8 colors, and then consider two combinations equivalent if they agree in that new coloring and also in the special marking.We will not define the colors explicitly here, but only explain what information we have to keep track of.
For each point with color we keep track of its out-degree, that is, whether it is currently 0 or 1.This allows us to avoid the first two problems mentioned earlier.Furthermore, for each point with color we keep track of whether and where it exposes a drain.This allows us to avoid the third problem because whenever a new segment u is added to a combination C, a new finite face is created below u, and the out-degree of that face is determined by the number of exposed drains in the lower shadow and at the endpoints of u.Indeed, observe that borders corresponding to exposed drains in the lower shadow of u become out-borders of the new finite face.Also, an exposed drain at the left endpoint, say, of u becomes an out-border of the new face if and only if it is exposed to the right.This is why we also have to know the side a drain is exposed to.
We define an equivalence relation ∼ on C št P based on the 2 + 2 • 3 = 8 colors from the preceding discussion, and with the usual marking.The above intuition can be made precise, and the following can be proved.Lemma 14.The equivalence relation ∼ on C št P , as defined above, is coherent.We define the set T ⊆ (C št P ∼) which contains [C] if and only if every point (except for p) has out-degree 1 in C and the infinite face has out-degree 0 (equivalently, there are no exposed drains in C).Let Γ st P be the combination graph corresponding to the combination problem (S st P , C št P , ∼, T).Theorem 6 with c = 8 now follows from Lemma 2 and from the following insight.
Lemma 15.There is a natural bijection between the sets T and ST (P ) in the following sense.For any combination C in T, building the geometric graph on P with edges that correspond to the segments in C yields the corresponding crossing-free spanning tree in ST (P ).
Proof.Any C in T induces two directed multigraphs G 1 and G 2 with corresponding plane drawings, as follows.
G 1 is the graph with vertex set P and edges that correspond to the directed segments in C. By definition of C št P and T, we at least know that G 1 is rootoriented towards p, as exemplified in Figure 9 (a).
For the vertices of G 2 we choose one arbitrary point in the interior of each face in C. Two vertices in G 2 are connected if their corresponding faces in C are adjacent.The direction of that edge is chosen in accordance with the direction of the corresponding border in C. Again by definition of C št P and T, G 2 is root-oriented towards the vertex corresponding to the infinite face in C, as exemplified in Figure 9 (b).
It is clear that the drawings of G 1 and G 2 can be chosen such that they are disjoint, entangled, and tangent in p and the infinite face.The proof is concluded by applying Lemma 12 and by observing that any spanning tree on P can be root-oriented towards p in a unique way.
One can prove that c < 8 by adapting the arguments from Section 4.1.With some more work, we get c < 7.04313, as will be shown in Section 8.

Spanning Cycles
We define a slightly different set of units S sc P .In the same way as in the previous subsection, below the endpoints of any segment u in S sc P directed borders can be attached.Here, however, the segment u itself does not have a direction.
We also define the set C šc P , which contains all crossing-free combinations C of S sc P with the following additional properties.In what follows, the degree of a point p ∈ P in C stands for the number of segments in C that have p as an endpoint.Also, if the size of C is n, the last finite face in C is defined as the face directly below the right-most extreme segment in C. All other finite faces are called normal.
• If |C| = n, the last finite face in C has out-degree 0.
• Every point p ∈ P has degree at most 2 in C.
• Every point p ∈ low(C) has degree 2 in C.
• Every normal finite face in C has out-degree 1.
Note again that the above properties are maintained when removing the right-most extreme element from a combination from the set C šc P .Lemma 16.For any point set P , C šc P is serializable.It is clear that we have to keep track of the degrees of all points.For one last time, we change the meaning of the colors , , and use them to identify points of degree 0, 1, and 2, respectively.
Unsurprisingly, and similar to the previous subsection, an equivalence relation based only on these three colors and the usual marking is not coherent, as illustrated in Figure 10.The only problem, however, is that finite faces which do not have the right out-degree can be created.A by now routine proof shows that these three colors are already sufficient to avoid crossings.
To avoid finite faces with wrong out-degrees, we split into 3 subcolors, and we split into 2 subcolors, giving us a total of 6 different colors which are then used to define an equivalence relation ∼ on C šc P .For each point with color we keep track of whether it exposes a drain.If it does, then we also keep track of whether it is to the left or to the right.Remember, this extra information is relevant if and only if the point in question is one of the endpoints of a new segment.For a point with color we only keep track of whether it exposes a drain or not.The reason why this is sufficient is that such a point has, by definition, degree 2 already and cannot be an endpoint of a new segment.Lemma 17.The equivalence relation ∼ on C šc P , as defined above, is coherent.We define the set T ⊆ (C šc P ∼) which contains [C] if and only if every point has degree 2 in C and the infinite face has out-degree 0. Let Γ sc P be the combination graph corresponding to (S sc P , C šc P , ∼, T).Theorem 7 with c = 6 now follows from Lemma 2 and from the following insight.The better bound c < 5.61804 will be proved in Section 8.

Lemma 18.
There is a natural bijection between the sets T and SC(P ) in the following sense.For any combination C in T, building the geometric graph on P with edges that correspond to the segments in C yields the corresponding crossing-free spanning cycle in SC(P ).
Proof.For any C in T we know that each point is of degree 2, which means that C is a set of disjoint cycles, as exemplified in Figure 11  Clearly, there exist plane drawings of G E and G O which are disjoint, entangled, and also tangent in the respective roots.Applying Lemma 12 hence concludes the proof.

Bounding the Size of Combination Graphs
In this final section, we show how to prove the bounds on the constants c in Theorems 1, 6 and 7. Recall that vertices of combination graphs can be interpreted as colorings of P with a finite number of colors.The following proofs make use of the fact that certain patterns cannot occur in these colorings because of geometric constraints.Additionally, in the case of spanning trees and spanning cycles, we can improve the bounds further by identifying and discarding vertices from which the sink ⊤ can no longer be reached.

All geometric graphs
Recall the definition of the set C cf (S P ) and the corresponding equivalence relation ∼ from Section 4.1.We are left to prove the following lemma.Our proof strategy now is as follows.We ignore the indices k C and give an upper bound of O(α n ) on the number of strings s C which correspond to a combination C in C cf (S P ).From this, the desired upper bound easily follows after adding an additional factor n. We do so by defining an injective function from a set A to a set B. Set A contains all strings s C .Set B contains all strings from { , , } n which do not contain any subsequences of the form ( , , . . ., , ), that is, one or more consecutive symbols enclosed by two symbols .Such subsequences are called forbidden henceforth.The bound on |A| then follows from |B| = Θ(α n ), an elementary counting problem whose proof we omit.
Let us define such an injective function f : A → B. For any a ∈ A we construct f (a) by the following process.We iterate over a from left to right, and whenever we find a forbidden subsequence ( , , . . ., , ) we replace it by a sequence ( , , . . ., , ) of the same length.For example, if a = ( , , , , , , ) then f (a) = ( , , , , , , ).However, if a = ( , , , , ) then f (a) = ( , , , , ) because the second forbidden subsequence in a is no longer a forbidden subsequence after the first one has been replaced.
Clearly, f is a function A → B. It only remains to prove injectivity.Towards a contradiction, assume thus that a = a ′ satisfy f (a) = f (a ′ ) =: b.Let i be the smallest index with a i = a ′ i .We distinguish the three cases b i = , b i = and b i = .
For b i = , observe that the function f never uses the symbol to replace an entry in a or a ′ .Hence, a i = a ′ i = , a contradiction.For b i = , we may assume without loss of generality that a i = and a ′ i = .Furthermore, a i must be either the first or last letter in a forbidden subsequence in a that is replaced under f .From minimality of i it follows that it is the first letter.Since the following argument generalizes to larger forbidden subsequences, we can now assume for reasons of simplicity that we have (a i , a i+1 , a i+2 ) = ( , , ) and (b i , b i+1 , b i+2 ) = ( , , ).There are two possibilities for the corresponding letters in a ′ .
), then observe that the points p i , p i+1 , p i+2 from the set P must form a left turn, that is, p i+1 is strictly below the segment with endpoints p i and p i+2 .The reason is that a ′ = s C ′ corresponds to a combination C ′ in C cf (S P ), and there must be a segment in C ′ which has p i+1 , but neither p i nor p i+2 , in its lower shadow.On the other hand, (a i , a i+1 , a i+2 ) = ( , , ) implies that the points p i , p i+1 , p i+2 form a right turn, that is, p i+1 is strictly above the segment with endpoints p i and p i+2 .Again, this holds because also a = s C corresponds to a combination C, and there must be a segment in C which has both p i and p i+2 , but not p i+1 , in its lower shadow.We have derived a contradiction because these two arrangements of p i , p i+1 and p i+2 are mutually exclusive.
• If (a ′ i , . . ., a ′ i+3 ) = ( , , , ) and (b i , . . ., b i+3 ) = ( , , ), that is, index i + 2 is the beginning of a forbidden subsequence in a ′ , then we further obtain (a i , . . ., a i+3 ) = ( , , , ).A contradiction can be derived in the same manner as in the previous case.The symbols in a ′ imply that the points p i , p i+1 and p i+3 form a left turn because there exists a segment which has p i+1 and p i+2 , but neither p i nor p i+3 , in its lower shadow.The symbols in a imply that p i , p i+1 and p i+3 form a right turn because there exists a segment which has p i , p i+2 and p i+3 , but not p i+1 , in its lower shadow.
For b i = , we may assume that a i = , a ′ i = , and that in a there exists a forbidden subsequence that starts before index i and ends after index i and that is replaced under f .Again for simplicity we assume (a i−1 , a i , a i+1 ) = ( , , ) and (b i−1 , b i , b i+1 ) = ( , , ), longer sequences can be treated similarly.By minimality of i we get a ′ i−1 = a i−1 = .The only possible way for a ′ i−1 = to be replaced by b i−1 = under f is if a ′ i−1 is the last letter in a forbidden subsequence in a ′ .Therefore, (a ′ i−3 , a ′ i−2 , a ′ i−1 ) = ( , , ) and (b i−3 , b i−2 , b i−1 ) = ( , , ), again without loss of generality.By minimality of i we further get (a i−3 , a i−2 , a i−1 ) = ( , , ).In summary, we have derived (a i−3 , . . ., a i+1 ) = ( , , , , ) and (b i−3 , . . ., b i+1 ) = ( , , , , ).This is a contradiction because at most one of these two forbidden subsequences in a is replaced under f .

Spanning Trees
Recall the definition of Γ st P from Section 7.1.The following lemma is all that is left to complete the proof of Theorem 6. Lemma 19.For any P , there exists a subgraph of Γ st P induced by a vertex subset V ⊆ (C st P ∼) satisfying |V | = O(α n n), where α 7.04313, and such that V contains all vertices that appear on at least one ⊥-⊤ path in Γ st P .Moreover, given a vertex of Γ st P , we can decide in time O(n) whether it belongs to V .Note that since we are able to recognize vertices from the set V efficiently, the smaller subgraph of Γ st P can also be constructed efficiently bottom-up, simply by discarding any encountered vertices that do not belong to V .safely be defined as the subset of all vertices of Γ st P that do not contain this final pattern.
• Let p i and p i+1 be two consecutive points such that p i exposes a drain to the right and p i+1 exposes a drain to the left.Then, clearly, the out-degree of the infinite face in C is different from 0 and thus there is no direct connection from [C] to ⊤ in Γ st P .Moreover, any new segment u that consumes the drain exposed by p i (that is, the border below p i becomes an out-border of the new face directly below u) must also consume the drain exposed by p i+1 , as illustrated on the right.However, the face below u having out-degree at least 2 contradicts the definition of C št P .Therefore, the two drains exposed by p i and p i+1 can never be consumed and the sink ⊤ can thus never be reached.Hence, we can safely discard any vertices with the pattern ( 4 | 7 , 3 | 6 ).Additionally, suppose that p i and p i+k (taking the role of p i+1 ) are separated by any number of points of degree 0 or points in the lower shadow of C.Then, no matter how a new segment u is added, we again get a pair of drains facing each other and all points in between are either of degree 0 or in the lower shadow.Hence, we can further discard any vertices with the pattern ( 4 | 7 , 1 | 8 , . . ., 1 | 8 , 3 | 6 ).

u u u
Let A be the subset of { 1 , . . ., 8 } n containing only strings without subsequences belonging to the three patterns from the above observations.Then, it can be shown that |A| = Θ(α n ) using standard techniques, and the lemma follows.

Spanning Cycles
Finally, recall the definition of Γ sc P from Section 7.2.The following lemma concludes the proof of Theorem 7.
Lemma 20.For any P , there exists a subgraph of Γ sc P induced by a vertex subset V ⊆ (C šc P ∼) satisfying |V | = O(α n n), where α 5.61804, and such that V contains all vertices that appear on at least one ⊥-⊤ path in Γ sc P .Moreover, given a vertex of Γ sc P , we can decide in time O(n) whether it belongs to V .Proof.We again start by giving specifications for the colors 1 , 2 , . . ., 6 that are assigned to the points in P for any given combination C in C šc P .Color 1 means that the corresponding point p has degree 2 and exposes no drain.Color 2 means that p has degree 2 and exposes a drain.Color 3 means that p has degree 1 and exposes no drain.Color 4 means that p has degree 1 and exposes a drain to the left.Color 5 means that p has degree 1 and exposes a drain to the right.Color 6 means that p has degree 0.
The following observation is similar to the third observation in the proof of Lemma 19.Let C be a combination in C šc P and let p i and p i+1 be two consecutive points.If p i exposes a drain to the right and p i+1 exposes a drain to the left in C, then C cannot be augmented in such a way that the infinite face has outdegree 0 without creating finite faces with out-degree larger than 1.In other words, the vertex [C] does not appear on any ⊥-⊤ path in Γ sc P and may safely be discarded.The same holds for two not necessarily consecutive points p i and p i+k such that again p i exposes a drain to the right and p i+k exposes a drain to the left, and such that all points in between p i and p i+k have either degree 0 or 2. No matter how a new segment u is added to C, we will again end up with a combination with two exposed drains facing each other and only points of degree 0 or 2 in between.

Lemma 2 .
Let (U, C, ∼, T) be a combination problem and let Γ be the corresponding combination graph.Then, Γ represents T and the size of Γ is at most O(|(C ∼)| • |U|).

Figure 3 :
Figure 3: Three elements of C cf (S P ) that are considered equivalent.
Theorem 1 follows by invoking Corollary 1 with U = S P and by making use of the next two lemmas.The first one essentially shows that C cf (S P ) is a well-behaved set.The second one gives us a better upper bound on the size of Γ cf SP .Observe, however, that a bound of O(3 n n 3 ) is immediate because we can encode equivalence classes with 3 colors and with one marking, and because of |S P | = O(n 2 ).

Lemma 4 .
For any point set P , C cf (S P ) is both serializable and progressive.

2 Lemma 5 .
For any set P of n points, the relation ∼ partitions C cf (S P ) into at most O(α n n) equivalence classes, that is, |(C cf (S P ) ∼)| = O(α n n), where α 2.83929. 3

Figure 4 :
Figure 4: Three consecutive points can always be colored in a way that does not correspond to an element of C cf (S P ).

Figure 6 :
Figure 6: Three elements of C šd (CF P ) that are considered equivalent.
problem and we denote by Γ sd U the corresponding combination graph.Corollary 3.If U ⊆ CF P is such that C šd (U) is serializable, then Γ sd U represents C sd (U) and the size of Γ sd U is at most O(|(C šd (U) ∼)| • |U|).Theorems 4 and 5 now follow from Corollary 3 and the following two lemmas.Lemma 10.For any point set P and any subset U of CF P , it holds that C šd (U) is serializable.

Figure 7 :
Figure 7: The thick line is the bottom.Dotted lines are borders.The shaded region is a face with out-degree 1. Points which expose a drain to the left are marked with .Points which expose a drain to the right are marked with .

Figure 8 :
Figure 8: The elements of C št P in (a) and (c) cannot be considered equivalent.

Figure 9 :
Figure 9: Illustrations for the proof of Lemma 15.

Figure 10 :
Figure 10: The elements of C šc P in (a) and (c) cannot be considered equivalent.
(a).Similar to the proof of Lemma 15, C induces two directed multigraphs G E and G O .The vertex set of G E is the set of faces in C contained in an even number of cycles.The vertex set of G O is the set of faces in C contained in an odd number of cycles.In both G E and G O , two vertices are connected by an edge if the corresponding faces in C are adjacent.The direction of each edge reflects the direction of the corresponding border in C. By definition of C šc P and T, G E and G O are root-oriented towards the infinite face and the last finite face in C, respectively, as exemplified in Figure 11 (b).

Figure 11 :
Figure 11: White faces are vertices in G E .Shaded faces are vertices in G O .