Solving Linear Program (P): Adding Slack Variables

catcherintherye
Messages
47
Reaction score
0
i am working with the following linear program

(P) max 2x_1 - x_2 \\<br /> <br /> subject to x_1 \leq 3 \\<br /> <br /> - x_1 + x_2 \leq -1 \\<br /> <br /> x_1 + x_2 \geq 2 \\<br /> <br /> x_1, x_2 \geq 0

my question is this, when introducing slack variable x_3 , x_4 , x_5

what should i do about the greater and equal to inequality, must i subtract the slack variable?
 
Last edited:
Physics news on Phys.org
i am working with the following linear program

(P) max 2x_1 - x_2

subject to x_1 \leq 3

- x_1 + x_2 \leq -1

x_1 + x_2 \geq 2

x_1, x_2 \geq 0

my question is this, when introducing slack variable x_3 , x_4 , x_5

what should i do about the greater and equal to inequality, must i subtract the slack variable?
 
Last edited:
You can do that. Or you can multiply the last constraint by -1 to turn \geq into \leq, and then add the slack variable.
 

Similar threads

Back
Top