Skip to main content

Analysis of two-dimensional approximate pattern matching algorithms

  • Conference paper
  • First Online:
Combinatorial Pattern Matching (CPM 1996)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1075))

Included in the following conference series:

Abstract

A k-approximate occurrence of a pattern in a text is an occurrence which has Hamming distance at most k with the pattern. The problem of two-dimensional approximate pattern matching is defined as follows: Given a pattern P of size m 2, a text T of size n 2, and an integer k, find all k-approximate occurrences of P in T.

Kärkkäinen and Ukkonen [7] proposed two algorithms for two-dimensional approximate pattern matching and showed that their expected time for random input is O(kn 2(log m)/m 2) for km 2/4[logσ m 2], where σ is the size of the alphabet. However, they got the analysis with an independence assumption. In this paper we present a new analysis of the two algorithms which shows that the expected time is the same O(kn 2(log m)/m 2) for \(k \leqslant \left\lfloor {\frac{m}{{\left\lceil {\log _\sigma m^2 } \right\rceil }}} \right\rfloor \cdot \frac{m}{2} - 1\) without the independence assumption. Hence our analysis is stronger than that of [7] in that (i) it removes the independence assumption and (ii) the range of k is larger. It is also shown that the two algorithms in [7] have an undesirable factor n in their space complexities. We present modifications of these algorithms which use space O(m 2) in the worst case and O(k) on average while maintaining the same expected time.

Supported by KOSEF grant 951-0906-069-2.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A.V. Aho and M.J. Corasick, Efficient string matching: An aid to bibliographic search, Comm. ACM 18 (1975), 333–340.

    Article  Google Scholar 

  2. A. Amir and M. Farach, Efficient 2-dimensional approximate matching of non-rectangular figures, Proc. 2nd ACM-SIAM Symp. Discrete Algorithms, 1991, 212–223.

    Google Scholar 

  3. A. Amir and G.M. Landau, Fast parallel and serial multidimensional approximate array matching, Theoret. Comput. Sci. 81 (1991), 97–115.

    Google Scholar 

  4. W.I. Chang and E.L. Lawler, Approximate string matching in sublinear expected time, Proc. 31st IEEE Symp. Found. Computer Science, 1990, 116–124.

    Google Scholar 

  5. Z. Galil and R. Giancarlo, Data structure and algorithms for approximate string matching, J. Complexity 4 (1988), 33–72.

    Google Scholar 

  6. Z. Galil and K. Park, An improved algorithm for approximate string matching, SIAM J. Comput. 19 (1990), 989–999.

    Article  Google Scholar 

  7. J. Kärkkäinen and E. Ukkonen, Two and higher dimensional pattern matching in optimal expected time, Proc. ACM-SIAM Symp. Discrete Algorithms, 1994, 715–723.

    Google Scholar 

  8. D.E. Knuth, The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison-Wesley, Reading, MA, 1973.

    Google Scholar 

  9. K. Krithivasan and R. Sitalakshmi, Efficient two-dimensional pattern matching in the presence of errors, Information Sciences 43 (1987), 169–184.

    Google Scholar 

  10. G.M. Landau and U. Vishkin, Efficient string matching in the presence of errors, Proc. 26th IEEE Symp. Found. Computer Science, 1985, 126–136.

    Google Scholar 

  11. S. Ranka and T. Heywood, Two-dimensional pattern matching with k mismatches, Pattern Recognition 24, 1 (1991), 31–40.

    Google Scholar 

  12. S.M. Ross, A First Course in Probability, 4th ed., Macmillan, 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Dan Hirschberg Gene Myers

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Park, K. (1996). Analysis of two-dimensional approximate pattern matching algorithms. In: Hirschberg, D., Myers, G. (eds) Combinatorial Pattern Matching. CPM 1996. Lecture Notes in Computer Science, vol 1075. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61258-0_24

Download citation

  • DOI: https://doi.org/10.1007/3-540-61258-0_24

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-61258-2

  • Online ISBN: 978-3-540-68390-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics