Image for Erdős–Szekeres theorem

Erdős–Szekeres theorem

The Erdős–Szekeres theorem states that in any sufficiently long sequence of distinct numbers, there is always a smaller, predictable pattern: specifically, a certain length of increasing numbers or decreasing numbers. For example, if you have a long enough list of unique numbers, you are guaranteed to find either a steady increasing sequence or a decreasing sequence of a particular size within it. The theorem provides a quantifiable relationship between the length of the entire sequence and the guaranteed size of these ordered subsequences, illustrating a fundamental principle about order within large sets.