Question
How many 4-digit numbers can be formed using digits 0, 1, 2, 3, 4, 5 with no digit repeated?
Solution — Step by Step
A 4-digit number cannot start with 0 (else it’s a 3-digit number). So the first position has 5 choices (1, 2, 3, 4, 5), not 6.
- Position 1 (thousands): 5 choices (any non-zero digit)
- Position 2 (hundreds): 5 choices (any digit except the one used, including 0 now)
- Position 3 (tens): 4 choices
- Position 4 (units): 3 choices
Final answer: 300 four-digit numbers
Why This Works
We use the multiplication principle for ordered selections without repetition. The trick is treating the leading-zero restriction first — once position 1 is filled (5 ways), the rest of the positions can use 0 freely.
If we’d ignored the leading-zero rule, we’d get , which over-counts by 60 (the count of 4-digit “numbers” starting with 0, which are really 3-digit numbers).
Alternative Method
Total without restriction (treating 0 as a valid leading digit): . Subtract numbers starting with 0: fix 0 in position 1, then arrange remaining 3 from {1,2,3,4,5} in positions 2,3,4: .
Same answer via the complement method.
Common Mistake
Forgetting the leading-zero rule and reporting 360. Always check: does “number” allow leading zeros? In standard math, “n-digit number” excludes leading zeros. In code-based questions, “n-digit code” often includes them — read carefully.
When a problem has a “first position is special” constraint (no zero, must be a vowel, etc.), fill that position first. The remaining positions are then unconstrained in the same way.