Abstract
There is no known algorithm that solves the general case of theapproximate string matching problem with the extended edit distance, where the edit operations are: insertion, deletion, mismatch and swap, in timeo(nm), wheren is the length of the text andm 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 timeO(n √m logm). If the only edit operation allowed is swap, then the problem can be solved in timeO(n logm logσ), whereσ=min(m, |Σ|). In this paper we show that theapproximate string matching problem withswap andmismatch as the edit operations, can be computed in timeO(n √m logm).
Similar content being viewed by others
References
K. Abrahamson. Generalized string matching.SIAM Journal on Computing, 16(6):1039–1051, 1987.
A. Amir, R. Cole, R. Hariharan, M. Lewenstein, and E. Porat. Overlap matching.Information and Computation, 181(1):57–74, 2003.
A. Amir, M. Lewenstein, and E. Porat. Faster algorithms for string matching withk mismatches. InProc. 11th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 794–803, 2000.
A. Amir, M. Lewenstein, and E. Porat. Approximate swapped matching.Information Processing Letters, 83(1):33–39, 2002.
R. Cole and R. Hariharan. Approximate string matching: a faster simpler algorithm. InProc. 9th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 463–472, 1998.
T. H. Cormen, C. E. Leiserson, and R. L. Rivest.Introduction to Algorithms. MIT Press, Cambridge, MA, and McGraw-Hill, New York, 1992.
M. Crochemore and W. Rytter.Text Algorithms. Oxford University Press, Oxford, 1994.
M. J. Fischer and M. S. Paterson. String matching and other products. InComplexity of Computation, (R. M. Karp, editor), pages 113–125. SIAM-AMS Proceedings, Volume 7. American Mathematical Society, Providence, RI, 1974.
G. M. Landau and U. Vishkin. Efficient string matching withk mismatches.Theoretical Computer Science, 43:239–249, 1986.
G. M. Landau and U. Vishkin. Fast parallel and serial approximate string matching.Journal of Algorithms, 10(2):157–169, 1989.
V. I. Levenshtein. Binary codes capable of correcting, deletions, insertions and reversals.Soviet Physics Doklady, 10:707–710, 1966.
R. Lowrance and R. A. Wagner. An extension of the string-to-string correction problem.Journal of the ACM, 22(2):177–183, 1975.
R. A. Wagner. On the complexity of the extended string-to-string correction problem. InProc. 7th ACM STOC, pages 218–223, 1975.
P. Weiner. Linear pattern matching algorithm.Proc. 14IEEE Symposium on Switching and Automata Theory, pages 1–11, 1973.
Author information
Authors and Affiliations
Corresponding author
Additional information
Amihood Amir was partially supported by NSF Grant CCR-01-04494 and ISF Grant 35/05. This work is part of Estrella Eisenberg’s M.Sc. thesis. Ely Porat was partially supported by GIF Young Scientists Program Grant 2055-1168.6/2002.
Rights and permissions
About this article
Cite this article
Amir, A., Eisenberg, E. & Porat, E. Swap and mismatch edit distance. Algorithmica 45, 109–120 (2006). https://doi.org/10.1007/s00453-005-1192-8
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/s00453-005-1192-8