Can a convex polygon in the plane be reconstructed from the projections of its vertices to the coordinate axes? Assuming that no two vertices of share the same - or -coordinate, we arrive at the following problem: given two sets, and , each containing real numbers, does the Cartesian product support a convex polygon with vertices? We say that contains a polygon if every vertex of is in ; and supports if it contains and no two vertices of share an - or -coordinate. For short, we call the Cartesian product an grid.
Not every grid supports a convex -gon. This is the case already for (Figure 1). Several interesting questions arise: can we decide efficiently whether an -grid supports a convex -gon? How can we find the largest such that it supports a convex -gon? What is the largest such that every grid supports a convex -gon? How many convex polygons does an grid support, or contain? We initiate the study of these questions for convex polygons, and their higher dimensional variants for convex polyhedra.
Our Results. We first show that every grid supports a convex polygon with vertices111All logarithms in this paper are of base 2.; this bound is tight up to a constant factor: there are grids that do not support convex polygons with more than vertices. We generalize our upper and lower bounds to higher dimensions, and show that every -dimensional Cartesian product , where and is constant, contains points in convex position; this bound is also tight apart from constant factors (Section 2). Next, we present polynomial-time algorithms to find a maximum supported convex polygon that is - or -monotone. We show how to efficiently approximate the maximum size of a supported convex polygon up to a factor of two (Section 3). Finally, we present tight asymptotic bounds for the maximum number of convex polygons supported by an grid (Section 4). We conclude with open problems (Section 5).
Related Work. Erdős and Szekeres proved, as one of the first Ramsey-type results in combinatorial geometry , that for every , a sufficiently large point set in the plane in general position contains points in convex position. The minimum cardinality of a point set that guarantees points in convex position is known as the Erdős-Szekeres number, . They proved that , and conjectured that the lower bound is tight . The current best upper bound, due to Suk , is . In other words, every set of points in general position in the plane contains points in convex position, and this bound is tight up to lower-order terms.
In dimension , the asymptotic growth rate of the Erdős-Szekeres number is not known. By the Erdős-Szekeres theorem, every set of points in general position in contains points in convex position (it is enough to find points whose projections onto a generic plane are in convex position). For every constant , Károlyi and Valtr  and Valtr  constructed -element sets in general position in in which no more than points are in convex position. Both constructions are recursive, and one of them is related to high-dimensional Horton sets . These bounds are conjectured to be optimal apart from constant factors. Our results establish the same upper bound for Cartesian products, for which it is tight apart from constant factors. However our results do not improve the bounds for points in general position.
Algorithmically, one can find a largest convex cap in a given set of points in in time by dynamic programming , and a largest subset in convex position in time [8, 11]. The same approach can be used for counting the number of convex polygons contained in a given point set . While this approach applies to grids, it is unclear how to include the restriction that each coordinate is used at most once. On the negative side, finding a largest subset in convex position in a point set in for dimensions was recently shown to be NP-hard .
There has been significant interest in counting the number of convex polygons in various point sets. Answering a question of Hammer, Erdős  proved that every set of points in general position in contains subsets in convex position, and this bound is the best possible. Bárány and Pach  showed that the number of convex polygons in an section of the integer lattice is . Bárany and Vershik  generalized this bound to -dimensions and showed that there are convex polytopes in an section of . Note that the exponent is sublinear in for every . We prove that an Cartesian product can contain convex polygons, significantly more than integer grids, and our bounds are tight up to polynomial factors.
Motivated by integer programming and geometric number theory, lattice polytopes (whose vertices are in ) have been intensely studied; refer to [2, 5]. However, results for lattices do not extend to arbitrary Cartesian products. Recently, several deep results have been established for Cartesian products in incidence geometry and additive combinatorics [24, 25, 26, 29], while the analogous statements for points sets in general position remain elusive.
Definitions. A polygon in is convex if all of its internal angles are strictly smaller than . A point set in is in convex position if it is the vertex set of a convex polygon; and it is in general position if no three points are collinear. Similarly, a polyhedron in is convex if it is the convex hull of a finite set of points. A point set in is in convex position if it is the vertex set of a convex polytope; and it is in general position if no
points lie on a hyperplane. In, we say that the -axis is vertical, hyperplanes orthogonal to are horizontal, and understand the above-below relationship with respect to the -axis. Let
be a standard basis vector parallel to the-axis. A point set in is full-dimensional if no hyperplane contains .
We consider special types of convex polygons. Let be a convex polygon with vertices in clockwise order. We say that is a convex cap if the - or -coordinates are monotonic, and a convex chain if both the - and -coordinates are monotonic. We distinguish four types of convex caps (resp., chains) based on the monotonicity of the coordinates as follows:
convex caps come in four types . We have
if and only if strictly increases; if and only if strictly increases; if and only if strictly decreases; if and only if strictly decreases;
convex chains come in four types . We have
, , , .
Initial observations. It is easy to see that for , every grid supports a convex -gon. However, there exists a grid that does not support any convex pentagon (cf. Fig. 1). Interestingly, every grid supports a convex pentagon.
Every grid supports a convex polygon of size at least .
Let and . The grid supports a convex chain of size between two opposite corners of . Then one -coordinate and one -coordinate are not used by . Without loss of generality, assume that . Then the convex polygon containing the points of and and is a supported convex polygon of size on . ∎
2 Extremal Bounds for Convex Polytopes in Cartesian Products
2.1 Lower Bounds in the Plane
In this section, we show that for every , every grid supports a convex polygon with vertices. The results on the Erdős-Szekeres number cannot be used directly, since they crucially use the assumption that the given set of points is in general position. An section of the integer lattice is known to contain points in general position , and this number is conjectured to be [18, 32]. However, this result does not apply to arbitrary Cartesian products. It is worth noting that higher dimensional variants for the integer lattice are poorly understood: it is known that an section of contains points no three of which are collinear , but no similar statements are known in higher dimensions. We use a recent result from incidence geometry.
(Payne and Wood ) Every set of points in the plane with at most collinear, , contains a set of points in general position.
Every grid supports a convex polygon of size .
Every grid contains a set of points in general position by applying Lemma 2 with and . Discarding points with the same - or -coordinate reduces the size by a factor at most , so this asymptotic bound also holds when coordinates in and are used at most once. By Suk’s result , the grid supports a convex polygon with at least vertices. ∎
2.2 Upper Bounds in the Plane
For the upper bound, we construct Cartesian products that do not support large convex chains. For , such a grid is depicted in Figure 2.
For every , there exists an grid that does not contain more than points in convex position.
Let be the maximum integer such that for all -element sets , the grid supports a convex polygon of size ; clearly is nondecreasing. Let be the minimum integer such that ; thus and . We show that and thereby establish that .
Assume w.l.o.g. that , and let . For a -bit integer , let be the bit at its -th position, such that . Let (see Fig. 2). Both and are symmetric: and . Thus, it suffices to show that no convex chain of size greater than exists.
Consider two points, and , in such that and . Assume and . The slope of the line spanned by and is . Let be the largest index such that . Then implies , and we can bound the slope as follows:
Hence, . Let us define the family of intervals analogously, and note that these intervals are pairwise disjoint. Suppose that some convex chain contains more than points. Since the slopes of the first edges of decrease monotonically, by the pigeonhole principle, there must be three consecutive vertices , , and of such that both and are in the same interval, say . Assume that , , and . Then is the largest index such that , and also the largest index such that . Because , we have , which is impossible since each of , and is either or .
Hence, does not contain any convex chain in of size greater than . Analogously, every convex chain in , , or has at most vertices. Consequently, does not contain more than points in convex position. ∎
2.3 Upper Bounds in Higher Dimensions
We construct Cartesian products in , for , that match the best known upper bound for the Erdős-Szekeres numbers in -dimensions for points in general position. Our construction generalizes the ideas from the proof of Lemma 4 to -space.
Let be an integer. For every integer , there exist -element sets for , such that the Cartesian product does not contain more than points in convex position.
We construct point sets recursively. For , the result follows from Lemma 4. For integers and , we define as a Cartesian product of sets, where the first sets have elements and the last set has elements. We then show that does not support any full-dimensional convex polyhedron with more than vertices (there is no restriction on lower-dimensional convex polyhedra).
To initialize the recursion, we define boundary values as follows: For every integer , let be the grid defined in the proof of Lemma 4 that does not contain more than points in convex position. Note that every line that contains 3 or more points from is axis-parallel (this property was not needed in the proof of Lemma 4). Assume now that , and has been defined for all ; and every -dimensional flat containing or more points is axis-aligned for all . Let be a nonnegative integer. We now construct for all integers as follows.
Let . For , we define as the disjoint union of two translates of . Specifically, let , where and , where is sufficiently large (as specified below) and algebraically independent from the coordinates of , such that every -dimensional flat containing or more points of is axis-aligned for all .
Let be a full-dimensional set in convex position. The orthogonal projection of to the horizontal hyperplane is a convex polytope in that we denote by ; refer to Fig. 3. The silhouette of is the subset of vertices whose orthogonal projection to lies on the boundary of . Since no three points in are collinear, then at most two points in are projected to a same point. A point is an upper (resp., lower) vertex if lies in the closed halfspace below (resp., above) some tangent hyperplane of at (a point in may be both upper and lower vertex).
We prove, by double induction on and , the following:
Claim 1. If is a full-dimensional set in convex position, then contains at most upper (resp., lower) vertices of .
For and , this holds by definition (cf. Lemma 4). For , the set lies in a horizontal hyperplane in , and so it is not full-dimensional, hence the claim vacuously holds. By induction, contains at most upper (resp., lower) vertices in , hence has at most extreme points in . For , the set is the disjoint union of and . Every upper (resp., lower) vertex of is an extreme vertex in or , hence contains at most upper (resp., lower) vertices, as required, where we used that .
Assume that , , and the claim holds for and . We prove the claim for . Recall that is the disjoint union of two translates of , namely and . Let be a full-dimensional set. We partition the upper vertices in as follows. Let be the set of upper vertices whose orthogonal projection to is a vertex of . For , let be the set of upper vertices whose orthogonal projection to lies in the relative interior of a -face of . By construction, only axis-aligned faces can contain interior points, and a -dimensional polytope has at most axis-aligned -faces, where .
The orthogonal projection of to is , and the orthogonal projection of is the vertex set of the -dimensional convex polyhedron . By induction, . We show the following.
Claim 2. For every axis-aligned face of , the set of upper vertices that project to the interior of is contained in either or .
Let be an axis-aligned -face of for . Let be the set of upper vertices whose orthogonal projection lies in the interior of , and let be the set of upper vertices whose orthogonal projection lies in the boundary of . Let be the orthogonal projection of to the hyperplane . Consider the point set , and observe that if , then it is a vertex set of a -dimensional polytope in which all vertices are upper. It remains to show that or . Suppose, for the sake of contradiction, that contains points from both and . Let be a vertex in with the maximum -coordinate. The 1-skeleton of contains a -monotonically decreasing path from to an -minimal vertex in . Let be the neighbor of along such a path. Then by the choice of . Every hyperplane containing and partitions , in particular the tangent hyperplane of containing the edge , which is a contradiction.
We can now finish the proof of Claim 1. By induction on , we have
Altogether, the number of upper vertices is
as required, where we used the binomial theorem and the inequality . ∎
2.4 Lower Bound in Higher Dimensions
The proof technique in Section 2.1 is insufficient for establishing a lower bound of in for . While a -dimensional grid contains points in general position for some , the current best lower bound for the Erdős-Szekeres number for points in general position in is ; although it is conjectured to be . Instead, we rely on the structure of Cartesian products and induction on .
We say that a strictly increasing sequence of real numbers , has the monotone differences property (for short, is MD), if
for , or
Further, the sequence is -MD for some if
for , or
A finite set is MD (resp., -MD) if its elements arranged in increasing order form an MD (resp., -MD) sequence. These sequences are intimately related to convexity: a strictly increasing sequence is MD if and only if there exists a monotone (increasing or decreasing) convex function such that for all . MD sets have been studied in additive combinatorics [12, 19, 24, 28].
We first show that every -element set contains an MD subset of size , and this bound is the best possible (Corollary 7). In contrast, every -term arithmetic progression contains an MD subsequence of terms: for example contains the subsequence . We then show that for constant , the -dimensional Cartesian product of -element MD sets contains points in convex position. The combination of these results immediately implies that every Cartesian product in contains points in convex position.
The following lemma for 2-MD sequences (satisfying the so-called doubling differences condition ) was proved in [6, Lemma 4.1] (see also  for related recent results). We include an elementary proof for completeness.
Every set of real numbers contains a 2-MD subset of size .
Let be a strictly increasing sequence. Assume w.l.o.g. that for some . We construct a sequence of nested intervals
such that the endpoints of the intervals are in and the lengths of the intervals decrease by factors of 2 or higher, that is, for .
We start with the interval ; and for every , we divide into two intervals at the median, and recurse on the shorter interval.
By partitioning at the median, the algorithm maintains the invariant that contains elements of . Note that for every , we have either ( and ) or ( and ). Consequently, the sequences and both increase (not necessarily strictly), and at least one of them contains at least distinct terms. Assume w.l.o.g. that contains at least distinct terms. Let be the maximal strictly increasing subsequence of . Then .
We show that is a 2-MD sequence. Let . Assume that for consecutive indices . Then , , and . By construction, such that . Similarly, such that . However, . As required, this yields
The lower bound in Lemma 6 is tight apart from constant factors even if we ask for an MD subsequence (rather than a 2-MD subsequence).
Every set of real numbers contains an MD subset of size . For every , there exist a set of real numbers in which the size of every MD subset is at most .
Since every 2-MD set is MD, the lower bound follows from Lemma 6. The upper bound construction is the point set defined in the proof of Lemma 4, for which every chain in or supported by has at most vertices. Let be an MD subset such that . Then is in or . Consequently, every MD subset of has at most terms, as claimed. ∎
We show how to use Lemma 6 to establish a lower bound in the plane. While this approach yields worse constant coefficients than Lemma 3, its main advantage is that it generalizes to higher dimensions (see Lemma 10 below).
The Cartesian product of two MD sets, each of size , supports points in convex position.
Let and be MD sets such that and for . We may assume, by applying a reflection if necessary, that and for (see Fig. 5).
We define as the set of points such that . By construction, every horizontal (vertical) line contains at most one point in . Since the differences are positive and strictly decrease in ; and the differences are negative and their absolute values strictly increase in , the slopes strictly decrease, which proves the convexity of . ∎
The Cartesian product of three MD sets, each of size , supports (hence also contains) points in convex position.
Let , , and be MD sets, where the elements are labeled in increasing order. We may assume, by applying a reflection in the -, -, or -axis if necessary, that
for . For , let . We can now let . It is clear that . We let and show that the points in are in convex position.
By Lemma 8, the points in lying in the planes , , and are each in convex position. These convex -gons are faces of the convex hull of , denoted . We show that the remaining faces of are the triangles spanned by , , and ; and the triangles spanned by , , and .
The projection of these triangles to an -plane is shown in Fig. 5. By construction, the union of these faces is homeomorphic to a sphere. It suffices to show that the dihedral angle between any two adjacent triangles is convex. Without loss of generality, consider triangle , which is adjacent to (up to) three other triangles: , , and . Consider first the triangles and . They share the edge , which lies in the -plane . The orthogonal projections of these triangles to an -plane are congruent, however their extents in the -axis are and , respectively. Since , their diheral angle is convex. Similarly, the dihedral angles between and (resp., ) is convex because and . ∎
The proof technique of Lemma 9 generalizes to higher dimensions:
For every constant , the Cartesian product of MD sets, each of size , supports points in convex position.