1
$\begingroup$

I have a constraint based on matrix multiplication. It involves summation of a product. The product multiplies two entries of a variable matrix named order, and an entry of a constant matrix named guess.

All of the variables and constants are binary. All of the indexes have the same arbitrary range $N$.

($\forall n,m$) result$_{n,m}$ = $\sum_r \sum_s$ (order$_{n,r}$ * guess$_{r,s}$ * order$_{m,s}$)

Is it possible to turn this into ~$N^2$ linear constraints?

$\endgroup$

1 Answer 1

1
$\begingroup$

You can linearize each product of binary variables by introducing a new binary variable and three linear constraints: https://or.stackexchange.com/questions/37/how-to-linearize-the-product-of-two-binary-variables

That is $O(N^4)$ linear constraints. See the references in the linked answer for formulations that use fewer constraints.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.