2

I'm trying to think through this problem and seem to be going about it wrong. The first part is

The vending machine is broken and accidentally dispensed 14 (identical) chocolate bars. How many ways can you share them between your 5 closest friends and yourself (without any restrictions)?

I thought this would be C(14,5) = 2002 but thats wrong, why is that wrong? Is it not as simple as share 14 bars between 5 people?

How many ways can you share these 14 bars, if each of you is to get at least one?

I tried this too and I did it as theres 9 bars left after giving everyone 1 bar so it should be C(9,5) = 126?

How many ways can you share these 14 bars, if each of you is to get at least two?

I haven't tried this one as I'm completely confused at this point.

Any tips would be so appreciated!

N. F. Taussig
  • 76,571
Ciara
  • 21
  • 1
    Note that it says "5 closest friends and yourself", so there are 6 people in total. Even then, your method is incorrect - refer to @Parcly's answer :) – Gareth Ma Nov 06 '21 at 16:18
  • 1
    See this: https://en.wikipedia.org/wiki/Stars_and_bars_(combinatorics)#:~:text=In%20the%20context%20of%20combinatorial,his%20classic%20book%20on%20probability. – Math Lover Nov 06 '21 at 16:21
  • The "if each of you is to get at least two" is easiest: you allocate $12$ bars automatically and then decide what to do with the last $2$ bars in ${6 choose 1}+{6 choose 2} = {7 choose 2}=21$ ways. This gives the same result as the ${14-2 \times 6+6-1 \choose 6-1}$ you might have tried using stars and bars. The earlier two questions would have the same result as ${14-0 \times 6+6-1 \choose 6-1}$ and ${14-1 \times 6+6-1 \choose 6-1}$ – Henry Nov 06 '21 at 16:29
  • See this answer. In the linked answer, I suggest skimming both the corresponding question and the first part of the answer, which deals with Inclusion-Exclusion, and is therefore somewhat irrelevant. In the linked answer, your primary focus should be the 2nd part of the answer, which focuses on Stars and Bars theory. – user2661923 Nov 06 '21 at 16:46
  • The number $C(14, 5)$ is the number of ways of selecting five of the $14$ chocolate bars, not the number of ways of distributing all $14$ chocolate bars to six different people. – N. F. Taussig Nov 07 '21 at 10:33

2 Answers2

1

The vending machine is broken and accidentally dispensed 14 (identical) chocolate bars. How many ways can you share them between your 5 closest friends and yourself (without any restrictions)?

There are a total of six possible recipients. Let $x_i$, $1 \leq i \leq 6$, be the number of chocolate bars received by the $i$th person. Since $14$ identical chocolate bars are to be distributed to those six people without restriction, $$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 14 \tag{1}$$ is an equation in the nonnegative integers. A particular solution of equation 1 in the nonnegative integers corresponds to the placement of five addition signs in a row of $14$ ones. For instance, $$1 1 1 + 1 1 + 1 1 1 + 1 1 1 1 + 1 1 +$$ corresponds to the solution $x_1 = 3, x_2 = 2, x_3 = 3, x_4 = 4, x_5 = 2, x_6 = 0$. The number of possible distributions is the number of solutions of equation 1 in the nonnegative integers, which is $$\binom{14 + 6 - 1}{6 - 1} = \binom{19}{5}$$ since we must select which five of the nineteen positions required for fourteen ones and five addition signs will be filled with addition signs.

How many ways can you share these 14 bars, if each of you is to get at least one?

Method 1: Give each person a chocolate bar. Let $x_i$ be the number of remaining chocolate bars the $i$th person receives. Since six of the $14$ bars have already been distributed, $14 - 6 = 8$ remain. Since the remaining eight chocolate bars can be distributed without restriction, $$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 8 \tag{2}$$ is an equation in the nonnegative integers. The number of possible distributions is the number of solutions of equation 2 in the nonnegative integers, which is $$\binom{8 + 6 - 1}{6 - 1} = \binom{13}{5}$$ since we must select which five of the thirteen spaces required for eight ones and five addition signs will be filled with addition signs.

Method 2: Since $14$ identical chocolate bars are to be distributed to those six people so that each person receives at least one, $$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 14 \tag{3}$$ is an equation in the positive integers. A particular solution in the positive integers corresponds to the placement of five addition signs in the $13$ spaces between successive ones in a row of $14$ ones. $$1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1$$ For instance, if we fill the second, fourth, fifth, ninth, and twelfth spaces with addition signs, we obtain $$1 1 + 1 1 + 1 + 1 1 1 1 + 1 1 1 + 1 1$$ which corresponds to the solution $x_1 = 2, x_2 = 2, x_3 = 1, x_4 = 4, x_5 = 3, x_6 = 2$. The number of possible distributions is the number of solutions of equation 3 in the positive integers, which is the number of ways we can select which five of the thirteen spaces between successive ones will be filled with addition signs, namely $$\binom{14 - 1}{6 - 1} = \binom{13}{5}$$

How many ways can you share these 14 bars, if each of you is to get at least two?

Give each person two chocolate bars. Since there are six people, that leaves $14 - 6 \cdot 2 = 2$ chocolate bars left to be distributed without restriction.

Method 1: Let $x_i, 1 \leq i \leq 6$, be the number of remaining chocolate bars the $i$th person receives. Since the remaining two chocolate bars can be distributed without restriction, $$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 2 \tag{4}$$ is an equation in the nonnegative integers. Can you proceed?

Method 2: As Henry observed in the comments, either one of the six people will receive both of the additional chocolate bars or two people will receive one additional chocolate bar each. Can you proceed?

N. F. Taussig
  • 76,571
0

This is another stars and bars problem; your lower coefficient of $5$ is correct, representing $5$ bars (not the chocolate bars, but partitions between the persons), but then these bars are considered together with the $14$ or $9$ free stars (chocolate bars). Thus the answers are $\binom{14+5}5$ and $\binom{9+5}5$ respectively.

Parcly Taxel
  • 103,344
  • I believe the second answer should be $\binom{8+5}{5}$, since there are $6$ people in total? – VTand Nov 07 '21 at 08:19