How well can you add?

Find the number of 8-digit numbers the sum whose digits is 4.

120 105 156 198

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.

4 solutions

Jan Hrček
Jun 25, 2015

Simple solution using stars and bars: We can image any combination of 8 digits that adds up to 4 as 8 boxes (represented by 7 "bars" as separators between boxes) into which 4 stars are distributed. For example 30001000 -> xxx||||x|||

In order for such combination to form an 8 digit number, it must not start with 0. Therefore we put the first star in the first box. Now we just need to distribute remaining 3 stars into 8 boxes. There are ( 7 + 3 3 ) = 120 {{7 + 3} \choose 3} = 120 ways of doing that.

We can also distribute 4 stars in 8 boxes, but we have to take out the numbers starting with 0, which is distributing 4 starts in 7 boxes:

C 4 8 C 4 7 \overline{C}^8_4-\overline{C}^7_4 = ( 7 + 4 4 ) ( 6 + 4 4 ) = 330 210 = 120 ={{7+4} \choose 4}-{{6+4} \choose 4}=330-210=\boxed{120} .

Laurent Shorts - 4 years, 4 months ago
Patrick Bourg
Feb 5, 2015

Interpret the 8 digit number as a string of 8 numbers { 0 , 1 , 2 , 3 , 4 } \in \{0,1,2,3,4\} . Note that we cannot have a digit strictly larger than 4, or else the sum of the digits will evidently be at least 5.

Denote this string of numbers as : { a 1 , a 2 , , a 8 } \{a_1,a_2, \cdots , a_8 \} , where a 1 a_1 denotes the units digit of our number.

Now, for our number to the made up of 8 digits, we require : a 8 0 a_8 \neq 0 . Hence, we proceed by a case-to-case analysis :

  • C a s e 1 : a 8 = 4 Case \ 1 : a_8 = 4

Here, we need to set a i 0 , i = 1 , , 7 a_i \equiv 0, \quad \forall i=1, \cdots,7

Number of possibilities : 1

  • C a s e 2 : a 8 = 3 Case \ 2 : a_8 = 3

For the sum to be 4, we need one of the a i a_i 's to be 1 and the others 0.

Number of possibilities : 7 (7 choices to choose which a i = 1 , i { 1 , , 7 } a_i =1, \ \ i \in \{1, \cdots,7\} )

  • C a s e 3 : a 8 = 2 Case \ 3 : a_8 = 2

Here we have 2 sub cases : either we set only 1 other digit to be 2 and the others 0, or we set 2 digits to be 1.

Number of possibilities : 7 + C 7 2 = 7 + 21 = 28 7+C^2_7 = 7+21 = 28

  • C a s e 4 : a 8 = 1 Case \ 4 : a_8 = 1

3 sub cases here : exactly digit is 3, one digit is 1 and another 2 or three digits are 1.

Number of possibilities : 7 + 2 C 7 2 + C 7 3 = 7 + 42 + 35 = 84 7 + 2*C^2_7+C^3_7 = 7+42+35 = 84

Hence, total number is : 1 + 7 + 28 + 84 = 120 1+7+28+84 = \boxed{120}

Ayush Kumar
Jun 3, 2015

Number of combinations whose sum is 4 are: 1111,22,31,40,112

1111: we have to make 8 digit number by 1111.this can be done in 7C3 ways =35ways

22: eight digit number can be made in 7C1 ways=7 .

31: first fix 3 to the largest place value and arrange '1' at seven places by 7C1 ways=7ways. Next fix 1 to the largest place value and arrange'3' at remaining seven places by 7C1 ways=7 ways

40: eight digit number can be made in only one way=1

112: fix'1'to the largest place value then the remaining seven places can be filled in 7P2 ways=42 Fix'2'to the largest place value then the remaining seven places can be filled in 7C2 ways=21ways

TOTAL NUMBER OF COMBINATIONS TO FORM EIGHT DIGIT NUMBER WHOSE SUM IS 4 IS=35+7+7+7+1+42+21=120

Suppose the number is a 1 a 2 a 3 ... a 8 .The possible values of a_1 are 1, 2, 3, 4. We consider these four cases.

If a_1 = 4 then all other digits are 0 (since sum of digits is 4). Hence there is only 1 such number.

If a_1 = 3 then exactly one of the other 7 digits is 1. Hence there are 7 such numbers (depending on where the digit ‘1’ is).

If $latex a_1 = 2 $ then sum of the other seven digits is 2.

Hence we compute the number of non negative integer solutions of $latex a 2 + … + a 8 = 2 $ .

This equals \binom {6+2}{2} = 28

If a_1 = 1 then sum of the other seven digits is 3.

Hence we compute the number of non negative integer solutions of a 2 + ... + a 8 = 3

This equals \binom {6+3}{3} = 84

Hence the answer is 120.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...