6

At the moment I am doing some combinatorics exercises. The following one seemed interesting and I would like to know if my solution is correct.

How many possible non-negative integer solutions to the equation $x_1+x_2+x_3=11$ are there if we insist that $x_2 \leq 4$. Hint:Use Inclusion-Exclusion

Approach: I am considering that the non-negative integers are defined as $\{0,1,2,3,...\}$.

"How many non-negative integer solutions to $x_1+x_2+x_3=11$ are there?"

This seems like a typical application of "stars and bars", thus, there are $\binom{11+3-1}{3-1}$ non-negative integer solutions.

By the hint, I need to calculate and exclude all solutions such that $x_2 \geq 5$.

For that I defined $x'_2:=x_2-5$, substituting it into the equation we get $x_1+(x_2'+5)+x_3=11$, or $x_1+x_2'+x_3=6$. This equation has $\binom{6+3-1}{3-1}$ non negative integer solutions. Now $\binom{6+3-1}{3-1}$ is the number of solutions that do not statisfy the condition.

Thus the answer to the original questions is $\binom{11+3-1}{3-1}-\binom{6+3-1}{3-1}$.

NTc5
  • 1,161
  • Good analysis. Question is actually a duplicate of a more general question. See this answer for a blueprint of how to combine Inclusion-Exclusion with Stars-And-Bars to attack this generic type of problem. – user2661923 Oct 01 '24 at 20:43
  • 1
    Reasoning looks good, but where is this 12 coming from? – Mike Oct 01 '24 at 21:08
  • @Mike I mentioned that I count $0$ as a non-negative integer, so ${0,1,2,3,4,...,11}$ are $12$ numbers. – NTc5 Oct 01 '24 at 22:28
  • @user2661923 Thank you for the link. – NTc5 Oct 01 '24 at 22:29
  • 2
    Why use 12 when 11 is on the right side of the equation and 6 when 6 is on the right side? Your logic is inconsistent. You mention stars and bars. If you're distributing 11 objects among 3 urns, there should be 11 stars and 2 bars. This includes the case where one of the x's is 0. – Mike Oct 01 '24 at 22:45
  • As @Mike implies, the correct answer to the question is $\binom{11 + 3 - 1}{3 - 1} - \binom{6 + 3 - 1}{3 - 1}$. – N. F. Taussig Oct 02 '24 at 08:38
  • @Mike You are correct. That was a error of me. I will edit it to fix it. – NTc5 Oct 03 '24 at 11:01

2 Answers2

2

Let’s start by finding the total number of non-negative integer solutions to the equation $x_1 + x_2 + x_3 = 11$. This is a classic “stars and bars” problem where we distribute 11 identical objects (stars) into 3 distinct groups (variables $x_1$, $x_2$, and $x_3$). The formula for this is given by:

$\binom{11 + 3 - 1}{3 - 1} = \binom{13}{2} = 78$

So, there are 78 possible non-negative integer solutions for $x_1 + x_2 + x_3 = 11$.

Now, we need to account for the condition $x_2 \leq 4$. First, I’ll find the number of solutions without this restriction, and then we’ll use the principle of Inclusion-Exclusion to subtract the cases where $x_2 > 4$.

First calculate Solutions Where $x_2 > 4$ If $x_2 > 4$, let’s substitute $x_2 = 5 + y$, where $y \geq 0$. This substitution means that the original equation now becomes:

$x_1 + (5 + y) + x_3 = 11 \quad \Rightarrow \quad x_1 + y + x_3 = 6$

Now, we need to find the number of non-negative integer solutions to $x_1 + y + x_3 = 6$. Using the stars and bars method again:

$\binom{6 + 3 - 1}{3 - 1} = \binom{8}{2} = 28$

So, there are 28 solutions where $x_2 > 4$.

Using Inclusion-Exclusion Now let's find the number of solutions where $x_2 \leq 4$, subtract the number of solutions where $x_2 > 4$ from the total number of solutions:

$78 - 28 = 50$

Thus, there are 50 non-negative integer solutions to the equation $x_1 + x_2 + x_3 = 11$ such that $x_2 \leq 4$.

The final answer is 50. So, if you insist that $x_2 \leq 4$, then there are 50 possible non-negative integer solutions to the equation $x_1 + x_2 + x_3 = 11$.

0
  • I'll sum over the constrained values of $x_{k}, \left(k = 1, 2, 3\right)$.
  • The condition $x_{1}\ +\ x_{2}\ +\ x_{3} = 11$ is introduced by means of a Kronecker Delta $\delta_{11,x_{1}\ +\ x_{2}\ +\ x_{3}}\,\,\,$ which is $\underline{\large equal\ to}$ $\left[z^{11}\right]z^{x_{1}\ +\ x_{2}\ +\ x_{3}}\,\,$.
  • Note that $\left[z^{\cdots}\right]$ is the Extraction Operator. For instance, $$ \left[z^{3}\right]{\rm e}^{z} = {1 \over 3!},\quad\left[p^{5}\right]\left(p^{2} + p^{8}\right) = 0, \mbox{etc}\ldots $$

The number of solutions is given by \begin{align} & \sum_{x_{1}\ =\ 0}^{\infty}\ \sum_{x_{2}\ =\ 0}^{4}\ \sum_{x_{3}\ =\ 0}^{\infty} \left[z^{11}\right]z^{x_{1}\ +\ x_{2}\ +\ x_{3}} \\[5mm] = & \ \left[z^{11}\right]{z^{5} - 1 \over z - 1} \left(1 - z\right)^{-2} \\[5mm] = & \ \left[z^{11}\right] \left(1 - z\right)^{-3}\ -\ \left[z^{6}\right]\left(1 - z\right)^{-3} \\[5mm] = & \ {-3 \choose 11}\left(-1\right)^{11} - {-3 \choose 6}\left(-1\right)^{6} \\[5mm] = & \ {13 \choose 11} - {8 \choose 6} = 78 - 28 = \color{#44f}{\LARGE 50} \\ & \end{align}

Felix Marin
  • 94,079