Data structures for computing unique palindromes in static and non-static strings
Abstract
A palindromic substring of a string is said to be a shortest unique palindromic substring (SUPS) in for an interval if is a shortest palindromic substring such that occurs only once in , and contains . The SUPS problem is, given a string of length , to construct a data structure that can compute all the SUPSs for any given query interval. It is known that any SUPS query can be answered in time after -time preprocessing, where is the number of SUPSs to output [Inoue et al., 2018]. In this paper, we first show that is at most , and the upper bound is tight. We also show that the total sum of lengths of minimal unique palindromic substrings of string , which is strongly related to SUPSs, is . Then, we present the first -bits data structures that can answer any SUPS query in constant time. Also, we present an algorithm to solve the SUPS problem for a sliding window that can answer any query in time and update data structures in amortized time, where is the size of the window, and is the alphabet size. Furthermore, we consider the SUPS problem in the after-edit model and present an efficient algorithm. Namely, we present an algorithm that uses time for preprocessing and answers any SUPS queries in time after single character substitution. Finally, as a by-product, we propose a fully-dynamic data structure for range minimum queries (RmQs) with a constraint where the width of each query range is limited to poly-logarithmic. The constrained RmQ data structure can answer such a query in constant time and support a single-element edit operation in amortized constant time.
Cite
@article{arxiv.2204.07327,
title = {Data structures for computing unique palindromes in static and non-static strings},
author = {Takuya Mieno and Mitsuru Funakoshi},
journal= {arXiv preprint arXiv:2204.07327},
year = {2023}
}