Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Rabin-Karp Algorithm
Katey Cruz
CSC 252: Algorithms
Smith College
12.12.2000
Outline
String matching problem
Definition of the Rabin-Karp algorithm
How Rabin-Karp works
A Rabin-Karp example
Complexity
Real Life applications
Acknowledgements
Definition of Rabin-Karp
A Rabin-Karp example
Rabin-Karp example
continued
3
Rabin-Karp example
continued
3
Complexity
Applications
Bioinformatics
Used in looking for similarities of two or
more proteins; i.e. high sequence similarity
usually implies significant structural or
functional similarity.
Example:
Hb A_human
GSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKL
G+ +VK+HGKKV A++++++AH+ D++ ++ +++LS+LH
KL
Hb B_human
GNPKVKAHGKKVLGAFSDGLAH LDNLKGTF ATLSELH CDKL
+ similar amino acids
Applications continued
Acknowledgements
Cormen, Thomas H.r, et al.,auths. Introduction
to
Algorithms Cambridge: MIT Press, 1997
Go2Net Website for String Matching Algorithms
www.go2net.com/internet/deep/1997/05/14/body.html
www.mills.edu/ACAD_INFO/MCS/CS/S00MCS125/String.Ma
tching.Algorithms/animations.html
hissa.nist.gov/dads/HTML/rabinKarpAlgo.html