Swap and Mismatch Edit Distance

  • Amihood Amir
  • Estrella Eisenberg
  • Ely Porat
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3221)


There is no known algorithm that solves the general case of 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 the effort to study this problem, the edit operations where analysed independently. It turns out that the approximate matching problem with only the mismatch operation can be solved in time \(O(n\sqrt{m \log m})\). If the only edit operation allowed is the swap, then the problem can be solved in time O(n log mlog σ), where σ = min(m,|Σ|).

In this paper we show that the approximate string matching problem with the swap and mismatch as the edit operations, can be computed in time \(O(n\sqrt{m \log m})\).


Edit Distance Polynomial Multiplication String Match Edit Operation Text Segment 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abrahamson, K.: Generalized string matching. SIAM J. Comp. 16(6), 1039–1051 (1987)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Amir, A., Cole, R., Hariharan, R., Lewenstein, M., Porat, E.: Overlay matching. Information and Computation 181(1), 57–74 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Amir, A., Lewenstein, M., Porat, E.: Faster algorithms for string matching with k mismatches. In: Proc. 11th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 794–803 (2000)Google Scholar
  4. 4.
    Amir, A., Lewenstein, M., Porat, E.: Approximate swapped matching. Information Processing Letters 83(1), 33–39 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Cole, R., Hariharan, R.: Approximate string matching: A faster simpler algorithm. In: Proc. 9th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 463–472 (1998)Google Scholar
  6. 6.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. MIT Press and McGraw-Hill (1992)Google Scholar
  7. 7.
    Crochemore, M., Rytter, W.: Text Algorithms. Oxford University Press, Oxford (1994)zbMATHGoogle Scholar
  8. 8.
    Fischer, M.J., Paterson, M.S.: Sring matching and other products. In: Karp, R.M. (ed.) SIAM-AMS Proceedings of Complexity of Computation, vol. 7, pp. 133–125 (1974)Google Scholar
  9. 9.
    Landau, G.M., Vishkin, U.: Efficient string matching with k mismatches. Theoretical Computer Science 43, 239–249 (1986)zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Landau, G.M., Vishkin, U.: Fast parallel and serial approximate string matching. Journal of Algorithms 10(2), 157–169 (1989)zbMATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Levenshtein, V.I.: Binary codes capable of correcting, deletions, insertions and reversals. Soviet Phys. Dokl. 10, 707–710 (1966)MathSciNetGoogle Scholar
  12. 12.
    Lowrance, R., Wagner, R.A.: An extension of the string-to-string correction problem. J. of the ACM, 177–188 (1975)Google Scholar
  13. 13.
    Wagner, R.A.: On the complexity of the extended string-to-string correction problem. In: Proc. 7th ACM STOC, pp. 218–223 (1975)Google Scholar
  14. 14.
    Weiner, P.: Linear pattern matching algorithm. In: Proc. 14 IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Amihood Amir
    • 1
    • 2
  • Estrella Eisenberg
    • 1
  • Ely Porat
    • 1
  1. 1.Department of Computer ScienceBar-Ilan UniversityRamat-GanIsrael
  2. 2.Georgia Tech 

Personalised recommendations