# Thread: increasing subsequence of maximal length?

1. ## increasing subsequence of maximal length?

22,5,7,2,23,10,15,21,3,17
a) What is the increasing subsequence of maximal length ?
b) what is the decreasing subsequence of maximal length?
a) i got {5,7,10,15,21} therefore it's 5, but the answer is {7,10,15,21} so it's 4.

b) {22,10,3} therefore it's 3?

2. please someone help me why the answer to a) is 4: {7,10,15,21}

thank you

3. Originally Posted by zpwnchen
a) i got {5,7,10,15,21} therefore it's 5, but the answer is {7,10,15,21} so it's 4.

You are right: it's 5.

b) {22,10,3} therefore it's 3?

Yes, it looks fine. There are other descending subsequences of the same length: $\{23,15,3\}\,,\,\,\{23,10,3\}\,,\,\,etc.$

Tonio