# What are all the possible 130 letter words with letters in ascending order

What are all the possible 130 - letter words if:

a) How many different words are there in which the occurring letters are in ascending order (from left to right)? so aa...aab...bbbccc....cccddd...

b) How many different strings are there in which each letter occurs at least once and the letters are in ascending order (left to right)?

My approach to a problem like that will be the following :We start with 130 of every letter in the alphabet and we have to choose some number of letters from every group of 130 letters, for example, we choose 7 letters "a" from the 130 "a"s that we can choose max and we do this for every letter so we get the following generating function where we look for the coefficient of $$x^{130}$$: $$(1x^0+ 1x^1 + 1x^2 + 1x^3 .....)^{26}$$ So we look for the coefficient of x in the sum : $$(\sum_{i\ge0} x^i)^{26} =(\frac{1}{1-x})^{26}$$ so the coefficient of $$(\frac{1}{1-x})^{26}$$ is $$[x^{130}](1-x)^{-26}$$ so $$\binom{-26}{130}$$ = $$\binom{155}{130}$$

So the answer to a) is $$\binom{155}{130}$$

Now for b) we need a generating function that is the same as the first one but multiplied by x to ensure that we have every letter at least once:

$$(1x^1+ 1x^2 + 1x^3 + 1x^4 .....)^{26}$$

And with similar reasoning we need to find the coefficient of $$x^{130}$$ of $$\frac{x}{1-x}^{26}$$ so $$[x^{130}]x^{26}(1-x)^{-26}$$ this means that we only have to look for the coefficient in front of $$x^{104}$$ of $$(1-x)^{-26}$$ and it happens to be $$\binom{-26}{104} = \binom{129}{104}$$ which is the answer to b)

Let me know if that are the correct answer, cause for some reason I am not sure. I will check this but I hope there are no silly mistakes

• On (b), for instance, the "stars and bars" method agrees with your answer (since a word is uniquely determined by how many of each letter it contains) -- essentially, there are 25 places where the word switches from one letter to the next, out of a total number of possible places to switch of 129. Commented Sep 28, 2022 at 20:01
• I agree with both your answers. Commented Sep 28, 2022 at 20:11