Learning objectives
After this class, you should be able to:
- Given a pattern and a text,
apply the Rabin-Karp string matching algorithm to determine all
occurrences of the pattern in the text.
- Give reasons to justify the
correctness of the Rabin-Karp algorithm, and derive its time complexity.
- Use the Rabin-Karp approach to develop algorithms for string-matching problems that are similar to the one discussed in class.
Reading assignment
- CLR: Section 32.2.
- CLR: page 916.
Exercises and review questions
- Questions on current
lecture's material
- CLR exercise 32.2-1.
- CLR exercise 32.2-2
(for the case k=2, where both patterns have the same length).
- CLR exercise 32.2-3.
Questions on next lecture's material
- Draw a diagram to show
a finite automaton that accepts strings in {0,1}* of even length.
Last
modified: 2 Aug 2004