Transcription of STRINGS AND PATTERN MATCHING - Purdue University
{{id}} {{{paragraph}}}
1 STRINGS and PATTERN MatchingSTRINGS ANDPATTERNMATCHING brute force , Rabin-Karp, Knuth-Morris-PrattWhat s up?I m looking for some s quite a trick consideringthat you have no yeah? Have you seen your writing?It looks like an EKG!2 STRINGS and PATTERN MatchingString Searching The previous slide is not a great example of what ismeant by String Searching. Nor is it meant toridicule people without The object ofstring searching is to find the locationof a specific text PATTERN within a larger body of text( , a sentence, a paragraph, a book, etc.). As with most algorithms, the main considerationsfor string searching are speed and efficiency. There are a number of string searching algorithms inexistence today, but the two we shall review areBrute force and PATTERN MatchingBrute force TheBrute force algorithm compares the PATTERN tothe text, one character at a time, until unmatchingcharacters are found:- Compared characters are Correct matches are in boldface type.
Brute Force • TheBrute Force algorithm compares the pattern to the text, one character at a time, until unmatching characters are found: - Compared characters are italicized. - Correct matches are in boldface type. • The algorithm can be designed to stop on either the first occurrence of the pattern, or upon reaching the end of the text.
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}