Palindromic trees for a sliding window and its applications

•The first study of distinct palindromes in a sliding window.•Efficient algorithms to maintain all distinct palindromes in a sliding window.•Application for computing characteristic palindromic strings. The palindromic tree (a.k.a. eertree) for a string S of length n is a tree-like data structure th...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Information processing letters Jg. 173; S. 106174
Hauptverfasser: Mieno, Takuya, Watanabe, Kiichi, Nakashima, Yuto, Inenaga, Shunsuke, Bannai, Hideo, Takeda, Masayuki
Format: Journal Article
Sprache:Englisch
Veröffentlicht: Elsevier B.V 01.01.2022
Schlagworte:
ISSN:0020-0190, 1872-6119
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:•The first study of distinct palindromes in a sliding window.•Efficient algorithms to maintain all distinct palindromes in a sliding window.•Application for computing characteristic palindromic strings. 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(nlog⁡σ) time with O(n) space. In this paper, we consider the sliding window version of the problem: For a sliding window of length at most d, we present two versions of an algorithm which maintains the palindromic tree of size O(d) for every sliding window S[i..j] over S, where 1≤j−i+1≤d. The first version works in O(nlog⁡σ′) time with O(d) space where σ′≤d is the maximum number of distinct characters in the windows, and the second one works in O(n+dσ) time with (d+2)σ+O(d) 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.
ISSN:0020-0190
1872-6119
DOI:10.1016/j.ipl.2021.106174