Lecture 22

Learning objectives

After this class, you should be able to:

  1. Given a pattern and a text, apply the Rabin-Karp string matching algorithm to determine all occurrences of the pattern in the text.
  2. Give reasons to justify the correctness of the Rabin-Karp algorithm, and derive its time complexity.
  3. Use the Rabin-Karp approach to develop algorithms for string-matching problems that are similar to the one discussed in class.

Reading assignment

  1. CLR: Section 32.2.
  2. CLR: page 916.

Exercises and review questions

Questions on next lecture's material


Last modified: 2 Aug 2004