Bit-parallel approximate string matching algorithms with transposition
Using bit-parallelism has resulted in fast and practical algorithms for approximate string matching under Levenshtein edit distance, which permits a single edit operation to insert, delete or substitute a character. Depending on the parameters of the search, currently the fastest non-filtering algorithms in practice are the O(k?m/w?n) O ( k ? m / w ? n ) algorithm of Wu and Manber, the O(?(k+2)(m?k)/w?n) O ( ? ( k + 2 ) ( m ? k ) / w ? n ) algorithm of Baeza-Yates and Navarro, and the O(?m/w?n) O ( ? m / w ? n ) algorithm of Myers, where m is the pattern length, n is the text length, k is the error threshold and w is the computer word size. In this paper we discuss a uniform way of modifying each of these algorithms to permit also a fourth type of edit operation: transposing two adjacent characters in the pattern. This type of edit distance is also known as Damerau edit distance. In the end we also present an experimental comparison of the resulting algorithms.
bit-parallelism approximate string matching levenshtein edit distance damerau edit distance