Title

On the shift-table in Boyer-Moore’s String Matching Algorithm

Abstract

The Boyer-Moore's string matching algorithm uses two pre-computed tables skip, which utilizes the occurrence heuristic of symbols in a pattern, and shift, which utilizes the match heuristic of the pattern, for searching a string. Some experts have pointed out that the difficulty of understanding the computation of the shift table has hindered utilization of the algorithm in a wider range of applications. This paper describes an alternative way to compute the shift table. We believe that the new method is more intuitive and straightforward both conceptually and logically than the original method, and thus, easier to understand and to implement. Also, the new method has a O(m) complexity in both required space and time for a pattern of length m. Therefore, it preserves the high performance of the Boyer-Moore algorithm.

Department(s)

Computer Science

Document Type

Article

DOI

https://doi.org/10.4156/jdcta.vol3.issue4.1

Keywords

string matching, Boyer-Moore algorithm, match heuristic, suffixLength, value-equal-index elements

Publication Date

2009

Recommended Citation

Yang, Wang. "On the shift-table in Boyer-Moore’s String Matching Algorithm." International Journal of Digital Content Technology and its Applications 3, no. 4 (2009): 10-20.

Journal Title

International Journal of Digital Content Technology and its Applications

Share

COinS