We give near-tight bounds for estimating the edit distance between two non-repetitive strings (Ulam distance) with constant approximation, in sub-linear time. For two strings of length d and at edit distance R, our algorithm runs in timeÕ(d/R + √ d) and outputs a constant approximation to R. We also prove a matching lower bound (up to logarithmic terms). Both upper and lower bounds are improvements over previous results from, respectively, [Andoni-IndykKrauthgamer, SODA'09] and [Batu-Ergun-KilianMagen-Raskhodnikova-Rubinfeld-Sami, STOC'03]. The edit distance (aka Levenshtein distance) between two strings A and B, denoted ed(A, B), is the minimum number of character insertions, deletions, and substitutions needed to transform one string into the other. This distance is of key importance in several fields such as computational biology and text processing, and consequently computational problems involving the edit distance were studied quite extensively. The Ulam metric is a specialization of edit distance to non-repetitive strings, where a string is non-repetitive if every symbol appears at most once in it. There are several motivations for studying this variant. From a practical perspective, strings with limited or no repetitions appear in several important contexts, such as ranking of objects such as webpages (see, e.g., [AJKS02] and [Mar95]). From a theoretical point of view, Ulam metric presents a concrete waypoint towards the elusive goal of designing algorithms for edit distance over general (or even binary) strings. Indeed, there are two reasons for this. First, Ulam metric appears to retain one of the core difficulties of the edit distance on general strings, namely the existence of "misalignments" between the
Recently, a sublinear time algorithm for approximating the Ulam distance between two permutations was discovered REF .
Near-optimal sublinear time algorithms for Ulam distance
SODA '10
Mathematics Computer Science