arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1706.06940cs.DS
收藏

更快的批量范围最小查询

Faster batched range minimum queries

Szymon Grabowski, Tomasz Kowalski

摘要:

范围最小查询(RMQ)是许多压缩数据结构和字符串匹配算法的重要组成部分。虽然这个问题在理论上基本上已经解决了,复杂的数据结构允许恒定时间查询,但在某些情况下,查询的数量$q$相当小,并且是预先给定的,这鼓励使用更简单的方法。Alzamel等人最近的一项工作是将输入数组收缩为一个更短的数组,其大小与$q$成比例。在这项工作中,我们建立在他们的解决方案上,将处理小批量查询的速度提高了3.8- 7.8倍(差距随着$q$的增加而增加)。帮助我们实现这一优势的关键思想是采用众所周知的稀疏表技术来处理块,并进行推测性的块最小值比较。我们还提出了一个更快(但可能使用更多空间)的变体,没有数组收缩。

英文摘要:

Range Minimum Query (RMQ) is an important building brick of many compressed data structures and string matching algorithms. Although this problem is essentially solved in theory, with sophisticated data structures allowing for constant time queries, there are scenarios in which the number of queries, $q$, is rather small and given beforehand, which encourages to use a simpler approach. A recent work by Alzamel et al. starts with contracting the input array to a much shorter one, with its size proportional to $q$. In this work, we build upon their solution, speeding up handling small batches of queries by a factor of 3.8--7.8 (the gap grows with $q$). The key idea that helped us achieve this advantage is adapting the well-known Sparse Table technique to work on blocks, with speculative block minima comparisons. We also propose an even much faster (but possibly using more space) variant without the array contraction.

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

↑