Minimizing a quadratic function with binary variables and a totally unimodular constraint

binary-programminginteger programmingoperations researchoptimizationquadratic programming

Let $q=q(x_1,…,x_n)$ be a quadratic polynomial. I want to solve the following optimization problem:

$$\min_{Ax = b, x\in \{0,1\}^n}(q)$$

where $A$ is totally unimodular. Is there some neat algorithm (maybe in the same style of symplex algorithm) to solve this optimization problem?

This problem came up because a programmer friend of mine talked me about how he's having some difficilties in optimizing the monthly job turns of his employees and since I'm more mathematically minded than him, I turned this into an optimization problem.

(I'm aware that $\{0,1\}^n$ is a finite set, but its cardinality grows exponentially with respect to $n$, so I'm looking for a more efficient method than brute forcing).

Best Answer

There are specialized algorithms for binary quadratic programming problems, but you can also linearize the objective by replacing each square $x_j^2$ with $x_j$ and introducing a new variable $y_{ij}$ to replace each product $x_i x_j$, together with linear constraints \begin{align} y_{ij} &\le x_i \\ y_{ij} &\le x_j \\ y_{ij} &\ge x_i + x_j - 1 \\ y_{ij} &\ge 0 \end{align} Depending on your constraints $Ax=b$, other linearizations might be possible.

Related Question