Questions tagged [balls-in-bins]

For problems on the distribution of $m$ distinct or identical balls into $n$ distinct or identical bins, optionally with restrictions.

The balls in bins or balls and bins problem is one of the basic problems of computer science, with wide-ranging applications including hashing and load balancing. It asks: if $m$ balls are thrown at random into $n$ bins, then:

  • What is the probability that there is a bin with at least two balls?
  • What is the expected fraction of the bins that are nonempty?
  • What is the expected number of balls per nonempty bin?
  • What is the expected number of bins with more than one ball?

and so forth.

619 questions
5
votes
2 answers

Expected number of empty bins with clumpy balls?

I have $b$ bins and a reservoir of $n$ balls. The balls have a tendency to "clump", that is, when I try to grab one from the reservoir, the number of balls removed is uniformly random on $[1, m]$, where $m$ is the number of balls remaining in the…
Tommy
  • 53
2
votes
0 answers

Infinite process balls in bins problem

Given $n$ balls and $m$ bins, let us consider an infinite process, where in each time slot we throw a ball at a random bin. When all $n$ balls are thrown, we take the balls from the bin with the maximum load, and throw them to random bins until all…
1
vote
0 answers

The probability of two balls going into the same bin

Suppose I have n bins and n balls with label on them. What would be the probability that I throw the i th ball into the same bin as the j th ball? Is it just 1/n because there is a probability of 1/n for the i th ball to fall into the same bin as…
1
vote
2 answers

Probability that all bins have at least one black ball?

Say I have T balls, B of them black and T-B of them white. I have N bins, each with a maximum capacity of T/N (that is, when the balls are all placed into the bins, all bins have the same number of balls, so assume T is always exactly divisible by…
Tom G
  • 43
1
vote
1 answer

Balls, Bags and Bins

We have 100 bags which contains finite number of colored balls. None of them are empty. We gonna put them into "k" boxes. What is the minimum value of "k" which no matter how the contents of bags are arranged the bags can be distributed into k boxes…
Cashews
  • 13
1
vote
1 answer

Balls into Bins problem

So I am having a problem trying to solve the following question. Lets say with have $x\times n$ balls, where $x$ is a values in range $0 < x \leq 1$ and we have $n$ bins. I'm trying to figure out what the expected number of bins containing at least…
0
votes
1 answer

Expected number in b bins with max k balls each, balls in bins question

Suppose we have b bins and each bin could have max k balls. We have sufficient balls and what is the expected number if we need to full all bins? I know the answer when k = 1, the expected number is b * (lnb -1). But what the expected number when…
DingLi
  • 3
0
votes
0 answers

Approximation to infinity number of balls thrown to bins, until one bin is full

Suppose that there are $n$ bins, each have capacity $C$. What is the expected number of balls can be thrown until one is full? This question is asked and answered here, but I am interested for an approximation given that $C$ is very large (approx…
0
votes
0 answers

What is the expected number of balls that fall into the first bin when m balls are distributed into n bins uniformly at random?

I have a problem from the "discrete mathematics and its applications" textbook. What is the expected number of balls that fall into the first bin when m balls are distributed into n bins uniformly at random? This is my current attempt: Let X be a…
0
votes
1 answer

Expected number of collisions when throwing colored balls into bins

Assume $b$ black balls and $w$ white balls. Throw them randomly and uniformly into $m$ bins. What is the expected number of collisions between black and white balls: (a) in each bin, (b) in all bins. thanks
0
votes
1 answer

Balls into bins, each bin may contain at most two balls

I have $n$ bins such that each bin may contain at most $2$ balls. we start inserting $k$ balls into the bins, by choosing randomly for each ball the bin to which it will be inserted. what is the probability that some designated bin of a ball will be…
0
votes
1 answer

Expected number of boxes with a blue ball

Suppose $N$ blue balls, $N$ red balls and $N$ yellow balls are placed in $N$ boxes such that each box has $3$ balls. What is the expected number of boxes with a blue ball? I know it's going to involve an indicator function, but ...
Pat
  • 25
0
votes
1 answer

Balls and Bins not randomly

I'm trying to solve a problem similar to this one, I understand the answers of that problem, but my problem is Suppose N bins that are ordered and labeled from 0 to N-1. How many bins in mean do I need to choose, to fill each of the $N$ bins with…
user46060
-1
votes
1 answer

Expected number of tries to fit balls in all $N$ slots

I have $N$ slots and I start throwing balls into a randomly picked slots. In each turn I throw a single ball into one of the slots. What is the expected number of throws in order to have all the $N$ slots having at least one ball? $K$ -…
Tomer
  • 434