0

I have the following question:

Let $A,B,C,D \in \mathbb{Z}$, such that $-21 \leq A,B,C,D \leq 21$. How many integer solutions are there for $A+B+C+D > 0$. I'm trying to use combinatorial methods, namely stars and bars, but I'm not sure how I'd be able to use stars and bars here with an inequality and a particular set of integer values for $A,B,C,D$. I'm thinking of using a change of variables but still trying to troubleshoot that.

Would someone know how to use combinatorics to solve the question? Any help would be much appreciated!

ENV
  • 728
  • 1
    Hint: by symmetry, among the solutions having $A+B+C+D\ne0$, exactly half have $A+B+C+D>0$. – Karl Feb 26 '21 at 03:37

1 Answers1

2

One way to solve it is to combine Karl’s hint in the comments with a change of variables. Let $n$ be the number of integer quadruples $\langle A,B,C,D\rangle$ such that $-21\le A,B,C,D\le 21$.

Among those $n$ quadruples let $n^-$ be the number such that $A+B+C+D<0$, $n^+$ the number such that $A+B+C+D>0$, and $n_0$ the number such that $A+B+C+D=0$.

  • What is $n$?

We want $n^+$.

  • Use the hint: explain why $n^+=n^-$, and conclude that $n^+=\frac12(n-n_0)$.

Now you just need to find $n_0$. Let $a=A+21$, $b=B+21$, $c=C+21$, and $d=D+21$; then $A+B+C+D=0$ if and only if $a+b+c+d=84$, and $-21\le A,B,C,D\le 21$ if and only if $0\le a,b,c,d\le 42$. Thus, you want the number of solutions to

$$x_1+x_2+x_3+x_4=84\tag{1}$$

in non-negative integers that do not exceed $42$. You can find $n_0$ by combining stars and bars with an inclusion-exclusion argument; my answer to this question illustrates the technique.

V.G
  • 4,196
Brian M. Scott
  • 616,228
  • Sir, I am getting the final answer as $\displaystyle \dfrac{1}{2}\left[(43)^4-\left(\binom{87}{84}-4\times \binom{45}{42} \right) \right]$. Could you please confirm the answer? – V.G Feb 26 '21 at 14:51
  • @LightYagami: You’re almost right, but your inclusion-exclusion calculation isn’t quite complete. It’s possible for two of the variables to be $42$, the other two being $0$, and each of those solutions has been subtracted twice in the $4\binom{45}{42}$ term. To correct for that you have to add them back in. There is one of them for each pair of variables, so it should be $\binom{87}{84}-4\binom{45}{42}+6$ in the parentheses. The rest is fine. – Brian M. Scott Feb 26 '21 at 18:15
  • Sir, actually, no , It should have been $\binom{87}{84}-4\binom{44}{41}$. I miscalculated that part, I think you didn't pay enough attention :). Anyway, thank you, I atleast got to know my mistake. – V.G Feb 27 '21 at 04:01
  • 1
    @LightYagami: You’re absolutely right: I wasn’t thinking and just followed your lead in subtracting $42$ instead of $43$. And of course that’s why I failed to notice that it was impossible to have two ‘bad’ variables. Thanks (and congratulations) for getting it propertly sorted out! – Brian M. Scott Feb 27 '21 at 04:29