Combinations with repetition

The combinations with repetition of n taken elements of k in k are the different groups of k elements that can be formed from these n elements, allowing the elements to repeat themselves, and considering that two groups differ only if they have different elements (that is to say, the order does not matter). They are represented as CRn,k .

Example

Let's consider the set A={a,b,c,d,e}. The different combinations with repetition of these 5 elements are:

  • Combinations with repetition of 5 taken elements in ones: a, b, c, d and e.
  • Combinations with repetition of 5 taken elements in twos: As before ad ab, ac, ae, bc, bd, be, cd, ce and de, but now also the groups with repeated elements: aa, bb, cc, dd and ee.
  • Combinations with repetition of 5 taken elements in threes: As before abe abc, abd, acd, ace, ade, bcd, bce, bde and cde, but now also the groups with repeated elements: aab, aac, aad, aae, bba, bbc, bbd, bbe, cca, ccb, ccd, cce, dda, ddb, ddc and dde.
  • Combinations with repetition of 5 taken elements in fours: As before abcd, abce, abde, acde and bcde, but now also the groups with repeated elements: aaab, aaac, aaad, aaae, aabc, aabd, aabe, aacd, aade, bbba, bbbc, etc...
  • Combinations with repetition of 5 taken elements in fives: A part from what we had earlier (that was abcde) now also the groups with repeated elements: aaaaa, aaaab, aaaac, aaaad, aaaae, aaabc, aaabd, aaabe, aaacd, aaace, aaade, etc...

As we see in this example, many more groups are possible than before. The following formula says to us how many combinations with repetition of n taken elements of k in k are:

CRn,k=(n+k1k)=(n+k1)!(n1)!k!

In the previous example,

Example

To know all the combinations with repetition of 5 taken elements in threes, using the formula we get 35:

CR5,3=(5+313)=(5+31)!(51)!3!=7!4!3!=75=35