How many four digit numbers can be formed from 0-9 if:
repetitions are allowed
Two ways to do that one.
First way:
Choose the 1st digit any of 9 ways. (can't use 0)
Choose the 2nd digit any of 10 ways, (can use 0)
Choose the 3rd digit any of 10 ways, (can use 0)
Choose the 4th digit any of 10 ways, (can use 0)
9×10×10×10 = 9000
Second way:
There are 9999 positive integers from 1 thru 9999 inclusively.
Of those the 999 integers from 1 through 999 inclusively are
not four-digit numbers. So there are 9999-999 = 9000
------------------------------------------
the number is less than 5000 and repetitions are allowed?
Choose the 1st digit any of 4 ways, (1,2,3,or 4)
Choose the 2nd digit any of 10 ways.
Choose the 3rd digit any of 10 ways.
Choose the 4th digit any of 10 ways.
Answer: 4×10×10×10 = 4×103 = 4000
Second way:
There are 4999 positive integers less than 5000.
Of those the 999 integers from 1 through 999 inclusively are
not four-digit numbers. So there are 4999-999 = 4000
---------------------------------
the number is less than 5000 and no repetitions are allowed?
Choose the first digit first as that is the most restrictive.
Choose the 1st digit any of the 4 ways (as 1,2,3,or 4
Choose the 2nd digit in any of the 9 remaining ways.
Choose the 3rd digit in any of the 8 remaining ways.
Choose the 4th digit in any of the 7 remaining ways.
Answer: 4×9×8×7 = 2016 ways
--------------------------------
the number ends in 5 and repetition is allowed?
First way:
Choose the 4th digit only 1 way, as 5.
Choose the 1st digit any of 9 ways. (can't use 0)
Choose the 2nd digit any of 10 ways, (can use 0)
Choose the 3rd digit any of 10 ways, (can use 0)
1×9×10×10 = 900
Second way:
Choose the 3-digit number that precedes the 5.
There are 999 positive integers from 1 thru 999 inclusively.
Of those the 999 integers from 1 through 99 inclusively are
not three-digit numbers. So there are 999-99 = 900 3-digit
numbers that you can put a 5 on the right end as a 4th digit
ending in 5. Answer: 900
------------------------------------------
the number ends in 5 and repetition is not allowed?
Choose the last digit first as that is the most restrictive.
Choose the 4th digit only 1 way, as 5.
Choose the 1st digit any of 8 remaining ways. (can't use 0 or 5)
Choose the 2nd digit any of 8 remaining ways, (can use 0, but not 5)
Choose the 3rd digit any of 7 ways.
1×8×8×7
Answer: 1×8×8×7 = 448 ways
Edwin