# How many five digit numbers are there with all distinct digits and the $n$th digit from left will be greater than the $n+1$th digit?

How many five digit numbers are there with all distinct digits and the $n$th digit from left will be greater than the $n+1$th digit?

I think that for the leftmost digit, there are six possibilities, for the next, there are five... for the last, there are two. So there are $6×5×4×3×2$ numbers. Am I correct?

• Why can't the leftmost digit not be a 9? – Pieter21 May 24 '17 at 17:41
• I never said this... – ami_ba May 24 '17 at 17:42
• I meant that there are $6$ possibilities, it can be$9,8,7,6,5,4$ – ami_ba May 24 '17 at 17:43

## 3 Answers

You can take any 4 digits from $0..9$, but you have to put them in descending order:

$$10 \choose 4$$

I think I'm mistaken, and they have to be in increasing order, then the digits have to come from $1..9$ and the answer is:

$$9 \choose 4$$

Effectively, this is $9*8*7*6$ for picking $4$ distinct digits, but you have to divide by $4*3*2*1$ to rearrange increasing.

• How can it be only $9 \choose 4$? – ami_ba May 24 '17 at 17:58
• The questions talks about 5 digits, am I wrong? 10 choose 5, and that's it (since any collection has to be taken once because there is only one arrangement allowed) – lesath82 May 24 '17 at 18:04
• I felt really stupid until I saw it was edited.... I leave it as an exercise to the reader.. blabla – Pieter21 May 24 '17 at 18:25

$$\sum _{a=3}^9 \sum _{b=0}^{a-1} \sum _{c=0}^{b-1} \sum _{d=0}^{c-1} 1=210$$

EDIT: $5$ digits

$$\sum _{a=4}^9 \sum _{b=0}^{a-1} \sum _{c=0}^{b-1} \sum _{d=0}^{c-1} \sum _{e=0}^{d-1} 1=252$$

I agree that the solution should start with finding out how many possible 4 distinct digit combinations there are. I believe this would be ${10}\choose{4}$. Each one of these selections has one $\textit{unique}$ decreasing sorting from left to right, so I don't see why ${{10}\choose{4}}=210$ is not the correct answer.

EDIT for five digits: ${{10}\choose{5}}=252$