Construct the LP : Minimize $x_1 + 2 |x_2 - 7|$ subject to $|x_1| + |3x_1 + 2x_2| \leq 20$ Minimize $x + 2 |y - 7|$ subject to $|x| + |3x + 2y| \leq 20$. Construct a Linear Program. Solving this is not necessary.
I have seen solutions of this form where you replace the element inside the modulus with $r-s$ $[r,s \geq 0]$ and then replace the modulus with $r+s$. I do not understand how solutions of this form works, can I have an explanation and a concrete proof to this?
I will attempt this problem using what I wrote. I am not sure if this is correct, I think it is somewhat along these lines. Firstly, we write $y-7 = a-b, x = c-d, 3x+2y = e-f$ such that $a,b,\cdots, f \geq 0$.
Then the LP is transformed into :
$\text{Minimize } (c-d) + 2(a+b)$ subject to :
\begin{align*}
(c+d) + (e+f) &\leq 20 \qquad (\diamond) \\
(c+d) + (2a+3c+14) + (3d+2b) &\leq 20 \qquad (\ast)\\ 
a,b,c,d,e,f &\geq 0 \\
\end{align*}
In $(*)$ above, $3x+2y = 3(c-d) + 2(a-b+7) = (2a+3c+14) - (3d+2b) \implies |3x+2y| \to (2a+3c+14) + (3d+2b)$.
I do not know if the change of minus to plus is justified. Additionally, the inequation $(\diamond)$ seems extraneous.
Can someone have a look at the solution and explain to me how the LP should have been constructed?
 A: In addition to the projected approach supplied by orangekid one can continue on your path, but correct the strange variable replacements you seem to do
Introduce the new variables to model the positive and negative terms and your objective is $ x_1 + 2(a+b)$ with constraints
$$
\begin{align*}
x_2-7 &= a-b\\
x_1  &= c-d\\
3x_1 + 2x_2 &= e-f\\
(c+d) + (e+f) &\leq 20\\
a,b,c,d,e,f &\geq 0 \\
\end{align*}
$$
Yet another approach is to model using epigraphs. Your objective will then be $x_1 + 2t$ and the constraints involving the three epigraph variables $(s,t,u)$ representing upper bounding of the absolute values are
$$
\begin{align*}
-t &\leq x_2-7 \leq t\\
-s &\leq x_1  \leq s\\
-u &\leq 3x_1 + 2x_2 \leq  u\\
s + u &\leq 20\\
\end{align*}
$$
A: You need to write an equivalent linear program, not necessarily in standard or canonical form. So you have to replace the absolute values in the conditions and also in the cost function.
The conditions are equivalent to
$$\pm x_1 \pm (3x_1 + 2 x_2) \le 20$$
($4$ inequalities).
For the cost function, you need to replace $|x_2-7|$ with $x_3$. So you add the extra conditions
$$\pm (x_2 - 7) - x_3 \le 0$$
that together are equivalent to $x_3 \ge |x_2-7|$. Now you change the cost function to
$$x_1 + 2 x_3$$
A minimum for this function will necessarily imply $x_3 = |x_2-7]$. So now you have a linear problem with $6$ linear conditions and a linear cost function.
