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

简单的线性时间重复因子分解

Simple Linear-time Repetition Factorization

Yuki Yonemoto, Shunsuke Inenaga

AI总结:

本文研究字符串重复因子分解问题,提出一种不依赖 Union-Find 和区间穿刺数据结构的简单 O(n) 时间算法,改进了此前依赖复杂数据结构的线性时间解法。

摘要:

对于长度为 n 的字符串 w,若其因子分解 f_1, …, f_m 中每个 f_i 都是重复串,即 f_i 形如 x^kx',其中 x 是非空字符串,x' 是 x 的(可能为空的)真前缀,且 k ≥ 2,则称该因子分解为 w 的重复因子分解。Dumitran 等人 [SPIRE 2015] 提出了一个 O(n) 时间和空间的算法,用于计算给定长度为 n 的字符串的任意重复因子分解。他们的算法严重依赖 Gabow 和 Tarjan [JCSS 1985] 提出的基于树的 Union-Find 数据结构(该结构在 word RAM 模型上以线性时间运行),以及 Schmidt [ISAAC 2009] 的区间穿刺数据结构。在本文中,我们深入探索了该问题的更多组合性质,并提出了一个简单算法,可在 O(n) 时间内计算给定长度为 n 的字符串的任意重复因子分解,且不依赖 Union-Find 和区间穿刺数据结构。我们的算法遵循 Inoue 等人 [ToCS 2022] 的方法,该方法可在 O(n log n) 时间内计算最小/最大重复因子分解。

英文摘要:

A factorization $f_1, \ldots, f_m$ of a string $w$ of length $n$ is called a repetition factorization of $w$ if $f_i$ is a repetition, i.e., $f_i$ is a form of $x^kx'$, where $x$ is a non-empty string, $x'$ is a (possibly-empty) proper prefix of $x$, and $k \geq 2$. Dumitran et al. [SPIRE 2015] presented an $O(n)$-time and space algorithm for computing an arbitrary repetition factorization of a given string of length $n$. Their algorithm heavily relies on the Union-Find data structure on trees proposed by Gabow and Tarjan [JCSS 1985] that works in linear time on the word RAM model, and an interval stabbing data structure of Schmidt [ISAAC 2009]. In this paper, we explore more combinatorial insights into the problem, and present a simple algorithm to compute an arbitrary repetition factorization of a given string of length $n$ in $O(n)$ time, without relying on data structures for Union-Find and interval stabbing. Our algorithm follows the approach by Inoue et al. [ToCS 2022] that computes the smallest/largest repetition factorization in $O(n \log n)$ time.

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

↑