ptandon wrote:Can we not apply the nCr formula on this one?
Yes you can but it will end up being the same as factorial.
Start with choosing a 7-digit number.
Think about picking the first number: there are 7 to choose from, and you have to pick 1. So there are 7C1 ways of doing this. This cancels done to just 7.
To pick the second number, since you aren't allowed to repeat, you now have only 6 numbers left to choose from, and you have to pick 1 out of these 6. This becomes 6C1 = 6.
Likewise, for the third, there are now only 5 numbers to choose from (since you're not allowed to use the previous 2 numbers) and you have to pick 1, so this is 5C1= 5.
Continuing in this way you get:
(7C1)*(6C1)*(5C1)*(4C1)*(3C1)*(2C1)*(1C1) = 7*6*5*4*3*2*1 = 7!
Now for choosing a 6-digit number:
(6C1)*(6C2)*(6C3)*(6C4)*(6C5)*(6C6) = 6*5*4*3*2*1 = 6!
You then repeat this for finding the number of ways of choosing a 5-digit number, then 4- digit number, all the way to a 1-digit number and then add them all up. But as you can see using the nCr formula in this case will just waste alot of time.