压缩直线程序的方法
Compression by Contracting Straight-Line Programs
摘要:
在基于语法的压缩中,字符串由上下文无关语法表示,也称为直线程序(SLP),它只生成该字符串。我们改进了最近的平衡结果,指出可以在线性时间内将大小为$g$的SLP转换为大小为$O(g)$的等效SLP,以便唯一派生树的高度为$O(\log N)$,其中$N$是表示字符串的长度(FOCS 2019)。我们引入了一类新的平衡SLP,称为收缩SLP,其中对于每个规则$A \to β_1 \dots β_k$,右侧的每个变量$β_i$的字符串长度比$A$的字符串长度小一个常数因子。特别地,收缩SLP的导出树具有每个子树在其叶大小中具有对数高度的性质。我们表明,一个给定的SLP的大小$g$可以在线性时间转化为一个等价的合同SLP的大小$O(g)$与规则的恒定长度。我们提出了一个应用程序的导航问题,在压缩的无秩树,森林直线程序(FSLPs)。我们通过移动到时间上的第$i$个孩子$O(\log d)$的操作来扩展Reh和Sieber(2020)的线性空间数据结构,其中$d$是当前节点的度。收缩SLP还被应用于在SLP压缩的字符串上的指搜索问题,其中人们想要访问接近预先指定的指位置的位置,理想地在$O(\log d)$时间内,其中$d$是访问的位置和指之间的距离。我们给出了一个线性空间的解决方案,其中一个可以访问符号或移动手指的时间$O(\log d + \log^{(t)} N)$为任何常数$t$其中$\log^{(t)} N$是$t$倍对数的$N$。这改进了Bille,Christiansen,Cording和Gørtz(2018)使用访问/移动时间$O(\log d + \log \log N)$的先前解决方案。
英文摘要:
In grammar-based compression a string is represented by a context-free grammar, also called a straight-line program (SLP), that generates only that string. We refine a recent balancing result stating that one can transform an SLP of size $g$ in linear time into an equivalent SLP of size $O(g)$ so that the height of the unique derivation tree is $O(\log N)$ where $N$ is the length of the represented string (FOCS 2019). We introduce a new class of balanced SLPs, called contracting SLPs, where for every rule $A \to β_1 \dots β_k$ the string length of every variable $β_i$ on the right-hand side is smaller by a constant factor than the string length of $A$. In particular, the derivation tree of a contracting SLP has the property that every subtree has logarithmic height in its leaf size. We show that a given SLP of size $g$ can be transformed in linear time into an equivalent contracting SLP of size $O(g)$ with rules of constant length. We present an application to the navigation problem in compressed unranked trees, represented by forest straight-line programs (FSLPs). We extend a linear space data structure by Reh and Sieber (2020) by the operation of moving to the $i$-th child in time $O(\log d)$ where $d$ is the degree of the current node. Contracting SLPs are also applied to the finger search problem over SLP-compressed strings where one wants to access positions near to a pre-specified finger position, ideally in $O(\log d)$ time where $d$ is the distance between the accessed position and the finger. We give a linear space solution where one can access symbols or move the finger in time $O(\log d + \log^{(t)} N)$ for any constant $t$ where $\log^{(t)} N$ is the $t$-fold logarithm of $N$. This improves a previous solution by Bille, Christiansen, Cording, and Gørtz (2018) with access/move time $O(\log d + \log \log N)$.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。