Good-Suffix Heuristic Algorithm

The resulting definition of the Good-Suffix Heuristic:

$\gamma[j] = \mbox{min}(\{m-\pi[m]\} \cup
 \{l-\pi':1 \le l \le m\ \mbox{and}\ j=m-\pi'[l]\})$

Implentation of this defintion:


\begin{algorithm}
{Compute-Good-Suffix-Function}{P,m}
 \pi \= \mbox{\sc Compute-...
 ...l-\pi'[l]}
 \gamma[j] \= l-\pi'[l]
 \end{IF} \end{FOR}\  \RETURN\end{algorithm}


next up previous
Next: Analysis of Compute-Good-Suffix-Function Up: BOYER-MOORE Previous: Good-Suffix Heuristic