首页> 外文期刊>Information Systems >Practical perfect hashing in nearly optimal space
【24h】

Practical perfect hashing in nearly optimal space

机译:在接近最佳空间的实用完美哈希

获取原文
获取原文并翻译 | 示例
       

摘要

A hash function is a mapping from a key universe U to a range of integers, i.e.,h : U_→ {0,1.....m-1}, where m is the range's size. A perfect hash function for some set S is contained in U is a hash function that is one-to-one on S, where m ≥ ∣S∣. A minimal perfect hash function for some set S?U is a perfect hash function with a range of minimum size, i.e., m = ∣S∣. This paper presents a construction for (minimal) perfect hash functions that combines theoretical analysis, practical performance, expected linear construction time and nearly optimal space consumption for the data structure. For n keys and m=n the space consumption ranges from 2.62n + o(n) to 3.3n+o(n) bits, and for m = 1.23n it ranges from 1.95n + o(n) to 2.7n+o(n) bits. This is within a small constant factor from the theoretical lower bounds of 1.44n bits for m=n and 0.89n bits for m = 1.23n. We combine several theoretical results into a practical solution that has turned perfect hashing into a very compact data structure to solve the membership problem when the key set S is static and known in advance. By taking into account the memory hierarchy we can construct (minimal) perfect hash functions for over a billion keys in 46 min using a commodity PC. An open source implementation of the algorithms is available at under the GNU Lesser General Public License (LGPL).
机译:哈希函数是从键Universe U到整数范围的映射,即,h:U_→{0,1 ..... m-1},其中m是范围的大小。 U中包含某个集合S的理想散列函数是在S上一对一的散列函数,其中m≥S∣。某个集合S?U的最小完美散列函数是具有最小大小范围的完美散列函数,即m = perfectS∣。本文提出了一种(最小)完美哈希函数的构造,该构造结合了理论分析,实际性能,预期的线性构造时间以及数据结构几乎最佳的空间消耗。对于n个键和m = n,空间消耗范围为2.62n + o(n)至3.3n + o(n)位;对于m = 1.23n,它的范围为1.95n + o(n)至2.7n + o (n)个位。这对于m = n的理论下限为1.44n位,对于m = 1.23n的理论下限为0.89n,在一个小的常数因子之内。我们将几个理论结果组合成一个实际的解决方案,该解决方案已将完美的哈希转换为非常紧凑的数据结构,以解决键集S为静态且事先已知时的成员资格问题。通过考虑内存层次结构,我们可以使用商用PC在46分钟内为十亿个键构建(最小)完美的哈希函数。该算法的开源实现可从GNU较小通用公共许可证(LGPL)获得。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号