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] 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 RLE S of size m in O(m) space and O(m log σ RLE S + m log m/ log log m) time so that all SUPSs for any subsequent query interval can be answered in O( log m/ log log m + α) time, where α is the number of outputs, and σ RLE S is the number of distinct runs of RLE S .
The palindromic tree (a.k.a. eertree) for a string S of length n is a tree-like data structure that represents the set of all distinct palindromic substrings of S, using O(n) space [Rubinchik and Shur, 2018]. It is known that, when S is over an alphabet of size σ and is given in an online manner, then the palindromic tree of S can be constructed in O(n log σ) time with O(n) space. In this paper, we consider the sliding window version of the problem: For a fixed window length d, we propose two algorithms to maintain the palindromic tree of size O(d) for every sliding window S[i..i+d−1] over S, one running in O(n log σ ′ ) time with O(d) space where σ ′ ≤ d is the maximum number of distinct characters in the windows, and the other running in O(n+dσ) time with dσ +O(d) space. We also present applications of our algorithms for computing minimal unique palindromic substrings (MUPS) and for computing minimal absent palindromic words (MAPW) for a sliding window.which enumerate all distinct palindromes in a given sting of length n over an integer alphabet of size σ = n O(1) . For the same problem in the online model, Kosolobov et al. [13] proposed an O(n log σ)-time and O(n)-space algorithm for a general ordered alphabet. Kosolobov et al.'s algorithm is a combination of Manacher's algorithm and Ukkonen's online suffix tree construction algorithm [21]. Rubinchik and Shur [19] proposed a new data structure called eertree, which permits efficient access to distinct palindromes in a string without storing the string itself. Eertrees can be utilized for solving problems related to palindromic structures, such as the palindrome counting problem and the palindromic factorization problem [19]. The size of the eertree of S is linear in the number p S of distinct palindromes in S [19]. It is known that p S is at most |S|+ 1, and that it can be much smaller than the length |S| of the string, e.g., for S = abc n/3 , p S = 4 since all distinct palindromes in S are a, b, c, and the empty string. Thus, the size of the eertree of S can be much smaller than that of the suffix tree of S which is Θ(n). Therefore, it is of significance if one can build eertrees without suffix trees. Rubinchik and Shur [19] indeed proposed an online eertree construction algorithm running in O(n log σ) time without suffix trees.Recently, a concept of palindromic structures called minimal unique palindromic substrings (MUPS ) is introduced by Inoue et al. [12]. A palindromic substring w = S[i..j] of a string S is called a MUPS of S if w occurs in S exactly once, and S[i+1..j −1] occurs at least twice in S. MUPSs are utilized for solving the shortest unique palindromic substring (SUPS ) problem [12], which is motivated by an application in molecular biology. Watanabe et al. [22] proposed an algorithm to solve the SUPS problem based on the run-length encoding (RLE ) version of eertrees, named e 2 rtre 2 .
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.