If repetition of digit is allowed How many 4 digit numbers can be formed from 0,1,2,3 and 4

how many 4-digit numbers can be formed with the 10 digits 0,1,2,3...9 of (a)repetitions are allowed,Two ways to get the answer: 1. There are 9999 integers starting with 1 and ending with 9999. But the 999 integers starting with 1 and ending with 999 have less than 4 digits, so the desired number is 9999-999 or 9000 ways. 2. There are 9 ways to pick the first digit (1 through 9), there are 10 ways to pick the 2nd, 3rd, and 4th digits, so that 9�10�10�10 = 9000 ways. (b)not allowed,There are 9 ways to pick the first digit (it can't be 0), 9 ways to pick the 2nd digit (it can be 0, just not what we picked for the 1st digit), 8 ways to pick the third digit, and 7 ways to pick the fourth digit. That's 9�9�8�7, or 4536 ways. (c) the last digit must be 0 and repetitions are not allowed:We can choose the first digit any of 9 ways, the second digit any of 8 ways, the third digit any of 7 ways and the last digit only 1 way (a 0). That's 9�8�7�1 = 504 ways. Edwin

Alternative approach.

Given any set of $k$ digits, including $0$ that are not to be repeated, the enumeration of how many $k$ digit numbers that can be formed is $$k! - (k-1)!.\tag1$$

The second term expresses the elimination of $0$ as the leftmost digit.

In the present problem, the rightmost digit can be either $1$ or $3$.

Assume, without loss of generality, that it is $3$, complete the enumeration under that assumption, and then multiply the result by $2$, to reflect that the rightmost digit might also be $1$.

With $3$ as the rightmost digit, you then have $(4-1)$ digits remaining, including $0$. Then employ equation (1) above, with $k=3$.

Therefore, the final enumeration is

$$2 \times [(3!) - (2!)].$$