[Math] How many possible “words” can be made from the first seven letters of the alphabet, allowing for repetition and enforcing alphabetical order

combinationscombinatoricspermutations

Using letters from the alphabet $A = \{a, b, c, d, e, f, g\}$, how many words of length $5$ are possible when repetition is allowed but the letters must occur in alphabetical order?

Not sure how to tackle this one in the case that repetition is allowed. Any hints? Thanks! 🙂

Best Answer

The question can be rephrased as:

How many different sums $n_a+n_b+n_c+n_d+n_e+n_f+n_g=5$ are there for nonnegative integers $n_a,n_b,n_c,n_d,n_e,n_f,n_g$?

E.g. possibility $2+0+1+1+1+0+0=5$ corresponds with word "aacde".

This can be solved with stars and bars.