2019/03/14 by Kiichi Watanabe, Yuto Nakashima, Watanabe, Kiichi +7
Biochemistry, Genetics and Molecular Biology · Computer Science · #Algorithms and Data Compression #DNA and Biological Computing #Data Structures and Algorithms (cs.DS) #FOS: Computer and information sciences #semigroups and automata theory
paper · pdf · doi:10.48550/arxiv.1903.06290
openalex publication_date 2019/03/14 · openalex created_date 2020/04/03 · openalex updated_date 2026/07/28
For a string S, a palindromic substring S[i..j] is said to be a shortest unique palindromic substring (SUPS) for an interval [s, t] in S, if S[i..j] occurs exactly once in S, the interval [i, j] contains [s, t], and every palindromic substring containing [s, t] which is shorter than S[i..j] occurs at least twice in S. In this paper, we study the problem of answering SUPS queries on run-length encoded strings. We show how to preprocess a given run-length encoded string RLES of size m in O(m) space and O(m log σ_RLES + m √(log m / loglog m)) time so that all SUPSs for any subsequent query interval can be answered in O(√(log m / loglog m) + α) time, where α is the number of outputs, and σ_RLES is the number of distinct runs of RLES. Additionaly, we consider a variant of the SUPS problem where a query interval is also given in a run-length encoded form. For this variant of the problem, we present two alternative algorithms with faster queries. The first one answers queries in O(√(loglog m /logloglog m) + α) time and can be built in O(m log σ_RLES + m √(log m / loglog m)) time, and the second one answers queries in O(log log m + α) time and can be built in O(m log σ_RLES) time. Both of these data structures require O(m) space.