0

Is there general formula for the find non-negative solutions of the following system $$x_1+x_2+\cdots +x_k=n$$ such that $x_1\leq r_1 , \cdots,x_k\leq r_k$ and $0\leq n\leq r_1+r_2+\cdots +r_k$?

I could find closed formula for the solutions of the following system $$x_1+x_2+\cdots +x_k=n$$ with restriction $x_i\leq r$. It is equal $$ \sum_{t=0}^k(-1)^t\binom kt\binom{n-t(r+1)+k-1}{k-1}\;, $$ (with inclusion-exclusion).

For example, How can find solutions of the system $$x_1+x_2+x_3=k$$ Such that $x_1\leq \alpha, x_2\leq \beta$ and $x_3\leq \gamma$

d.y
  • 649
  • You essentially do the same thing, just that your formula would have $2^k$ terms instead. – Calvin Lin Apr 15 '20 at 20:45
  • I think , First, I have to find solution with $x_1\leq r_1$ and then $x_2\leq r_2$ and so on. – d.y Apr 15 '20 at 20:55
  • It's sightly easier to apply PIE to cases where $ x_i \geq r_i$, because then you use the substitution of $x_i ' = x_1 - r_i$, and subtract that from all cases. Some related questions on the right are helpful, like this – Calvin Lin Apr 15 '20 at 20:57
  • Right, is it impossible find solution by generating function? – d.y Apr 15 '20 at 21:00
  • It is possible, but it doesn't have a "nice" solution that doesn't require you to eventually expand it out. – Calvin Lin Apr 16 '20 at 00:19

0 Answers0