Introduction to Linear Programming Romil Jain. The Nutrition Problem Each fruit contains different nutrients Each fruit has different cost An apple a.

Slides:



Advertisements
Similar presentations
Duality for linear programming. Illustration of the notion Consider an enterprise producing r items: f k = demand for the item k =1,…, r using s components:
Advertisements

Standard Minimization Problems with the Dual
Understanding optimum solution
LECTURE 14 Minimization Two Phase method by Dr. Arshad zaheer
Introduction to Algorithms
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
Linear Programming (graphical + simplex with duality) Based on Linear optimization in application by Sui lan Tang. Linear Programme (LP) for Optimization.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 8 Tuesday, 11/19/02 Linear Programming.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Chapter 6 Linear Programming: The Simplex Method Section 3 The Dual Problem: Minimization with Problem Constraints of the Form ≥
Chapter 6 Linear Programming: The Simplex Method
The Simplex Method: Standard Maximization Problems
Minimization by Dr. Arshad zaheer
1 Linear Programming Jose Rolim University of Geneva.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2006 Lecture 9 Wednesday, 11/15/06 Linear Programming.
Q 2-31 Min 3A + 4B s.t. 1A + 3B ≧ 6 B = - 1/3A + 2 1A + 1B ≧ 4
Chapter 10: Iterative Improvement
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 99 Chapter 4 The Simplex Method.
1 2TN – Linear Programming  Linear Programming. 2 Linear Programming Discussion  Requirements of a Linear Programming Problem  Formulate:  Determine:Graphical.
1 Linear Programming Jeff Edmonds York University COSC 3101 Lecture 5 Def and Hot Dog Example Network Flow Def nNetwork Flow Def n Matrix View of Linear.
Chapter 4 The Simplex Method
6  Graphing Systems of Linear Inequalities in Two Variables  Linear Programming Problems  Graphical Solutions of Linear Programming Problems  The Simplex.
Linear-Programming Applications
An Introduction By Mandy Bakas Linear Programming.
Linear Programming Models: Graphical and Computer Methods
1 Linear Programming:Duality theory. Duality Theory The theory of duality is a very elegant and important concept within the field of operations research.
This presentation shows how the tableau method is used to solve a simple linear programming problem in two variables: Maximising subject to two  constraints.
Kerimcan OzcanMNGT 379 Operations Research1 Linear Programming: The Simplex Method Chapter 5.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 Chapter 7 Linear Programming. 2 Linear Programming (LP) Problems Both objective function and constraints are linear. Solutions are highly structured.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 7.6 Linear Programming.
The Simplex Method. Standard Linear Programming Problem Standard Maximization Problem 1. All variables are nonnegative. 2. All the constraints (the conditions)
Chapter 6 Linear Programming: The Simplex Method Section R Review.
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.
Linear Programming Introduction: Linear programming(LP) is a mathematical optimization technique. By “Optimization” technique we mean a method which attempts.
Warm-Up 3.4 1) Solve the system. 2) Graph the solution.
Linear Programming Revised Simplex Method, Duality of LP problems and Sensitivity analysis D Nagesh Kumar, IISc Optimization Methods: M3L5.
Chapter 6 Linear Programming: The Simplex Method Section 3 The Dual Problem: Minimization with Problem Constraints of the Form ≥
Mechanical Engineering Department 1 سورة النحل (78)
Advanced Operations Research Models Instructor: Dr. A. Seifi Teaching Assistant: Golbarg Kazemi 1.
10/2 The simplex algorithm. In an augmented matrix, if a column has a 1 and all other entries 0, it is said to be ‘in solution’. The 1 is called a ‘pivot’
Chapter 4 Linear Programming: The Simplex Method
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.3 The student will be able to formulate the dual problem. The student.
1 System Planning 2013 Lecture 7: Optimization Appendix A Contents: –General about optimization –Formulating optimization problems –Linear Programming.
Part 3 Linear Programming 3.3 Theoretical Analysis.
Hon Wai Leong, NUS (CS6234, Spring 2009) Page 1 Copyright © 2009 by Leong Hon Wai CS6234: Lecture 4  Linear Programming  LP and Simplex Algorithm [PS82]-Ch2.
Hon Wai Leong, NUS (CS6234, Spring 2009) Page 1 Copyright © 2009 by Leong Hon Wai CS6234: Lecture 4  Linear Programming  LP and Simplex Algorithm [PS82]-Ch2.
1 Optimization Techniques Constrained Optimization by Linear Programming updated NTU SY-521-N SMU EMIS 5300/7300 Systems Analysis Methods Dr.
LINEAR PROGRAMMING. Linear Programming Linear programming is a mathematical technique. This technique is applied for choosing the best alternative from.
Linear Programming. George Dantzig 1947 NarendraKarmarkar Pioneers of LP.
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
Linear Programming 虞台文.
1 Simplex algorithm. 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear.
3.4 Linear Programming p Optimization - Finding the minimum or maximum value of some quantity. Linear programming is a form of optimization where.
Linear Programming for Solving the DSS Problems
2.7 Linear Programming Objectives: Use linear programming procedures to solve applications. Recognize situations where exactly one solution to a linear.
Linear Programming Revised Simplex Method, Duality of LP problems and Sensitivity analysis D Nagesh Kumar, IISc Optimization Methods: M3L5.
Chap 10. Sensitivity Analysis
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
The Simplex Method: Standard Minimization Problems
Lial/Hungerford/Holcomb/Mullins: Mathematics with Applications 11e Finite Mathematics with Applications 11e Copyright ©2015 Pearson Education, Inc. All.
Part 3 Linear Programming
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Copyright © 2019 Pearson Education, Inc.
LINEARPROGRAMMING 4/26/2019 9:23 AM 4/26/2019 9:23 AM 1.
Chapter 10: Iterative Improvement
Presentation transcript:

Introduction to Linear Programming Romil Jain

The Nutrition Problem Each fruit contains different nutrients Each fruit has different cost An apple a day keeps the doctor away – but apples are costly! A customer’s goal is to fulfill daily nutrition requirements at lowest cost.

The Nutrition Problem (cont’d) Lets take a simpler case of just apples and bananas. Must take at least 100 units of Calories & 90 units of Vitamins for good nutrition. A customer’s goal is to buy fruits in such a quantity that it minimizes cost but fulfills nutrition. CaloriesVitaminsCost($) Cost Function Cost = 5x 1 + 7x 2 Constraint Functions C1: 2x 1 + 4x 2  100 C2: 3x 1 + 3x 2  90 x 1, x 2  0

The Nutrition Problem (cont’d) Matrix Representation Constraints: 2x 1 + 4x 2  100 3x 1 + 3x 2  90 Non-negativity: x 1, x 2  0 Cost function = 5x 1 + 7x 2 Real life problems may have many variables and constraints ! CiCi XiXi NiNi M i,j  XiXi

Approach to Solution C1 C2 (0,0) x2x2 x1x1 Cost Function Cost = 5x 1 + 7x 2 Constraint Functions C1: 2x 1 + 4x 2  100 C2: 3x 1 + 3x 2  90 x 1, x 2  0

Cost Function Cost = 5x 1 + 7x 2 Constraint Functions C1: 2x 1 + 4x 2  100 C2: 3x 1 + 3x 2  90 x 1, x 2  0 Simplex Algorithm C1 C2 (0,0) x2x2 x1x1 Hill Climbing - Evaluate the vertices! Same approach for n variables with m constrains (in n-dimensional space). Maximum of m C n vertices

Simplex Algorithm (cont’d) A fast algorithm to solve Linear Programs Invented by George Dantzig in 1947 Computes solution to a Linear Program by evaluating vertices where constraints intersect each other.

Simplex Algorithm (cont’d) Minimize Cost : 21x 1 - 6x 2 – 100x 3 Constraint Functions: 5x 1 + 2x 2 +31x 3  21 1x 1 - 4x 2 +3x 3  56 6x x x 3  200. x 1, x 2, x 3  0 Evaluate vertices which satisfy constraints! Carbohydrates, vitamins (A,B,C,D,E), Proteins, minerals, fiber

Linear Programs Linear Program: An optimization problem whose constraints and cost function are linear functions Goal: Find a solution which optimizes the cost. E.g. Maximize Cost Function : 21x 1 - 6x 2 – 100x x 4 Constraint Functions: 5x 1 + 2x 2 +31x x 4  21 1x 1 - 4x 2 +3x x 1  56 6x x x x 4  200 ….. Applied in various industrial fields: Manufacturing, Supply- Chain, Logistics, Marketing… To save money and increase profits !

Linear Programs (cont’d) Do all Linear Programs have optimal solutions ? No ! Three types of Linear Programs: 1. Has an optimal solution with a finite cost value: e.g. nutrition problem 2. Unbounded: e.g maximize x, x  x  3. Infeasible: e.g maximize x, x  x  x 

Duality primal linear program minimize C.x M.x  N CiCi XiXi NiNi M i,j  XiXi dual linear program maximize N T.y M T.y  C T NiNi YiYi CiCi M j,i  YiYi It can be shown that, for every primal linear program, there is a dual linear program. This can be proved mathematically. But how do we understand the dual linear program semantically?

Semantics of Duality A customer’s goal is to buy fruits in such a quantity that it minimizes cost but fulfills nutrition. CiCi XiXi NiNi M i,j  XiXi Primal LP: minimize C.x Q.x  N Coefficients in each column represent the amount of nutrients in a particular food Cost of each fruit Daily nutrition Quantity of each fruit

Semantics of Duality Dual LP: maximize N T.y Q T.y  C T Coefficients in each row represent the amount of nutrients in a particular fruit NiNi YiYi CiCi M j,i  YiYi But what are Y i s in the dual ? Price of each nutrient! Daily nutrition Cost of each fruit Imagine a salesman trying to sell supplements for each fruit.

Semantics of Duality Primal Problem: A customer’s goal is to buy fruits in such a quantity that it minimizes cost but fulfills nutrition. Dual Problem: A salesman goal is to set price on each nutrient, so that it maximizes profit but his supplements are cheaper than fruits. (Otherwise who will by them?!) Primal (Customer) Dual (Salesman)

References Introduction To Algorithms, Cormen, Leiserson, Rivest, Stein How To Think About Algorithms, Edmonds Course Presentations, Edmonds An Introduction To Linear Programming and the Simplex Algorithm, Reveliotis ( P.html) P.html

Thank You! Questions ?

Simplex C1 C2 (0,0) y x Cost Function P = 5x + 7y Constraint Functions C1: 2x + 4y  100 C2: 3x + 3y  90 Non-Negativity: x,y  0 Recall we need to evaluate our cost function at the vertices where the constraint functions intersect each other

Simplex (cont’d) Our Equations P = 5x + 7y C1: 2x + 4y  100 C2: 3x + 3y  90 x,y  0 Slack Form Can be re-written as: P = 5x + 7y s 1 = x - 4y s 2 = x - 3y x, y  0 s 1,, s 2  We introduce 2 new variables called slack variables We don’t want to deal with complex inequalities

Simplex (cont’d) Cost Function P = 5x + 7y s 1 = x - 4y s 2 = x - 3y s 1,, s 2, x, y  0 STEP 1: We want an initial point Lets put x=0, y=0 Feasible solution x=0, y=0 P = 0

Simplex (cont’d) Cost Function P = 5x + 7y s 1 = x - 4y s 2 = x - 3y s 1,, s 2, x, y  0 STEP 2: We want next point Lets try to increase x. x can be increased maximum to 30 ( s 2 becomes zero) Rewrite equations (Pivoting) Now put y, s 2 = 0 Feasible solution x = 30 – y – s 2 /3 s 1 = /3s 2 – 2y P = 150 – 5/3s 2 + 2y x=30, y=0 P = 150

Simplex (cont’d) Cost Function P = 150 – 5/3s 2 + 2y x = 30 – y – s 2 /3 s 1 = /3s 2 – 2y s 1,, s 2, x, y  0 STEP 3: We want next point Lets try to increase y. y can be increased maximum to 20 ( s 1 becomes zero) Rewrite equations (Pivoting) Now put s 1, s 2 = 0 y = /3s 2 – 1/2s 1 x = 10 – 1/2s 1 - 2/3s 2 P = s 1 – s 2 x=10, y=20 P = 190 (We don’t increase s 2 because it will decrease P) Note that we cannot increase s1 & s2 without decreasing P. So we stop ! Feasible solution Is this solution optimal? Or have we run into a local minimum? ?