I need to find the number of permutations of m objects of one type and n objects of another. So if I have m apples and n oranges, how many different ways are there of laying out all of these m+n pieces of fruit?

It looks like it should have a relatively straightforward general solution, but I can't seem to come up with one.

## Probably Not Permutations

**Moderators:** gmalivuk, Moderators General, Prelates

- sixes_and_sevens
**Posts:**71**Joined:**Thu Jun 25, 2009 3:15 pm UTC**Location:**Birmingham, UK

### Re: Probably Not Permutations

Think about it this way:

You have (m+n)! ways of re-arranging m+n distinctly labelled fruits in m+n positions.

However, they are not distinctly labelled - every apple can be interchanged with another apple, for instance. We know there are m! ways to order m apples. So, out of our (m+n)! permutations, we can group every m! of these permutations and count them as the same permutation, because they're the same but just shuffling apples into different spots.

But our oranges are not distinctly labelled either, so out of our remaining, distinct-apple-position groups, we have to group every n! of these permutations together and count them as one - they're the same but just shuffling oranges into different spots.

(m+n)!/m!n!

You have (m+n)! ways of re-arranging m+n distinctly labelled fruits in m+n positions.

However, they are not distinctly labelled - every apple can be interchanged with another apple, for instance. We know there are m! ways to order m apples. So, out of our (m+n)! permutations, we can group every m! of these permutations and count them as the same permutation, because they're the same but just shuffling apples into different spots.

But our oranges are not distinctly labelled either, so out of our remaining, distinct-apple-position groups, we have to group every n! of these permutations together and count them as one - they're the same but just shuffling oranges into different spots.

(m+n)!/m!n!

### Re: Probably Not Permutations

sixes_and_sevens wrote:I need to find the number of permutations of m objects of one type and n objects of another. So if I have m apples and n oranges, how many different ways are there of laying out all of these m+n pieces of fruit?

It looks like it should have a relatively straightforward general solution, but I can't seem to come up with one.

You're looking for Combinations.

Think of it as: You have a row of m+n locations, and you want to choose m of those locations to place apples in. The rest of the locations are then filled by oranges. You therefore have "(m+n) choose m" possibilities, which is (m+n)!/(m!n!).

If you have 10 pieces of fruit, of which 3 are apples, then you have 10 choices for the location of the first apple, 9 for the second, and 8 for the third. It doesn't matter however which order those three locations are chosen in. So each choice of three locations could have arisen in 3 times 2 times 1 way. The final result is therefore (10*9*8) / (3*2*1), or 10!/(7!3!).

- sixes_and_sevens
**Posts:**71**Joined:**Thu Jun 25, 2009 3:15 pm UTC**Location:**Birmingham, UK

### Re: Probably Not Permutations

Well, now I feel silly.

I'd been trying to frame it in the context of permutations, because I thought order needed to be preserved. When you describe it like that it seems obvious.

I'd been trying to frame it in the context of permutations, because I thought order needed to be preserved. When you describe it like that it seems obvious.

### Re: Probably Not Permutations

Welcome to combinatorics. If you can't solve a problem, it's because you're thinking too hard about it.

### Who is online

Users browsing this forum: No registered users and 12 guests