1
$\begingroup$

Is it possible to transform the following problem:

$$\min\big\{ (X-\sum v_i b_i)^2 \big\} $$ where $X \geq 0$, $v_i \geq 0$ and $b_i \in \{0,1\}$

to an integer linear programming problem like this:

enter image description here

In my case $v_i$ is the coefficient and $b_i$ the variable.

  • 1
    If you minimize the absolute value of $X-\sum v_i b_i$, you will minimize the square. The absolute value of this can be written as the sum of two new non-negative variables. One represents the positive part, and one the negative part. You must add some additional constraints to make these variables be the positive / negative part. This will be an equivalent system because if you minimize the absolute value, you minimize the square.2017-02-07
  • 0
    @BigMathTimes I have some difficulties to transform the system like you said. So my approach would be to substitute $min | (X-\sum v_i b_i)^2 | $ with $min ( x^{+} + x^{-} ) $ and constraints like $ x^{+} - x^{-} = X-\sum v_i b_i$ and $ x^{+} * x^{-} = 0 $. But it seems like that the Right Hand Side can only contain numbers, no variables.2017-02-07
  • 1
    Just move the $X$ and the sum to the left hand side and set it equal to zero. Sage has an online work pad and a module for OR. You can check if it gives you the correct answer there. Depending on the size, you can branch and bound or brute force search to check this gives the correct answer.2017-02-10

0 Answers 0