© All Rights reserved @ LearnWithDash
Step-by-Step Solution
Step 1: Understand the Problem
We are looking at 4-digit natural numbers (from 1000 to 9999) that have exactly one digit equal to 7. Out of all such numbers, we want to find the probability that a randomly chosen number in this set leaves a remainder of 2 when divided by 5.
Step 2: Total Number of Favorable 4-Digit Numbers with Exactly One Digit 7
Let the 4-digit number be represented as $D_1 D_2 D_3 D_4$, where $D_1 \neq 0$.
We need to count how many such numbers contain exactly one digit 7.
Case 1: The digit 7 is in the thousands place ($D_1$)
$D_1 = 7$: This is fixed as 7.
$D_2, D_3, D_4$ cannot be 7 and can be any of the remaining 9 digits (0–9 except 7).
Number of possibilities: $9 \times 9 \times 9 = 9^3$.
Case 2: The digit 7 is not in the thousands place
$D_1$ can be any digit from 1 to 9 except 7, so 8 choices.
Exactly one of $D_2, D_3, D_4$ is 7; the other two are from the 9 possible digits excluding 7.
The digit 7 can occupy any one of the three positions $D_2, D_3,$ or $D_4$. Hence there are 3 ways to place 7 in those three positions.
For each placement of 7, the remaining two positions have $9 \times 9$ choices.
Number of possibilities in this case: $8 \times 3 \times 9 \times 9$.
Hence, the total number of valid 4-digit numbers, denoted by $n(S)$, is:
$n(S) = 9^3 + 8 \times 3 \times 9 \times 9.$
Simplify:
$9^3 = 729,$
$8 \times 3 \times 9 \times 9 = 8 \times 3 \times 81 = 1944,$
So,
$n(S) = 729 + 1944 = 2673.$
Step 3: Identify Numbers That Leave a Remainder 2 When Divided by 5
A number leaves a remainder of 2 when divided by 5 if and only if its last digit ($D_4$) is either 2 or 7, because $2 \bmod 5 = 2$ and $7 \bmod 5 = 2.$ We must count how many of the previously identified 4-digit numbers (with exactly one digit 7) also satisfy the condition on the last digit.
Subcase 1: Last digit $D_4 = 7$
If $D_4$ is 7, then that is the only 7 in the entire number. Hence $D_1, D_2, D_3$ cannot be 7.
$D_1$ ranges from 1 to 9 but cannot be 7, giving 8 choices.
$D_2, D_3$ each can be any digit from 0 to 9 except 7, giving 9 choices each.
Number of such numbers: $8 \times 9 \times 9 = 648.$
Subcase 2: Last digit $D_4 = 2$
Now the 7 must be in one of the first three digits $D_1, D_2,$ or $D_3$, exactly once.
We count the ways to place exactly one 7 in $D_1, D_2, D_3$:
If $D_1 = 7$, then $D_2, D_3$ are from 0–9 except 7: $9 \times 9 = 81$ ways.
If $D_2 = 7$, then $D_1$ is from 1–9 except 7 (8 ways), and $D_3$ is from 0–9 except 7 (9 ways): $8 \times 9 = 72$ ways.
If $D_3 = 7$, then similarly $D_1$ has 8 ways and $D_2$ has 9 ways: again $72$ ways.
Total for this scenario: $81 + 72 + 72 = 225.$
$D_4 = 2$ is fixed.
Hence, number of such numbers: $225.$
Thus, the number of numbers (with exactly one digit 7) that leave a remainder of 2 when divided by 5 is:
$n(E) = 648 + 225 = 873.$
Step 4: Calculate the Required Probability
The probability $P(E)$ is the ratio of favorable outcomes $n(E)$ to the total outcomes $n(S)$:
$P(E) = \dfrac{n(E)}{n(S)} = \dfrac{873}{2673}.$
We simplify by noting that $873 = 9 \times 97$ and $2673 = 9 \times 297,$ so
$P(E) = \dfrac{97}{297}.$
Step 5: Final Answer
Therefore, the probability that a randomly chosen 4-digit number (with exactly one digit 7) leaves a remainder of 2 when divided by 5 is
$\displaystyle \frac{97}{297}.$