Probability of drawing two green balls without replacement A box contains of some green balls and some white balls. Given that the probability of drawing two green balls without replacement is 0.5, what is the smallest total number of ball inside this box? Hence, state the total number of green and white balls.
The smallest total number of balls inside the box should be 4, the total number of green balls is 3 and the total number of white balls is 1. I'm just using the trial and error to get these answer. Is there any other way to do it?
 A: Suppose we have $g$ green balls and $w$ white balls, where both $g$ and $w$ are positive.
We know that $\dfrac{\binom{g}{2}}{\binom{g+w}{2}}=\dfrac12$.
Since there are at least $2$ green balls, we know that $g\geq2$.
If $g=2$, then the maximum value of $\dfrac{\binom{g}{2}}{\binom{g+w}{2}}$ is $\dfrac13$ (when $w=1$).
So choose the minimum value of $g>2$, which is $\color\red{g=3}$, and you'll get:
$\dfrac{\binom{3}{2}}{\binom{3+w}{2}}=\dfrac12 \implies (3+w)(2+w)=12 \implies w_{1,2}=-6,1 \implies \color\red{w=1}$.
A: If there are $g$ green balls and $w$ white balls, the probability to draw two green balls is
$$
\frac{\binom g2}{\binom{g+w}2}=\frac{g!(g+w-2)!}{(g+w)!(g-2)!}=\frac{g(g-1)}{(g+w)(g+w-1)}=\frac12\;.
$$
We clearly can't have $w=0$ (since the probability would be $1$ then), and substituting the next option, $w=1$, yields $g-1=(g+1)/2$ and thus $g=3$.
As with barak's solution, there's still a bit of "trial and error" (though perhaps slightly more palatable with $0$ and $1$ instead of $2$ and $3$). I suspect that any solution that one might declare entirely uncontaminated by "trial and error" would be significantly more complicated (e.g. solving quadratic equations) than these two solutions.
