Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.

Similar presentations


Presentation on theme: "Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik."— Presentation transcript:

1 Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften Albert-Ludwigs-Universität Freiburg

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

3 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann3 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²)

4 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann4 1-dim LP Problem 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 } 1.1-dim-LP{S i-1, c } 2.p 1 = s 1 3.for j := 2 to i-1 do 4. p j = p j-1  s j 5.if p i-1   then 6. return the optimal vertex of p i-1 else 7. return  Time: O(i)

5 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann5 Sequences vivi

6 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann6 Optimal Vertex h1h1 h2h2 h3h3 h4h4 v 3 = v 4 c h1h1 h2h2 h3h3 h4h4 h5h5 c v4v4 v5v5

7 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann7 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

8 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann8 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.

9 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann9 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


Download ppt "Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik."

Similar presentations


Ads by Google