# How many ascending and descending numbers are between 1000 and 9999?

I'm working on some homework right now, and I've gotten stumped. Here's the question I'm on:

How many of the 9000 four-digit integers 1000, 1001, 1002, . . . , 9998, 9999 have four distinct digits that are either increasing (as in 1347 and 6789) or decreasing (as in 6421 and 8653)?

Through some Googling I've already found what they answer may be, but I have no idea how to arrive at the answer, so I wouldn't be learning anything from this hurdle like I'm supposed to. I can use all the help I can get on this one since I don't even know where to start. I think I have to apply the formula for permutations to this somehow, but I don't know what adjustments I have to make for it to work right.

-
If you have a number xyza, where x, y, and z are known, and "a" unknown, and xyza is monotonic (either increasing or decreasing), how many choices do you have for a? –  Doug Spoonwood Jan 24 '13 at 11:32
Have you tried some smaller example, e.g. calculating such numbers between $10$ and $55$ in base $6$ for example and then try to find a general rule. –  Julian Kuelshammer Jan 24 '13 at 11:56
@DougSpoonwood - Okay, I think I see what you mean, I would have 10 choices there, unless I wasn't counting the zeroes for the ascending group. I don't quite understand how x, y, and z are known though. –  Dave Jan 24 '13 at 12:08
@JulianKuelshammer - I'll give that a try. That has worked for me on some of the other permutation puzzles we've been doing, but I didn't think it would offer any insight on this one. This is a much more difficult problem than the others due to some base concept I seem to be missing. –  Dave Jan 24 '13 at 12:09
Ack! You're choosing $4$ digits (from 10), not $4$ numbers from $9000$. –  Gerry Myerson Jan 24 '13 at 11:59
I don't know what you mean by the notation $(9\ 4)$. You choose the four digits. As I wrote, there is only one way to arrange the four digits you have chosen so that they are ascending. So the number of 4-digit integers with increasing digits is the same as the number of ways of choosing 4 digits. Right? –  Gerry Myerson Jan 24 '13 at 12:10