Palindromic Trees for a Sliding Window and Its Applications
arXiv:2006.02134
Abstract
The palindromic tree (a.k.a. eertree) for a string of length is a tree-like data structure that represents the set of all distinct palindromic substrings of , using space [Rubinchik and Shur, 2018]. It is known that, when is over an alphabet of size and is given in an online manner, then the palindromic tree of can be constructed in time with space. In this paper, we consider the sliding window version of the problem: For a sliding window of length at most , we present two versions of an algorithm which maintains the palindromic tree of size for every sliding window over , where . The first version works in time with space where is the maximum number of distinct characters in the windows, and the second one works in time with space. We also show how our algorithms can be applied to efficient computation of minimal unique palindromic substrings (MUPS) and minimal absent palindromic words (MAPW) for a sliding window.