# combinatorics problem

If you have 5 bannanas and 5 apples and two carrots, and the two carrots are lined up with the 10 fruits at random, what is the probability there are exactly two apples and any number of carrots between the two carrots. Assume that all items are distinct objects.

Attempt: So there are 10! ways to order the 5 bannanas and 5 apples. For each ordering, you can place the carrots in (11 choose 2) slots. So the denominator is 10!*(11 choose 2).

Now we have to find all the points in the sample space where there exactly two apples, and any number of carrots between the two carrots. This is where I am stuck.

-
"...what is the probability there are exactly two apples and any number of carrots between the two carrots..." - You probably meant to write bananas there. – TMM Sep 12 '11 at 16:10
Also, for solving the problem you can just ignore the bananas. If you were to first place the carrots and apples, then the event that there are exactly two apples between the two carrots is already fixed, regardless of how you place the bananes between the carrots and apples. – TMM Sep 12 '11 at 16:13

If you want to do this fully, there are $12! = 479001600$ arrangements. But each of the indistinguishable ones are equally probable so you can cut this down to $\frac{12!}{5! \; 5! \; 2!} = 16632$, which is probably what you are aiming for. You can go further and decide that you do not care about bananas so cutting down to $\frac{7!}{5! \; 2!} = 21$ equally probable arrangements of apples and carrots.
At this stage you could count by hand. You want carrots to be in positions $k$ and $k+3$ when looking at the order of seven apples and carrots. So $1 \le k \le 7-3$ giving four possible pairs of positions for the carrots. So $\frac{4}{21}$ is the answer.