You are on page 1of 43

15.

053 February 8, 2011

 The Geometry of Linear Programs


– the geometry of LPs illustrated

1
Quotes of the day

You don't understand anything until you


learn it more than one way.
Marvin Minsky

One finds limits by pushing


them.
Herbert Simon

2
Overview

 Views of linear programming


– Geometry
– Algebra
– Economic interpretations

3
What does the feasible region of an LP
look like?

Three 2-dimensional examples

4
Some 3-dimensional LPs

mathworld.wolfram.com/ ConvexPolyhedron.html

5
Goal of this Lecture: understand the geometrical
nature of 2 and 3 dimensional LPs
 What properties does the feasible region have?

 What properties does an optimal solution have?

 How can one find the optimal solution:


– the “geometric method”
– The simplex method

6
A Two Variable Linear Program
(a variant of the DTC example)

objective z = 3x + 5y

2x + 3y ≤ 10 (1)

Constraints
x + 2y ≤ 6 (2)

x + y ≤ 5 (3)

x ≤ 4 (4)

y ≤ 3 (5)

x, y ≥ 0 (6)
7
Finding an optimal solution

 Introduce yourself to your partner

 Try to find an optimal solution to the linear


program, without looking ahead.

8
Inequalities
An inequality with two variables
y determines a unique half-plane
5

4 x + 2y ≤ 6

1 2 3 4 5 6 x 9
Graphing the Feasible Region

y Graph the Constraints:


2x+ 3y ≤ 10 (1)
5
x ≥ 0 , y ≥ 0. (6)
4

2 2x + 3y = 10

1 2 3 4 5 6 x
10
Add the Constraint:
x + 2y ≤ 6 (2)
y
5

2
x + 2y = 6
1

1 2 3 4 5 6 x
11
Add the Constraint:
x+ y ≤ 5
y A constraint is
called redundant if
5 deleting the
constraint does
x+ y = 5
4 not increase the
size of the feasible
3 region.

2 “x + y = 5”
is redundant
1

1 2 3 4 5 6 x
12
Add the Constraints:
x ≤ 4; y ≤ 3
y
5

4 We have now
graphed the
3 feasible
region.
2

1 2 3 4 5 6 x
13
The geometrical method for optimizing 3x + 5y

y Graph points such that 3x + 5y = p


for various values of p.
3
Choose p maximal

1 3x + 5y = 11

3x + 5y = 8
Isocost lines
x
1 2 3 4 14
Find the maximum value p such that there is a
feasible solution with 3x + 5y = p.
y
Move the line with profit p parallel as much as
3 possible.

2 3x + 5y = 16
The optimal
solution
occurs at a
1
3x + 5y = 11 corner point.

3x + 5y = 8

x
1 2 3 4 15
16
What types of Linear Programs are there?

There is no feasible max x


solution. s.t. x + 2y ≤ -1
x ≥ 0, y ≥ 0

There is a feasible
solution and an max x
optimal solution. s.t. x + 2y ≤ 1
x ≥ 0, y ≥ 0

There is a feasible
solution and the max x
objective value is s.t. x - y = 1
unbounded from x ≥ 0, y ≥ 0
above.
17
Any other types

 Is it possible to have an LP such that the feasible


region is bounded, and such that there is no
optimal solution?

No. But it could happen if we


permitted strict inequality
constraints.

Maximize x
subject to 0 < x < 1

18
Corner Points
 A corner point (also called an extreme point) of the feasible region is a
point that is not the midpoint of two other points of the feasible region.
(They are only defined for convex sets, to be described later.)

Where are the


corner points of
this feasible
region?

19
Some examples of LP feasible regions.

5
Region 1.
No corner point. Unbounded feasible region
4

3 Region 2.
Two corner points. Unbounded feasible region
2

1
Region 3.

1 2 3 4 5 6
20
Facts about corner points.
 If a feasible region is non-empty, and if it does not
contain a line, then it has at least one corner point.

 If every variable is non-negative, and if the feasible


region is non-empty, then there is a corner point.

 In two dimensions, a corner point is at the intersection of


two equality constraints.

Region 1.
No corner point. Unbounded feasible region

Region 2.
Two corner points. Unbounded feasible region
21
Optimality at corner points

 If a feasible region has a corner point, and if it has an


optimal solution, then there is an optimal solution that
is a corner point.
y
Region 2

Region 3 Example 1: minimize x


Example 2: minimize y
22
Suppose an LP has a feasible solution.
Which of the following is not
possible?
1. The LP has no corner point.
2. The LP has a corner point that is
optimal.
3. The LP has a corner point, but
there is no optimal solution.
4. The LP has a corner point and an
optimal solution, but no corner
point is optimal.

23
Mental Break

15.053 Trivia

Trivia about US
Presidents

24
Towards the simplex algorithm

 More geometrical notions


– edges and rays

 Then … the simplex algorithm

25
Edges of the feasible region
In two dimensions, an edge of the feasible region is one of
the line segments making up the boundary of the feasible
region. The endpoints of an edge are corner points.

An
ed
ge

26
An edge
Edges of the feasible region
In three dimensions, an edge of the feasible region is one of the line segments
making up the framework of a polyhedron. The edges are where the faces
intersect each other. A face is a flat region of the feasible region.

A face
An edge

A face

27
Extreme Rays
 An extreme ray is like an edge, but it starts
at a corner point and goes on infinitely.

y Two extreme
5 rays.

1 2 3 4 5 6 x 28
The Simplex Method
Start at any feasible corner point.
Move along an edge (or extreme ray) in which the
y objective value is continually improving. Stop at the next
corner point. (If moving along an extreme ray, the
5
objective value is unbounded.)
Continue until no adjacent corner point has a better
4
objective value. Max z = 3 x + 5 y

2
3 x + 5 y = 19

1 2 3 4 5 6 x 2929
The Simplex Method

Note: in three dimensions, the


“edges” are the intersections of
two constraints. The corner points
are the intersection of three
constraints.

Pentagonal prism

30
Solving for the Corner Point

In two dimensions, a corner point lies at the


intersection of two lines.
x + 2y = 6
2x + 3y = 10
y
3 x +2y = 6
x=2

2 y=2
2x +3y = 10

1 2 3 4
x 31
Solving for Corner Points
In three dimensions, a corner point is the
intersection of three constraints. (3 planes)

0≤x≤2
0≤y≤2
z 0≤z≤2
x -y +z≤3

What is the red corner point?


x y

32
Each corner points of a 2- Yes. And each
variable linear program is the corner points of
solution of two equations. Each an n-variable
corner point of a 3-variable linear program
linear program is the solution is the solutions
of three equations. of n equations.
Is each corner points of a 4-
variable linear program the
solution of four equations?

Cool !!

33
An important difference between the
geometry and the algebra

2x + y = 9 Usually, corner points can be


5 described in a unique way as an
intersection of two lines
x + 2y = 9
4 (constraints). But not always.

2x + y ≤ 9
3

x + 2y ≤ 9
2
0≤x≤3
0≤y≤3
1 The point (3, 3) can be
written as the
intersection of two lines
1 2 3 4 5 in 66ways.
34
Degeneracy
When a corner point is the solution of
two or more different sets of equality I was once
constraints, then this is called told that
degeneracy. This will turn out to be “degeneracy”
important for the simplex algorithm. killed the
dinosaurs.

35
36
Suppose an LP has a feasible solution.
Which of the following is not possible for the
simplex algorithm (maximization problem)?

1. It terminates with an optimal


solution.
2. It does not terminate.
3. It terminates with a proof that the
objective value is unbounded
from above.

37
Convex Sets
A set S is convex if for every two points in the set,
the line segment joining the points is also in the set;
y that is,
if p1, p2 ∈ S, then so is (1 - λ)p1 + λp2 for λ ∈ [0,1].
3
Theorem. The feasible region
p1 of a linear program is convex.
2

1 p2

x
1 2 3 4 38
More on Convexity
Which of the following are convex ? or not ?

y
5
4
3
2
1

1 2 3 4 5 6 x
39
The feasible region of a linear program
is convex

y
5

1 2 3 4 5 6 x

40
41
2-Dimensional LPs and
Sensitivity Analysis
Hi, we have a tutorial It’s on sensitivity analysis in
for you stored at the two dimensions. We know
subject web site. We that you’ll find it useful for
hope to see you there. doing the problem set.

Mita, an MIT Beaver


Amit, an MIT Beaver
42
Summary: Geometry helps guide the
intuition

Note for Thursday’s lecture: please read the


tutorial on solving equations prior to lecture.

43