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

最小周期算法及其应用

A Minimal Periods Algorithm with Applications

Zhi Xu

摘要:

在“字符串中的平方的计算”中,Kakhaju简要描述了一个线性时间算法,用于计算从单词中每个位置开始的最小平方。使用相同的后缀树的建设,我们推广他的结果,并详细说明如何计算O(k |w|)时间的最小k次幂,与周期的长度大于s,在每个位置开始在一个字w为任意指数$k\geq2$和整数$s\geq0$。我们提供了完整的证明的正确性的算法,这是某种程度上不完全清楚在Kaju的原始文件。该算法可以作为一个子程序来检测词中的某些类型的伪模式,这是我们研究泛化的初衷。

英文摘要:

Kosaraju in ``Computation of squares in a string'' briefly described a linear-time algorithm for computing the minimal squares starting at each position in a word. Using the same construction of suffix trees, we generalize his result and describe in detail how to compute in O(k|w|)-time the minimal k-th power, with period of length larger than s, starting at each position in a word w for arbitrary exponent $k\geq2$ and integer $s\geq0$. We provide the complete proof of correctness of the algorithm, which is somehow not completely clear in Kosaraju's original paper. The algorithm can be used as a sub-routine to detect certain types of pseudo-patterns in words, which is our original intention to study the generalization.

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

↑