{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

PartII.Similarity.LCS

# PartII.Similarity.LCS - Algorithms to compute string...

This preview shows pages 1–7. Sign up to view the full content.

Algorithms to compute string similarity

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
String Similarity Finding differences or edit distance between two sequences can be alternately formulated as finding similarity between two sequences. Biologists usually prefer using similarity measures to study relationship between strings. Earlier we gave a definition of alignment as follows: Definition : Let v and w be two sequences of length n and m , respectively , over a finite alphabet ∑. An alignment maps the strings v and w into strings and that may contain indel (‘ - ’) characters such that removal of all indel characters leaves v and w intact.
Similarity using Dynamic Programming- Longest Common Subsequence Problem If we are interested to find an alignment that maximizes S ( n,m ), the number of matched , symbols, we can assign a weight of 1 for match and a weight of 0 for both insert and delete operations. The substitution operation is considered as a delete followed by an insert operation. The score table δ consists simply of all diagonal entries to be 1 and rest are 0.The dynamic programming equations will then look like ) , ( is" score similarity " write } match} ), , 1 ( , ) 1 , ( max{ ) , ( 1 ) 1 , 1 ( match w if do to 1 for * / v from delete * / 0 ) 0 , ( { do to 1 for * / w from insert * / 0 ) , 0 ( do to 1 for 0 ) 0 , 0 ( j m n S j i S j i S j i S j i S v m j i S n i j S m j S i

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Dynamic Programming Example Initialize 1 st row and 1 st column to be all zeroes. Or, to be more precise, initialize 0 th row and 0 th column to be all zeroes.
LCS via Dynamic Programming :Example S i,j = S i-1, j-1 max S i-1, j S i, j-1 value from NW +1, if v i = w j value from North (top) value from West (left)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Arrows show where the score originated from. if from the top
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 23

PartII.Similarity.LCS - Algorithms to compute string...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online