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 k ≤ m 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.
Preview
Unable to display preview. Download preview PDF.
References
A.V. Aho and M.J. Corasick, Efficient string matching: An aid to bibliographic search, Comm. ACM 18 (1975), 333–340.
A. Amir and M. Farach, Efficient 2-dimensional approximate matching of non-rectangular figures, Proc. 2nd ACM-SIAM Symp. Discrete Algorithms, 1991, 212–223.
A. Amir and G.M. Landau, Fast parallel and serial multidimensional approximate array matching, Theoret. Comput. Sci. 81 (1991), 97–115.
W.I. Chang and E.L. Lawler, Approximate string matching in sublinear expected time, Proc. 31st IEEE Symp. Found. Computer Science, 1990, 116–124.
Z. Galil and R. Giancarlo, Data structure and algorithms for approximate string matching, J. Complexity 4 (1988), 33–72.
Z. Galil and K. Park, An improved algorithm for approximate string matching, SIAM J. Comput. 19 (1990), 989–999.
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.
D.E. Knuth, The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison-Wesley, Reading, MA, 1973.
K. Krithivasan and R. Sitalakshmi, Efficient two-dimensional pattern matching in the presence of errors, Information Sciences 43 (1987), 169–184.
G.M. Landau and U. Vishkin, Efficient string matching in the presence of errors, Proc. 26th IEEE Symp. Found. Computer Science, 1985, 126–136.
S. Ranka and T. Heywood, Two-dimensional pattern matching with k mismatches, Pattern Recognition 24, 1 (1991), 31–40.
S.M. Ross, A First Course in Probability, 4th ed., Macmillan, 1994.
Author information
Authors and Affiliations
Editor information
Rights 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