New bounds for the same-type lemma

Given finite sets $X_1,\dotsc,X_m$ in $\mathbb{R}^d$ (with $d$ fixed), we prove that there are respective subsets $Y_1,\dotsc,Y_m$ with $|Y_i|\ge \frac{1}{\operatorname{poly}(m)}|X_i|$ such that, for $y_1\in Y_1,\dotsc,y_m\in Y_m$, the orientations of the $(d+1)$-tuples from $y_1,\dotsc,y_m$ do not depend on the actual choices of points $y_1,\dotsc,y_m$. This generalizes previously known case when all the sets $X_i$ are equal. Furthermore, we give a construction showing that polynomial dependence on $m$ is unavoidable, as well as an algorithm that approximates the best-possible constants in this result.


Introduction
We say that the sets Y 1 , . . ., Y d+1 in R d have the same-type property if, for every choice of points y 1 ∈ Y 1 , . . ., y d+1 ∈ Y d+1 , the orientation of points y 1 , . . ., y d+1 is the same.More generally, we say that the sets Y 1 , . . ., Y m have the same-type property if every d + 1 of them do.A natural question is the following: given disjoint finite sets X 1 , . . ., X m in R d such that their union is in general position, are there large subsets Y i ⊆ X i such that the sets Y 1 , . . ., Y r have the same-type property?Bárány and Valtr [2] proved that each Y i may be taken to have a positive fraction of points from the corresponding X-set.How large could this fraction be?Formally, for disjoint sets X 1 , . . ., X m in R d , whose union is in general position, denote by c(X 1 , . . ., X m ) the largest constant c for which there exist Y 1 , . . ., Y n having the same-type property and satisfying Y i ⊆ X i , |Y i | ≥ c|X i |.For fixed number m and dimension d, denote by c(m, d) the infimum of c for all such configurations.
The same-type lemma has been used to prove a number of positive fraction results in discrete geometry, including Radon theorem, Tverberg theorem and Erdős-Szekeres theorem [2].Notably, a quantitative version of the latter due to Pór and Valtr [14] was a crucial ingredient in Suk's proof [15] of the bound 2 n+o(n) for the number of points on plane guaranteeing the existence of n points in convex position.Additional results that directly use the same-type lemma are [9,5]; also, many arguments that are similar to the same-type lemma appear in the literature, e.g., [12,4,13,6,11].
In their original paper, Bárány and Valtr showed that c(m, d) is at least (d + 1) (−2 d −1)( m−1 d ) .Fox, Pach and Suk [6] Our first result shows that c(m, d) is polynomial in m, for fixed d.
Polynomial bounds were previously known only for the special case when the sets X 1 , . . ., X m are all equal (see Lemma 3.2 in [11], with references to [6]).Our upper bound of d d m −d applies even to this special case; it is a first upper bound both in the special and general cases.
We also show that the constants c(m, d) can be computed with arbitrary precision, at least in principle.

Theorem 2. There exists an algorithm that computes, for any input
Thanks.We are grateful to Amzi Jeffs for helpful discussions.

Preliminaries
Sets with the same-type property.For simplicity, we say that a family of sets X 1 , . . ., X m ⊆ R d is in general position if the sets X 1 , . . ., X m are disjoint and their union is a set of points in general position.We start with a convenient sufficient condition for sets to have the same-type property.Also, in further proofs it will be useful for us to have enough points in each set.The following lemma implies that small constructions can be blown up to arbitrarily large size, with no impact on the same-type constant c( • • • ).Lemma 5. Suppose that X 1 , . . ., X m in R d is a family of sets in general position.Denote by X (n) 1 the set obtained by replacing each point of X 1 by cloud of n points lying close enough to the original and preserving general position.Then, Proof.First, we prove the inequality c(X 1 , . . ., X m ) ≤ c(X 1 , consisting of all points of clouds corresponding to the points of Y 1 .Since the cloud are sufficiently small, Y ′ 1 , Y 2 , . . ., Y m also have the same-type property and If each cloud lies sufficiently near the original point, the sets Y 1 , . . ., Y m have the same-type property, and This lemma implies that, in the definition of c(m, d) it is enough to consider only the sets of the same size, which may be assumed to exceed an arbitrarily large constant.
Polynomial partitioning.For the proof of the lower bound we use the polynomial partitioning introduced by Guth and Katz.Since the proof in [7] does not track the dependence on d, we include the relevant calculation.The next lemma is a version of Theorem 4.1 in [7] with a fully explicit bound.Lemma 6.If X is a set of n points in R d and J ≥ 1 is an integer, then there is a polynomial surface Z of degree D ≤ 3d 2 2 J/d with the following property: each connected component of R d \ Z contains at most 2 −J n points of X.
We rely on the polynomial ham sandwich theorem.We say that the real algebraic hypersurface Then there is a real algebraic hypersurface of degree at most D that bisects each X i .
We find such polynomials one by one.Suppose that the first j polynomials p 1 , . . ., p j have been defined, and that all 2 j sets X ε with ε ∈ {−1, +1} j satisfy the condition above.Observe the inequality Taking this into account, Lemma 7 allows us to find a polynomial p j+1 of degree at most d2 j/d + 1 whose zero set bisects each X ε .
Let p be the product of p 1 , . . ., p J and let Z be its zero set, we claim that Z is the desired hypersurface.The degree of p is at most Since each connected component of R d \ Z is a subset of some C ε , and therefore contains at most 2 −J |X| points of X, the lemma follows.
Also, we we will need the following bound due to Warren.One of its consequences is that the number of parts into which the surface from Lemma 6 cuts R d is only slightly larger than 2 J .Lemma 8 (Lemma 6.2 in [8]).Let f be a real polynomial of degree D in d variables.Then the number of connected components of R d \ Z(f ) is at most 6(2D) d .

Proof of Theorem 1: the lower bound
Consider any family X 1 , . . ., X m ⊆ R d in general position.Thanks to Lemma 5, we may assume that all of them have the same size n, which is sufficiently large.Also, since slight perturbations of points do not change the orientation, by perturbing the sets generically we may additionally assume that, for any D, no polynomial surface of degree D intersects more than D+d put an edge between vertices C i 1 , C i 2 , . . ., C i d+1 if and only if these components can be pierced by a single hyperplane.The key observation is that the hypergraph H is sparse, thanks to the polynomial partitioning.Proof.Without loss of generality, consider parts indexed by 1, . . ., d + 1. Denote the polynomials defining Z i by f i .
Consider the following d + 1 linear maps from and denote by C the set of corresponding connected components.
By the definition of h, the image of R d 2 +d−1 \ Z under any l i belongs to R d \ Z i .Moreover, since l i is continuous and the image of a connected set under a continuous map is connected, the image of any set in C contained in exactly one of the sets in C i .This way We observe that any tuple (C that forms an edge in H is in the image of L. Indeed, the sets C 1 , C 2 , . . ., C d+1 are open; so if some hyperplane pierces them, one can find points x 1 ∈ C 1 , x 2 ∈ C 2 , . . ., x d+1 ∈ C d+1 such that x d+1 is an affine combination of x 1 through x d , say x d+1 = d i=1 α i x i with d i=1 α i = 1.In this case, the image of (x 1 , . . ., x d , α 1 , . . ., α d−1 ) under The reasoning above implies that the number of edges spanned by sets C ′ 1 , . . ., C ′ d+1 in H does not exceed |C|.Since polynomial h depends on d 2 + d − 1 variables and has degree at most 12d 3 r 1/d , Lemma 8 gives the bound of 6(24d 3 ) From each C ′ i pick an element C i independently at random.We claim that, with positive probability, the d + 1 vertices C 1 , . . ., C d+1 form an independent set in H.This would imply that the sets

Proof of Theorem 1: the upper bound
To prove an upper bound on c(r, m), we provide a series of constructions of arbitrarily large sets X 1 , . . ., X m without large subsets with the same-type property.A set P ⊂ R d of size n d is a grid set if there exist n hyperplanes in R d whose set of d-wise intersections is P .Our constructions will be suitable small perturbations of grid sets.The purpose of the perturbation is to ensure general position.
Convex sets intersect the grid sets and their perturbations slightly differently.The next lemma says that the difference is small, because the boundary of a convex set meets a grid set in a negligible fraction of points.
Denote Consider an arbitrary point x ∈ ∂C ∩ P .Since x ∈ ∂C, we can find a hyperplane H passing through x such that C lies on one side of H.Then, at least d − 1 hyperplanes among H 1 , . . ., H n pass through x but differ from H.For each such H i , the codimension-2 subspace H i ∩ H contains x and bounds C i inside H i , implying that x ∈ ∂C i .
Since this holds for every x ∈ ∂C ∩ P , it follows that Observe that C i ∩ P is itself a grid set inside the (d − 1)-dimensional hyperplane H i .Therefore, bounding |∂C i ∩ P | by induction, we obtain Fix a grid set X of size n d .Let X 1 , . . ., X m be small perturbations of X chosen so that the family X 1 , . . ., X m is in general position.We shall show that these m sets do not contain large subsets with the same-type property.
For x ∈ X i , write P (x) for its predecessor, the point of X that x is a perturbation of.Similarly, write P (Y ) for the set of predecessors of a set Y ⊂ X i .Let H be the set of n hyperplanes generating the grid set X.
Consider any sets Y 1 , . . ., Y m with the same-type property such that Y i ⊆ X i .Writing int A for the interior of a set A, define, for each i = 1, 2, . . ., m, Breaking the set P (Y i ) into the boundary and the interior parts we obtain If the perturbation defining Y i is sufficiently small, X ∩ int conv P (Y i ) ⊆ Z i , and so Since Z i ⊂ conv Y i , Lemma 4 implies that no hyperplane in H intersects more than d sets among Z 1 , . . ., Z m .By the pigeonhole principle, for some i, some set Z i intersects at most dn/m hyperplanes of H. Hence, this Z i is contained in the grid set generated by dn/m hyperplanes, implying that

Arbitrarily good approximations to c(m, d)
We now turn to the task of computing arbitrarily good approximations to c(m, d).We use the following well-known result of Vapnik and Červonenkis about the existence of ε-approximants.
Lemma 11 (Section 1.5 of [17]).Let F ⊆ 2 X be a set family of VC-dimension D. Then, for any 0 < ε < 1 there exists a set A ⊆ X of size at most 32 For the purpose of estimating c(m, n), this allows us to limit the search to bounded-size families.
by some hyperplane, which we denote by H i .The hyperplanes H 1 , . . ., H m form a hyperplane arrangement; each Y i is contained within a single cell of this arrangement, which we denote by P i .Since P i is an intersection of m halfspaces, each P i is an open polyhedron with at most m facets.Observe that the sets P 1 , . . ., P m have the same-type property; this implies that P 1 ∩ X 1 , . . ., P m ∩ X m have the same-type property as well, and so, for some i, we have Therefore, for this value of i, we have Since the sets Y 1 , . . ., Y m are arbitrary, this completes the proof.
The approximability of the constants c(m, d) now follows from the famous result of Tarski on the decidability of the theory of real closed fields [16] (see for example [3,Theorem 2.77] for a modern exposition).Indeed, the value of c(A 1 , . . ., A m ) depends only on the orientations of (d + 1)-tuples from A 1 ∪ • • • ∪ A m .The existence of A 1 , . . ., A m with specified orientations of (d + 1)-tuples can be expressed as an existential sentence in the language of ordered fields.This sentence is decidable by the aforementioned result of Tarski (though deciding existential sentences can be done more efficiently than general sentences; see, e.g., [3,Algorithm 13.1]).So, the largest value of c(A 1 , . . ., A m ), subject to |A i | = B i , can be computed by iterating over all possible sign patterns and checking if they are realizable by point sets in R d .

d − 1 = 6 •
points.Fix r def = m d 2 d 30d 3 .For each i apply Lemma 6 with J = ⌈log 2 r⌉ to obtain polynomial surface Z i of degree at most D 0 def = 6d 2 r 1/d such that each connected component of R d \ Z i contains at most n/r points of X i .By Lemma 8, the total number of such components is at most k def 12 d d 2d r ≤ m d 2 d 50d 3 /4.Denote by C i the set of these components.Having taken n large enough, we observe that each Z i contains at most D 0 +d d − 1 ≤ n/2 points of X i .Some components have at most n/4k points of X i ; these account for at most n/4 points of X i in all.Let C ′ i be the set of components containing more than n/4k points.Then, |C ′ i | ≥ (n − n/4 − n/2)/(n/r) = (n/4)/(n/r) = r/4.Next, we define an auxiliary (d + 1)-uniform m-partite hypergraph H with parts C ′ 1 , C ′ 2 , . . ., C ′ m .Then, for any distinct i 1 , i 2 , . . ., i d+1 and any
have the same-type property.Since each of these has at last n/4k elements, that would conclude the proof.The claim follows from Lovász Local Lemma.Indeed, for the set I ⊂ [m] of size d + 1 denote by B I the event that vertices C i ∈ C ′ i with i ∈ I form an edge in H. Since |C ′ i | ≥ r/4, Lemma 9 shows that probability of such event is at most 4 d+1 d 20d 2 r −1/d .If I ∩ J = ∅, then the events B I and B J are defined by disjoint sets of random choices.Hence, the natural dependence graph has degree at most (d + 1) m d ≤ (d + 1)(me) d /d d .Since with our choice of the constant r we have e (d + 1)(me) d 4 d+1 d 20d 2 r 1/d d d ≤ d 30d 2 m d r 1/d = 1, the condition of the symmetric Local Lemma (see e.g., [1, Corollary 5.1.2])is satisfied and the event I B I holds with positive probability.

From this and ( 2 )
, it follows that c(m, d) ≤ (d/m) d .Remark.The preceding argument also shows that the upper bound of (d/m) d holds for the non-partite version of the same-type lemma.Precisely, if X is a slight perturbation of a grid set of size n d , and Y 1 , . . ., Y m ⊂ X are disjoint sets with the same-type property, then at least one of Y i is of size at most dn/m d 1 + o(1) .

Proposition 12 .
For any natural numbers m, d and any ε > 0 there exist sets A 1 , . . ., A m ⊆ R d of size bounded by a computable function of m, d, ε such that |c(A 1 , . . ., A m ) − c(m, d)| ≤ ε.Proof.Pick finite sets X 1 , . . ., X m ⊂ R d in general position such that c(X 1 , . . ., X m ) < c(m, d) + ε/2.Let F be the family of open polytopes in R d with at most m facets, its VC-dimension is at most O(dm log m) (see [10, Lemma 10.3.1 and Proposition 10.3.3]).Apply Lemma 11 to each X i and F with ε/2 in place of ε to obtain sets A i of size bounded by some function of m, d, ε.We claim that c(m, d) ≤ c(A 1 , . . ., A m ) ≤ c(m, d) + ε.Since the former inequality follows from the definition of the constant c( • • • ), it remains to show the latter one.To that end, consider arbitrary subsets Y 1 ⊆ A 1 , . . ., Y m ⊆ A m with the same-type property.By Lemma 4, for each i the set . ., y d+1 ) ∈ Y : orient(y 1 , ..., y d+1 ) < 0} are both non-empty.Since both Y + and Y − are relatively open in Y , and Y is connected, this implies that Y + ∪ Y − = Y , i.e., there exists (y 1 , ..., y d+1 ) ∈ Y such that the points y 1 , ..., y d+1 are coplanar.Suppose that the family of sets Y 1 , ..., Y d+1 ⊂ R d is in general position.If some hyperplane intersects each of the sets conv Y i , then Y 1 , ..., Y d+1 do not have the same-type property.Proof.Let H be any such hyperplane.We may assume that the sets Y 1 , ..., Y d+1 are finite.Indeed, using Carathéodory's theorem, we may replace Y i by a subset of at most d + 1 points whose convex hull contains a point of H ∩ conv Y i .Keeping the condition H ∩ conv Y i = ∅, perturb H so that it contains points of d sets among Y 1 , ..., Y d+1 , say the pointsy 1 ∈ Y 1 , . .., y d ∈ Y d .Since Y 1 ∪ • • • ∪ Y d+1 is ingeneral position, it follows that H contains no point of Y d+1 .Because H does intersect conv Y d+1 , the set Y d+1 contains points y d+1 and y ′ d+1 that lie on the opposite sides of H. So, the orientations of the tuples (y 1 , . . ., y d , y d+1 ) and (y 1 , . . ., y d , y ′ d+1 ) are opposite, which contradicts the same-type property of Y 1 , . . ., Y d+1 .
by ∂C the boundary of a set C ⊂ R d .Lemma 10.Suppose that P ⊂ R d is a grid set of size n d .Then for any compact convex set C we have |∂C ∩ P | ≤ 2 n d−1 .Proof.We prove this by induction on d.If d = 1, then C is a segment, which has two boundary points.So, assume that d > 1 and that the lemma holds for d − 1 in place of d.Let H 1 , . . ., H n be the n hyperplanes generating the grid set P .Put C i H i .Write ∂C i for the relative boundary of C i inside the hyperplane H i .