Monday, February 9, 2009

A Distribution Problem

A Question sent to me by my dear friend

1. Six white and six black balls of the same size are distributed among ten urns so that there is at least one ball in each urn.
What is the number of different distributions of the balls?

The solution in short is

2*10C6 - (10C6 * 6C2) + (10C6* 10C1)*2+ (10C5*5C1)*5C1=18900-3150+4200+6300
=26250

The details are as following

First of all note this very follwoing important point.

Whenever I distribute the balls
Every case I consider should be completely disjoint
That is my cases should never oeverlap
It will get clearer as I proceed


Supposing I label the 10 urns as 1,2,3,4,5,6,7,8,9,10.
Observation one : Urns are distinguishable

I have 6 red and 6 black balls

Observation two : 6 blacks are not distinguishable among themselves
6 whites are not ditinguishable among themselves

The aim is to distribute the balls so as each distibution which
we count has to be different in some sense
1) Each Urn has a different number of balls
2) if the urn has same number of balls, for each urn in two different distributions , then colour of a ball must be different for at least one urn

Say number of balls in a distribution D1 and D2 urn
is such that 1,2,3,4,5,6,7,8,9,10 have exactly equal number of balls then
at least one of the urns must have ball of different colour
only then I can call D1 and D2 as different and count them.

Let us proceed

Supposing I distribute this way

Case 1

I choose ANY 6 urns then I fill them with black balls.
I get 6 filled and 4 empty
I fill the 4 remaining empty urns with 4 RED balls
So I have 2 RED balls left
I choose any 2 of the 10 urns each having a single red or black ball and place the remaining 2 red balls
I get for this
10C6 that is choosing 6 urns out of 10
4 urns are always empty I need not choose them.
But the 2 urns for remaining 2 Red Balls can be chosen in 10C2 ways
So I get for whole process
10C6*10C2
Now I started out with balck balls
What if I started out with RED balls.
I proceed identically and choose 6 urns for RED and then distribute the rest of 2 blacks among any 2 of 10 urns.
So I get 2* (10C6*10C2) for red and balck for 6 and 2 kind of distribution
But wait
Supposing I distributed 6 red in urns 1,2,3,4,5,6
And 4 blacks in 7,8,9,10
I have 2 blacks supposing I put them in urns 5,6
problem is that this kind of distribution was possible from other way around as well that is
I distribute 6 Black balls in urns 5,6,7,8,9,10
4 reds in 1,2,3,4 and remaining 2 reds I put in 5,6
There's a double counting I need to elimiante
the problem only occurs if I put remaining last two balls in urns containing ball of a different colour.
So I subtract
10C6*6C2 to eliminate double counting
because after I put 4 balls in urns of a particular colour the last two balls can be put in urn containing balls of different colur in 6C2 ways



Case 2

I put 6 red balls in any 6 urns
then 4 black in remaining 4 empty urns
and remining 2 black balls together in any of the 10 urns having 1 ball of any colour

this can be done in 10C6*10C1 ways
And since I can start with black instead of red I multiply by 2
to get
(10C6* 10C1)*2

there will be no double counting you can convince yourself.


Case 3

I choose 5 red balls and put them in any urns
Then I choose 5 black balls and put them in rest of 5 empty urns
Then I choose 1 remaining red ball and place it in urn having red ball
Then I choose 1 remaining black ball and place it in urn having black ball
that is red goes to red and black goes to black

5 black can be chosen 10C5 ways
rest 5 are automatically chosen I don't need to choose again for red
the one remaining black can be put in any of 5 urns containg black in 5C1 ways
and 1 remaing red can be put in any urn contain red in 5C1 ways

I get in total (10C5*5C1)*5C1


Finally

I add all of them
The point is that all of the distributions in Case 1,2,3 should be totally exclusive to any other
There cannot be way that a distribution belonging to Case 1 can be found in Case 2 or Case 3
Second point is case 1,2,3 exhaust all possible scenarios
There's no distribution possible which does not belong to any one of the cases
These two points should crack most of the tough problems
The difficult part is forming the cases.

1 comment:

Meera said...

Hi I'm not sure if you will read this. But i want to thank you for such a detailed explanation. There's li'l doubt in Ist case where you have subtracted 10C6*6C2 cases due to doubt counting. May i request you to explain it. It will be very helpful. thanks.