Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
"...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
up vote 1 down vote accepted

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.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.