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

pi和pi'失效函数的在线验证

Online validation of the pi and pi' failure functions

Pawel Gawrychowski, Artur Jez, Lukasz Jez

摘要:

设pi_w表示词w的Morris-Pratt算法的失效函数。本文研究了如下问题:给定一个整数数组A[1. n],是否存在任意字母表上的一个词w,使得对于所有i,A[i]=pi_w[i]?此外,字母表的最小基数是多少?在单位成本RAM模型中,我们给出了一个线性的实时的算法。我们的算法在最小字母表上返回一个单词w,使得pi_w = A,并且只使用o(n)个单词的内存。然后我们考虑函数pi'而不是pi,并给出了这种情况下的O(nlog n)在线算法。这是这个问题的第一个多项式算法的在线版本。

英文摘要:

Let pi_w denote the failure function of the Morris-Pratt algorithm for a word w. In this paper we study the following problem: given an integer array A[1..n], is there a word w over arbitrary alphabet such that A[i]=pi_w[i] for all i? Moreover, what is the minimum required cardinality of the alphabet? We give a real time linear algorithm for this problem in the unit-cost RAM model with Θ(log n) bits word size. Our algorithm returns a word w over minimal alphabet such that pi_w = A as well and uses just o(n) words of memory. Then we consider function pi' instead of pi and give an online O(n log n) algorithm for this case. This is the first polynomial algorithm for online version of this problem.

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

↑