# Counting Principle

• Sep 15th 2011, 08:23 AM
piscoau
Counting Principle
How many ways to form a 6-digit number which the digits cannot be repeated and the leftmost digit cannot be 0?

I found there're two possible answer:
since 0 is not available to the leftmost digit, so there're only 9 choices and 9 choices on the second digit(since 0 is available) in the second digit, 8 choices on third digit, and so on. The total number of way is: 9*9*8*7*6*5 = 136080

but if I start at the rightmost digit, the answer will be different!!!
There are 10 choices at the rightmost digit, 9 choice at the second-rightmost digit, and so on. There are 6 choices at second-leftmost digit, 4 choices left at the leftmost digit (since 0 is unavailable here). The total number of ways is: 10*9*8*7*6*4 = 120960.

Could anyone explain this?
• Sep 15th 2011, 09:41 AM
Plato
Re: Counting Principle
Quote:

Originally Posted by piscoau
How many ways to form a 6-digit number which the digits cannot be repeated and the leftmost digit cannot be 0?
I found there're two possible answer:
since 0 is not available to the leftmost digit, so there're only 9 choices and 9 choices on the second digit(since 0 is available) in the second digit, 8 choices on third digit, and so on. The total number of way is: 9*9*8*7*6*5 = 13608f

but if I start at the rightmost digit, the answer will be different!!

You should not get different answers.
If you notice $\displaystyle 9\cdot 8\cdot 7\cdot 6\cdot 5\cdot 4+5\cdot 9\cdot 8\cdot 7\cdot 6\cdot 5=136080$
That is starting on the right. The first product counts no zero at all, the second counts one zero in the first five digits right to left.