How to find the exact number of non-negative integer solutions of the following set of equations :
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6=6 $$ $$ 2x_1 + x_2 + x_3 = 4$$ $$ x_2 + 2x_4 + x_5 = 4$$ $$ x_3 + x_5 +2x_6 =4$$
MathOverflow is a question and answer site for professional mathematicians. It only takes a minute to sign up.
Sign up to join this communityHow to find the exact number of non-negative integer solutions of the following set of equations :
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6=6 $$ $$ 2x_1 + x_2 + x_3 = 4$$ $$ x_2 + 2x_4 + x_5 = 4$$ $$ x_3 + x_5 +2x_6 =4$$
This is going to be closed, but I'll answer anyway: Here's how to solve your problem using 'zsolve' from 4ti2 (according to the manual www.4ti2.de/4ti2_manual.pdf)
To solve a linear system $Ax = b$ under nonnegativity $x\in\mathbb{N}_0^n$ create a file A.mat with the matrix:
4 6
1 1 1 1 1 1
2 1 1 0 0 0
0 1 0 2 1 0
0 0 1 0 1 2
The first two rows are the dimensions. Then create A.rhs to save the right hand side (as a row vector):
1 4
6 4 4 4
Finally, create A.sign to encode non-negativity (there are other choices too...)
1 6
1 1 1 1 1 1
Now run
zsolve A
Voilà, the file A.zinhom contains your 15 points:
15 6
2 0 0 0 4 0
1 0 2 1 2 0
2 0 0 2 0 2
0 4 0 0 0 2
0 3 1 0 1 1
0 2 2 1 0 1
0 2 2 0 2 0
0 1 3 1 1 0
0 0 4 2 0 0
1 1 1 0 3 0
1 0 2 2 0 1
1 1 1 1 1 1
2 0 0 1 2 1
1 2 0 1 0 2
1 2 0 0 2 1