[Math] Number of $5$ digit numbers with ascending digits

combinationscombinatoricspermutations

When digits need to be in ascending order, $0$ can never be chosen.

So from the $9$ digits $(1,2,3,…..9)$ we select any five digits (which can be done in ${}^9\mathrm C_5$ ways) and we can arrange the $5$ selected digits in ascending order in only one way. So the number of $5$ digit numbers in ascending order would be ${}^9\mathrm C_5$.

When digits are in descending order, we can have $0$ in the units place.

This is what I got but I don't think it is correct.

Best Answer

That looks right when the digits have to be strictly increasing or decreasing: for each it is just the number of different sets of $5$ digits to choose, which is ${}^9\mathrm C_5$ or ${}^{10}\mathrm C_5$ respectively.

If you're allowed repeated digits so long as each digit is at least the previous one, like $23377$, then still for any particular combination of digits there is only one ordering that works, but now there are more combinations because you allow repetition.

The formula for the number of combinations with repetition allowed of $k$ objects from $n$ types is ${}^{n+k-1}\mathrm C_{k}$, so here you would have $k=5$ and $n=9$ for the increasing case but $n=10$ for the decreasing case, as before. However, there is an extra slight difficulty with the decreasing case, which is that while you're allowed to have $0$s, you're not allowed to have all digits $0$, so in that case you have to subtract $1$ combination .