## From the AIME May 29, 2007

Posted by Peter in Exam 1/P.

Some time ago, I answered a question that was featured in the American Invitational Mathematics Examination (AIME), which is one step in the series of AMC exams that leads to the US team selection for the International Mathematics Olympiad (IMO). The AMC is open to high school students in the US, and every now and then, a question from the theory of probability crops up on the exam. This one would make a particularly challenging question for CAS/SOA Exam 1/P:

A jar has 10 red candies and 10 blue candies. Terry picks two candies at random, then Mary picks two of the remaining candies at random. Given that the probability that they get the same color combination, irrespective of order, is m/n, where m and n are relatively prime positive integers, find m + n.

Solution:
Terry has a 1/2 probability of choosing a red candy on his first draw. He then has a 9/19 probability of choosing another red candy on his second draw. Thus the probability of his having two red candies is 9/38. Similarly, the probability of his having two blue candies is 9/38. Therefore, the probability of his having one of each color is 1 – 2(9/38) = 10/19.

Now, given that Terry has two candies of the same color, the probability that Mary selects two more candies of that same color is (8/18)(7/17). Therefore, the probability that Terry and Mary have all chosen candies of the same color (all red or all blue) is

(9/19)(8/18)(7/17) = 28/323.

However, given that Terry has one candy of each color, the probability that Mary also selects one red and one blue candy is simply 9/17. This is because it is equivalent to the probability of her second candy color not being the same as her first. Another way to view it is to see that she can either choose red, then blue, or blue, then red. Each occurs with a probability of

(9/18)(9/17) = 9/(2·17),

so their combined probability is twice this, or 9/17. Hence the combined probability that Terry and Mary each choose candies of both colors is

(10/19)(9/17) = 90/323.

Therefore, the probability Terry and Mary choose candies of the same type is

(28+90)/323 = 118/323,

and since 118 and 323 are relatively prime, the answer is 441.

One can also work out the problem for the general case where one has n red candies and n blue candies. The desired probability is

$\displaystyle \frac{2 \binom{n}{2}\binom{n-2}{2} + n^2 (n-1)^2}{\binom{2n}{2}\binom{2n-2}{2}} = \frac{3n^2 - 7n + 6}{8n^2 - 16n + 6}.$

Can you generalize the question to the case where there are r red and b blue candies?