Searching 2D-Strings for Matching Frames

Itai Boneh, Dvir Fried, Shay Golan, Matan Kraus, Adrian Miclăuş, Arseny Shur

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

Abstract

We study a natural type of repetitions in 2-dimensional strings. Such a repetition, called a matching frame, is a rectangular substring of size at least 2 × 2 with equal marginal rows and equal marginal columns. Matching frames first appeared in literature in the context of Wang tiles. We present two algorithms finding a matching frame with the maximum perimeter in a given n×m input string. The first algorithm solves the problem exactly in Õ(n2.5) time (assuming n ≥ m). The second algorithm finds a (1 − ε)-approximate solution in Õ(nmε4 ) time, which is near linear in the size of the input for constant ε. In particular, by setting ε = O(1) the second algorithm decides the existence of a matching frame in a given string in Õ(nm) time. Some technical elements and structural properties used in these algorithms can be of independent interest.

Original languageEnglish
Title of host publication35th Annual Symposium on Combinatorial Pattern Matching, CPM 2024
EditorsShunsuke Inenaga, Simon J. Puglisi
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959773263
DOIs
StatePublished - Jun 2024
Event35th Annual Symposium on Combinatorial Pattern Matching, CPM 2024 - Fukuoka, Japan
Duration: 25 Jun 202427 Jun 2024

Publication series

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

Conference

Conference35th Annual Symposium on Combinatorial Pattern Matching, CPM 2024
Country/TerritoryJapan
CityFukuoka
Period25/06/2427/06/24

Bibliographical note

Publisher Copyright:
© Itai Boneh, Dvir Fried, Shay Golan, Matan Kraus, Adrian Miclăuş, and Arseny Shur.

Keywords

  • 2D string
  • LCP
  • matching frame
  • multidimensional range query

Fingerprint

Dive into the research topics of 'Searching 2D-Strings for Matching Frames'. Together they form a unique fingerprint.

Cite this