# using the inclusion and exclusion principle

Find the number of solutions of $$x_1+x_2-x_3-x_4=0$$ in integers between $$-4$$ and $$4$$, inclusive.

I transformed $$x_i$$ to $$y_1$$ using $$x_i + 4$$ and my equation became $$y_1 + y_2 +y_3 + y_4 = 16$$ for $$[0,8]$$. The negative $$x$$ values of $$x_3$$ and $$x_4$$ are what are confusing me.

• Please use MathJax in future :) – Shaun Nov 26 '18 at 3:59

The number of solutions of $$x_1+x_2-x_3-x_4=0$$ where $$x_i \in [-4,4]$$ is equal to the number of solutions of $$z_1+z_2+z_3+z_4=0$$ where $$z_i \in [-4,4]$$.
To see it, suppose $$(x_1,x_2,x_3,x_4)$$ is a valid solution for the first system then $$(x_1,x_2, -x_3, -x_4)$$ is a valid solution for the second system and such mapping is a bijection.