arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2404.07057cs.DS
收藏

广义直线程序

Generalized Straight-Line Programs

Gonzalo Navarro, Francisco Olivares, Cristian Urbina

AI总结:

本文将平衡 SLP 构造推广到 GSLP,并提出 ISLP 与 RLSLP,证明其可突破重复性下界 δ 且支持多对数时间访问及多类子串查询。

摘要:

最近已证明,任何生成给定字符串的 Straight-Line Program(SLP,直线程序)都可以在线性时间内转换为大小具有相同渐近阶的等价平衡 SLP。我们将这一证明推广到一类称为 Generalized SLP(GSLP,广义直线程序)的一般文法,它允许形如 A→x 的规则,其中 x 是符号序列的任意图灵完备表示(大小为 |x|),该序列可能远长于 |x|。随后,我们将 GSLP 特化为所谓的 Iterated SLP(ISLP,迭代直线程序),它允许形如 A→Π_{i=k_1}^{k_2} B_1^{i^{c_1}}⋯B_t^{i^{c_t}}、大小为 2t+2 的规则。我们证明,对于某些文本族,ISLP 突破了基于子串复杂度的度量 δ;δ 是大多数利用重复性的度量和压缩器的下界。此外,ISLP 能够在 O(λ+log^2 n log log n) 时间内从所表示的文本 T[1..n] 中提取任意长度为 λ 的子串。这是首个突破 δ、同时又能以多对数时间直接访问任意文本符号的重复性文本压缩表示。我们还展示了如何在 O(log^2 n log log n) 时间内计算若干子串查询,例如区间最小值以及下一个/前一个更小值。最后,我们进一步将文法特化为 Run-Length SLP(RLSLP,游程长度直线程序),它将 ISLP 允许的规则限制为 A→B^t 的形式。除了继承此前所有结果并将 log^2 n log log n 项降低到接近最优的 log n 之外,我们还表明 RLSLP 能够利用平衡性高效计算一大类我们称为“可组合”的子串查询——即 f(X·Y) 可由 f(X) 和 f(Y) 得到……

英文摘要:

It was recently proved that any Straight-Line Program (SLP) generating a given string can be transformed in linear time into an equivalent balanced SLP of the same asymptotic size. We generalize this proof to a general class of grammars we call Generalized SLPs (GSLPs), which allow rules of the form $A \rightarrow x$ where $x$ is any Turing-complete representation (of size $|x|$) of a sequence of symbols (potentially much longer than $|x|$). We then specialize GSLPs to so-called Iterated SLPs (ISLPs), which allow rules of the form $A \rightarrow Π_{i=k_1}^{k_2} B_1^{i^{c_1}}\cdots B_t^{i^{c_t}}$ of size $2t+2$. We prove that ISLPs break, for some text families, the measure $δ$ based on substring complexity, a lower bound for most measures and compressors exploiting repetitiveness. Further, ISLPs can extract any substring of length $λ$, from the represented text $T[1.. n]$, in time $O(λ+ \log^2 n\log\log n)$. This is the first compressed representation for repetitive texts breaking $δ$ while, at the same time, supporting direct access to arbitrary text symbols in polylogarithmic time. We also show how to compute some substring queries, like range minima and next/previous smaller value, in time $O(\log^2 n \log\log n)$. Finally, we further specialize the grammars to Run-Length SLPs (RLSLPs), which restrict the rules allowed by ISLPs to the form $A \rightarrow B^t$. Apart from inheriting all the previous results with the term $\log^2 n \log\log n$ reduced to the near-optimal $\log n$, we show that RLSLPs can exploit balance to efficiently compute a wide class of substring queries we call ``composable'' -- i.e., $f(X \cdot Y)$ can be obtained from $f(X)$ and $f(Y)$...

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

↑