[Math] Number of four digit numbers

combinatoricspermutations

I came across this question, that how many 4 digit numbers $a_1a_2a_3a_4$ are there such that

$a_1\geq a_2\geq a_3\geq a_4$

I know the answer for this case,

$a_1>a_2>a_3>a_4$

I need a hint to solve that case with equality sign as well.
(I have already done this question in class, but since I dont make notes so its lost)

Best Answer

Hint: Imagine that we have $13$ "digits," the usual $0$ to $9$, and in addition the digits $\alpha$, $\beta$, $\gamma$, to be thought of as representing $10$, $11$, and $12$ respectively.

Pick a strictly descending sequence $x_1, x_2, x_3, x_4$ of length $4$ from this new digit set of $13$ digits. You know how to count how many such strictly descending sequences there are.

Let $a_4=x_4$, $a_3=x_3-1$, $a_2=x_2-2$, $a_1=x_1-3$. Show that this produces every non-increasing sequence $a_1\ge a_2 \ge a_3 \ge a_4$ in one and only one way.

Now we need to adjust for the unpleasant fact that the initial digit of a $4$-digit number cannot be $0$. That translates into the fact that the strictly descending sequence $x_1=3$, $x_2=2$, $x_3=1$, $x_4=0$ is not allowed.

Remark: The above procedure has nothing much to do with digits. The number of never increasing sequences of length $k$ from the set $\{1,2,\dots,n\}$ is the same as the number of strictly decreasing sequences of length $k$ from the set $\{1,2,\dots,n,n+1,\dots, n+k-1\}$.

Added: The number of strictly decreasing sequences of length $4$ from the digits $0, 1,\dots, 9$ is just $\binom{10}{4}$, the number of ways to choose $4$ distinct numbers. If we use the "digits" $0,1,\dots,9,\alpha,\beta,\gamma$, then the number of strictly decreasing sequences is $\binom{12}{4}$. We must subtract $1$ because $3,2,1,0$ is not allowed.

Related Question