0
$\begingroup$

How many ways are there to select $300$ chocolate candies from seven types of candy if each type comes in boxes of $20$ and if at least one but not more than five boxes of each type are chosen?

Can I get some help on this?

Edit: Preferably, using generating functions.

$\endgroup$
  • $\begingroup$ Do you have to take the whole box each time? or you can take, say, two candies from one box? $\endgroup$ – Dennis Gulko Nov 6 '13 at 7:47
  • $\begingroup$ I'm assuming that you're suppose to take each candy individually. $\endgroup$ – gandolf Nov 6 '13 at 7:57
1
$\begingroup$

Hint: the generating function for the number of candies of one type is $$x^{20} + x^{40} + x^{60} + x^{80} + x^{100}$$ So the generating function for the number of candies of seven types is...

$\endgroup$
0
$\begingroup$

If I understand your question correctly:
let $x_i$ be the number of candies chosen of type $i$. Then $1\leq x_i\leq 100$. You want to find the number of solutions to $\sum_{i=1}^7x_i=300$.
To solve this - first take one candy of each type. It remains to solve $\sum_{i=1}^7x_i=293$ for $0\leq x_i\leq 99$. This is equivalent to the number of ways to distribute $293$ balls into $7$ cells. Do you know how to continue?

$\endgroup$
  • $\begingroup$ Why would you take $7$ of each type if the restriction is that the number of different types $x_i$ is $1 \leq x_i \leq 5$ $\endgroup$ – gandolf Nov 6 '13 at 8:12
  • $\begingroup$ I do not understand you comment - where did I take $7$ of each type? $\endgroup$ – Dennis Gulko Nov 6 '13 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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