当前位置: X-MOL 学术Theor. Comput. Sci. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Compressed range minimum queries
Theoretical Computer Science ( IF 1.1 ) Pub Date : 2019-07-05 , DOI: 10.1016/j.tcs.2019.07.002
Paweł Gawrychowski , Seungbum Jo , Shay Mozes , Oren Weimann

Given a string S of n integers in [0,σ), a range minimum query RMQ(i,j) asks for the index of the smallest integer in S[ij]. It is well known that the problem can be solved with a succinct data structure of size 2n+o(n) and constant query-time. In this paper we show how to preprocess S into a compressed representation that allows fast range minimum queries. This allows for sublinear size data structures with logarithmic query time. The most natural approach is to use string compression and construct a data structure for answering range minimum queries directly on the compressed string. We investigate this approach in the context of grammar compression. We then consider an alternative approach. Instead of compressing S using string compression, we compress the Cartesian tree of S using tree compression. We show that this approach can be exponentially better than the former, is never worse by more than an O(σ) factor (i.e. for constant alphabets it is never asymptotically worse), and can in fact be worse by an Ω(σ) factor.



中文翻译:

压缩范围最小查询

给定一个由n个整数组成的字符串S[0σ,范围最小查询 RMQ一世Ĵ 要求输入最小整数的索引 小号[一世Ĵ]。众所周知,可以使用大小简洁的数据结构解决问题2ñ+Øñ和恒定的查询时间。在本文中,我们展示了如何将S预处理为压缩表示形式,以允许快速范围的最小查询。这允许具有对数查询时间的亚线性大小数据结构。最自然的方法是使用字符串压缩并构造一个数据结构,以直接在压缩的字符串上回答范围最小查询。我们在语法压缩的上下文中研究这种方法。然后,我们考虑另一种方法。代替使用字符串压缩来压缩S,我们使用树压缩来压缩S的笛卡尔树。我们表明,这种方法可以比前一种方法好几倍,并且绝不会比以前更差Øσ 因素(例如,对于恒定的字母,它永远不会渐近恶化),实际上可能会恶化 Ωσ 因子。

更新日期:2019-07-05
down
wechat
bug