Given a sequence A:a1,a2,…,an of pairwise distinct numbers, a sequence ac1,ac2,…,ack with 1≤c1<c2<⋯<ck≤n is called a subsequence of A. A subsequence ac1,ac2,…,ack is called an increasing subsequence if aci<acj holds for all i,j such that i<j. Similarly, it is called a decreasing subsequence if aci>acj holds for all i,j such that i<j.
Answer the following question.
(1) For the sequence
A0:5,2,3,9,6,8
show its longest increasing subsequence.
Given a sequence A:a1,a2,…,an of pairwise distinct numbers and an integer i such that 1≤i≤n, consider the set Si of increasing subsequences of A whose last element is ai, and let ℓi denote the length of a longest element of Si. For example, for the sequence A0 in Question (1) we have S4={(9),(5,9),(2,9),(3,9),(2,3,9)} and ℓ4=3.
Answer the following questions.
(2) For the sequence A0 in Question (1), compute ℓ1,ℓ2,ℓ3 and ℓ5,ℓ6.
(3) Given a sequence A:a1,a2,…,an of pairwise distinct numbers, let ℓ denote the length of a longest increasing subsequence. Using ℓi that is defined above, we let dm denote the number of i's such that ℓi=m. Show that there exists m such that dm≥n/ℓ.
(4) In the setting of Question (3), the length of a longest decreasing subsequence of A is not smaller than n/ℓ. Show this fact.
(5) Every sequence of pairwise distinct numbers of length n has, either: an increasing subsequence of length not smaller than n; or a decreasing subsequence of length not smaller than n. Show this fact.