# Thread: Combinations removing duplications and repetition

1. ## 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

2. ## Re: Combinations removing duplications and repetition

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.
$\displaystyle \{A,A,A,B,B,C\},~n=6<~\&~r=3$.
Expand $\displaystyle (1+x)(1+x+x^2)(1+x+x^2+x^3)=1+3x+5x^2+6x^3+5x^4+3x ^5+x^6$.
$\displaystyle 6x^3$ tells us there are six possible combinations of three.
$\displaystyle 5x^4$ tells us there are five possible combinations of four, etc.