Different digit

The number of 4-digit numbers which contain not more than 2 different digits is

567 504 576 513

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.

3 solutions

Richard Desper
Dec 8, 2020

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 9 four-digit numbers that use only one character: 1111 , 2222 , , 9999 1111,2222,\ldots,9999 .

2) Now let's count four-digit numbers that have two different characters where neither character is 0 '0' .

There are ( 9 2 ) {9 \choose 2} ways to choose two different characters. There are 2 4 2^4 strings of length 4 4 composed of the two characters, but we must remove the two constant strings from consideration. Thus there are 2 4 2 2^4 - 2 ways to choose the digits for the two characters so that each is used at least once.

Thus there are ( 9 2 ) ( 2 4 2 ) = 36 14 = 504 {9 \choose 2} * (2^4 -2) = 36*14 = 504 four digit numbers that use exactly two different characters.

3) Now we consider four-digit numbers that include the 0 '0' character. There are 9 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 2^3 -1 = 7 such subsets of the three other positions.
Thus there are 9 7 = 63 9*7=63 four-digit numbers that contain exactly two different characters, one of which is 0 '0' .

The total number of four-digit numbers with at most two different characters is thus 9 + 504 + 63 = 576 9+504+63 = 576 .

Pop Wong
Jan 1, 2021

Let

  • a a be 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 {1,2,3,4,5,6,7,8,9}
  • b b be 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 {0,1,2,3,4,5,6,7,8,9} but a \neq a

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 abbb, aabb, abab, abba, aaab, aaba, abaa

each got 9 × 9 = 81 9\times9 = 81 choices , total = 7 × 81 = 567 = 7 \times 81 = 567

for single digit number a a a a aaaa , there are 9 9 choices.

So total number of 4-digit numbers which contain not more than 2 different digits = 567 + 9 = 576 = 567 + 9 = \boxed{576}

Shashank Rustagi
Mar 16, 2021

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

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...