CSCI 3160 Design and Analysis of Algorithms Tutorial 6 Fei Chen.

Slides:



Advertisements
Similar presentations
Tuesday, March 5 Duality – The art of obtaining bounds – weak and strong duality Handouts: Lecture Notes.
Advertisements

1 LP, extended maxflow, TRW OR: How to understand Vladimirs most recent work Ramin Zabih Cornell University.
Integer Optimization Basic Concepts Integer Linear Program(ILP): A linear program except that some or all of the decision variables must have integer.
C&O 355 Lecture 8 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Geometry and Theory of LP Standard (Inequality) Primal Problem: Dual Problem:
IEOR 4004 Midterm review (Part II) March 12, 2014.
Lecture #3; Based on slides by Yinyu Ye
Advanced Topics in Algorithms and Data Structures Lecture 7.2, page 1 Merging two upper hulls Suppose, UH ( S 2 ) has s points given in an array according.
Introduction to Algorithms
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
Dragan Jovicic Harvinder Singh
Theory of Computing Lecture 14 MAS 714 Hartmut Klauck.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
The Most Important Concept in Optimization (minimization)  A point is said to be an optimal solution of a unconstrained minimization if there exists no.
Linear programming Thomas S. Ferguson University of California at Los Angeles Compressive Sensing Tutorial PART 3 Svetlana Avramov-Zamurovic January 29,
CS38 Introduction to Algorithms Lecture 15 May 20, CS38 Lecture 15.
Linear Programming and Approximation
Design and Analysis of Algorithms
Duality Lecture 10: Feb 9. Min-Max theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum Cut Both.
Dual Problem of Linear Program subject to Primal LP Dual LP subject to ※ All duality theorems hold and work perfectly!
Duality Dual problem Duality Theorem Complementary Slackness
Approximation Algorithms
EMGT 501 HW # (b) (c) 6.1-4, Due Day: Sep. 21.
Computational Methods for Management and Economics Carla Gomes
7(2) THE DUAL THEOREMS Primal ProblemDual Problem b is not assumed to be non-negative.
ECE LP Duality 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality.
Linear Programming – Max Flow – Min Cut Orgad Keller.
1 Linear Programming Supplements (Optional). 2 Standard Form LP (a.k.a. First Primal Form) Strictly ≤ All x j 's are non-negative.
Optimization of Linear Problems: Linear Programming (LP) © 2011 Daniel Kirschen and University of Washington 1.
C&O 355 Lecture 2 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
Duality Theory 對偶理論.
Introduction to Operations Research
Linear Programming Data Structures and Algorithms A.G. Malamos References: Algorithms, 2006, S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani Introduction.
Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly.
Department Of Industrial Engineering Duality And Sensitivity Analysis presented by: Taha Ben Omar Supervisor: Prof. Dr. Sahand Daneshvar.
Linear Programming – Simplex Method
TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A A A A A A A Image:
1 Max 8X 1 + 5X 2 (Weekly profit) subject to 2X 1 + 1X 2  1000 (Plastic) 3X 1 + 4X 2  2400 (Production Time) X 1 + X 2  700 (Total production) X 1.
Advanced Operations Research Models Instructor: Dr. A. Seifi Teaching Assistant: Golbarg Kazemi 1.
Soham Uday Mehta. Linear Programming in 3 variables.
Optimization - Lecture 4, Part 1 M. Pawan Kumar Slides available online
C&O 355 Mathematical Programming Fall 2010 Lecture 5 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A.
3.4: Linear Programming Objectives: Students will be able to… Use linear inequalities to optimize the value of some quantity To solve linear programming.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
C&O 355 Lecture 7 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A.
CPSC 536N Sparse Approximations Winter 2013 Lecture 1 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAA.
Linear Programming: Formulations, Geometry and Simplex Method Yi Zhang January 21 th, 2010.
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.
Approximation Algorithms Duality My T. UF.
Linear Programming Piyush Kumar Welcome to CIS5930.
Submodularity Reading Group Matroid Polytopes, Polymatroid M. Pawan Kumar
6.5 Stochastic Prog. and Benders’ decomposition
Proving that a Valid Inequality is Facet-defining
Chap 9. General LP problems: Duality and Infeasibility
The Simplex Method: Standard Minimization Problems
Chapter 5. Sensitivity Analysis
Linear Programming Piyush Kumar Welcome to COT 5405.
Chapter 4. Duality Theory
Linear Programming and Approximation
Max Z = x1 + x2 2 x1 + 3 x2  6 (1) x2  1.5 (2) x1 - x2  2 (3)
Chapter 5. The Duality Theorem
Linear Programming Example: Maximize x + y x and y are called
Lecture 20 Linear Program Duality
Flow Feasibility Problems
6.5 Stochastic Prog. and Benders’ decomposition
15-853:Algorithms in the Real World
DUALITY THEORY Reference: Chapter 6 in Bazaraa, Jarvis and Sherali.
1.2 Guidelines for strong formulations
Linear Constrained Optimization
Presentation transcript:

CSCI 3160 Design and Analysis of Algorithms Tutorial 6 Fei Chen

Outline Linear Programming – Standard form – Problem modeling – Algorithm Duality Application

Linear Programming Constraint Optimization – Linear constraints – Linear objective function Example max subject to x 1 + 2x 2 + 3x 3 80x x 2 ≤ x x 3 ≤ x 3 ≤ 9366 x 1 +x 2 +x 3 ≤ 200 x 1, x 2, x 3 ≥ 0

Linear Programming In LP, the feasible region is a convex polytope bounded by many half planes (constraints) By linearity, the optimal solution must locate at the extreme points – There are finite number of points to try

Simplex method Start from any vertex of the polytope look for a better neighbor and move to it. Until the current vertex is better than all of its neighbors For LP local optimal ⇔ global optimal – because the feasible region is convex

Want to build the strongest army for the 3160 Empires. Resources we have: 9366 wood, 7173 food, 2131 gold Soldiers we can produce: How to maximize the power of our army? Example 80 food Power: 1 80 wood 50 gold Power: 3 60 food 75 gold Power: 2

80 food Power: 1 80 wood 50 gold Power: 3 60 food 75 gold Power: 2 Linear Program max subject to x 1 + 2x 2 + 3x 3 80x x 2 ≤ x x 3 ≤ x 3 ≤ 9366 x 1 +x 2 +x 3 ≤ 200 x 1, x 2, x 3 ≥ 0 Variables: – x 1 units – x 2 units – x 3 units Constraints – Food supply is 7173 – Wood supply is 9366 – Gold supply is 2131 – Max population is 200 Objective – Maximize the power of the army

Standard form max subject to cTxcTx Ax ≤ b x ≥ 0 x 1, x 2, …, x n ≥ 0 a 11 x 1 + … + a 1n x n ≤ b 1 a 21 x 1 + … + a 2n x n ≤ b 2 … a m1 x 1 + … + a mn x n ≤ b m c 1 x 1 + … + c n x n

Converting into standard form Constraints a 11 x 1 + … + a 1n x n ≥ b 1 is equivalent to -a 11 x 1 - … - a 1n x n ≤ -b 1 a 11 x 1 + … + a 1n x n = b 1 is equivalent to -a 11 x 1 - … - a 1n x n ≤ -b 1 and a 11 x 1 + … + a 1n x n ≤ b 1

Converting into standard form Constraints x free (free variables) is equivalent to x = x + - x - and x +, x - ≥ 0

Converting into standard form Objective function min z is equivalent to max -z

Objective function Non-linear objective function – Can sometimes be converted into linear objective function with extra linear constraints e.g. max min i x i is equivalent to z xi ≥ zxi ≥ z max subject to

Objective function Non-linear objective function – Can sometimes be converted into linear objective function with extra linear constraints e.g. max c|x i – x j | is equivalent to cy - cz x i – x j = y - z y, z ≥ 0 max subject to

Duality max subject to cTxcTx Ax ≤ b x ≥ 0 min subject to bTybTy A T y ≥ c y ≥ 0 Primal Program Dual Program max subject to cTxcTx Ax = b x ≥ 0 min subject to bTybTy A T y ≥ c Primal Program Dual Program y is free The dual of a dual program is the primal program!

Example Primal Program subject to 40x x 2 + 2x 3 3x 1 - 3x 2 + 5x 3 ≤ 50 x 1 + x 3 ≤ 10 x 1 - x 2 + 4x 3 ≤ 2 x 1, x 2 ≥ 0, x 3 is free max subject to 50y y 2 + 2y 3 3y 1 + y 2 + y 3 ≥ 40 -3y 1 - y 3 ≥ 20 5y 1 + y 2 + 4y 3 = 2 y 1, y 2, y 3 ≥ 0 min Dual Program

Duality Weak duality theorem – The primal gives lower bounds for the dual – The dual gives upper bounds for the primal Let x and y be feasible solutions of the primal and dual respectively, then c T x ≤ b T y.

Duality Strong duality theorem – optimal primal value = optimal dual value – If both exist, then they are equal – If one is infinity, then the other is infeasible

Application of duality theorem Max-flow min-cut theorem – A special case of duality theorem – you will see this in the future!

End Questions?