3
  1. $x_1 + x_2 + x_3 + x_4 + x_5 = 100$
  2. $x_1 + x_2 + x_3 + x_4 + x_5 \leq 100$
  3. $x_1 + x_2 + x_3 + x_4 + x_5 < 100$ with all $x_i > 0$

For the first one I said that the answer was $104C4$ and for the second one I said the answer was $105C5$. Are these two correct? If not, how do I do it? As for question 3, I have no idea how to do it. Any help would be appreciated.

N. F. Taussig
  • 79,074
  • Your answer will depend on whether you count $x_1 = 40, x_2 = 60$ (and the rest zero) as distinct from $x_1 = 60, x_2 = 40$ (and the rest zero). Which one are you assuming? – Michael Seifert Jan 25 '16 at 16:00
  • This is how I did it: (n+r-1)C(r-1) and got the answers. Is this wrong? – John1234 Jan 25 '16 at 16:04
  • Those would be correct if you are counting the two options I listed as distinct. See my answer below. – Michael Seifert Jan 25 '16 at 16:06
  • What about question 3? It has says that xi > 0 and I am not sure what to do. I tried doing it this way: I added another variable x6+1, such that x1+x2+x3+x3+x4+x5+x6=99. Then I used: (n-1)C(r-1). Is this correct way of doing it? 98C5 – John1234 Jan 25 '16 at 16:12
  • Please read this tutorial on how to typeset mathematics on this site. – N. F. Taussig Jan 25 '16 at 16:16

2 Answers2

5

The first two are correct, assuming you are counting things like $x_1 = 60, x_2 = 40$ as distinct from $x_1 = 40, x_2 = 60$. The idea here is that you're spreading a certain number of balls into a certain number of bins. The equation you used is usually derived via a stars and bars argument.

For part (a), you're basically distributing 100 balls into 5 bins, so the solution would be $104 \choose 4$. For part (b), you can imagine having 6 bins instead; the 100 balls are distributed between them, and the number of balls in the first five is then less than or equal to 100. The answer is therefore $105 \choose 5$.

Since this looks like a homework problem, I won't give you the straight answer to part (c), but think of it this way: if I handed you 100 balls and told you to put them into 5 bins such that there's at least one ball in each bin, what's the first thing you would do? What would you do after that?

  • I can't understand the intuition involved in the second part; I tried deriving the formula for the second and it seems like it should be ${100}\choose{5}$ (I shall come up with a follow-up on this comment after my swimming lessons today). Do correct me if I'm wrong because I'm trying to revise my combinatorics lessons nowadays and not all of these results are mentioned in Grimaldi's "Discrete and Combinatorial Mathematics : An Applied Introduction" save for the first case in the question. – Spectre Jul 16 '24 at 11:51
  • @Spectre: Think about it this way: if we have $x_1 + x_2 + x_3 + x_4 + x_5 \leq 100$, then there's an $x_6 \geq 0$ such that $x_1 + x_2 + x_3 + x_4 + x_5 +x_6 = 100$. So the problem is equivalent to distributing 100 "balls" into six bins instead of five. – Michael Seifert Jul 16 '24 at 13:12
  • ah that was eye-opening!! And yeah, tbh I corrected the derivation and now the answer is $ {105}\choose{100} = {105}\choose{5} $ – Spectre Jul 22 '24 at 13:02
4

Your answers to the first two questions are correct.

For the third question, we reduce it to a problem you know how to solve. Since each $x_k$, $1 \leq k \leq 5$, is a positive integer, the strict inequality $$x_1 + x_2 + x_3 + x_4 + x_5 < 100$$ is equivalent to the weak inequality $$x_1 + x_2 + x_3 + x_4 + x_5 \leq 99$$ If we make the substitution $y_k = x_k - 1$ for $1 \leq k \leq 5$, then each $y_k$ is a non-negative integer. Substituting $y_k + 1$ for $x_k$, $1 \leq k \leq 5$, in the weak inequality yields \begin{align*} y_1 + 1 + y_2 + 1 + y_3 + 1 + y_4 + 1 + y_5 + 1 & \leq 99\\ y_1 + y_2 + y_3 + y_4 + y_5 & \leq 94 \end{align*} which is an inequality in the non-negative integers, which you evidently know how to solve.

N. F. Taussig
  • 79,074
  • Why just subtracting $1$ is enough to make non-negative integer? I hope you mean positive integer, though not clear how. I mean that if zero value is allowed, then removing $1$ makes all values positive. I am not clear though, if negative values are possible or not. – jiten Feb 02 '21 at 05:36
  • 1
    @jiten In the third question, we were given that each $x_i > 0$. Since $x_i$ is an integer, that means $x_i \geq 1$. Hence, $y_i = x_i - 1 \geq 1 - 1 = 0$. Therefore, $y_i$ is a nonnegative integer. Negative values are not allowed. – N. F. Taussig Feb 02 '21 at 09:45