0
$\begingroup$

If $N$ denotes the number of natural numbers less than $10^{4}$ whose sum of digits is equal to $7$, determine $\frac{N}{120}$

$\endgroup$

closed as off-topic by Zev Chonoles, Jennifer, Hurkyl, Namaste, Ken Duna Mar 14 '17 at 14:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Zev Chonoles, Jennifer, Hurkyl, Namaste, Ken Duna
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Hint : Count the number of solutions to $a + b + c + d = 7$ where $0 \le a, b, c, d \le 7$ using the Inclusion-Exclusion principle and the Stars and Bars method. $\endgroup$ – Yiyuan Lee Mar 14 '17 at 9:05
  • $\begingroup$ There are $120$ natural numbers below $10^4$ with digit sum $7$, so the result is $1$ $\endgroup$ – Peter Mar 14 '17 at 9:20
  • $\begingroup$ Did you arrive at that using the method yiyuan specified? $\endgroup$ – Saakshya Devat Mar 14 '17 at 9:21
  • $\begingroup$ To be honest, with a computer program. But it should not be too difficult to do it by hand. $\endgroup$ – Peter Mar 14 '17 at 9:21
  • $\begingroup$ Ok, thank you both for your feedback. $\endgroup$ – Saakshya Devat Mar 14 '17 at 9:29
3
$\begingroup$

The problem is the same as count the ways you can distribute 7 balls into 4 urns described here. Setting $n=7$ (number of balls) and $k=4$ number of urns the result becomes:

$$\binom{n+k-1}{n}=\binom{10}{7} = {10!\over7!3!} = {10\cdot 9\cdot 8\over1\cdot 2\cdot3} = 120$$

Then dividing that by $120$ you get $1$.

$\endgroup$
0
$\begingroup$

We have to count the admissible decimal strings in the range $0000-9999$.

To this end we list all partitions of $7$ into $\leq4$ parts and pad them with zeros: $$7000,6100,5200,5110,4300,4210,4111,3310,3220,3211,2221\ .$$ Each of these strings can be permuted in $4$ ways $(7000,4111,2221)$, in $24$ ways $(4210)$, or in $12$ ways (the remaining ones), giving a total of $120$ admissible strings.

I don't think it pays to set up an inclusion-exclusion scheme.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.