# Combinations removing duplications and repetition

• Apr 3rd 2012, 11:20 PM
s4276560
Combinations removing duplications and repetition
Is there a general formula which can tackle the following:
given n objects and r spots, I want to calculate the number of possible combinations accounting for duplicates and repetition.

eg. n = 4, r = 3 (AAAB)
possible combinations:
AAA
AAB
result is 2

eg. n = 4, r = 3 (AABC)
possible combinations:
AAB
AAC
ABC
result is 3

eg. n = 5, r = 3 (AABBC)
possible combinations:
AAB
AAC
ABB
ABC
BBC
result is 5

Thank you
• Apr 4th 2012, 03:27 AM
Plato
Re: Combinations removing duplications and repetition
Quote:

Originally Posted by s4276560
Is there a general formula which can tackle the following:
given n objects and r spots, I want to calculate the number of possible combinations accounting for duplicates and repetition.

eg. n = 4, r = 3 (AAAB)
possible combinations:
AAA
AAB
result is 2

eg. n = 4, r = 3 (AABC)
possible combinations:
AAB
AAC
ABC
result is 3

eg. n = 5, r = 3 (AABBC)
possible combinations:
AAB
AAC
ABB
ABC
BBC
result is 5

I think you are expecting a simple formula for this but there is none.
For one, we need to know not only how different kinds we have but also how many of each kind.
Here is an example.
$\{A,A,A,B,B,C\},~n=6<~\&~r=3$.
Expand $(1+x)(1+x+x^2)(1+x+x^2+x^3)=1+3x+5x^2+6x^3+5x^4+3x ^5+x^6$.
$6x^3$ tells us there are six possible combinations of three.
$5x^4$ tells us there are five possible combinations of four, etc.