Distinct Digits!

How many integers are there from 1 through 999 that have distinct digits?


The answer is 738.

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.

7 solutions

Number of 1 1 digit numbers with distinct digits = 9 = 9

Number of 2 2 digit numbers with distinct digits = 9 × 9 = 81 = 9×9 = 81

Number of 3 3 digit numbers with distinct digits = 9 × 9 × 8 = 648 = 9×9×8 = 648

Therefore, there are 9 + 81 + 648 = 738 9+81+648= 738 numbers between 1 1 to 999 999 with distinct digits.

This question got edited! I don't know why?

Kushagra Sahni - 5 years, 8 months ago

Log in to reply

who edited?

Dev Sharma - 5 years, 8 months ago

Log in to reply

Earlier 9999 was there in the question and even Swatejas Shivakumar's solution had the answer 5274. But now there is 999 in the question and the answer changed to 738. I think one of the staff members did this I don't know why.

Kushagra Sahni - 5 years, 8 months ago

Log in to reply

@Kushagra Sahni Yes, I posted the question as 9999

Dev Sharma - 5 years, 8 months ago

Same way using permutations

Kushagra Sahni - 5 years, 8 months ago
Jack Rawlin
Oct 13, 2015

We'll say we have a single digit number A \overline{A} , a two-digit number A B \overline{AB} and a three digit number A B C \overline{ABC}

There are 10 10 possible digits to choose from for each letter.

A = 0 , 1 , 2 , . . . , 8 , 9 A = 0, 1, 2, ..., 8, 9

The numbers we're choosing from all have distinct digits so there's 10 10 of them. However we don't include 0 0 since the question gives the lowest number to be 1 1 .

A = 1 , 2 , . . . , 8 , 9 A = 1, 2, ..., 8, 9

This means that for single digit numbers there's 9 9 with distinct digits.

For two-digit numbers:

A = 1 , 2 , . . . , 8 , 9 A = 1, 2, ..., 8, 9

a n d and

B = 0 , 1 , 2 , . . . , 8 , 9 B = 0, 1, 2, ..., 8, 9

Since the digits need to be distinct B A B \neq A so B B only has 9 9 possible choices instead of 10 10 , similar to A . A. This makes the total amount of two-digit numbers with distinct digits equal to 9 9 = 81 9 \cdot 9 = 81 for two-digit numbers.

The same method can be used to determine how many three-digit numbers have distinct digits.

For three-digit numbers:

A = 1 , 2 , . . . , 8 , 9 A = 1, 2, ..., 8, 9

B = 0 , 1 , 2 , . . . , 8 , 9 B = 0, 1, 2, ..., 8, 9

a n d and

C = 0 , 1 , 2 , . . . , 8 , 9 C = 0, 1, 2, ..., 8, 9

B B as said before only has 9 9 possible digits, same with A A . The digit C C needs to be distinct from A A and B B so C B C \neq B and C A C \neq A , this makes it so C C can only be 8 8 different digits. This makes the total amount of three-digit numbers with distinct digits equal to 9 9 8 = 648 9 \cdot 9 \cdot 8 = 648

Adding the three values for numbers with distinct digits together gives us the total amount of numbers with distinct digits between 1 1 and 999 999

9 + 81 + 648 = 738 \boxed{9 + 81 + 648 = \underline{738}}

Jerry Jia
Oct 13, 2015

Case 1, single digit: All of them works 9/9

Case 2, two digits: 11,22,33,44,55,66,77,88,99 don't work well. Therefore we have 81/90

Case 3, three digits: We will have to split into four cases, each single one is inadmissible. We use the total number and minus the inadmissible cases so we can get the admissible cases. Total three digit number First digit can not be 0, so we have 9 Choices (1,2,3,4,5,6,7,8,9) Second and third digits don't matter. So we have 9 x 10 x 10 = 900 Three digit numbers.

Inadmissible case 1, last two digit same: First digit can not be 0, so there is only 9 choices. All two digits you can think of, there are 10 (00,11,22,33,44,55,66,77,88,99), but because it can not be the same with the first number, there is only 9 choices. Inadmissible case 1 we get 9 x 9 = 81 inadmissible cases.

Inadmissible case 2, first two digit same: First two digits can be all double digits excluding 0, therefore we have 9 choices (11,22,33,44,55,66,77,88,99) Last digit can be all digit excluding the digit used for the first two, therefore we have 9 choices. Inadmissible case 2 we get 9 x 9 = 81 inadmissible cases.

Inadmissible case 3, first and last digit same: First and last digit can be all digit other than 0, so we have 9 choices. The middle digit is all digit excluding the first and last digit, so we have 9 choices again. Inadmissible case 3 we get 9 x 9 = 81 inadmissible cases.

Inadmissible case 4, all three digit same: Count with your fingers, there are 9 inadmissible cases (111,222,333,444,555,666,777,888,999)

Therefore for case three we have 900 - 81 - 81 - 81 - 9 = 648 cases.

In total we have 9 + 81 + 648 = 738 admissible cases. We are done!

Another way to do so is straight out into the admissible cases for three digits. With the first digit have 9 choices (exclude 0), second digit have all digit excluding the first one, which is also 9 digits, third digits have all digits except previous two digits, left with 8 choices. 9 x 9 x 8 = 648

But inadmissible cases are easier to comprehend :3 Personal Opinion.

Ryan L.
Oct 9, 2016

Let's look at three cases 1 1 digit, 2 2 digit and 3 3 digit positive integers.

Case 1. We can quickly count the single digit integers ( 1 , 2 , 3 , . . . , 8 , 9 ) (1,2,3,...,8,9) of which there are 9 9 .

Case 2. Now let's look at two-digit integers ( 10 , 11 , 12 , . . . , 97 , 98 , 99 ) (10,11,12,...,97,98,99) . There are 9 9 choices for our first digit since the digits range from 1 1 through 9 9 and there are then 9 9 choices for our second position since we subtract 1 1 to account for the digit we have used for our first slot, but we are allowed to include 0 0 so we also add 1 1 back resulting in 9 1 + 1 = 9 9-1+1=9 choices for our second digit. Thus there are a total of 9 9 = 81 9\cdot9=81 two-digit integers we can form by the rule of product.

Case 3. Finally we look at three-digit integers ( 100 , 101 , 102 , . . . , 997 , 998 , 999 ) (100,101,102,...,997,998,999) . Here again we have 9 9 choices for our first and second position, but only 8 8 for our third position. Thus the total number of three-digit positive integers we can form is 9 9 8 = 648 9\cdot9\cdot8=648 .

By the rule of product we sum the results from each case (since an integer may not be both a two-digit and a three-digit integer simultaneously and these events are mutually exclusive). Therefore our answer is 9 + 81 + 648 = 738 9+81+648=738 .

Ashish Menon
Dec 4, 2015

Number of integers from 1 through 999 with no repeated edges =      Number of integers from 1 with no repeated digits + number of digits from 10 through 99 with no repeated digits +      Number of integers from 100 through 999 with no repeated digits.      = 9 + 9 . 9 + 9 . 9 . 8  = 9 + 81 + 648 = 738. It was a good question!!

Mukesh Malav
Oct 15, 2015

no. of 1 digit no. with distinct digit =9

no. of 2 digit no. with distinct digit =9*9=81

no. of 3 digit no. with distinct digit =8 * 9 * 9=648

total no. of digits which are distinct between 1 to 999 is : 9+81+648=738

Zakir Dakua
Oct 13, 2015

Number of 1 digit numbers with distinct digits = 10p1 - 1 (since 0 is not a number to count here) = 10 - 1 = 9

Number of 2 digit numbers with distinct digits = 10p2 - 9p1 (numbers starting with 0) = 90 - 9 = 81

Number of 3 digit numbers with distinct digits = 10p3 - 9p2 (numbers starting with 0) = 720 - 72 = 648

So result = 9+81+648 = 738

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...