How many numbers???

How many three digit numbers are there such that the sum of the digits in each number is 10.


The answer is 54.

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.

9 solutions

Dieuler Oliveira
Jul 21, 2014

First, let's count all numbers such that x + y + z = 10 x+y+z=10 :

The number of solutions of this problems is: ( 12 2 ) = 66. \binom{12}{2}=66.

Now we take out the following solutions:

i) The ones which contain 10:

( 10 , 0 , 0 ) , ( 0 , 10 , 0 ) , ( 0 , 0 , 10 ) {(10,0,0),(0,10,0),(0,0,10)} : 3 solutions.

ii) The ones which begin with 0:

( 0 , 1 , 9 ) , ( 0 , 2 , 8 ) , . . . , ( 0 , 9 , 1 ) {(0,1,9),(0,2,8),...,(0,9,1)} : 9 solutions.

The number of solutions is then: 66 3 9 = 54 . 66-3-9=\boxed{54}.

Why (12P2)?

Ryan Tamburrino - 6 years, 8 months ago

how could it be : 12P2 ?

dark seer - 6 years, 9 months ago

Log in to reply

The way to obtain 12C2 is to use stars and bars . You can imagine each solution to a + b + c = 10 a + b + c = 10 as a configuration of 10 stars distributed into 3 distinct boxes. You can represent the 3 boxes as 2 "dividers" between boxes. For example the solution 3+2+5 can be represented as xxx|xx|xxxxx.

So the number of distinct solutions to this equation is equal to the number of configurations of 10 stars & 2 bars, which is ( 12 2 ) 12 \choose 2 , which corresponds to choosing two places for the two bars from 12 places that can contain either star or bar. Got it?

Jan Hrček - 5 years, 11 months ago

What is 12P2???

Anuj Shikarkhane - 6 years, 9 months ago

To Dark Seer: The number of nonnegative integer solution in x1 + x2 + x3 + ... + xN = r is C(n+r-1, r)

Clifford Lesmoras - 6 years, 9 months ago
Hs N
Jul 21, 2014

Since we are only dealing with small numbers, we can essentially write down all options easily. The following is basically the same solution as B. Charlesworth's, but without invoking any star, nor bar.

We can begin by listing all possible triples having sum 10 10 : { ( 0 , 1 , 9 ) , ( 0 , 2 , 8 ) , ( 0 , 3 , 7 ) , ( 0 , 4 , 6 ) , ( 0 , 5 , 5 ) , ( 1 , 1 , 8 ) , ( 1 , 2 , 7 ) , ( 1 , 3 , 6 ) , ( 1 , 4 , 5 ) , \{(0,1,9),(0,2,8),(0,3,7),(0,4,6),(0,5,5),(1,1,8),(1,2,7),(1,3,6),(1,4,5), ( 2 , 2 , 6 ) , ( 2 , 3 , 5 ) , ( 2 , 4 , 4 ) , ( 3 , 3 , 4 ) } (2,2,6),(2,3,5),(2,4,4),(3,3,4)\} . First we consider triples that do not contain 0 0 . There are two different cases: i) A triple consisting of three different numbers. This corresponds to 6 6 solutions, since there are six permutations of these digits. This gives 4 6 = 24 4\cdot 6=24 numbers. ii) A triple containing a number twice. In these cases, there are three numbers consisting of the given digits and since there are four such triples, this gives 4 3 = 12 4\cdot 3=12 numbers.

Now for the cases where 0 0 is included in the triple, it is slightly different since a three-digit number does not start with 0 0 and thus we get numbers of the form a b 0 ab0 or a 0 b a0b . This gives 4 4 numbers for each triple where the three digits are different (so 4 4 = 16 4\cdot4=16 in total) and 2 2 numbers for the triple ( 0 , 5 , 5 ) (0,5,5) .

All in all, the total number of options thus is 24 + 12 + 16 + 2 = 54 24+12+16+2=54 .

Shrivathsa Bhat
Aug 12, 2014

Python Rocks :D

>>> for n in range(100,999):

...............if n%10 + (n/10)%10 + (n/100)%10 == 10:

.......................count = count + 1

>>>print count

54

if you want to loop over all 3-digit numbers, it should be range(100, 1000)

John Phillip Lapidez - 6 years, 9 months ago

We need to count all numbers of the form a b c abc where:

(i) b b and c c are between 0 0 and 9 9 inclusive,

(ii) 1 a 9 1 \leq a \leq 9 , and

(iii) a + b + c = 10 a + b + c = 10 .

First we'll count all such numbers that do not have 0 0 as one the digits. This will be the same as determining the number of solutions to the equation a + b + c = 10 a + b + c = 10 where each of a , b a, b and c c are between 1 1 and 9 9 inclusive. This is a 'stars and bars' calculation with solution ( 9 2 ) = 36 \dbinom{9}{2} = 36 .

(Check out Theorem 1 in this link for an explanation of this calculation: link )

Next, we need to count those numbers that contain 0 0 as one of the digits. (Note that we can't have two digits that are 0 0 , since then the maximum sum of the digits would then only be 9 9 ). Since 0 0 can't be the first digit, we must either have 0 0 as the second digit or 0 0 as the third digit, (and not both at the same time). Thus we need to find the number of solutions to each of the equations (i) a + c = 10 a + c = 10 , and (ii) a + b = 10 a + b = 10 , where in each case a , b a, b and c c are between 1 1 and 9 9 inclusive. Again using the 'stars and bars' approach, the number of solutions in each of these cases is ( 9 1 ) = 9 \dbinom{9}{1} = 9 .

Thus the total number of three digits numbers whose digits sum to 10 10 is 36 + 9 + 9 = 54 36 + 9 + 9 = \boxed{54} .

Exact same approach, except for the second part. I just said for a number ABC involving one 0, there are 9 options for the first digit A , then two for the second B (being 0 or 10-A). The third digit C will be the one that wasn't used for B. Thus, 9 2 1=18.

Nicolas Bryenton - 6 years, 10 months ago
Anoir Trabelsi
Jul 18, 2014

10+9+8+7+...+2 = 55 - 1 = 54

Sum equals to 10 : 100 to 200 => {109,118,127,136,145,154,163,172,181,190}=>10
200 to 300 => {208,217,26,235,244,253,262,271,280} =>9
.
.
.
900 to 999 =>{901,910}=>2
Sum=>10+9+8+7+6+5+4+3+2=54





Laurent Shorts
Feb 4, 2017

Distribute 10 stars among three places (the digits): C 10 3 = ( 12 10 ) = 66 \overline{C}^3_{10}={12 \choose 10}=66 . First digit cannot be 0, so take away distributions of 10 stars among two places C 10 2 = ( 11 1 ) = 11 \overline{C}^2_{10}={11 \choose 1}=11 . There's one last impossible number: one starting with 10 for first digit. There is 66 11 1 = 54 66-11-1=\boxed{54}

It's possible to get 55 = 66 11 55=66-11 with C 9 3 = ( 11 9 ) = 55 \overline{C}^3_9={11 \choose 9}=55 : put one star in the first digit place to avoid 0, then place 9 other stars.

Bk Lim
Dec 13, 2014

o _ _ _ _ _ _ _ _ _ _ _ One stone at front because a three-digit cannot start with "zero hundred". Followed by 11 places: 9 for stars and 2 for bars. 11C2=55. However, we can't place both the bars at the last 2 place, otherwise it would be "10"00, which is 4 digits. So 55-1=54

Bill Bell
Jul 21, 2014

Brute force, in Python:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
>>> count=0

>>> for N in range ( 100, 1000 ) :

...     if sum([int(p) for p in str(N) ]) == 10 :

...         count += 1

...     

>>> count

54

Alternatively, using the sympy library to solve the Diophantine equation a+b+c=10:

1
2
3
4
5
6
7
8
9
>>> from sympy import *

>>> a,b,c=symbols('a b c')

>>> from sympy.solvers.diophantine import diophantine

>>> diophantine(a+b+c-10)

set([(t, -c - t + 10, c)])

Now let t range through the values from 1 through 9 to obtain a, c from 0 through 9, and calculate b using the middle expression (counting the number of times the three add to 10 as a check).

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...