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).
Key Words
Approximate pattern matching Edit distance Swap matching Hamming distancePreview
Unable to display preview. Download preview PDF.
References
- [1]K. Abrahamson. Generalized string matching.SIAM Journal on Computing, 16(6):1039–1051, 1987.MATHCrossRefMathSciNetGoogle Scholar
- [2]A. Amir, R. Cole, R. Hariharan, M. Lewenstein, and E. Porat. Overlap matching.Information and Computation, 181(1):57–74, 2003.MATHCrossRefMathSciNetGoogle 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.Google Scholar
- [4]A. Amir, M. Lewenstein, and E. Porat. Approximate swapped matching.Information Processing Letters, 83(1):33–39, 2002.MATHCrossRefMathSciNetGoogle 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.Google Scholar
- [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.MATHGoogle 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.MATHCrossRefMathSciNetGoogle Scholar
- [10]G. M. Landau and U. Vishkin. Fast parallel and serial approximate string matching.Journal of Algorithms, 10(2):157–169, 1989.MATHCrossRefMathSciNetGoogle Scholar
- [11]V. I. Levenshtein. Binary codes capable of correcting, deletions, insertions and reversals.Soviet Physics Doklady, 10:707–710, 1966.MathSciNetGoogle 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.MATHCrossRefMathSciNetGoogle Scholar
- [13]R. A. Wagner. On the complexity of the extended string-to-string correction problem. InProc. 7th ACM STOC, pages 218–223, 1975.Google Scholar
- [14]P. Weiner. Linear pattern matching algorithm.Proc. 14IEEE Symposium on Switching and Automata Theory, pages 1–11, 1973.Google Scholar