Skip to main content
Log in

Real Two Dimensional Scaled Matching

  • Published:
Algorithmica Aims and scope Submit manuscript

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

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

  2. Amir, A., Farach, M.: Two dimensional dictionary matching. Inf. Process. Lett. 44, 233–239 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  3. Amir, A., Farach, M.: Efficient 2-dimensional approximate matching of half-rectangular figures. Inf. Comput. 118(1), 1–11 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  4. Amir, A., Landau, G.: Fast parallel and serial multidimensional approximate array matching. Theor. Comput. Sci. 81, 97–115 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  5. Amir, A., Landau, G.M., Vishkin, U.: Efficient pattern matching with scaling. J. Algorithms 13(1), 2–32 (1992)

    Article  MATH  Google Scholar 

  6. Amir, A., Butman, A., Lewenstein, M.: Real scaled matching. Inf. Process. Lett. 70(4), 185–190 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  7. Berkman, O., Vishkin, U.: Finding level-ancestors in trees. J. Comput. Syst. Sci. 48(2), 214–229 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  8. Boyer, R.S., Moore, J.S.: A fast string searching algorithm. Commun. ACM 20, 762–772 (1977)

    Article  Google Scholar 

  9. 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)

    MATH  Google Scholar 

  10. Farach-Colton, M., Ferragina, P., Muthukrishan, S.: On the sorting-complexity of suffix tree construction. J. ACM 47(6), 987–1011 (2000)

    MATH  MathSciNet  Google Scholar 

  11. 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)

    Chapter  Google Scholar 

  12. 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)

    Article  MATH  MathSciNet  Google Scholar 

  13. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestor. Comput. Syst. Sci. 13, 338–355 (1984)

    MATH  MathSciNet  Google Scholar 

  14. Idury, R.M., Schäffer, A.A.: Multiple matching of rectangular patterns. In: Proc. 25th ACM STOC, pp. 81–89 (1993)

  15. Karkkainen, J., Sanders, P.: Simple linear work suffix array construction. In: ICALP, pp. 943–955 (2003)

  16. Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6, 323–350 (1977)

    Article  MATH  MathSciNet  Google Scholar 

  17. Krithivansan, K., Sitalakshmi, R.: Efficient two dimensional pattern matching in the presence of errors. Inf. Sci. 13, 169–184 (1987)

    Article  Google Scholar 

  18. Landau, G.M., Vishkin, U.: Pattern matching in a digitized image. Algorithmica 12(3/4), 375–408 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  19. Manber, U., Myers, E.W.: Suffix arrays: a new method for on-line string searches. SIAM J. Comput. 22(5), 935–948 (1993)

    Article  MATH  MathSciNet  Google Scholar 

  20. McCreight, E.M.: A space-economical suffix tree construction algorithm. J. ACM 23, 262–272 (1976)

    MATH  MathSciNet  Google Scholar 

  21. Pentland, A.: Invited talk. NSF Institutional Infrastructure Workshop, 1992

  22. Schieber, B., Vishkin, U.: On finding lowest common ancestors: simplification and parallelization. SIAM J. Comput. 17, 1253–1262 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  23. Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14, 249–260 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  24. Weiner, P.: Linear pattern matching algorithm. In: Proc. 14 IEEE Symposium on Switching and Automata Theory, pp. 1–11 (1973)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Amihood Amir.

Additional information

Research of A. Amir partially supported by ISF grant 282/01 and NSF grant CCR-01-04494.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-007-9021-x

Keywords

Navigation