Reputation: 3151
I have a sequence of length 1. That is,
1
Now can I say that the longest increasing subsequence
of length 1 in the above sequence is 1
. And the longest decreasing subsequence
of length 1 in the above sequence is 1
?
Upvotes: 0
Views: 192
Reputation: 726559
Degenerate sequence (i.e. a sequence of a single element) can be assigned whatever properties that you need: it is the longest increasing sequence, the longest decreasing sequence, and the longest sequence of equal elements.
This is important in situations when you define properties of sequences in terms of their sub-sequences: one-element sub-sequence gives you a base case; expanding it with another element gives you a two-element sequence.
Upvotes: 3