How to solve simultaneous linear equations with only two possible values per variable? I am trying to solve a system of simultaneous linear equations whose unknowns have only two possible values.  How do I approach this, or what area of mathematics do I employ inorder to arrive at the exact solution. e.g.
\begin{align}
a+b+c+d+f+g+h+i &= 12, \tag{1} \\
b+c+d           &= 6,  \tag{2} \\
f+g             &= 2,  \tag{3}
\end{align}
where possible values for $a,b,c,d,f,g,h,i$ can only be $2$ or $0$.

NB The example above is just an illustration of what I am trying to solve which is a nested Venn diagram problem with about $10$ equations of $14$ unknowns ($a,b,c,\dotsc,n$) whose values can only be $4$ or $6$.


You have linear system $Ax = b$ and want to know if there is a solution such that all coordinates of $x$ are either $4$ or $6$. Instead of that, consider system $Ay = b/2$ where all coordinates of $y$ have to be either $2$ or $3$. If there exists a solution to that system, there must be a solution to the same system modulo $2$.
Thus, reduce the system modulo $2$ and solve it as a linear system over $\mathbb Z/2\mathbb Z$ (linear algebra applies!) This will give you a finite number of possible solutions to the original system - it is easy to reconstruct them since $2$ is even and $3$ is odd.
This will be very efficient in your case, since $10$ equations with $14$ unknowns means the solution space is $4$-dimensional. Over $\mathbb Z/2\mathbb Z$ it means $16$ solutions to check.
