Balanced allocation and dictionaries with tightly packed constant size bins

We study an aspect of the balanced allocation paradigm (also known as the “two-choices paradigm”). Assume there are n balls and m =(1+e) n /d bins of capacity d each, for a fixed d≥1. To each of the balls two possible bins are assigned at random. We show that e> (2/e)d−−1 is sufficient to guarantee that with high probability each ball can be put into one of the two bins assigned to it, without any bin overflowing. Further, it takes constant time on average for changing the arrangement to accommodate a new ball, if e>γ·βd, for some constants γ>0, β 0, we obtain an implementation of a dynamic dictionary that accommodates n keys in m =(1+e)n /d buckets of size d = O(log(1/e)). For a lookup operation only two hash functions have to be evaluated and two contiguous segments of d memory cells have to be inspected. The expected time for inserting a new key is constant.

[1]  Reinhard Diestel,et al.  Graph Theory , 1997 .

[2]  Eli Upfal,et al.  Balanced Allocations , 1999, SIAM J. Comput..

[3]  Peter Sanders,et al.  Reconciling simplicity and realism in parallel disk models , 2001, SODA '01.

[4]  Alan Siegel,et al.  On universal classes of fast high performance hash functions, their time-space tradeoff, and their applications , 1989, 30th Annual Symposium on Foundations of Computer Science.

[5]  Peter Sanders Fast Priority Queues for Cached Memory , 1999, ALENEX.

[6]  Peter Sanders,et al.  Fast Concurrent Access to Parallel Disks , 2000, SODA '00.

[7]  Friedhelm Meyer auf der Heide,et al.  Dynamic Hashing in Real Time , 1992, Informatik.

[8]  Berthold Vöcking,et al.  Balanced allocations: the heavily loaded case , 2000, STOC '00.

[9]  Christian Scheideler,et al.  Perfectly Balanced Allocation , 2003, RANDOM-APPROX.

[10]  Martin Dietzfelbinger,et al.  Almost random graphs with simple hash functions , 2003, STOC '03.

[11]  Rina Panigrahy,et al.  Efficient hashing with lookups in two memory accesses , 2004, SODA '05.

[12]  Torben Hagerup,et al.  A Guided Tour of Chernoff Bounds , 1990, Inf. Process. Lett..

[13]  Peter Sanders Algorithms for Scalable Storage Servers , 2004, SOFSEM.

[14]  Alan M. Frieze,et al.  Random graphs , 2006, SODA '06.

[15]  Friedhelm Meyer auf der Heide,et al.  Efficient PRAM simulation on a distributed memory machine , 1992, STOC '92.

[16]  Friedhelm Meyer auf der Heide,et al.  Contention Resolution in Hashing Based Shared Memory Simulations , 2000, SIAM J. Comput..

[17]  Martin Dietzfelbinger,et al.  Balanced allocation and dictionaries with tightly packed constant size bins , 2007, Theor. Comput. Sci..

[18]  Rajeev Motwani,et al.  Randomized Algorithms , 1995, SIGA.

[19]  Paul G. Spirakis,et al.  Space Efficient Hash Tables with Worst Case Constant Access Time , 2003, STACS.

[20]  Richard M. Karp,et al.  Random Graphs, Random Walks, Differential Equations and the Probabilistic Analysis of Algorithms , 1998, Symposium on Theoretical Aspects of Computer Science.

[21]  Rajeev Motwani,et al.  Average-case analysis of algorithms for matchings and related problems , 1994, JACM.

[22]  Alan Siegel,et al.  On Universal Classes of Extremely Random Constant-Time Hash Functions , 1995, SIAM J. Comput..

[23]  J. van Leeuwen,et al.  Theoretical Computer Science , 2003, Lecture Notes in Computer Science.

[24]  Anna Pagh,et al.  Uniform hashing in constant time and linear space , 2003, STOC '03.

[25]  Ramesh K. Sitaraman,et al.  The power of two random choices: a survey of tech-niques and results , 2001 .

[26]  V. Rich Personal communication , 1989, Nature.

[27]  Rasmus Pagh,et al.  Cuckoo Hashing , 2001, Encyclopedia of Algorithms.

[28]  R.M. Karp, M. Luby, F. Meyer auf der Hei Efficient PRAM simulation on a distributed memory machine , 1996 .

[29]  Charles E. Leiserson,et al.  Cache-Oblivious Algorithms , 2003, CIAC.