TY - GEN
T1 - String 2-Covers with No Length Restrictions
AU - Boneh, Itai
AU - Golan, Shay
AU - Shur, Arseny
N1 - Publisher Copyright:
© Itai Boneh, Shay Golan, and Arseny Shur; licensed under Creative Commons License CC-BY 4.0.
PY - 2024/9
Y1 - 2024/9
N2 - A λ-cover of a string S is a set of strings {Ci}λ1 such that every index in S is contained in an occurrence of at least one string Ci. The existence of a 1-cover defines a well-known class of quasi-periodic strings. Quasi-periodicity can be decided in linear time, and all 1-covers of a string can be reported in linear time as well. Since in general it is NP-complete to decide whether a string has a λ-cover, the natural next step is the development of efficient algorithms for 2-covers. Radoszewski and Straszyński [ESA 2020] analysed the particular case where the strings in a 2-cover must be of the same length. They provided an algorithm that reports all such 2-covers of S in time near-linear in |S| and in the size of the output. In this work, we consider 2-covers in full generality. Since every length-n string has Ω(n2) trivial 2-covers (every prefix and suffix of total length at least n constitute such a 2-cover), we state the reporting problem as follows: given a string S and a number m, report all 2-covers {C1, C2} of S with length |C1| + |C2| upper bounded by m. We present an Õ(n + output) time algorithm solving this problem, with output being the size of the output. This algorithm admits a simpler modification that finds a 2-cover of minimum length. We also provide an Õ(n) time construction of a 2-cover oracle which, given two substrings C1, C2 of S, reports in poly-logarithmic time whether {C1, C2} is a 2-cover of S.
AB - A λ-cover of a string S is a set of strings {Ci}λ1 such that every index in S is contained in an occurrence of at least one string Ci. The existence of a 1-cover defines a well-known class of quasi-periodic strings. Quasi-periodicity can be decided in linear time, and all 1-covers of a string can be reported in linear time as well. Since in general it is NP-complete to decide whether a string has a λ-cover, the natural next step is the development of efficient algorithms for 2-covers. Radoszewski and Straszyński [ESA 2020] analysed the particular case where the strings in a 2-cover must be of the same length. They provided an algorithm that reports all such 2-covers of S in time near-linear in |S| and in the size of the output. In this work, we consider 2-covers in full generality. Since every length-n string has Ω(n2) trivial 2-covers (every prefix and suffix of total length at least n constitute such a 2-cover), we state the reporting problem as follows: given a string S and a number m, report all 2-covers {C1, C2} of S with length |C1| + |C2| upper bounded by m. We present an Õ(n + output) time algorithm solving this problem, with output being the size of the output. This algorithm admits a simpler modification that finds a 2-cover of minimum length. We also provide an Õ(n) time construction of a 2-cover oracle which, given two substrings C1, C2 of S, reports in poly-logarithmic time whether {C1, C2} is a 2-cover of S.
KW - Quasi-periodicity
KW - Range query
KW - Range stabbing
KW - String cover
UR - https://www.scopus.com/pages/publications/85205729841
U2 - 10.4230/LIPIcs.ESA.2024.31
DO - 10.4230/LIPIcs.ESA.2024.31
M3 - ???researchoutput.researchoutputtypes.contributiontobookanthology.conference???
AN - SCOPUS:85205729841
T3 - Leibniz International Proceedings in Informatics, LIPIcs
BT - 32nd Annual European Symposium on Algorithms, ESA 2024
A2 - Chan, Timothy
A2 - Fischer, Johannes
A2 - Iacono, John
A2 - Herman, Grzegorz
PB - Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
T2 - 32nd Annual European Symposium on Algorithms, ESA 2024
Y2 - 2 September 2024 through 4 September 2024
ER -