How different are two strings? The edit distance (also called Levenshtein distance) answers that with a single number: the minimum count of single-character insertions, deletions, and substitutions needed to turn one string into the other.
The classic algorithm fills an table of subproblem answers and runs in time and space — fine for short strings, but expensive when and run into the millions, as they do in genomic alignment, spell-checkers, and version-control diffs.
In 1985, Esko Ukkonen published a key observation: if you already know (or can bound) the edit distance at , then the answer lives in a narrow diagonal band of width in that table. Everything outside the band is guaranteed to exceed and can be skipped entirely. The result is an algorithm — orders of magnitude faster whenever .
Ukkonen's algorithm is a solved classical result. It underpins real-world tools from git diff to BLAST, and it is one of the clearest illustrations of how bounding the answer ahead of time can transform an algorithm's cost.
Comments
Loading comments...