Absolute value in linear programming(cost function)

399 Views Asked by At

Suppose we have the following linear programming problem:

min $ 2|x_1| + x_2$

subject to $x_1 + x_2 >=3$

We can transorm $|x_1|$ as $x^+ - x^-$, because every number can be represented as difference of two real numbers.

But, what I can't understand, how $|x_1|$ becomes $x^+ + x^-$ in cost function? Why plus sign?

I know, that |x| = max(x,-x), but does it influence on the result in cost function?

1

There are 1 best solutions below

0
On BEST ANSWER

Lemma: only one of the terms $x^-, x^+$ is nonzero (putting it differently $x^- \cdot x^+ = 0$).

If $x^+\ge 0, x^-=0$ we have $|x_1|=x^+ + x^- = x^+$. If $x^+=0, x^- \ge 0$ we have $|x_1|=x^+ + x^- = x^-$. This is exactly what we want.