Solve the following question and mark the best possible option.
Using the digits 1,2 find the number of natural numbers, which are smaller than 2 × 108.
Options
512
255
256
766
Solution
The number can contain maximum of 9 digits and for every place, there are 2 choices either 1 or 2.
If no. is 1-digited = 2 nos. are possible
If no. is 2-digited = 22 nos. are possible
If no. is 3-digited = 23 nos. are possible
If no. is 4-digited = 24 nos. are possible
If no. is 5-digited = 25 nos. are possible
If no. is 6-digited = 26 nos. are possible
If no. is 7-digited = 27 nos. are possible
If no. is 8-digited = 28 nos. are possible
If no. is 9-digited = first place can be filled in the way i.e. by taking 1. Reaming 8 places can be filled either by 1 or by 2 i.e. 2 choices. So, 1 x 28 nos. are possible in this case.
So, required answer = (21 + 22 + ------ + 28) + 28 = 766.