I can't solve this logic question. I don't know where to begin and can't really wrap my head around it.
Give an argument that proves the following result:
A sequence $a_1, a_2, ..., a_{n^2+1}$ of $n^2 + 1$ distinct numbers contains either an increasing subsequence of length $n + 1$ or a decreasing subsequence of length $n + 1$.
Suppose by way of contradiction that every increasing or decreasing subsequence has length $n$ or less. Let $b_i$ be the length of a longest increasing subsequence starting at $a_1$, and let $c_i$ be the length of a longest decreasing subsequence starting at $a_1$.
Show that the ordered pairs $(b_i, c_i)$, $i= 1, ..., n^2+1$ are distinct.
How many ordered pairs $(b_i, c_i)$ are there?