From Crossing-Free Graphs on Wheel Sets to Embracing Simplices and Polytopes with Few Vertices

A set $P = H \cup \{w\}$ of $n+1$ points in general position in the plane is called a \emph{wheel set} if all points but $w$ are extreme. We show that for the purpose of counting crossing-free geometric graphs on $P$, it suffices to know the so-called \emph{frequency vector} of $P$. While there are roughly $2^n$ distinct order types that correspond to wheel sets, the number of frequency vectors is only about $2^{n/2}$. We give simple formulas in terms of the frequency vector for the number of crossing-free spanning cycles, matchings, $w$-embracing triangles, and many more. Based on these formulas, the corresponding numbers of graphs can be computed efficiently. Also in higher dimensions, wheel sets turn out to be a suitable model to approach the problem of computing the \emph{simplicial depth} of a point~$w$ in a set~$H$, i.e., the number of simplices spanned by~$H$ that contain~$w$. While the concept of frequency vectors does not generalize easily, we show how to apply similar methods in higher dimensions. The result is an $O(n^{d-1})$ time algorithm for computing the simplicial depth of a point $w$ in a set $H$ of $n$ $d$-dimensional points, improving on the previously best bound of $O(n^d\log n)$. Configurations equivalent to wheel sets have already been used by Perles for counting the faces of high-dimensional polytopes with few vertices via the Gale dual. Based on that we can compute the number of facets of the convex hull of $n=d+k$ points in general position in $\mathbb{R}^d$ in time $O(n^{\max\{\omega,k-2\}})$ where $\omega \approx 2.373$, even though the asymptotic number of facets may be as large as $n^k$.


Introduction
Computing the number of crossing-free straight-line drawings of certain graph classes (e.g., triangulations, spanning trees, etc.) on a planar point set is a well-known problem in computational and discrete geometry. While for point sets in convex position many of these numbers have simple closed formulas, it seems difficult to compute them efficiently for a given general point set, or to provide tight upper and lower bounds. In this work, we provide means for solving these problems for a special class of point sets which we call wheel sets.
Let P = H ∪ {w} be a set of n + 1 points in the plane. Unless stated otherwise, P is assumed to be in general position (i.e., no three points on a common line) and the points in H are assumed to be extreme (i.e., vertices of the convex hull of P ). P is in convex position if all points including w are extreme, and P is a wheel set if all points except w are extreme. If P is either of them, then we call it a conowheel set. We denote by P con a concrete set in convex position (say, the vertex set of a regular (n + 1)-gon) and by P bar a barely-in wheel set (i.e., H is the vertex set of a regular n-gon and w is sufficiently close to an edge e of the n-gon in such a way that w is in the interior of every triangle spanned by e and a third point of H).
The numbers of triangulations and pseudo-triangulations on wheel sets [30], as well as perfect matchings [32], have been studied before. Our work generalizes these approaches. Wheel sets have also been used to represent vectors in the investigation of high-dimensional polytopes with few vertices; already in the 1960s, Perles counted the number of combinatorially different wheel sets (as reported by Grünbaum [19]). In the terminology of modern discrete geometry, these correspond to the different order types of wheel sets.
Order types. The order type of a point set P in general position is a combinatorial description that assigns an orientation (either clockwise or counterclockwise) to every ordered triple of points. Two point sets are said to have the same order type if there exists a bijection between the two sets that preserves these orientations [17]. We follow the practice of considering two point sets to have the same order type if there exists a bijection that reverses all orientations.
Many combinatorial properties of a point set can be recovered from its order type. In particular, the order type determines whether two segments with endpoints in P cross, and whether a given point in P is extreme. It is not hard to see that all sets in convex position have the same order type. However, the same is not true for wheel sets. Theorem 1. The number of distinct order types of conowheel sets of size n + 1 is 1 1 4n 2 k|n ϕ(k)2 n/k + 2 (n−3)/2 = Θ(2 n /n) .
The above formula has been obtained first by Perles (as stated, without proof, in [19,Chapter 6.3]) for the number of simplicial polytopes with few vertices, and we explain the connection to wheel sets in Section 4. Perles also counted the number of equivalent so-called distended standard forms of Gale diagrams, which basically correspond to wheel sets with different order types. In Section 2 we describe this correspondence.
Frequency vectors. While the order type of a point set determines the set of crossingfree geometric graphs on it, we show in Section 3 that we can rely on the following, coarser classification when only considering wheel sets.
Let P = H ∪ {w} be a conowheel set and let h ∈ H be arbitrary. Let l(h) denote the number of points strictly to the left of the directed line going from w to h, and let r(h) denote the number of points strictly to the right of that line. The frequency vector of P is the vector F (P ) = (F 0 , F 1 , . . . , F n−1 ) where F i is the number of points h ∈ H satisfying | l(h) − r(h)| = i. Consider the following examples for n = 7.
F (P con ) = (1, 0, 2, 0, 2, 0, 2) F (P bar ) = (1, 0, 2, 0, 4, 0, 0) Note that the frequency vector can be computed in O(n log n) time by radially sorting H around w. It is also clear that the order type determines the frequency vector. However, the opposite is not true. In Section 2, we give a complete characterization of frequency vectors, which allows us to conclude the following.
Theorem 2. For any n ≥ 1, the number of frequency vectors realizable by a conowheel set over n + 1 points is exactly 2 n/2 −1 .
Given that the number of frequency vectors is significantly smaller than the number of order types, it is unclear how much the frequency vector reveals about a conowheel set. However, we will show that for the purpose of counting crossing-free structures it is both sufficient and necessary.
Moreover, there is again a connection to simplicial polytopes with few vertices. In Section 4, we show that the number of frequency vectors is equal to the number of f -vectors of polytopes in d-space with at most d + 3 vertices (including the empty polytope). Linusson [23] has calculated the latter using a sophisticated counting of so-called M -sequences and asks for a simpler method, which will be given in this paper.
Geometric graphs. A geometric graph on P is a graph with vertex set P and edges drawn as straight segments between the corresponding endpoints, and it is crossing-free if no two edges intersect in their respective relative interiors. Many families of crossing-free geometric graphs have been defined and studied, such as triangulations, perfect matchings, spanning trees, etc.
There exists a vast literature that is concerned with counting these crossing-free structures on specific point sets or proving extremal upper and lower bounds [3,33,34,35]. One comparatively simple case is if P is in convex position. In that case, counting triangulations is a classic problem that goes back to Euler, and it gives rise to the famous Catalan numbers. For many other families of graphs (such as perfect matchings and spanning trees), simple closed formulas can be obtained as well [10,15,28].
Randall et al. [30] were the first to consider geometric graphs on wheel sets. They found the extremal configurations for triangulations and pseudo-triangulations by using an argument that involves continuously moving the extra point w. The case of perfect matchings has been studied by Ruiz-Vargas and Welzl [32]. The next theorem is a generalization of a result from their paper.
In the following, let G be a set of abstract (unlabeled) graphs with n + 1 vertices, and let nb G (P ) denote the number of crossing-free geometric graphs on P which are isomorphic to a graph in G. In other words, nb G (P ) is the number of non-crossing straight-line embeddings of graphs in G on P .
Theorem 3. Let G be arbitrary, and let P = H ∪ {w} be a conowheel set of size n + 1. Then, nb G (P ) depends only on the frequency vector F (P ) = (F 0 , F 1 , . . . , F n−1 ). More concretely, where γ n and λ l,r = λ r,l are integers and Λ k are rationals depending on G.
While the latter formula in the above theorem makes the dependency on the frequency vector more obvious, the former will turn out to be more natural. The latter formula follows from the former simply by putting Λ k = γ n /n + 1/2 · λ (n+k−1)/2,(n−k−1)/2 . We give just one example here, which at the same time makes the connection to the later parts of the paper. Let G = {K ··· 4 }, where K ··· 4 is obtained by adding n − 3 additional isolated vertices to the complete graph K 4 . The following formula is obtained alongside Theorem 3 in Section 3.
Observe that all non-crossing embeddings of K ··· 4 on a given conowheel set P = H ∪ {w} have the following property. One of the vertices of the underlying K 4 is mapped to the point w, while the other three vertices are mapped to three points which form a triangle that contains the extra point w in its interior. We thus get a rather simple formula for the number of wembracing triangles (i.e., point triples in H whose convex hull contains w). Note that the set of w-embracing triangles does not change if we replace a point p ∈ H by a point p on the ray starting at w and passing through p; for counting w-embracing triangles, the approach for conowheel sets thus generalizes to arbitrary point sets. In other words, the formula in equation (1) also counts the number of w-embracing triangles in an arbitrary point set H in general position. We note that the algorithm which counts w-embracing triangles in [31] is essentially an implementation of equation (1).
Higher dimensions. The concept of conowheel sets can be generalized to arbitrary dimensions, where we may again consider sets with at most one non-extreme point. However, even for counting w-embracing tetrahedra in 3-space, the ideas from the proof of Theorem 3 do not generalize easily. Nevertheless, in Section 4 we give a generalization of equation (1). From that we obtain improved time bounds for computing the number of w-embracing simplices or, in other words, the simplicial depth of a point w (as defined in [24]). Again, this result is stated for arbitrary sets H and not for wheel sets only, as for the simplicial depth only the position relative to w is relevant. We further note that the algorithm generalizes to counting all k-element subsets of H whose convex hull contains w.
The simplicial depth of a point has attracted considerable attention as a measure of data depth. Several authors describe the calculation of the simplicial depth of a point in the plane [16,22,31]. O(n 2 ) and O(n 4 ) time algorithms for 3-and 4-space, respectively, are provided by Cheng and Ouyang [9], who also point out flaws in previous algorithms in 3-space. Our result improves over the previously best known general O(n d log n) time algorithm for points in constant dimension d [2]. For arbitrary dimensions, the problem is known to be #P -complete and W [1]-hard [2].
The work by Perles aimed at counting the number of facets of high-dimensional simplicial polytopes with few vertices. Via the Gale dual, this number corresponds to the number of simplices embracing the origin in a dual point set. In Section 4, we show how to compute the number of facets of the convex hull of d+k points in general position in R d in time O(n max{ω,k−2} ) (with O(n ω ) being an upper bound for matrix multiplication).

Order Types and Frequency Vectors
The purpose of this section is to give an explanation for  Table 1: Number of order types and frequency vectors of conowheel sets over n + 1 points.
n + 1. For completeness, we have also included the corresponding numbers if equivalence over order types is defined to not include reflections.
Order types. Given a set H of n = 7 points forming the vertex set of a regular heptagon, there are 8 conowheel sets P = H ∪ {w} with distinct order types that can be obtained by adding an extra point w, see the left hand side of Figure 1. Notice the discrepancy with the number 9 displayed in Table 1. The ninth and last order type can be obtained by first deforming H as illustrated on the right hand side of Figure 1. This necessary deformation of H seems to complicate matters significantly, but only at first sight.
The exact formula for the number of order types of conowheel sets was first obtained by Perles (cf. [19,Chapter 6.3]) as the number of combinatorially different simplicial polytopes in dimension n − 3 with at most n vertices. The formula was also obtained in the context of counting the number of 2-colored self-dual necklaces with 2n beads with mirrored necklaces identified [7,29]. These are binary (say, black and white) circular sequences of length 2n such that elements at distance n (i.e., opposing beads) are distinct (i.e., if one is black the other must be white, and vice versa). The correspondence between simplicial polytopes and necklaces has been shown by Montellano-Ballesteros and Strausz [27] using Radon complexes, unaware of Perles' result. We note that a similar (and slightly simpler) formula is known if mirrored necklaces are not identified. Naturally, that formula also counts order types of conowheel sets without reflection. For the sake of self-containment, we give a proof of Theorem 1, using a simple bijection to these necklaces. Theorem 1. The number of distinct order types of conowheel sets of size n + 1 is 1 4n 2 k|n ϕ(k)2 n/k + 2 (n−3)/2 = Θ(2 n /n) .
Proof. Let P = H ∪ {w} be a conowheel set. Consider a directed line s containing w that rotates counterclockwise with w as a hub by 2π. The line passes over each point in H twice, once on the positive ray and once on the negative ray. We record the sequence in which the  points h ∈ H are passed, and indicate for each entry whether the corresponding point h was on the positive or negative ray of s. This sequence can be considered cyclic, and is known as the local sequence of w [18]. It only depends on the order type of P , and it naturally corresponds to a self-dual necklace with 2n beads and two colors (in this case, positive and negative).
The above mapping is seen to be a bijection by considering its inverse. Given a necklace, we can transform it into an order type by placing w at the center of a regular 2n-gon, by identifying the beads of the necklace with the vertices of the 2n-gon in circular order, and then by placing a point h on each vertex that corresponds to a black (positive) bead. By construction, the resulting point set P = H ∪ {w} is a conowheel set.
The asymptotic estimate is explained by taking the dominant summand with k = 1. Also observe that even though there are already Θ(n 4 ) combinatorially different ways of placing w in, say, a regular n-gon, many of these configurations are symmetric under rotation and thus have identical order types.
Frequency vectors. The following lemma gives a characterization of frequency vectors. The proof is by letting a line rotate about the extra point w, and by observing how it dissects the point set H during the process. Full details can be found in [32].
. . , F n−1 ) ∈ N n is the frequency vector of a conowheel set P = H ∪{w} of size n + 1, i.e., F = F (P ), if and only if (i) n−1 k=0 F k = n, (ii) F k = 0 for all k ≡ 2 n, (iii) F k is even for all k ≥ 1, and (iv) if F k = 0 and k ≥ 2, then F k−2 = 0.
Proof. Let us first prove the "only if". From the definition of frequency vectors, (i) and (ii) are immediate. As for (iii) and (iv), let s 1 , s 2 , . . . , s n be the lines that pass through w and one of the n points of H. Suppose further that s 1 , s 2 , . . . , s n are given in radial counterclockwise order around w (it is important to note the difference to a radial ordering of H around w). Define the lines s i+1/2 that are in between s i and s i+1 (indices are understood modulo n). More precisely, s i+1/2 may be any of the intermediate lines that are encountered when transforming s i into s i+1 by a counterclockwise rotation about w. Finally, give all lines s 1/2 , s 1 , s 1+1/2 , . . . , s n , s n+1/2 a direction by orienting s 1/2 arbitrarily and then rotating counterclockwise about w by an angle π. In particular, this means that s 1/2 and s n+1/2 are the same lines with reversed directions (see Figure 2 for a simple example). Now, let l(s) and r(s) denote the number of points of H strictly to the left and right, respectively, of a directed line s, and let g(s) := l(s) − r(s). For any integer i, observe that g(s i ) is the average of g(s i−1/2 ) and g(s i+1/2 ). Moreover, the sequence γ = g(s 1/2 ), g(s 1+1/2 ), . . . , g(s n+1/2 ) is "continuous" in the sense that any two subsequent elements differ by exactly 2 (henceforth called a jump), and "cyclic" in the sense that g(s 1/2 ) = −g(s n+1/2 ). Property (iii) now follows because for any integer k ≥ 1 with k ≡ 2 n, the sequence γ jumps over +k and −k an even number of times. Note that the same is not true for k = 0 if n is odd, as the number of times that γ jumps over 0 is odd. Property (iv) follows because γ jumps over 0 or ±1 (depending on the parity of n) at least once.
In order to prove the "if", let us fix any vector F = (F 0 , F 1 , . . . , F n−1 ) satisfying (i)-(iv), and let us show how to realize it by a conowheel set P = H ∪ {w} of size n + 1. We start by drawing a circle with w at its center, and n distinct lines s 1 , . . . , s n passing through w in counterclockwise order. We consider the lines to be directed in such a way that s 2 , . . . , s n point into the half-space to the left of s 1 . As will be described below, for each line s i we will place one additional point h on one of the two intersections of s i and the fixed circle around w. We will refer to these two possible locations as the back and front of s i (such that the direction of s i goes from the back to the front).
Let k max ≥ 0 be the largest integer that satisfies F kmax = 0. We start by constructing a sequence γ of length n + 1, which starts with −k max − 1, ends with +k max + 1, in which any two subsequent elements differ by exactly 2, and such that the number of times we jump over any non-negative integer k ≡ 2 n or its additive inverse −k is exactly equal to F k . Note that it is easy to construct such a sequence γ, given that (i)-(iv) hold. Indeed, one way to do it, say for even n, is to start with −k max − 1, −k max + 1, . . . , 0 and then, for each integer k = 1, 3, . . . , k max jump back and forth over k exactly F k − 1 times. As for the placement of H, if the i-th jump in γ is increasing, then we place a point h at the back of s i . Otherwise, we place h at the front of s i .
It is clear that the resulting set P = H ∪ {w} is a conowheel set of size n + 1. Moreover, note that γ can be recovered when given only P and the sequence s 1 , . . . , s n , simply by constructing the sequence g(s 1/2 ), g(s 1+1/2 ), . . . , g(s n+1/2 ) as in the first part of the proof. Hence, P has frequency vector F .
With this characterization, it is not hard to determine the number of frequency vectors.
Theorem 2. For any n ≥ 1, the number of frequency vectors realizable by a conowheel set over n + 1 points is exactly 2 n/2 −1 .
Proof. For n = 1 and n = 2 the formula evaluates to 1, which is consistent with the fact that there is only one respective order type for either two or three points. For larger n, we give a proof by induction for odd n, and note that even n can be handled analogously.
So let n = m+2 ≥ 3 be odd. Using Lemma 1, we can characterize the set of frequency vectors that are realizable by n + 1 points by saying that it contains all vectors F = (F 0 , F 1 , . . . , F n−1 ) which have one of the following two mutually exclusive forms.
is any frequency vector realizable by m + 1 points.

Geometric Graphs
Recall that nb G (P ) is the number of crossing-free geometric graphs on a point set P that are isomorphic to a graph in the family G. Consider now two conowheel sets P = H ∪ {w} and P = H ∪ {w } which can be transformed into each other by moving the extra point over the segment between h 1 , h 2 ∈ H (and without encountering any other collinearities). The situation is illustrated in Figure 3. Assume that on the w-side of the segment h 1 h 2 there are i points of H, and on the w -side there are j points of H (thus, i + j = n − 2). Let δ i,j be the increment of nb G when going from P to P , i.e., δ i,j = nb G (P ) − nb G (P ). Proof. All geometric graphs that do not contain the edge {h 1 , h 2 } are not affected by the mutation, i.e., they are crossing-free on P if and only if they are crossing-free on P . Therefore, δ i,j is equal to the number of crossing-free geometric graphs on P containing {h 1 , h 2 } minus the number of crossing-free geometric graphs on P containing {h 1 , h 2 }. For the following reasons, these numbers only depend on i, j and G.
In the case of P , on the w-side we have i + 3 points (including h 1 and h 2 ) in a barely-in configuration, for which there exists a unique order type. On the opposite side we have j + 2 points (including h 1 and h 2 ) in convex position, for which there also exists a unique order type. Because of the presence of the edge {h 1 , h 2 } between two extreme points, any other edges must be completely contained in one of the two sides, and the claim follows. In the case of P , an analogous argument works.
Example, embracing triangles. Consider the case G = {K ··· 4 }. Observe that any crossing-free embedding of K ··· 4 on P uses w as the inner vertex of the underlying K 4 . Furthermore, if the embedding uses the edge {h 1 , h 2 }, which implies that h 1 and h 2 are outer vertices of K 4 , then any one of the i points on the left hand side can be used as the third outer vertex of K 4 . This gives exactly i crossing-free embeddings of K ··· 4 on P which use the edge {h 1 , h 2 }. Similarly, we get j for the corresponding number of embeddings on P . Therefore, Let G be arbitrary, and let P = H ∪ {w} be a conowheel set of size n + 1. Then, nb G (P ) depends only on the frequency vector F (P ) = (F 0 , F 1 , . . . , F n−1 ). More concretely, where γ n and λ l,r = λ r,l are integers and Λ k are rationals depending on G.
Proof. We proceed by choosing the numbers λ l,r such that the validity of the formula is preserved under continuous motion of P , and then choose γ n such that it holds for some starting configuration. To be more concrete, we allow continuous motion of P where all points are allowed to move if P is in convex position, and only w is allowed to move if P is a wheel set. At discrete moments in time we allow collinearity of three points, the one in the middle being w.
In this way any two conowheel sets can be transformed into each other. Let now P and P be as in Figure 3. Note that the values l(h) and r(h) do not change for any h ∈ H \ {h 1 , h 2 } when going from P to P . For h 1 and h 2 the corresponding values are We therefore preserve the validity of the formula as long as λ l,r = λ r,l holds and these numbers are chosen in such a way that we have Setting λ l,r := δ n−2,0 + δ n−3,1 + · · · + δ l,r−1 + c n satisfies this constraint, and the symmetry λ l,r = λ r,l indeed follows from the skew-symmetry δ i,j = −δ j,i . Note that l + r = n − 1 always, and that c n is an arbitrary integer independent of l and r (for the proof to go through one could simply fix c n = 0).
Finally, γ n is chosen in such a way that the formula holds for some conowheel set. The most natural choice for "anchoring" the formula is a set in convex position.
Computing the frequency vector can be done in O(n log n) time. Given the values Λ k , computing the number nb G (P ) of embeddings then requires only O(n) additional arithmetic operations.
Example continued, embracing triangles. We already derived if we choose c n = n−1 2 . It can be checked that nb G (P con ) = 0. Hence, γ n = nb G (P con ) + 1 2 l,r : l+r=n−1 λ l,r = 0 + 1 2 After putting everything together we obtain the exact formula displayed earlier in equation (1).

Further Examples
We call the following two simple applications "insensitive" since the number of crossing-free embeddings is the same on all wheel sets, but may be different for sets in convex position.
Spanning cycles. Consider the case where G consists of a cycle over n + 1 vertices. If w is an extreme point, then there is only one spanning cycle, whereas if w is in the interior, then it can be seen that there are n spanning cycles independent of the exact placement of w. Hence, we have δ 0,n−2 = −δ n−2,0 = n − 1, while in all other cases we have δ i,j = 0 because no crossing-free spanning cycle can use the edge {h 1 , h 2 }. For anchoring we calculate nb G (P con ) = 1. It follows that all wheel sets over n + 1 points admit n crossing-free spanning cycles (which can easily be seen directly).
Spanning paths. If G consists of a path over n+1 vertices we also get δ i,j = 0 unless i = 0 or j = 0, but for a different reason. On P there are 2 · 2 i · 2 j−1 crossing-free embeddings that use the edge {h 1 , h 2 }, since there are 2 choices for deciding which one of h 1 and h 2 is connected to the left hand side, 2 i choices for completing the left hand side to a path and 2 j−1 choices for completing the right hand side to a path. Likewise, on P there are 2 · 2 i−1 · 2 j embeddings, which is the same number. Using a similar argument it can be checked that For anchoring we compute nb G (P con ) = (n + 1)2 n−2 , implying nb G (P ) = n2 n−1 for any wheel set P .
The following two applications are "sensitive" in the sense that different wheel sets in general have different numbers of crossing-free embeddings. The running example with embracing triangles also is of this kind.
Matchings. Let G = M, the set of (not necessarily perfect) matchings over n + 1 vertices. It is known that nb M (P con ) = M n+1 := (n+1)/2 k=0 n+1 2k C k , the (n+1)-th Motzkin number [28], which is defined in terms of the Catalan numbers C k := 1 k+1 2k k . It is thus easy to compute δ i,j = M i M j+1 − M i+1 M j since, as always, we only have to worry about embeddings that use the edge {h 1 , h 2 }. This gives λ l,r = M l M r and γ n = M n+1 + 1 2 l,r M l M r . After simplifying 2 , we obtain the following formula.
Spanning trees. Let G = ST , the set of all trees over n + 1 vertices. We will make use of the fact that nb ST (P con ) = T n+1 := 1 2n+1 3n n [10,15]. Furthermore, we will use the hypergeometric identity To compute δ i,j , consider the set P as in Figure 3. In order to complete the left hand side into a spanning tree, we have to build two disjoint trees rooted at h 1 and h 2 , respectively. There are 2 choices for assigning w either to the upper or the lower tree, and there are i + 1 choices for distributing the i points on the left among the two trees. Indeed, the latter claim holds because the k out of i points assigned to h 1 , say, have to appear consecutively with h 1 on the convex hull as otherwise we are forced to create a crossing. Once the points have been distributed, we are left with two point sets of size k + 1 and i − k + 2 in convex position. For completing the right hand side into a spanning tree, a simpler argument can be used without the additional complication of w. Moreover, the set P can be handled analogously.
For this application, we do not know if a simple closed form expression for λ l,r exists. Still, note that if one were to compute nb ST (P ), the numbers δ i,j can be summed up using O(n) arithmetic operations and the value of γ n can be computed on the fly for any given n.
Related applications. Observe that, for example, a geometric triangulation of P con can be embedded as a plane graph on P bar . However, this embedding is no longer a triangulation (i.e., a tessellation of the convex hull conv(P bar ) into triangles). Hence, there is no natural choice of G such that nb G (P ) is the number of triangulations of any conowheel set P . However, the continuous motion argument is still applicable and leads to a similarly simple formula. All that is required is an adapted version of Lemma 2. From the description in [30] it follows that for the number of triangulations of a conowheel set by using the techniques developed earlier in this chapter. The above formula has been mentioned already in [32]. There are several other families of geometric graphs (pseudo-triangulations, crossing-free convex partitions, etc.) whose quantity on a conowheel set P cannot be expressed easily in the form nb G (P ), but for which it is also possible to adapt Lemma 2. We provide the example for crossing-free convex partitions in Appendix A.
Furthermore, we note that Theorem 3 generalizes to crossing-free embeddings of hypergraphs, where "crossing-free" means that the convex hulls of any two hyperedges intersect in an at most 1-dimensional set.

The Symmetric Configuration Maximizes
For many families of crossing-free geometric graphs, it is known that a set of n points in convex position minimizes their number. In particular, this is true for the family of all crossing-free geometric graphs, connected crossing-free geometric graphs, as well as for any family of cyclefree graphs such as (perfect) matchings or spanning trees [3]. Triangulations, on the other hand, are a well-known counter-example for which it is known that convex position does not minimize [21].
Not much seems to be known about point sets that maximize the number of crossing-free geometric graphs; there are merely constructions that give lower bounds on this number [3,11,20]. Nevertheless, in what follows we give a sufficient condition which allows us to prove that among all conowheel sets, the so called symmetric configuration P sym maximizes the number of many families of crossing-free geometric graphs. The set P sym is constructed by taking the vertex set of a regular n-gon and by adding an extra point w at the center of that n-gon. For the case that n is even, we slightly perturb w in order to obtain a point set in general position. Note that irrespective of the perturbation we get the same order type and, thus, the same frequency vector.
Lemma 3. Let G be any family of graphs for which δ i,j ≥ 0 holds for all i < j. Then, the number nb G (P ) is maximized for P = P sym .
Proof. We start with a point set that contains the vertices of a regular n-gon and an extra point w added in such a way that the whole set is in convex position. Naturally, the number of crossing-free embeddings of G on this set is nb G (P con ). We further obtain nb G (P sym ) = nb G (P con ) + i,j : i<j i+j=n−2 (i + 1) · δ i,j , simply by letting w move on a straight line towards its final position in P sym . Note that, for the case that n is even, we always have δ i,j = 0 whenever i = j by symmetry. Hence, we need not worry about how exactly w was perturbed in P sym .
For an arbitrary conowheel set P , we wish to prove that nb G (P ) ≤ nb G (P sym ) holds. We start with a point set that is a copy of P except that the extra point w has been moved in such a way that the whole set is again in convex position. After moving w on a straight line to its final position in P , we obtain nb G (P ) = nb G (P con ) + i,j : i<j i+j=n−2 In the formula above, the number α(i) indicates, for any fixed i, how often a (i, j)-transition occurs during this process. The final inequality follows after observing that α(i) ≤ i + 1.
It is easy to see that the condition of Lemma 3 holds for embracing triangles. By making use of the fact that Motzkin numbers are log-concave [4], it can also be shown to hold for crossingfree matchings. For crossing-free spanning trees, on the other hand, starting from formula (3) for δ i,j one can derive the following equivalence.
Assuming i < j, we see that the factor i+1 i+2 is dominated by the factor j+1 j+2 . The same can be said for the other two factors, and hence we conclude δ i,j ≥ 0. Corollary 1. When restricted to conowheel sets, the numbers of embracing triangles, crossingfree matchings and crossing-free spanning trees is maximized for P sym .
Note that the above does not hold for crossing-free perfect matchings. This special case was analyzed in [32].

Wheel Sets and the Rectilinear Crossing Number
Even though conowheel sets and the associated frequency vectors seem like a very specific set of objects, they do occur naturally in more general settings. Consider for example an arbitrary setP of n + 1 points in general position and let and be the number of 4-element subsets ofP in convex and in non-convex position, respectively. 3 Let p ∈P be any point. We can construct a conowheel set P = H ∪ {w} containing w = p and, for every q ∈P \ {p}, the point h which lies on the intersection of the ray from p to q and a fixed circle centered at w (as done also, e.g., in [22]). That is, P is simply a representation of the local sequence of p inP in terms of conowheel sets; see [18]. Further observe that a triangle spanned by points inP contains p iff its image in P contains w. Hence, nb K ··· 4 (P ) is the number of such triangles, which is given by equation (1). We thus obtain by a summation over all points p inP . Since + = n+1 4 , we also obtain . We note that this can be transformed into equations from [1,25,37] that give in terms of the number of j-edges (i.e., directed edges spanned byP with exactly j points of P to their left).
To sum up, we can associate a frequency vector with every point of a given point set, and this set of frequency vectors determines the value of . Unfortunately, this simple approach does not work in general; there are examples of point sets with the same set of frequency vectors but a different number of triangulations, see appendix B.

Higher Dimensions: Origin-embracing Simplices
As already noted in the introduction, the concept of conowheel sets can be generalized to higher dimensions. However, already in R 3 we face certain challenges. For example, the number of tetrahedralizations of n + 1 points in convex position in R 3 does not only depend on n, in contrast to the 2-dimensional case. Even when considering simpler structures, like the set of w-embracing tetrahedra, the ideas from Section 3 do not generalize. (Intuitively, our argument of w passing over a segment does not work in 3-space, as it can pass "behind" a triangle.) Still, we can use similar techniques to obtain improved time bounds for computing the simplicial depth of a point w.
Oriented simplices. Given a set T of d affinely independent points in R d , its convex hull conv(T ) is a (d − 1)-simplex and its affine hull is a hyperplane. We want to be able to refer to the two sides of this hyperplane by identifying a positive and a negative side. For that consider a sequence p 1 p 2 . . . p d of d affinely independent points. The affine hull of {p 1 , p 2 , . . . , p d } can be described as the set of points q with σ(q, p 1 p 2 . . . p d ) = 0, where σ(q, p 1 p 2 . . . p d ) := det(p 1 − q, p 2 − q, . . . , p d − q). We call the set of points q with σ(q, p 1 p 2 . . . p d ) > 0 the positive side of p 1 p 2 . . . p d , and the set of points q with σ(q, p 1 p 2 . . . p d ) < 0 the negative side of p 1 p 2 . . . p d . Note that for d = 2, the positive side of p 1 p 2 is the set of points left of the line through p 1 and p 2 , directed from p 1 to p 2 . Also note that the positive side of p 1 p 2 coincides with the negative side of p 2 p 1 . For d ≥ 3, distinct orderings of the given d points may have identical positive sides; this happens iff the orderings can be obtained from each other by an even number of transpositions. An oriented (d − 1)-simplex is a sequence p 1 p 2 . . . p d of d affinely independent points, with its associated (d − 1)-simplex conv({p 1 , p 2 , . . . , p d }), and its associated positive and negative side as defined above. Two such oriented (d − 1)-simplices are defined to be equivalent if their sequences can be obtained from each other by an even number of transpositions (e.g., Via oriented simplices, the concept of order types generalizes to arbitrary dimensions; the order type of a set P = H ∪ {w} of n + 1 points in R d determines the set of points on the positive side of the oriented (d − 1)-simplex wh 1 . . . h d−1 , for each (d − 1)-tuple in H. Let l(h 1 . . . h d−1 ) be the number of these points, and let r( We can thus define the frequency vector F (P ) = (F 0 , F 1 , . . . , F n−d+1 ) by letting F i denote the number of tuples ρ ∈ H d−1 s.t. | l(ρ) − r(ρ)| = i. However, already for d = 3 it turns out that this frequency vector does not always determine the number of w-embracing tetrahedra, i.e., the number of subsets of d + 1 points of H whose convex hull contains w. An example is given in the appendix.

Embracing sets
Here, we generalize the notion of embracing triangles to larger sets. Consider a set P = H ∪{w} of n + 1 points in R d . A subset A ⊆ H is a w-embracing k-set if w ∈ conv(A) and |A| = k. For simplicity, we will usually consider w = 0 and call A an embracing k-set.
Let us quickly return to dimension d = 2 and consider a conowheel set P = H ∪ {w}. As follows, we can show that the number of embracing k-sets is determined by the frequency vector of P for any k, and not just for k = 3 as seen earlier in equation (1). Indeed, since H is in general position, for every non-embracing k-set A ⊆ H there exists a unique point h ∈ A such that conv(A) is in the closed halfplane to the left of the directed segment wh. Observe that for any choice of h ∈ H we can construct l(h) k−1 such non-embracing k-sets, and thus we get a generalization of equation (1). (This direct approach to counting non-embracing triangles was, e.g., also used in [31].) Interestingly, the reverse is also true. Proof. Let E = (embr k ) n k=3 . Consider the vector L = (L j ) n−1 j=1 where L j is the number of points h ∈ H with l(h) = j. Clearly, L determines the frequency vector of P . It thus suffices to show that E determines L.
The number embr k of embracing k-sets is which may be rewritten as Observe that the above equation also holds for k = 2. We can thus define a vector E = (e i ) n−1 i=1 with e i = n i+1 − embr i+1 and a square matrix A = (a i,j ) n−1 i,j=1 with a i,j = j i , such that Since the matrix A is unitriangular (i.e., triangular and without zeros on the diagonal) it has an inverse, from which we conclude that E determines L.
Corollary 2. Let P and P be two conowheel sets. Then nb G (P ) = nb G (P ) for any graph class G if and only if F (P ) = F (P ).
Proof. We already know from Theorem 3 that the frequency vector determines the number of embeddings. For the other direction, we reconstruct the number of embracing k-sets by appropriately choosing the graph classes G. After that, the frequency vector is determined by Lemma 4. The number of embracing triangles is equal to the number of embeddings of K ··· 4 and therefore, by our assumption, the same for both P and P . We now simply generalize to k-wheels, i.e., G contains a cycle with k vertices, each adjacent to one additional vertex. All that is left to observe is that the number of distinct embeddings of such a k-wheel on a conowheel set is the same as the number of embracing k-sets.
Note that, for arbitrary point sets, we can compute the number of crossing-free embeddings of such k-wheels in polynomial time: For k = 3, this number is equal to the number of crossingfree embeddings of K ··· 4 , which can be obtained from the frequency vector associated with each point, see Section 3.3. For k ≥ 4, we distinguish the cases where the geometric embedding of a k-wheel has only three vertices on the unbounded cell and where it has more. The latter case can be dealt with by computing the number of embracing k-sets for each point. The former can be obtained by computing the number of triangles with j points in the interior and multiplying this number by 3 j k−2 . This is because for every vertex of such a triangle, a path of k − 2 points inside this triangle in radial order around that vertex gives a k-wheel with the triangle as the unbounded cell. For all j, the corresponding number of triangles can be obtained in O(n 3 ) time [5,14].
Unfortunately, generalizing the above approach of counting embracing k-sets to higher dimensions fails already in 3-space. Indeed, consider the set of non-embracing tetrahedra for a set H ⊂ R 3 in convex position. Observe now that any such tetrahedron has either three or four edges that form a "tangent" plane through w.
Instead, consider a partition B . ∪ W = H defined by a plane φ through w that is disjoint from H. Then, the set of non-embracing k-sets consists of those completely in B and W , respectively, and those intersected by φ. For the latter, consider the intersection of conv(A) of such a set A with φ. There is again a single "tangent" point t = pq ∩ φ such that conv(A) ∩ φ is on one side of the line wt on φ. Hence, the number of embracing k-sets in 3-space is We can generalize this approach in the following way.

Lemma 5.
Let H be a set of n points in R d , with H ∪ {0} in general position, and let ψ be a generic 2-flat containing the origin. Let proj : R d → R d−2 be a projection that maps all of ψ to 0 ∈ R d−2 . Then, the number of embracing k-sets in H is Proof. Clearly, any embracing k-set is also an embracing k-set in the projection, so we only have to subtract the number of non-embracing k-sets which happen to be embracing in the projection. Let A be such a set. Since 0 ∈ proj(conv(A)), we have conv(A) ∩ ψ = ∅. In the 2-dimensional subspace defined by ψ, there is a unique point t on the boundary of conv(A) ∩ ψ such that conv(A) ∩ ψ is in the left closed halfplane defined by 0t (recall that we assume general position). Since ψ is generic, t is the intersection of ψ with a (d − 2)-simplex defined by a tuple ρ of d − 1 points of A, and the oriented (d − 1)-simplex 0ρ has all points of A \ ρ either on its positive or negative side. We are thus counting each such non-embracing k-set twice (for the left and the right "tangent"), and the claim follows.
With the previous lemma at hand, it is now a simple task to give a proof of our main computational result. Proof. The proof of Lemma 5 is constructive (apart from the choice of ψ, which can be done arbitrarily using the techniques in [12]). Whether a (d−1)-simplex intersects ψ can be computed in O(d d ) time. It thus remains to compute the values of l(ρ) for the (d − 1)-tuples ρ. While a brute-force approach would take O(n d ) time for this operation, we can actually consider the points of H as vectors representing points in the (d − 1)-dimensional projective plane. We compute the dual hyperplane arrangement [13] in O(n d−1 ) time, which allows us to extract the values of l(ρ) within the same time bounds (as also discussed in [13]).
Note that the part whose running time depends on d is computing the values of l(ρ). After O(n d−1 ) time, we can produce a vector indicating the number of (d − 1)-simplices intersecting ψ with a certain number of points on their positive side. Using this vector, we only have to sum up over O(n) binomial coefficients in each recursion step to obtain the number of embracing k-sets.

Polytopes with few vertices
Through the so-called Gale transform (cf. [38,39,40]), origin-embracing triangles are in correspondence to facets ((n − 4)-faces) of simplicial (n − 3)-polytopes with at most n vertices. More generally, subsets of size i containing the origin in their convex hull correspond to (n − i − 1)faces. Therefore, some of our results connect to such simplicial d-dimensional polytopes with at most d + 3 vertices (number of frequency vectors, number of order types, computation of number of embracing triangles, etc.) and thus to known results in that context.
Gale duality. For n > d, we call a matrix A ∈ R n×d legal if A has full rank d and A 1 n = 0 d . Let S A = (p 1 , p 2 , . . . , p n ) be the sequence of points in R d with the coordinates of p i obtained from the ith row of A. Legal thus means that S A is not contained in a hyperplane and that the origin is the centroid of S A . For legal matrices A ∈ R n×d and B ∈ R n×n−d−1 , we call B an orthogonal dual of A, in symbols A⊥B, if A B = 0 d×(n−d−1) . S B is called a Gale dual (Gale transform, Gale diagram) of S A . 4 In other words, if A⊥B then all column vectors of B are orthogonal to all column vectors of A; together with the legal condition, this means that the column vectors of B span the space of all vectors orthogonal to the column vectors of A and to 1 n , i.e., it is a basis of the null space of the vector space spanned by the columns of (A1 n ). (The matrix (A1 n ) is the matrix A with an extra column of 1's.) Proof. Note that (A1 n ) ∈ R n×d+1 also has full rank d + 1 because the extra column 1 n is orthogonal to all columns in A. Recall that, therefore, there exists a factorization (A1 n ) = LU P where L ∈ R d+1×d+1 is lower triangular, U = (U 1 , U 2 ) ∈ R d+1×d+1 × R d+1×n−d−1 is upper triangular (in particular, this means that all entries in the diagonals of L and U 1 are non-zero and that these matrices are invertible), and P ∈ R n×n is a permutation matrix [8,Theorem 16.4]. Also, recall that such a factorization can be computed in time O(n ω ) [8,Theorem 16.5].
Given such a factorization it is now easy to compute an orthogonal dual B ∈ R n×n−d−1 . Indeed, write the rows in B such that with unknown B 1 ∈ R d+1×n−d−1 and identity matrix I ∈ R n−d−1×n−d−1 . Then, the equality Note that the asymptotic number of facets may be as large as n k . A generalization of Corollary 3 to sets not necessarily in general position is possible for k = 3. Our efficient computation of the number of embracing k-sets thus lets us obtain not only the f -vector of a polytope, but of course related vectors like the h-and the g-vector. We finally draw the connection between order types of conowheel sets and the combinatorial structure of simplicial d-polytopes with d + 3 vertices. Proof. If there are no embracing triangles, P is in convex position and we are done. Thus, we may assume that w is not an extreme point. Observe that it is sufficient to obtain the orientation of point triples containing w (i.e., triples of the form wpq), as this also determines the order of H along conv(P ).
Take any w-embracing triangle abc. We will determine the orientation of all other point triples w.r.t. the orientation of abc. W.l.o.g., let it be oriented counterclockwise (as otherwise we mirror the whole set, obtaining the same order type). Observe first that for any other embracing triangle pqr, there is also an embracing triangle that has at least one vertex of each of these two. W.l.o.g., let apq be such a triangle. Observe that the embracing triangle apq is oriented counterclockwise iff at least one of abq or apc is an embracing triangle. We thus obtain the orientation of all embracing triangles (w.r.t. abc).
Let C(a) be the set of points s.t. for any point a ∈ C(a) and any pair pq, a pq is embracing iff apq is embracing. Such an equivalence class C can be defined for any extreme point. The orientation of the w-embracing triangles gives the relative position of w and two such equivalence classes, and thus their order along the boundary of the convex hull.
Observe now that for any order of appearance along the convex hull boundary that we choose for each equivalence class, there is an orientation-preserving bijection to any other such order. Thus, all these sets have the same order type, up to reflection.
It is therefore no coincidence that the number obtained in Theorem 1 is the same as the one obtained by Perles for the number of simplicial d-polytopes with d + 3 vertices (see [19,Chapter 6.3]). Also, the number of f -vectors of polytopes with at most d + 3 vertices, as obtained by Linusson [23], equals the number of frequency vectors by Lemma 4; via the Gale dual, we thus obtain a direct proof for the number of these f -vectors, as desired by Linusson. Doing so for d + 4 vertices, however, remains an open problem.

A Convex partitions
A crossing-free convex partition of P is a partition of P such that the convex hulls of the individual parts are pairwise disjoint. These objects have a natural representation as crossingfree geometric graphs on P , simply by taking all edges that lie on the boundary of the convex hull of some part. Even though there is no obvious choice for G such that nb G (P ) is equal to the number of crossing-free convex partitions on a conowheel set P , it is possible to apply the machinery developed in Section 3. All that is required is a specialized version of Lemma 2. Alternatively, Theorem 3 could be generalized to a setting where G is a family of hypergraphs, but we will not explore that further.
The number of crossing-free convex partitions on P con is known to be C n+1 , the (n + 1)th Catalan number [6]. Let now δ i,j be the increment in the number of crossing-free convex partitions when going from P to P (by moving the extra point w over the segment h 1 h 2 ). Note that any partitions where h 1 and h 2 belong to different parts are not affected by the mutation. The same holds for partitions where h 1 , h 2 and w all belong to the same part. Hence, when counting partitions on P we may restrict our attention to those cases where h 1 and h 2 belong to the same part, but that part does not contain w. In any such case, the part that contains h 1 and h 2 cannot contain any of the i points of H on the left. Therefore, the points on the left (without h 1 and h 2 but including w) form a set of i + 1 points in convex position, giving C i+1 possibilities to build a crossing-free convex partition. The points on the right hand side (with h 1 and h 2 contracted to a single point) form a set of j + 1 points in convex position, giving C j+1 possibilities. By symmetry we obtain δ i,j = C i+1 C j+1 − C i+1 C j+1 = 0, and the number of crossing-free convex partitions on any conowheel set of size n + 1 is seen to be C n+1 .

B Counterexamples
One way of generalizing the concept of the frequency vector of conowheel sets is by assigning a frequency vector to every inner point. In contrast to obtaining the crossing number of a point set (see Section 3.3), this set does not determine the number of certain graphs. For more than one inner point, there are (actually plenty of) examples where the set of frequency vectors of the inner points are the same, but the number of certain crossing-free graphs are different. This can be seen in the example in Figure 4, where the two point sets have a different number of triangulations. Intuitively, in that example an inner point moves over a halving edge, which maintains the frequency vector. In 3-space, the concept of frequency vectors can be generalized to record the difference between points on the positive and negative side of the plane defined by the point w = 0 and two points. However, there are examples giving the same such 3-dimensional frequency vector but a different number of origin-embracing tetrahedra. See Figure 5. We use a representation discussed by Stolfi [36] in the context of "oriented projective geometry": A point p = (x p , y p , z p ) is projected to the point p = (x p /z p , y p /z p ) (i.e., we project the points on the plane z = 1 by lines through the origin). The projection of a point with negative z-coordinate is depicted white, and the one of a point with positive z-coordinate is drawn black. Hence, for an origin-embracing tetrahedron, we get a segment between two white points crossing a segment between two black points, a white point inside the triangle spanned by three black points, or the opposite. Also, this representation allows for counting the number of points on one side of a plane spanned by two points of the set and the origin: we count the number of black points to the left of the line through the projections of the two points, and the number of white points to the right. With this information, we can see that, for the discussed generalization of the frequency vector, the two point sets in Figure 4 have the same vector, but have a different number of origin-embracing tetrahedra.

C Minimal embracing multisets
Here, we give a short account on how our approach can be modified for point sets not in general position. Let H be a multiset of n points on the unit circle centered at the origin (denoted by w). We again denote by l(h) and r(h) the points to the left and right, respectively, of the line Figure 5: Two different point sets in 3-space projected on the plane z = 1 by lines through the origin. Points with negative z-coordinate are white. Pairs of points that form a plane with the origin s.t. there is exactly one point on one side of that plane are connected by a bold edge. Both sets have the same 3-dimensional frequency vector, but the left one has six origin-embracing tetrahedra, and the right one has four.
wh. In addition, we let m(h) denote the multiplicity of h in H, and o(h) denote the number of points of H obtained by negating the coordinates of h (i.e., those on the line wh "opposite" of h). For any point h ∈ H we thus have n = l(h) + r(h) + m(h) + o(h). We denote byH the underlying set of points contained in H.
Proposition 1 tells us that the number of facets corresponds to the number of minimal wembracing subsets. A set A of points is called minimal w-embracing if it is w-embracing but no proper subset of A is w-embracing. Let embr min = embr min (H) be the number of minimal embracing sets in H. Note that a minimal embracing A can have three distinct elements with w in the interior of conv(A), or there are two distinct elements with the origin on their connecting segment. 6 The minimal w-embracing sets of size 2 are easy to count: Now call a pair (q, {p, r}) in H angle-embracing if p, q, and r are three distinct points in H and w lies in the interior of the cone at q spanned by vectors p − q and r − q. Note that if {p, q, r} forms a triangle, then this gives rise to three angle-embracing pairs iff the triangle is minimal w-embracing, and it gives rise to exactly one angle-embracing pair, otherwise. If x denotes the number of minimal w-embracing triangles and y the number of triangles not minimal w-embracing 8 , then x + y = ∆(H) 3x + y = h∈H m(h) l(h) r(h) . 6 We got rid of embracing sets of size 1 by excluding w from H. 7 For n = a1 + a2 + · · · + am we have {i,j,k}∈ ( [m] 3 ) aiaja k = 1 6 m i=1 ai(n − ai)(n − 2ai). 8 So this includes all those triangles which are not embracing at all.