Learning objectives
After this class, you should be able to:
- Given a pattern and a text, show each step of the Knuth-Morris-Pratt algorithm for pattern matching.
- Give reasons to justify the correctness of the Knuth-Morris-Pratt algorithm for pattern matching, and derive its time complexity.
Reading assignment
- CLR: Section 32.4.
- CLR: Section 26.1, page 644.
Exercises and review questions
- Questions on current lecture's material
- CLR excercise 32.4-6.
- Questions on next lecture's material
- (Post your answer on the discussion board) Give an example of a flow network with 5 nodes and 6 edges, and give an example of a valid flow for it, which is not the maximum possible flow.
Last modified: 27 Nov 2006