linear programming: algebra

42
Linear programming: algebra CE 377K March 26, 2015

Upload: others

Post on 05-May-2022

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linear programming: algebra

Linear programming: algebra

CE 377K

March 26, 2015

Page 2: Linear programming: algebra

ANNOUNCEMENTS

Page 3: Linear programming: algebra

Groups and project topics due soon

Did everyone get my test email?

Linear programming Announcements

Page 4: Linear programming: algebra

Groups and project topics due soon

Did everyone get my test email?

Linear programming Announcements

Page 5: Linear programming: algebra

REVIEW

Page 6: Linear programming: algebra

Linear programming geometry

Extreme points

“Brute force” solution method

More elegant solution method

Linear programming Review

Page 7: Linear programming: algebra

Linear programming geometry

Extreme points

“Brute force” solution method

More elegant solution method

Linear programming Review

Page 8: Linear programming: algebra

Linear programming geometry

Extreme points

“Brute force” solution method

More elegant solution method

Linear programming Review

Page 9: Linear programming: algebra

Linear programming geometry

Extreme points

“Brute force” solution method

More elegant solution method

Linear programming Review

Page 10: Linear programming: algebra

OUTLINE

Page 11: Linear programming: algebra

Expanding to problems with more decision variables

Algebraic equivalent of geometric methods

Standard form for linear programs

Linear programming Outline

Page 12: Linear programming: algebra

We are heading towards the simplex method for solving linear programs.Rather than “brute forcing” through all of the extreme points, the simplexmethod moves along the boundary of the feasible region in “downhill”directions.

Linear programming Outline

Page 13: Linear programming: algebra

To develop the simplex method, we need a standard form for linearprograms.

The standard form expresses a linear program in the following way:

The objective function is to be minimized

All decision variables are required to be non-negative

All other constraints are equalities

Linear programming Outline

Page 14: Linear programming: algebra

To develop the simplex method, we need a standard form for linearprograms.

The standard form expresses a linear program in the following way:

The objective function is to be minimized

All decision variables are required to be non-negative

All other constraints are equalities

Linear programming Outline

Page 15: Linear programming: algebra

minx1,...,xn

n∑i=1

cixi

s.t.

n∑i=1

ai1xi = b1

...n∑

i=1

aimxi = bm

x1, . . . , xn ≥ 0

Linear programming Outline

Page 16: Linear programming: algebra

Sometimes we can transform a nonstandard linear program into standardform:

If the objective is to maximize f (x), we can just as well minimize −f (x).

Linear programming Outline

Page 17: Linear programming: algebra

Sometimes we can transform a nonstandard linear program into standardform:

If the objective is to maximize f (x), we can just as well minimize −f (x).

Linear programming Outline

Page 18: Linear programming: algebra

What if there is a decision variable x which can be either positive ornegative?

We can replace x with two decision variables x+ and x−, and add twoconstraints:

x+ ≥ 0

x− ≥ 0

By substituting x+− x− everywhere x appeared in the original formulation,we can express the problem in standard form.

Linear programming Outline

Page 19: Linear programming: algebra

What if there is a decision variable x which can be either positive ornegative?

We can replace x with two decision variables x+ and x−, and add twoconstraints:

x+ ≥ 0

x− ≥ 0

By substituting x+− x− everywhere x appeared in the original formulation,we can express the problem in standard form.

Linear programming Outline

Page 20: Linear programming: algebra

What if there is a decision variable x which can be either positive ornegative?

We can replace x with two decision variables x+ and x−, and add twoconstraints:

x+ ≥ 0

x− ≥ 0

By substituting x+− x− everywhere x appeared in the original formulation,we can express the problem in standard form.

Linear programming Outline

Page 21: Linear programming: algebra

What if there is an inequality constraint of the forma1x1 + a2x2 + · · · + anxn ≤ b

We can add a nonnegative “slack variable” s and rewrite the constraint asa1x1 + a2x2 + · · · + anxn + s = b (and s ≥ 0)

What would we do for a ≥ inequality constraint?

Linear programming Outline

Page 22: Linear programming: algebra

What if there is an inequality constraint of the forma1x1 + a2x2 + · · · + anxn ≤ b

We can add a nonnegative “slack variable” s and rewrite the constraint asa1x1 + a2x2 + · · · + anxn + s = b (and s ≥ 0)

What would we do for a ≥ inequality constraint?

Linear programming Outline

Page 23: Linear programming: algebra

What if there is an inequality constraint of the forma1x1 + a2x2 + · · · + anxn ≤ b

We can add a nonnegative “slack variable” s and rewrite the constraint asa1x1 + a2x2 + · · · + anxn + s = b (and s ≥ 0)

What would we do for a ≥ inequality constraint?

Linear programming Outline

Page 24: Linear programming: algebra

Convert this problem into standard form

:

maxτ1,τ2

(2100 − 1000τ1) + (3000 − 1500τ2)

s.t. 2100 − 1000τ1 ≤ 2000

3000 − 1500τ2 ≤ 2000

τ1 − τ2 ≤ 0.25

τ2 − τ1 ≤ 0.25

0 ≤ τ1, τ2 ≤ 1

Linear programming Outline

Page 25: Linear programming: algebra

minτ1,τ2,s1,s2,s3,s4,s5,s6

1000τ1 + 1500τ2 − 5100

s.t. 2100 − 1000τ1 + s1 = 2000

3000 − 1500τ2 + s2 = 2000

τ1 − τ2 + s3 = 0.25

τ2 − τ1 + s4 = 0.25

τ1 + s5 = 1

τ2 + s6 = 1

τ1, τ2, s1, s2, s3, s4, s5, s6 ≥ 0

Linear programming Outline

Page 26: Linear programming: algebra

EXTREME POINTSALGEBRAICALLY

Page 27: Linear programming: algebra

When there are n decision variables, an extreme point of the feasibleregion corresponds to the intersection of n constraints (if the intersectionpoint is feasible).

Since the equations are linear, it is easy to find these intersection points.

Linear programming Extreme points algebraically

Page 28: Linear programming: algebra

When there are n decision variables, an extreme point of the feasibleregion corresponds to the intersection of n constraints (if the intersectionpoint is feasible).

Since the equations are linear, it is easy to find these intersection points.

Linear programming Extreme points algebraically

Page 29: Linear programming: algebra

Linear programming Extreme points algebraically

Page 30: Linear programming: algebra

Furthermore, adjacent extreme points have n − 1 of the constraints incommon.

A preview of the simplex method: find the intersection point of nconstraints; then substitute constraints one at a time, moving to adjacentextreme points until the optimal solution is found.

Linear programming Extreme points algebraically

Page 31: Linear programming: algebra

Furthermore, adjacent extreme points have n − 1 of the constraints incommon.

A preview of the simplex method: find the intersection point of nconstraints; then substitute constraints one at a time, moving to adjacentextreme points until the optimal solution is found.

Linear programming Extreme points algebraically

Page 32: Linear programming: algebra

GENERAL ALGEBRAICPROCESS

Page 33: Linear programming: algebra

Assume that a standard-form LP has n decision variables and m equalityconstraints.

It is safe to assume that n ≥ m. (Why?)

Linear programming General algebraic process

Page 34: Linear programming: algebra

Assume that a standard-form LP has n decision variables and m equalityconstraints.

It is safe to assume that n ≥ m. (Why?)

Linear programming General algebraic process

Page 35: Linear programming: algebra

What does the intersection of n constraints look like?

Any feasible point must satisfy all m equality constraints, so n −m of thenonnegativity constraints must be tight.

That is, n−m of the decision variables must be zero, and the other m cantake positive or zero values.

Linear programming General algebraic process

Page 36: Linear programming: algebra

What does the intersection of n constraints look like?

Any feasible point must satisfy all m equality constraints, so n −m of thenonnegativity constraints must be tight.

That is, n−m of the decision variables must be zero, and the other m cantake positive or zero values.

Linear programming General algebraic process

Page 37: Linear programming: algebra

What does the intersection of n constraints look like?

Any feasible point must satisfy all m equality constraints, so n −m of thenonnegativity constraints must be tight.

That is, n−m of the decision variables must be zero, and the other m cantake positive or zero values.

Linear programming General algebraic process

Page 38: Linear programming: algebra

The m decision variables which take take positive or zero values are calledbasic variables or a basis, and the remaining n −m decision variables arecalled nonbasic.

We can identify the extreme point corresponding to a basis by solving mequations in m unknowns.

Linear programming General algebraic process

Page 39: Linear programming: algebra

The m decision variables which take take positive or zero values are calledbasic variables or a basis, and the remaining n −m decision variables arecalled nonbasic.

We can identify the extreme point corresponding to a basis by solving mequations in m unknowns.

Linear programming General algebraic process

Page 40: Linear programming: algebra

minτ1,τ2,s1,s2,s3,s4,s5,s6

1000τ1 + 1500τ2 − 5100

s.t. 2100 − 1000τ1 + s1 = 2000

3000 − 1500τ2 + s2 = 2000

τ1 − τ2 + s3 = 0.25

τ2 − τ1 + s4 = 0.25

τ1 + s5 = 1

τ2 + s6 = 1

τ1, τ2, s1, s2, s3, s4, s5, s6 ≥ 0

Choose τ1, τ2, s1, s2, s3, s4 as basic variables.

Linear programming General algebraic process

Page 41: Linear programming: algebra

A basis is feasible if the solution to these m equations consists ofnonnegative values.

Linear programming General algebraic process

Page 42: Linear programming: algebra

minτ1,τ2,s1,s2,s3,s4,s5,s6

1000τ1 + 1500τ2 − 5100

s.t. 2100 − 1000τ1 + s1 = 2000

3000 − 1500τ2 + s2 = 2000

τ1 − τ2 + s3 = 0.25

τ2 − τ1 + s4 = 0.25

τ1 + s5 = 1

τ2 + s6 = 1

τ1, τ2, s1, s2, s3, s4, s5, s6 ≥ 0

Choose s1, s2, s3, s4, s5, s6 as basic variables.

Linear programming General algebraic process