GATE Computer ScienceHardGATE CS

A sequence of 82 distinct real numbers is given. Which is the largest L such that EVERY such sequence is guaranteed to contain an increasing or a decreasing subsequence of length at least L?

  1. A. 10
  2. B. 41
  3. C. 9
  4. D. 11

Correct answer: A. 10

By the Erdős–Szekeres argument, if every monotone subsequence had length at most 9 then each element would get a distinct pair (longest increasing ending here, longest decreasing ending here) from {1..9}², so at most 81 elements could exist. With 82 elements some monotone subsequence has length at least 10, while 81 elements can avoid 10.

More Discrete Mathematics questions

Exams that ask this topic