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

计算Lyndon阵列的算法

Algorithms to Compute the Lyndon Array

Frantisek Franek, A. S. M. Sohidull Islam, M. Sohel Rahman, W. F. Smyth

摘要:

我们首先描述了三个算法计算的林登阵列,已建议在文献中,但没有结构化的论述。其中两个算法在最坏的情况下在二次时间内执行,第三个算法实现了线性时间,但代价是先计算x的后缀数组和逆后缀数组。然后,我们继续描述两个变种的一个新的算法,避免事先计算的全球数据结构,并在最坏的情况下执行n日志n时间。实验证据表明,这五种算法中除了一种之外,其他所有算法实际上都只需要线性执行时间,其中两种新算法快了一小部分。我们推测,存在一个快速和最坏情况下的线性时间算法来计算林登阵列,也是基本的(不使用全局数据结构,如后缀数组)。

英文摘要:

We first describe three algorithms for computing the Lyndon array that have been suggested in the literature, but for which no structured exposition has been given. Two of these algorithms execute in quadratic time in the worst case, the third achieves linear time, but at the expense of prior computation of both the suffix array and the inverse suffix array of x. We then go on to describe two variants of a new algorithm that avoids prior computation of global data structures and executes in worst-case n log n time. Experimental evidence suggests that all but one of these five algorithms require only linear execution time in practice, with the two new algorithms faster by a small factor. We conjecture that there exists a fast and worst-case linear-time algorithm to compute the Lyndon array that is also elementary (making no use of global data structures such as the suffix array).

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

↑