[email protected],
after
[email protected]
UCI ICS/Math 6A, Summer 2007 6-Counting-13
Monotone Sequences
Every sequence of n
2
+1 distinct numbers contains a subsequence of
n+1 numbers which is either strictly increasing or strictly decreasing.
Example: “4,2,5,3,7” contains “4,5,7”
Proof: Using a(k) to designate the k
th
term in the sequence, 1≤k≤n
2
+1
Let I(k) = length of longest increasing sequence starting at a(k) and
D(k) = length of longest decreasing sequence starting at a(k).
Unless the result is true, j ((1≤j≤n
2
+1)(1≤I(j),D(j)≤n))
Sincen
2
<n
2
+1, j,k ( (1≤j<k≤n
2
+1)(I(j),D(j)=(I(k),D(k) )
Now, eiither a(j)<a(k) or a(k)<a(j).
If a(j)<a(k), adding a(j) to the beginning of the increasing sequence of length
I(k) starting at a(k) produces an increasing sequence of length 1+I(k)=1+I(j)
starting at a(j). Ouch!
If a(k)<a(j), adding a(j) to the begining of the decreasing sequence of length
D(k) starting at a(k) produces an decreasing sequence of length
1+D(k)=1+D(j) starting at a(j). Ouch!