WADS 2003: Algorithms and Data Structures pp 353-364

# Real Two Dimensional Scaled Matching

• Amihood Amir
• Ayelet Butman
• Moshe Lewenstein
• Ely Porat
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2748)

## 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. W e also present efficient algorithms for real scaled matching. The running time of our algorithm is as follows. If T is a two-dimensional n ×n text array and P is a m ×m pattern array, we find in T all occurrences of P scaled to any real value in time O(nm 3 + n 2 m log m).

## References

1. 1.
Amir, A., Butman, A., Lewenstein, M.: Real scaled matching. Information Processing Letters 70(4), 185–190 (1999)
2. 2.
Amir, A., Calinescu, G.: Alphabet independent and dictionary scaled matching. In: Proc. 7th Annual Symposium on Combinatorial Pattern Matching (CPM 1996), pp. 320–334 (1996)Google Scholar
3. 3.
Amir, A., Farach, M.: Two dimensional dictionary matching. Information Processing Letters 44, 233–239 (1992)
4. 4.
Amir, A., Farach, M.: Efficient 2-dimensional approximate matching of half rectangular figures. Information and Computation 118(1), 1–11 (1995)
5. 5.
Amir, A., Landau, G.: Fast parallel and serial multidimensional approximate array matching. Theoretical Computer Science 81, 97–115 (1991)
6. 6.
Amir, A., Landau, G.M., Vishkin, U.: Efficient Pattern matching with scaling. Journal of Algorithms 13(1), 2–32 (1992)
7. 7.
Boyer, R.S., Moore, J.S.: A fast string searching algorithm. Comm. ACM 20, 762–772 (1977)
8. 8.
Fredriksson, K., Ukkonen, E.: A rotation invariant filter for two-dimensional string matching. In: Farach-Colton, M. (ed.) CPM 1998. LNCS, vol. 1448, pp. 118–125. Springer, Heidelberg (1998)
9. 9.
Giancarlo, R., Grossi, R.: On the construction of classes of suffix trees for Square matrices: Algorithms and applications. Information and Computation 130(2), 151–182 (1996)
10. 10.
Idury, R.M., Schäffer, A.A.: Multiple matching of rectangular Patterns. In: Proc. 25th ACM STOC, pp. 81–89 (1993) Google Scholar
11. 11.
Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast Pattern matching in strings. SIAM J. Comp. 6, 323–350 (1977)
12. 12.
Krithivansan, K., Sitalakshmi, R.: Efficient two dimensional Pattern matching in the presence of errors. Information Sciences 13, 169–184 (1987)
13. 13.
Landau, G.M., Vishkin, U.: Efficient string matching with k mismatches. Theoretical Computer Science 43, 239–249 (1986)
14. 14.
Landau, G.M., Vishkin, U.: Pattern matching in a digitized image. Algorithmica 12(3/4), 375–408 (1994)
15. 15.
Pentland, A.: Invited talk. NSF Institutional Infrastructure Workshop (1992)Google Scholar

## Authors and Affiliations

• Amihood Amir
• 1
• Ayelet Butman
• 1
• Moshe Lewenstein
• 1
• Ely Porat
• 1
1. 1.Bar-Ilan University