Rabu, 24 Desember 2014

The Boyer-Moore Approach to PAttuD. Matching

We will assume that the input z (y) is stored into the array te:;[1:nl
(patlern[l:m D.
The obvious way to locate all occurrences of y in z is by repeated aligning and
checxing from left to right. ODe innovative feature of the BM strategy is in that, for
eacb aHsnrncn! of the two strings, character comparisons are performed from right to
left, starti:lg at the right end of the pattern. As is well known, this contributes a
significant speed-up in cases of mism:ltch (efr. [6]), even though it leads to a quadratic
worst case behavior. A compact presentation of the eM aIgori!bm is given in

Tidak ada komentar:

Posting Komentar