Question
Question: The number of times the digit 3 will be written when listing the integers from 1 to 1000, is \(\le...
The number of times the digit 3 will be written when listing the integers from 1 to 1000, is
(A)269
(B)300
(C)271
(D)302
Solution
Hint: It is clear that we have to form numbers from 1 to 999 only because in 1000 there is no digit 3 now, from 1 to 999 all are 3 digits numbers so let them be of pqr form. Now make all possible cases in which 3 can come for once in this pqr form, then twice or it can come thrice that is in all places. Compute the permutations and combinations to get the answer.
Complete step-by-step solution -
We have to find out the number of digits 3 will be written from 1 to 1000.
So in 1000 there is no digit 3.
Therefore we have to count the number from 1 to 999.
Number from 1 to 999 is of the form pqr.
⇒0⩽p,q,r⩽999
So the number of ways the digit 3 is filled only one time are =3C1
As we know from 0 to 9 the number of digits is 10.
So the remaining digits for the rest of the places are (10 - 1) = 9
So the number of ways for the remaining two places are (9×9)
So number of numbers in which three occurs exactly once are =3C1(9×9)
Now the number of ways the digit 3 is filled two times are =3C2
So the remaining digits for the rest of the places are (10 - 1) = 9
So the number of ways for the remaining one place are (9)
So number of numbers in which three occurs exactly twice =3C2(9)
Now the number of ways the digit 3 is filled three times are =3C3
So number of numbers in which three occurs exactly thrice =3C3
Now we know that if a number has 3 appears twice then we have to multiply numbers by 2 and if a number has 3 appears thrice then we have to multiply numbers by 3.
So the total number of times 3 occurs are
=3C1(9×9)+3C2(9)×2+3C2×3
Now as we know nCr=r!(n−r)!n!
⇒3C1=1!(3−1)!3!=2!3!=3,3C2=2!(3−2)!3!=2!3!=3,3C3=1
So substitute these values in above equation we have,
=3(9×9)+3(9)×2+1×3=243+54+3=300
So this is the required number of ways 3 digits are appearing from 1 to 1000.
Hence option (B) is correct.
Note: Whenever we face such types of problems the key concept is to have a good gist of combination as its physical significance resembles the ways of selecting r entities out of n entities that is (nCr). Understanding the default formula for it also helps solving problems of this kind.