Optimal Bounds for Distinct Quartics

Panagiotis Charalampopoulos, Paweł Gawrychowski, Samah Ghazawi

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

A fundamental concept related to strings is that of repetitions. It has been extensively studied in many versions, from both purely combinatorial and algorithmic angles. One of the most basic questions is how many distinct squares, i.e., distinct strings of the form UU, a string of length n can contain as fragments. It turns out that this is always O(n), and the bound cannot be improved to sublinear in n [Fraenkel and Simpson, JCTA 1998]. Several similar questions about repetitions in strings have been considered, and by now we seem to have a good understanding of their repetitive structure. For higher-dimensional strings, the basic concept of periodicity has been successfully extended and applied to design efficient algorithms – it is inherently more complex than for regular strings. Extending the notion of repetitions and understanding the repetitive structure of higher-dimensional strings is however far from complete. Quartics were introduced by Apostolico and Brimkov [TCS 2000] as analogues of squares in two dimensions. Charalampopoulos, Radoszewski, Rytter, Waleń, and Zuba [ESA 2020] proved that the number of distinct quartics in an n × n 2D string is O(n2 log2 n) and that they can be computed in O(n2 log2 n) time. Gawrychowski, Ghazawi, and Landau [SPIRE 2021] constructed an infinite family of n × n 2D strings with Ω(n2 log n) distinct quartics. This brings the challenge of determining asymptotically tight bounds. Here, we settle both the combinatorial and the algorithmic aspects of this question: the number of distinct quartics in an n × n 2D string is O(n2 log n) and they can be computed in the worst-case optimal O(n2 log n) time. As expected, our solution heavily exploits the periodic structure implied by occurrences of quartics. However, the two-dimensional nature of the problem introduces some technical challenges. Somewhat surprisingly, we overcome the final challenge for the combinatorial bound using a result of Marcus and Tardos [JCTA 2004] for permutation avoidance on matrices.

Original languageEnglish
Title of host publication51st International Colloquium on Automata, Languages, and Programming, ICALP 2024
EditorsKarl Bringmann, Martin Grohe, Gabriele Puppis, Ola Svensson
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959773225
DOIs
StatePublished - Jul 2024
Event51st International Colloquium on Automata, Languages, and Programming, ICALP 2024 - Tallinn, Estonia
Duration: 8 Jul 202412 Jul 2024

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume297
ISSN (Print)1868-8969

Conference

Conference51st International Colloquium on Automata, Languages, and Programming, ICALP 2024
Country/TerritoryEstonia
CityTallinn
Period8/07/2412/07/24

Bibliographical note

Publisher Copyright:
© Panagiotis Charalampopoulos, Paweł Gawrychowski, and Samah Ghazawi.

Keywords

  • 2D strings
  • periodicity
  • quartics
  • repetitions

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'Optimal Bounds for Distinct Quartics'. Together they form a unique fingerprint.

Cite this