Linear programming problem with absolute value
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Problem: Maximize $|x|$ under conditions $$-x+yleq 1\ x+yleq2\ygeq0$$
My solution: So we can write $x$ as $x=x_1-x_2$ and $|x| = x_1+x_2$, where $x_1 = x$ whenever $xgeq0$ and $x_1=0$ whenever $x<0$, and $x_2=-x$ whenever $x<0$ and $x_2=0$ whenever $xgeq 0$.
Hence we get this inequalities after introducing slack variables:
$$-x_1+x_2+y+x_3=1\x_1-x_2+y+x_4=2\y,x_1,x_2 geq 0\z-x_1-x_2=0$$
Hence we create a tableu
beginarrayc
hline
x_1& x_2 & x_3 & x_4& y & z& b \ hline
-1&1 &1 &0&1&0&1\ hline
1&-1&0&1&1&0&2\ hline
-1& -1&0 &0&0&1&0
endarray
Hence we look on the last row and we see that smalles negative value is $-1$. Hence it does not matter if we take $x_1$ or $x_2$(Am i right?). So lets say choose $x_1$, then we look on indicators and see that smalles non negative indicator will be $2$, hence the second row. So the pivot variable will be equal to $1$. However now i have no idea what to do since it is already $1$, because i do not need to make row operations to turn it into 1.
My question: Did i had a mistake till now? If not, could anyone just give a hint about how to proceed next?
optimization linear-programming mathematical-modeling simplex
add a comment |Â
up vote
0
down vote
favorite
Problem: Maximize $|x|$ under conditions $$-x+yleq 1\ x+yleq2\ygeq0$$
My solution: So we can write $x$ as $x=x_1-x_2$ and $|x| = x_1+x_2$, where $x_1 = x$ whenever $xgeq0$ and $x_1=0$ whenever $x<0$, and $x_2=-x$ whenever $x<0$ and $x_2=0$ whenever $xgeq 0$.
Hence we get this inequalities after introducing slack variables:
$$-x_1+x_2+y+x_3=1\x_1-x_2+y+x_4=2\y,x_1,x_2 geq 0\z-x_1-x_2=0$$
Hence we create a tableu
beginarrayc
hline
x_1& x_2 & x_3 & x_4& y & z& b \ hline
-1&1 &1 &0&1&0&1\ hline
1&-1&0&1&1&0&2\ hline
-1& -1&0 &0&0&1&0
endarray
Hence we look on the last row and we see that smalles negative value is $-1$. Hence it does not matter if we take $x_1$ or $x_2$(Am i right?). So lets say choose $x_1$, then we look on indicators and see that smalles non negative indicator will be $2$, hence the second row. So the pivot variable will be equal to $1$. However now i have no idea what to do since it is already $1$, because i do not need to make row operations to turn it into 1.
My question: Did i had a mistake till now? If not, could anyone just give a hint about how to proceed next?
optimization linear-programming mathematical-modeling simplex
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Problem: Maximize $|x|$ under conditions $$-x+yleq 1\ x+yleq2\ygeq0$$
My solution: So we can write $x$ as $x=x_1-x_2$ and $|x| = x_1+x_2$, where $x_1 = x$ whenever $xgeq0$ and $x_1=0$ whenever $x<0$, and $x_2=-x$ whenever $x<0$ and $x_2=0$ whenever $xgeq 0$.
Hence we get this inequalities after introducing slack variables:
$$-x_1+x_2+y+x_3=1\x_1-x_2+y+x_4=2\y,x_1,x_2 geq 0\z-x_1-x_2=0$$
Hence we create a tableu
beginarrayc
hline
x_1& x_2 & x_3 & x_4& y & z& b \ hline
-1&1 &1 &0&1&0&1\ hline
1&-1&0&1&1&0&2\ hline
-1& -1&0 &0&0&1&0
endarray
Hence we look on the last row and we see that smalles negative value is $-1$. Hence it does not matter if we take $x_1$ or $x_2$(Am i right?). So lets say choose $x_1$, then we look on indicators and see that smalles non negative indicator will be $2$, hence the second row. So the pivot variable will be equal to $1$. However now i have no idea what to do since it is already $1$, because i do not need to make row operations to turn it into 1.
My question: Did i had a mistake till now? If not, could anyone just give a hint about how to proceed next?
optimization linear-programming mathematical-modeling simplex
Problem: Maximize $|x|$ under conditions $$-x+yleq 1\ x+yleq2\ygeq0$$
My solution: So we can write $x$ as $x=x_1-x_2$ and $|x| = x_1+x_2$, where $x_1 = x$ whenever $xgeq0$ and $x_1=0$ whenever $x<0$, and $x_2=-x$ whenever $x<0$ and $x_2=0$ whenever $xgeq 0$.
Hence we get this inequalities after introducing slack variables:
$$-x_1+x_2+y+x_3=1\x_1-x_2+y+x_4=2\y,x_1,x_2 geq 0\z-x_1-x_2=0$$
Hence we create a tableu
beginarrayc
hline
x_1& x_2 & x_3 & x_4& y & z& b \ hline
-1&1 &1 &0&1&0&1\ hline
1&-1&0&1&1&0&2\ hline
-1& -1&0 &0&0&1&0
endarray
Hence we look on the last row and we see that smalles negative value is $-1$. Hence it does not matter if we take $x_1$ or $x_2$(Am i right?). So lets say choose $x_1$, then we look on indicators and see that smalles non negative indicator will be $2$, hence the second row. So the pivot variable will be equal to $1$. However now i have no idea what to do since it is already $1$, because i do not need to make row operations to turn it into 1.
My question: Did i had a mistake till now? If not, could anyone just give a hint about how to proceed next?
optimization linear-programming mathematical-modeling simplex
asked Aug 21 at 9:09
MariyaKav
1909
1909
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
I don't see how do you ensure that $x_1=x$ whenever $x ge 0$ and $x_1=0$ otherwise.
Usually the trick works for minimizing the absolute value, not maximizing it. In fact, the problem is not convex.
From $x+y le 2$ and $y ge 0$, we have $x le 2$.
Also, from $y le 1+x$ and $y ge 0$, we have $x ge -1$.
Also $(2,0)$ satisfies the constraints, hence the optimal value is $2$.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I don't see how do you ensure that $x_1=x$ whenever $x ge 0$ and $x_1=0$ otherwise.
Usually the trick works for minimizing the absolute value, not maximizing it. In fact, the problem is not convex.
From $x+y le 2$ and $y ge 0$, we have $x le 2$.
Also, from $y le 1+x$ and $y ge 0$, we have $x ge -1$.
Also $(2,0)$ satisfies the constraints, hence the optimal value is $2$.
add a comment |Â
up vote
1
down vote
I don't see how do you ensure that $x_1=x$ whenever $x ge 0$ and $x_1=0$ otherwise.
Usually the trick works for minimizing the absolute value, not maximizing it. In fact, the problem is not convex.
From $x+y le 2$ and $y ge 0$, we have $x le 2$.
Also, from $y le 1+x$ and $y ge 0$, we have $x ge -1$.
Also $(2,0)$ satisfies the constraints, hence the optimal value is $2$.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I don't see how do you ensure that $x_1=x$ whenever $x ge 0$ and $x_1=0$ otherwise.
Usually the trick works for minimizing the absolute value, not maximizing it. In fact, the problem is not convex.
From $x+y le 2$ and $y ge 0$, we have $x le 2$.
Also, from $y le 1+x$ and $y ge 0$, we have $x ge -1$.
Also $(2,0)$ satisfies the constraints, hence the optimal value is $2$.
I don't see how do you ensure that $x_1=x$ whenever $x ge 0$ and $x_1=0$ otherwise.
Usually the trick works for minimizing the absolute value, not maximizing it. In fact, the problem is not convex.
From $x+y le 2$ and $y ge 0$, we have $x le 2$.
Also, from $y le 1+x$ and $y ge 0$, we have $x ge -1$.
Also $(2,0)$ satisfies the constraints, hence the optimal value is $2$.
answered Aug 21 at 9:25
Siong Thye Goh
80.2k1453100
80.2k1453100
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2889647%2flinear-programming-problem-with-absolute-value%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password