English

The Power of Two Choices with Simple Tabulation

Data Structures and Algorithms 2016-01-26 v3

Abstract

The power of two choices is a classic paradigm for load balancing when assigning mm balls to nn bins. When placing a ball, we pick two bins according to two hash functions h0h_0 and h1h_1, and place the ball in the least loaded bin. Assuming fully random hash functions, when m=O(n)m=O(n), Azar et al.~[STOC'94] proved that the maximum load is lglgn+O(1)\lg \lg n + O(1) with high probability. In this paper, we investigate the power of two choices when the hash functions h0h_0 and h1h_1 are implemented with simple tabulation, which is a very efficient hash function evaluated in constant time. Following their analysis of Cuckoo hashing [J.ACM'12], P\v{a}tra\c{s}cu and Thorup claimed that the expected maximum load with simple tabulation is O(lglgn)O(\lg\lg n). This did not include any high probability guarantee, so the load balancing was not yet to be trusted. Here, we show that with simple tabulation, the maximum load is O(lglgn)O(\lg\lg n) with high probability, giving the first constant time hash function with this guarantee. We also give a concrete example where, unlike with fully random hashing, the maximum load is not bounded by lglgn+O(1)\lg \lg n + O(1), or even (1+o(1))lglgn(1+o(1))\lg \lg n with high probability. Finally, we show that the expected maximum load is lglgn+O(1)\lg \lg n + O(1), just like with fully random hashing.

Keywords

Cite

@article{arxiv.1407.6846,
  title  = {The Power of Two Choices with Simple Tabulation},
  author = {Søren Dahlgaard and Mathias Bæk Tejs Knudsen and Eva Rotenberg and Mikkel Thorup},
  journal= {arXiv preprint arXiv:1407.6846},
  year   = {2016}
}

Comments

SODA'16