# Total number of items given equal probability

You are given a bucket with apples and oranges. There are two apples, and the rest oranges. Four children uniformly randomly pick a fruit from the bucket. The probability that all four children pick oranges is A and the probability that two of the four children pick the apples is B. After that, you realize at A = B. What's the total amount of fruits (apples + oranges) in the bucket?

### My Attempt

• Total number = ( N )
• Number of apples = 2
• Number of oranges = ( N - 2 )

$$A = \frac{{\binom{{N-2}}{{4}}}}{{\binom{N}{4}}}$$

$$B = \frac{{\binom{2}{2} \times \binom{{N-2}}{{2}}}}{{\binom{N}{4}}}$$

Given that ( A = B ), we can equate these probabilities:

$$\frac{{\binom{{N-2}}{{4}}}}{{\binom{N}{4}}} = \frac{{\binom{2}{2} \times \binom{{N-2}}{{2}}}}{{\binom{N}{4}}}$$

Solving, I get that N = 6. But when I use this value to calculate A and B, I realize that they're not equal. Where am I going wrong?

• @BenjaminWang Oh, I see they're equal, thanks. Do you agree with the general approach used to come to the solution. Feb 17 at 8:27

$$N$$ would be $$8$$, not $$6$$. \begin{align*} &{{N-2} \choose 4} = {{N-2} \choose 2} \\\\ \Rightarrow \;\;\; & N - 2 = 4 + 2 \\\\ \Rightarrow \;\;\; & N = 8 \\\\ \end{align*}
Below we are solving the given equation: $$\binom {N - 2}{4} = \binom {2}{2} \cdot \binom {N - 2}{2}.$$ Trivially, $$\binom {2}{2} = 1$$, so $$\binom {N - 2}{4} = \binom {N - 2}{2}.$$ By definition, this is saying $$\frac {\left( N - 2 \right)!}{4! \, \left( N - 6 \right)!} = \frac {\left( N - 2 \right)!}{2! \, \left( N - 4 \right)!}.$$ Cancelling common factors, rearrrangement yields $$\frac {\left( N - 4 \right)!}{\left( N - 6 \right)!} = \frac {4!}{2!},$$ whence we derive $$\left( N - 4 \right) \left( N - 5 \right) = 12.$$ Expand the left-hand side. Rearrange the terms to see $${N}^{2} - 9 N + 8 = 0.$$ Factoring should be easy: $$\left( N - 1 \right) \left( N - 8 \right) = 0.$$ Since $$N - 2 \ge 0$$, we finally conclude that $$N = 8$$, as Haris has suggested.