Erdős–Szekeres Theorem
Contents
Erdős–Szekeres Theorem
The Erdős–Szekeres Theorem is a classic result in combinatorics that guarantees the existence of a long monotonic subsequence in any sufficiently long sequence of distinct real numbers.
Statement
Let be positive integers. Then, any sequence of
distinct real numbers contains either:
- an increasing subsequence of length
, or
- a decreasing subsequence of length
.
This result was first proved by Paul Erdős and George Szekeres in 1935.
Special Case
When , the theorem says that any sequence of
distinct real numbers contains a monotonic subsequence of length
. This is the most common form in mathematical competitions and is especially useful in problems involving ordering and sequences.
Example
Any sequence of 5 distinct real numbers contains either:
- an increasing subsequence of length 3, or
- a decreasing subsequence of length 3.
This follows by setting , so
.
Proof
Consider a sequence of length of distinct real numbers:
For each term , define two numbers:
: the length of the longest increasing subsequence ending at
,
: the length of the longest decreasing subsequence ending at
.
Because all terms are distinct, these lengths are well-defined positive integers.
Note that:
,
.
Therefore, there are at most possible pairs
with
and
.
Since the sequence has terms, by the pigeonhole principle, there must be an
such that either:
, or
.
Thus, the sequence contains either:
- an increasing subsequence of length
, or
- a decreasing subsequence of length
.
This completes the proof.
Applications
The Erdős–Szekeres Theorem is often used in:
- Ramsey theory
- Sequence and ordering problems
- Olympiad-level combinatorics problems
- Analysis of sorting algorithms