Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,

Similar presentations


Presentation on theme: "Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,"— Presentation transcript:

1 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental, deterministic algorithm Randomized algorithm Unbounded linear programs Linear programming in higher dimensions

2 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 2 Problem description Maximize c 1 x 1 + c 2 x 2 +... + c d x d Subject to the conditions: a 1,1 x 1 +... a 1,d x d  b 1 a 2,1 x 1 +... a 2,d x d  b 2 ::: a n,1 x 1 +... 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 1 +... + a i,d x d  b i } l i = hyperplane that bounds h i ( straight lines, if d=2 ) H = {h 1,..., h n }

3 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 3 Structure of the feasible region 1. Bounded 2. Unbounded 3. Empty C C C

4 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 4 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. Bounded linear programs

5 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 5 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 v i := optimal vertex of C i C 2  C 3  C 4...  C n = C C i =   C =  Incremental algorithm

6 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 6 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.

7 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 7 Optimal vertex h1h1 h2h2 h3h3 h4h4 v 3 = v 4 c h1h1 h2h2 h3h3 h4h4 h5h5 c v4v4 v5v5

8 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 8 f c (x) = c 1 x 1 + c 2 x 2 v i-1 C i-1 Next optimal vertex

9 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 9 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²)

10 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 10 Algorithm 1D-LP

11 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 11 Algorithm 1D-LP Find the point x on l i that maximizes cx, 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)

12 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 12 Addition of halfplanes in different orders 1 2 34 56 78 9 10 11 12 vivi Good 1 2 34 5 6 78 910 1112 Bad

13 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 13 Optimal vertex h1h1 h2h2 h3h3 h4h4 v 3 = v 4 c h1h1 h2h2 h3h3 h4h4 h5h5 c v4v4 v5v5

14 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 14 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²)

15 Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 15 Addition of halfplanes in different orders 1 2 34 56 78 9 10 11 12 vivi Good 1 2 34 5 6 78 910 1112 Bad


Download ppt "Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,"

Similar presentations


Ads by Google