Just to elaborate a little since there was a bit of confusion up there:
We need 4-digit numbers, where each digit is positive. There are 9 positive digits.
Starting from right to left, we have:
9 possibilities *
(9 - the digit just used = 8 possibilities) *
(Again, 9 - the digit just used) = 8 possibilities) *
(Again, 9 - the digit just used) = 8 possibilities)
= 9 * 8 * 8 * 8 = 4608.
If anyone is thrown off by the fact that if the first and third numbers are different, the second digit only has 7 possibilities, this should clarify:
Suppose we didn't choose numbers from left to right, and consider the problem in the following way:
-(1)- -(2)- -(3)- -(4)-
(1) has 9 possibilities; nothing has been chosen
(3) has 9 possibilities; nothing has been chosen
(4) has 8 possibilities; it cannot be the same as (3).
(2) now has 7 possibilities right? since (1) and (3) could be different?
Nope! .. Well, sort of.Here, we have to split the problem into two scenarios:
Case A: 1 and 3 have the same digit --> there are 8 options for the second digit.
Case B: 1 and 3 have different digits --> there are 7 options for the second digit.
So, adding up the two cases, we get: (Case A: 9 * 8 * 1 * 8) + (Case B: 9 * 7 * 8 * 8) = 9 * 8 * 8 * 8 = again, 4608.
Same logic applies to any way that you want to consider the problem.
Apologies if that was obvious to everyone else; I was thrown off for a second before realizing how it worked, so thought I'd post just in case anyone else had the same confusion.