Neat probability puzzle

214 Views Asked by At

There are $20$ coloured balls of various colours in a bag, such that if you pick two balls at random the chance that the two chosen balls match in colour is $50\%$.

What does the arrangement of the twenty coloured balls need to be? For example there might be 'a' of one colour, 'b' of a second colour, 'c' of a third colour etc.

3

There are 3 best solutions below

0
On

The problem is that of partitioning $20$ as $a_1+\cdots+a_n=20$ so that $\sum_{k=1}^na_k(a_k-1)=190$. Following from @JMorovitz' comment, it suffices to consider only $a_1=13$ and $a_1=14$. All but one of the few possibilities are easily eliminated, leaving $a_1=14$, $a_2=3$, $a_3=2$, and $a_4=1$.

0
On

Since the total number of couples of balls is $190$, the condition to satisfy is $$\sum_i \binom{k_i}{2}=95$$ where $k_i$ is the number of balls of the $i$-th colour. We can assume $k_1 \geq k_2 \geq k_3 \geq ...$

As it has been pointed out by JMoravitz in the comments, we can only have $13$ or $14$ balls of the most common colour. Consider the case where they are $13$: here the maximum number of pairs with the same colour (excluded the case $k_2=7$, which gives $\binom{13}{2}+\binom{7}{2}=99$ such couples) is achieved with $6$ balls of the second colour and $1$ of the third colour, and it is: $$\binom{13}{2}+\binom{6}{2}+\binom{1}{2}=93$$ So we must have $k_1=14$. Note that with the values $k_2=3$, $k_3=2$, $k_4=1$ we have exactly $$\binom{14}{2}+\binom{3}{2}+\binom{2}{2}+\binom{1}{2}=95$$ Finally note that $k_2$ must be at least $3$ since $$\binom{14}{2}+\binom{2}{2}+\binom{2}{2}+\binom{2}{2}=94$$ Therefore (14, 3, 2,1) is the only acceptable combination for the values of the $k_i$.

0
On

Okay... so the total number of combinations of two balls is $\frac {20\cdot 19}{2} = 190$.

If there are $k$ different colors (not counting the singleton colors) and $n_k$ balls of color $k$ then there are $\sum_{j=1}^k \frac {n_k(n_k-1)}2$ combinations of pairs of balls of the same color. So we need:

$\frac {\sum_{j=1}^k \frac {n_k(n_k-1)}2}{190} = \frac 12$ or in other words we need

$\sum_{j=1}^k n_k(n_k -1) = 190$.

We also need $\sum_{j=1}^k n_k \le 20$.

The possible values of $n_j(n_j-1)$ are $2,6, 12, 20, 30, 42,56,72,90, 110,132,156$ and $182$

... hmmph...

$190=182+8 = 182 + 6 + 2$. That would require $14$ of one color ($14\cdot 13 = 182$) and $3$ of another ($3\cdot 2 =6$) and $2$ of a third color. So that would be $14+3+2= 19$ balls. That'd be possible if the $20$th ball was the only one of a fourth color.

If we try using $156=13\cdot 12$ we'd have $13$ balls of a color and $7$ remaining balls that must combine to $190-156=34$. $7 = 7+0$ but that'd give us $7\cdot 6=42> 34$ which is too high. $7 = 6+1$ which gives us $6\times 5=30$ which is too low. $7=5+2$ gives us $20 + 2=22$ which is too low and $7=4+3\implies 12 + 6$ and $7=3+3+1 \implies 6+6$ and $7=2+2+2+1 \implies 2+2+2$ which are all too small. So we can't do it with $13$ balls of one color.

If we try using $132=12\times 11$ we'd have $12$ balls of a color and out of $8$ remaining balls we must get a sum that adds to $190-132=58$. We can't do $56+2$ because $56$ requires all $8$ remaining balls. We can't do $42+x$ because $42$ requires $7$ of the remaining $8$ balls and we can't get a pair with only one ball. We can't use $30+x$ because that requires $6$ balls and we only have $2$ left which can only give us $2$. If we try $20+x$ have $5$ balls of one color and $3$ left and the most we can get with $3$ is $3\cdot 2=6$. If we have $4$ balls of a color and for remaining the most we can get is $4\times 3 + 4\times 3$.

(We can observe by quasi AM-GM that the highest number we can get from $x$ balls is $x(x-1)$. If we break it into any $x= j+k$ then $j(j-1) + k(k-1) < x(x-1)$)

If we try it for $110 = 11\times 10$ where we have $9$ remaining balls and we need to get $190-110 = 80$, we can't do it. If we use all $9$ balls we can get $72$ which is too small. And by the quasi AM-GM we observed if $j+k = 9; j,k\ge 1$ then $j(j-1) + k(k-1) < 72$.

If we try it for $90=10\times 9$ where we have $10$ remaining balls the must we can get of the remaining $10$ balls is $90$ and $90+90 =180$ is not high enough.

And with handwaving and arguing with ourselves and barking up trees, we can convince us we can't get it with any other combinations as breaking $20 = m + n +k$ where $m,n,k < 10$ we will always get $m(m-1) + n(n-1) + k(k-1) < 190$.

So it would seem the only way to do it is to have $14$ of one color, $3$ of a second, $2$ of a third, and $1$ of a fourth.