游程编码字符串上的最长无边界因子
Algorithms for Computing Longest Unbordered Factors on Run-Length Encoded Strings
AI总结:
本文研究游程编码字符串上的最长无边界因子问题,通过新的组合学观察将已有算法适配到RLE场景,提出时间复杂度为 $O(m^{1.5} \log^2 m)$ 的算法,在压缩规模较小时可优于现有方法。
摘要:
字符串的边界是指该字符串的一个非空真前缀,同时它也是该字符串的后缀。如果一个字符串没有边界,则称其为无边界字符串。最长无边界因子是字符串学中的一个基本概念,与字符串周期性密切相关。本文研究最长无边界因子问题:给定一个长度为 $n$ 的字符串,目标是计算其最长的无边界因子。尽管近期工作已经为该问题提出了亚二次和近线性时间算法,但已知的最坏情况时间复杂度仍为 $O(n \log n)$ [Kociumaka et al., ISAAC 2018]。本文在压缩字符串处理的背景下研究该问题,特别关注游程编码(RLE)字符串。我们首先给出一个简单但关键的结构性观察,将无边界因子与 RLE 压缩字符串联系起来。在此基础上,我们提出一个算法,在 $O(m^{1.5} \log^2 m)$ 时间和 $O(m \log^2 m)$ 空间内解决该问题,其中 $m$ 是 RLE 压缩输入字符串的大小。为了实现这一点,我们的方法模拟了 [Gawrychowski et al., SPIRE 2015] 中 $O(n^{1.5})$ 时间算法的一个关键思想,并通过新的组合学见解将其适配到 RLE 场景中。当 RLE 大小 $m$ 相对于 $n$ 足够小时,我们的算法可能在 $n$ 上表现出线性时间行为,从而在此类情况下可能比现有方法具有更好的性能。
英文摘要:
A border of a string is a non-empty proper prefix of the string that is also a suffix. A string is called unbordered if it has no border. The longest unbordered factor is a fundamental notion in stringology, closely related to string periodicity. This paper addresses the longest unbordered factor problem: given a string of length $n$, the goal is to compute its longest factor that is unbordered. While recent work has achieved subquadratic and near-linear time algorithms for this problem, the best known worst-case time complexity remains $O(n \log n)$ [Kociumaka et al., ISAAC 2018]. In this paper, we investigate the problem in the context of compressed string processing, focusing specifically on run-length encoded (RLE) strings. We first present a simple yet crucial structural observation relating unbordered factors and RLE-compressed strings. Building on this, we propose an algorithm that solves the problem in $O(m^{1.5} \log^2 m)$ time and $O(m \log^2 m)$ space, where $m$ is the size of the RLE-compressed input string. Furthermore, we propose another algorithm for the problem that runs in average $O(m \log^2 m)$ time and $O(m\log m)$ space: The average-case bound holds under an exponent-bounded random-input model, in which the input is chosen uniformly from the strings of RLE size $m$ whose run exponents are at most a given bound $E\geq 2$. Our approaches extend key ideas from [Gawrychowski et al., SPIRE 2015] to the RLE setting through new combinatorial insights. When the RLE size $m$ is sufficiently small compared to $n$, our algorithms achieve linear-time behavior in $n$, potentially leading to improved performance over existing methods in such cases.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。