Cuckoo hashing [4] is a multiple choice hashing scheme in which each item can be placed in multiple locations, and collisions are resolved by moving items to their alternative locations. In the classical implementation of two-way cuckoo hashing, the memory is partitioned into contiguous disjoint fixed-size buckets. Each item is hashed to two buckets, and may be stored in any of the positions within those buckets. Ref. [2] analyzed a variation in which the buckets are contiguous and overlap. However, many systems retrieve data from secondary storage in same-size blocks called pages. Fetching a page is a relatively expensive process; but once a page is fetched, its contents can be accessed orders of magnitude faster. We utilize this property of memory retrieval, presenting a variant of cuckoo hashing incorporating the following constraint: each bucket must be fully contained in a single page, but buckets are not necessarily contiguous. Empirical results show that this modification increases memory utilization and decreases the number of iterations required to insert an item. If each item is hashed to two buckets of capacity two, the page size is 8, and each bucket is fully contained in a single page, the memory utilization equals 89.71% in the classical contiguous disjoint bucket variant, 93.78% in the contiguous overlapping bucket variant, and increases to 97.46% in our new non-contiguous bucket variant. When the memory utilization is 92% and we use breadth first search to look for a vacant position, the number of iterations required to insert a new item is dramatically reduced from 545 in the contiguous overlapping buckets variant to 52 in our new non-contiguous bucket variant. In addition to the empirical results, we present a theoretical lower bound on the memory utilization of our variation as a function of the page size.
De-amortized Cuckoo Hashing: Provable Worst-Case Performance and Experimental Results
Cuckoo hashing是一个非常实用的动态字典:它提供了摊销常数插入时间,最坏情况下的常数删除时间和查找时间,以及良好的内存利用率。然而,在插入n个元素的过程中,有一个明显的概率,一些插入需要Ω(log n)时间。尽管这种分期保证可能适用于某些应用,但在其他应用(例如高性能路由)中,这是非常不可取的。最近,Kirsch和Mitzenmacher(Allerton '07)提出了一种使用各种保留其吸引人的特性的加密技术的cuckoo hashing的去摊销。Kirsch和Mitzenmacher通过实验结果证明了对布谷鸟散列的最坏情况性能的显着改善,但他们留下了构建具有可证明属性的方案的问题。在这项工作中,我们遵循Kirsch和Mitzenmacher,并提出了一个去摊销的布谷鸟散列,可证明保证恒定的最坏情况下的操作。具体地,对于多项式多个操作的任何序列,在初始化阶段的随机性上具有压倒性的概率,每个操作在恒定时间内执行。我们的理论分析和实验结果表明,该计划是非常有效的,并提供了一个实际的替代方案,只有其他已知的动态字典与这种最坏的情况下的保证,由于Dietzfelbinger和Meyer auf der Heide(ICALP '90)。
Maximum Bipartite Matching Size And Application to Cuckoo Hashing
Cuckoo hashing with a stash是一种具有高内存利用率的健壮的多选择散列方案,可用于许多网络设备应用程序。不幸的是,对于超过0.5的内存负载,对其性能知之甚少。在本文中,我们分析其平均性能在这样的负载。我们解决这个问题,通过重铸的问题作为一个给定的随机二分图的预期最大匹配大小的分析。我们提供任何有限系统的精确结果,并推导出渐近结果的内存大小的增加。我们进一步考虑这个问题的其他变体,并最终评估我们的模型在互联网骨干网上的表现。更一般地说,我们的结果给出了一个严格的下限的大小所需的任何多项选择哈希方案的隐藏。
A Faster Algorithm for Cuckoo Insertion and Bipartite Matching in Large Graphs
哈希表在计算机科学中无处不在,用于有效地访问大型数据集。然而,总是需要提供紧凑的存储器利用率而不显著降低查找性能的方法。Cuckoo hashing是一种创建哈希表的有效技术,具有高空间利用率,并提供有保证的恒定访问时间。我们将获得$n$位置和$m$项。每个项目必须放置在由$k$随机哈希函数选择的$k\ge2$位置之一。通过允许单个项目有多个选择,布谷鸟哈希类似于多选择分配方案。此外,它还支持在可能的位置中动态更改项目的位置。我们提出并分析了一种在\emph{linear time}中以高概率和期望运行的布谷鸟哈希插入算法。以前的工作总分配时间分析广度优先搜索,它被证明是线性的,只有在\emph{expectation}。我们的算法发现一个分配(概率为1),只要它存在。相比之下,另一种已知的插入方法,称为\emph{random walk insertion},即使对于可解实例也可以无限地运行。我们还提出了实验结果比较我们的算法与随机游走方法的性能,也为情况下,每个位置可以容纳一个以上的项目。作为推论,我们得到了在一类特殊的稀疏随机二部图中寻找完美匹配的线性时间算法(具有高概率和期望)。我们支持这一点,通过在现实世界的大型数据集上进行实验,在一般的大型二分图中找到最大匹配。我们报告了一个数量级的改善,在运行时间相比,\emph{Hopkraft-Karp}匹配算法。
哈希表是字典数据结构的一个普遍存在的类别。然而,标准的哈希表实现不能很好地转换到外部内存模型中,因为它们没有包含插入的局部性。Iacono和Patracsu为外部哈希表建立了一个更新/查询权衡曲线:在$O(λ/B)$分期IO中执行插入的哈希表需要$Ω(\log_λN)$预期的IO用于查询,其中$N$是可以存储在数据结构中的项目的数量,$B$是内存传输的大小,$M$是内存的大小,$λ$是一个调优参数。它们为$λ$提供了一种满足该曲线的散列数据结构,即$Ω(\log\log M + \log_M N)$。他们的数据结构,我们称之为\defn{IP hash table},是复杂的,据我们所知,还没有实现。在本文中,我们提出了一个新的和更简单的最佳外部存储器哈希表,\defn{Bundle of Arrays Hash Table}(BOA)。BOA基于大小分层的LSM,这是一种经过充分研究的数据结构,并且几乎同样容易实现。BOA最适用于较窄范围的$λ$。然而,BOA的简单性允许它们容易地被修改以实现以下结果:\begin{itemize} \item A new external memory data structure, the \defn{Bundle of Trees Hash Table} (BOT), that matches the performance of the …