0

In Linear Programming, we sometimes write $x = x^{+} - x^{-}$ such that $x^{+}, x^{-} \geq 0$ when $x$ is not bounded on either side. How does this guarantee that the optimum solution does not change (for both maximization and minimization), that is, the Algorithm will necessarily choose the "good" solution(s) which is $\min(x^+,x^-) = 0$? This is a part of the Simplex Algorithm.

I can not wrap my head around this, I am looking for a "detailed" proof.

2 Answers2

1

A generic LP solver will not necessarily yield a solution that satisfies $\min(x^+,x^-)=0$. But the objective value is preserved if you add or subtract a constant: \begin{align} x^+ &\mapsto x^+ + k \\ x^- &\mapsto x^- + k \end{align} because $c\cdot x=c\cdot(x^+-x^-) = c\cdot((x^++k)-(x^-+k))$. In particular, postprocessing by taking $k=-\min(x^+,x^-)$ yields the "good" solution with the same objective value that the algorithm returned.

However, the simplex algorithm will yield such a "good" solution automatically. See Converting to standard form - at basic solutions, at least one of the two positive variables that replaces a free variable should be zero. Why?

RobPratt
  • 50,938
  • Exactly what I was thinking - this algorithm does not necessarily lead us to the smaller element being $0$. I had the same substitution in mind which keeps the cost unaltered. Thanks for clarifying. – dictatemetokcus May 07 '21 at 22:56
  • See this. Can you explain why in this case the Simplex Algorithm will necessarily ensure $(t_1,t_2) \in {(x,0),(0,-x)}$ and not a different "good" (feasible) solution? – dictatemetokcus May 07 '21 at 22:58
  • 1
    In the linked question, the objective is to minimize absolute value, and you replace $|x|$ with $x^+ + x^-$. In that situation, reducing $x^+$ and $x^-$ by the same amount so that one of them is $0$ preserves feasibility and improves the objective value. So in every optimal solution, one (or both) of them will be $0$. – RobPratt May 07 '21 at 23:33
0

Edited May 9, 2021: I realized I was missing something about this problem and in fact deleted my solution while I was thinking about it. But now I believe I have figured out what I was missing (see remarks about the use of $x^+$ and $x^-$ in the objective function, below), and I have undeleted the solution.

You can add a constraint of the form $x=x^+-x^-$ with $x^+,x^- \ge 0$ without affecting the result in the Simplex Algorithm because the algorithm always yields an extremal solution. That is, although there may be many pairs $x^+, x^-$ satisfying the constraint, the algorithm will always pick a solution where either $x^+ = 0$ or $x^- = 0$.

This method allows us to use $x^+$ or $x^-$ in the objective function. Just don't try to use $x^+$ or $x^-$ in another constraint--that won't work.

Added May 20 2021: There are also some restrictions on the use of $x^+$ and $x^-$ in the objective function. Specifically, if you are minimizing, then the coefficient of $x^+$ or $x^-$ in the objective function must be positive; and if maximizing, then the coefficient must be negative. Stated another way, the objective function needs to be convex as a function of $x$ if minimizing, and concave if maximizing. Fortunately, many applications satisfy this requirement.

awkward
  • 15,626
  • No, you cannot generally treat $x^+$ and $x^-$ differently in the objective function and expect to get $x^+ = 0$ or $x^- = 0$, even if you add the constraint $x=x^+ - x^-$. For example, maximizing $x^+$ might yield both $x^+ > 0$ and $x^- > 0$. Instead, the transformation @dictatemetokcus is referring to replaces $x$ with $x^+ - x^-$ everywhere (objective and constraints). – RobPratt May 07 '21 at 19:33
  • @RobPratt Can you give an example where the method fails? – awkward May 08 '21 at 13:16
  • Try maximizing $x^+$ subject to $x\le 5$, $x=x^+-x^-$, $x^+\ge 0$, and $x^-\ge 0$. Then $(x,x^+,x^-)=(5,7,2)$ is feasible, and in fact the problem is unbounded. – RobPratt May 08 '21 at 13:44
  • @RobPratt When I throw that problem into my solver, it simply says "Unbounded". I should emphasize, the method depends on using the Simplex Algorithm. Other solutions exist, but I think you will find the Simplex Algorithm will always set $x^+=0$ or $x^-=0$, given the constraint $x=x^+-x^-$ with $x^+\ge 0$ and $x^-\ge 0$. – awkward May 08 '21 at 15:02
  • OK, basic feasible solutions have that property, but you don't need to explicitly impose $x=x^+-x^-$. See the link I added to my answer. – RobPratt May 08 '21 at 15:45
  • @RobPratt I think that in the edits above I have addressed the problem you noted. Thank you for pointing out the deficiency. – awkward May 09 '21 at 13:28