COP 4531: Lecture 13
Learning objectives
After this class, you should be able to:
- Given a problem, identify if dynamic programming is likely to be effective in solving it.
- Given a problem, determine if it satisfies the optimal substructure property.
- Given a recursive solution to a problem, derive its time complexity.
- Given a recursive solution (with repeated subproblems) to a problem, give an improved algorithm that uses memoization to reduce the time taken.
- Prove optimal substructure properties for the Longest Common Subsequence (LCS) problem, and for other similar problems.
- Give a recursive solution for the Longest Common Subsequence (LCS) problem, and for other similar problems.
- Give a dynamic programming solution for the Longest Common Subsequence (LCS) problem, and for other similar problems.
Reading assignment
- Lectures 11-13 slides.
- CLR: Sections 15.3-1, 15.4.
- CLR: Chapter 16, page 415.
Exercises and review questions
- Questions on current lecture's material
- Exercise 15.4-1.
- Exercise 15.4-4.
- (Optional - extra credit for homework) You can find a database of mitochondrial DNA sequences -- human and ape -- at www.genpat.uu.se/mtDB. You can try to compare the sequences and see which ones are close.
- Questions on next lecture's material
- (Post your answer on the discussion board) Give an example of an activity-selection problem instance with at least five activities, and give a solution (not-necessarily optimal, but having at least two activities) to it.