Number of positive integer solutions of a equation system with restrictions.

combinatorics

The question is how many possible solutions there are for a equation system subject to the condition that $1 \leq x_1 + y_1$, $1 \leq x_2 + y_2$, $1 \leq x_r + y_r$ where $x_i$ and $y_i$ are non-negative integers.

The system is $$x_1 + x_2 + \ldots + x_r = n.$$
$$y_1 + y_2 + \ldots + y_r = n.$$

I want to do it by the inclusion-exclusion principle but i can't find a way to pose a initial equation.
After that i would suppose $ 1 – y_1 > x_1 $ and try to introduce it in one of those equations.

Any help is greatly appreciated, thanks.

Best Answer

There may be a simpler solution, but you can certainly run this by inclusion-exclusion on a reducing $r$.

I'm thinking of this as being like deployment of $n$ infantry and $n$ artillery into a position with $r$ locations, where you cannot leave any gap in the line. Without the gap restriction we can easily see this is two cases of stars-and-bars for $\binom{n+r-1}{n}^2$

A gap in both categories ($x_i+y_i=0$) would correspond to a deployment into $r{-}1$ positions. The gap can occur in $\binom r1=r$ locations of course. Then we have to account for overcounting the case of $2$ gaps, etc., giving

$$\sum_{k =0}^{r-1}(-1)^k\binom{r}{k}\binom{n+r-1-k}{n}^2 $$

Related Question