100 likes | 198 Views
Linear Programming. Computational Geometry, WS 2006/07 Lecture 5, Part IV Prof. Dr. Thomas Ottmann. Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften Albert-Ludwigs-Universität Freiburg. Overview. Problem formulation and example.
E N D
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part IV Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften Albert-Ludwigs-Universität Freiburg
Overview • Problem formulation and example. • Incremental, deterministic algorithm. • Randomized algorithm. • Unbounded linear programs. • Linear programming in higher dimensions. Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann
Algorithm: 2D-LP Input: A 2-dimensional Linear Program (H, c ) Output: Either one optimal vertex or or a ray along which (H, c ) is unbounded. if UnboundedLP(H, c ) reports (H, c ) is unbounded or infeasible thenreturn UnboundedLP(H, c ) else report h1 := h; h2 := h´ ; v2 := l1 l2 let h3,...,hn be the remaining half-planes of H for i:= 3 to n do if vi-1 hi then vi := vi-1 else Si-1 := Hi-1 * li vi := 1-dim-LP(Si-1, c ) if vi not exists then return return vn Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann
i i hi c Unbounded Linear Programs i : The outward normal of hi i := The smaller angle that i makes with c imin, an index with i min = min j,1 j n Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann
Hpar { Hmin { hi* c Unbounded Linear Programs Hmin := { hjH | j = imin} Hpar := { hj H | j = - imin} Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann
Lemma • Let H = {h1,h2,...,hn} be a set of half-planes. • Assuming that (Hmin Hpar) is not empty. • If li* hj is unbounded in the direction c for every half-plane hj inthe set H \ (Hmin Hpar), then (H, c ) is unbounded along a ray contained in li* . • If li* hj* is bounded in the direction c for some hj* in • H \ (Hmin Hpar), then the linear program ({hi* , hj*}, c ) • is bounded. Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann
Algorithm: Unbounded-LP • Input: A 2-Dimensional Linear Program (H, c ) • Output:Either a pair of halfplanes bounding the LP oror a ray along which (H, c) is unbounded. • For each half plane hi H compute j • Let hi be half plane with i = min j,1 j n • Hmin := { hjH | j = min} • Hpar := { hj H | j = - min} • Ĥ = H \ (Hmin Hpar), compute intersection in Hmin Hpar • If the intersection is empty • then report (H, c ) is infeasible • else Let hi Hmin be the half-plane whose line bounds • the intersection • if there is half plane hj*Ĥ such that li*hj* bounded in c • then report ({hi* , hj*}, c ) is bounded • else report is bounded along li* ( Ĥ ) Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann
Higher Dimensions Let h1,...,hd H be the d certificate half-spaces that UnboundedLP returns. Ci := h1 h2... hi Lemma: Let d < i n, and let Ci be defined as above. 1. If vi-1 hi, then vi = vi-1 2. If vi-1hi, then either Ci= or vi gi, where gi is the hyperplane that bounds hi. Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann
Algorithm: Randomized-LP • Input : A linear program (H, c ). • Output : Either one optimal vertex or or a ray along which (H, c ) is unbounded. • if UnboundedLP(H, c ) reports (H, c ) is unbounded • then Report a ray along which (H, c ) unbounded. • else Let h1,...,hd H be the certificate halfplanes returned by UnboundedLP, and let vd be their vertex of intersection • Compute a random permutation hd+1,...,hn • for i = d+1 to ndoif vi-1 hithen vi = vi-1else Si-1:= Hi-1 * bd(hi) • vi:= d-1-dim-LP(Si-1, c ) • if vi not exists then return • return vn Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann
Theorem The d-dimensional linear programming problem with n constraints can be solved in O(d!n) expected time using linear storage. Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann