The problem of pattern matching with scaling is defined. The input for the two-dimensional version of the problem consists of an n × n "text" matrix and an m × m "pattern" matrix. We want to find all occurrences of the pattern in the text, scaled to all natural multiples. That is, for every natural number i, 1 ≤ i ≤ [ n m] we seek all occurrences of the pattern in the text, where each character of the pattern corresponds to an i × i square in the text. This problem is useful for some tasks in computer vision. Our main contribution is a linear time algorithm for the problem. We also consider situations where the text is provided in a less redundant form. For instance, suppose that a repeating character is compressed into one character, along with the number of repetitions. We show how to enhance our algorithm so that its running time may become sublinear with respect to the original redundant input representation. Our algorithms are based on a new algorithmic approach to two-dimensional string matching. Unlike existing approaches, the new approach does not work by reducing a two-dimensional problem into an one-dimensional problem.
|Number of pages||31|
|Journal||Journal of Algorithms|
|State||Published - Mar 1992|
Bibliographical noteFunding Information:
*Partially supported by NSF Grant IRI-9013055. ‘Partially supported by NSF Grant CCR-8908286 and the New York State Science and Technology Foundation, Center for Advanced Technology in Telecommunications, Polytechnic University, Brooklyn, NY. ‘Partially supported by NSF Grant CCR-8906949.
ASJC Scopus subject areas
- Control and Optimization
- Computational Mathematics
- Computational Theory and Mathematics