How many $3$-digit numbers are there whose sum of digit is $10$

combinatorics

QUESTION :

How many three digits number are there whose sum of digit is $10$?

I did it by looking all the numbers from $100$ to $999$.

Is there any other approach?

Best Answer

Let the number be $\overline{a b c}$ which satisfies $a+b+c=10$.

Solution 1

We solve the equation for non-negative integers $a,b,c$ first, and the amount of possible solutions is : $$\dbinom{10+2}{2}=66$$

But note that $a \ne 0$, so we must subtract those solutions whose $a=0$.

$$66-\dbinom{10+1}{1}=55$$

But we also have to subtract those solutions whose $a=10$.

$$55-1=54$$

which is the answer.

Solution 2

If $a=1$, then $(b,c)=(0,9),(1,8),(2,7),...,(9,0)$.

If $a=2$, then $(b,c)=(0,8)\sim(8,0)$.

. . .

If $a=9$, then $(b,c)=(0,1),(1,0)$.

So the answer is $10+9+8+7+...+3+2=54$