Download presentation

Presentation is loading. Please wait.

Published byAmir Herst Modified over 2 years ago

2
String Matching: Knuth-Morris-Pratt algorithm Heather Takeguchi

3
What is String Matching? Used in word find in document, as well as in the spell checker and in internet keyword searches Looking for an exact string match Reality of algorithms are more complicated; search string ‘string’ results in ‘String’ as well as ‘stringbean’

4
How do you match strings? Finite-State-Automota Brute-Force Knuth-Morris-Pratt (KMP) visualization tool for Brute Force and KMP www.dcc.ufmg.br/~cassia/smaa/english/

5
Virus Detection Detection of virus is simply searching for a pattern string in a larger text. 1) viral signature (contagious seg.) matching 2) code enumeration (cmp. to old known file) 3) checksum methods (see size of file)

6
Variation-tolerant matching Fast substring matching approximate string matching –voice recognition –dna sequencing

7
Example: x = GATAA and y = CAGATAAGAGAA and k = 1

9
Summary Exact string matching good for grep & sed String matching used in word find and in internet key word searches KMP alg. is slightly better than Brute Force approximate string matching and fast substring matching can be used for a wider use to practical applications.

10
Acknowledgements Virus detection: www.cse.uta.edu/~holder/courses/cse5311/lectures/applets /je/a24.html Speech recognition: www.kom.e-technik.tu- darmstadt.de/pr/workshop/chair/ACMMM98/electronic_pr oceedings/robertson/ Approximate string matching: http://www-igm.univ- mlv.fr/~lecroq/seqcomp/node3.html Cormen, chaper 34

Similar presentations

OK

ICS220 – Data Structures and Algorithms Analysis Lecture 14 Dr. Ken Cosh.

ICS220 – Data Structures and Algorithms Analysis Lecture 14 Dr. Ken Cosh.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on different festivals of india Ppt on power steering Ppt on statistics in maths what does median Ppt on statistics in maths what is the product Ppt on principles of object-oriented programming concepts Download ppt on turbo generators Ppt on anti parkinson drugs Ppt on amartya sen Ppt on water scarcity in california Ppt on grease lubrication systems