









l 
Longest common subsequence (LCS) problem:




n 
Given
two sequences x[1..m] and y[1..n], find the




longest
subsequence which occurs in both



l 
Bruteforce algorithm: 2^{m} subsequences of x to



check
against n elements of y: O(n 2^{m})



l 
Define
c[i,j] = length of LCS of x[1..i], y[1..j]



l 
Theorem:

