Skip to main content
Log in

Swap and mismatch edit distance

  • Published:
Algorithmica Aims and scope Submit manuscript

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(nm 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(nm logm).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. K. Abrahamson. Generalized string matching.SIAM Journal on Computing, 16(6):1039–1051, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  2. A. Amir, R. Cole, R. Hariharan, M. Lewenstein, and E. Porat. Overlap matching.Information and Computation, 181(1):57–74, 2003.

    Article  MATH  MathSciNet  Google Scholar 

  3. 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.

  4. A. Amir, M. Lewenstein, and E. Porat. Approximate swapped matching.Information Processing Letters, 83(1):33–39, 2002.

    Article  MATH  MathSciNet  Google Scholar 

  5. 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.

  6. T. H. Cormen, C. E. Leiserson, and R. L. Rivest.Introduction to Algorithms. MIT Press, Cambridge, MA, and McGraw-Hill, New York, 1992.

    Google Scholar 

  7. M. Crochemore and W. Rytter.Text Algorithms. Oxford University Press, Oxford, 1994.

    MATH  Google Scholar 

  8. 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.

    Google Scholar 

  9. G. M. Landau and U. Vishkin. Efficient string matching withk mismatches.Theoretical Computer Science, 43:239–249, 1986.

    Article  MATH  MathSciNet  Google Scholar 

  10. G. M. Landau and U. Vishkin. Fast parallel and serial approximate string matching.Journal of Algorithms, 10(2):157–169, 1989.

    Article  MATH  MathSciNet  Google Scholar 

  11. V. I. Levenshtein. Binary codes capable of correcting, deletions, insertions and reversals.Soviet Physics Doklady, 10:707–710, 1966.

    MathSciNet  Google Scholar 

  12. R. Lowrance and R. A. Wagner. An extension of the string-to-string correction problem.Journal of the ACM, 22(2):177–183, 1975.

    Article  MATH  MathSciNet  Google Scholar 

  13. R. A. Wagner. On the complexity of the extended string-to-string correction problem. InProc. 7th ACM STOC, pages 218–223, 1975.

  14. P. Weiner. Linear pattern matching algorithm.Proc. 14IEEE Symposium on Switching and Automata Theory, pages 1–11, 1973.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Amihood Amir.

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

Reprints 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

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-005-1192-8

Key Words

Navigation