Lecture 12
Learning objectives
After this class, you should be able to:
- Given two sequences of letters, their similarity matrix, and the gap penalty, determine the best global alignment for the two sequences using Hirschberg's algorithm.
- Analyze the time complexity of the above algorithm.
- Given a similar problem, give an algorithm, based on dynamic programming, to solve it, and analyze its time complexity.
Reading assignment
- Hirschberg algorithm slides.
- CLR: page 387.
- CLR: Chapter 15, page 391.
Exercises and review questions
- Questions on current lecture's material
- Show all steps in Hirschberg's algorithm for the strings given in the lecture slides.
- Questions on next lecture's material
- (Post your solution on the discussion board) Give examples of two sequences of at least four elements each, and identify their longest common subsequence.
- Give an efficient algorithm for computing the
n
th term of a Fibonacci sequence using memoization.