Download presentation
Presentation is loading. Please wait.
1
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part II 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 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 }
4
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann4 Structure of Feasible Region 1. Bounded 2. Unbounded 3. Empty C C C
5
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann5 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.
6
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann6 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 =
7
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann7 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.
8
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann8 Optimal Vertex h1h1 h2h2 h3h3 h4h4 v 3 = v 4 c h1h1 h2h2 h3h3 h4h4 h5h5 c v4v4 v5v5
9
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann9 Next Optimal Vertex f c (x) = c 1 x 1 + c 2 x 2 v i-1 C i-1
10
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann10 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²)
11
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann11 Algorithm 1D-LP
12
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann12 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)
13
Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann13 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.