Download presentation
Presentation is loading. Please wait.
Published byLorraine Atkins Modified over 9 years ago
1
Optimization - Lecture 4, Part 1 M. Pawan Kumar http://www.robots.ox.ac.uk/~oval/ Slides available online http://mpawankumar.info
2
“Recap” of Linear Programming
3
Polyhedron Ax ≤ b A : m x n matrix b: m x 1 vector
4
Bounded Polyhedron = Polytope Ax ≤ b A : m x n matrix b: m x 1 vector
5
Vertex z is a vertex of P = {x, Ax ≤ b} z is not a convex combination of two points in P There does not exist x, y ∈ P and 0 < λ < 1 x ≠ z and y ≠ z such that z = λ x + (1-λ) y
6
Vertex z is a vertex of P = {x, Ax ≤ b} A z is a submatrix of A Contains all rows of A such that a i T z = b i Recall A is an m x n matrix
7
Vertex z is a vertex of P Rank of A z = n Proof? See “hidden” slides
8
Proof Sketch: Necessity Let z be a vertex of P Suppose rank(A z ) < nA z c = 0 for some c ≠ 0 Then there exists a d > 0 such that z - dc ∈ Pz + dc ∈ P Contradiction
9
Proof Sketch: Sufficiency Suppose rank(A z ) = n but z is not a vertex of P z = (x+y)/2 for some x, y ∈ P, x ≠ y ≠ z For each a in A z Implies A z (x-y) = 0Contradiction a T x ≤ b = a T za T y ≤ b = a T z
10
Linear Programming Duality Solving the LP Outline
11
Linear Program Maximize a linear function Over a polyhedral feasible region s.t. A x ≤ b max x c T x A: m x n matrix b: m x 1 vector c: n x 1 vector Objective function Constraints x: n x 1 vector
12
Example 4x 1 – x 2 ≤ 8 max x x 1 + x 2 2x 1 + x 2 ≤ 10 5x 1 - 2x 2 ≥ -2 x 1 ≥ 0 x 2 ≥ 0 s.t. What is c? A?b?
13
Example x 1 ≥ 0 x 2 ≥ 0
14
Example 4x 1 – x 2 = 8 x 1 ≥ 0 x 2 ≥ 0
15
Example 4x 1 – x 2 ≤ 8 x 1 ≥ 0 x 2 ≥ 0
16
Example 4x 1 – x 2 ≤ 8 2x 1 + x 2 ≤ 10 x 1 ≥ 0 x 2 ≥ 0
17
Example 4x 1 – x 2 ≤ 8 2x 1 + x 2 ≤ 10 5x 1 - 2x 2 ≥ -2 x 1 ≥ 0 x 2 ≥ 0
18
Example 4x 1 – x 2 ≤ 8 2x 1 + x 2 ≤ 10 5x 1 - 2x 2 ≥ -2 x 1 ≥ 0 x 2 ≥ 0 max x x 1 + x 2 x 1 + x 2 = 0
19
Example 4x 1 – x 2 ≤ 8 2x 1 + x 2 ≤ 10 5x 1 - 2x 2 ≥ -2 x 1 ≥ 0 x 2 ≥ 0 max x x 1 + x 2 x 1 + x 2 = 8 Optimal solution
20
Linear Programming Duality Solving the LP Outline
21
Example 2x 1 + 2x 2 + 5x 3 ≤ 24 max x 3x 1 + x 2 + 2x 3 4x 1 + x 2 + 2x 3 ≤ 36 -x 1 ≤ 0, -x 2 ≤ 0, -x 3 ≤ 0 x 1 + x 2 + 3x 3 ≤ 30 s.t. 3 x 2 x 7 x Scale the constraints, add them up 3x 1 + x 2 + 2x 3 ≤ 90 Upper bound on solution
22
Example 2x 1 + 2x 2 + 5x 3 ≤ 24 max x 3x 1 + x 2 + 2x 3 4x 1 + x 2 + 2x 3 ≤ 36 -x 1 ≤ 0, -x 2 ≤ 0, -x 3 ≤ 0 x 1 + x 2 + 3x 3 ≤ 30 s.t. 1 x Scale the constraints, add them up 3x 1 + x 2 + 2x 3 ≤ 36 Upper bound on solution
23
Example 2x 1 + 2x 2 + 5x 3 ≤ 24 max x 3x 1 + x 2 + 2x 3 4x 1 + x 2 + 2x 3 ≤ 36 -x 1 ≤ 0, -x 2 ≤ 0, -x 3 ≤ 0 x 1 + x 2 + 3x 3 ≤ 30 s.t. 1 x Scale the constraints, add them up 3x 1 + x 2 + 2x 3 ≤ 36 Tightest upper bound?
24
Example 2x 1 + 2x 2 + 5x 3 ≤ 24 max x 3x 1 + x 2 + 2x 3 4x 1 + x 2 + 2x 3 ≤ 36 -x 1 ≤ 0, -x 2 ≤ 0, -x 3 ≤ 0 x 1 + x 2 + 3x 3 ≤ 30 s.t. y4y4 y1y1 y2y2 y3y3 y5y5 y6y6 y 1, y 2, y 3, y 4, y 5, y 6 ≥ 0 We should be able to add up the inequalities
25
Example 2x 1 + 2x 2 + 5x 3 ≤ 24 max x 3x 1 + x 2 + 2x 3 4x 1 + x 2 + 2x 3 ≤ 36 -x 1 ≤ 0, -x 2 ≤ 0, -x 3 ≤ 0 x 1 + x 2 + 3x 3 ≤ 30 s.t. y4y4 y1y1 y2y2 y3y3 y5y5 y6y6 -y 1 + y 4 + 2y 5 + 4y 6 = 3 Coefficient of x 1 should be 3
26
Example 2x 1 + 2x 2 + 5x 3 ≤ 24 max x 3x 1 + x 2 + 2x 3 4x 1 + x 2 + 2x 3 ≤ 36 -x 1 ≤ 0, -x 2 ≤ 0, -x 3 ≤ 0 x 1 + x 2 + 3x 3 ≤ 30 s.t. y4y4 y1y1 y2y2 y3y3 y5y5 y6y6 -y 2 + y 4 + 2y 5 + y 6 = 1 Coefficient of x 2 should be 1
27
Example 2x 1 + 2x 2 + 5x 3 ≤ 24 max x 3x 1 + x 2 + 2x 3 4x 1 + x 2 + 2x 3 ≤ 36 -x 1 ≤ 0, -x 2 ≤ 0, -x 3 ≤ 0 x 1 + x 2 + 3x 3 ≤ 30 s.t. y4y4 y1y1 y2y2 y3y3 y5y5 y6y6 -y 3 + 3y 4 + 5y 5 + 2y 6 = 2 Coefficient of x 3 should be 2
28
Example 2x 1 + 2x 2 + 5x 3 ≤ 24 max x 3x 1 + x 2 + 2x 3 4x 1 + x 2 + 2x 3 ≤ 36 -x 1 ≤ 0, -x 2 ≤ 0, -x 3 ≤ 0 x 1 + x 2 + 3x 3 ≤ 30 s.t. y4y4 y1y1 y2y2 y3y3 y5y5 y6y6 min y 30y 4 + 24y 5 + 36y 6 Upper bound should be tightest
29
Dual min y 30y 4 + 24y 5 + 36y 6 s.t. y 1, y 2, y 3, y 4, y 5, y 6 ≥ 0 -y 1 + y 4 + 2y 5 + 4y 6 = 3 -y 2 + y 4 + 2y 5 + y 6 = 1 -y 3 + 3y 4 + 5y 5 + 2y 6 = 2 Original problem is called primal Dual of dual is primal
30
Dual s.t. A x ≤ b max x c T x
31
Dual - y T (A x – b)max x c T x min y≥0 KKT Condition?A T y = c min y≥0 bTybTy s.t. A T y = c
32
min y≥0 bTybTy s.t. A T y = c s.t. A x ≤ b max x c T x Primal Dual
33
Strong Duality min y≥0 bTybTy s.t. A T y = c s.t. A x ≤ b max x c T x Primal Dual p = d = If p ≠ ∞ or d ≠ ∞, then p = d. Skipping the proof Think back to the intuition of dual
34
Question s.t. A 1 x ≤ b 1 max x c T x A 2 x ≥ b 2 A 3 x = b 3 Dual?
35
Weak Duality Let x be a feasible solution of the primal c T x ≤ b T y Objective of any primal ≤ Objective of any dual Think back to the intuition of dual Let y be a feasible solution of the dual
36
Linear Programming Duality Solving the LP Outline
37
Graphical Solution 4x 1 – x 2 ≤ 8 2x 1 + x 2 ≤ 10 5x 1 - 2x 2 ≥ -2 x 1 ≥ 0 x 2 ≥ 0 max x x 1 + x 2 x 1 + x 2 = 8 Optimal solution at a vertex
38
Graphical Solution 4x 1 – x 2 ≤ 8 2x 1 + x 2 ≤ 10 5x 1 - 2x 2 ≥ -2 x 1 ≥ 0 x 2 ≥ 0 max x x 1 x 1 = 3 Optimal solution at a vertex
39
Graphical Solution 4x 1 – x 2 ≤ 8 2x 1 + x 2 ≤ 10 5x 1 - 2x 2 ≥ -2 x 1 ≥ 0 x 2 ≥ 0 max x x 2 x 2 = 6 Optimal solution at a vertex
40
Graphical Solution 4x 1 – x 2 ≤ 8 2x 1 + x 2 ≤ 10 5x 1 - 2x 2 ≥ -2 x 1 ≥ 0 x 2 ≥ 0 An optimal solution always at a vertex Proof? max x c T x
41
Dantzig (1951): Simplex Method –Search over vertices of the polyhedra –Worst-case complexity is exponential –Smoothed complexity is polynomial Khachiyan (1979, 1980): Ellipsoid Method –Polynomial time complexity –LP is a P optimization problem Karmarkar (1984): Interior-point Method –Polynomial time complexity –Competitive with Simplex Method Solving the LP
42
Plenty of standard software available Mosek (http://www.mosek.com) –C++ API –Matlab API –Python API –Free academic license Solving the LP
43
Dantzig (1951): Simplex Method –Search over vertices of the polyhedra –Worst-case complexity is exponential –Smoothed complexity is polynomial Khachiyan (1979, 1980): Ellipsoid Method –Polynomial time complexity –LP is a P optimization problem Karmarkar (1984): Interior-point Method –Polynomial time complexity –Competitive with Simplex Method Solving the LP
44
Optimization vs. Feasibility s.t. A x ≤ b max x c T x Optimization Feasibility asks if there exists an x such that c T x ≥ K A x ≤ b Optimization via binary search on K Feasible solution For a given K
45
Feasibility via Ellipsoid Method Feasible region of LP
46
Feasibility via Ellipsoid Method Ellipsoid containing feasible region of LP
47
Feasibility via Ellipsoid Method Centroid of ellipsoid
48
Feasibility via Ellipsoid Method Separating hyperplane for centroid
49
Feasibility via Ellipsoid Method Smallest ellipsoid containing “truncated” ellipsoid
50
Feasibility via Ellipsoid Method Centroid of ellipsoid
51
Feasibility via Ellipsoid Method Separating hyperplane for centroid
52
Feasibility via Ellipsoid Method Smallest ellipsoid containing “truncated” ellipsoid
53
Feasibility via Ellipsoid Method Centroid of ellipsoid
54
Feasibility via Ellipsoid Method Terminate when feasible solution is found
55
Separating hyperplane in polynomial time –Check each of the ‘m’ LP constraints in O(n) time New ellipsoid in polynomial time –Shor (1971), Nemirovsky and Yudin (1972) Polynomial iterations (Khachiyan) –Volume of ellipsoid reduces exponentially Only requires a separation oracle –Constraint matrix A can be very large Ellipsoid Method Useful Fact !!
56
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.