1 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 [10]. We denote by \(X_{k}(S)\) the number of empty convex k-gons in S, and more general, we denote by \(X_{k,\ell }(S)\) the number of convex k-gons in S that have exactly \(\ell \) points of S in their interior. Further, a convex k-gon with \(\ell \) interior points constitutes a subset of \(k+\ell \) points of S whose convex hull does not contain any other points of S. Such sets are sometimes also called islands [6]. Figure 1 shows a set S of ten points and its values \(X_{k,\ell }(S)\). Here we are interested in relations among the values \(X_{k,\ell }(S)\) and invariants among all point sets of given cardinality.

Fig. 1
figure 1

A set S of \(n=10\) points, with \(h=5\) of them on the boundary of the convex hull, and the numbers of convex k-gons with \(\ell \) interior points, \(X_{k,\ell }(S)\)

Invariants for the values \(X_{k}(S)\) are well known. The equation

$$\begin{aligned} \sum \limits _{k\ge 3} (-1)^{k+1} X_{k}(S) = \left( {\begin{array}{c}n\\ 2\end{array}}\right) -n+1 \end{aligned}$$
(1)

was proved by Edelman and Jamison in [9], actually in terms of the number \(F_k\) of free sets of cardinality k in a convex geometry [9,  Theorem 4.5], stating \(\sum _{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\atopwithdelims ()2}\), the number of points and edges spanned by S, respectively. In [9], (1) is also attributed to Lawrence. Moreover, it also holds in higher dimension. The equation

$$\begin{aligned} \sum \limits _{k\ge 3} (-1)^{k+1} k X_{k}(S) = 2\left( {\begin{array}{c}n\\ 2\end{array}}\right) -h, \end{aligned}$$
(2)

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 [10] and by Klain [20]. Pinchasi, Radoičić, and Sharir [25] provided elementary geometric proofs for (1) and (2), by using a continous motion argument of points. They further proved other equalities and inequalities involving the values \(X_{k}(S)\) and extensions to higher dimension. As one main result, they showed that for planar point sets and \(r \ge 2\), it holds that

$$\begin{aligned} \sum \limits _{k\ge 2r} (-1)^{k+1} \frac{k}{r} \left( {\begin{array}{c}k-r-1\\ r-1\end{array}}\right) X_{k}(S) = -T_r(S), \end{aligned}$$
(3)

where \(T_r(S)\) denotes the number of r-tuples of vertex-disjoint edges \((e_1,\dots , e_r)\) spanned by S that lie in convex position, and are such that the region \(\tau (e_1,\dots , e_r)\), formed by the intersection of the r half-planes that are bounded by the lines supporting \((e_1,\dots , e_r)\) and contain the other edges, has no point of S in its interior [25]. For the point set S of Fig. 1 we have \(T_2(S)=30\), \(T_3(S)=25\), and \(T_r(S)=0\) for \(r\ge 4\).

In [25], the alternating sums of (1), (2), and (3) have been joined by the notion of the r-th alternating moment \(M_r(S)\) of \(\{X_{k}(S)\}_{k\ge 3}\) as

$$\begin{aligned} M_r(S) := {\left\{ \begin{array}{ll} \displaystyle \sum \limits _{k\ge 3} (-1)^{k+1} X_{k}(S) &{} \text { for}\quad r = 0, \\ \displaystyle \sum \limits _{k\ge 3} (-1)^{k+1} \frac{k}{r} \left( {\begin{array}{c}k-r-1\\ r-1\end{array}}\right) X_{k}(S)&\text { for}\quad r \ge 1.\, \end{array}\right. } \end{aligned}$$

In this work, we take a similar approach as done in the work of Pinchasi, Radoičić, and Sharir [25] and extend above-mentioned results to \(X_{k,\ell }(S)\),Footnote 1 that is, to convex k-gons having a fixed number \(\ell \) of points of S in their interior. We denote by

$$\begin{aligned} A_{\ell }(S) := \sum \limits _{k\ge 3} (-1)^{k+1} X_{k,\ell }(S) \end{aligned}$$

the alternating sum of \(\{X_{k,\ell }(S)\}_{k\ge 3}\). In Sect. 2, we mostly concentrate on the case of polygons with one interior point, i.e., \(\ell =1\), where we prove that

$$\begin{aligned} A_{1}(S) = \sum \limits _{k\ge 3} (-1)^{k+1} X_{k,1}(S) = n-h \end{aligned}$$

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 \in S\) (denoted \(A_1^p(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 \(\sum _{k=3}^{t}(-1)^{k+1}X_{k,1}(S)\) for any given value \(t\ge 3\), based on analogous inequalities for \(X_{k}\) from [25]. In Sect. 3, we consider different weight functions \(f(k,\ell )\) and general weighted sums over \(X_{k,\ell }(S)\) of the form

$$\begin{aligned} F(S) = \sum _{k\ge 3} \sum _{\ell \ge 0} f(k,\ell ) X_{k,\ell }(S). \end{aligned}$$

We show that for any function \(f(k,\ell )\) with the property that

$$\begin{aligned} f(k,\ell ) = f(k+1,\ell -1) + f(k,\ell -1), \end{aligned}$$
(4)

the value of the according sum \(F(S)\) is invariant over all sets S of n points. We present several functions \(f(k,\ell )\) with this property. Among these functions, we find that for any point set S of n points in general position and for any \(x \in \mathbb R\), it holds that

$$\begin{aligned} \sum _{k=3}^n \sum _{\ell =0}^{n-k} x^k(1+x)^\ell X_{k,\ell } =(1+x)^n -1 - x\cdot n - x^2 \left( {\begin{array}{c}n\\ 2\end{array}}\right) . \end{aligned}$$

Note that (1) is the special case \(x=-1\); for this case and \(\ell =0\), set the indeterminate form \((1+x)^\ell :=1\). We further show that the maximum number of linearly independent equations \(F_j(S) =\sum _{k \ge 3} \sum _{\ell \ge 0} f_j(k,\ell ) X_{k,\ell }\), where each \(f_j(k,\ell )\) satisfies (4), in terms of the variables \(X_{k,\ell }\), is \(n-2\). In Sect. 4, we relate the results of Sect. 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,

$$\begin{aligned} m_{r}(k) := {\left\{ \begin{array}{ll} \displaystyle 1 &{} \text {for}\quad r=0,\\ \displaystyle \frac{k}{r}\left( {\begin{array}{c}k-r-1\\ r-1\end{array}}\right) &{} \text {for}\quad r \ge 1 \hbox { and }k \ge 2r,\\ \displaystyle 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

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 \le r\le 2\) it holds that

$$\begin{aligned} F_{r}(S) := \sum _{k\ge 3} \sum _{\ell =0}^r (-1)^{k-\ell +1} m_{r-\ell }(k-\ell ) X_{k,\ell }(S) ={\left\{ \begin{array}{ll} \displaystyle \left( {\begin{array}{c}n\\ 2\end{array}}\right) -n+1&{} \text {for}\quad r=0, \\ \displaystyle 2\left( {\begin{array}{c}n\\ 2\end{array}}\right) -n&{} \text {for}\quad r=1, \\ \displaystyle -\left( {\begin{array}{c}n\\ 2\end{array}}\right) +n&\text {for}\quad r=2. \end{array}\right. } \end{aligned}$$

Finally, in Sect. 5 we discuss the generalization of the obtained results to higher dimensions. Several more results, in particular on identities involving \(X_{k,\ell }\) 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 [3, 4, 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 \(\mathbb R^d\) for \(d>2\).

1.1 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 the 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, \(\sum _{\ell \ge 0} X_{k,\ell }(S)\ge 1\) when S has sufficiently many points, was first established in a seminal paper of Erdős and Szekeres [13] who proved the following bounds on f(k) [13, 14]:

$$\begin{aligned} 2^{k-2} + 1 \le f(k) \le \left( {\begin{array}{c}2k-4\\ k-2\end{array}}\right) + 1 . \end{aligned}$$

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 [8]. 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)\ge 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 heptagon, implying that g(k) is infinite for any \(k\ge 7\). Much later, Overmars [24] found a set with 29 points without an empty convex hexagon via computer search, a few years after which 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 [7]. They conjectured that for any two integers \(k\ge 3\) and \(\ell \ge 1\), there exists a function \(C(k,\ell )\) such that every set with at least \(C(k,\ell )\) points contains a convex k-gon whose number of interior points is divisible by \(\ell \). They also showed that their conjecture is true if \(k\equiv 2\) (\({\text {mod}}\ell \)) or \(k \ge \ell +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 [15] considered the number of k-islands in point sets. They showed that for any fixed k, their number is in \(\varOmega (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 [12]. The trivial solution for the case \(k=3\) is \(\left( {\begin{array}{c}n\\ 3\end{array}}\right) \). However, already for convex tetragons 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 [12].

Erdős also posed the respective question for the number \(h_k(n)\) of empty convex k-gons [11]. Horton’s construction implies \(h_k(n)=0\) for every n and every \(k \ge 7\), so it remains to consider the cases \(k=3, \ldots , 6\). For the functions \(h_3(n)\) and \(h_4(n)\), asymptotically tight estimates are known. The currently best known bounds are \(n^2 + \varOmega \,(n\log ^{2/3}\!n)\le h_3(n)\le 1.6196\, n^2+o(n^2)\) and \({n^2}/{2} +\varOmega (n\log ^{3/4}\!n) \le h_4(n) \le 1.9397\, n^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 [5]. For \(h_5(n)\) and \(h_6(n)\), no matching bounds are known. The best known upper bounds \(h_5(n)\le 1.0207\, n^2+o(n^2)\) and \(h_6(n)\le 0.2006\, n^2+o(n^2)\) can also be found in [5]. The best known lower bound \(h_6(n)\ge 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)=\varOmega \,(n\log ^{4/5}\!{n})\) has been shown [2]. A result of independent interest is by Pinchasi, Radoičić, and Sharir [25], who showed \(h_4(n) \ge h_3(n)-n^2/{2}-O(n)\) and \(h_5(n) \ge h_3(n) - n^2 - O(n)\). Later, García [16] showed that \(h_5(n) \ge h_3(n) - (n^2 -5n +h+4)\). 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)\).

2 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 \(\varDelta \,{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\in S\), we denote by \(X_{k,1}^p(S)\) the number of convex k-gons spanned by S that contain exactly p in their interior, and by \(A_{1}^p(S):=\sum _{k\ge 3}(-1)^{k+1}X_{k,1}^p(S)\) the corresponding alternating sum. Further, for a directed edge e, we denote by \(X_{k,\ell }(S;e)\) the number of convex k-gons with \(\ell \) interior points that have e as a boundary edge and lie on the left side of e; and by \(A_{\ell }(S;e):= \sum _{k\ge 3} (-1)^{k+1} X_{k,\ell }(S;e)\) the according alternating sum. Likewise \(X_{k,\ell }(S;p)\) is the number of convex k-gons with \(\ell \) 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,\ell }(S;e,p_1,-p_2)\) denotes the number of convex k-gons with \(\ell \) 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{\setminus }\{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.

Lemma 2.1

[25] For any set S of n points in general position in the plane and any directed edge \(e=pq\) spanned by two points of S, it holds that

$$\begin{aligned}A_{0}(S;e) = {\left\{ \begin{array}{ll} 1 &{} \text { if}\,e\hbox { has at least one point of }S{\setminus }\{p,q\}\hbox { to its left},\\ 0 &{} \text { otherwise.} \end{array}\right. }\end{aligned}$$

Lemma 2.2

For any set S of n points in general position in the plane and any point \(p \in S\) it holds that

$$\begin{aligned}A_{1}^p(S) = {\left\{ \begin{array}{ll} 0 &{} \text { if}\,p\hbox { is an extreme point of }S, \\ 1 &{} \text { otherwise.} \end{array}\right. }\end{aligned}$$

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_{1}^p(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{\setminus }\{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{\setminus }\{p\}\). Hence, \(A_{1}^p(S)=A_{0}(S{\setminus }\{p\};e)=1\) by Lemma 2.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{\setminus }\{p\}\) and lies inside the convex hull of S. During this movement, \(A_{1}^p(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{\setminus }\{p\};qr)=1\), and the alternating sum of polygons that p “starts being inside” is \(A_{0}(S{\setminus }\{p\};rq)=1\) (note that qr is not a convex hull edge of S). Hence, the value \(A_{1}^p(S)\) is the same for all possible positions of p on the path, including the final position for which we already showed \(A_{1}^p(S)=1\). \(\square \)

Theorem 2.3

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 \(A_{1}(S)=\sum _{p\in S} A_{1}^p(S) = n-h\). \(\square \)

In the previous result we used \(A_{0}(S;e)\) to obtain bounds on \(A_{1}^p(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.

Recall that, given a set S of n points in general position in the plane, a point \(p \in S\), and a directed edge \(e=qr\) of \(S{\setminus }\{p\}\), we denote by \(A_{1}^p(S;e)\) the alternating sum of polygons that contain exactly p in their interior, have e as a boundary edge, and lie to the left of e. Further, consider the supporting lines \(\ell _q\) and \(\ell _r\) of pq and pr, respectively, and the four wedges bounded by these lines; see Fig. 2. One of the wedges contains the triangle \(\varDelta \,{pqr}\). One contains p and q but not r; we call it the q-wedge (of p and e). The second one contains p and r but not q; we call it the r-wedge (of p and e). And the last one contains p but not q and r; we call it the p-wedge (of p and e).

Fig. 2
figure 2

Illustration of wedges for a point p and an edge e

Lemma 2.4

Given a set S of n points in general position in the plane, a point \(p \in S\), and a directed edge \(e=qr\) of \(S{\setminus }\{p\}\), it holds that \(A_{1}^p(S;e)\in \{-1,0,1\}\). Moreover, \(A_{1}^p(S;e)=1\) if and only if all points of \(S{\setminus }\{p,q,r\}\) lie in the interior of the p-wedge of e.

Proof

The idea for obtaining \(A_{1}^p(S;e)\) is to start with \(A_{0}(S{\setminus } \{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

$$\begin{aligned} A_{1}^p(S;e) = A_{0}(S{\setminus } \{p\};e) - A_{0}(S;e,-p). \end{aligned}$$

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_{1}^p(S;e)=0\). Likewise, if the triangle \(\varDelta \,{pqr}\) contains any points of S in its interior, \(A_{1}^p(S;e)=0\). So assume that p is not an extreme point of S and that \(\varDelta \,{pqr}\) is interior-empty.

Note that any convex polygon that has e as an edge and a vertex in the p-wedge contains p in its interior. 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 are incident to e and empty in \(S{\setminus }\{p\}\). Hence, \(A_{1}^p(S;e) = A_{0}(S{\setminus }\{p\};e) = 1\) by Lemma 2.1. So assume that at least one of the q-wedge and the r-wedge, without loss of generality the r-wedge, contains at least one point of S in its interior.

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 \(A_{0}(S \cap H_q;e,-p)=A_{0}(S {\setminus } \{p\}\cap H_q;e)\), where \(H_q\) is the closed half-plane bounded by \(\ell _q\) that contains e. By Lemma 2.1, \(A_{0}(S \cap H_q;e,-p) = 1\).

Fig. 3
figure 3

Angularly sorted points \(p_1,\dots ,p_m\) in the interior of the q-wedge (of p and e); the half-plane \(H_i\) (sketched shaded) and the lines \(\ell _{i,r}\) and \(\ell _{i,q}\) (drawn dashed) for a point \(p_i\)

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, \ldots ,p_m\). Then for every \(i \in \{1,\dots ,m\}\), consider the line \(\ell _i\) through p and \(p_i\) and the closed half-plane \(H_i\) bounded by \(\ell _i\) that contains qr. Let \(S_i=S\cap H_i\); see Fig. 3.

Claim. The alternating sum \(A_{0}(S_i;e,p_i,-p)\) of empty polygons lying in \(H_i\) that contain the triangle \(\varDelta {p_iqr}\) and do not have p as a vertex is 1 if \(S_i = \{p, q, r, p_i\}\), and 0 otherwise.

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\in \{1, \ldots , 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 \in S_i\) and hence \(S_i\ne \{p, q, r, p_i\}\). Thus, the alternating sum of those empty polygons with at least one vertex in the q-wedge is \(\sum _{i=1}^m A_{0}(S_i;e,p_i,-p) = A_{0}(S_m;e,p_m,-p) \in \{0,1\}\).

Altogether, \(A_{0}(S;e,-p) = A_{0}(S \cap H_q;e,-p) + A_{0}(S_m;e,p_m,-p) \in \{1,2\}\). Combining this with \(A_{0}(S{\setminus } \{p\};e) = 1\), we obtain that \(A_{1}^p(S;e) = A_{0}(S{\setminus } \{p\};e) - A_{0}(S;e,-p) \in \{0,-1\}\) if at least one of the q-wedge and the r-wedge contains points of S. The lemma thus follows.

Proof of the claim.   If \(S_i=\{p, q, r, p_i\}\), then the only such empty polygon in \(H_i\) is the triangle \(\varDelta \,{p_iqr}\), and hence the alternating sum \(A_{0}(S_i;e,p_i,-p)\) is equal to 1. If \(S_i\ne \{p, q, r, p_i\}\), then consider the triangle \(\varDelta \,{p_iqr}\) and its bounding lines \(\ell _{i,q}\) and \(\ell _{i,r}\) spanned by \(p_i\) and q or r, respectively; see again Fig. 3. Those lines split \(H_i\) into three wedges; the q-wedge (of \(p_i\) and e) bounded by the lines \(\ell _i\) and \(\ell _{i,q}\), the wedge bounded by \(\ell _{i,q}\) and \(\ell _{i,r}\), and the r-wedge (of \(p_i\) and e) bounded by \(\ell _{i,r}\) and \(\ell _i\). We distinguish three cases.

Case 1. The triangle \(\varDelta \,{p_iqr}\) contains a point of \(S_i\) in its interior. Then no polygon containing \(\varDelta \,{p_iqr}\) can be empty. Hence, the sum \(A_{0}(S_i;e,p_i,-p)\) is 0.

Case 2. All points of \(S_i{\setminus }\{p_i,p,q,r\}\) lie in one of the other two wedges, without loss of generality the q-wedge (of \(p_i\) and e). Then each counted convex k-gon in \(A_{0}(S_i;e,p_i,-p)\) with \(k\ge 4\) vertices corresponds to a unique convex \((k-1)\)-gon incident to \(qp_i\) and not having r as a vertex. The alternating sum of those is 1 by Lemma 2.1. Inverting all signs and adding 1 for the triangle \(\varDelta \,{p_iqr}\), we obtain a total of \(-1+1=0\).

Case 3. Both the q-wedge and the r-wedge (of \(p_i\) and e) contain points of \(S_i{\setminus }\{p_i,p,q,r\}\) in the interior (and the triangle \(\varDelta \,{p_iqr}\) is empty). We have three different types of polygons that we have to count:

  1. (i)

    the triangle \(\varDelta \,{p_iqr}\),

  2. (ii)

    the polygons having additional vertices in only one wedge, and

  3. (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_ir\), gives a polygon that is counted in \(A_{0}(S_i;e,p_i,-p)\).

Let \(S_{i,q}\) and \(S_{i,r}\) be the points of \(S_i{\setminus }\{p\}\) in the interior of the q-wedge and the r-wedge (of \(p_i\) and e), respectively. Note that \(A_{0}(S_{i,q};qp_i)= A_{0}(S_{i,r};p_ir) = 1\). Let

$$\begin{aligned} L=\sum _{\begin{array}{c} k\ge 3\\ k\,\,\mathrm{odd} \end{array}}X_{k,0}(S_{i,q};qp_i) \end{aligned}$$

be the number of such convex k-gons with odd k. As \(A_{0}(S_{i,q};qp_i)=1\), the respective number of even polygons is \(L - A_{0}(S_{i,q};qp_i)= L-1\). Similarly, let

$$\begin{aligned} R=\sum _{\begin{array}{c} k\ge 3\\ k\,\,\mathrm{odd} \end{array}} X_{k,0}(S_{i,r};p_ir) \end{aligned}$$

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 + (L-1)(R-1)) - (L(R-1) + (L-1)R) = (2LR -L-R+1)-(2LR-L-R)=1\).

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 \(\varDelta \,{p_iqr}\), and vice versa. Hence, the alternating sum for polygons of type (ii) is \(((L-1)+(R-1)) - (R+L) = -2\).

Finally, for type (i) we only have the triangle \(\varDelta \,{p_iqr}\), 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.\(\square \)

Note that \(A_{1}(S;e)\), the alternating sum of convex polygons having e as an edge and exactly one interior point, highly depends on the position of the points of S and cannot be expressed by the number of extreme and non-extreme points of S. On the other hand, \(A_{1}(S;e)=\sum _{p\in S} A_{1}^p(S;e)\) and hence we can use Lemma 2.4 to derive bounds for \(A_{1}(S;e)\), analogous to Lemma 2.1 for \(A_{0}(S;e)\).

Theorem 2.5

For any set S of n points in general position in the plane, h of them on the boundary of the convex hull, and any edge \(e=qr\) of S it holds that \(\max {\{h,4\}}-n \le A_{1}(S;e) \le 1\).

Proof

For the upper bound, consider an arbitrary point \(p\in S{\setminus } \{q,r\}\), and the q-wedge and the r-wedge of p and qr. Then for \(A_{1}^p(S;e)=1\), it is necessary that none of those wedges contains points of S in the interior by Lemma 2.4. As this can happen for at most one point of S and as otherwise \(A_{1}^p(S;e)\le 0\), the upper bound follows.

For the lower bound, note first that for any extreme point p of S we have \(A_{1}^p(S;e){=}0\). Hence, \(\sum _{p\in S} A_{1}^p(S;e) \ge (-1)\cdot (n-h)\), which for \(h\ge 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_{1}^p(S;e)\in \{0,1\}\) and hence \(\sum _{p\in S} A_{1}^p(S;e) \ge (-1)\cdot (n-4)=4-n = \max {\{4,h\}}-n\).\(\square \)

Fig. 4
figure 4

Examples reaching the lower and upper bounds of Theorem 2.5: \(A_{1}(S;e) = 4-n\) and \(A_{1}(S;f) = 1\) (left, black points), \(A_{1}(S;e) = h-n\) (left, black and \(h-4\) gray points), and \(A_{1}(S;g) = 1\) (right)

We remark that both bounds are tight in the sense that there exist arbitrarily large point sets and edges obtaining them; cf. Fig. 4. For the lower bound, which appears for \(h=4\), 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 of \(A_{1}(S;e) = 4-n\). Actually, that example also contains edges f with \(A_{1}(S;f) = 1\). Moreover, the example can be modified to have a larger convex hull by placing a convex chain of \(h-4\) points above e (and reducing the number of points inside the quadrilateral to obtain the same total number of points). In the resulting point set, \(A_{1}(S;e) = h-n\). 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{\setminus }\{p\};g) = 1\).

2.1 Inequalities

Pinchasi, Radoičić, and Sharir [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].

Lemma 2.6

[25] For any set S of n points in general position and a directed edge e spanned by two points of S, if there is at least one point of S to the left of e, then it holds that

  • for each \(t \ge 3\) odd,

    $$\begin{aligned} X_{3,0}(S;e)-X_{4,0}(S;e)+X_{5,0}(S;e)-\ldots +X_{t,0}(S;e) \ge 1,\end{aligned}$$
  • for each \(t \ge 4\) even,

    $$\begin{aligned} X_{3,0}(S;e)-X_{4,0}(S;e)+X_{5,0}(S;e)-\ldots -X_{t,0}(S;e) \le 1,\end{aligned}$$

    with equality holding, in either case, if and only if \(X_{t+1,0}(S;e)=0\).

Lemma 2.7

For any set S of n points in general position and a point \(p \in S\) in the interior of the convex hull of S, it holds that

  • for each \(t \ge 3\) odd,

    $$\begin{aligned} X_{3,1}^p(S)-X_{4,1}^p(S)+\ldots +X_{t,1}^p(S) \ge 1, \end{aligned}$$
  • for each \(t \ge 4\) even,

    $$\begin{aligned} X_{3,1}^p(S)-X_{4,1}^p(S)+\ldots -X_{t,1}^p(S) \le 1, \end{aligned}$$

    with equality holding, in either case, if and only if \(X_{t+1,1}^p(S)=0\).

Proof

First of all, note that if \(X_{t+1,1}^p(S)=0\), then also \(X_{t+j,1}^p(S)=0\) for every \(j>1\). Hence, in this case

$$\begin{aligned} X_{3,1}^p(S)-X_{4,1}^p(S)+\ldots +(-1)^{t+1}X_{t,1}^p(S) =A_{1}^{p}(S) = 1 \end{aligned}$$

by Lemma 2.2 and equality holds. Let us then consider that p is close enough to a convex hull edge e of S. Recall that every polygon in S that contains exactly p in its interior is an empty polygon in \(S{\setminus }\{p\}\). Then p is contained in exactly all polygons that are incident to e and empty in \(S{\setminus }\{p\}\). We therefore get

$$\begin{aligned}&X_{3,1}^p(S)-X_{4,1}^p(S)+\ldots +(-1)^{t+1}X_{t,1}^p(S)\\&\qquad = X_{3,0}(S {\setminus }\{p\}; e)-X_{4,0}(S {\setminus }\{p\};e)+\ldots +(-1)^{t+1}X_{t,0}(S {\setminus }\{p\}; e), \end{aligned}$$

and the result of Lemma 2.6 applies. If p is located at an arbitrary position in the interior of the convex hull of S, we consider a continuous motion of p which is sufficiently generic, to move p to a position close to a convex hull edge e of S. Proceeding exactly in the same manner as in the proof of Lemma 2.2, we see that the value of \(X_{3,1}^p(S)-X_{4,1}^p(S)+\ldots +(-1)^{t+1}X_{t,1}^p(S)\) does not change during this movement.\(\square \)

Theorem 2.8

For any set S of n points in general position in the plane, h of them on the boundary of the convex hull, we have

  • for each \(t \ge 3\) odd,

    $$\begin{aligned} X_{3,1}(S)-X_{4,1}(S)+X_{5,1}(S)-\ldots +X_{t,1}(S) \ge n-h, \end{aligned}$$
  • for each \(t \ge 4\) even,

    $$\begin{aligned} X_{3,1}(S)-X_{4,1}(S)+X_{5,1}(S)-\ldots -X_{t,1}(S) \le n-h, \end{aligned}$$

    with equality holding, in either case, if and only if \(X_{t+1,1}(S)=0\).

Proof

Observe that, if \(X_{t+1,1}(S)=0\) then also \(X_{t+j,1}(S)=0\) for every \(j>1\), and in this case

$$\begin{aligned} X_{3,1}(S)-X_{4,1}(S)+X_{5,1}(S)-\ldots +(-1)^{t+1}X_{t,1}(S) = A_1(S) = n-h \end{aligned}$$

by Theorem 2.3. Any convex k-gon counted in \(\sum _{k=3}^{t}(-1)^{k+1}X_{k,1}(S)\) contains exactly one point in its interior. Then, \(X_{k,1}(S)=\sum _{p\in S} X_{k,1}^p(S)\). We get that

$$\begin{aligned}&X_{3,1}(S)-X_{4,1}(S)+X_{5,1}(S)-\ldots +(-1)^{t+1}X_{t,1}(S)\\&\qquad = \sum _{p \in S}\bigl (X_{3,1}^p(S)-X_{4,1}^p(S)+X_{5,1}^p(S)-\ldots +(-1)^{t+1}X_{t,1}^p(S)\bigr ). \end{aligned}$$

Let t be odd. By Lemma 2.7, \(X_{3,1}^p(S)-X_{4,1}^p(S)+\ldots +X_{t,1}^p(S) \ge 1\) if p is an interior point of S. Therefore,

$$\begin{aligned}&X_{3,1}(S)-X_{4,1}(S)+X_{5,1}(S)-\ldots +X_{t,1}(S)\\&\qquad = \sum _{p \in S} \bigl (X_{3,1}^p(S)-X_{4,1}^p(S)+\ldots +X_{t,1}^p(S)\bigr ) \ge n - h. \end{aligned}$$

If equality holds, then \(X_{3,1}^p(S)-X_{4,1}^p(S)+X_{5,1}^p(S)-\ldots +X_{t,1}^p(S)=1\) if p is an interior point of S and, by Lemma 2.7, \(X_{t+1,1}^p(S)=0\) for these points. Therefore, \(X_{t+1,1}^p(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_{3,1}^p(S)-X_{4,1}^p(S)+X_{5,1}^p(S)-\ldots +(-1)^{t+1}X_{t,1}^p(S) \le 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.\(\square \)

From Theorem 2.8 with \(t=4\) we obtain the following corollary.

Corollary 2.9

\(X_{4,1} \ge X_{3,1} -n + h\).

3 Weighted Sums

In this section, we consider sums of the form \(F(S) = \sum _{k\ge 3} \sum _{\ell \ge 0} f(k,\ell ) X_{k,\ell }(S)\). The following theorem is the main tool used throughout this section and the next one.

Theorem 3.1

For any function \(f(k,\ell )\) that fulfills the equation

$$\begin{aligned} f(k,\ell ) = f(k+1,\ell -1) + f(k,\ell -1), \end{aligned}$$
(5)

the sum \(F(S) := \sum _{k\ge 3} \sum _{\ell \ge 0} f(k,\ell ) X_{k,\ell }(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 \in 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 pq, and r as vertices.

Let Q be a convex k-gon with \(\ell \) interior points that contains pq as an edge and r in its interior. If r moves outside of Q, then Q has \(\ell -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 \(\ell -1\) points in its interior. Hence, in this movement we can assign each polygon counted in \(X_{k,\ell }\) (which disappears) to one polygon counted in \(X_{k,\ell -1}\) and to one counted in \(X_{k+1,\ell -1}\) (which appears). Since \(f(k,\ell )=f(k+1,\ell -1)+f(k,\ell -1)\), the movement of the point does not change the value of F(S).

Symmetrically, if r moves inside Q (with \(\ell \) points in its interior), then Q has \(\ell +1\) points in its interior and the \((k+1)\)-gon \(Q'\), with also \(\ell \) points in its interior, stops being convex. Again, this does not change the value of F(S).\(\square \)

Observation 3.2

Let \(f_1(k, \ell )\) and \(f_2(k, \ell )\) be two functions that fulfill (5). Then every linear combination of \(f_1(k,\ell )\) and \(f_2(k,\ell )\) fulfills (5) as well.

Using Theorem 3.1, 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,\ell )\) satisfies (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,\ell }=0\) for \(\ell \ge 1\).

Corollary 3.3

For any set S of \(n\ge 3\) points in general position, it holds that

$$\begin{aligned} \sum _{k=3}^{n} \sum _{\ell =0}^{n-3} 2^\ell X_{k,\ell }(S) = 2^n - \frac{n^2}{2} - \frac{n}{2} - 1. \end{aligned}$$

Proof

Let \(f(k,\ell ) = 2^\ell \). Then \(2^\ell = 2^{\ell -1} + 2^{\ell -1} = f(k+1,\ell -1) + f(k,\ell -1)\). For a set S of n points in convex position we get

$$\begin{aligned} \sum _{k=3}^n 2^0 X_{k,0} = \sum _{k=3}^n \left( {\begin{array}{c}n\\ k\end{array}}\right) = 2^n - \left( {\begin{array}{c}n\\ 2\end{array}}\right) - \left( {\begin{array}{c}n\\ 1\end{array}}\right) - \left( {\begin{array}{c}n\\ 0\end{array}}\right) = 2^n - \frac{n^2}{2} - \frac{n}{2} - 1. \end{aligned}$$

\(\square \)

Corollary 3.4

For any set S of n points in general position, and every integer \(3 \le m \le n\) it holds that

$$\begin{aligned} \sum _{k=3}^{m} \sum _{\ell =m-k}^{n-k} \left( {\begin{array}{c}\ell \\ m-k\end{array}}\right) X_{k,\ell }(S) = \left( {\begin{array}{c}n\\ m\end{array}}\right) . \end{aligned}$$

Proof

Let \(f(k,\ell ) = \left( {\begin{array}{c}\ell \\ m-k\end{array}}\right) \) and note that m is fixed. Then

$$\begin{aligned} f(k,\ell ) = \left( {\begin{array}{c}\ell \\ m-k\end{array}}\right) = \left( {\begin{array}{c}\ell -1\\ m-k-1\end{array}}\right) + \left( {\begin{array}{c}\ell -1\\ m-k\end{array}}\right) = f(k+1,\ell -1) + f(k,\ell -1). \end{aligned}$$

For a set S of n points in convex position we get

$$\begin{aligned} \sum _{k=3}^{m} \left( {\begin{array}{c}0\\ m-k\end{array}}\right) X_{k,0}(S) = X_{m,0}(S) = \left( {\begin{array}{c}n\\ m\end{array}}\right) . \end{aligned}$$

\(\square \)

Let \(\{{{\,\mathrm{Fib}\,}}(n)\}_{n \in \mathbb {Z}}\) be the sequence of Fibonacci numbers, satisfying the recurrence relation \({{\,\mathrm{Fib}\,}}(n)={{\,\mathrm{Fib}\,}}(n-1)+{{\,\mathrm{Fib}\,}}(n-2)\) with \({{\,\mathrm{Fib}\,}}(0)=0\) and \({{\,\mathrm{Fib}\,}}(1)=1\).

Corollary 3.5

For any set S of \(n\ge 3\) points in general position it holds that

$$\begin{aligned} \sum _{k=3}^{n} \sum _{\ell =0}^{n-3} {{\,\mathrm{Fib}\,}}(k+2\ell ) X_{k,\ell }(S) ={{\,\mathrm{Fib}\,}}(2n)-n-\left( {\begin{array}{c}n\\ 2\end{array}}\right) . \end{aligned}$$

Proof

The function \(f(k,\ell )={{\,\mathrm{Fib}\,}}(k+2\ell )\) satisfies (5) by definition of the Fibonacci numbers. Consider then a set S of n points in convex position and use the following identity (see [26]):

$$\begin{aligned} \sum _{k=0}^{n}{{\,\mathrm{Fib}\,}}(k)\left( {\begin{array}{c}n\\ k\end{array}}\right) ={{\,\mathrm{Fib}\,}}(2n). \end{aligned}$$

Then

$$\begin{aligned} \sum _{k=3}^{n} {{\,\mathrm{Fib}\,}}(k+0) X_{k,0}(S) = \sum _{k=3}^{n} {{\,\mathrm{Fib}\,}}(k) \left( {\begin{array}{c}n\\ k\end{array}}\right) = {{\,\mathrm{Fib}\,}}(2n)-n-\left( {\begin{array}{c}n\\ 2\end{array}}\right) . \end{aligned}$$

\(\square \)

Corollary 3.6

For any set S of \(n\ge 3\) points in general position it holds that

$$\begin{aligned} \sum _{k=3}^{n} \sum _{\ell =0}^{n-3} (-1)^{k+\ell }{{\,\mathrm{Fib}\,}}(k-\ell ) X_{k,\ell }(S) =-{{\,\mathrm{Fib}\,}}(n)+n-\left( {\begin{array}{c}n\\ 2\end{array}}\right) . \end{aligned}$$

Proof

The function \(f(k,\ell )=(-1)^{k+\ell }{{\,\mathrm{Fib}\,}}(k-\ell )\) satisfies (5) by definition of the Fibonacci numbers. Consider then a set S of n points in convex position and use the following identity (see [26]):

$$\begin{aligned} \sum _{k=0}^{n}(-1)^k {{\,\mathrm{Fib}\,}}(k)\left( {\begin{array}{c}n\\ k\end{array}}\right) =-{{\,\mathrm{Fib}\,}}(n). \end{aligned}$$

Then

$$\begin{aligned} \sum _{k=3}^{n} (-1)^{k+0} {{\,\mathrm{Fib}\,}}(k-0) X_{k,0}(S) = \sum _{k=3}^{n} (-1)^{k} {{\,\mathrm{Fib}\,}}(k) \left( {\begin{array}{c}n\\ k\end{array}}\right) = -{{\,\mathrm{Fib}\,}}(n)+n-\left( {\begin{array}{c}n\\ 2\end{array}}\right) . \end{aligned}$$

\(\square \)

Corollary 3.7

Any set S of \(n\ge 3\) points in general position satisfies the following equations:

$$\begin{aligned} \sum _{k=3}^{n} \sum _{\ell =0}^{n-3} 2\cos \frac{(2k+\ell )\pi }{3}X_{k,\ell }(S)&= \left( {\begin{array}{c}n\\ 2\end{array}}\right) +n-2+ 2\cos \frac{n \pi }{3}, \end{aligned}$$
(6)
$$\begin{aligned} \sum _{k=3}^{n} \sum _{\ell =0}^{n-3} \frac{2}{\sqrt{3}}\sin \frac{(2k+\ell )\pi }{3}X_{k,\ell }(S)&= \left( {\begin{array}{c}n\\ 2\end{array}}\right) -n+ \frac{2}{\sqrt{3}}\sin \frac{n \pi }{3}. \end{aligned}$$
(7)

Proof

Equations (6) and (7) are obtained using Chebyshev polynomials, see e.g. [21]. The Chebyshev polynomials of the first kind, \(T_m(x):=\cos m\theta \) with \(x=\cos \theta \), satisfy the recurrence relation \(T_m(x)=2x T_{m-1}(x) - T_{m-2}(x)\). For \(x=1/2\), this gives the relation

$$\begin{aligned} \cos \frac{(m-1)\pi }{3}= \cos \frac{m \pi }{3}+ \cos \frac{(m-2) \pi }{3}. \end{aligned}$$

Now set \(m=2k+\ell +1\) and observe that the function \(f_1(k,\ell ):= 2\cos {((2k+\ell )\pi /{3})}\) satisfies (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)],

$$\begin{aligned} \sum _{k=0}^{n} \left( {\begin{array}{c}n\\ k\end{array}}\right) \cos k y = 2^n \cos \frac{n y}{2}\cdot \biggl (\cos \frac{y}{2}\biggr )^{\!n}. \end{aligned}$$

With \(y={2\pi }/{3}\) and hence \(\cos ({y}/{2})={1}/{2}\) we obtain (6):

$$\begin{aligned} \sum _{k=3}^{n} f_1(k,0)\, X_{k,0}(S)&=\sum _{k=0}^{n} 2\left( {\begin{array}{c}n\\ k\end{array}}\right) \cos \frac{2k \pi }{3} - \sum _{k=0}^{2} 2\left( {\begin{array}{c}n\\ k\end{array}}\right) \cos \frac{2k\pi }{3}\\&= 2\cos \frac{n \pi }{3} + \left( {\begin{array}{c}n\\ 2\end{array}}\right) +n-2. \end{aligned}$$

To prove (7), consider the Chebyshev polynomial of the second kind,

$$\begin{aligned} U_m(x):=\frac{\sin (m+1)\,\theta }{\sin \theta }, \end{aligned}$$

with \(x=\cos \theta \). \(U_m(x)\) satisfies \(U_m(x)=2x\, U_{m-1}(x) - U_{m-2}(x)\). For \(x={1}/{2}\), this gives the relation

$$\begin{aligned} \sin \frac{m \pi }{3}= \sin \frac{(m+1)\, \pi }{3} + \sin \frac{(m-1) \,\pi }{3}. \end{aligned}$$

Now set \(m=2k+\ell \) and observe that the function \(f_2(k,\ell ):= ({2}/{\sqrt{3}})\sin ({(2k+\ell )\pi }/{3})\) satisfies (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)],

$$\begin{aligned} \sum _{k=0}^{n} \left( {\begin{array}{c}n\\ k\end{array}}\right) \sin ky=2^n\sin \frac{n y}{2}\cdot \biggl (\cos \frac{y}{2}\biggr )^{\!n}. \end{aligned}$$

This identity with \(y={2\pi }/{3}\) completes the proof of (7):

$$\begin{aligned} \sum _{k=3}^{n} f_2(k,0)\, X_{k,0}(S)&=\sum _{k=0}^{n} \frac{2}{\sqrt{3}}\left( {\begin{array}{c}n\\ k\end{array}}\right) \sin \frac{2k \pi }{3} - \sum _{k=0}^{2} \frac{2}{\sqrt{3}} \left( {\begin{array}{c}n\\ k\end{array}}\right) \sin \frac{2k \pi }{3} \\&=\frac{2}{\sqrt{3}}\sin \frac{n \pi }{3}+ \left( {\begin{array}{c}n\\ 2\end{array}}\right) -n. \end{aligned}$$

\(\square \)

Next we show that the functions \(f(k,\ell )\) can be expressed as a linear combination of the functions \(f(k+i,0)\), for \(i=0,\ldots ,\ell \).

Theorem 3.8

The general solution of the recurrence relation \(f(k,\ell ) = f(k+1,\ell -1) + f(k,\ell -1)\) is given by the equation

$$\begin{aligned} f(k,\ell ) = \sum _{i=0}^{\ell } \left( {\begin{array}{c}\ell \\ i\end{array}}\right) f(k+i,0). \end{aligned}$$
(8)

Proof

We prove the statement by induction on \(\ell \). It is straightforward to verify the base case \(\ell =1\). For the inductive step, let \(\lambda \ge 0\) be given and suppose (8) holds for \(\ell = \lambda \). Then

$$\begin{aligned} f(k,\lambda +1)&=f(k+1,\lambda )+f(k,\lambda ) \\&= \sum _{i=0}^{\lambda } \left( {\begin{array}{c}\lambda \\ i\end{array}}\right) f(k+1+i,0)+\sum _{i=0}^{\lambda } \left( {\begin{array}{c}\lambda \\ i\end{array}}\right) f(k+i,0) \\&= \sum _{i=1}^{\lambda +1} \left( {\begin{array}{c}\lambda \\ i-1\end{array}}\right) f(k+i,0)+\sum _{i=0}^{\lambda } \left( {\begin{array}{c}\lambda \\ i\end{array}}\right) f(k+i,0) \\&=f(k,0)+f(k+\lambda +1,0)+\sum _{i=1}^{\lambda }\biggl [\left( {\begin{array}{c}\lambda \\ i\end{array}}\right) + \left( {\begin{array}{c}\lambda \\ i-1\end{array}}\right) \biggr ] f(k+i,0)\\&=\sum _{i=0}^{\lambda +1} \left( {\begin{array}{c}\lambda +1\\ i\end{array}}\right) f(k+i,0).\square \end{aligned}$$

Note that there may be many functions \(f(k,\ell )\) that fulfill (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 3.9

The maximum number of linearly independent equations \(F_j(S) =\sum _{k \ge 3} \sum _{\ell \ge 0} f_j(k,\ell ) \, X_{k,\ell }\), where each \(f_j(k,\ell )\) satisfies (8), in terms of the variables \(X_{k,\ell }\) is \(n-2\).

Proof

Let \(F_j(S) = \sum _{k=3}^{n} \sum _{\ell = 0}^{n-k} f_j(k,\ell )\, X_{k,\ell }\), for \(1 \le j \le n-1\), be sums that only depend on n, where \(f_j(k,\ell )\) satisfies (8) for all j. Let us consider the matrix

$$\begin{aligned}M=\begin{pmatrix} f_1(3,0) &{} f_1(3,1) &{} \cdots &{} f_1(k,\ell ) &{} \cdots &{} f_1(n-1,1) &{} f_1(n,0)\\ f_2(3,0) &{} f_2(3,1) &{} \cdots &{} f_2(k,\ell ) &{} \cdots &{} f_2(n-1,1) &{} f_2(n,0)\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ f_j(3,0) &{} f_j(3,1) &{} \cdots &{} f_j(k,\ell ) &{} \cdots &{} f_j(n-1,1) &{} f_j(n,0)\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ f_{n-1}(3,0) &{} f_{n-1}(3,1) &{} \cdots &{} f_{n-1}(k,\ell ) &{} \cdots &{} f_{n-1}(n-1,1) &{} f_{n-1}(n,0) \end{pmatrix}, \end{aligned}$$

whose entries are the \(f_j(k,\ell )\) for \(3\le k\le n\), \(0\le \ell \le n-k\), and \(1\le j\le 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,\ell )\) for values \(k=3\) and \(\ell =0\), then the following columns are for the values \(k=3\) and \(\ell \ge 1\) in ascending order, then there are columns containing the functions with values \(k=4\) and \(\ell \ge 0\) in ascending order, and so on. This order implies that, for given values k and \(\ell \), matrix entries \(f_j(k,\ell )\) are in column C[h] of M, where \(h=\sum _{i=3}^{k-1}(n-i+1)+\ell +1\). It is sufficient to show that the matrix M has rank \(n-2\). Since each \(f_j(k,\ell )\) satisfies (8), we can express matrix M as follows:

$$\begin{aligned} M=\begin{pmatrix} f_1(3,0) &{} \cdots &{} \sum _{i=0}^{\ell } \left( {\begin{array}{c}\ell \\ i\end{array}}\right) f_1(k+i,0) &{} \cdots &{} f_1(n,0)\\ f_2(3,0) &{} \cdots &{} \sum _{i=0}^{\ell } \left( {\begin{array}{c}\ell \\ i\end{array}}\right) f_2(k+i,0) &{} \cdots &{} f_2(n,0)\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ f_j(3,0) &{} \cdots &{} \sum _{i=0}^{\ell } \left( {\begin{array}{c}\ell \\ i\end{array}}\right) f_j(k+i,0) &{} \cdots &{} f_j(n,0)\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ f_{n-1}(3,0) &{} \cdots &{} \sum _{i=0}^{\ell } \left( {\begin{array}{c}\ell \\ i\end{array}}\right) f_{n-1}(k+i,0)&\cdots&f_{n-1}(n,0) \end{pmatrix}. \end{aligned}$$

We observe that the columns corresponding to the functions with \(\ell >0\) depend on the \(n-2\) columns with \(\ell =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 \(\ell >0\) in the following manner:

$$\begin{aligned}&C\!\left[ \,{\sum _{s=3}^{k-1}(n-s+1)+\ell +1}\right] \\&\qquad \longrightarrow \quad C\!\left[ \,{\sum _{s=3}^{k-1}(n-s+1)+\ell +1}\right] -\sum _{i=0}^{\ell } \left( {\begin{array}{c}\ell \\ i\end{array}}\right) \,C\!\left[ \,{\sum _{s=3}^{k+i-1}(n-s+1)+1}\right] \!, \end{aligned}$$

we obtain the matrix

$$\begin{aligned}\begin{pmatrix} f_1(3,0) &{} 0 &{} \cdots &{} f_1(k,0) &{} \cdots &{} 0 &{} f_1(n,0)\\ f_2(3,0) &{} 0 &{} \cdots &{} f_2(k,0) &{} \cdots &{} 0 &{} f_2(n,0)\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ f_j(3,0) &{} 0 &{} \cdots &{} f_j(k,0) &{} \cdots &{} 0 &{} f_j(n,0)\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ f_{n-1}(3,0) &{} 0 &{} \cdots &{} f_{n-1}(k,0) &{} \cdots &{} 0 &{} f_{n-1}(n,0) \end{pmatrix}.\end{aligned}$$

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\).\(\square \)

Using the general solution of Theorem 3.8, we derive further relations for sums over all convex polygons.

Corollary 3.10

For any point set S of \(n \ge 3\) points in general position and for any \(x \in \mathbb R\), it holds that

$$\begin{aligned} P_x(S) := \sum _{k=3}^n \sum _{\ell =0}^{n-k} x^k(1+x)^\ell X_{k,\ell } = (1+x)^n -1 - x\cdot n - x^2 \left( {\begin{array}{c}n\\ 2\end{array}}\right) . \end{aligned}$$
(9)

Proof

Define \(f(k+i,0)=x^{k+i}\), then

$$\begin{aligned} f(k,\ell )=\sum _{i=0}^{\ell } \left( {\begin{array}{c}\ell \\ i\end{array}}\right) f(k+i,0) = x^k \sum _{i=0}^{\ell } \left( {\begin{array}{c}\ell \\ i\end{array}}\right) \, x^i=x^k(1+x)^\ell . \end{aligned}$$

The result then follows by considering a set of n points in convex position and we have

$$\begin{aligned} \sum _{k=3}^n \left( {\begin{array}{c}n\\ k\end{array}}\right) x^k = (1+x)^n -1 - nx - \left( {\begin{array}{c}n\\ 2\end{array}}\right) x^2 . \end{aligned}$$

\(\square \)

Observation 3.11

Corollary 3.3 is the particular case \(x=1\) of Corollary 3.10.

As shown in Proposition 3.9, the maximum number of possible linearly independent equations is \(n-2\). From Corollary 3.10, we can obtain multiple equations of this form. Therefore, we evaluate the independence of these equations.

Proposition 3.12

For any point set S of \(n\ge 3\) points in general position, let \(x_j\in \mathbb R_{\ne 0}\), with \(1\le j\le n-2\), be distinct values, and consider the \(n-2\) equations \(P_j(S)=\sum _{k=3}^n\sum _{\ell =0}^{n-k}x_j^k(1+x_j)^{\ell }X_{k,\ell }\). Then these equations are linearly independent.

Proof

Using the argument of the proof of Proposition 3.9, it is sufficient to analyze the columns corresponding to the variables \(X_{k,0}\). Thus, we consider the matrix

$$\begin{aligned}\begin{pmatrix} x_1^3 &{} x_1^4 &{} \cdots &{} x_1^k &{} \cdots &{} x_1^n\\ x_2^3 &{} x_2^4 &{} \cdots &{} x_2^k &{} \cdots &{} x_2^n\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ x_j^3 &{} x_j^4 &{} \cdots &{} x_j^k &{} \cdots &{} x_j^n\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ x_{n-2}^3 &{} x_{n-2}^4 &{} \cdots &{} x_{n-2}^k &{} \cdots &{} x_{n-2}^n \end{pmatrix}. \end{aligned}$$

Now, we can divide each row j by \(x_j^3\) and we obtain

$$\begin{aligned}\begin{pmatrix} 1 &{} x_1 &{} \cdots &{} x_1^{k-3} &{} \cdots &{} x_1^{n-3}\\ 1 &{} x_2 &{} \cdots &{} x_2^{k-3} &{} \cdots &{} x_2^{n-3}\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ 1 &{} x_j &{} \cdots &{} x_j^{k-3} &{} \cdots &{} x_j^{n-3}\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} \vdots \\ 1 &{} x_{n-2} &{} \cdots &{} x_{n-2}^{k-3} &{} \cdots &{} x_{n-2}^{n-3} \end{pmatrix}. \end{aligned}$$

This matrix is an \((n-2) \times (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. \(\square \)

The following result is an immediate consequence of Proposition 3.9, Corollary 3.10, and Proposition 3.12.

Corollary 3.13

Let S be a set of n points in general position. Any sum of the form \(\sum _{k \ge 3} \sum _{\ell \ge 0} f(k,\ell )\, X_{k,\ell }\), where the function \(f(k,\ell )\) fulfills (5), can be expressed by \(n-2\) terms of the form (9) with distinct values \(x \in \mathbb R\).

4 Moment Sums

Recall that Theorem 2.3 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\left( {\begin{array}{c}n\\ 2\end{array}}\right) -h\) from [25], we observe that the difference \(M_1(S) - A_{1}(S) = 2\left( {\begin{array}{c}n\\ 2\end{array}}\right) - 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.

Theorem 4.1

For any set S of n points in general position and for integers \(0 \le r\le 2\), it holds that

$$\begin{aligned} F_{r}(S) := \sum _{ k\ge 3} \sum _{\ell =0}^r (-1)^{k-\ell +1} m_{r-\ell }(k-\ell ) X_{k,\ell }(S) ={\left\{ \begin{array}{ll} \displaystyle \left( {\begin{array}{c}n\\ 2\end{array}}\right) -n+1&{} \text {for}\quad r=0,\\ \displaystyle 2\left( {\begin{array}{c}n\\ 2\end{array}}\right) -n&{} \text {for}\quad r=1,\\ \displaystyle -\left( {\begin{array}{c}n\\ 2\end{array}}\right) +n&\text {for}\quad r= 2. \end{array}\right. } \end{aligned}$$

Proof

For the case \(r=0\),

$$\begin{aligned} F_0(S)&=\sum _{ k\ge 3} \sum _{\ell =0}^0 (-1)^{k-\ell +1} m_{0-\ell }(k-\ell ) \,X_{k,\ell }(S)\\&= \sum _{ k\ge 3}(-1)^{k+1} X_{k}(S)=\left( {\begin{array}{c}n\\ 2\end{array}}\right) -n+1 \end{aligned}$$

by (1), proved by Edelman and Jamison in [9]; see also [25].

For the case \(r=1\),

$$\begin{aligned} F_1(S)&= \sum _{ k\ge 3} \sum _{\ell =0}^1 (-1)^{k-\ell +1} m_{1-\ell }(k-\ell ) \,X_{k,\ell }(S)\\&=\sum _{k\ge 3}(-1)^{k+1} k X_{k}(S)+\sum _{k\ge 3}(-1)^{k} X_{k,1}(S). \end{aligned}$$

The first sum in this expression is given by (2), which was proved by Ahrens, Gordon, and McMahon [1], see also [25], and is equal to \(2\left( {\begin{array}{c}n\\ 2\end{array}}\right) -h\); and the second sum is, by Theorem 2.3, equal to \(-(n-h)\). Then, \(2\left( {\begin{array}{c}n\\ 2\end{array}}\right) -h -(n-h) = 2\left( {\begin{array}{c}n\\ 2\end{array}}\right) -n\).

For the case \(r=2\), we have

$$\begin{aligned} F_2(S)&=\sum _{k\ge 3}\sum _{\ell =0}^{2} (-1)^{k-\ell +1} m_{2-\ell }(k-\ell )\,X_{k,\ell }(S)\\&= \sum _{k\ge 3} (-1)^{k+1}\frac{k(k-3)}{2}X_{k,0}+(-1)^k(k-1)\, X_{k,1}+(-1)^{k+1}X_{k,2}. \end{aligned}$$

Let

$$\begin{aligned} f(k,\ell ) :={\left\{ \begin{array}{ll} (-1)^{k-\ell +1} m_{2-\ell }(k-\ell ) &{} \text {for}\quad 0 \le \ell \le 2,\\ 0 &{} \text {for}\quad 2 < \ell . \end{array}\right. } \end{aligned}$$

Using \(f(k,\ell )\), we can express the sum as \(F_2(S) = \sum _{k\ge 3} \sum _{\ell \ge 0} f(k,\ell ) X_{k,\ell }(S)\).

We first show that \(F_2(S)\) only depends on the cardinality n of S by proving that the function \(f(k,\ell )\) fulfills (5) from Theorem 3.1, namely, for all \(\ell >0\), it holds that \(f(k+1,\ell -1) + f(k,\ell -1) = f(k,\ell )\). For \(\ell > 3\), (5) is trivially true as all terms in the equation are equal to zero. For \(\ell =3\), we have \(f(k,\ell ) = 0\) and

$$\begin{aligned}&f(k+1,\ell -1) + f(k,\ell -1)\\&\qquad =(-1)^{(k+1) - (\ell -1) + 1} m_{2-(\ell -1)}((k+1)-(\ell -1))\\&\qquad \qquad + (-1)^{k-(\ell -1)+1} m_{2-(\ell -1)}(k-(\ell -1)) \\&\qquad = (-1)^{k-\ell +3} m_{0}(k-\ell +2) + (-1)^{k-\ell +2} m_{0}(k-\ell +1)=0. \end{aligned}$$

For \(0 < \ell \le 2\), (5) for \(f(k,\ell )\) can be stated in terms of the function \(m_{r}(k)\), which gives

$$\begin{aligned} m_{2-\ell +1}(k-\ell +2) - m_{2-\ell +1}(k-\ell +1)=m_{2-\ell }(k-\ell ). \end{aligned}$$
(10)

We consider the cases \(\ell =2\), \(\ell =1\), and \(\ell =0\) separately.

  • Let \(\ell =2\). The truth of (10) follows directly from \(m_{1}(k)=k\) for \(k \ge 2\) and \(m_{0}(k)=1\).

  • Let \(\ell =1\). If \(k=3\), then \(m_2(k)=0\) and \(m_2(k+1)=m_1(k-1)=2\); the statement holds. If \(k\ge 4\), then \(m_{2}(k+1)-m_{2}(k)=(k+1)(k-2)/2-k(k-3)/2=k-1=m_1(k-1)\); the statement holds.

  • Let \(\ell =0\). If \(k=3\) then \(m_3(k+2)=m_3(k+1)=m_2(k)=0\); the statement holds. If \(k=4\), then \(m_3(k+1)=0\) and \(m_3(k+2)=m_2(k-1)=2\); the statement holds. If \(k\ge 5\), then \(m_{3}(k+2)-m_{3}(k+1)=(k+2)\left( {\begin{array}{c}k-2\\ 2\end{array}}\right) /3-(k+1)\left( {\begin{array}{c}k-3\\ 2\end{array}}\right) /3=k(k-3)/2=m_2(k)\); the statement holds.

This finishes the proof that \(F_2(S)\) only depends on the cardinality \(|S|=n\). So what remains to show is that \(F_2(S) = -\left( {\begin{array}{c}n\\ 2\end{array}}\right) +n\). To this end, let S be set of n points in convex position. Then, \(X_{k,0}(S)=\left( {\begin{array}{c}n\\ k\end{array}}\right) \) and \(X_{k,\ell }(S)=0\) for \(\ell >0\). We get

$$\begin{aligned} F_2(S)=\sum _{k\ge 3}\sum _{\ell =0}^{2} (-1)^{k-\ell +1}m_{2-\ell }(k-\ell )\,X_{k,\ell }(S)=\sum _{k=3}^n(-1)^{k+1}\frac{k(k-3)}{2}\left( {\begin{array}{c}n\\ k\end{array}}\right) . \end{aligned}$$

Since \(\sum _{k=0}^{n}(-1)^{k}k\left( {\begin{array}{c}n\\ k\end{array}}\right) =0\) and \(\sum _{k=0}^{n}(-1)^{k}k^2\left( {\begin{array}{c}n\\ k\end{array}}\right) =0\), see [26], we have

$$\begin{aligned} F_2(S)=0-\sum _{k=0}^{2} (-1)^{k+1}\frac{k(k-3)}{2}\left( {\begin{array}{c}n\\ k\end{array}}\right) =-\left( {\begin{array}{c}n\\ 2\end{array}}\right) +n. \end{aligned}$$

\(\square \)

5 Higher Dimensions

In this section, we consider the generalization of the previous results to d-dimensional Euclidean space \(\mathbb R^d\), for \(d\ge 3\). To this end, let S be a set of \(n\ge d+1\) points in \(\mathbb 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\ge d+1\), let \(X_{k}(S)\) be the number of empty convex k-vertex polytopes spanned by S, and let \(X_{k,\ell }(S)\) be the number of convex k-vertex polytopes of S that have exactly \(\ell \) 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 \(\mathbb R^d\). They show that

$$\begin{aligned} M_0(S)&:=\sum _{k\ge d+1} (-1)^{k+d+1} X_{k}(S) =\sum \limits _{k=0}^d (-1)^{d-k} \left( {\begin{array}{c}n\\ k\end{array}}\right) ,\\ M_1(S)&:=\sum _{k\ge d+1} (-1)^{k+d+1} k X_{k}(S)= \sum \limits _{k=0}^d (-1)^{d-k} k\left( {\begin{array}{c}n\\ k\end{array}}\right) + i, \end{aligned}$$

where \(M_r(S)\) is again called the r-th alternating moment of \(\{X_{k}(S)\}_{k\ge 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 \(\mathbb {R}^d\). The same argument is applied in the following, so we refer the reader also to [25].

5.1 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.2 to \(\mathbb R^d\). The following lemma is implicit in [25].

Lemma 5.1

[25] For any set S of \(n \ge d+1\) points in general position in \(\mathbb R^d\) and any oriented facet f spanned by d points of S, it holds that

$$\begin{aligned} A_{0}(S;f):= \sum _{k\ge d+1} (-1)^{k+d+1} X_{k}(S;f)={\left\{ \begin{array}{ll} 1 &{} \text { if}\,f\hbox { has at least one point}\\ &{} \text { of }\,S\hbox { on the positive side},\\ 0 &{} \text { otherwise.} \end{array}\right. } \end{aligned}$$

In accordance to the planar case, we denote by \(A_{1}^p(S)\) the alternating sum of convex polytopes that contain exactly p in their interior. Using Lemma 5.1, Lemma 2.2 can be generalized to the following.

Lemma 5.2

For any set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\) and any point \(p \in S\) it holds that

$$\begin{aligned}A_{1}^p(S) ={\left\{ \begin{array}{ll} 0 &{} \text { if}\,p\hbox { is an extreme point of }S, \\ 1 &{} \text { otherwise}. \end{array}\right. }\end{aligned}$$

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_{1}^p(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{\setminus }\{p\}\). Hence, \(A_{1}^p(S)=A_{0}(S{\setminus }\{p\};f)=1\) by Lemma 5.1. 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{\setminus }\{p\}\) and lies inside the convex hull of S. During this movement, \(A_{1}^p(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{\setminus }\{p\};f) = 1\), and the alternating sum of polytopes that p “starts being inside” is \(A_{0}(S{\setminus }\{p\};f^-) = 1\) (note that f is not a convex hull facet of S). Hence, the value \(A_{1}^p(S)\) is the same for all possible positions of p on the path, including the final position for which we already showed \(A_{1}^p(S)=1\).\(\square \)

Likewise, Theorem 2.3 generalizes to \(\mathbb R^d\), with an analogous proof as in Sect. 2.

Theorem 5.3

Given a set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\), h of them extreme, it holds that \(A_{1}(S) = n-h\).

However, the proofs of the results for \(A_{1}^p(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 2.4 does not have a direct higher dimensional counterpart.

5.2 Weighted Sums

We next consider higher dimensional versions of the results from Sect. 3. In the following, we denote by \(X_{k,\ell }(S;f)\) the number of convex k-vertex polytopes with \(\ell \) 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,\ell }(S;p)\) the number of convex k-vertex polytopes with \(\ell \) 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,\ell }(S;f,p_1,p_2,p_3)\) denotes the number of convex k-vertex polytopes with \(\ell \) interior points that have f, \(p_1\), \(p_2\), and \(p_3\) on their boundary.

Similarly to Lemma 2.2, Theorem 3.1 can directly be generalized to higher dimensions.

Theorem 5.4

For any function \(f(k,\ell )\) that fulfills the equation

$$\begin{aligned} f(k,\ell ) = f(k+1,\ell -1) + f(k,\ell -1), \end{aligned}$$
(11)

the sum \(F(S)=\sum _{\ell \ge 0}\sum _{k\ge 0} f(k,\ell )X_{k,\ell }(S)\) is invariant over all sets S of \(n\ge d+1\) points in general position in \(\mathbb R^d\), that is, \(F(S)\) only depends on the cardinality of S and the dimension d.

Proof

Consider a point set S in general position, an arbitrary point \(p\in S\), and the numbers \(X_{k,\ell }^p(S)\) of polytopes in S that contain p in the interior. When continuously moving the points of S, the values \(X_{k,\ell }(S)\) change exactly when a point p crosses a facet f spanned by points of S, from the positive to the negative side, or vice versa. Consider such a change and denote the resulting point set by \(S'\). Assume without loss of generality that p is to the positive side of f in S and to the negative side of f in \(S'\). Note that in S, all polytopes with f on their boundary and lying on the positive side of f have p in their interior (except for the empty simplex containing p and f, which exists before and after the change). Further, for every \(\ell \ge 1\) and every polytope (with facets \(\{f,f_1,\ldots ,f_r\}\)) counted in \(X_{k,\ell }(S;f)\), we have exactly one polytope that is counted in \(X_{k,\ell -1}(S';f)\) (informally, the same polytope, just without p in its interior), and one polytope counted in \(X_{k,\ell -1}(S';f_1,\ldots ,f_{r},p)\) (informally, the same polytope, just with p added on the boundary outside f). Symmetrically, for every polytope in \(S'\) that has f on its boundary and p in the interior, there are two polytopes in S with one point less in the interior and zero and one point more, respectively, on the boundary. As \(f(k,\ell ) = f(k+1,\ell -1) + f(k,\ell -1)\), this implies that no such point move changes the sum \(F(S)\).\(\square \)

The proofs of the following formulae all go along the same lines as their planar counterparts and are omitted.

Corollary 5.5

For any set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\), it holds that

$$\begin{aligned} \sum _{k=d+1}^{n} \sum _{\ell =0}^{n-d-1} 2^\ell X_{k,\ell }(S) = 2^n - \sum _{k=0}^d \left( {\begin{array}{c}n\\ k\end{array}}\right) . \end{aligned}$$

Corollary 5.6

For any set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\) and every integer \(d+1 \le m \le n\) it holds that

$$\begin{aligned} \sum _{k=d+1}^{m} \sum _{\ell =m-k}^{n-k} \left( {\begin{array}{c}\ell \\ m-k\end{array}}\right) \, X_{k,\ell }(S) = \left( {\begin{array}{c}n\\ m\end{array}}\right) . \end{aligned}$$

Corollary 5.7

For any set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\), it holds that

$$\begin{aligned} \sum _{k=d+1}^n\!\sum _{\ell =0}^{n-d-1}\!{{\,\mathrm{Fib}\,}}(k+2\ell ) X_{k,\ell }(S) = {{\,\mathrm{Fib}\,}}(2n)- \sum _{k=0}^{d}\left( {\begin{array}{c}n\\ k\end{array}}\right) {{\,\mathrm{Fib}\,}}(k). \end{aligned}$$

Corollary 5.8

For any set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\), it holds that

$$\begin{aligned} \sum _{k=d+1}^{n}\!\sum _{\ell =0}^{n-d-1} (-1)^{k+\ell }{{\,\mathrm{Fib}\,}}(k-\ell ) X_{k,\ell }(S)=-{{\,\mathrm{Fib}\,}}(n) + \sum _{k=0}^{d} (-1)^{k+1}\left( {\begin{array}{c}n\\ k\end{array}}\right) {{\,\mathrm{Fib}\,}}(k).\end{aligned}$$

Corollary 5.9

For any set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\), it holds that

$$\begin{aligned} \sum _{k=d+1}^{n}\! \sum _{\ell =0}^{n-d-1}\! 2\cos \frac{(2k+\ell )\,\pi }{3}\, X_{k,\ell }(S)&= 2 \cos \frac{n \pi }{3}- 2\sum _{k=0}^{d} \left( {\begin{array}{c}n\\ k\end{array}}\right) \cos \frac{2k\pi }{3}\ \ \text {and}\\ \sum _{k=d+1}^{n} \!\sum _{\ell =0}^{n-d-1}\frac{2}{\sqrt{3}}\sin \frac{(2k+\ell )\,\pi }{3}\, X_{k,\ell }(S)&= \frac{2}{\sqrt{3}}\sin \frac{n \pi }{3}- \frac{2}{\sqrt{3}} \sum _{k=0}^{d} \left( {\begin{array}{c}n\\ k\end{array}}\right) \sin \frac{2k \pi }{3}. \end{aligned}$$

Corollary 5.10

For any set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\) and for any \(x \in \mathbb R\), it holds that

$$\begin{aligned} \sum _{k=d+1}^n\,\sum _{\ell =0}^{n-k}x^k(1+x)^\ell X_{k,\ell }=(1+x)^n-\sum _{k=0}^{d}x^k\left( {\begin{array}{c}n\\ k\end{array}}\right) . \end{aligned}$$
(12)

From (12) the following can be deduced, analogous to Proposition 3.9 and Corollary 3.13.

Proposition 5.11

For any set S of n points in general position in \(\mathbb R^d\), the maximum number of linearly independent equations \(F_j(S)=\sum _{k\ge 3} \sum _{\ell \ge 0} f_j(k,\ell )\, X_{k,\ell }\), where each \(f_j(k,\ell )\) satisfies (11), in terms of the variables \(X_{k,\ell }\) is \(n-d\).

Corollary 5.12

Let S be a set of \(n\ge d+1\) points in general position in \(\mathbb R^d\). Any sum \(\sum _{k \ge 3} \sum _{\ell \ge 0} f(k,\ell )\, X_{k,\ell }\), where the function \(f(k,\ell )\) fulfills (11), can be expressed in terms of \(n-d\) equations of the form (12) with distinct values \(x \in \mathbb R\).

5.3 Moment Sums

Recall that Theorem 5.3 states that for any set S of n points in general position in \(\mathbb 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)=\sum _{k=0}^d(-1)^{d-k}k\left( {\begin{array}{c}n\\ k\end{array}}\right) +i\) from [25], we observe that also in \(\mathbb R^d\), the difference \(M_1(S) - A_{1}(S)=\sum _{k=0}^d (-1)^{d-k} k\left( {\begin{array}{c}n\\ k\end{array}}\right) \) 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 \(\mathbb R^d\) let

$$\begin{aligned} M_2(S):=\sum _{k\ge d+1}(-1)^{k+1}\frac{k}{r} \left( {\begin{array}{c}k-r-1\\ r-1\end{array}}\right) X_{k}(S) = \sum _{k\ge d+1} (-1)^{k+1} \frac{k(k-3)}{2}\,X_{k}(S) \end{aligned}$$

be the second alternating moment of \(\{X_{k}(S)\}_{k\ge d+1}\). Then, Theorem 4.1 can be generalized to \(\mathbb R^d\) in the following way.

Theorem 5.13

For any set S of \(n\ge d+1\) points in general position in \(\mathbb R^d\) and for integers \(0\le r\le 2\) it holds that

$$\begin{aligned} F_{r}(S)&:=\sum _{k\ge d+1}\,\sum _{\ell =0}^r\,(-1)^{k-\ell +1+d} m_{r-\ell }(k-\ell ) X_{k,\ell }(S) \\&={\left\{ \begin{array}{ll} \displaystyle \sum \limits _{k=0}^d (-1)^{d-k} \left( {\begin{array}{c}n\\ k\end{array}}\right) &{} \text {for}\quad r=0,\\ \displaystyle \sum \limits _{k=0}^d (-1)^{d-k} k\left( {\begin{array}{c}n\\ k\end{array}}\right) &{} \text {for}\quad r=1,\\ \displaystyle \sum _{k=0}^{d} (-1)^{d+k}\frac{k(k-3)}{2}\left( {\begin{array}{c}n\\ k\end{array}}\right)&\text {for}\quad r=2. \end{array}\right. } \end{aligned}$$

The proof of this theorem is identical to the proof of Theorem 4.1, except that the summation starts with \(k=d+1\) instead of \(k=3\).