Problem: I know the trivial edit distance DP formulation and computation in O(mn) for 2 strings of size n and m respectively. But I recently came to know that if we only need to calculate the minimum value of edit distance f and it is bounded |f|<=s, then we can calculate it in O(min(m,n) + s^2) or O(s*min(m,n)) [wikipedia] time.
Please explain the dp formulation behind it if this is DP based or explain the algorithm .
Look at the improved algorithm
section of the
link: http://en.wikipedia.org/wiki/Edit_distance .
one more link about improved UKKONEN'S algorithm http://www.berghel.net/publications/asm/asm.php
Thanks in advance.