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 language | English |
---|---|
Title of host publication | 29th Annual Symposium on Combinatorial Pattern Matching, CPM 2018 |
Editors | Binhai Zhu, Gonzalo Navarro, David Sankoff |
Publisher | Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing |
Pages | 111-1113 |
Number of pages | 1003 |
ISBN (Electronic) | 9783959770743 |
DOIs | |
State | Published - 1 May 2018 |
Event | 29th Annual Symposium on Combinatorial Pattern Matching, CPM 2018 - Qingdao, China Duration: 2 Jul 2018 → 4 Jul 2018 |
Publication series
Name | Leibniz International Proceedings in Informatics, LIPIcs |
---|---|
Volume | 105 |
ISSN (Print) | 1868-8969 |
Conference
Conference | 29th Annual Symposium on Combinatorial Pattern Matching, CPM 2018 |
---|---|
Country/Territory | China |
City | Qingdao |
Period | 2/07/18 → 4/07/18 |
Bibliographical note
Publisher Copyright:© 2018 Yoshifumi Sakai; licensed under Creative Commons License CC-BY.
Keywords
- Dynamic algorithms
- Longest common factor
- Periodicity
- Priority