This was one of the original results that led to the development of Ramsey theory.
The happy ending theorem can be proven by a simple case analysis: if four or more points are vertices of the convex hull, any four such points can be chosen. If on the other hand, the convex hull has the form of a triangle with two points inside it, the two inner points and one of the triangle sides can be chosen. See Peterson (2000) for an illustrated explanation of this proof, and Morris & Soltan (2000) for a more detailed survey of the problem.
The Erdős–Szekeres conjecture states precisely a more general relationship between the number of points in a general-position point set and its largest subset forming a convex polygon, namely that the smallest number of points for which any general position arrangement contains a convex subset of points is . It remains unproven, but less precise bounds are known.
Theorem—for any positive integerN, any sufficiently large finite set of points in the plane in general position has a subset of N points that form the vertices of a convex polygon.
The proof appeared in the same paper that proves the Erdős–Szekeres theorem on monotonic subsequences in sequences of numbers.
Let f(N) denote the minimum M for which any set of M points in general position must contain a convex N-gon. It is known that
f(5) = 9.[4] A set of eight points with no convex pentagon is shown in the illustration, demonstrating that f(5) > 8; the more difficult part of the proof is to show that every set of nine points in general position contains the vertices of a convex pentagon.
There is also the question of whether any sufficiently large set of points in general position has an "empty" convex quadrilateral, pentagon, etc.,
that is, one that contains no other input point. The original solution to the happy ending problem can be adapted to show that any five points in general position have an empty convex quadrilateral, as shown in the illustration, and any ten points in general position have an empty convex pentagon.[9] However, there exist arbitrarily large sets of points in general position that contain no empty convex heptagon.[10]
For a long time the question of the existence of empty hexagons remained open, but Nicolás (2007) and Gerken (2008) proved that every sufficiently large point set in general position contains a convex empty hexagon. More specifically, Gerken showed that the number of points needed is no more than f(9) for the same function f defined above, while Nicolás showed that the number of points needed is no more than f(25). Valtr (2008) supplies a simplification of Gerken's proof that however requires more points, f(15) instead of f(9). At least 30 points are needed; there exists a set of 29 points in general position with no empty convex hexagon.[11] The question was finally answered by Heule & Scheucher (2024), who showed, using a SAT solving approach, that indeed every set of 30 points in general position contains an empty hexagon.
The problem of finding sets of n points minimizing the number of convex quadrilaterals is equivalent to minimizing the crossing number in a straight-line drawing of a complete graph. The number of quadrilaterals must be proportional to the fourth power of n, but the precise constant is not known.[12]
It is straightforward to show that, in higher-dimensional Euclidean spaces, sufficiently large sets of points will have a subset of k points that forms the vertices of a convex polytope, for any k greater than the dimension: this follows immediately from existence of convex k-gons in sufficiently large planar point sets, by projecting the higher-dimensional point set into an arbitrary two-dimensional subspace. However, the number of points necessary to find k points in convex position may be smaller in higher dimensions than it is in the plane, and it is possible to find subsets that are more highly constrained. In particular, in d dimensions, every d+3 points in general position have a subset of d+2 points that form the vertices of a cyclic polytope.[13] More generally, for every d and k>d there exists a number m(d, k) such that every set of m(d, k) points in general position has a subset of k points that form the vertices of a neighborly polytope.[14]
This has been proved by Szekeres & Peters (2006). They carried out a computer search which eliminated all possible configurations of 17 points without convex hexagons while examining only a tiny fraction of all configurations.
Grünbaum (2003), Ex. 7.3.6, p. 126. This result follows by applying a Ramsey-theoretic argument similar to Szekeres's original proof together with Perles's result on the case k=d+2.
Erdős, P.; Szekeres, G. (1961), "On some extremum problems in elementary geometry", Ann. Univ. Sci. Budapest. Eötvös Sect. Math., 3–4: 53–62; reprinted in Erdős, P. (1973), Spencer, J. (ed.), The Art of Counting: Selected Writings, Cambridge, MA: MIT Press, pp.680–689
Harborth, Heiko (1978), "Konvexe Fünfecke in ebenen Punktmengen", Elemente der Mathematik, 33 (5): 116–118
Heule, Marijn J. H.; Scheucher, Manfred (2024), "Happy Ending: An Empty Hexagon in Every Set of 30 Points", in Finkbeiner, Bernd; Kovács, Laura (eds.), Tools and Algorithms for the Construction and Analysis of Systems, Lecture Notes in Computer Science, vol.14570, Springer-Verlag, pp.61–80, arXiv:2403.00737, doi:10.1007/978-3-031-57246-3_5
Holmsen, Andreas F.; Mojarrad, Hossein Nassajian; Pach, János; Tardos, Gábor (2020), "Two extensions of the Erdős–Szekeres problem", Journal of the European Mathematical Society (JEMS), 22 (12): 3981–3995, arXiv:1710.11415, doi:10.4171/jems/1000, MR4176784
Kalbfleisch, J.D.; Kalbfleisch, J.G.; Stanton, R.G. (1970), "A combinatorial problem on convex regions", Proc. Louisiana Conf. Combinatorics, Graph Theory and Computing, Congressus Numerantium, vol.1, Baton Rouge, La.: Louisiana State Univ., pp.180–188
Tóth, G.; Valtr, P. (2005), "The Erdős-Szekeres theorem: upper bounds and related results", in Goodman, Jacob E.; Pach, János; Welzl, Emo (eds.), Combinatorial and Computational Geometry(PDF), Mathematical Sciences Research Institute Publications, vol.52, Cambridge University Press, pp.557–568, archived from the original(PDF) on 2019-07-28, retrieved 2015-02-28