Shortest Unique Palindromic Substring Queries in Optimal Time
Shortest Unique Palindromic Substring Queries in Optimal Time
复制标题
最佳时间的最短唯一回文子串查询
DOI:
10.1007/978-3-319-78825-8_32
复制
发表时间:
2018
期刊:
影响因子:
--
通讯作者:
Masayuki Takeda
中科院分区:
文献类型:
--
作者:
Yuto Nakashima;Takuya Takagi;Shunsuke Inenaga;Hideo Bannai;Masayuki Takeda
A palindrome is a string that reads the same forward and backward. A palindromic substringPof a stringSis called a shortest unique palindromic substring ($$ SUPS $$) for an interval [s,t] inS, ifPoccurs exactly once inS, this occurrence ofPcontains interval [s,t], and every palindromic substring ofSwhich contains interval [s,t] and is shorter thanPoccurs at least twice inS. The $$ SUPS $$ problem is, given a stringS, to preprocessSso that for any subsequent query interval [s,t] all the $$ SUPS \text {s}$$ for interval [s,t] can be answered quickly. We present an optimal solution to this problem. Namely, we show how to preprocess a given stringSof lengthninO(n) time and space so that all $$ SUPS \text {s}$$ for any subsequent query interval can be answered in $$O(\alpha + 1)$$ time, where $$\alpha $$ is the number of outputs.