Abstract
Scaled Matching refers to the problem of finding all locations in the text where the pattern, proportionally enlarged according to an arbitrary real-sized scale, appears. Scaled matching is an important problem that was originally inspired by Computer Vision.
Finding a combinatorial definition that captures the concept of real scaling in discrete images has been a challenge in the pattern matching field. No definition existed that captured the concept of real scaling in discrete images, without assuming an underlying continuous signal, as done in the image processing field. We present a combinatorial definition for real scaled matching that scales images in a pleasing natural manner. We also present efficient algorithms for real scaled matching.
The running times of our algorithms are as follows. For T, a two-dimensional n×n text array, and P, an m×m pattern array, we find in T all occurrences of P scaled to any real value in time O(nm 3+n 2 mlog m).
Similar content being viewed by others
References
Amir, A., Calinescu, G.: Alphabet independent and dictionary scaled matching. In: Proc. 7th Annual Symposium on Combinatorial Pattern Matching (CPM 96), pp. 320–334 (1996)
Amir, A., Farach, M.: Two dimensional dictionary matching. Inf. Process. Lett. 44, 233–239 (1992)
Amir, A., Farach, M.: Efficient 2-dimensional approximate matching of half-rectangular figures. Inf. Comput. 118(1), 1–11 (1995)
Amir, A., Landau, G.: Fast parallel and serial multidimensional approximate array matching. Theor. Comput. Sci. 81, 97–115 (1991)
Amir, A., Landau, G.M., Vishkin, U.: Efficient pattern matching with scaling. J. Algorithms 13(1), 2–32 (1992)
Amir, A., Butman, A., Lewenstein, M.: Real scaled matching. Inf. Process. Lett. 70(4), 185–190 (1999)
Berkman, O., Vishkin, U.: Finding level-ancestors in trees. J. Comput. Syst. Sci. 48(2), 214–229 (1994)
Boyer, R.S., Moore, J.S.: A fast string searching algorithm. Commun. ACM 20, 762–772 (1977)
Crochemore, M., Landau, G.M., Amir, A., Butman, A., Schapps, M.: Two dimensional pattern matching with rotations. Theor. Comput. Sci. 314(1–2), 173–187 (2004)
Farach-Colton, M., Ferragina, P., Muthukrishan, S.: On the sorting-complexity of suffix tree construction. J. ACM 47(6), 987–1011 (2000)
Fredriksson, K., Ukkonen, E.: A rotation invariant filter for two-dimensional string matching. In: Proc. 9th Annual Symposium on Combinatorial Pattern Matching (CPM 98). Lecture Notes in Computer Science, vol. 1448, pp. 118–125. Springer, New York (1998)
Giancarlo, R., Grossi, R.: On the construction of classes of suffix trees for square matrices: algorithms and applications. Inf. Comput. 130(2), 151–182 (1996)
Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestor. Comput. Syst. Sci. 13, 338–355 (1984)
Idury, R.M., Schäffer, A.A.: Multiple matching of rectangular patterns. In: Proc. 25th ACM STOC, pp. 81–89 (1993)
Karkkainen, J., Sanders, P.: Simple linear work suffix array construction. In: ICALP, pp. 943–955 (2003)
Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6, 323–350 (1977)
Krithivansan, K., Sitalakshmi, R.: Efficient two dimensional pattern matching in the presence of errors. Inf. Sci. 13, 169–184 (1987)
Landau, G.M., Vishkin, U.: Pattern matching in a digitized image. Algorithmica 12(3/4), 375–408 (1994)
Manber, U., Myers, E.W.: Suffix arrays: a new method for on-line string searches. SIAM J. Comput. 22(5), 935–948 (1993)
McCreight, E.M.: A space-economical suffix tree construction algorithm. J. ACM 23, 262–272 (1976)
Pentland, A.: Invited talk. NSF Institutional Infrastructure Workshop, 1992
Schieber, B., Vishkin, U.: On finding lowest common ancestors: simplification and parallelization. SIAM J. Comput. 17, 1253–1262 (1988)
Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14, 249–260 (1995)
Weiner, P.: Linear pattern matching algorithm. In: Proc. 14 IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)
Author information
Authors and Affiliations
Corresponding author
Additional information
Research of A. Amir partially supported by ISF grant 282/01 and NSF grant CCR-01-04494.
Rights and permissions
About this article
Cite this article
Amir, A., Butman, A., Lewenstein, M. et al. Real Two Dimensional Scaled Matching. Algorithmica 53, 314–336 (2009). https://doi.org/10.1007/s00453-007-9021-x
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-007-9021-x