arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1608.05550cs.DS
收藏

在最佳时间内最短的唯一回文子串查询

Shortest unique palindromic substring queries in optimal time

Yuto Nakashima, Hiroe Inoue, Takuya Mieno, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda

摘要:

回文是一个字符串,它的正反读都是一样的。字符串$S$的回文子串$P$称为最短唯一回文子串($\mathit{SUPS}$),在PDTMAX中的间隔$[x, y]$内@ THABMN,如果$P$在$S$中只出现一次,则$P$的该次出现包含间隔$[x, y]$,以及$S$的每个回文子串,其包含间隔$[x, y]$并且短于$P$在$S$中至少出现两次。$\mathit{SUPS}$问题是,给定一个字符串$S$,对$S$进行预处理,以便对于任何后续查询间隔$[x, y]$,可以快速回答间隔$[x, y]$的所有$\mathit{SUPS}\mbox{s}$。我们提出了一个最佳的解决方案,这个问题。也就是说,我们展示了如何预处理一个给定的字符串$S$的长度$n$在$O(n)$的时间和空间,使所有$\mathit{SUPS}\mbox{s}$的任何后续查询间隔可以回答在$O(k+1)$时间,其中$k$是输出的数量。

英文摘要:

A palindrome is a string that reads the same forward and backward. A palindromic substring $P$ of a string $S$ is called a shortest unique palindromic substring ($\mathit{SUPS}$) for an interval $[x, y]$ in $S$, if $P$ occurs exactly once in $S$, this occurrence of $P$ contains interval $[x, y]$, and every palindromic substring of $S$ which contains interval $[x, y]$ and is shorter than $P$ occurs at least twice in $S$. The $\mathit{SUPS}$ problem is, given a string $S$, to preprocess $S$ so that for any subsequent query interval $[x, y]$ all the $\mathit{SUPS}\mbox{s}$ for interval $[x, y]$ can be answered quickly. We present an optimal solution to this problem. Namely, we show how to preprocess a given string $S$ of length $n$ in $O(n)$ time and space so that all $\mathit{SUPS}\mbox{s}$ for any subsequent query interval can be answered in $O(k+1)$ time, where $k$ is the number of outputs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑