 Noelanijd

2022-07-16

Suppose you are trying to get rid of your leftover Halloween chocolate. You decide to make individualized gift bags to give to your lecturers. You have 4 different types of chocolate to choose from. How many unique gift bags can you create with 10 items per bag such that each bag has at least one of each type of chocolate. kuglatid4

Expert

Step 1
You’re looking for the number of solutions in positive integers to the equation
${x}_{1}+{x}_{2}+{x}_{3}+{x}_{4}=10\phantom{\rule{thickmathspace}{0ex}}.$.
Step 2
This is a standard stars-and-bars problem; the linked article gives you both a formula and a decent explanation and derivation of that formula. Ibrahim Rosales

Expert

Step 1
Assuming we have an infinite repetition number of each type of chocolate or at least 7 pieces of each type of chocolate, then this amounts to the number of positive integral solutions to the equation
${c}_{1}+{c}_{2}+{c}_{3}+{c}_{4}=10$
where $1\le {c}_{i}\le 7$ for each $i\in \left\{1,2,3,4\right\}$. We make the substitution ${x}_{i}={c}_{i}-1$ for each $i\in \left\{1,2,3,4\right\}$.
Step 2
This gives us the equation
${x}_{1}+{x}_{2}+{x}_{3}+{x}_{4}=6$
where $0\le {x}_{i}\le 6$ for each $i\in \left\{1,2,3,4\right\}$. The number of non-negative integral solutions to this equation is $\left(\genfrac{}{}{0}{}{6+4-1}{6}\right)=\left(\genfrac{}{}{0}{}{9}{6}\right)=84$.

Do you have a similar question?