Fast Algorithms for the Shortest Unique Palindromic Substring Problem on Run-Length Encoded Strings

For a string S , a palindromic substring S [ i .. j ] is said to be a shortest unique palindromic substring ( S U P S ) 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...

Full description

Saved in:
Bibliographic Details
Published inTheory of computing systems Vol. 64; no. 7; pp. 1273 - 1291
Main Authors Watanabe, Kiichi, Nakashima, Yuto, Inenaga, Shunsuke, Bannai, Hideo, Takeda, Masayuki
Format Journal Article
LanguageEnglish
Published New York Springer US 01.10.2020
Springer Nature B.V
Subjects
Online AccessGet full text
ISSN1432-4350
1433-0490
DOI10.1007/s00224-020-09980-x

Cover

More Information
Summary:For a string S , a palindromic substring S [ i .. j ] is said to be a shortest unique palindromic substring ( S U P S ) 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 S U P S queries on run-length encoded strings. We show how to preprocess a given run-length encoded string R L E S of size m in O ( m ) space and O ( m log σ R L E S + m log m / log log m ) time so that all S U P S s for any subsequent query interval can be answered in O ( log m / log log m + α ) time, where α is the number of outputs, and σ R L E S is the number of distinct runs of R L E S . 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 ( log log m / log log log m + α ) time and can be built in O ( m log σ R L E S + m log m / log log m ) time, and the second one answers queries in O ( log log m + α ) time and can be built in O ( m log σ R L E S ) time. Both of these data structures require O ( m ) space.
Bibliography:ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 14
ISSN:1432-4350
1433-0490
DOI:10.1007/s00224-020-09980-x