On the Worst-case Behavior of String-searching Algorithms
Name
MIT-LCS-TM-071.pdf
Size
1.61 MB
Format
Adobe PDF
Checksum (MD5)
d7810355191be8cb3cb200fe808051d5
Author(s)
Rivest, Ronald L.
Date Issued
April 1976
Series/Report no.
MIT-LCS-TM-071
Abstract
Any algorithm for finding a pattern of length k in a string of length n must examine at least n-k+1 of the characters of the string in the worst case. By considering the pattern 00…0, we prove that this is the best possible result. Therefore there do not exist pattern matching algorithms whose worst-case behavior is "sublinear" in n (that is, linear with constant less than one), in contrast with the situation for average behavior (the Boyer-Moore algorithm is known to be sublinear on the average).
Persistent DSpace Link