




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Ut ait ille tragicus, ‘veritatis simplex oratio est’, ideoque illam implicari non oportet. [As the tragic poet says, ‘The language of truth is simple’; therefore it is improper to be entangled by it.] — Seneca the Younger (quoting Euripides) Epistularum Moralium Ad Lucilio, (c. 60 AD) Simplicibus itaque verbis gaudet Mathematica Veritas, cum etiam per se simplex sit Veritatis oratio. [And thus Mathematical Truth prefers simple words, because the language of Truth is itself simple.] — Tycho Brahe (quoting Seneca) Epistolarum astronomicarum liber primus (1596) When a jar is broken, the space that was inside Merges into the space outside. In the same way, my mind has merged in God; To me, there appears no duality. — Sankara, Viveka-Chudamani (c. 700), translator unknown
In this lecture, we’ll see a few algorithms for actually solving linear programming problems. The most famous of these, the simplex method , was proposed by George Dantzig in 1947. Although most variants of the simplex algorithm performs well in practice, there is no sub-exponential upper bound on the running time of any simplex variant. However, if the dimension of the problem is considered a constant, there are several linear programming algorithms that run in linear time. I’ll describe a particularly simple randomized algorithm due to Raimund Seidel. My approach to describing these algorithms will rely much more heavily on geometric intu- ition than the usual linear-algebraic formalism. This works better for me, but your mileage may vary. For a more traditional description of the simplex algorithm, see Robert Vanderbei’s excellent textbook Linear Programming: Foundations and Extensions [Springer, 2001], which can be freely downloaded (but not legally printed) from the author’s website.
Consider the canonical linear program max{c · x | Ax ≤ b, x ≥ 0 }, where A is an n × d constraint matrix, b is an n-dimensional coefficient vector, and c is a d-dimensional objective vector. We will interpret this linear program geometrically as looking for the lowest point in a convex polyhedron in IRd, described as the intersection of n + d halfspaces. As in the last lecture, we will consider only non-degenerate linear programs: Every subset of d constraint hyperplanes intersects in a single point; at most d constraint hyperplanes pass through any point; and objective vector is linearly independent from any d − 1 constraint vectors. A basis is a subset of d constraints, which by our non-degeneracy assumption must be linearly independent. The location of a basis is the unique point x that satisfies all d constraints with equality; geometrically, x is the unique intersection point of the d hyperplanes. The value of a basis is c · x, where x is the location of the basis. There are precisely
(n+d d
bases. Geometrically, the set of constraint hyperplanes defines a decomposition of IRd^ into convex polyhedra; this cell decomposition is called the arrangement of the hyperplanes. Every subset of d hyperplanes ( i.e. , every basis) defines a vertex of this arrangement (the location of the basis). I will use the words ‘vertex’ and ‘basis’ interchangeably.
A basis is feasible if its location x satisfies all the linear constraints, or geometrically, if the point x is a vertex of the polyhedron. If there are no feasible bases, the linear program is infeasible.
A basis is locally optimal if its location x is the optimal solution to the linear program with the same objective function and only the constraints in the basis. Geometrically, a basis is locally optimal if its location x is the lowest point in the intersection of those d halfspaces. A careful reading of the proof of the Strong Duality Theorem reveals that local optimality is the dual equivalent of feasibility; a basis is locally feasible for a linear program Π if and only if the same basis is feasible for the dual linear program q. For this reason, locally optimal bases are sometimes also called dual feasible. If there are no locally optimal bases, the linear program is unbounded.^1 Two bases are neighbors if they have d − 1 constraints in common. Equivalently, in geometric terms, two vertices are neighbors if they lie on a line determined by some d − 1 constraint hy- perplanes. Every basis is a neighbor of exactly dn other bases; to change a basis into one of its neighbors, there are d choices for which constraint to remove and n choices for which constraint to add. The graph of vertices and edges on the boundary of the feasible polyhedron is a subgraph of the basis graph. The Weak Duality Theorem implies that the value of every feasible basis is less than or equal to the value of every locally optimal basis; equivalently, every feasible vertex is higher than ev- ery locally optimal vertex. The Strong Duality Theorem implies that (under our non-degeneracy assumption), if a linear program has an optimal solution, it is the unique vertex that is both feasi- ble and locally optimal. Moreover, the optimal solution is both the lowest feasible vertex and the highest locally optimal vertex.
From a geometric standpoint, Dantzig’s simplex algorithm is very simple. The input is a set of halfspaces H; we want the lowest vertex in the intersection of these halfspaces.
SIMPLEX 1 (H): if ∩ H = ∅ return INFEASIBLE x ← any feasible vertex while x is not locally optimal 〈〈pivot downward, maintaining feasibility 〉〉 if every feasible neighbor of x is higher than x return UNBOUNDED else x ← any feasible neighbor of x that is lower than x return x
Let’s ignore the first three lines for the moment. The algorithm maintains a feasible vertex x. At each so-called pivot operation, the algorithm moves to a lower vertex, so the algorithm never visits the same vertex more than once. Thus, the algorithm must halt after at most
(n+d d
pivots. When the algorithm halts, either the feasible vertex x is locally optimal, and therefore the optimum vertex, or the feasible vertex x is not locally optimal but has no lower feasible neighbor, in which case the feasible region must be unbounded.
(^1) For non-degenerate linear programs, the feasible region is unbounded in the objective direction if and only if no basis is locally optimal. However, there are degenerate linear programs with no locally optimal basis that are infeasible.
From the standpoint of linear algebra, there is absolutely no difference between running SIM- PLEX1 on any linear program Π and running SIMPLEX2 on the dual linear program q. The actual code is identical. The only difference between the two algorithms is how we interpret the linear algebra geometrically.
To complete our description of the simplex algorithm, we need to describe how to find the initial vertex x. Our algorithm relies on the following simple observations. First, the feasibility of a vertex does not depend at all on the choice of objective vector; a vertex is either feasible for every objective function or for none. No matter how we rotate the polyhedron, every feasible vertex stays feasible. Conversely (or by duality, equivalently), the local optimality of a vertex does not depend on the exact location of the d hyperplanes, but only on their normal directions and the objective function. No matter how we translate the hyperplanes, every locally optimal vertex stays locally optimal. In terms of the original matrix formulation, feasibility depends on A and b but not c, and local optimality depends on A and c but not b. The second important observation is that every basis is locally optimal for some objective func- tion. Specifically, it suffices to choose any vector that has a positive inner product with each of the normal vectors of the d chosen hyperplanes. Equivalently, we can make any basis feasible by trans- lating the hyperplanes appropriately. Specifically, it suffices to translate the chosen d hyperplanes so that they pass through the origin, and then translate all the other halfspaces so that they strictly contain the origin. Our strategy for finding our initial feasible vertex is to choose any vertex, choose a new objective function that makes that vertex locally optimal, and then find the optimal vertex for that objective function by running the (dual) simplex algorithm. This vertex must be feasible, even after we restore the original objective function!
(a) (b) (c) (a) Choose any basis. (b) Rotate objective to make it locally optimal, and pivot ’upward’ to find a feasible basis. (c) Pivot downward to the optimum basis for the original objective.
Equivalently, to find an initial locally optimal vertex, we choose any vertex, translate the hyper- planes so that that vertex becomes feasible, and then find the optimal vertex for those translated constraints using the (primal) simplex algorithm. This vertex must be locally optimal, even after we restore the hyperplanes to their original locations!
(a) (b) (c) (a) Choose any basis. (b) Translate constraints to make it feasible, and pivot downward to find a locally optimal basis. (c) Pivot upward to the optimum basis for the original constraints.
Here are more complete descriptions of the simplex algorithm with this initialization rule, in both primal and dual forms. As usual, the input is a set H of halfspaces, and the algorithms either return the lowest vertex in the intersection of these halfspaces or report that no such vertex exists.
SIMPLEX 1 (H): x ← any vertex H^ ˜ ← any rotation of H that makes x locally optimal while x is not feasible if every locally optimal neighbor of x is lower (wrt H˜) than x return INFEASIBLE else x ← any locally-optimal neighbor of x that is higher (wrt H˜) than x while x is not locally optimal if every feasible neighbor of x is higher than x return UNBOUNDED else x ← any feasible neighbor of x that is lower than x return x
SIMPLEX 2 (H): x ← any vertex H^ ˜ ← any translation of H that makes x feasible while x is not locally optimal if every feasible neighbor of x is higher (wrt H˜) than x return UNBOUNDED else x ← any feasible neighbor of x that is lower (wrt H˜) than x while x is not feasible if every locally optimal neighbor of x is lower than x return INFEASIBLE else x ← any locally-optimal neighbor of x that is higher than x return x
(a) Prove that every feasible basis has exactly d feasible neighbors. (b) Prove that every locally optimal basis has exactly n locally optimal neighbors.
maximize
v
dv
subject to dv ≤ s→v for every edge s → v dv − du ≤u→v for every edge u → v with u 6 = s dv ≥ 0 for every vertex v 6 = s
This problem asks you to describe the behavior of the simplex algorithm on this linear pro- gram in terms of distances. Assume that the edge weights `u→v are all non-negative and that there is a unique shortest path between any two vertices in the graph.
(a) What is a basis for this linear program? What is a feasible basis? What is a locally optimal basis? (b) Show that in the optimal basis, every variable dv is equal to the shortest-path distance from s to v. (c) Describe the primal simplex algorithm for the shortest-path linear program directly in terms of vertex distances. In particular, what does it mean to pivot from a feasible basis to a neighboring feasible basis, and how can we execute such a pivot quickly? (d) Describe the dual simplex algorithm for the shortest-path linear program directly in terms of vertex distances. In particular, what does it mean to pivot from a locally opti- mal basis to a neighboring locally optimal basis, and how can we execute such a pivot quickly? (e) Is Dijkstra’s algorithm an instance of the simplex method? Justify your answer. (f) Is Shimbel’s algorithm an instance of the simplex method? Justify your answer.
maximize
w
fs→w −
u
fu→s
subject to
w
fv→w −
u
fu→v = 0 for every vertex v 6 = s, t
fu→v ≤ cu→v for every edge u → v fu→v ≥ 0 for every edge u → v
This problem asks you to describe the behavior of the simplex algorithm on this linear pro- gram in terms of flows.
(a) What is a basis for this linear program? What is a feasible basis? What is a locally optimal basis? (b) Show that the optimal basis represents a maximum flow. (c) Describe the primal simplex algorithm for the flow linear program directly in terms of flows. In particular, what does it mean to pivot from a feasible basis to a neighboring feasible basis, and how can we execute such a pivot quickly? (d) Describe the dual simplex algorithm for the flow linear program directly in terms of flows. In particular, what does it mean to pivot from a locally optimal basis to a neigh- boring locally optimal basis, and how can we execute such a pivot quickly? (e) Is the Ford-Fulkerson augmenting path algorithm an instance of the simplex method? Justify your answer. [Hint: There is a one-line argument.]
©^ c Copyright 2007 Jeff Erickson. Released under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License (http://creativecommons.org/licenses/by-nc-sa/2.5/)