Two-dimensional periodicity in rectangular arrays

Amihood Amir, Gary Benson

Research output: Contribution to journalArticlepeer-review

49 Scopus citations

Abstract

String matching is rich with a variety of algorithmic tools. In contrast, multidimensional matching has had a rather sparse set of techniques. This paper presents a new algorithmic technique for two-dimensional matching: periodicity analysis. Its strength appears to lie in the fact that it is inherently two-dimensional. Periodicity in strings has been used to solve string matching problems. Multidimensional periodicity, however, is not as simple as it is in strings and was not formally studied or used in pattern matching. In this paper, we define and analyze two-dimensional periodicity in rectangular arrays. One definition of string periodicity is that a periodic string can self-overlap in a particular way. An analogous concept is true in two dimensions. The self-overlap vectors of a rectangle generate a regular pattern of locations where the rectangle may originate. Based on this regularity, we define four categories of periodic arrays - nonperiodic, lattice periodic, line periodic, and radiant periodic - and prove theorems about the properties of the classes. We give serial and parallel algorithms that find all locations where an overlap originates. In addition, our algorithms find a witness proving that the array does not self-overlap in any other location. The serial algorithm runs in time O(m2) (linear time) when the alphabet size is finite, and in O(m2log m) otherwise. The parallel algorithm runs in time O(log m) using O(m2) CRCW processors.

Original languageEnglish
Pages (from-to)90-106
Number of pages17
JournalSIAM Journal on Computing
Volume27
Issue number1
DOIs
StatePublished - Feb 1998
Externally publishedYes

Keywords

  • Parallel algorithm
  • Periodicity
  • Sequential algorithm
  • String matching
  • Two-dimensional
  • Witness

Fingerprint

Dive into the research topics of 'Two-dimensional periodicity in rectangular arrays'. Together they form a unique fingerprint.

Cite this