Sequential and indexed two-dimensional combinatorial template matching allowing rotations

  • Authors:
  • Kimmo Fredriksson;Gonzalo Navarro;Esko Ukkonen

  • Affiliations:
  • Department of Computer Science, University of Joensuu, Finland and University of Helsinki;Center for Web Research, Department of Computer Science, University of Chile, Chile;Department of Computer Science, University of Helsinki, Finland

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2005

Quantified Score

Hi-index 5.24

Visualization

Abstract

We present new and faster algorithms to search for a two-dimensional pattern in a two-dimensional text allowing any rotation of the pattern. This has applications such as image databases and computational biology. We consider the cases of exact and approximate matching under several matching models, using a combinatorial approach that generalizes string matching techniques. We focus on sequential algorithms, where only the pattern can be preprocessed, as well as on indexed algorithms, where the text is preprocessed and an index built on it. On sequential searching we derive average-case lower bounds and then obtain optimal average-case algorithms for all the matching models. At the same time, these algorithms are worst-case optimal. On indexed searching we obtain search time polylogarithmic on the text size, as well as sublinear time in general for approximate searching.