How many 3 digit positive integers N = a b c are there, such that the digit sum of N (i.e. a + b + c ) is equal to 18?
Details and assumptions
The number 0 1 2 = 1 2 is a 2-digit number.
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.
Most students did a case by case analysis, either from sets of numbers a + b + c = 1 8 , or looking at the hundreds digit. John shows us a procedure of dealing with the conditions a , b , c , ≤ 9 in a more general way by using the Principle of Inclusion and Exclusion.
Lawrence presents an interesting interpretation of the a + b + c = 1 8 condition to quickly count the number of ways.
There are obviously 1 1 1 − 1 2 + 1 = 1 0 0 numbers from 100 to 999 divisible by 9. Now, if a number has digit sum 18 it is clearly divisible by 9. There is one number with digit sum 27 from 100 to 999 (namely, 999). How many of them have digit sum 9? This is just a standard balls and urns problem, and the answer is simply ( 2 1 1 ) − 1 0 = 4 5 . The reasoning behind this math? The − 1 0 comes from the 10 numbers less than 100 with digit sum 9. The ( 2 1 1 ) comes from the fact that that is the number of solutions to a + b + c = 9 where a , b , c are nonnegative integers.
Hence it follows the number of numbers with digit sum 18 is 1 0 0 − 4 5 − 1 = 5 4 , the desired answer.
Since a cannot be 0 then a = { 1 , 2 , 3 , . . . , 9 } , Let a = 1 , then ( b , c ) = { ( 8 , 9 ) , ( 9 , 8 ) } , thus there are 2 when a = 1 ; Let a = 2 , then ( b , c ) = { ( 7 , 9 ) , ( 9 , 7 ) , ( 8 , 8 ) } , thus there are 3 when a = 2 ; Let a = 3 , then ( b , c ) = { ( 6 , 9 ) , ( 9 , 6 ) , ( 8 , 7 ) , ( 7 , 8 ) } , thus there are 4 when a = 3 ; Hence, for all values of a , there are a + 1 three digit number that satisfy the condition, thus: 2 + 3 + 4 + . . . + 1 0 = 2 9 ( 2 + 1 0 ) = 5 4 there are 5 4 three digit number.
For 3 digit numbers with distinct digits, you can list out all the different summations of 18 with distinct addends, which are: 189 279 378 269 468 459 567 There are 7 of these, which each have 6 permutations, so there are 42 3 digit numbers with distinct digits. For numbers with 2 digits being the same, there are only 3: 288 477 558. There are 3 permutations for each of these so there are 9 total. There are special cases we need to count, being 666, which is 1 additional number, and 909 and 990, which have the zero in them, adding 2 more. So the answer is 42+9+1+2=54
Let us do this problem using permutations as follows... Consider all possible three digit arrangements given here The three digits are - 9 9 0 & possible permutations are - 2 The three digits are - 9 8 1 & possible permutations are - 6 The three digits are - 9 7 2 & possible permutations are - 6 The three digits are - 9 6 3 & possible permutations are - 6 The three digits are - 9 5 4 & possible permutations are - 6 The three digits are - 8 8 2 & possible permutations are - 3 The three digits are - 8 7 3 & possible permutations are - 6 The three digits are - 8 6 4 & possible permutations are - 6 The three digits are - 8 5 5 & possible permutations are - 3 The three digits are - 7 7 4 & possible permutations are - 3 The three digits are - 7 6 5 & possible permutations are - 6 The three digits are - 6 6 6 & possible permutations are - 1 Therefore the total number of three digit numbers whose digit sum is equal to 18 is = 2 + 6 + 6 + 6 + 6 + 3 + 6 + 6 + 3 + 3 + 6 + 1 = 54
Consider the case a = 1. Therefore, b + c = 17. There are two solutions: (1, 9, 8) and (1, 8, 9). Consider more generally the case a = k, where 1<=k<=9. Similarly, we see that b + c =18 - k. This has k + 1 solutions because b can range from any number from 9 to (9-k) and c is then uniquely determined. Therefore, the answer is 2 + 3 + ... + 10 = 10 *11 / 2 - 1 = 54; note that we are not including 1 in the sum because this corresponds to the case a = 0.
Assuming first digit to be 1, only 2 numbers can be formed 198 and 189. If the first digit is 2, 3 combinations are possible-297,288,279 Similarly, we'll get a series from digit 1 (198,189) with 2 possible solutions to digit 9 (990,81,72,...27,18,09) with 10 possible solutions. Summing them up gives 54.
First, list the possible number combinations starting from the highest value. Then, compute and add the number of possible permutations for each of the listed combinations.
990 - 2
981 - 6
972 - 6
963 - 6
954 - 6
882 - 3
873 - 6
864 - 6
855 - 3
774 - 3
765 - 6
666 - 1
Total = 54
18 is consisting of two different digits: (0 9 9) ,(2 8 8), (4 7 7), (5 5 8) three different digits (1 8 9), (2 7 9),(3 6 9), (3 7 8), (4 5 9), (4 6 8), (5 6 7), one digit (6 6 6).We know that the combinations of two different digits is 3 ((because 099 doesn't account,so the for (0 9 9)there are only 2 ways); the combinations of three different digits is 6; the combinations of one digit is 1. So let us gather these data together by using 2+3 3+6 7+1=54
Solution 1: First, let us ignore the restriction that a = 0 . We seek the number of integers 0 ≤ a , b , c ≤ 9 such that a + b + c = 1 8 . Set x = 9 − a , y = 9 − b , z = 9 − c . Then, we want the number of integers 0 ≤ x , y , z ≤ 9 such that x + y + z = 9 . This creates a bijection between the 2 sets.
From the well known bars and stripes argument, there are ( 2 1 1 ) = 5 5 non-negative integer solutions to the equation x + y + z = 9 . Since these are non-negative, it follows that the maximum value of x , y or z is going to be 9. Hence, any set of non-negative integers that satisfy x + y + z = 9 also satisfy the additional constraint that 0 ≤ x , y , z ≤ 9 . Thus, there are 5 5 sets of solutions in all.
From the bijection established in the first paragraph, it follows that there are 5 5 sets of 3 digits that sum up to 18. Since we further require that a = 0 , which only happens in the case ( a , b , c ) = ( 0 , 9 , 9 ) , hence there are 5 5 − 1 = 5 4 sets of solutions in all.
Solution 2: We perform a case by case analysis, based on the value of the first digit. For a = k = 0 , we can check that there are k + 1 values of b and c that satisfy the given conditions. Hence, there are 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 0 = 5 4 such 3-digit numbers.
Problem Loading...
Note Loading...
Set Loading...
For non-negative integers a , b and c , the equation a + b + c = 1 8 has ( 2 2 0 ) = 1 9 0 solutions.
However, this also counts the cases where a , b or c is greater than 9 . We should discount these cases.
Let 1 0 ≤ a ≤ 1 8 . The equation b + c = 1 8 − a has ( 1 1 8 − a + 1 ) = ( 1 1 9 − a ) = 1 9 − a solutions.
a = 1 0 ∑ 1 8 1 9 − a = a = 1 ∑ 9 a = 2 9 ( 9 + 1 ) = 4 5 solutions.
By symmetry, there are also 45 solutions in cases where b or c is greater than 9 . Also, note that there will never be a case where two of a , b or c are greater than or equal to 1 0 since 1 0 + 1 0 = 2 0 > 1 8 .
We should also determine the number of solutions where a = 0 , since a represents the first digit of a 3 -digit number. Since we already know the number of ways where a , b or c is greater than 9 , we are only concerned with cases such that a = 0 and b and c are less than 1 0 . There is only one such case, namely, ( 0 , 9 , 9 ) .
Thus, the desired number is 1 9 0 − 3 × 4 5 − 1 = 5 4 .