Shiksha Nation
Skip to content

Longest increasing subsequence

Computer science problem

  • 6 min read
  • 5 chapters

Related on Lably

Through Computer science, Sequence and Mathematics

Example

In the first 16 terms of the binary Van der Corput sequence

0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15

one of the longest increasing subsequences is

0, 2, 6, 9, 11, 15.

This subsequence has length six; the input sequence has no seven-member increasing subsequences. The longest increasing subsequence in this example is not the only solution: for instance,

0, 4, 6, 9, 11, 15
0, 2, 6, 9, 13, 15
0, 4, 6, 9, 13, 15

are other increasing subsequences of equal length in the same input sequence.

Sign up free to read the rest

4 more chapters are free with a Lably account.

Already have an account?

More in Computing and communication