Solving Linear Program (P): Adding Slack Variables

Click For Summary
SUMMARY

The discussion focuses on solving a linear programming problem (P) defined by the objective function max 2x1 - x2 with specific constraints. The user inquires about the proper handling of slack variables when dealing with inequalities, particularly for the constraint x1 + x2 ≥ 2. The consensus is that one can either subtract the slack variable from the inequality or multiply the constraint by -1 to convert it into a ≤ form and then add the slack variable. This approach ensures the linear program remains valid while incorporating slack variables.

PREREQUISITES
  • Understanding of linear programming concepts
  • Familiarity with slack variables in optimization
  • Knowledge of inequality manipulation in mathematical programming
  • Basic proficiency in formulating linear programs
NEXT STEPS
  • Study the role of slack variables in linear programming
  • Learn about duality in linear programming
  • Explore the Simplex method for solving linear programs
  • Investigate the implications of constraint transformations in optimization
USEFUL FOR

Students, mathematicians, and professionals in operations research or optimization who are working with linear programming and need to understand the application of slack variables in constraints.

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

  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 40 ·
2
Replies
40
Views
4K
  • · Replies 25 ·
Replies
25
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K