AnO(ND) difference algorithm and its variations
a fast algorithm for computing longest subsequences .