Two-dimensional maximal repetitions

Amihood Amir, Gad M. Landau, Shoshana Marcus, Dina Sokol

Research output: Contribution to journalArticlepeer-review


Maximal repetitions or runs in strings have a wide array of applications and thus have been extensively studied. In this paper, we extend this notion to 2-dimensions, precisely defining a maximal 2D repetition. We provide initial bounds on the number of maximal 2D repetitions that can occur in an n×n array. The main contribution of this paper is the presentation of the first algorithm for locating all maximal 2D repetitions. The algorithm is efficient and straightforward, with runtime O(n2log⁡n+ρ), where n2 is the size of the input array and ρ is the number of maximal 2D repetitions in the output.

Original languageEnglish
Pages (from-to)49-61
Number of pages13
JournalTheoretical Computer Science
StatePublished - 6 Apr 2020

Bibliographical note

Publisher Copyright:
© 2019 Elsevier B.V.


  • Pattern matching algorithms
  • Periodicity
  • Repetitions
  • Two-dimensional

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science


Dive into the research topics of 'Two-dimensional maximal repetitions'. Together they form a unique fingerprint.

Cite this