You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For long sequences, the Levenshtein difference is $O(m*n)$ in complexity.
However, in many cases there will be some small k that gives the maximum distance of interest.
In such cases, the computation can be terminated early if the strings become too different, and if I am not mistaken this allows to reduce the algorithm complexity to $O(max(m,n)\cdot k)$ (basically, of the full m x n matrix you only need to look at a band of height k around the diagonal - pretty straightforward).
The text was updated successfully, but these errors were encountered:
For long sequences, the Levenshtein difference is$O(m*n)$ in complexity.
However, in many cases there will be some small
k
that gives the maximum distance of interest.In such cases, the computation can be terminated early if the strings become too different, and if I am not mistaken this allows to reduce the algorithm complexity to$O(max(m,n)\cdot k)$ (basically, of the full m x n matrix you only need to look at a band of height k around the diagonal - pretty straightforward).
The text was updated successfully, but these errors were encountered: