0

I became interested in the following kind of sequence; As an example;

111, 211, 221, 222, 311, 321, 322, 331, 332, 333

Here in this example, we have 3 slots and three numbers to go along with. So for $m$ slots and $n$ numbers chosen how many such combinations are possible. Note that digits are in descending order in a term so something like (3,1,2) is not possible.

And also is there any guide/information related to these kind of specified combination-lock kind of sequences. Thanks

zoro
  • 125

1 Answers1

1

First, let's flip the combinations around so that they are in increasing order, and label them $x_1,...,x_m$. (In this case, since there are $3$ digits, $m=3$).

Next, let $y_1=x_1-1$, $y_2=x_2-x_1$, $y_3=x_3-x_2$, $\ldots$ , $y_m=n-x_m$. (In this case, $n=3$).

Note that each $y_i\geq0$ and $$y_1+y_2+\ldots+y_m=n-1$$Note that any solution to this equation that satisfies $y_i\geq0$ for all $i$ will determine exactly one combination by the equations above.

So, we know that there are $$n+m-1\choose m-1$$solutions by stars and bars.

Rushabh Mehta
  • 13,845