# assigning artifical variables positive or negative

I'm struggling on determining when to assign an artifical variable a positive or a negative value. The example I have at hand is:

Max: $x_1+x_2$

St.

\begin{align}3x_1+2x_2\le5\\ x_1-x_2\le1\\ -2x_1-x_2\le7\\ x_1,x_2\ge0.\end{align}

I'm trying to determine how much to increase the right hand side of the third constraint so that my program becomes feasible.

So I would do

Max $x_1+x_2$

St.

\begin{align}3x_1+2x_2+x_3&\le5\\ x_1-x_2+x_4&\le1\\ -2x_1-x_2+x_5-a&\le-7\\ x_1\ge 0, x_2&\ge0\\ x_3,x_4,x_5&\le0.\end{align}

Should my a be negative because i want to increase the negative $7$? or should it be positive? How do i know when to use a positive artificial variable or negative?

• No need to change the constraints. Answer: $x_1 = 0$ and $x_2 = 5/2$, giving the maximum sum $5/2$. Nov 4, 2015 at 18:07
• All the constraints are $L \le R$ so you add a slack variable and make them equal $L + S = R$. For constraints of the form $L \ge R$ subtract a slack variable $L - S = R$
– user186104
Nov 4, 2015 at 20:17

Answer: $x_1 = 0$ and $x_2 = 5/2$, giving the maximum sum $5/2$.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 2, "equation": 0, "x-ck12": 0, "texerror": 0}