Suppose we have 8 distinct containers and 8 indistinguishable balls. The balls are then distributed into the containers such that the distribution is uniform across all possible events. That is, each distribution ( a 1 , a 2 , a 3 , a 4 , a 5 , a 6 , a 7 , a 8 ) of balls, where a n is the number of indistinguishable balls in the n th container such that ∑ n = 1 8 a n = 8 , is equally likely to occur.
The expected number of containers that have at least one ball in them is b a , where a and b are positive coprime integers. Find a + b .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
An easier approach would be to use indicator variables, which is often my favorite approach to counting such "convoluted" variables that require something like a Principle of Inclusion and Exclusion counting argument.
Let
I
be the random variable of the number of urns that are filled.
Let
I
i
be the indicator variable that the ith urn is filled.
We have
I
=
∑
I
i
, and hence by the linearity of expectation,
E
(
I
)
=
∑
E
(
I
i
)
.
From stars and bars, we know that the ith urn is empty in
(
7
−
1
7
+
8
−
1
)
cases, out of a total of
(
8
−
1
8
+
8
−
1
)
cases.
Hence
E
(
I
i
)
=
1
−
(
7
1
5
)
(
6
1
4
)
=
1
5
8
.
Hence,
E
(
I
)
=
8
×
E
(
I
i
)
=
1
5
6
4
.
Log in to reply
Great method! I'm just wondering about the last two lines, though. Since I and I i track empty urns, would it not be that
E ( I i ) = 7 1 5 6 1 4 = 1 5 7
⟹ E ( I ) = 8 ∗ E ( I i ) = 1 5 5 6 .
Then the expected number of urns with at least one ball would be
8 − E ( I ) = 8 − 1 5 5 6 = 1 5 6 4 .
Log in to reply
Right. I changed my definition halfway (from empty to filled), but forgot to update it. I've made the corresponding edit.
Why is the probability that the i th urn is empty not ( 1 − 8 1 ) 8 ?
Log in to reply
Thanks. Those who previously answered 8 8 − 7 8 + 8 7 = 1 3 1 0 9 5 6 7 have been marked correct, due to the phrasing of the question.
@brian charlesworth In this question, the probability space is not defined clearly. I was looking at your solution and I saw that the distribution you used is "uniform across all possible events". This means that ( 8 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) is as equally likely to occur as ( 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ) .
However, if the balls were distributed randomly, then the latter event is 8 ! times more likely to occur. In this scenario, the probability that the ith urn is empty would be ( 8 7 ) 8 .
Can you clarify this in the question?
Log in to reply
@Calvin Lin – @Calvin Lin Sigh.... Darn. I've made this particular mistake more often than I'd care to admit. I've adjusted the wording to fit my solution and final answer. Hopefully this will clarify matters. I'm surprised that it took 304 views, 73 attempts and 25 solvers before this ambiguity was caught.
I'm sorry for the oversight. Hopefully I won't make the same mistake again, (probably wishful thinking, but ......).
Problem Loading...
Note Loading...
Set Loading...
To start with, we have that the total number of ways of distributing the balls into the containers is the same as the number of non-negative integer solutions to the equation a + b + c + d + e + f + g + h = 8 . This is a 'stars and bars' calculation with solution ( 8 1 5 ) = 6 4 3 5 .
(See here for a discussion on the 'stars and bars' method: link )
Next, we need to find the weighted average of the number of containers that end up containing at least one ball. To do this, we need to find the number of instances where k containers, for 1 ≤ k ≤ 8 , end up containing at least one ball.
As an example, suppose we are making the calculation for k = 3 . We first choose 3 containers in one of ( 3 8 ) ways. Without loss of generality let these be containers a , b and c . Then we are wanting to find the number of positive integer solutions to the equation a + b + c = 8 , which according to the aforementioned link has the solution ( 2 7 ) = 2 1 .
To then find the weighted average of the number of containers that end up containing at least one ball we determine
∑ k = 1 8 ( k ∗ ( k 8 ) ∗ ( k − 1 7 ) ) ,
and then divide this by ( 8 1 5 ) . Doing this, we end up with the fraction 6 4 3 5 2 7 4 5 6 = 1 5 6 4 , giving us a = 6 4 , b = 1 5 and thus a + b = 7 9 .