PTHash:再谈FCH最小完美哈希
PTHash: Revisiting FCH Minimal Perfect Hashing
摘要:
给定$n$不同键的集合$S$,将$S$的键双射映射到范围$\{0,\ldots,n-1\}$中的函数$f$被称为$S$的最小完美散列函数。当$n$很大并且保持恒定的计算时间时,找到这样的函数的算法具有实际意义;例如,搜索引擎和数据库通常使用最小完美散列函数来快速地将标识符分配给可变长度键(例如字符串)的静态集合。挑战是设计一种算法,这是有效的,在三个不同的方面:时间找到$f$(建设时间),时间评估$f$上的关键$S$(查找时间),和空间的$f$的表示。已经提出了几种算法来权衡这些方面。1992年,Fox,Chen,and Heath(FCH)在SIGIR上提出了一种算法,提供了非常快速的查找评估。然而,这种方法很少受到关注,因为与其他后续技术相比,它的施工时间长,占用空间大。大约30年后,我们重新审视了他们的框架,并提出了一种改进的算法,该算法可以很好地扩展到大型集合,并完全减少了空间消耗,而不会影响查找时间。我们进行了广泛的实验评估,并表明该算法发现的功能,在空间上具有竞争力的最先进的技术,并提供$2-4\times$更好的查找时间。
英文摘要:
Given a set $S$ of $n$ distinct keys, a function $f$ that bijectively maps the keys of $S$ into the range $\{0,\ldots,n-1\}$ is called a minimal perfect hash function for $S$. Algorithms that find such functions when $n$ is large and retain constant evaluation time are of practical interest; for instance, search engines and databases typically use minimal perfect hash functions to quickly assign identifiers to static sets of variable-length keys such as strings. The challenge is to design an algorithm which is efficient in three different aspects: time to find $f$ (construction time), time to evaluate $f$ on a key of $S$ (lookup time), and space of representation for $f$. Several algorithms have been proposed to trade-off between these aspects. In 1992, Fox, Chen, and Heath (FCH) presented an algorithm at SIGIR providing very fast lookup evaluation. However, the approach received little attention because of its large construction time and higher space consumption compared to other subsequent techniques. Almost thirty years later we revisit their framework and present an improved algorithm that scales well to large sets and reduces space consumption altogether, without compromising the lookup time. We conduct an extensive experimental assessment and show that the algorithm finds functions that are competitive in space with state-of-the art techniques and provide $2-4\times$ better lookup time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。