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

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

View Full Document Right Arrow Icon
Algorithms to compute string similarity
Background image of page 1

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

View Full DocumentRight Arrow Icon
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.
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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.
Background image of page 4
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)
Background image of page 5

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

View Full DocumentRight Arrow Icon
Arrows show where the score originated from. if from the top
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/12/2011 for the course CAP 5510 taught by Professor Staff during the Spring '08 term at University of Central Florida.

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 Right Arrow Icon
Ask a homework question - tutors are online