Repetition detection in a dynamic string

Amihood Amir, Itai Boneh, Panagiotis Charalampopoulos, Eitan Kondratovsky

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

8 Scopus citations

Abstract

A string UU for a non-empty string U is called a square. Squares have been well-studied both from a combinatorial and an algorithmic perspective. In this paper, we are the first to consider the problem of maintaining a representation of the squares in a dynamic string S of length at most n. We present an algorithm that updates this representation in no(1) time. This representation allows us to report a longest square-substring of S in O(1) time and all square-substrings of S in O(output) time. We achieve this by introducing a novel tool – maintaining prefix-suffix matches of two dynamic strings. We extend the above result to address the problem of maintaining a representation of all runs (maximal repetitions) of the string. Runs are known to capture the periodic structure of a string, and, as an application, we show that our representation of runs allows us to efficiently answer periodicity queries for substrings of a dynamic string. These queries have proven useful in static pattern matching problems and our techniques have the potential of offering solutions to these problems in a dynamic text setting.

Original languageEnglish
Title of host publication27th Annual European Symposium on Algorithms, ESA 2019
EditorsMichael A. Bender, Ola Svensson, Grzegorz Herman
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959771245
DOIs
StatePublished - Sep 2019
Event27th Annual European Symposium on Algorithms, ESA 2019 - Munich/Garching, Germany
Duration: 9 Sep 201911 Sep 2019

Publication series

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

Conference

Conference27th Annual European Symposium on Algorithms, ESA 2019
Country/TerritoryGermany
CityMunich/Garching
Period9/09/1911/09/19

Bibliographical note

Funding Information:
Funding Amihood Amir: Supported by Israel Science Foundation (ISF) grant 1475/18 and United States – Israel Binational Science Foundation (BSF) grant 2018141. Panagiotis Charalampopoulos: Partially supported by Israel Science Foundation (ISF) grant 794/13.

Publisher Copyright:
© Amihood Amir, Itai Boneh, Panagiotis Charalampopoulos, and Eitan Kondratovsky.

Keywords

  • Dynamic algorithms
  • Repetitions
  • Runs
  • Squares
  • String algorithms

Fingerprint

Dive into the research topics of 'Repetition detection in a dynamic string'. Together they form a unique fingerprint.

Cite this