Week 7 Discussion Forum

LCS and LIS

LCS and LIS

by Md Sabbir Hossain 192-15-2840 -
Number of replies: 0

 LCS : Given two sequences, find the length of longest subsequence present in both of them. A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. For example, “abc”, “abg”, “bdf”, “aeg”, ‘”acefg”, .. etc are subsequences of “abcdefg”.

Examples: LCS for input Sequences “ABCDGH” and “AEDFHR” is “ADH” of length 3.

LIS: The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order. For example, the length of LIS for {10, 22, 9, 33, 21, 50, 41, 60, 80} is 6 and LIS is {10, 22, 33, 50, 60, 80}.

That is basic concept of LCS and LIS. 

123 words