arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2002.03965cs.DS
收藏

纯线性时间中的回文k-因子分解

Palindromic k-Factorization in Pure Linear Time

Mikhail Rubinchik, Arseny M. Shur

摘要:

给定一个字符串$s$,其长度为$n$,在一个普通字母表上,以及一个整数$k$,问题是判断$s$是否是$k$非空回文的串联。两个先前已知的解决该问题的方案分别是$O(kn)$和$O(n\log n)$。在字-RAM模型下解决了该问题的复杂性,提出了一种$O(n)$时间在线判决算法。该算法同时发现的最小奇数个因素和最小偶数个因素的一个因素分解成非空回文串。我们还演示了如何得到一个明确的分解$s$到$k$回文与$O(n)$时间离线后处理。

英文摘要:

Given a string $s$ of length $n$ over a general alphabet and an integer $k$, the problem is to decide whether $s$ is a concatenation of $k$ nonempty palindromes. Two previously known solutions for this problem work in time $O(kn)$ and $O(n\log n)$ respectively. Here we settle the complexity of this problem in the word-RAM model, presenting an $O(n)$-time online deciding algorithm. The algorithm simultaneously finds the minimum odd number of factors and the minimum even number of factors in a factorization of a string into nonempty palindromes. We also demonstrate how to get an explicit factorization of $s$ into $k$ palindromes with an $O(n)$-time offline postprocessing.

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

↑