An LZ-like factorization of a string divides it into factors, each being either a single character or a copy of a preceding substring. While grammar-based compression schemes support efficient random access with space linear in the compressed size, no comparable guarantees are known for general LZ-like factorizations. This limitation motivated restricted variants such as LZ-End [Kreft and Navarro, 2013] and height-bounded LZ (LZHB) [Bannai et al., 2024], which trade off some compression efficiency for faster access. In this paper, we introduce LZ-Begin-End (LZBE), a new LZ-like variant in which every copy factor must refer to a contiguous sequence of preceding factors. This structural restriction ensures that any context-free grammar can be transformed into an LZBE factorization of the same size. We further study the greedy LZBE factorization, which selects each copy factor to be as long as possible while processing the input from left to right, and show that it can be computed in linear time. Moreover, we exhibit a family of strings for which the greedy LZBE factorization is asymptotically smaller than the smallest grammar. These results demonstrate that the LZBE scheme is strictly more expressive than grammar-based compression in the worst case. To support fast queries, we propose a data structure for LZBE-compressed strings that permits O(log n)-time random access within space linear in the compressed size, where n is the length of the input string.


翻译:字符串的类LZ分解将其划分为若干因子,每个因子或是单个字符,或是先前某个子串的副本。虽然基于文法的压缩方案能以与压缩后尺寸成线性的空间支持高效的随机访问,但对于一般的类LZ分解,尚无已知的类似保证。这一局限性促使了受限变体的出现,例如LZ-End [Kreft and Navarro, 2013] 和高度有界LZ (LZHB) [Bannai et al., 2024],它们以牺牲部分压缩效率为代价来换取更快的访问速度。本文中,我们引入了LZ-Begin-End (LZBE),这是一种新的类LZ变体,其中每个复制因子必须引用一个连续的先前因子序列。这一结构限制确保了任何上下文无关文法都可以被转换为一个相同大小的LZBE分解。我们进一步研究了贪心LZBE分解,它在从左到右处理输入时,选择尽可能长的复制因子,并证明其可以在线性时间内计算得到。此外,我们展示了一族字符串,对于它们,贪心LZBE分解在渐进意义上小于最小的文法。这些结果表明,在最坏情况下,LZBE方案在表达能力上严格强于基于文法的压缩。为了支持快速查询,我们为LZBE压缩的字符串提出了一种数据结构,该结构允许在$O(\log n)$时间内进行随机访问,且所需空间与压缩后尺寸成线性关系,其中$n$是输入字符串的长度。

0
下载
关闭预览

相关内容

图分类相关资源大列表
专知
11+阅读 · 2019年7月18日
Transformer-XL:释放注意力模型的潜力
谷歌开发者
31+阅读 · 2019年2月19日
WebAssembly在QQ邮箱中的一次实践
IMWeb前端社区
13+阅读 · 2018年12月19日
在Python中使用SpaCy进行文本分类
专知
24+阅读 · 2018年5月8日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
一文读懂FM算法优势,并用python实现!(附代码)
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
14+阅读 · 2008年12月31日
Arxiv
0+阅读 · 2月4日
VIP会员
相关VIP内容
相关资讯
图分类相关资源大列表
专知
11+阅读 · 2019年7月18日
Transformer-XL:释放注意力模型的潜力
谷歌开发者
31+阅读 · 2019年2月19日
WebAssembly在QQ邮箱中的一次实践
IMWeb前端社区
13+阅读 · 2018年12月19日
在Python中使用SpaCy进行文本分类
专知
24+阅读 · 2018年5月8日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
一文读懂FM算法优势,并用python实现!(附代码)
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
14+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员