Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Slack variables

  1. Aug 1, 2007 #1
    i am working with the following linear program

    [tex] (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 [/tex]

    my question is this, when introducing slack variable [tex] x_3 , x_4 , x_5 [/tex]

    what should i do about the greater and equal to inequality, must i subtract the slack variable?
     
    Last edited: Aug 1, 2007
  2. jcsd
  3. Aug 1, 2007 #2
    i am working with the following linear program

    (P) max [tex] 2x_1 - x_2 [/tex]

    [tex] subject to x_1 \leq 3 [/tex]

    [tex] - x_1 + x_2 \leq -1 [/tex]

    [tex] x_1 + x_2 \geq 2 [/tex]

    [tex] x_1, x_2 \geq 0 [/tex]

    my question is this, when introducing slack variable [tex] x_3 , x_4 , x_5 [/tex]

    what should i do about the greater and equal to inequality, must i subtract the slack variable?
     
    Last edited: Aug 1, 2007
  4. Aug 1, 2007 #3

    morphism

    User Avatar
    Science Advisor
    Homework Helper

    You can do that. Or you can multiply the last constraint by -1 to turn [itex]\geq[/itex] into [itex]\leq[/itex], and then add the slack variable.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Slack variables
  1. Variables in a matrix (Replies: 2)

Loading...