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

小空间前缀快速搜索及其应用

Fast Prefix Search in Little Space, with Applications

Djamal Belazzougui, Paolo Boldi, Rasmus Pagh, Sebastiano Vigna

摘要:

在索引文献中已经表明,一方面前缀/范围搜索与另一方面前导/秩搜索之间存在本质区别,因为前者可证明允许更快的查询解析。传统上,前缀搜索是由数据结构解决的,这些数据结构也是字典-它们实际上包含$S$中的字符串。对于存储在慢速访问内存中的非常大的集合,我们提出了更紧凑的数据结构,支持\emph{weak}前缀搜索-如果$S$中的\emph{some}字符串以给定的前缀开头,它们将返回匹配字符串的秩。事实上,我们表明,我们的空间效率最高的数据结构是渐近空间最优的。以前,数据结构,如字符串B树(和更复杂的高速缓存无关字符串数据结构)隐式地支持弱前缀查询,但它们的查询时间都随着字符串集合的大小而递增。相比之下,我们的数据结构很简单,自然具有高速缓存效率,并且查询时间仅取决于前缀的长度,对于适合一个机器字的字符串,一直到恒定的查询时间。我们给出了弱前缀搜索的几个应用,包括精确前缀计数和近似匹配合取前缀条件的元组计数。

英文摘要:

It has been shown in the indexing literature that there is an essential difference between prefix/range searches on the one hand, and predecessor/rank searches on the other hand, in that the former provably allows faster query resolution. Traditionally, prefix search is solved by data structures that are also dictionaries---they actually contain the strings in $S$. For very large collections stored in slow-access memory, we propose much more compact data structures that support \emph{weak} prefix searches---they return the ranks of matching strings provided that \emph{some} string in $S$ starts with the given prefix. In fact, we show that our most space-efficient data structure is asymptotically space-optimal. Previously, data structures such as String B-trees (and more complicated cache-oblivious string data structures) have implicitly supported weak prefix queries, but they all have query time that grows logarithmically with the size of the string collection. In contrast, our data structures are simple, naturally cache-efficient, and have query time that depends only on the length of the prefix, all the way down to constant query time for strings that fit in one machine word. We give several applications of weak prefix searches, including exact prefix counting and approximate counting of tuples matching conjunctive prefix conditions.

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

↑