Hi OnePieceIsReal, your reasoning in this post is correct, and it is actually a cleaner route than the two-family count I posted earlier. Let me confirm it and then name the one condition it rests on.
Bunuel's line above is the same fact you started from: 0123456789 is not a new ten-digit number, it is just 123456789. Where your post goes further is in seeing what that means for the
count. Because the question never fixes how many digits the number must have, the leading-zero arrangements are not waste. They are the nine-digit numbers built from {1, ..., 9}.
Why your total and mine have to agree. Take all 10! arrangements of {0, 1, ..., 9} and split them in two:
- 0 not in front: these are 10! - 9! genuine ten-digit numbers.
- 0 in front: 9! strings, and deleting the leading 0 turns each one into a nine-digit number from {1, ..., 9}. Every such nine-digit number shows up exactly once this way, so nothing is double counted and nothing is missed.
So the 10! arrangements line up one-to-one with the numbers the question asks for. My earlier post counted the same two families separately and added them, (10! - 9!) + 9! = 10!. Your route and mine are the same count read in two different orders.
The condition to hold onto. Your slot count (10 choices for the first digit, then 9, then 8, and so on) is safe here only because the length is free. Suppose the question had asked for
ten-digit numbers with distinct digits summing to 45. Then the leading-zero strings would have to be thrown out with nothing to add back, and the answer would be 10! - 9!, not 10!. Same digits, same sum, different count.
So the habit is one question, asked before you count: is the number of digits fixed? If it is, leading zeros are simply discarded. If it is not, ask what shorter numbers they become, exactly as you did here.
Well spotted.
OnePieceIsReal
I have a doubt, why zero cannot be in the lead, since we don’t have the condition of the no. Of digits to be fixed, so in the case where zero will be in lead will simply be unique 9 digit numbers while where zero is not in lead will be 10 digit numbers.