字符串中的保序平方
Order-Preserving Squares in Strings
摘要:
字符串中的保序正方形是$uv$形式的片段,其中$u\neq v$和$u$与$v$序同构。我们表明,一个字符串$w$的长度$n$在一个字母表的大小$σ$包含$\mathcal{O}(σn)$顺序保持广场是不同的话。这改进了Kociumaka、Radoszewski、Rytter和Walegaly的$\mathcal{O}(σ^{2}n)$上限[TCS 2016]。此外,对于每一个$σ$和$n$,我们展示了一个字符串与$Ω(σn)$保序平方是不同的字,从而建立我们的上限是渐近紧。最后,我们设计了一个$\mathcal{O}(σn)$时间算法,输出所有的顺序保持广场出现在一个给定的字符串,是不同的话。根据我们的下限,这在最坏的情况下是最优的。
英文摘要:
An order-preserving square in a string is a fragment of the form $uv$ where $u\neq v$ and $u$ is order-isomorphic to $v$. We show that a string $w$ of length $n$ over an alphabet of size $σ$ contains $\mathcal{O}(σn)$ order-preserving squares that are distinct as words. This improves the upper bound of $\mathcal{O}(σ^{2}n)$ by Kociumaka, Radoszewski, Rytter, and Waleń [TCS 2016]. Further, for every $σ$ and $n$ we exhibit a string with $Ω(σn)$ order-preserving squares that are distinct as words, thus establishing that our upper bound is asymptotically tight. Finally, we design an $\mathcal{O}(σn)$ time algorithm that outputs all order-preserving squares that occur in a given string and are distinct as words. By our lower bound, this is optimal in the worst case.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。