32
Exercise #4: KMP-Algorithm
compute failure function
F
for pattern
P
=
abacab
trace Knuth-Morris-Pratt on
P
and text
T
=
abacaabaccabacabaabb
how many comparisons are needed?