2. A bag contains $n$ balls numbered from 1 to $n$, with $n \geq 2$. There are $n \times(n-1)$ ways in which Julio can remove one ball from the bag and then remove a second ball. This is because there are $n$ possible choices for the first ball and then $n-1$ possible choices for the second ball. For example, when a bag contains 6 balls numbered from 1 to 6,4 of which are black and 2 of which are gold, there are $6 \times 5=30$ ways in which he can remove two balls in this way, and $4 \times 3=12$ ways in which both balls are black.
(a) A bag contains 11 balls numbered from 1 to 11,7 of which are black and 4 of which are gold. Julio removes two balls as described above. What is the probability that both balls are black?
(b) For some integer $g \geq 2$, a second bag contains 6 black balls and $g$ gold balls; the balls are numbered from 1 to $g+6$. Julio removes two balls as described above. The probability that both balls are black is $\frac{1}{8}$. Determine the value of $g$.
(c) For some integer $x \geq 2$, a third bag contains $2 x$ black balls and $x$ gold balls; the balls are numbered from 1 to $3 x$. Julio removes two balls as described above. The probability that both balls are black is $\frac{7}{16}$. Determine the value of $x$.
(d) For some integer $r \geq 3$, a fourth bag contains 10 black balls, 18 gold balls, and $r$ red balls; the balls are numbered from 1 to $r+28$. This time, Julio draws three balls one after another. The probability that two of these three balls are black and one of these three balls is gold is at least $\frac{1}{3000}$. What is the largest possible value of $r$ ?
2. (a) Since there are 11 balls, then there are $11 \times 10=110$ ways in which Julio can remove two balls.
Since there are 7 black balls, then there are $7 \times 6=42$ ways in which Julio can remove two black balls.
Therefore, the probability that both of the balls that Julio removes are black is $\frac{42}{110}$ which equals $\frac{21}{55}$.
(b) Since there are $g+6$ balls, then there are $(g+6)(g+5)$ ways in which Julio can remove two balls.
Since there are 6 black balls, then there are $6 \times 5=30$ ways in which Julio can remove two black balls.
Since the probability that both of the balls that Julio removes are black is $\frac{1}{8}$, then
$$
\frac{30}{(g+6)(g+5)}=\frac{1}{8} \text { and so }(g+6)(g+5)=240 \text {. }
$$

By trial and error, we can determine that $g=10$.
Alternatively, we can expand and factor:
$$
\begin{aligned}
(g+6)(g+5) & =240 \\
g^{2}+11 g+30 & =240 \\
g^{2}+11 g-210 & =0 \\
(g+21)(g-10) & =0
\end{aligned}
$$
which means that $g=-21$ or $g=10$.
Since $g>0$, then $g=10$.
(c) Since there are $3 x$ balls, then there are $3 x(3 x-1)$ ways in which Julio can remove two balls.
Since there are $2 x$ black balls, then there are $2 x(2 x-1)$ ways in which Julio can remove two black balls.
Since we are given that the probability that both of the balls that Julio removes are black is $\frac{7}{16}$, then $\frac{2 x(2 x-1)}{3 x(3 x-1)}=\frac{7}{16}$.
Since $x \neq 0$, then
$$
\begin{aligned}
\frac{2(2 x-1)}{3(3 x-1)} & =\frac{7}{16} \\
32(2 x-1) & =21(3 x-1) \\
64 x-32 & =63 x-21 \\
x & =11
\end{aligned}
$$

Thus, $x=11$.
(d) Since there are $r+28$ balls, then there are $(r+28)(r+27)(r+26)$ ways in which Julio can remove three balls.
For Julio to draw two black balls and one gold ball, he could draw "black, black, gold" or "black, gold, black" or "gold, black, black".
The number of ways in which the first possibility can happen is $10 \times 9 \times 18$.
The number of ways in which the second possibility can happen is $10 \times 18 \times 9$.
The number of ways in which the third possibility can happen is $18 \times 10 \times 9$.
In other words, there are $3 \times 10 \times 9 \times 18$ ways in which Julio can draw two black balls and one gold ball.
Since the probability that two of the three balls are black and one is gold is at least $\frac{1}{3000}$, then $\frac{3 \times 10 \times 9 \times 18}{(r+28)(r+27)(r+26)}>\frac{1}{3000}$.
Since $3 \times 10 \times 9 \times 18=4860$, then this inequality is equivalent to
$$
\frac{4860}{(r+28)(r+27)(r+26)}>\frac{4860}{4860 \times 3000}
$$

This is true exactly when $(r+28)(r+27)(r+26)<4860 \times 3000=14580000$.
As $r$ increases, each of $r+28$ and $r+27$ and $r+26$ increases and is positive, so the product $(r+28)(r+27)(r+26)$ also increases and is positive.

This means that we can find an integer $r$ where the product is less than 14580000 and for which the next larger integer value of $r$ makes the product larger than 14580000 . The first of these integers will be the largest value of $r$ for which the probability is at least $\frac{1}{3000}$.
We note that $\sqrt[3]{14580000} \approx 244$.
Since $r+28, r+27$ and $r+26$ are close in size, we start our search near $r+28=244$.
When $r=216$, we get $(r+28)(r+27)(r+26)=14348664$.
When $r=217$, we get $(r+28)(r+27)(r+26)=14526540$.
When $r=218$, we get $(r+28)(r+27)(r+26)=14705880$.
Therefore, $r=217$ is the largest value of $r$ for which the probability is at least $\frac{1}{3000}$.