There are 30 balls as follows:
How many ways are there to divide these balls into 2 boxes A and B such that each box contains 15 balls?
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.
That's a very nice way to think about it! I completely missed this simple approach.
can you explain it through any example except this question ??
Log in to reply
This method works as long as at least half of the balls are the same color. Let's take a simpler example: 1 0 red balls and 2 0 black balls distributed in two boxes equally ( 1 5 balls each, but of whatever color).
Throw away the black balls. We now only have 1 0 red balls. But each box can carry 1 5 balls, so we don't have to worry about hitting our limit. So we can put the red balls in whatever fashion we like.
After this, we take back the black balls. We need to have each box to be 1 5 balls, so we simply fill in the black balls appropriately. For example, if we have put 7 red balls in the first box and 3 in the second, in order to get two equal boxes, we need to put 8 black balls in the first box and 1 2 black balls in the second box.
So now we can ignore the black box and the equal-division condition. We now need to put 1 0 red balls into two boxes. There are 1 1 ways to do so: put some amount of red balls into the first box, some of 0 , 1 , 2 , … , 1 0 , and the rest will go to the second box.
Similar reasoning applies here.
Is there any other way to solve this question? (Let say the number of white and black balls exceed half the total number of balls)
The question can be solved using generating functions without painstaking calculations . We can associate the generating functions A x = 1 + x + . . . + x 5 = x − 1 x 6 − 1 B x = 1 + x + . . . + x 1 0 = x − 1 x 1 1 − 1 C x = 1 + x + . . . + x 1 5 = x − 1 x 1 6 − 1 to the sets of balls. Solving the question comes down to finding the coefficient of x 1 5 since deciding the configuration of box A determines box B's one (there are only 30 balls).
We will write the product A x B x C x = ( x − 1 ) 3 ( x 1 6 − 1 ) ( x 1 1 − 1 ) ( x 6 − 1 ) in a nicer way. Multiplying out the numerator gives x 1 1 + x 6 − 1 , ignoring the terms of degree higher than 1 5 . The denominator can be written as ( 1 − x ) − 3 = k = 0 ∑ ∞ ( k 3 + k − 1 ) ⋅ ( − 1 ) k ⋅ ( − x ) k = ( 2 2 ) + ( 2 3 ) x + ( 2 4 ) x 2 + ⋯ + ( 2 1 5 + 2 ) x 1 5 + ⋯ . Since this has to be multiplied by x 1 1 + x 6 − 1 , we are only concerned with 1 5 x 4 + 5 5 x 9 + 1 3 6 x 1 5 : taking the product of those two the term of degree 1 5 coefficient's is ∣ 1 5 + 5 5 − 1 3 6 ∣ = 6 6 .
Note: expressing ( 1 − x ) − 3 as a power series is particularly nice since ( 2 n ) is the n − t h triangular number, so you just have to keep summing n + 1 to the coefficient of the previous term while writing it out: ( 1 − x ) − 3 = 1 + 3 x + 6 x 2 + 1 0 x 3 + 1 5 x 4 + 2 1 x 5 + … .
Here we can also use generating functions , we can write the equation as................................................................ (x^0+x^1+...+x^5) (x^0+x^1+...+x^10) (x^0+x^1+...+x^15) Solving this (1-x^6) (1-x^11) (1-x^16) (1-x)^-3 ... From this we can get the coefficient of x^15 to get the answer which is 66. This solution requires knowledge of Generating functions for Combinatorics which it is simple yet powerful.
Using stars and bars method: w + b + r = 1 5
In total 1 7 C 2 = 1 3 6 ways to arrange them
We need to remove cases which have either w > = 6 or b > = 1 1 or r > = 1 6 .
Using PIE, for the above, you get total number of invalid combinations as 1 1 C 2 + 6 C 2 = 7 0 .
Thus, final answer = 6 6
Problem Loading...
Note Loading...
Set Loading...
Distribute the white balls and the black balls in any fashion. Since they add up to 1 5 balls, it's impossible for a box to be overfilled, and hence every arrangement of them is valid. The red balls fill in the rest, completing each box to 1 5 balls each.
Now, there are 6 ways to distribute the white balls (one way for each of 0 , 1 , 2 , … , 5 balls in box A), and similarly 1 1 ways to distribute the black balls (one way for each of 0 , 1 , 2 , … , 1 0 balls in box A), so in total there are 6 ⋅ 1 1 = 6 6 ways to distribute the balls.