0
$\begingroup$

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?

  • 0
    The sequence $a_1,\dots,a_{n^2}$ has $n^2$ terms, not $n^2+1$. Are you missing a term?2017-02-12
  • 0
    Sorry I missed the +1 on $n^2$. I'm reading from a blurry pdf since my book hasn't arrived yet2017-02-12

1 Answers 1

2

HINT

I would start with a concrete example to get your intuitions going.

So, for example, consider the sequence

$2,5,3,7,9,13,1$

Then for $a_1=2$, we get that $b_1 = 5$ because of the subsequence

$2,3,7,9,13$

While $c_1=2$ since you have as a decreasing subsequence

$2,1$

For $a_2=5$ you get:

$5,7,9,13$ so $b_2=4$

$5,3,1$ so $c_2=3$

... Now that you understand how this works, see if you can understand why you will never get the same ordered pair $(b_i,c_i)$ twice. That is, show that you will never have $(b_i,c_i)=(b_j,c_j)$ for $i \not = j$. HINT 2 Consider any $i < j$ ... then either $a_i < a_j$ or $a_i > a_j$ ...

  • 0
    Thank you for your answer! I tried to prove it was distinct by doing: if $(b_i,c_i)$ = $(b_j,c_j)$ and i != j then $a_i$ must be larger or smaller than $a_j$. if $a_i$ is smaller than $a_j$ then $b_i$ has fewer numbers in the sequence to choose from and therefore $b_i$ < $b_j$. Which concludes that $(b_i,c_i)$ is distinct. - This answer seems pretty simple so I'm not sure if I'm getting the conclusions correctly. It's late so I have to go to bed and try more tomorrow!2017-02-12
  • 0
    @pillikasnazsaxc That's not quite right. first, without loss of generality you can assume $i$b_j$, starts with $a_j$, the increasing sequence that gives $b_i$, and starts with $a_i$, can then be followed by the whole first sequence (and possibly some in between as well), so in fact you will have $b_i > b_j$. So back to you: what happens when $a_i > a_j$? – 2017-02-13
  • 0
    if i > j then $a_i$ > $a_j$ which makes the deacreasing sequence $c_i$ < $c_j$ and the increasing sequence $b_i$ < $b_j$ ?2017-02-13