Bad-Character Heuristic Analysis

In every case, we propose a shift of j-k. Negative values occur for case 3, but the other heuristic is always greater than 0, so the max guarantees progress.

Define tex2html_wrap_inline294 to be the index of the right-most index of a in P. If tex2html_wrap_inline300 then tex2html_wrap_inline302 .

Then tex2html_wrap_inline304 is the bad-character shift we want. (j is current offset from s in T, T[s+j] is the current character.)


next up previous
Next: Bad-Character Heuristic Algorithm Up: BOYER-MOORE Previous: Bad-Character Heuristic