The Annals of Applied Probability

Choice-memory tradeoff in allocations

Noga Alon, Ori Gurel-Gurevich, and Eyal Lubetzky

Full-text: Open access


In the classical balls-and-bins paradigm, where n balls are placed independently and uniformly in n bins, typically the number of bins with at least two balls in them is Θ(n) and the maximum number of balls in a bin is Θ(log n / log log n). It is well known that when each round offers k independent uniform options for bins, it is possible to typically achieve a constant maximal load if and only if k = Ω(log n). Moreover, it is possible w.h.p. to avoid any collisions between n / 2 balls if k > log2n.

In this work, we extend this into the setting where only m bits of memory are available. We establish a tradeoff between the number of choices k and the memory m, dictated by the quantity km / n. Roughly put, we show that for km ≫ n one can achieve a constant maximal load, while for km ≪ n no substantial improvement can be gained over the case k = 1 (i.e., a random allocation).

For any k = Ω(log n) and m = Ω(log2n), one can achieve a constant load w.h.p. if km = Ω(n), yet the load is unbounded if km = o(n). Similarly, if km > Cn then n / 2 balls can be allocated without any collisions w.h.p., whereas for km < ɛn there are typically Ω(n) collisions. Furthermore, we show that the load is w.h.p. at least log(n/m) / (log k+log log(n / m)). In particular, for k ≤ polylog (n), if m = n1−δ the optimal maximal load is Θ(log n / log log n) (the same as in the case k = 1), while m = 2n suffices to ensure a constant load. Finally, we analyze nonadaptive allocation algorithms and give tight upper and lower bounds for their performance.

Article information

Ann. Appl. Probab., Volume 20, Number 4 (2010), 1470-1511.

First available in Project Euclid: 20 July 2010

Permanent link to this document

Digital Object Identifier

Mathematical Reviews number (MathSciNet)

Zentralblatt MATH identifier

Primary: 60C05: Combinatorial probability 60G50: Sums of independent random variables; random walks 68Q25: Analysis of algorithms and problem complexity [See also 68W40]

Space/performance tradeoffs balls and bins paradigm lower bounds on memory balanced allocations online perfect matching


Alon, Noga; Gurel-Gurevich, Ori; Lubetzky, Eyal. Choice-memory tradeoff in allocations. Ann. Appl. Probab. 20 (2010), no. 4, 1470--1511. doi:10.1214/09-AAP656.

Export citation


  • [1] Ajtai, M. (2002). Determinism versus nondeterminism for linear time RAMs with memory restrictions. J. Comput. System Sci. 65 2–37.
  • [2] Alon, N. and Spencer, J. H. (2008). The Probabilistic Method, 3rd ed. Wiley, Hoboken, NJ.
  • [3] Azar, Y., Broder, A. Z., Karlin, A. R. and Upfal, E. (1999). Balanced allocations. SIAM J. Comput. 29 180–200 (electronic).
  • [4] Beame, P. (1991). A general sequential time–space tradeoff for finding unique elements. SIAM J. Comput. 20 270–277.
  • [5] Beame, P., Jayram, T. S. and Saks, M. (2001). Time–space tradeoffs for branching programs. J. Comput. System Sci. 63 542–572.
  • [6] Beame, P., Saks, M., Sun, X. and Vee, E. (2003). Time–space trade-off lower bounds for randomized computation of decision problems. J. ACM 50 154–195 (electronic).
  • [7] Benjamini, I. and Makarychev, Y. (2009). Balanced allocation: Memory performance trade-offs. Preprint. Available at arXiv:0901.1155v1.
  • [8] Borodin, A. and Cook, S. (1982). A time–space tradeoff for sorting on a general sequential model of computation. SIAM J. Comput. 11 287–297.
  • [9] Borodin, A., Fich, F., Meyer auf der Heide, F., Upfal, E. and Wigderson, A. (1987). A time–space tradeoff for element distinctness. SIAM J. Comput. 16 97–99.
  • [10] Burkholder, D. L. (1988). Sharp inequalities for martingales and stochastic integrals. Astérisque 157–158 75–94.
  • [11] Feller, W. (1968). An Introduction to Probability Theory and Its Applications I, 3rd ed. Wiley, New York.
  • [12] Fortnow, L. (1997). Nondeterministic polynomial time versus nondeterministic logarithmic space: Time–space tradeoffs for satisfiability. In Twelfth Annual IEEE Conference on Computational Complexity (Ulm, 1997) 52–60. IEEE Computer Society, Los Alamitos, CA.
  • [13] Fortnow, L., Lipton, R., van Melkebeek, D. and Viglas, A. (2005). Time–space lower bounds for satisfiability. J. ACM 52 835–865 (electronic).
  • [14] Freedman, D. A. (1975). On tail probabilities for martingales. Ann. Probab. 3 100–118.
  • [15] Gonnet, G. H. (1981). Expected length of the longest probe sequence in hash code searching. J. Assoc. Comput. Mach. 28 289–304.
  • [16] Grimmett, G. (1999). Percolation, 2nd ed. Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences] 321. Springer, Berlin.
  • [17] Johnson, N. L. and Kotz, S. (1977). Urn Models and Their Application. Wiley, New York.
  • [18] Karp, R. M., Vazirani, U. V. and Vazirani, V. V. (1990). An optimal algorithm for on-line bipartite matching. In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing (Baltimore, MD, 1990) 352–358. ACM, New York.
  • [19] McDiarmid, C. (1998). Concentration. In Probabilistic Methods for Algorithmic Discrete Mathematics. Algorithms and Combinatorics 16 195–248. Springer, Berlin.
  • [20] Mitzenmacher, M., Prabhakar, B. and Shah, D. (2002). Load balancing with memory. In Proceedings of the 43rd Annual IEEE Symposium on Foundations of Computer Science 799–808. IEEE Computer Society, Los Alamitos, CA.
  • [21] Mitzenmacher, M., Richa, A. W. and Sitaraman, R. (2001). The power of two random choices: A survey of techniques and results. In Handbook of Randomized Computing I, II. Combinatorial Optimization 9 255–312. Kluwer Academic, Dordrecht.
  • [22] Mitzenmacher, M. and Upfal, E. (2005). Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge Univ. Press, Cambridge.
  • [23] Steiger, W. L. (1969). A best possible Kolmogoroff-type inequality for martingales and a characteristic property. Ann. Math. Statist. 40 764–769.