LP Standard Form

63
Math 407A: Linear Optimization Lecture 4: LP Standard Form 2 2 Author: James Burke, University of Washington Lecture 4: LP Standard Form 3 Math 407A: Linear Optimization 1 / 27

Transcript of LP Standard Form

Page 1: LP Standard Form

Math 407A: Linear Optimization

Lecture 4: LP Standard Form 2

2Author: James Burke, University of Washington

Lecture 4: LP Standard Form 3 Math 407A: Linear Optimization 1 / 27

Page 2: LP Standard Form

1 LPs in Standard Form

2 Minimization → maximization

3 Linear equations to linear inequalities

4 Lower and upper bounded variables

5 Interval variable bounds

6 Free variable

7 Two Step Process to Standard Form

Lecture 4: LP Standard Form 4 Math 407A: Linear Optimization 2 / 27

Page 3: LP Standard Form

LPs in Standard Form

We say that an LP is in standard form if its matrix representation has the form

max cT x It must be a maximization problem.

s.t. Ax ≤ b Only inequalities of the correct direction.

0 ≤ x All variables must be non-negative.

Lecture 4: LP Standard Form 5 Math 407A: Linear Optimization 3 / 27

Page 4: LP Standard Form

LPs in Standard Form

We say that an LP is in standard form if its matrix representation has the form

max cT x

It must be a maximization problem.

s.t. Ax ≤ b

Only inequalities of the correct direction.

0 ≤ x

All variables must be non-negative.

5Author: James Burke, University of Washington

Lecture 4: LP Standard Form 5 Math 407A: Linear Optimization 3 / 27

Page 5: LP Standard Form

LPs in Standard Form

We say that an LP is in standard form if its matrix representation has the form

max cT x It must be a maximization problem.

s.t. Ax ≤ b

Only inequalities of the correct direction.

0 ≤ x

All variables must be non-negative.

5Author: James Burke, University of Washington

Lecture 4: LP Standard Form 5 Math 407A: Linear Optimization 3 / 27

Page 6: LP Standard Form

LPs in Standard Form

We say that an LP is in standard form if its matrix representation has the form

max cT x It must be a maximization problem.

s.t. Ax ≤ b Only inequalities of the correct direction.

0 ≤ x

All variables must be non-negative.

5Author: James Burke, University of Washington

Lecture 4: LP Standard Form 5 Math 407A: Linear Optimization 3 / 27

Page 7: LP Standard Form

LPs in Standard Form

We say that an LP is in standard form if its matrix representation has the form

max cT x It must be a maximization problem.

s.t. Ax ≤ b Only inequalities of the correct direction.

0 ≤ x All variables must be non-negative.

5Author: James Burke, University of Washington

Lecture 4: LP Standard Form 6 Math 407A: Linear Optimization 3 / 27

Page 8: LP Standard Form

Every LP can be Transformed to Standard Form

minimization → maximization

To transform a minimization problem to a maximization problem multiply theobjective function by −1.

linear inequalities

If an LP has an inequality constraint of the form

ai1x1 + ai2x2 + · · ·+ ainxn ≥ bi ,

it can be transformed to one in standard form by multiplying the inequalitythrough by −1 to get

−ai1x1 − ai2x2 − · · · − ainxn ≤ −bi .

Lecture 4: LP Standard Form 7 Math 407A: Linear Optimization 4 / 27

Page 9: LP Standard Form

Every LP can be Transformed to Standard Form

minimization → maximization

To transform a minimization problem to a maximization problem multiply theobjective function by −1.

linear inequalities

If an LP has an inequality constraint of the form

ai1x1 + ai2x2 + · · ·+ ainxn ≥ bi ,

it can be transformed to one in standard form by multiplying the inequalitythrough by −1 to get

−ai1x1 − ai2x2 − · · · − ainxn ≤ −bi .

7Author: James Burke, University of Washington

Lecture 4: LP Standard Form 7 Math 407A: Linear Optimization 4 / 27

Page 10: LP Standard Form

Every LP can be Transformed to Standard Form

minimization → maximization

To transform a minimization problem to a maximization problem multiply theobjective function by −1.

linear inequalities

If an LP has an inequality constraint of the form

ai1x1 + ai2x2 + · · ·+ ainxn ≥ bi ,

it can be transformed to one in standard form by multiplying the inequalitythrough by −1 to get

−ai1x1 − ai2x2 − · · · − ainxn ≤ −bi .

7Author: James Burke, University of Washington

Lecture 4: LP Standard Form 7 Math 407A: Linear Optimization 4 / 27

Page 11: LP Standard Form

Every LP can be Transformed to Standard Form

minimization → maximization

To transform a minimization problem to a maximization problem multiply theobjective function by −1.

linear inequalities

If an LP has an inequality constraint of the form

ai1x1 + ai2x2 + · · ·+ ainxn ≥ bi ,

it can be transformed to one in standard form by multiplying the inequalitythrough by −1 to get

−ai1x1 − ai2x2 − · · · − ainxn ≤ −bi .

7Author: James Burke, University of Washington

Lecture 4: LP Standard Form 7 Math 407A: Linear Optimization 4 / 27

Page 12: LP Standard Form

Every LP can be Transformed to Standard Form

minimization → maximization

To transform a minimization problem to a maximization problem multiply theobjective function by −1.

linear inequalities

If an LP has an inequality constraint of the form

ai1x1 + ai2x2 + · · ·+ ainxn ≥ bi ,

it can be transformed to one in standard form by multiplying the inequalitythrough by −1 to get

−ai1x1 − ai2x2 − · · · − ainxn ≤ −bi .

7Author: James Burke, University of Washington

Lecture 4: LP Standard Form 8 Math 407A: Linear Optimization 4 / 27

Page 13: LP Standard Form

Every LP can be Transformed to Standard Form

linear equations

The linear equationai1xi + · · ·+ ainxn = bi

can be written as two linear inequalities

ai1x1 + · · ·+ ainxn ≤ bi

andai1x1 + · · ·+ ainxn ≥ bi .

or equivalentlyai1x1 + · · ·+ ainxn ≤ bi

−ai1x1 − · · · − ainxn ≤ −bi

Lecture 4: LP Standard Form 9 Math 407A: Linear Optimization 5 / 27

Page 14: LP Standard Form

Every LP can be Transformed to Standard Form

linear equations

The linear equationai1xi + · · ·+ ainxn = bi

can be written as two linear inequalities

ai1x1 + · · ·+ ainxn ≤ bi

andai1x1 + · · ·+ ainxn ≥ bi .

or equivalentlyai1x1 + · · ·+ ainxn ≤ bi

−ai1x1 − · · · − ainxn ≤ −bi

9Author: James Burke, University of Washington

Lecture 4: LP Standard Form 10 Math 407A: Linear Optimization 5 / 27

Page 15: LP Standard Form

Every LP can be Transformed to Standard Form

variables with lower bounds

If a variable xi has lower bound li which is not zero (li ≤ xi ) or equivalently,0 ≤ xi − li , one obtains a non-negative variable wi := xi − li yielding thesubstitution

xi = wi + li .

In this case, the bound li ≤ xi is equivalent to the bound 0 ≤ wi .

variables with upper bounds

If a variable xi has an upper bound ui (xi ≤ ui ), or equivalently, 0 ≤ ui − xi ,one obtains a non-negative variable wi := ui − xi yielding the substitution

xi = ui − wi .

In this case, the bound xi ≤ ui is equivalent to the bound 0 ≤ wi .

Lecture 4: LP Standard Form 11 Math 407A: Linear Optimization 6 / 27

Page 16: LP Standard Form

Every LP can be Transformed to Standard Form

variables with lower bounds

If a variable xi has lower bound li which is not zero (li ≤ xi ) or equivalently,0 ≤ xi − li , one obtains a non-negative variable wi := xi − li yielding thesubstitution

xi = wi + li .

In this case, the bound li ≤ xi is equivalent to the bound 0 ≤ wi .

variables with upper bounds

If a variable xi has an upper bound ui (xi ≤ ui ), or equivalently, 0 ≤ ui − xi ,one obtains a non-negative variable wi := ui − xi yielding the substitution

xi = ui − wi .

In this case, the bound xi ≤ ui is equivalent to the bound 0 ≤ wi .

11Author: James Burke, University of Washington

Lecture 4: LP Standard Form 11 Math 407A: Linear Optimization 6 / 27

Page 17: LP Standard Form

Every LP can be Transformed to Standard Form

variables with lower bounds

If a variable xi has lower bound li which is not zero (li ≤ xi ) or equivalently,0 ≤ xi − li , one obtains a non-negative variable wi := xi − li yielding thesubstitution

xi = wi + li .

In this case, the bound li ≤ xi is equivalent to the bound 0 ≤ wi .

variables with upper bounds

If a variable xi has an upper bound ui (xi ≤ ui ), or equivalently, 0 ≤ ui − xi ,one obtains a non-negative variable wi := ui − xi yielding the substitution

xi = ui − wi .

In this case, the bound xi ≤ ui is equivalent to the bound 0 ≤ wi .

11Author: James Burke, University of Washington

Lecture 4: LP Standard Form 11 Math 407A: Linear Optimization 6 / 27

Page 18: LP Standard Form

Every LP can be Transformed to Standard Form

variables with lower bounds

If a variable xi has lower bound li which is not zero (li ≤ xi ) or equivalently,0 ≤ xi − li , one obtains a non-negative variable wi := xi − li yielding thesubstitution

xi = wi + li .

In this case, the bound li ≤ xi is equivalent to the bound 0 ≤ wi .

variables with upper bounds

If a variable xi has an upper bound ui (xi ≤ ui ), or equivalently, 0 ≤ ui − xi ,one obtains a non-negative variable wi := ui − xi yielding the substitution

xi = ui − wi .

In this case, the bound xi ≤ ui is equivalent to the bound 0 ≤ wi .

11Author: James Burke, University of Washington

Lecture 4: LP Standard Form 12 Math 407A: Linear Optimization 6 / 27

Page 19: LP Standard Form

Every LP can be Transformed to Standard Form

variables with interval bounds

An interval bound of the form li ≤ xi ≤ ui can be transformed into onenon-negativity constraint and one linear inequality constraint in standardform by making the substitution

xi = wi + li .

In this case, the bounds li ≤ xi ≤ ui are equivalent to the constraints

0 ≤ wi and wi ≤ ui − li .

Lecture 4: LP Standard Form 13 Math 407A: Linear Optimization 7 / 27

Page 20: LP Standard Form

Every LP can be Transformed to Standard Form

variables with interval bounds

An interval bound of the form li ≤ xi ≤ ui can be transformed into onenon-negativity constraint and one linear inequality constraint in standardform by making the substitution

xi = wi + li .

In this case, the bounds li ≤ xi ≤ ui are equivalent to the constraints

0 ≤ wi and wi ≤ ui − li .

13Author: James Burke, University of Washington

Lecture 4: LP Standard Form 13 Math 407A: Linear Optimization 7 / 27

Page 21: LP Standard Form

Every LP can be Transformed to Standard Form

variables with interval bounds

An interval bound of the form li ≤ xi ≤ ui can be transformed into onenon-negativity constraint and one linear inequality constraint in standardform by making the substitution

xi = wi + li .

In this case, the bounds li ≤ xi ≤ ui are equivalent to the constraints

0 ≤ wi and wi ≤ ui − li .

13Author: James Burke, University of Washington

Lecture 4: LP Standard Form 14 Math 407A: Linear Optimization 7 / 27

Page 22: LP Standard Form

Every LP can be Transformed to Standard Form

free variables

Sometimes a variable is given without any bounds. Such variables are calledfree variables. To obtain standard form every free variable must be replacedby the difference of two non-negative variables. That is, if xi is free, then weget

xi = ui − vi

with 0 ≤ ui and 0 ≤ vi .

Lecture 4: LP Standard Form 15 Math 407A: Linear Optimization 8 / 27

Page 23: LP Standard Form

Every LP can be Transformed to Standard Form

free variables

Sometimes a variable is given without any bounds. Such variables are calledfree variables. To obtain standard form every free variable must be replacedby the difference of two non-negative variables. That is, if xi is free, then weget

xi = ui − vi

with 0 ≤ ui and 0 ≤ vi .

15Author: James Burke, University of Washington

Lecture 4: LP Standard Form 16 Math 407A: Linear Optimization 8 / 27

Page 24: LP Standard Form

Transformation to Standard Form

Put the following LP into standard form.

minimize 3x1 − x2subject to −x1 + 6x2 − x3 + x4 ≥ −3

7x2 + x4 = 5x3 + x4 ≤ 2

−1 ≤ x2, x3 ≤ 5, −2 ≤ x4 ≤ 2.

Lecture 4: LP Standard Form 17 Math 407A: Linear Optimization 9 / 27

Page 25: LP Standard Form

Transformation to Standard Form

The hardest part of the translation to standard form, or at least the part mostsusceptible to error, is the replacement of existing variables with non-negativevariables.

Reduce errors by doing the transformation in two steps.

Step 1: Make all of the changes that do not involve a variable substitution.

Step 2: Make all of the variable substitutions.

Lecture 4: LP Standard Form 18 Math 407A: Linear Optimization 10 / 27

Page 26: LP Standard Form

Transformation to Standard Form

The hardest part of the translation to standard form, or at least the part mostsusceptible to error, is the replacement of existing variables with non-negativevariables.

Reduce errors by doing the transformation in two steps.

Step 1: Make all of the changes that do not involve a variable substitution.

Step 2: Make all of the variable substitutions.

18Author: James Burke, University of Washington

Lecture 4: LP Standard Form 18 Math 407A: Linear Optimization 10 / 27

Page 27: LP Standard Form

Transformation to Standard Form

The hardest part of the translation to standard form, or at least the part mostsusceptible to error, is the replacement of existing variables with non-negativevariables.

Reduce errors by doing the transformation in two steps.

Step 1: Make all of the changes that do not involve a variable substitution.

Step 2: Make all of the variable substitutions.

18Author: James Burke, University of Washington

Lecture 4: LP Standard Form 18 Math 407A: Linear Optimization 10 / 27

Page 28: LP Standard Form

Transformation to Standard Form

The hardest part of the translation to standard form, or at least the part mostsusceptible to error, is the replacement of existing variables with non-negativevariables.

Reduce errors by doing the transformation in two steps.

Step 1: Make all of the changes that do not involve a variable substitution.

Step 2: Make all of the variable substitutions.

18Author: James Burke, University of Washington

Lecture 4: LP Standard Form 19 Math 407A: Linear Optimization 10 / 27

Page 29: LP Standard Form

Must be a maximization problem

minimize 3x1 − x2subject to −x1 + 6x2 − x3 + x4 ≥ −3

7x2 + x4 = 5x3 + x4 ≤ 2

−1 ≤ x2, x3 ≤ 5, −2 ≤ x4 ≤ 2.

Minimization =⇒ maximization

maximize − 3x1 + x2.

Lecture 4: LP Standard Form 20 Math 407A: Linear Optimization 11 / 27

Page 30: LP Standard Form

Must be a maximization problem

minimize 3x1 − x2subject to −x1 + 6x2 − x3 + x4 ≥ −3

7x2 + x4 = 5x3 + x4 ≤ 2

−1 ≤ x2, x3 ≤ 5, −2 ≤ x4 ≤ 2.

Minimization =⇒ maximization

maximize − 3x1 + x2.

20Author: James Burke, University of Washington

Lecture 4: LP Standard Form 20 Math 407A: Linear Optimization 11 / 27

Page 31: LP Standard Form

Must be a maximization problem

minimize 3x1 − x2subject to −x1 + 6x2 − x3 + x4 ≥ −3

7x2 + x4 = 5x3 + x4 ≤ 2

−1 ≤ x2, x3 ≤ 5, −2 ≤ x4 ≤ 2.

Minimization =⇒ maximization

maximize − 3x1 + x2.

20Author: James Burke, University of Washington

Lecture 4: LP Standard Form 21 Math 407A: Linear Optimization 11 / 27

Page 32: LP Standard Form

Inequalities must go the right way.

− x1 + 6x2 − x3 + x4 ≥ −3

becomes

x1 − 6x2 + x3 − x4 ≤ 3.

Lecture 4: LP Standard Form 22 Math 407A: Linear Optimization 12 / 27

Page 33: LP Standard Form

Inequalities must go the right way.

− x1 + 6x2 − x3 + x4 ≥ −3

becomes

x1 − 6x2 + x3 − x4 ≤ 3.

22Author: James Burke, University of Washington

Lecture 4: LP Standard Form 22 Math 407A: Linear Optimization 12 / 27

Page 34: LP Standard Form

Inequalities must go the right way.

− x1 + 6x2 − x3 + x4 ≥ −3

becomes

x1 − 6x2 + x3 − x4 ≤ 3.

22Author: James Burke, University of Washington

Lecture 4: LP Standard Form 22 Math 407A: Linear Optimization 12 / 27

Page 35: LP Standard Form

Inequalities must go the right way.

− x1 + 6x2 − x3 + x4 ≥ −3

becomes

x1 − 6x2 + x3 − x4 ≤ 3.

22Author: James Burke, University of Washington

Lecture 4: LP Standard Form 23 Math 407A: Linear Optimization 12 / 27

Page 36: LP Standard Form

Equalities are replaced by 2 inequalities.

7x2 + x4 = 5

becomes

7x2 + x4 ≤ 5

and

− 7x2 − x4 ≤ −5

Lecture 4: LP Standard Form 24 Math 407A: Linear Optimization 13 / 27

Page 37: LP Standard Form

Equalities are replaced by 2 inequalities.

7x2 + x4 = 5

becomes

7x2 + x4 ≤ 5

and

− 7x2 − x4 ≤ −5

24Author: James Burke, University of Washington

Lecture 4: LP Standard Form 24 Math 407A: Linear Optimization 13 / 27

Page 38: LP Standard Form

Equalities are replaced by 2 inequalities.

7x2 + x4 = 5

becomes

7x2 + x4 ≤ 5

and

− 7x2 − x4 ≤ −5

24Author: James Burke, University of Washington

Lecture 4: LP Standard Form 24 Math 407A: Linear Optimization 13 / 27

Page 39: LP Standard Form

Equalities are replaced by 2 inequalities.

7x2 + x4 = 5

becomes

7x2 + x4 ≤ 5

and

− 7x2 − x4 ≤ −5

24Author: James Burke, University of Washington

Lecture 4: LP Standard Form 24 Math 407A: Linear Optimization 13 / 27

Page 40: LP Standard Form

Equalities are replaced by 2 inequalities.

7x2 + x4 = 5

becomes

7x2 + x4 ≤ 5

and

− 7x2 − x4 ≤ −5

24Author: James Burke, University of Washington

Lecture 4: LP Standard Form 25 Math 407A: Linear Optimization 13 / 27

Page 41: LP Standard Form

Grouping upper bounds with the linear inequalities.

The double bound −2 ≤ x4 ≤ 2 indicates that we should group the upper boundwith the linear inequalities.

x4 ≤ 2

Lecture 4: LP Standard Form 26 Math 407A: Linear Optimization 14 / 27

Page 42: LP Standard Form

Grouping upper bounds with the linear inequalities.

The double bound −2 ≤ x4 ≤ 2 indicates that we should group the upper boundwith the linear inequalities.

x4 ≤ 2

26Author: James Burke, University of Washington

Lecture 4: LP Standard Form 27 Math 407A: Linear Optimization 14 / 27

Page 43: LP Standard Form

Step 1: Transformation to Standard Form

Combining all of these changes gives the LP

maximize −3x1 + x2subject to x1 − 6x2 + x3 − x4 ≤ 3

7x2 + x4 ≤ 5− 7x2 − x4 ≤ −5

x3 + x4 ≤ 2x4 ≤ 2

−1 ≤ x2, x3 ≤ 5, −2 ≤ x4.

Lecture 4: LP Standard Form 28 Math 407A: Linear Optimization 15 / 27

Page 44: LP Standard Form

Step 2: Variable Replacement

The variable x1 is free, so we replace it by

x1 = z+1 − z−1 with 0 ≤ z+1 , 0 ≤ z−1 .

x2 has a non-zero lower bound (−1 ≤ x2) so we replace it by

z2 = x2 + 1 or x2 = z2 − 1 with 0 ≤ z2.

x3 is bounded above (x3 ≤ 5), so we replace it by

z3 = 5− x3 or x3 = 5− z3 with 0 ≤ z3.

x4 is bounded below (−2 ≤ x4), so we replace it by

z4 = x4 + 2 or x4 = z4 − 2 with 0 ≤ z4.

Lecture 4: LP Standard Form 29 Math 407A: Linear Optimization 16 / 27

Page 45: LP Standard Form

Step 2: Variable Replacement

The variable x1 is free, so we replace it by

x1 = z+1 − z−1 with 0 ≤ z+1 , 0 ≤ z−1 .

x2 has a non-zero lower bound (−1 ≤ x2) so we replace it by

z2 = x2 + 1 or x2 = z2 − 1 with 0 ≤ z2.

x3 is bounded above (x3 ≤ 5), so we replace it by

z3 = 5− x3 or x3 = 5− z3 with 0 ≤ z3.

x4 is bounded below (−2 ≤ x4), so we replace it by

z4 = x4 + 2 or x4 = z4 − 2 with 0 ≤ z4.

29Author: James Burke, University of Washington

Lecture 4: LP Standard Form 29 Math 407A: Linear Optimization 16 / 27

Page 46: LP Standard Form

Step 2: Variable Replacement

The variable x1 is free, so we replace it by

x1 = z+1 − z−1 with 0 ≤ z+1 , 0 ≤ z−1 .

x2 has a non-zero lower bound (−1 ≤ x2) so we replace it by

z2 = x2 + 1 or x2 = z2 − 1 with 0 ≤ z2.

x3 is bounded above (x3 ≤ 5), so we replace it by

z3 = 5− x3 or x3 = 5− z3 with 0 ≤ z3.

x4 is bounded below (−2 ≤ x4), so we replace it by

z4 = x4 + 2 or x4 = z4 − 2 with 0 ≤ z4.

29Author: James Burke, University of Washington

Lecture 4: LP Standard Form 29 Math 407A: Linear Optimization 16 / 27

Page 47: LP Standard Form

Step 2: Variable Replacement

The variable x1 is free, so we replace it by

x1 = z+1 − z−1 with 0 ≤ z+1 , 0 ≤ z−1 .

x2 has a non-zero lower bound (−1 ≤ x2) so we replace it by

z2 = x2 + 1 or x2 = z2 − 1 with 0 ≤ z2.

x3 is bounded above (x3 ≤ 5), so we replace it by

z3 = 5− x3 or x3 = 5− z3 with 0 ≤ z3.

x4 is bounded below (−2 ≤ x4), so we replace it by

z4 = x4 + 2 or x4 = z4 − 2 with 0 ≤ z4.

29Author: James Burke, University of Washington

Lecture 4: LP Standard Form 29 Math 407A: Linear Optimization 16 / 27

Page 48: LP Standard Form

Step 2: Variable Replacement

The variable x1 is free, so we replace it by

x1 = z+1 − z−1 with 0 ≤ z+1 , 0 ≤ z−1 .

x2 has a non-zero lower bound (−1 ≤ x2) so we replace it by

z2 = x2 + 1 or x2 = z2 − 1 with 0 ≤ z2.

x3 is bounded above (x3 ≤ 5), so we replace it by

z3 = 5− x3 or x3 = 5− z3 with 0 ≤ z3.

x4 is bounded below (−2 ≤ x4), so we replace it by

z4 = x4 + 2 or x4 = z4 − 2 with 0 ≤ z4.

29Author: James Burke, University of Washington

Lecture 4: LP Standard Form 29 Math 407A: Linear Optimization 16 / 27

Page 49: LP Standard Form

Step 2: Variable Replacement

The variable x1 is free, so we replace it by

x1 = z+1 − z−1 with 0 ≤ z+1 , 0 ≤ z−1 .

x2 has a non-zero lower bound (−1 ≤ x2) so we replace it by

z2 = x2 + 1 or x2 = z2 − 1 with 0 ≤ z2.

x3 is bounded above (x3 ≤ 5), so we replace it by

z3 = 5− x3 or x3 = 5− z3 with 0 ≤ z3.

x4 is bounded below (−2 ≤ x4), so we replace it by

z4 = x4 + 2 or x4 = z4 − 2 with 0 ≤ z4.

29Author: James Burke, University of Washington

Lecture 4: LP Standard Form 29 Math 407A: Linear Optimization 16 / 27

Page 50: LP Standard Form

Step 2: Variable Replacement

The variable x1 is free, so we replace it by

x1 = z+1 − z−1 with 0 ≤ z+1 , 0 ≤ z−1 .

x2 has a non-zero lower bound (−1 ≤ x2) so we replace it by

z2 = x2 + 1 or x2 = z2 − 1 with 0 ≤ z2.

x3 is bounded above (x3 ≤ 5), so we replace it by

z3 = 5− x3 or x3 = 5− z3 with 0 ≤ z3.

x4 is bounded below (−2 ≤ x4), so we replace it by

z4 = x4 + 2 or x4 = z4 − 2 with 0 ≤ z4.

29Author: James Burke, University of Washington

Lecture 4: LP Standard Form 29 Math 407A: Linear Optimization 16 / 27

Page 51: LP Standard Form

Step 2: Variable Replacement

The variable x1 is free, so we replace it by

x1 = z+1 − z−1 with 0 ≤ z+1 , 0 ≤ z−1 .

x2 has a non-zero lower bound (−1 ≤ x2) so we replace it by

z2 = x2 + 1 or x2 = z2 − 1 with 0 ≤ z2.

x3 is bounded above (x3 ≤ 5), so we replace it by

z3 = 5− x3 or x3 = 5− z3 with 0 ≤ z3.

x4 is bounded below (−2 ≤ x4), so we replace it by

z4 = x4 + 2 or x4 = z4 − 2 with 0 ≤ z4.

29Author: James Burke, University of Washington

Lecture 4: LP Standard Form 30 Math 407A: Linear Optimization 16 / 27

Page 52: LP Standard Form

Step 2: Transformation to Standard Form

Substituting x1 = z+1 − z−1 into

maximize −3x1 + x2subject to x1 − 6x2 + x3 − x4 ≤ 3

7x2 + x4 ≤ 5− 7x2 − x4 ≤ −5

x3 + x4 ≤ 2x4 ≤ 2

−1 ≤ x2, x3 ≤ 5, −2 ≤ x4.

gives

Lecture 4: LP Standard Form 31 Math 407A: Linear Optimization 17 / 27

Page 53: LP Standard Form

Step 2: Transformation to Standard Form

maximize −3z+1 + 3z−1 + x2subject to z+1 − z−1 − 6x2 + x3 − x4 ≤ 3

7x2 + x4 ≤ 5− 7x2 − x4 ≤ −5

x3 + x4 ≤ 2x4 ≤ 2

0 ≤ z+1 , 0 ≤ z−1 , −1 ≤ x2, x3 ≤ 5, −2 ≤ x4.

Lecture 4: LP Standard Form 32 Math 407A: Linear Optimization 18 / 27

Page 54: LP Standard Form

Step 2: Transformation to Standard Form

Substituting x2 = z2 − 1 into

maximize −3z+1 + 3z−1 + x2subject to z+1 − z−1 − 6x2 + x3 − x4 ≤ 3

7x2 + x4 ≤ 5− 7x2 − x4 ≤ −5

x3 + x4 ≤ 2x4 ≤ 2

0 ≤ z+1 , 0 ≤ z−1 , −1 ≤ x2, x3 ≤ 5, −2 ≤ x4.

gives

Lecture 4: LP Standard Form 33 Math 407A: Linear Optimization 19 / 27

Page 55: LP Standard Form

Step 2: Transformation to Standard Form

maximize −3z+1 + 3z−1 + z2 − 1subject to z+1 − z−1 − 6z2 + x3 − x4 ≤ 3− 6 = −3

7z2 + x4 ≤ 5 + 7 = 12− 7z2 − x4 ≤ −5− 7 = −12

x3 + x4 ≤ 2x4 ≤ 2

0 ≤ z+1 , 0 ≤ z−1 , −0 ≤ z2, x3 ≤ 5, −2 ≤ x4.

Lecture 4: LP Standard Form 34 Math 407A: Linear Optimization 20 / 27

Page 56: LP Standard Form

Step 2: Transformation to Standard Form

maximize −3z+1 + 3z−1 + z2subject to z+1 − z−1 − 6z2 + x3 − x4 ≤ −3

7z2 + x4 ≤ 12− 7z2 − x4 ≤ −12

x3 + x4 ≤ 2x4 ≤ 2

0 ≤ z+1 , 0 ≤ z−1 , −0 ≤ z2, x3 ≤ 5, −2 ≤ x4.

Lecture 4: LP Standard Form 35 Math 407A: Linear Optimization 21 / 27

Page 57: LP Standard Form

Step 2: Transformation to Standard Form

Substituting x3 = 5− z3 into

maximize −3z+1 + 3z−1 + z2subject to z+1 − z−1 − 6z2 + x3 − x4 ≤ −3

7z2 + x4 ≤ 12− 7z2 − x4 ≤ −12

x3 + x4 ≤ 2x4 ≤ 2

0 ≤ z+1 , 0 ≤ z−1 , −0 ≤ z2, x3 ≤ 5, −2 ≤ x4.

gives

Lecture 4: LP Standard Form 36 Math 407A: Linear Optimization 22 / 27

Page 58: LP Standard Form

Step 2: Transformation to Standard Form

maximize −3z+1 + 3z−1 + z2subject to z+1 − z−1 − 6z2 − z3 − x4 ≤ −3− 5 = −8

7z2 + x4 ≤ 12− 7z2 − x4 ≤ −12

− z3 + x4 ≤ 2− 5 = −3x4 ≤ 2

0 ≤ z+1 , 0 ≤ z−1 , −0 ≤ z2, 0 ≤ z3, −2 ≤ x4.

Lecture 4: LP Standard Form 37 Math 407A: Linear Optimization 23 / 27

Page 59: LP Standard Form

Step 2: Transformation to Standard Form

Substituting x4 = z4 − 2 into

maximize −3z+1 + 3z−1 + z2subject to z+1 − z−1 − 6z2 − z3 − x4 ≤ −8

7z2 + x4 ≤ 12− 7z2 − x4 ≤ −12

− z3 + x4 ≤ −3x4 ≤ 2

0 ≤ z+1 , 0 ≤ z−1 , −0 ≤ z2, 0 ≤ z3, −2 ≤ x4.

gives

Lecture 4: LP Standard Form 38 Math 407A: Linear Optimization 24 / 27

Page 60: LP Standard Form

Step 2: Transformation to Standard Form

maximize −3z+1 + 3z−1 + z2subject to z+1 − z−1 − 6z2 − z3 − z4 ≤ −8− 2 = −10

7z2 + z4 ≤ 12 + 2 = 14− 7z2 − z4 ≤ −12− 2 = −14

− z3 + z4 ≤ −3 + 2 = −1z4 ≤ 2 + 2 = 4

0 ≤ z+1 , 0 ≤ z−1 , −0 ≤ z2, 0 ≤ z3, 0 ≤ z4.

which is in standard form.

Lecture 4: LP Standard Form 39 Math 407A: Linear Optimization 25 / 27

Page 61: LP Standard Form

Step 2: Transformation to Standard Form

After making these substitutions, we get the following LP in standard form:

maximize −3z+1 + 3z−1 + z2subject to z+1 − z−1 − 6z2 − z3 − z4 ≤ −10

7z2 + z4 ≤ 14− 7z2 − z4 ≤ −14

− z3 + z4 ≤ −1z4 ≤ 4

0 ≤ z+1 , z−1 , z2, z3, z4.

Lecture 4: LP Standard Form 40 Math 407A: Linear Optimization 26 / 27

Page 62: LP Standard Form

Step 2: Transformation to Standard Form

After making these substitutions, we get the following LP in standard form:

maximize −3z+1 + 3z−1 + z2subject to z+1 − z−1 − 6z2 − z3 − z4 ≤ −10

7z2 + z4 ≤ 14− 7z2 − z4 ≤ −14

− z3 + z4 ≤ −1z4 ≤ 4

0 ≤ z+1 , z−1 , z2, z3, z4.

40Author: James Burke, University of Washington

Lecture 4: LP Standard Form 41 Math 407A: Linear Optimization 26 / 27

Page 63: LP Standard Form

Transformation to Standard Form: Practice

Transform the following LP to an LP in standard form.

minimize x1 − 12x2 + 2x3

subject to −5x1 − x2 + 3x3 = −152x1 + x2 − 20x3 ≥ −300 ≤ x2 , 1 ≤ x3 ≤ 4

Lecture 4: LP Standard Form 42 Math 407A: Linear Optimization 27 / 27