In the integer 3,589 the digits are all different and increase from left to right. How many integers between 4,000 and 5,000 have digits that are all different and that increase from left to right?
"between 4000 and 5000" means the first digit must be a 4 (since 5000 doesn't have the other properties. The remaining digits must be 3 distinct digits from {5,6,7,8,9}, so there are "5 choose 3" of them. The order of the digits is fixed, so there's your answer: (5 choose 3) = 10.
4567 4568 4569
ReplyDelete4578 4579
4589
4678 4679
4689
4789
There are ten.
How can I do this without using "brute force"?
"between 4000 and 5000" means the first digit must be a 4 (since 5000 doesn't have the other properties.
ReplyDeleteThe remaining digits must be 3 distinct digits from {5,6,7,8,9}, so there are "5 choose 3" of them. The order of the digits is fixed, so there's your answer: (5 choose 3) = 10.
Thank you. I see it now. Once you choose the three digits, there is only one (ascending) order.
ReplyDeleteOnce you choose the three digits, there is only one (ascending) order.
ReplyDeleteright - I didn't see that either
By happenstance, I had just reached the section in AofPS that has problems of this type, and I got all balled up reading this problem.
Didn't manage to even know what it was asking (or to notice that the second digit of every number would have to be 5, 6, 7, or 8).