[Math] How many ways are there to distribute three different pens and nineteen identical pencils…

combinatorics

How many ways are there to distribute three different pens
and nineteen identical pencils to five people, if no person gets more than
two pens, and such that everyone gets at least one pen or pencil?

Attempt 1:

There's C(14 + 5 – 1, 5-1) = C(18, 4) = 3060 ways to distribute 19 pencils to 5 students if each receives at least one pencil.

Do I multiply this result with the result of finding how many ways to distribute the pens? I think I may have misinterpreted the question because the part about everyone getting at least one pen or pencil really confuses me.

Attempt 2:

Case 1: One student gets 2 pens. Choosing the 2 pens is C(3, 2) = 3. Then, 3*5 because there are 5 possible students who can get 2 pens. Now there's only 1 pen to distribute and there's 4 ways of doing that. Next, we have to take away 3 pencils leaving us with 16 pencils to distribute to 5 students.

Let x = pen and y = pencil

2x|x|y|y|y

So there's C(20, 4) = 4845 ways of distributing the pencils. The total for case 1 is 3*5*4*4845 (not sure if we multiply or add the 4845)

Case 2: 3 students receive 1 pen. 3! = 6 ways of distributing the pens. Now we distribute 17 pencils, so C(21, 4) = 5985. The total for case 2 is 6*5985

The overall total is the sum of the two cases, so 326610.

Best Answer

We distribute the pens first.

There are two cases:

  1. The three pens are distributed to three people of the five people.

This can be done in $5 \cdot 4 \cdot 3$ ways since there are five ways of choosing the recipient of the first pen, four ways of choosing the recipient of the second pen, and three ways of choosing the recipient of the third pen.

That leaves two people who have not received a pen. Since each person receives at least one pen or pencil, we give each of those two people one of the $19$ identical pencils. There are now $17$ identical pencils to distribute to $5$ people. Let $x_k$ be the number of remaining pencils distributed to the $k$th person. Then $$x_1 + x_2 + x_3 + x_4 + x_5 = 17 \tag{1}$$ This is an equation in the non-negative integers. The number of solutions of equation 1 is the number of ways four addition signs can be inserted into a row of $17$ ones, which is $$\binom{17 + 4}{4} = \binom{21}{4}$$ since we must choose which four of the $21$ symbols (four addition signs and seventeen ones) will be addition signs. In this case, the number of ways of distributing three different pens and $19$ identical pencils to five people so that each person receives at least one pen or pencil is $$5 \cdot 4 \cdot 3 \cdot \binom{21}{4}$$

  1. The three pens are distributed to two of the five people.

There are five ways of selecting one person to receive two of the three pens. There are $\binom{3}{2}$ ways of selecting which two of the three pens that person receives. There are four ways of selecting the person who receives the third pen. Hence, the number of ways of distributing the pens to two of the five people is $$5 \cdot \binom{3}{2} \cdot 4$$

That leaves three people who have not received a pen. Since each person receives at least one pen or pencil, we give each of those three people one of the $19$ identical pencils. That leaves $16$ pencils to distribute to $5$ people. Let $x_k$ be the number of pencils distributed to the $k$th person. Then $$x_1 + x_2 + x_3 + x_4 + x_5 = 16 \tag{2}$$ Equation 2 is an equation in the non-negative integers with $$\binom{16 + 4}{4} = \binom{20}{4}$$ solutions. In this case, the number of ways of distributing the pens and pencils to the five people so that each person receives at least one pen or pencil is $$5 \cdot \binom{3}{2} \cdot 4 \cdot \binom{20}{4}$$

In total, the number of ways of distributing three different pens and five identical pencils to five people so that no person receives more than two pens and so that each person receives at least one pen or pencil is $$5 \cdot 4 \cdot 3 \cdot \binom{21}{4} + 5 \cdot \binom{3}{2} \cdot 4 \cdot \binom{20}{4} = 60\left[\binom{21}{4} + \binom{20}{4}\right]$$

Related Question