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

字符串同步集的最优构造

Time-Optimal Construction of String Synchronizing Sets

DIENS, École normale supérieure de Paris, PSL Research University(巴黎高等师范学院);Max Planck Institute for Informatics(马克斯·普朗克计算机科学研究所)

Jonas Ellert, Tomasz Kociumaka

AI总结:

本文提出了一种在词RAM模型中构造字符串同步集的最优方法,通过新的框架和高效的数据结构实现快速查询。

摘要:

字符串处理中的一个关键原则是局部一致性:利用短上下文来一致地处理字符串的匹配片段。字符串同步集[Kempa, Kociumaka; STOC 2019]是这一原则的重要实例。一个长度为n的字符串的τ-同步集是O(n/τ)个位置的集合,这些位置通过其长度为2τ的上下文选择,使得(在高度周期性区域外)每个长度为τ的窗口至少有一个位置被选中。其应用包括数据压缩、文本索引和字符串相似性在词RAM模型中的更快算法。我们展示了如何预处理任何字符串T∈[0..σ)^n,在O(n logσ / log n)时间内,使得对于任何τ∈[1..n],可以以O((n logτ)/(τ log n))的时间构造T的τ-同步集。这两个界限在词RAM模型中是最佳的,其中词大小w=Θ(log n)。之前,构造时间是O(n/τ),要么在O(n)时间预处理后[李, 等; SICOMP 2024],要么在τ<0.2 log_σn时没有预处理[Kempa, Kociumaka; STOC 2019]。一个简单的版本我们的方法输出集合作为排序列表在O(n/τ)时间内,或作为位掩码在O(n / log n)时间内。我们的最优构造产生一个紧凑的完全可索引字典,支持在O(1)时间内进行选择查询和在O(log(logτ / log log n))时间内进行排名查询,匹配对于τ≤n^{1-Ω(1)}的无条件单元探测下界。我们通过一个新的框架来处理稀疏整数序列,在自定义可变长度编码中实现。对于排名和选择查询,我们增强了van Emde Boas树[Pătraşcu, Thorup; STOC 2006]的最优变体,通过确定性的线性时间构造。上述查询时间保证在预处理时间与编码大小(以字为单位)成比例后成立。

英文摘要:

A key principle in string processing is local consistency: using short contexts to handle matching fragments of a string consistently. String synchronizing sets [Kempa, Kociumaka; STOC 2019] are an influential instantiation of this principle. A $τ$-synchronizing set of a length-$n$ string is a set of $O(n/τ)$ positions, chosen via their length-$2τ$ contexts, such that (outside highly periodic regions) at least one position in every length-$τ$ window is selected. Among their applications are faster algorithms for data compression, text indexing, and string similarity in the word RAM model. We show how to preprocess any string $T \in [0..σ)^n$ in $O(n\logσ/\log n)$ time so that, for any $τ\in[1..n]$, a $τ$-synchronizing set of $T$ can be constructed in $O((n\logτ)/(τ\log n))$ time. Both bounds are optimal in the word RAM model with word size $w=Θ(\log n)$. Previously, the construction time was $O(n/τ)$, either after an $O(n)$-time preprocessing [Kociumaka, Radoszewski, Rytter, Waleń; SICOMP 2024], or without preprocessing if $τ<0.2\log_σn$ [Kempa, Kociumaka; STOC 2019]. A simple version of our method outputs the set as a sorted list in $O(n/τ)$ time, or as a bitmask in $O(n/\log n)$ time. Our optimal construction produces a compact fully indexable dictionary, supporting select queries in $O(1)$ time and rank queries in $O(\log(\tfrac{\logτ}{\log\log n}))$ time, matching unconditional cell-probe lower bounds for $τ\le n^{1-Ω(1)}$. We achieve this via a new framework for processing sparse integer sequences in a custom variable-length encoding. For rank and select queries, we augment the optimal variant of van Emde Boas trees [Pătraşcu, Thorup; STOC 2006] with a deterministic linear-time construction. The above query-time guarantees hold after preprocessing time proportional to the encoding size (in words).

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

↑