Good-Suffix Heuristic

Use the fact that we know that a suffix of the pattern P matched:

T = abbbaabab
           ||
P =    cabaab
P =       cabaab

Propose to shift the pattern to the right by the least amount that guarantees not to skip any occurrence of the good-suffix already matched.

Define tex2html_wrap_inline320 to be the shift proposed by the good-suffix heuristic.


next up previous
Next: Prefix Function Up: BOYER-MOORE Previous: When does it help?