[Math] Count the number of integer solutions of a linear equation

combinatorics

What kind of approach can be used to solve this specific problem? An easy one if possible.

I thought about the Inclusion-Exclusion Principle; I think using generating functions will be more difficult.

Given that the variables $x_i$ are natural numbers.

Find how many solutions exist for the equation:

$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 24$$

when given

$$x_1 + x_2 + x_3 > x_4 + x_5 + x_6$$

Best Answer

Outline: Let $A$ be the number of solutions (in non-negative integers) with $x_1+x_2+x_3\gt x_4+x_5+x_6$. Let $B$ be the number of solutions with $x_1+x_2+x_3\lt x_4+x_5+x_6$. And let $T$ be the number of solutions with equality.

By symmetry $A=B$. We know the total number $N$ of solutions with no restriction. So $2A+T=N$ and therefore $A=\frac{N-T}{2}$.

Now we only need $T$. This is $W^2$, where $W$ is the number of solutions of $y_1+y_2+y_3=12$.

Related Question