Linear Programming Computational Geometry, WS 2007/08 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.

Slides:



Advertisements
Similar presentations
Order-k Voronoi Diagram in the Plane
Advertisements

Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
3.4 Linear Programming 10/31/2008. Optimization: finding the solution that is either a minimum or maximum.
Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
Lecture #3; Based on slides by Yinyu Ye
Line Segment Intersection Computational Geometry, WS 2007/08 Lecture 3 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut.
Introduction to Algorithms
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
Computational Geometry, WS 2007/08 Lecture 17 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften.
Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Linear Programming?!?! Sec Linear Programming In management science, it is often required to maximize or minimize a linear function called an objective.
Convexity of Point Set Sandip Das Indian Statistical Institute.
Algorithms Lecture 10 Lecturer: Moni Naor. Linear Programming in Small Dimension Canonical form of linear programming Maximize: c 1 ¢ x 1 + c 2 ¢ x 2.
A Randomized Polynomial-Time Simplex Algorithm for Linear Programming Daniel A. Spielman, Yale Joint work with Jonathan Kelner, M.I.T.
CS38 Introduction to Algorithms Lecture 15 May 20, CS38 Lecture 15.
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Klee’s Measure Problem Computational Geometry, WS 2007/08 Group Work Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen, Institut.
The Half-Edge Data Structure Computational Geometry, WS 2007/08 Lecture 3, Part III Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen,
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part IV Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Delaunay Triangulation Computational Geometry, WS 2006/07 Lecture 11 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
Line Segment Intersection Computational Geometry, WS 2007/08 Lecture 3 – Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
The Lower Envelope: The Pointwise Minimum of a Set of Functions Computational Geometry, WS 2006/07 Lecture 4 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen,
Lecture 5: Orthogonal Range Searching Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees.
Design and Analysis of Algorithms
Special Cases of the Hidden Line Elimination Problem Computational Geometry, WS 2007/08 Lecture 16 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen,
Voronoi Diagrams Computational Geometry, WS 2006/07 Lecture 10 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Duality and Arrangements Computational Geometry, WS 2007/08 Lecture 6 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Introduction to Computational Geometry Computational Geometry, WS 2007/08 Lecture 1 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut.
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
Lecture 10 : Delaunay Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 Overview Motivation. Triangulation of Planar Point Sets. Definition.
Persistent Data Structures Computational Geometry, WS 2007/08 Lecture 12 Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen, Institut.
Geometric Data Structures Computational Geometry, WS 2007/08 Lecture 13 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Hidden-Line Elimination Computational Geometry, WS 2006/07 Lecture 14 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Linear Programming Computational Geometry, WS 2007/08 Lecture 7, Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Lecture 8 : Arrangements and Duality Computational Geometry Prof. Dr. Th. Ottmann 1 Duality and Arrangements Duality between lines and points Computing.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Closest Pair of Points Computational Geometry, WS 2006/07 Lecture 9, Part II Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen,
Polygon Triangulation Computational Geometry, WS 2007/08 Lecture 9 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 - Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
Polygon Triangulation Computational Geometry, WS 2006/07 Lecture 8, Part 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Art Gallery Theorem Computational Geometry, WS 2006/07 Lecture 8, Part 1 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Duality and Arrangements Computational Geometry, WS 2006/07 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Chapter 5 Linear Inequalities and Linear Programming Section R Review.
C&O 355 Lecture 2 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
UNC Chapel Hill M. C. Lin Linear Programming Reading: Chapter 4 of the Textbook Driving Applications –Casting/Metal Molding –Collision Detection Randomized.
Systems of Inequalities in Two Variables Sec. 7.5a.
Linear Programming Problem. Definition A linear programming problem is the problem of optimizing (maximizing or minimizing) a linear function (a function.
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
UNC Chapel Hill M. C. Lin Randomized Linear Programming For any set of H of half-planes, there is a good order to treat them. Thus, we can improve the.
Common Intersection of Half-Planes in R 2 2 PROBLEM (Common Intersection of half- planes in R 2 ) Given n half-planes H 1, H 2,..., H n in R 2 compute.
Linear Programming: A Geometric Approach3 Graphing Systems of Linear Inequalities in Two Variables Linear Programming Problems Graphical Solution of Linear.
Computational Geometry
1 Chapter 4 Geometry of Linear Programming  There are strong relationships between the geometrical and algebraic features of LP problems  Convenient.
CHAPTER 4. LINEAR PROGRAMMING
I. The Problem of Molding
Max Z = x1 + x2 2 x1 + 3 x2  6 (1) x2  1.5 (2) x1 - x2  2 (3)
CMPS 3130/6130 Computational Geometry Spring 2017
Graphical solution A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an equation.
Presentation transcript:

Linear Programming Computational Geometry, WS 2007/08 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften Albert-Ludwigs-Universität Freiburg

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann2 Overview Problem formulation and example. Incremental, deterministic algorithm. Randomized algorithm. Unbounded linear programs. Linear programming in higher dimensions.

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann3 Problem Description Maximize c 1 x 1 + c 2 x c d x d Subject to the conditions: a 1,1 x a 1,d x d  b 1 a 2,1 x a 2,d x d  b 2 ::: a n,1 x a n,d x d  b n Linear program of dimension d: c = (c 1,c 2,...,c d ) h i = {(x 1,...,x d ) ; a i,1 x a i,d x d  b i } l i = hyperplane that bounds h i ( straight lines, if d=2 ) H = {h 1,..., h n }

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann4 Example Production of two goods A and B using four raw materials Value of A: 6 CU, value of B: 3 CU Rm1Rm2Rm3Rm4 Prod A Prod B Reserve Maximize profit: f c (x) = 6x A + 3x B under the conditions: x A = 0, x B x A, x B = 0 2x A + 4x B  5 2x A + 1x B  2 6x A + 2x B  4 2x A + 2x B  3 x A, x B  0

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann5 Chart IiIi (x A, x B ) 1(0, 5/4)(5/2, 0) 2(0, 2)(1, 0) 3(0, 2)(2/3, 0) 4(0, 3/2)(3/2, 0) 2 3/2 5/4 1 1/2 2/313/225/2 xBxB xAxA

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann6 Chart

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann7 Structure of Feasible Region 1. Bounded 2. Unbounded 3. Empty C C C

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann8 Result Four possibilities for the solution of a linear program 1.A vertex of the feasible region is the only solution. 2.One edge of the feasible region contains all solutions. 3.There are no solutions. 4.The feasible region is unbounded toward the direction of optimization. In case 2: Choose the lexicographically minimum solution  corner

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann9 Bounded Linear Programs Assumption : Algorithm UnboundedLP(H, c) yields either a)a ray in  H, which is unbounded towards c, or b)two half planes h 1 and h 2, so that h 1  h 2 is bounded towards c, or c)the answer, that LP(H, c) has no solution, because the feasible region is empty.

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann10 Incremental Algorithm Let C 2 = h 1  h 2 Remaining half planes: h 3,..., h n C i = C i-1  h i = h 1 ...  h i Compute-optimal-vertex (H, c) v 2 := l 1  l 2 ; C 2 := h 1  h 2 for i := 3 to n do C i := C i-1  h i vi := optimal vertex of C i C 2  C 3  C 4...  C n = C C i =   C = 

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann11 Optimal Vertex Lemma 1: Let 2 < i  n, then we have : 1.If v i-1  h i, then v i = v i-1. 2.If v i-1  h i, then either C i =  or v i  l i, where l i is the line bounding h i.

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann12 Optimal Vertex h1h1 h2h2 h3h3 h4h4 v 3 = v 4 c h1h1 h2h2 h3h3 h4h4 h5h5 c v4v4 v5v5

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann13 Next Optimal Vertex f c (x) = c 1 x 1 + c 2 x 2 v i-1 C i-1

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann14 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 then return UnboundedLP(H, c ) else report h 1 := h; h 2 := h´ ; v 2 := l 1  l 2 let h 3,...,h n be the remaining half-planes of H for i:= 3 to n do if v i-1  h i then v i := v i-1 else S i-1 := H i-1  * l i v i := 1-dim-LP(S i-1, c ) if v i not exists then return  return v n Running time: O(n²)

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann15 Algorithm 1D-LP

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann16 Algorithm: 1D-LP Find the point x on l i that maximizes f c (x), subject to the constraints x  h j, for 1  j  i –1 Observation: l i  h j is a ray Let s i-1 := { h 1  l i,..., h i-1  l i } Algorithm 1D-LP{s i-1, c } p 1 = s 1 for j := 2 to i-1 do p j = p j-1  s j if p i-1   then return the optimal vertex of p i-1 else return  Time: O(i)

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann17 Addition of Halfplanes in Different Orders vivi Good Bad

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann18 Optimal Vertex h1h1 h2h2 h3h3 h4h4 v 3 = v 4 c h1h1 h2h2 h3h3 h4h4 h5h5 c v4v4 v5v5

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann19 Randomized 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 then return UnboundedLP(H, c ) else report h 1 := h; h 2 := h´ ; v 2 := l 1  l 2 let h 3,...,h n be the remaining half-planes of H compute a random permutation h 3,..., h n for i:= 3 to n do if v i-1  h i then v i := v i-1 else S i-1 := H i-1  * l i v i := 1-dim-LP(S i-1, c ) if v i not exists then return  return v n

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann20 Randomization Theorem: The 2-dimensional linear programming problem with n constraints can be solved in O(n) randomized expected time using worst-case linear storage.

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann21 Random Variable X i E[x i ] is the probability that v i-1  h i X i = 1, if v i-1  h i, and X i = 0, otherwise

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann22 Unbounded Linear Programs i min, an index with  i min = min  j, 1  j  n  i := The smaller angle that  i makes with c  i : The outward normal of h i hihi ii ii c

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann23 Unbounded Linear Programs H min := { h j  H |  j =  i min } H par := { h j  H |  j = -  i min } H par { H min { h i* c

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann24 Lemma Let H = {h 1,h 2,...,h n } be a set of half-planes. Assuming that  (H min  H par ) is not empty. 1.If l i*  h j is unbounded in the direction c for every half-plane h j in the set H \ (H min  H par ), then (H, c ) is unbounded along a ray contained in l i*. 2.If l i*  h j* is bounded in the direction c for some h j* in H \ (H min  H par ), then the linear program ({h i*, h j* }, c ) is bounded.

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann25 Algorithm: Unbounded-LP Input:A 2-Dimensional Linear Program (H, c ) Output: Either a pair of halfplanes bounding the LP or  or a ray along which (H, c) is unbounded. 1.For each half plane h i  H compute  j 2.Let h i be half plane with  i = min  j, 1  j  n 3.H min := { h j  H |  j =  min } 4.H par := { h j  H |  j = -  min } 5.Ĥ = H \ (H min  H par ), compute intersection in H min  H par 6.If the intersection is empty then report (H, c ) is infeasible else Let h i  H min be the half-plane whose line bounds the intersection if there is half plane h j*  Ĥ such that l i*  h j* bounded in c then report ({h i*, h j* }, c ) is bounded else report is bounded along l i*  (  Ĥ )

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann26 Higher Dimensions Let h 1,...,h d H be the d certificate half-spaces that UnboundedLP returns. C i := h 1  h 2 ...  h i Lemma: Let d < i  n, and let C i be defined as above. 1. If v i-1  h i, then v i = v i-1 2. If v i-1  h i, then either C i =  or v i  g i, where g i is the hyperplane that bounds h i.

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann27 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 h 1,...,h d  H be the certificate halfplanes returned by UnboundedLP, and let v d be their vertex of intersection Compute a random permutation h d+1,...,h n for i = d+1 to n do if v i-1  h i then v i = v i-1 else S i-1 := H i-1  * bd(h i ) v i := d-1-dim-LP(S i-1, c ) if v i not exists then return  return v n

Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann28 Theorem The d-dimensional linear programming problem with n constraints can be solved in O(d!n) expected time using linear storage.