Abstract

The string matching algorithm is generally divided into two phases : the preprocessing phase to obtain the shift tables and the main matching process with the tables. In the off-line version, we computed the tables after the whole pattern has been input, while in the on-line version, we computed the tables as the new character of the pattern is input, that is, on the fly. The shift table for the Knuth-Morris-Pratt (KMP) is computed from left to right, and hence suitable for the on-line version. The d-table and Horspool table in the Boyer-Moore (BM) algorithm are also computed from left to right in linear time. We show in this paper that the dd-table for the BM algorithm can be computed in O(m log m) expected time from left to right for a random pattern, and hence can be incorporated into an on-line version.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.