Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store
seo-qna
SearchIcon
banner

How many 4-digit numbers are there which contain not more than two different digits?


Answer
VerifiedVerified
506.1k+ views
Hint: Use the fundamental principle of counting which states if the number of ways of doing a task A is m, and the number of ways of doing a task B is n, then the number of ways of doing both the tasks is mn. Use the fact that the formation of a four-digit number is equal to the filling of four decimal places with the place on the leftmost position to be filled with a non-zero numeral. Divide the formation of a number in three cases. Case I being using 0 and any one of the numbers 1-9 , Case II being using any two of the numbers 1-9 and Case III being using only one of the numbers from 1-9. Use the fundamental principle of counting to find the total number of numbers which can be constructed in each case. Hence find the total number of numbers containing no more than two different digits.

Complete step-by-step answer:
Since 0 cannot be placed in the units place, we consider the three cases as follows
Case I: When 0 and any of the digits from 1-9 both are used.
Any number from 1-9 can be selected in $^{9}{{C}_{1}}=9$ ways.
Now for filling thousands of places, we have 1 choice(The non-zero numeral selected).
For each of the rest of the places, we have 2 choices(0 and the non-zero numeral selected)
But one number is formed in which 0 is not at all used.
We remove that number from our total count
Hence the total number of numbers which can be formed $=9\times 1\times \left( 2\times 2\times 2-1 \right)=63$

Case II: When any two of the digits from 1-9 is used
Two numbers from 1-9 can be selected in $^{9}{{C}_{2}}=\dfrac{9!}{7!2!}=36$ ways.
Now for the thousands place, we have 2 choices
For the hundreds place, we have 2 choices
For tens place, we have 2 choices
For units place, we have 2 choices.
But this count includes two numbers which contain only one number. We remove those two numbers.
Hence the total number of number which can be formed $=36\left( 2\times 2\times 2\times 2-2 \right)=288$

Case III: When only one of the numbers 1-9 is used.
One number from 1-9 can be selected in $^{9}{{C}_{1}}=9$ ways
Now for each of the four places, we have 1 choice
Hence the total number of numbers, which can be formed $=9\times \left( 1\times 1\times 1 \right)=9$
Hence the total number of four-digit numbers, which have no more than two different digits is $63+288+9=360$


Note: In these types of questions, students usually get confused when to use addition and when to use multiplication. It can be noted that if both the tasks need to be done the use multiplication and if either of the tasks needs to be done, then used addition.