In mathematics, the "happy ending problem" (so named by Paul Erdős because it led to the marriage of George Szekeres and Esther Klein) is the following statement: 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 for an illustrated explanation of this proof, and 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. Larger polygons proved the following generalisation: The proof appeared in the same paper that proves the Erdős–Szekeres theorem on monotonic subsequences in sequences of numbers. Let denote the minimum for which any set of points in general position must contain a convex N-gon. It is known that , trivially. . . A set of eight points with no convex pentagon is shown in the illustration, demonstrating that ; 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. . The value of is unknown for all . By the result of , is known to be finite for all finite . On the basis of the known values of for N = 3, 4 and 5, Erdős and Szekeres conjectured in their original paper that They proved later, by constructing explicit examples, that but the best known upper bound when is Empty convex polygons 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,