On weighted sums of numbers of convex polygons in point sets

Let $S$ be a set of $n$ points in general position in the plane, and let $X_{k,\ell}(S)$ be the number of convex $k$-gons with vertices in $S$ that have exactly $\ell$ points of $S$ in their interior. We prove several equalities for the numbers $X_{k,\ell}(S)$. This problem is related to the Erd\H{o}s-Szekeres theorem. Some of the obtained equations also extend known equations for the numbers of empty convex polygons to polygons with interior points. Analogous results for higher dimension are shown as well.


Introduction
Let S be a set of n points in the Euclidean plane in general position, that is, no three points of S are collinear. We denote by h the number of extreme points of S, that is, the points of S that lie on the boundary of the convex hull of S. A k-gon (of S) is a simple polygon that is spanned by exactly k points of S. A k-gon is called empty, if it does not contain any points of S in its interior. The vertex set of an empty convex k-gon is sometimes also called a free set [11]. We denote by X k (S) the number of empty convex k-gons in S, and more general, we denote by X k, (S) the number of convex k-gons in S that have exactly points of S in their interior. Further, a convex k-gon with interior points constitutes a subset of (k + ) points of S whose convex hull does not contain any other points of S. Such sets are sometimes also called islands [7]. Figure 1 shows a set S of 10 points and its values X k, (S). Here we are interested in relations among the values X k, (S) and invariants among all point sets of given cardinality. Invariants for the values X k (S) are well known. The equation was proved by Edelman and Jamison in [10], actually in terms of the number F k of free sets of cardinality k in a convex geometry (Theorem 4.5 in [10]), stating k (−1) k F k = 0. Note that in our notation we omit the term for the empty set X 0 := 1, and X 1 (S) = n and X 2 (S) = n 2 , the number of points and edges spanned by S, respectively. In [10], Equation (1) is also attributed to J. Lawrence. Moreover, it also holds in higher dimension. The equation which only depends on n and on h, was first proved by Ahrens, Gordon, and McMahon [1]. Its higher dimensional version was proved by Edelman and Reiner [11] and by Klain [20]. Pinchasi, Radoičić, and Sharir [25] provided elementary geometric proofs for Equations (1) and (2), by using a continous motion argument of points. They further proved other equalities and inequalites involving the values X k (S) and extensions to higher dimension. As one main result, they showed that for planar point sets and r ≥ 2, is holds that where T r (S) denotes the number of r-tuples of vertex-disjoint edges (e 1 , . . . , e r ) spanned by S that lie in convex position, and are such that the region τ (e 1 , . . . , e r ), formed by the intersection of the r half-planes that are bounded by the lines supporting (e 1 , . . . , e r ) and contain the other edges, has no point of S in its interior [25]. For the point set S of Figure 1 we have T 2 (S) = 30, T 3 (S) = 25, and T r (S) = 0 for r ≥ 4. In [25], the alternating sums of Equations (1), (2) and (3)  In this work, we take a similar approach as done in the work of Pinchasi et al. [25] and extend above-mentioned results to X k, (S), that is, to convex k-gons having a fixed number of points of S in their interior. We denote by A (S) := k≥3 (−1) k+1 X k, (S) 1 Note that Equation (3) and its proof require that k ≥ 2r.
the alternating sum of {X k, (S)} k≥3 . In Section 2, we mostly concentrate on the case of polygons with one interior point, i.e., = 1, where we prove that A 1 (S) = k≥3 (−1) k+1 X k,1 (S) = n − h for any set S of n points with h of them on the boundary of the convex hull. Further, equations for alternating sums of convex polygons with one given interior point p ∈ S (denoted A p 1 (S)) and for alternating sums of convex polygons with one interior point and which contain a given edge e spanned by two points of S on the boundary (denoted A 1 (S; e)) are obtained. We also derive inequalities for t k=3 (−1) k+1 X k,1 (S) for any given value t ≥ 3, based on analogous inequalities for X k from [25]. In Section 3, we consider different weight functions f (k, ) and general weighted sums over X k, (S) of the form We show that for any function f (k, ) with the property that the value of the according sum F (S) is invariant over all sets S of n points. We present several functions f (k, ) with this property. Among these functions, we find that for any point set S of n points in general position and for any x ∈ R, it holds that Note that Equation (1) is the special case x = −1; for this case and = 0, set the indeterminate form (1 + x) := 1. We further show that the maximum number of linearly independent equations F j (S) = k≥3 ≥0 f j (k, )X k, , where each f j (k, ) satisfies Equation (4), in terms of the variables X k, , is n − 2. In Section 4, we relate the results of Section 3 to the moments from [25]. We denote by m r (k) the multiplicative factor of (−1) k+1 X k (S) in M r (S), that is, for r ≥ 1 and k ≥ 2r 0 otherwise We show the following relations, which only depend on the number n of points. For any point set S with cardinality n and integer 0 ≤ r ≤ 2 it holds that Finally, in Section 5 we discuss the generalization of the obtained results to higher dimensions. Several more results, in particular on identities involving X k, for special point configurations, can be found in the thesis [29].
An important argument that will be used in the proofs of this work is the continuous motion argument of points. Of course, this argument is not new for the analysis of configurations in combinatorial geometry (see for example [4,5,25,30]). The goal is to prove a property for all point sets in general position in the plane. To this end, the property is first shown to hold for some particular point set (usually a set of points in convex position). Then, one can move the points from the point set, such that only one point is moved at each instant of time, until any particular point configuration is reached. It remains to show that the property holds throughout. The changes on the combinatorial structure of the point set only appear when during a point move, one point becomes collinear with two other points. It hence is sufficient to check that the property is maintained if one point crosses the edge spanned by two other points of the set. An analogous proof strategy can be applied in R d for d > 2.

Related work
The problem studied in this work is related to one of the most famous problems in combinatorial geometry, namely the one of showing that every set of sufficiently many points in the plane in general position determines a convex k-gon. The problem of determining the smallest integer f (k) such that every set of f (k) points contains a convex k-gon was original inspiration of Esther Klein and has become well-known as the Erdős-Szekeres problem. The fact that this number f (k) exists for every k and therefore, for given k, ≥0 X k, (S) ≥ 1 when S has sufficiently many points, was first established in a seminal paper of Erdős and Szekeres [14] who proved the following bounds on f (k) [14,15]: Subsequently, many improvements have been presented on the upper bound; see [22] for a survey on this problem. Very recently, the problem has been almost settled by a work of Suk [28], who showed that f (k) = 2 k+o(k) . Another recent related work concerning the existence of convex k-gons in point sets is [9]. In a slight variation of the original problem, Erdős suggested to find the minimum number of points g(k) in the plane in general position containing k points which form an empty convex k-gon. It is easy to show that for empty triangles and empty convex quadrilaterals this number is 3 and 5, respectively. Harborth [18] showed in 1978 that g(5) = 10. Thus X k,0 (S) ≥ 1 for k = 3, 4, 5 when S has at least g(k) points. However, in 1983 Horton [19] constructed an infinite set of points with no empty convex 7-gon, implying that g(k) is infinite for any k ≥ 7. Much later, Overmars [24] used a computer to find a set with 29 points without an empty convex hexagon and later Gerken [17] and Nicolas [23] proved that g(6) is finite. A weaker restriction of the convex polygon problem has been considered by Bialostocki, Dierker and Voxman [8]. They conjectured that for any two integers k ≥ 3 and ≥ 1, there exists a function C(k, ) such that every set with at least C(k, ) points contains a convex k-gon whose number of interior points is divisible by . They also showed that their conjecture is true if k ≡ 2(mod ) or k ≥ + 3.
In parallel to questions concerning the existence of certain configurations in every large enough set of points in general position, also their number has been subject of research. For example, Fabila-Monroy and Huemer [16] considered the number of k-islands in point sets. They showed that for any fixed k, their number is in Ω(n 2 ) for any n-point set in general position and in O(n 2 ) for some such sets.
The question of determining the number of convex k-gons contained in any n-point set in general position was raised in the 1970s by Erdős and Guy [13]. The trivial solution for the case k = 3 is n 3 . However, already for convex 4-gons this question turns out to be highly non-trivial, as it is related to the search for the minimum number of crossings in a straight-line drawing of the complete graph with n vertices; see again [13].
Erdős also posed the respective question for the number h k (n) of empty convex k-gons [12]. Horton's construction implies h k (n) = 0 for every n and every k ≥ 7, so it remains to consider the cases k = 3, . . . , 6. For the functions h 3 (n) and h 4 (n), asymptotically tight estimates are known. The currently best known bounds are n 2 +Ω(n log 2/3 n) ≤ h 3 (n) ≤ 1.6196n 2 +o(n 2 ) and n 2 2 + Ω(n log 3/4 n) ≤ h 4 (n) ≤ 1.9397n 2 + o(n 2 ), where the lower bounds can be found in [2] and the upper bounds are due to Bárány and Valtr [6]. For h 5 (n) and h 6 (n), no matching bounds are known. The best known upper bounds h 5 (n) ≤ 1.0207n 2 + o(n 2 ) and h 6 (n) ≤ 0.2006n 2 + o(n 2 ) can also be found in [6]. The best known lower bound h 6 (n) ≥ n/229 − 4 is due to Valtr [31]. It is widely conjectured that h 5 (n) grows quadratically in n. However, despite many efforts in the last 30 years, only very recently a superlinear bound of h 5 (n) = Ω(n log 4/5 n) has been shown [3]. A result of independent interest is by Pinchasi, Radoičić, and Sharir [25], who showed . By this, any improvement of the constant 1 for the dominating factor n 2 of the lower bound of h 3 (n) would imply a quadratic lower bound for h 5 (n).

Alternating sums
In this section, we concentrate on alternating sums of numbers of polygons with one interior point and possibly with some elements fixed. To this end, we introduce some more notation. Let p, q, and r be three points of a set S of n points in general position in the plane. We denote by ∆pqr the triangle with vertices p, q, and r, and by a directed edge e = pq the segment that connects p and q and is oriented from p to q. We do not always specify if an edge is directed or undirected when it is clear from the context. We sometimes also write polygon instead of convex polygon since all considered polygons are convex. We say that a polygon lies to left side of a directed edge e if it contained in the left closed half-plane that is bounded by the line through e. For a fixed point p ∈ S, we denote by X p k,1 (S) the number of convex k-gons spanned by S that contain exactly p in their interior, and by A p 1 (S) := k≥3 (−1) k+1 X p k,1 (S) the according alternating sum. Further, for a directed edge e, we denote by X k, (S; e) the number of convex k-gons with interior points that have e as a boundary edge and lie on the left side of e; and by A (S; e) := k≥3 (−1) k+1 X k, (S; e) the according alternating sum. Likewise X k, (S; p) is the number of convex k-gons with interior points that have p on their boundary. If more elements (points and/or edges) are required to be on the boundary of the polygons, then all those are listed after the semicolon in this notation. Further, if an element is required to not be on the boundary of the polygons, then it is listed with a minus. For example, X k, (S; e, p 1 , −p 2 ) denotes the number of convex k-gons with interior points that are on the left of e, and have e and p 1 on their boundary but not p 2 .
In [25], the authors show as a side result (in the proof of Theorem 2.2) that the alternating sum of convex k-gons incident to (the left side of) a directed edge e = pq is 1 if there is at least one point of S\{p, q} in the left side of e, and 0 otherwise. As we will repeatedly use this result, we explicitly state it as a lemma here. We remark that in [25], A 0 (S) and A 0 (S; e) are denoted as M 0 (S) and M 0 (e), respectively. Proof. Obviously, if p is an extreme point of S, then it cannot be in the interior of any polygon spanned by points of S and hence A p 1 (S) = 0. So assume that p is not an extreme point of S. Note that every polygon in S that contains exactly p in its interior is an empty polygon in S \ {p}.
If p lies close enough to a convex hull edge e of S (an edge on the boundary of the convex hull of S), then p is contained in exactly all polygons that are incident to e and empty in S \{p}. Hence, A p 1 (S) = A 0 (S \ {p}; e) = 1 by Lemma 1. Otherwise, if p is located arbitrarily, consider a continuous path from p to a position close enough to a convex hull edge of S, and move p along this path. This path can be chosen such that it avoids all crossings in the line arrangement spanned by S \ {p} and lies inside the convex hull of S. During this movement, A p 1 (S) can only change when p crosses an edge qr spanned by two points of S. Further, changes can only occur from changing amounts of convex k-gons that have qr as an edge. More exactly, when p is moved over qr, from its left to its right side, then the alternating sum of polygons that p "stops being inside" is A 0 (S \ {p}; qr) = 1, and the alternating sum of polygons that p "starts being inside" is A 0 (S \ {p}; rq) = 1 (note that qr is not a convex hull edge of S). Hence, the value A p 1 (S) is the same for all possible positions of p on the path, including the final position for which we already showed A p 1 (S) = 1.
Theorem 1. Given a set S of n points in general position in the plane, h of them extreme, it holds that A 1 (S) = n − h.
Proof. Any convex k-gon counted in A 1 (S) contains exactly one point in its interior. Hence, we can count the convex k-gons by their interior points and obtain that In the previous result we used A 0 (S; e) to obtain bounds on A p 1 (S) and determine A 1 (S). A possible approach for determining A 2 (S) could be via A 1 (S; e). In the following, we show why such an approach cannot work. Lemma 3. Given a set S of n points in general position in the plane, a point p ∈ S, and a directed edge e = qr of S \ {p}, it holds that A p 1 (S; e) ∈ {−1, 0, 1}. Proof. The idea for obtaining A p 1 (S; e) is to start with A 0 (S \ {p}; e) = 1 and subtract from it the alternating sum of all convex polygons that stay empty when adding p again to S. In the following, we denote the latter with A 0 (S; e, −p). So we have As we are only counting polygons on the left side of e, we assume without loss of generality that e is a convex hull edge of S, and S lies to the left of e. Obviously, if p is an extreme point of S, then it cannot be in the interior of any polygon spanned by points of S, and hence A p 1 (S; e) = 0. Likewise, if the triangle ∆pqr contains any points of S in its interior, A p 1 (S; e) = 0. So assume that p is not an extreme point of S and that ∆pqr is interior-empty.
Consider the supporting lines q and r of pq and pr, respectively, and the four wedges bounded by these lines. One of the wedges contains the triangle ∆pqr, one contains p and q but not r (we call it the q-wedge), one contains p and r but not q (we call it the r-wedge), and the last one contains p but not q and r (we call it the p-wedge); see Figure 2.
Note that any convex polygon that has e as an edge and a vertex in the p-wedge contains p. Hence, any polygon counted in A 0 (S; e, −p) has all its vertices (except q and r) in the interior of the q-wedge and the r-wedge. If both, the q-wedge and the r-wedge are empty of points (i.e., p lies close enough to e) then A 0 (S; e, −p) = 0 and p is contained in exactly all polygons that We first count all polygons for A 0 (S; e, −p) that have all vertices except q and r in the interior of the r-wedge. The alternating sum of those polygons is where H q is the closed half-plane bounded by q that contains e. By Lemma 1, For counting the polygons in A 0 (S; e, −p) that have at least one vertex in the q-wedge, we consider the points in the interior of the q-wedge in counterclockwise order around p (such that q is "after" the last point) and denote them by p 1 , . . . p m . Then for every i ∈ {1, ...m}, consider the line i through p and p i and the closed half-plane H i bounded by i that contains qr. Let S i = S ∩ H i ; see Figure 3. We first complete the proof under the assumption that the claim holds and then prove the claim. Note that every counted polygon that has a vertex in the q-wedge, has a unique first such vertex in the cyclic order around p for which we can count it. Hence, the total alternating sum over those polygons is the sum of i ∈ {1, . . . , m} of the alternating sums A 0 (S i ; e, p i , −p) with p i being the first used point in the q-wedge. Further, note that for any i < m it holds that p m ∈ S i and hence S i = {p, q, r, p i }. Thus, the alternating sum of those empty polygons with at least one vertex in the q-wedge if at least one of the q-wedge and the r-wedge contains points of S. The lemma thus follows.
Proof of Claim. If S i = {p, q, r, p i }, then the only such empty polygon in H i is the triangle ∆p i qr, and hence the alternating sum A 0 (S i ; e, p i , −p) is equal to 1. If S i = {p, q, r, p i }, then we consider the triangle ∆p i qr, which splits H i into three wedges; one is bounded by lines i and q , another one by q and r , and the third one by r and i . We distinguish three cases. Case 1. The triangle ∆p i qr contains a point of S i in its interior. Then no polygon containing ∆p i qr can be empty. Hence, the alternating sum A 0 (S i ; e, p i , −p) is 0.
Case 2. All points of S i \ {p i , p, q, r} lie in one of the other two wedges, without loss of generality the one bounded by i and q . Then, each counted convex k-gon in A 0 (S i ; e, p i , −p) with k ≥ 4 vertices corresponds to a convex (k − 1)-gon incident to qp i and not having r as a vertex. The alternating sum of those is 1 by Lemma 1. Inverting all signs and adding 1 for the triangle ∆p i qr, we obtain a total of −1 + 1 = 0. Case 3. Both wedges contain points of S i \ {p i , p, q, r} in the interior (and the triangle ∆p i qr is empty). We have three different types of polygons that we have to count: (i) the triangle ∆p i qr, (ii) the polygons having additional vertices in only one wedge, and (iii) the polygons having additional vertices in both wedges. For the latter, note that the union of the vertex sets of two empty polygons, one contained in each wedge, and containing the edge qp i , respectively p i r, gives a polygon that is counted in A 0 (S i ; e, p i , −p).
Let S q i and S r i be the points of S i \{p} in the wedges bounded by i and q , and bounded by r and i , respectively. Note that A 0 (S q i ; qp i ) = A 0 (S r i ; p i r) = 1. Let L = k≥3, k odd X k,0 (S q i ; qp i ) be the number of such convex k-gons with odd k. As A 0 (S q i ; qp i ) = 1, the respective number of even polygons is L − A 0 (S q i ; qp i ) = L − 1. Similarly, let R = k≥3, k odd X k,0 (S r i ; p i r) be the number of such convex k-gons in the other wedge with odd k. Then the number of even convex k-gons in that wedge is R − 1.
For polygons of type (iii), note that combining two polygons with the same parity in the number of vertices, we obtain a polygon with an odd number of vertices, while combining two polygons with different parities we obtain a polygon with an even number of vertices. Hence, the alternating sum for polygons of type (iii) is (LR For polygons of type (ii), each polygon with an even number of vertices gives a polygon with an odd number of vertices when combined with the triangle ∆p i qr, and vice versa. Hence, the alternating sum for polygons of type (ii) is ( Finally, for type (i) we only have the triangle ∆p i qr, which contributes +1 to the alternating sum. Hence altogether we obtain an alternating sum of +1 − 2 + 1 = 0 also for the third case, which completes the proof of the claim.  Proof. For the upper bound, consider an arbitrary point p ∈ S \ {q, r}. Reconsider the proof of Lemma 3 and the q-wedge and the r-wedge. Then, for A p 1 (S; e) = 1 it is necessary that none of those wedges contains points of S in the interior. As this can happen for at most one point of S and as otherwise A p 1 (S; e) ≤ 0, the upper bound follows. For the lower bound, note first that for any extreme point p of S we have A p 1 (S; e) = 0. Hence, p∈S A p 1 (S; e) ≥ (−1) · (n − h), which for h ≥ 4 is the claimed lower bound. Further, if e is not a convex hull edge of S, then the points on the non-considered side of e (there is at least one) can be ignored, again implying the claimed bound. So assume that h = 3 and e is a convex hull edge. Let p be a non-extreme point of S that has maximum distance to e. Then, the only convex polygon spanned by S and having e as an edge and that contains p in its interior, is a triangle, since S has h = 3 extreme points. This implies that A p 1 (S; e) ∈ {0, 1} and hence p∈S A p 1 (S; e) ≥ (−1) · (n − 4) = 4 − n = max{4, h} − n.
We remark that both bounds are tight in the sense that there exist arbitrary large point sets and edges obtaining them. For the lower bound, a quadrilateral with a concave chain of n − 4 edges added close enough to one edge, and e being the edge opposite to the chain gives an example; see Figure 4. Actually, the latter also provides edges f with A 1 (S; f ) = 1; see Figure 4. A different example for the upper bound is when the considered edge g has a point p sufficiently close to it. This guarantees that any non-empty polygon with g as edge contains p, and hence A 1 (S; g) = A 0 (S \ {p}; g) = 1.

Inequalities
Pinchasi et al. [25] derived several inequalities that involve the parameters X k,0 . In this section, we show analogous inequalities for the parameters X k,1 . We will need the following lemma proved in [25].   • for each t ≥ 3 odd, X p 3,1 (S) − X p 4,1 (S) + . . . + X p t,1 (S) ≥ 1, • for each t ≥ 4 even, X p 3,1 (S) − X p 4,1 (S) + . . . − X p t,1 (S) ≤ 1, with equality holding, in either case, if and only if X p t+1,1 (S) = 0. Proof. First of all, by Lemma 2, we have that if X p t+1,1 (S) = 0, then equality holds. Let us then consider that p is close enough to a convex hull edge e of S. We can apply the same argument as in the proof of Lemma 2. We get  • for each t ≥ 3 odd, • for each t ≥ 4 even, Proof. Observe that, by Theorem 1, if X t+1,1 = 0 then the equality holds. Using the same argument as in Theorem 1, it is clear that Let t be odd. By Lemma 5, X p 3,1 (S) − X p 4,1 (S) + . . . + X p t,1 (S) ≥ 1 if p is an interior point of S. Therefore, If equality holds, then X p 3,1 (S) − X p 4,1 (S) + X p 5,1 (S) − . . . + X p t,1 (S) = 1 if p is an interior point of S and, by Lemma 5, X p t+1,1 (S) = 0 for these points. Therefore, X p t+1,1 (S) = 0 for all the points and, in consequence, X t+1,1 (S) = 0.
If t is even, the proof is analogous with the unique difference that the inequality is X p 3,1 (S) − X p 4,1 (S) + X p 5,1 (S) − . . . + (−1) t+1 X p t,1 (S) ≤ 1 if p is an interior point of S. Therefore, the proof proceeds in the same manner but the direction of the inequalities is reversed.

Weighted sums
In this section, we consider sums of the form F (S) = k≥3 ≥0 f (k, )X k, (S). The following theorem is the main tool used throughout this section and the next one.

Theorem 4.
For any function f (k, ) that fulfills the equation the sum F (S) := k≥3 ≥0 f (k, )X k, (S) is invariant over all sets S of n points in general position, that is, F (S) only depends on the cardinality of S.
Proof. Consider a point set S in general position. We claim that any continuous motion of the points of S which is sufficiently generic does not change the value of F (S).
Consider that p, q, r ∈ S become collinear, with r lying between p and q; thus the only convex polygons spanned by S that may change are those that have pq as an edge and r in its interior or those that have p, q, and r as vertices.
Let Q be a convex k-gon with interior points that contains pq as an edge and r in its interior. If r moves outside of Q, then Q has − 1 points in its interior and the (k + 1)-gon Q obtained by replacing the edge pq of Q by the polygonal path prq, starts being convex with − 1 points in its interior. Hence, in this movement we can assign each polygon counted in X k, (which disappears) to one polygon counted in X k, −1 and to one counted in X k+1, −1 (which appear). Since f (k, ) = f (k + 1, − 1) + f (k, − 1), the movement of the point does not change the value of F (S).
Symmetrically, if r moves inside Q (with points in its interior), then Q has + 1 points in its interior and the (k + 1)−gon Q , with also points in its interior, stops being convex. Again, this does not change the value of F (S).
Using Theorem 4, we first derive several relations for the sum over all convex polygons, weighted by their number of interior points. Each of this relations is proved by showing that the function f (k, ) satisfies Equation (5) and by evaluating F (S) for a set of n points in convex position. Note that for point sets in convex position X k, = 0 for ≥ 1.
Now set m = 2k + + 1 and observe that the function f 1 (k, ) := 2 cos (2k+ )π 3 satisfies Equation (5). Consider then a set S of n points in convex position. We use a binomial identity, which can be found in [27], Equation (1.26), With y = 2π 3 and hence cos( y 2 ) = 1 2 we obtain Equation (6): To prove Equation (7), consider the Chebyshev polynomial of the second kind, satisfies Equation (5). Consider then a set S of n points in convex position. We use a binomial identity, which can be found in [27], Equation (1.27). This identity with y = 2π 3 completes the proof of Equation (7): Next we show that the functions f (k, ) can be expressed as a linear combination of the functions f (k + i, 0), for i = 0, . . . , .
Theorem 5. The general solution of the recurrence relation f (k, ) = f (k +1, −1)+f (k, −1) is given by the equation Proof. We prove the statement by induction on . It is straightforward to verify the base cases = 0 and = 1. For the inductive step, let λ ≥ 0 be given and suppose (8) holds for = λ. Then, Note that there may be many functions f (k, ) that fulfill Equation (5), thus many different sums F (S) that only depend on n. An interesting point of view is to analyze how many of them are independent. Proposition 1. The maximum number of linearly independent equations of the form F j (S) = k≥3 ≥0 f j (k, )X k, , where each f j (k, ) satisfies Equation (8), in terms of the variables X k, is n − 2.
Proof. Let F j (S) = n k=3 n−k =0 f j (k, )X k, , for 1 ≤ j ≤ n − 1, be sums that only depend on n, where f j (k, ) satisfies (8) for all j. Let us consider the matrix whose entries are the f j (k, ) for 3 ≤ k ≤ n, 0 ≤ ≤ n − k, and 1 ≤ j ≤ n − 1. The function f j occupies the entries of row number j of M . Let C[h] be column number h of M . The first column C [1] contains the functions f j (k, ) for values k = 3 and = 0, then the following columns are for the values k = 3 and ≥ 1 in ascending order, then there are columns containing the functions with values k = 4 and ≥ 0 in ascending order, and so on. This order implies that, for given values k and , matrix entries f j (k, ) are in column C[h] of M , where h = k−1 i=3 (n−i+1)+ +1. It is sufficient to show that the matrix M has rank n − 2. Since each f j (k, ) satisfies (8), we can express matrix M as follows.
We observe that the columns corresponding to the functions with > 0 depend on the n − 2 columns with = 0. With adequate operations these columns can be transformed to columns of zeros. That is, if we change each column C[h] corresponding to the functions with > 0 in the following manner: Thus, there are only n−2 non-zero columns corresponding to the functions f j (k, 0), implying that the maximum possible rank of M is n − 2.
Using the general solution of Theorem 5, we derive further relations for sums over all convex polygons.
Corollary 7. For any point set S of n ≥ 3 points in general position and for any x ∈ R, it holds that Proof. Define f (k + i, 0) = x k+i , then The result then follows by considering a set of n points in convex position and we have n k=3 x k n k Observation 2. Corollary 2 is the particular case x = 1 of Corollary 7.
As shown in Proposition 1, the maximum number of possible linearly independent equations is n−2. From Corollary 7, we can obtain multiple equations of this form. Therefore, we evaluate the independence of these equations.
Proposition 2. For any point set S of n ≥ 3 points in general position, let x j ∈ R =0 , with 1 ≤ j ≤ n−2, be distinct values, and consider the n−2 equations P j (S) = n k=3 n−k =0 x k j (1 + x j ) X k, . Then these equations are linearly independent.
Proof. Using the argument of Proposition 1, it is sufficient to analyze the columns corresponding to the variables X k,0 . Thus, we consider the matrix Now, we can divide each row j by x 3 j and we obtain This matrix is an (n − 2) × (n − 2) Vandermonde matrix and all x i are distinct. Therefore the rank of the matrix is n − 2, implying that the n − 2 equations are linearly independent.
The following result is an immediate consequence of Proposition 1, Corollary 7, and Proposition 2.

Moment sums
Recall that Theorem 1 states that for any set S of n points in general position, the alternating sum of the numbers of polygons with one interior point is A 1 (S) = n − h. Combining this with the first moment of the numbers of empty polygons M 1 (S) = 2 n 2 − h from [25], we observe that the difference M 1 (S) − A 1 (S) = 2 n 2 − n is again a function that only depends on the cardinality n of S and hence is independent of the combinatorics of the underlying point set S. In this section, we show that the latter observation can actually be extended to moment sums for convex polygons with at most two interior points. Proof. For r ∈ {0, 1}, the statement follows from the results of [25] and Theorem 1. For the case r = 2, we have Using f (k, ), we can express the sum as F 2 (S) = k≥3 ≥0 f (k, )X k, (S). We first show that F 2 (S) only depends on the cardinality n of S by proving that the function f (k, ) fulfills Equation (5) from Theorem 4, namely, for all > 0, f (k + 1, − 1) + f (k, − 1) = f (k, ). For > 3, Equation (5) is trivially true as all terms in the equation are equal to zero. For = 3, we have f (k, ) = 0 and For 0 < ≤ 2, Equation (5) for f (k, ) can be stated in terms of the function m r (k), which gives We consider the case = 2, = 1 and = 0 separatedly.

Higher dimensions
In this section, we consider the generalization of the previous results to d-dimensional Euclidean space R d , for d ≥ 3. To this end, let S be a set of n ≥ d + 1 points in R d in general position, that is, no hyperplane contains more than d points of S. We again denote by h the number of extreme points of S, that is, the points of S that lie on the boundary of the convex hull of S. For each k ≥ d + 1, let X k (S) be the number of empty convex k-vertex polytopes spanned by S, and let X k, (S) be the number of convex k-vertex polytopes of S that have exactly points of S in their interior.
In [25], the authors extend their results on alternating moments of point sets in the Euclidean plane to point sets S in R d . They show that where M r (S) is again called the r-th alternating moment of {X k (S)} k≥d+1 and i = n − h is the number of interior points of S. The proofs of [25] make use of a continous motion argument of points in R d . The same argument is applied in the following, so we refer the reader also to [25].

Alternating sums
For an oriented facet f , let X k (S; f ) be the number of empty convex k-vertex polytopes that have f as a boundary facet and lie on the positive side of f . In the proof of Theorem 4.2 in [25], the authors generalize Lemma 2 to R d . The following lemma is implicit in [25]. In accordance to the planar case, we denote by A p 1 (S) the alternating sum of convex polytopes that contain exactly p in their interior. Using Lemma 6, Lemma 2 can be generalized to the following. Proof. If p is an extreme point of S, then it cannot be in the interior of any convex polytope spanned by points of S and hence A p 1 (S) = 0. So assume that p is not an extreme point of S. If p lies close enough to a convex hull facet f of S, then p is contained in exactly all polytopes that are incident to f and empty in S \ {p}. Hence, A p 1 (S) = A 0 (S \ {p}; f ) = 1 by Lemma 6. Otherwise, if p is located arbitrarily, consider a continuous path from p to a position close enough to a convex hull facet of S and move p along this path. The path can be chosen such that it avoids all lower dimensional elements in the hyperplane arrangement spanned by S \ {p} and lies inside the convex hull of S. During this movement, A p 1 (S) can only change when p crosses a facet f spanned by d points of S. Further, changes can only occur from changing amounts of polytopes that have f as a facet. Similar to X k (S; f ), let X k (S; f − ) be the number of empty convex k-vertex polytopes that have f as a boundary facet and lie on the negative side of f . When p is moved through f (from its positive to its negative side), then the alternating sum of polytopes that p "stops being inside" is A 0 (S \ {p}; f ) = 1, and the alternating sum of polytopes that p "starts being inside" is A 0 (S \ {p}; f − ) = 1 (note that f is not a convex hull facet of S). Hence, the value A p 1 (S) is the same for all possible positions of p on the path, including the final position for which we already showed A p 1 (S) = 1.
Likewise, Theorem 1 generalizes to R d , with an analogous proof as in Section 2.
Theorem 7. Given a set S of n ≥ d + 1 points in general position in R d , h of them extreme, it holds that A 1 (S) = n − h.
However, the results for A p 1 (S; e) and A 1 (S; e) do not carry over, as the cyclic ordering of the remaining points around p in the proof of Lemma 3 does not have a direct higher dimensional counterpart.

Weighted sums
We next consider higher dimensional versions of the results from Section 3. In the following, we denote by X k, (S; f ) the number of convex k-vertex polytopes with interior points, with vertices and interior points a subset of S, that have f as a boundary facet and lie to the positive side of f . We denote by X k, (S; p) the number of convex k-vertex polytopes with interior points that have p on their boundary. The notation is again generalized to more required boundary elements by listing them all after S. For example, X k, (S; f, p 1 , p 2 , p 3 ) denotes the number of convex k-vertex polytopes with interior points that have f , p 1 , p 2 , and p 3 on their boundary. Similar to Lemma 2, Theorem 4 can directly be generalized to higher dimensions.
the sum F (S) = The proofs of the following formulae all go along the same lines as their planar counterparts and are omitted.

Moment sums
Recall that Theorem 7 states that for any set S of n points in general position in R d , the alternating sum of the numbers of convex polytopes with one interior point is A 1 (S) = n − h.
Combining this with the first moment of the numbers of empty convex polytopes M 1 (S) = d k=0 (−1) d−k k n k + i from [25], we observe that also in R d , the difference M 1 (S) − A 1 (S) = d k=0 (−1) d−k k n k is a function that only depends on the cardinality n of S and hence is independent of the combinatorics of the underlying point set S. For r = 2 and any point set S in general position in R d let be the second alternating moment of {X k (S)} k≥d+1 . Then, Theorem 6 can be generalized to R d in the following way. The proof of this theorem is identical to the proof of Theorem 6, except that the summation starts with k = d + 1 instead of k = 3.