How many combinations out of 3 elements?

5,375

Problem is incomplete without describing if there is a length limit.

If there is none, infinite like the comments suggest.

If there is one, say $n$, then $3^n$ if order is relevant, just $3$ options for each position.

If order is not relevant, then use stars-bars https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics), and find ${n+2}\choose{2}$.

With length $3$ from comments, you also have to decide if $AAB = ABA$. Are those different words, or are those the same ($2 A's, 1 B$).

-- edit

So it is Stars and Bars with $n = 3$ balls and $k = 3$ bins.

The formula says ${{n+k-1}\choose{k-1}} = {{5}\choose{2}} = 10$, so you were right in your own comment.

For intuition: take 5 positions, on on exactly 2 positions you will place a bar, everything left of the first bar is $A$, everything between the bars $B$, everything right of the last bar is $C$.

Share:
5,375
Ben
Author by

Ben

Updated on December 31, 2022

Comments

  • Ben
    Ben 10 months

    I have three elements A, B, and C.

    How many different combinations can I make if the order doesn't matter and the letters can repeat?

    • Admin
      Admin about 6 years
      For 3 elements just write them all out! Nothing beats understanding for yourself where the formula for these things come from
    • aleden
      aleden about 6 years
      What you want to know is the number of permutations there are for 3 elements. The general answer is $n!$ for $n$ number of elements so for 3, it is $3!=6$
    • user1952500
      user1952500 about 6 years
      If you don't have an upper limit on the size of the strings, it will be infinite. Eg: AAAA.....A (n times as n => infinity)
    • Doug M
      Doug M about 6 years
      If letters can repeat then you can have A, AA, AAA, AAAA, etc. it is infinite.
    • Ben
      Ben about 6 years
      @Niall I did, I get 10, but I want to check with a formula if I'm right.
  • Ben
    Ben about 6 years
    length is exactly 3
  • Ben
    Ben about 6 years
    no the order doesn't matter, AAB and ABA are the same