Swap and mismatch edit distance
There is no known algorithm that solves the general case of the approximate string matching problem with the extended edit distance, where the edit operations are: insertion, deletion, mismatch and swap, in time o(nm), where n is the length of the text and m is the length of the pattern. In an effort to study this problem, the edit operations were analysed independently. It turns out that the approximate matching problem with only the mismatch operation can be solved in time O(n root m log m). If the only edit operation allowed is swap, then the problem can be solved in time O(n log m log sigma), where sigma = min(m,|Sigma|). In this paper we show that the approximate string matching problem with swap and mismatch as the edit operations, can be computed in time O(root m log m).
edit distance approximate pattern matching swap matching hamming distance