Consider there are \('n'\) different colors.
Consider there are \('y'\) balls of each color .
Total balls = \(ny \)
no of ways to draw 2 balls of same color = no of ways to draw 2 balls of first color + no of ways to draw 2 balls of second color + .... n times
= \(y (y-1) + y (y-1) + .... n times \)
=\( ny(y-1)\)
no of ways to draw any two balls = \(ny ( ny-1) \)
Probability ( to draw 2 balls of same color) = \(\frac{ny(y-1)}{ny ( ny-1) } = \frac{y-1}{ny-1}\) --------- (1)
Now , 20 balls are added.
Now , no of ways to draw 2 balls of same color = no of ways to draw 2 balls of first color + no of ways to draw 2 balls of second color + .... n times + no of ways to draw 2 balls of the NEW color
=\(ny(y-1) + 20(19)\)
no of ways to draw any two balls = \( (ny+20) ( ny+20 -1) \) = \( (ny+20) ( ny+19) \)
Probability ( to draw 2 balls of same color) = \(\frac{ny(y-1) + 20(19)}{ (ny+20) ( ny+19) } \) -------- (2)
Now given (1) = (2)
\(\frac{y-1}{ny-1} = \frac{ny(y-1) + 20(19)}{ (ny+20) ( ny+19) } \)
\(\frac{y-1}{ny-1} = \frac{ny^2 - ny +380}{ n^2 y^2 +39ny +380 } \)
Cross Multiplying
\(n^2 y^3 + 39 ny^2 + 380y - n^2 y^2 - 39ny -380 = n^2 y^3 - n^2 y^2 +380 ny - ny^2 + ny -380\)
many terms will cancel out
\(40 ny^2 - 40 ny = 380 (ny -y)\)
\(40 ny ( y-1 ) = 380 y(n-1)\\
\\
2n(y-1) = 19 (n-1) \\
\\
2ny - 2n = 19n -19\\
\\
19 = 21n - 2ny\\
\\
19 = n (21-2y) \)
We know that n and y has to be greater than 0 and integers since they are number of colors and number of balls respectively.
Since 19 is prime , only two cases exist :
Case 1 :\( n=1 \)
=> \(y= 1 \)
This can't be possible as in this case probability of selecting two balls of same color would be 0 .
Probability before and after adding 20 balls is same . Since probability can't be 0 after adding 20 balls of new colors this case is not possible .
Case 2 :\( n=19\)
\(=> 21- 2y = 1 \\
=> y = 10\)
This is our answer . Total balls = \(ny = 190\)