0

I am trying to solve the number of binary solutions to a system of linear equations, the same as in this question: number of binary solutions under linear restrictions.

Shortly:

Consider $ x1,…,x_n ∈ {0,1} $. How many solutions exist under the restriction that $Ax=b $ , where A is a $m×n$ matrix with binary entries and $b_i∈{0,…,n}$

In the question, the accepted answer gives a method, based on generating functionology, that solves the problem.

The number of solutions is $[\prod_{i=1}^{m} z_{i}^{b_i}] g(z1,…,zm)$, where $g(z) = \prod_{i=1}^{n} ( 1 + \prod_{j=1}^{m} z_{j}^{a_{ji}}) $

So the solution is the coefficient of the term $z_1^{b_1}z_2^{b_2} ... z_m^{b_m}$ in the generating function $g(z)$.

The solution works well for small matrices by symbolically expanding $g(z)$ and seeing the coefficient, but it is impossible for larger matrices. This can be sped up by removing the symbolic expansion, and considering different exponentiations as vectors, but this is also too complex and reduces to a subset sum problem which is NP-complete and too complex.

I've seen some ideas in the field of generating functionology (that looked correct), but I'm not familiar with that at all, and I've been unable to adapt any ideas to this problem specifically.

How can I go about solving the coefficient analytically, and solve the number of binary solutions to the system?

Ilmard
  • 3

1 Answers1

1

If you restrict the rows of $A$ to only have 3 nonzero terms each and the vales of $b$ to all be $1$, then this reduces to 1-in-3 positive 3SAT which is NP complete, so there are no fast solutions in general.

Eric
  • 8,378