# Anders, Bodil, Cecilia, and David shall receive 4 oranges. In how many ways is this possible if Anders should have at least one?

Anders, Bodil, Cecilia, and David shall receive 4 oranges. In how many ways is this possible if Anders should have atleast one?

My solution:

How many solutions are there to

$$x_{1} + x_{2} + x_{3} + x_{4} = 4$$

where

$$1 \leq x_{1}$$

$$0 \leq x_{2}$$

$$0 \leq x_{3}$$

$$0 \leq x_{4}$$

Substituting

$$y_{1} = x_{1} - 1$$

$$y_{2} = x_{2} - 0$$

$$y_{3} = x_{3} - 0$$

$$y_{4} = x_{4} - 0$$

satisfying

$$y_{1} + y_{2} + y_{3} + y_{4} = 3$$

$$y = (3,0,0,0) \rightarrow 4$$ $$y = (2,1,0,0) \rightarrow 12$$ $$y = (1,1,1,0) \rightarrow 4$$

My answer: 4 + 12 + 4 = 20 I'm basically trying to use the same method as "RMWGNE96" did here: How many solutions are there to $x_{1} + x_{2} + x_{3} + x_{4} = 15$

• Yes, that's right. – stuart stevenson May 24 at 18:11

Your solution is correct (and it is a very good way to solve the problem). As justification, let us compute the number of ways this can be done in a different way, just to double check.

Anders has to have 1, 2, 3, or possibly 4 oranges. If he has 1 orange, the rest will share 3 oranges, and there are $$\binom{3+2}{2} = 10$$ ways to do this (a convenient way to count this is by a stars-and-bars type of argument). If Anders has 2 oranges, the other three share 2 oranges, and there are $$\binom{2+2}{2} = 6$$ ways to do this. Similarly if Anders has 3 oranges, then the others hare 1 orange, and there are $$\binom{1+2}{2} = 3$$ ways to do this. Finally there is precisely 1 way for Anders to have all the oranges.

Adding up, we get $$10 + 6 + 3 + 1 = 20$$ ways to hand out the oranges with Anders having at least 1.

Note: I don't mean to suggest you count them the way I did here---it's much more work, but it's a decent sanity check.

• Hmm okay my teacher for this problem the answer to 29? – Daniel Andersson May 24 at 18:29
• Then they made a mistake somewhere, or perhaps the question they worked isn't quite the question we're working. Maybe double check the question in the book/assignment? – tissuepaper May 24 at 18:34
• Further motivation, if you want: you can calculate the solutions to your equation $y_1 + y_2 + y_3 + y_4 = 3$ by stars-and-bars as $\binom{3+3}{3} = 20$ as well. You can calculate it with generating functions (something like $(x + x^2 + x^3 + x^4)(1 + x + x^2 + x^3 + x^4)^3$ and study the coefficient in front of $x^4$ after expanding)---again the answer is 20. – tissuepaper May 24 at 18:35
• Ok thanks well teachers are humans maybe he did something wrong. – Daniel Andersson May 24 at 18:37

If we ignore the restriction that Anders must receive at least one orange, the number of ways we could distribute the oranges is the number of solutions of the equation $$a + b + c + d = 4$$ in the nonnegative integers. A particular solution of this equation corresponds to the placement of three addition signs in a row of four ones. For instance, $$1 1 + 1 + 1 +$$ corresponds to the solution $$a = 2$$, $$b = 1$$, $$c = 1$$, $$d = 0$$, while $$1 + 1 + 1 + 1$$ corresponds to the solution $$a = b = c = d = 1$$. The number of such solutions is the number of ways we can place three addition signs in a row of four ones, which is $$\binom{4 + 4 - 1}{4 - 1} = \binom{7}{3} = 35$$ since we must choose which three of the seven positions required for four ones and three addition signs will be filled with addition signs.
From these, we subtract the number of ways of distributing the four oranges so that Anders receives none, which is the number of solutions of the equation $$b + c + d = 4$$ in the nonnegative integers, which is $$\binom{4 + 3 - 1}{3 - 1} = \binom{6}{2} = 15$$ Hence, the number of ways the four oranges can be distributed to the four people if Anders receives at least one is $$\binom{7}{3} - \binom{6}{2} = 35 - 15 = 20$$ as you found.