Repository logo
Log in(current)
Repository logoMIT Open ScholarshipDSpace@MIT
  1. Home
  2. Computer Science and Artificial Intelligence Lab (CSAIL)
  3. LCS Publications
  4. LCS Technical Memos (1974 - 2003)
  5. On the Worst-case Behavior of String-searching Algorithms

On the Worst-case Behavior of String-searching Algorithms

Thumbnail Image
Download
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
https://hdl.handle.net/1721.1/148899
Repository logo
PrivacyPermissionsAccessibilityContact us
Repository logo
Notify us about copyright concerns.