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

BAT-LZ 脱离地狱

BAT-LZ Out of Hell

Zsuzsanna Lipták, Francesco Masillo, Gonzalo Navarro

AI总结:

本文提出 BAT-LZ 变体,通过设计贪心算法和结合增强后缀树的算法,在几乎不损失压缩率的情况下,将访问任意符号的开销限制在接近 $\log_2 n$。

摘要:

尽管 Lempel-Ziv 解析在重复性文本集合上始终能取得最佳压缩效果,但它一直无法为访问任意符号的开销提供相关保证,这使其在压缩自索引及其他压缩数据结构中的应用吸引力大打折扣。本文提出了一种名为 BAT-LZ(Bounded Access Time Lempel-Ziv,有界访问时间 Lempel-Ziv)的变体,其访问开销受压缩时给定的参数限制。我们设计并实现了一种线性空间算法,时间复杂度为 $O(n\log^3 n)$,通过贪心地最大化每个后续短语长度,获取长度为 $n$ 的文本的 BAT-LZ 解析。该算法基于一种新的线性空间数据结构,可在秩空间求解 5-侧正交范围查询,并允许更新支持单侧查询的坐标,查询和更新的时间均为 $O(\log^3 n)$。若使用 $O(n\log n)$ 空间,该时间可降至 $O(\log^2 n)$。我们设计了第二种算法,利用增强后缀树巧妙选择短语来源,尽管不再保证短语长度尽可能长。该算法在理论上慢得多,但在实践中与贪心解析器相当,且压缩率显著更优。随后我们将两种算法结合,得到一个始终选择最长可能短语及其最佳来源的解析器。实验表明,在大多数重复性文本上,我们的算法在长度为 $n$ 的文本上访问开销接近 $\log_2 n$,且与经典 LZ 压缩相比,压缩率几乎无损失。文末讨论了若干开放挑战。

英文摘要:

Despite consistently yielding the best compression on repetitive text collections, the Lempel-Ziv parsing has resisted all attempts at offering relevant guarantees on the cost to access an arbitrary symbol. This makes it less attractive for use on compressed self-indexes and other compressed data structures. In this paper we introduce a variant we call BAT-LZ (for Bounded Access Time Lempel-Ziv) where the access cost is bounded by a parameter given at compression time. We design and implement a linear-space algorithm that, in time $O(n\log^3 n)$, obtains a BAT-LZ parse of a text of length $n$ by greedily maximizing each next phrase length. The algorithm builds on a new linear-space data structure that solves 5-sided orthogonal range queries in rank space, allowing updates to the coordinate where the one-sided queries are supported, in $O(\log^3 n)$ time for both queries and updates. This time can be reduced to $O(\log^2 n)$ if $O(n\log n)$ space is used. We design a second algorithm that chooses the sources for the phrases in a clever way, using an enhanced suffix tree, albeit no longer guaranteeing longest possible phrases. This algorithm is much slower in theory, but in practice it is comparable to the greedy parser, while achieving significantly superior compression. We then combine the two algorithms, resulting in a parser that always chooses the longest possible phrases, and the best sources for those. Our experimentation shows that, on most repetitive texts, our algorithms reach an access cost close to $\log_2 n$ on texts of length $n$, while incurring almost no loss in the compression ratio when compared with classical LZ-compression. Several open challenges are discussed at the end of the paper.

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

↑