Dynamic Programming (Longest Common Subsequence). Subsequence. String Z is a subsequence of string X if Z’s characters appear in X following the same left-to-right order. X = < A, B, C, T, D, G, N, A, B > Z = < B, D, A >. Longest Common Subsequence (LCS).
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
X = < A, B, C, T, D, G, N, A, B >
Z = < B, D, A >
X = < A, B, C, T, B, D, A, B >
Y = < B, D, C, A, B, A >
LCS is used to measure the similarity between two strings X and Y. The longer the LCS , the more similar X and Y
Very common in DNA sequences
Y = <y1, y2, ………, yn>
Our goal is to compute C[m,n]
If matching, go diagonal
Else select the larger of top or left
Note that array c keeps track of the cost,
Array b keeps track of the parent (to backtrack)