Question
Question: Find the number of 5 digit numbers that contain the number 7 exactly 1 time (repetition is allowed)....
Find the number of 5 digit numbers that contain the number 7 exactly 1 time (repetition is allowed).
Solution
Here, we have been asked to find the number of 5 digit numbers which contain 7 only once. For this, we will make 2 cases- one where 7 has the first position and the other where 7 has one of the other 4 positions. Then we will see in how many ways the other positions can be filled in both cases and the final answer of each case will be the product of the number of ways each position can be filled. Then we will add the results of both the cases and hence we will get the total number of 5 digit numbers which contain 7 only once. Thus, we will get an answer.
Complete step-by-step solution:
Here, to find the number of 5 digit numbers that contain 7 exactly once, is found as follows:
We will make two cases here, one where 7 has the first position and the other where 7 has one of the other 4 positions.
Case-1: when 7 has the first position:
When 7 has the first position among the 5 positions, the number will look something like as follows:
\underset{\scriptscriptstyle-}{7}\ \\_\ \\_\ \\_\ \\_
Now, since 7 only has to come once, it cannot be repeated again. Except for 7, there are now 9 digits, which can be filled in the next 4 positions- 0, 1, 2, 3, 4, 5, 6, 8, and 9.
Now, since repetition is allowed, any one of these 9 digits can be placed in any of the 4 positions. Hence, there are 9 ways to fill all 4 digits separately. Now, since they have to be filled simultaneously, the number of 5 digit numbers which contain 7 only once at the first position is given as: