CS 337 - Homework 8



1. Compute the core of every prefix of the pattern p = aabacabaab, using the pre-computation algorithm covered in class. Show your work for each computation. Write down each value in the array f.

2. Assume that you are searching for the pattern p = aabacabaab in text t = aaabaabacabacaab.  Then show each iteration of the KMP algorithm, updating the values of l and r at each step, and showing the current alignment after each step.