Although there are typically many common subsequences between two
strings v and w, some of which are longer than others, it is not immediately
obvious how to find the longest one. If we let s(v,w) be the length
of the longest common subsequence of v and w, then the edit distance between
v and w—under the assumption that only insertions and deletions
are allowed—is d(v,w) = n + m − 2s(v,w), and corresponds to the mini-