1
$\begingroup$

Let $X=\{-1,1\}^n$ for a given natural number $n$ and $(w_0,w_2,\cdots,w_n)\in R_+^{n+1}$. Find $$\min_{(x_1,x_2,\cdots,x_n)\in X}\bigg|w_0+\sum_iw_ix_i\bigg|.$$

We can turn this into the following binary linear programming problem. \begin{align} \min_{{(x_1,\,x_2,\,\cdots,\,x_n)\in X}\atop{d}}&\ d \\ w_0+\sum_iw_ix_i&\le d \\ -(w_0+\sum_iw_ix_i)&\le d \\ \end{align} or \begin{align} \min_{{(x_1,\,x_2,\,\cdots,\,x_n)\in X}\atop{s,\,t}}&\ s+t \\ w_0+\sum_iw_ix_i&=s-t \\ s&\ge 0 \\ t&\ge 0 \end{align}

Is there a faster and general solution?

  • 1
    You are mixing two methods to reformulate absolute values. You can get rid of $d$ and define the objective as $s+t$. As subset sum is a special case of your problem, I would not expect any fast solution method.2017-02-07
  • 0
    @LinAlg: You are right. I have edited the question. Is there a fast dynamic programming algorithm to solve this problem?2017-02-07

0 Answers 0