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

计算LZ-End解析:易于实现且实际高效

Computing the LZ-End parsing: Easy to implement and practically efficient

Patrick Dinklage

AI总结:

本研究聚焦LZ-End解析的次优$\text{O}(n\text{lg}\text{lg}n)$算法,通过简化描述、加入未公开技巧、引入惰性求值和减少间接寻址优化,实现了易于实现、内存占用低且速度超现有最优水平的效果。

摘要:

输入字符串的LZ-End解析[Kreft & Navarro, 2011]可实现与流行的Lempel-Ziv 77方案相当的压缩效果,同时还支持高效随机访问。Kempa与Kosolobov证明该解析可在输入长度的线性时间与空间内计算得出[Kempa & Kosolobov, 2017],但对应的算法几乎不具备实用性。我们聚焦于他们提出的次优算法,该算法以$\boldsymbol{\text{O}}(n \text{lg} \text{lg} n)$的时间复杂度计算解析。它所需的工具集相对较少,因此易于实现,同时在实际应用中效率很高。我们给出了详细且简化的描述与完整代码清单,既纳入了原实现中未公开的技巧,还采用了惰性求值以减少实际工作量,并通过移除一层间接寻址降低了工作内存需求。我们通过简短的基准测试验证了该算法的合理性,其解析速度优于当前最优水平。

英文摘要:

The LZ-End parsing [Kreft & Navarro, 2011] of an input string yields compression competitive with the popular Lempel-Ziv 77 scheme, but also allows for efficient random access. Kempa and Kosolobov showed that the parsing can be computed in time and space linear in the input length [Kempa & Kosolobov, 2017], however, the corresponding algorithm is hardly practical. We put the spotlight on their suboptimal algorithm that computes the parsing in time $\mathcal{O}(n \lg\lg n)$. It requires a comparatively small toolset and is therefore easy to implement, but at the same time very efficient in practice. We give a detailed and simplified description with a full listing that incorporates undocumented tricks from the original implementation, but also uses lazy evaluation to reduce the workload in practice and requires less working memory by removing a level of indirection. We legitimize our algorithm in a brief benchmark, obtaining the parsing faster than the state of the art.

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

↑