The number of 4-digit numbers which contain not more than 2 different digits is
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let
There are 7 cases with two different digits:
a b b b , a a b b , a b a b , a b b a , a a a b , a a b a , a b a a
each got 9 × 9 = 8 1 choices , total = 7 × 8 1 = 5 6 7
for single digit number a a a a , there are 9 choices.
So total number of 4-digit numbers which contain not more than 2 different digits = 5 6 7 + 9 = 5 7 6
from 1 to 9 there are 9 digits, first chose 2 out of these in 9C2 ways Now all the four places can be filled in 16 ways 16*9C2 = 576
Problem Loading...
Note Loading...
Set Loading...
Two avoid double-usage of the term 'digit', I'll use 'character' for the symbol and 'digit' for the position.
Consider three cases:
1) There are 9 four-digit numbers that use only one character: 1 1 1 1 , 2 2 2 2 , … , 9 9 9 9 .
2) Now let's count four-digit numbers that have two different characters where neither character is ′ 0 ′ .
There are ( 2 9 ) ways to choose two different characters. There are 2 4 strings of length 4 composed of the two characters, but we must remove the two constant strings from consideration. Thus there are 2 4 − 2 ways to choose the digits for the two characters so that each is used at least once.
Thus there are ( 2 9 ) ∗ ( 2 4 − 2 ) = 3 6 ∗ 1 4 = 5 0 4 four digit numbers that use exactly two different characters.
3) Now we consider four-digit numbers that include the ′ 0 ′ character. There are 9 choices for the other character (which appears in the thousands position).
We must choose a non-empty subset of the other three positions to hold zeros. There are 2 3 − 1 = 7 such subsets of the three other positions.
Thus there are 9 ∗ 7 = 6 3 four-digit numbers that contain exactly two different characters, one of which is ′ 0 ′ .
The total number of four-digit numbers with at most two different characters is thus 9 + 5 0 4 + 6 3 = 5 7 6 .