Solving Linear Program (P): Adding Slack Variables

Click For Summary
When adding slack variables to the linear program, the treatment of inequalities varies. For less-than-or-equal-to constraints, slack variables are added. For greater-than-or-equal-to constraints, one option is to subtract the slack variable, or alternatively, the constraint can be multiplied by -1 to convert it into a less-than-or-equal-to form, allowing for the addition of a slack variable. This approach ensures all constraints are in a suitable format for solving the linear program. Proper handling of these inequalities is crucial for accurate formulation.
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.
 
Thread 'How to define a vector field?'
Hello! In one book I saw that function ##V## of 3 variables ##V_x, V_y, V_z## (vector field in 3D) can be decomposed in a Taylor series without higher-order terms (partial derivative of second power and higher) at point ##(0,0,0)## such way: I think so: higher-order terms can be neglected because partial derivative of second power and higher are equal to 0. Is this true? And how to define vector field correctly for this case? (In the book I found nothing and my attempt was wrong...

Similar threads

  • · Replies 21 ·
Replies
21
Views
1K
  • · Replies 40 ·
2
Replies
40
Views
3K
  • · Replies 25 ·
Replies
25
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K