BCC Businessmemo
BCC Businessmemo
Instructor:
This lecture: Amir Ali Ahmadi
Fall 2014
• Linear Programming (LP)
○ Applications of linear programming TAs: Y. Chen,
G. Hall,
○ History of linear programming J. Ye
• Geometry of linear programming
○ Geometric and algebraic definition of a vertex and their equivalence
○ Optimality of vertices
• The simplex method
○ The idea behind the simplex algorithm
○ An example of the simplex algorithm in use
○ Initialization
Linear Programming
minimize
subject to
Lec11 Page 1
Lec11p2, ORF363/COS323
Example 1: Transportation
Lec11 Page 2
Lec11p3, ORF363/COS323
Lec11 Page 3
Lec11p4, ORF363/COS323
Integer programs (IPs) are in general difficult to solve (we will formalize
this statement in a few lecture). However, we can easily obtain the so-
called "LP relaxation" of this problem by replacing the constraint
with
(LP) s.t.
.
(Why?)
Lec11 Page 4
Lec11p5, ORF363/COS323
Example 4: Scheduling [Ber09]
A hospital wants to start weekly nightshifts for its nurses. The goal is to
hire the fewest number of nurses possible.
• The constraints take into account the demand for each day but also
the fact that the nurses want to work 5 consecutive days. This means
that if the nurses work on day 1, they will work all the way through
day 5.
Lec11 Page 5
Lec11p6, ORF363/COS323
• Solving systems of linear inequalities goes at least as far back as the late 1700s,
when Fourier invented (a pretty inefficient) solution technique, known today
as the "Fourier-Motzkin" elimination method.
• Von Neumann is often credited with the theory of "LP duality" (the topic of our
next lecture). He was a member of the IAS here at Princeton.
• In 1947, Dantzig invented the first practical algorithm for solving LPs: the
simplex method. This essentially revolutionized the use of linear programming
in practice. (Interesting side story: Dantzig is known for solving two open
problems in statistics, mistaking them for homework after arriving late to
lecture. This inspired the first scene in the movie Good Will Hunting.)
• In 1979, Khachiyan showed that LPs were solvable in polynomial time using
the "ellipsoid method". This was a theoretical breakthrough more than a
practical one, as in practice the algorithm was quite slow.
Lec11 Page 6
Lec11p7, ORF363/COS323
LP in alternate forms
As mentioned before, not all linear programs appear in the standard form:
min.
s.t.
Essentially, there are 3 ways in which a linear program can differ from the
standard form:
s.t.
Lec11 Page 7
Lec11p8 ORF363/COS323
min.
s.t.
The three regions in the drawing do not intersect : there are no feasible solutions.
Unbounded case
min.
s.t.
s.t.
There is an entire "face" of the feasible region that is optimal. Notice that the
normal to this face is parallel to the objective vector.
s.t.
Lec11 Page 8
Lec11p9, ORF363/COS323
Geometry of LP
Definition of a polyhedron:
Lec11 Page 9
Lec11p10, ORF363/COS323
Extreme points
Extreme points are always on the boundary, but not every point on the
boundary is extreme.
• With these two definitions, we can now define the notion of a vertex of a
polyhedron.
Lec11 Page 10
Lec11p11, ORF363/COS323
Vertex
• You may be wondering if extreme points and vertices are the same thing.
The theorem below establishes that this is indeed the case.
• Note that the notion of an extreme point is defined geometrically while the
notion of a vertex is defined algebraically.
• The algebraic definition is more useful for algorithmic purposes and is
crucial to the simplex algorithm. Yet, the geometric definition is used to
prove the fundamental fact that an optimal solution to an LP can always be
found at a vertex. This is crucial to correctness of the simplex algorithm.
Proof:
Lec11 Page 11
Lec11p12, ORF363/COS323
Corollary. Given a finite set of linear inequalities, there can only be a finite
number of extreme points.
Proof:
We have shown that extreme points and vertices are the same, so we
prove the result for vertices. Suppose we are given a total of
constraints. To obtain a vertex, we need to pick linearly independent
constraints that are tight. There are at most ways of doing this and
each subset of linearly independent constraints gives a unique vertex
(as seen previously, the vertex satisfies where is invertible). As
As a consequence, there are at most vertices.
Lec11 Page 12
Lec11p13, ORF363/COS323
Corollary.
Every bounded polyhedron has an extreme point.
Suppose has at least one extreme point and there exists an optimal
solution, then there exists an optimal solution which is at a vertex.
Proof.
Let Q be the set of optimal solutions (assumed to be nonempty). In other
words, if is the optimal value of the LP, then
Using Theorem 2 and the fact that we know that has an extreme
point has no lines has no lines has an extreme point. Let
be an extreme point of We will show that is also an extreme point of
Once this is proved, since , we would be done.
Lec11 Page 13
Lec11p14, ORF363/COS323
Lec11 Page 14
Lec11p15, ORF363/COS323
Main idea
Example:
.
s.t.
Points A and B are neighbors as they both are tight for constraints (6) and (4) but
A is tight for (5) whereas B is tight for (1). The point C is another neighbor of B.
Lec11 Page 15
Lec11p16, ORF363/COS323
Section 7.6 of [DPV08] gives a very neat presentation of the simplex algorithm in
surprisingly few pages. We won't repeat this here since it's done beautifully in the
book and we followed the book closely in lecture. Instead, we just give an outline
of the steps involved and an example. The example is different than the one in the
book. So you can read one and do the other for practice.
1. Check whether the current vertex is optimal (if yes, we're done),
2. If not, determine the vertex to move to next.
• We start the algorithm at the origin. We are assuming for now that the origin
is feasible (i.e., . Note that if is feasible, then it is a vertex (why?)
• Both tasks listed above are easy if the vertex is at the origin:
○ The origin is optimal if and only if (why?).
○ If for some , we can increase until a new constraint becomes
tight. Now we are at a new vertex (why?).
• Once at a new vertex, we move it to the origin by a "change of coordinates".
Then we simply repeat. See Section 7.6 of [DPV08] for details.
• Finally, if the origin is not feasible, to get the algorithm started we first solve
an "auxiliary LP"; see Section 7.6.3 of [DPV].
s.t.
Lec11 Page 16
Lec11p17, ORF363/COS323
Iteration 1: The origin is feasible and all are positive. Hence we can
pick either or as the variable we want to increase. We pick and
keep
max.
s.t.
Lec11 Page 17
Lec11p18, ORF363/COS323
The new vertex is then at the intersection of (1) and (3). Reverting to
the original LP, we can see that this is C.
max.
s.t. (1)
Lec11 Page 18
Lec11p19, ORF363/COS323
Iteration 3: The current vertex is at the intersection (1) and (3). As the
coefficient for is positive, we pick as the variable we will increase
while keeping This means that we are releasing constraint (1).
We have to meet all the constraints, limiting how much we can increase
and So (2) is the constrint becoming
tight next.
The new vertex is the intersection of (3) and (2). This is the point B.
max.
s.t. (1)
Lec11 Page 19
Lec11p20, ORF363/COS323
Notes:
The relevant chapter form [DPV08] for this lecture is Chapter 7.
To minimize overlap with ORF 307, we skipped the sections on
bimatrix games and the network algorithm for max-flow. Your
[CZ13] book also has a chapter on linear programming, but
reading that is optional.
References:
- [Bert09] D. Bertsimas. Lecture notes on optimization methods
(6.255). MIT OpenCourseWare, 2009.
Lec11 Page 20