How many numbers of $4$ digits $x_1x_2x_3x_4$ satisfy $x_1\leq x_2 \leq x_3 \leq x_4$

combinationscombinatorics

How many numbers of $4$ digits $x_1x_2x_3x_4$ satisfy $x_1\leq x_2 \leq x_3 \leq x_4$?

What I've worked so far:

I have identified this situation with distributing $4$ equal objects among $9$ different boxes (digits from $1$ to $9$).

Therefore, solving the question proposed should be equivalent to solving the number of integer solutions of the following equation:
$$y_1+y_2+y_3+y_4+y_5+y_6+y_7+y_8+y_9=4\\
y_i\geq0 \quad \forall i\in\{1,2,…,9\}$$

The total solutions for this equations are: $$\text{CR}_{9}^{4}={4+9-1 \choose 4}={12 \choose 4}=\frac{12!}{4!\cdot8!}=11\cdot9\cdot5=495\text{ posibilities}$$

Is there any other approach you think it's more practical? Is this reasoning correct?

Clarifications:
If one distribution of the objets is $6292$ (box nº 6 is the first box where I distribute an object; box nº $2$ the second; box nº $9$ the third and box nº $2$ the fourth). The order in which boxes I distribute the objects doesn't really matter because the objects are identical, so I can rearrange the result to get $2269$ which is a combination that verifies the restriction given.

Best Answer

Another way is to set $x_0 = 1$ and $x_5 = 9$. Then define $$ t_i = x_i - x_{i-1} ~~~~(i = 1, 2, 3, 4, 5) $$ as the "jump" from the $i$th digit from the preceding digit.

Now \begin{align} t_1 + t_2 + \ldots + t_5 &= (x_1 - x_0) + (x_2 - x_1) + \ldots + (x_5 - x_4)\\ &= (-x_0 + x_1) + (-x_1 + x_2) + \ldots + (-x_4 + x_5)\\ &= -x_0 + (x_1 -x_1) + (x_2 - x_2) + \ldots + (x_4 -x_4) + x_5\\ &= -x_0 + x_5\\ &= -1 + 9 = 8\\ \end{align}

The numbers $t_i$ are all nonnegative, and their sum is exactly $8$. We end up (using the dual of your reasoning) needing to compute $$ \binom{5+8-1}{8} = \binom{12}{8} = \binom{12}{4} = 495. $$

Related Question