The Number of Repetitions in 2D-Strings

The notions of periodicity and repetitions in strings, and hence these of runs and squares, naturally extend to two-dimensional strings. We consider two types of repetitions in 2D-strings: 2D-runs and quartics (quartics are a 2D-version of squares in standard strings). Amir et al. introduced 2D-runs, showed that there are O(n^3) of them in an n × n 2D-string and presented a simple construction giving a lower bound of Ω(n^2) for their number (TCS 2020). We make a significant step towards closing the gap between these bounds by showing that the number of 2D-runs in an n × n 2D-string is O(n^2 log^2 n). In particular, our bound implies that the O(n^2log n + output) run-time of the algorithm of Amir et al. for computing 2D-runs is also O(n^2 log^2 n). We expect this result to allow for exploiting 2D-runs algorithmically in the area of 2D pattern matching. A quartic is a 2D-string composed of 2 × 2 identical blocks (2D-strings) that was introduced by Apostolico and Brimkov (TCS 2000), where by quartics they meant only primitively rooted quartics, i.e. built of a primitive block. Here our notion of quartics is more general and analogous to that of squares in 1D-strings. Apostolico and Brimkov showed that there are O(n^2 log^2 n) occurrences of primitively rooted quartics in an n × n 2D-string and that this bound is attainable. Consequently the number of distinct primitively rooted quartics is O(n^2 log^2 n). Here, we prove that the number of distinct general quartics is also O(n^2 log^2 n). This extends the rich combinatorial study of the number of distinct squares in a 1D-string, that was initiated by Fraenkel and Simpson (J. Comb. Theory A 1998), to two dimensions. Finally, we show some algorithmic applications of 2D-runs. (Abstract shortened due to arXiv requirements.)

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/31/2021

Lower Bounds for the Number of Repetitions in 2D Strings

A two-dimensional string is simply a two-dimensional array. We continue ...
research
02/17/2021

Linear Time Runs over General Ordered Alphabets

A run in a string is a maximal periodic substring. For example, the stri...
research
05/25/2018

Algorithms for Anti-Powers in Strings

A string S[1,n] is a power (or tandem repeat) of order k and period n/k ...
research
02/01/2023

Order-Preserving Squares in Strings

An order-preserving square in a string is a fragment of the form uv wher...
research
03/13/2023

Optimal Square Detection Over General Alphabets

Squares (fragments of the form xx, for some string x) are arguably the m...
research
07/20/2021

Hardness of Detecting Abelian and Additive Square Factors in Strings

We prove 3SUM-hardness (no strongly subquadratic-time algorithm, assumin...
research
08/08/2023

Linear Time Construction of Cover Suffix Tree and Applications

The Cover Suffix Tree (CST) of a string T is the suffix tree of T with a...

Please sign up or login with your details

Forgot password? Click here to reset