0

Let $S=\{ 1,2, \cdots,m\}$ and $a_1,..,a_n$ be $n$ numbers chosen from $S.$ How many sequences $<a_i>$ of length $n$ are there such that $a_0 \geq a_1 \geq \cdots \geq a_n ?$ I suspect this has to do something with multisets .The numbers $a_i$ are chosen independently and with replacement.If the numbers are chosen without replacement then the enumeration is simple:chose $n$ numbers from the set $S$, which can be done in $\binom{m}{n}$ ways and there is one way to put them in a nondecreasing order. But I am not able to figure out how we can enumerate the same with replacement. Thank you for any hints/suggestions

N. F. Taussig
  • 76,571
AgnostMystic
  • 1,654
  • 1
    Is $a_0\ge a_1$ a typo for $a_1\ge a_2$? – user14111 Apr 14 '23 at 03:26
  • The answer is $\binom{m+n-1}n$, the same as the number of solutions of the equation $x_1+\cdots+x_{n+1}=m-1$ in nonnegative integers $x_i$. (Set $a_0=1$ and $a_{n+1}=m$ and let $x_i=a_i-a_{i-1}$. Look up "compositions" or "stars and bars". – bof Apr 14 '23 at 03:35

0 Answers0