Generality of Languages

Similar documents
Linear Programming. (Com S 477/577 Notes) Yan-Bin Jia. Nov 28, 2017

The CPLEX Library: Mixed Integer Programming

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method

Ω R n is called the constraint set or feasible set. x 1

Chapter 2: Linear Programming Basics. (Bertsimas & Tsitsiklis, Chapter 1)

Discrete Optimization

Distributed Real-Time Control Systems. Lecture Distributed Control Linear Programming

Planning and Optimization

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

Chapter 5 Linear Programming (LP)

Linear Programming Duality

Linear programs, convex polyhedra, extreme points

LINEAR PROGRAMMING. Relation to the Text (cont.) Relation to Material in Text. Relation to the Text. Relation to the Text (cont.

CS711008Z Algorithm Design and Analysis

3 Development of the Simplex Method Constructing Basic Solution Optimality Conditions The Simplex Method...

Review Solutions, Exam 2, Operations Research

Part 1. The Review of Linear Programming Introduction

CSCI 1951-G Optimization Methods in Finance Part 01: Linear Programming

Midterm Review. Yinyu Ye Department of Management Science and Engineering Stanford University Stanford, CA 94305, U.S.A.

III. Linear Programming

Solution Cases: 1. Unique Optimal Solution Reddy Mikks Example Diet Problem

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

4.6 Linear Programming duality

Lecture 5 Simplex Method. September 2, 2009

TIM 206 Lecture 3: The Simplex Method

The Simplex Method for Solving a Linear Program Prof. Stephen Graves

Linear Programming Inverse Projection Theory Chapter 3

Lecture 1 Introduction to optimization

Lecture 10: Linear programming duality and sensitivity 0-0

5.3 Linear Programming in Two Dimensions: A Geometric Approach

F 1 F 2 Daily Requirement Cost N N N

MAT016: Optimization

Optimization Models and Applications

Notes taken by Graham Taylor. January 22, 2005

Optimization WS 13/14:, by Y. Goldstein/K. Reinert, 9. Dezember 2013, 16: Linear programming. Optimization Problems

1. Consider the following polyhedron of an LP problem: 2x 1 x 2 + 5x 3 = 1 (1) 3x 2 + x 4 5 (2) 7x 1 4x 3 + x 4 4 (3) x 1, x 2, x 4 0

Lecture Note 18: Duality

Linear and Combinatorial Optimization

Linear programming: algebra

Linear Programming. Operations Research. Anthony Papavasiliou 1 / 21

IE 400 Principles of Engineering Management. Graphical Solution of 2-variable LP Problems

IE 5531: Engineering Optimization I

Chapter 1 Linear Programming. Paragraph 5 Duality

IE 5531: Engineering Optimization I

ORIE 6300 Mathematical Programming I August 25, Lecture 2

Math Models of OR: Some Definitions

We start by giving some examples of linear programs and how they are used in practice.

Chapter 3, Operations Research (OR)

x 1 + x 2 2 x 1 x 2 1 x 2 2 min 3x 1 + 2x 2

Duality Theory, Optimality Conditions

Algorithms and Theory of Computation. Lecture 13: Linear Programming (2)

Linear Programming: Simplex Algorithm. A function of several variables, f(x) issaidtobelinear if it satisþes the two

LP Duality: outline. Duality theory for Linear Programming. alternatives. optimization I Idea: polyhedra

Lectures 6, 7 and part of 8

Discrete Optimization

March 13, Duality 3

MS-E2140. Lecture 1. (course book chapters )

Linear Programming. Larry Blume Cornell University, IHS Vienna and SFI. Summer 2016

Chapter 4 The Simplex Algorithm Part I

Lecture 7 Duality II

Motivating examples Introduction to algorithms Simplex algorithm. On a particular example General algorithm. Duality An application to game theory

1 Review Session. 1.1 Lecture 2

9.1 Linear Programs in canonical form

Introduction to linear programming

Multicommodity Flows and Column Generation

Ann-Brith Strömberg. Lecture 4 Linear and Integer Optimization with Applications 1/10

Input: System of inequalities or equalities over the reals R. Output: Value for variables that minimizes cost function

The Simplex Algorithm

THE UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS. Operations Research I

OPERATIONS RESEARCH. Linear Programming Problem

A Review of Linear Programming

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

2. Linear Programming Problem

1 The linear algebra of linear programs (March 15 and 22, 2015)

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions

Lecture 9 Tuesday, 4/20/10. Linear Programming

CSCI5654 (Linear Programming, Fall 2013) Lecture-8. Lecture 8 Slide# 1

An example of LP problem: Political Elections

HW1 solutions. 1. α Ef(x) β, where Ef(x) is the expected value of f(x), i.e., Ef(x) = n. i=1 p if(a i ). (The function f : R R is given.

Linear Programming: Simplex

Linear Programming and the Simplex method

Math 5593 Linear Programming Week 1

Optimization. Broadly two types: Unconstrained and Constrained optimizations We deal with constrained optimization. General form:

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

IE 400: Principles of Engineering Management. Simplex Method Continued

Chapter 1. Preliminaries

Simplex Method for LP (II)

Numerical Optimization

MATH 445/545 Test 1 Spring 2016

1 Overview. 2 Extreme Points. AM 221: Advanced Optimization Spring 2016

2.098/6.255/ Optimization Methods Practice True/False Questions

MS-E2140. Lecture 1. (course book chapters )

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

Part 1. The Review of Linear Programming

Convex Optimization and Modeling

M340(921) Solutions Problem Set 6 (c) 2013, Philip D Loewen. g = 35y y y 3.

Going from graphic solutions to algebraic

Professor Alan H. Stein October 31, 2007

Termination, Cycling, and Degeneracy

Lecture 6 Simplex method for linear programming

Transcription:

Increasing generality Decreasing efficiency Generality of Languages Linear Programs Reduction Algorithm Simplex Algorithm, Interior Point Algorithms Min Cost Flow Algorithm Klein s algorithm Reduction Max (s,t)-flow Algorithm Edmonds-Karp Reduction Maximum Cardinality Matching Algorithm Hopcroft-Karp 1

Min Cost Flow Problem Given flow network with costs G =(V,E,c,b,k), find flow f minimizing cost(f). 2

Min Cost Flow Problem Given G=(V,E,c,b,k), find f: V V! R minimizing (u,v) 2 V V k(u,v) f(u,v) so that 8 (u,v): f(u,v) c(u,v). 8 (u,v): f(u,v) = f(v,u). 8 u 2 V: v 2 V f(u,v) = b(u) 3

Min Cost Flow Problem Find (x 1, x 2,, x 64 ) 2 R 64 minimizing k 1 x 1 + k 2 x 2 + + k 64 x 64 so that x 1 3, x 2-1,.. x 1 = - x 19, x 2 = - x 27,. x 9 + x 17 + x 34 = 17, x 12 + x 11 + x 19 = 0,. 4

Linear Programs Find x 2 R n minimizing or maximizing a linear form hx,ci = i c i x i (the objective function) so that a given set of linear equations and inequalities are satisfied. A feasible solution to the program is a point x satisfying the equations and inequalities. 5

Linear Programs Linear Programs generalize the min cost flow problem. Linear Programs generalize systems of linear equations. To solve general linear programs we seem to need a common generalization of Klein s algorithm and Gaussian elimination! 6

Diet Problem Serving Size Energy (kcal) Protein (g) Calcium (mg) Oatmeal 28 g 110 4 2 3 Chicken 100 g 205 32 12 24 Eggs 2 large 160 13 54 13 Whole Milk 237 cc 160 8 285 9 Cherry Pie 170 g 420 4 22 20 Pork with Beans 260 g 260 14 80 19 Price per serving (cents) Necessary daily intake: Energy 2000 kcal, Protein 55 g, Calcium 800 mg Compose a diet minimizing price and fulfilling necessary daily intake. 7

Diet Problem Serving Size Energy (kcal) Protein (g) Calcium (mg) Oatmeal x 1 28 g 110 4 2 3 Chicken x 2 100 g 205 32 12 24 Eggs x 3 2 large 160 13 54 13 Whole Milk x 4 237 cc 160 8 285 9 Cherry Pie x 5 170 g 420 4 22 20 Pork with Beans x 6 260 g 260 14 80 19 Price per serving (cents) Necessary daily intake: Energy 2000 kcal, Protein 55 g, Calcium 800 mg Compose a diet minimizing price and fulfilling necessary daily intake. 8

Linear Program for Diet Problem Find (x 1, x 2, x 3, x 4, x 5, x 6 ) 2 (R + ) n minimizing 3x 1 + 24x 2 + 13x 3 + 9x 4 + 20x 5 + 19x 6 so that 110x 1 + 205x 2 + 160 x 3 + 160 x 4 + 420 x 5 + 260 x 6 2000 4 x 1 + 32 x 2 + 13 x 3 + 8 x 4 + 4 x 5 + 14 x 6 55 2 x 1 + 12 x 2 + 54 x 3 + 285 x 4 + 22 x 5 + 80 x 6 800 9

Linear Programs, Geometric View x y = 0 10

x y 0 11

x + 2y 1 Æ x + 3 y -1 Æ x y 0 Æ 2 x - y 3 x + 2y = 1 x + 3y = -1 x y = 0 2x y = 3 12

x + 2y 1 Æ x + 3 y -1 Æ x y 0 Æ 2 x - y 3 13

The set of feasible solutions F is a convex Polyhedron. F 14

Minimize x-2y over F x-2y = 0 F x-2y = 1 15

Minimize x-2y over F x-2y = -2/3 F 16

Linear Programs, Geometric view The set of feasible solutions of a linear program is a polyhedron in R n. The minimal (maximal) value of the linear objective function is attained in a corner of the polyhedron. Simplex algorithm: Do a local search, walking from corner to corner of the polyhedron improving the objective function until no improvement is possible. Exceptions: The set of feasible solutions may be unbounded or empty (the linear program is then said to be infeasible). 17

18

Linear Programs in Standard Form The objective must be to maximize a linear function. All variables are restricted to nonnegative values. All constraints have the form d 1 x 1 + d 2 x 2 + + d n x n e 19

Linear Programs in Standard Form Find (x 1, x 2, x 3,, x n ) 2 (R + ) n maximizing c 1 x 1 + c 2 x 2 + + c n x n so that a 11 x 1 + a 12 x 2 + + a 1n x n b 1 a 21 x 1 + a 22 x 2 + + a 2n x n b 2 a m1 x 1 + a m2 x 2 + + a mn x n b m Exceptions: If no fesible solution exist, report Infeasible. If arbitrarily good feasible solutions exist, report Unbounded. 20

Linear Program in Standard Form Matrix Notation Given A 2 R m n, b 2 R m, c 2 R n, find x 2 (R + ) n maximizing hc,xi so that Ax b. 21

Reduction from LP in general form to LP in standard form Suppose we want to minimize (not maximize) c 1 x 1 + c 2 x 2 + c n x n Maximize - c 1 x 1 - c 2 x 2 - - c n x n 22

Reduction from LP in general form to LP in standard form Suppose we have a constraint d 1 x 1 + d 2 x 2 + + d n x n e Replace with - d 1 x 1 - d 2 x 2 - - d n x n - e 23

Reduction from LP in general form to LP in standard form Suppose we have a constraint d 1 x 1 + d 2 x 2 + + d n x n = e Replace with d 1 x 1 + d 2 x 2 + + d n x n e - d 1 x 1 - d 2 x 2 - - d n x n - e 24

Reduction from LP in general form to LP in standard form Suppose y is a variable for which we do not want the constraint y 0. Suppose we do want a constraint such as y -17 Introduce new variable y = y+17 and replace y with y -17 everywhere in the program. 25

Reduction from LP in general form to LP in standard form Suppose y is a variable for which we do not want the constraint y 0 and no other constraint y c. Introduce two new variables y +, y - with constraints y + 0, y - 0. Replace y with y + - y - everywhere in the program. Do this for every unconstrained variable in the program. 26

Reduction from LP in general form to LP in standard form The old program P and the new program P are related as follows: A feasible solution to P can be converted to a feasible solution to P with same value by setting y + = max(y,0), y - = min(y,0). A feasible solution to P can be converted to a feasible solution to P with same value by setting y = y + - y -. 27

Reduction from LP in general form to LP in standard form Conclusion: Linear Programs in general form can be converted to linear programs in standard form by doubling the number of constraints and doubling number of variables. From a practical point of view, the factor 2 2= 4 blowup in size is undesirable. Exercise: One extra constraint and one extra variable suffices. 28