Locally maximal common factors as a tool for efficient dynamic string algorithms

Amihood Amir, Itai Boneh

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

6 Scopus citations

Abstract

Queue Data Structures, Suffix Tree, Balanced Search Tree, Range Maximum Queries There has been recent interest in dynamic string algorithms, i.e. string problems where the input changes dynamically. One such problem is the longest common factor (LCF) problem. It is well known that the LCF of two strings S and D of length n over a fixed constant-sized alphabet Σ can be computed in time linear in n. Recently, a new challenge was introduced - finding the LCF of two strings in a dynamic setting. The problem is the fully dynamic one sided LCF (FDOS-LCF) problem. In the FDOS-LCF problem we get q consecutive queries of the form < i, α >, where each such query means: "replace D[i] by α, α 2 ∈ Σ and output the LCF of S and (the updated) D. The goal is to initially preprocess S and D so that we do not need O(n) time to compute an LCF for each such query. The state-of-the-art is an algorithm that preprocesses the two strings S and D in time O(n log4 n). Subsequently, the algorithm answers in time O(log3 n) a single query of the form: Given a position i on D and a letter α, return an LCF of S and D′, where D′ is the string resulting from D after substituting D[i] with α. That algorithm is not extendable to multiple queries. In this paper we present a tool - Locally Maximal Common Factors (LMCF) - that proves to be quite useful in solving some restricted versions of the FDOS-LCF problem . The versions we solve are the Decremental FDOS-LCS problem, where every change < i, α> is of the form < i, ω >, ω 62 ∉ Σ, and the Periodic FDOS-LCS problem, where S is a periodic string with period length p. For the decremental problem we provide an algorithm with linear time preprocessing and O(log log n) time per query. For the periodic problem our preprocessing time is linear and the query time is O(p log log n).

Original languageEnglish
Title of host publication29th Annual Symposium on Combinatorial Pattern Matching, CPM 2018
EditorsBinhai Zhu, Gonzalo Navarro, David Sankoff
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
Pages111-1113
Number of pages1003
ISBN (Electronic)9783959770743
DOIs
StatePublished - 1 May 2018
Event29th Annual Symposium on Combinatorial Pattern Matching, CPM 2018 - Qingdao, China
Duration: 2 Jul 20184 Jul 2018

Publication series

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

Conference

Conference29th Annual Symposium on Combinatorial Pattern Matching, CPM 2018
Country/TerritoryChina
CityQingdao
Period2/07/184/07/18

Bibliographical note

Publisher Copyright:
© 2018 Yoshifumi Sakai; licensed under Creative Commons License CC-BY.

Keywords

  • Dynamic algorithms
  • Longest common factor
  • Periodicity
  • Priority

Fingerprint

Dive into the research topics of 'Locally maximal common factors as a tool for efficient dynamic string algorithms'. Together they form a unique fingerprint.

Cite this