## Abstract

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.

Original language | English |
---|---|

Pages (from-to) | 2-32 |

Number of pages | 31 |

Journal | Journal of Algorithms |

Volume | 13 |

Issue number | 1 |

DOIs | |

State | Published - Mar 1992 |

Externally published | Yes |

### Bibliographical note

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

### Funding

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

Funders | Funder number |
---|---|

Center for Advanced Technology in Telecommunications, Polytechnic University | CCR-8906949 |

New York State Science and Technology Foundation | |

National Science Foundation | IRI-9013055, CCR-8908286 |