# Linear Programming. April 12, 2005

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Linear Programming April 1, 005 Parts of this were adapted from Chapter 9 of i Introduction to Algorithms (Second Edition) /i by Cormen, Leiserson, Rivest and Stein. 1 What is linear programming? The first thing to know about linear programming is that it is programming is the sense of trying to establish a plan or a schedule for something rather than programming in the sense of trying to write some code to solve a problem. For example, a TV station has to solve the problem of deciding which shows to air at which times. This is a programming problem. The kind of programming we are going to study is linear. Linear means that the contraints of the cost or profit of a decision are expressed as linear combinations of variables. A linear combination is a sum of constant-coefficients times variables that is less than, greater than or equal to a constant. The variables are raised to the first power. In most cases, a linear programming problem will look something like this: Maximize x 1 5x + x + Subject to x 1 x > x + x < 5x 1 x + x > 7 The first equation is the objective function (which term should be familiar to you from greedy algorithms) and the other equations are the constraints. Another way to think about linear programming is as a constraint satisfaction and optimization problem. It is not hard to make up simple examples of linear programming problems based on bussiness problems. For example, suppose a furniture production company makes tables, chairs and window frames. The company can get a 50 dollar profit from selling a table, a 10 dollar profit from selling a chair and a 15 dollar profit from selling a window frame. The production of furniture requires paying a cost for supplies and labor. The problem here is to decide how many tables, chairs and window frames to make given the cost of each item. More objective function constraints 1

2 concretely, if we let t = the number of tables produced, c = the number of chairs produced, w = the number of window frames produced, s = the cost of supplies and l = the cost of labor then we want to maximize 50t + 10c + 15w s l subject to a set of equations that describe the cost of producing each item and a equations that describe how much money we have on hand for buying labor and supplies. Suppose a table costs 0 dollars in supplies and 0 dollars in labor then we would add the constraints 0t + l = 0 0t + s = 0 which require us to spend 0 dollars on labor for each table built and 0 dollars on supplies for each table built. Similarly, suppose it costs 10 dollars in supplies and 10 dollars in labor to make a chair and that it costs 15 dollars in supplies and 5 dollars in labor to make a window frame. We would add the following constraints 10c + l = 0 10c + s = 0 and we would have a problem right there. The problem is that the cost of building the tables and the cost of building the chairs are entangled. So we need different cost variables for each item. We go back and add them in to the objective funtcion and the constraint equations to get Maximize 50t + 10c + 15w s t l t s c l c s w l w Subject to 0t + l t = 0 0t + s t = 0 0c + l c = 0 0c + s c = 0 0w + l w = 0 0w + s w = 0 The final constraint is that we only have 00 dollars on hand to spend on labor and supplies. That constraint is easily expressed as l t + s t + l c + s c + l w + s w 00 We can now pass our linear programming problem off to our favorite solver and find how the most profitable way to program our furniture shop so as to maximize profits. In the furniture problems, we tacitly assumed that t, c and w were integers. That is, we assumed we could only make an integer number of tables, chairs and window frames. This assumption makes sense for this problem. But for most problems we will assume that all variables can have arbitrary real values.

3 One interesting thing about linear programming is that, compared to graph formulations of problems, it is an entirely different way think about a problem. In the graph representation, the challenge is to define the contents of each node in the graph, describe how child nodes are related to their parents and describe an algorithm for exploring the graph. In linear programming, the challenge is to formulate the problem as a set of equations and then solve them. Solving Linear Programming Problems In this section, we will learn how to solve linear programming problems using the simplex method. The simplex method is a greedy algorithm, which brings us full circle in algorithm design. You may recall that we studied greedy algorithms first in 1. Interestingly, we can formulate the continuous knapsack problem as a linear programming problem and use the simplex method to derrive an algorithm that looks alot, ok exaclty, like the greedy knapsack algorithm. But we digress. First, we need some standardized forms for linear programming problems. This will simplify our discussion..1 Standard Form The standard form for a linear program is standard form Maximize subject to n j=1 c jx j n j=1 a ijx j b i for i = 1,,... m x j 0 for j = 1,,... n in which all variables range over the real numbes. Given a linear programming problem, it is always possible to add variables and constraints to get the problem into standard form. We will assume all problems are in standard form henceforth. The standard form includes the optimization of the objective function with n variables (x 1... x n ) using m contraint equations of n terms each and a set of n nonnegativity equations. It is often convenient (especially when implementing a linear program solver) to represent a standard form linear programming problem as a pair of vectors. The m n matrix A contains the values of the a coefficients in the constraint equations, an n-dimentaional vector b contains the b i entries from the constraint equations and an n-dimentaional vector c contains the c i entries from th objective function. If we use the matrix and vectors representation, then the standard from is Maximize subject to c T x Ax b x 0

4 in which c T is the transposition of c (basically you just rotate c 90 degrees and multiply a 1 by n matrix times an n by 1 matrix to get a single scalar value) and 0 is the n-dimentional 0 vector.. Slack Form Standard form is nice because it means that we can assume that all linear programming problems are inthe same form. That simplifies the definition of slack form. We care about slack form because that is the form used in the simplex method. In slack form, the only inequalities allowed are nonnegativity constraints. Converting to slack form requires two changes. First, a new variable, z is introduced to store the value of the objetive fuction. Second, all of the contraint equations from standard form are rewritten as equalities, rather than inequalities, with a new nonnegativity constraint. So the contraint becomes the pair of contraints n a ij x j b i j=1 s = b i n j=1 a ijx j s 0. The important thing here is that the pair of constraints is satisfied if and only if the original constraint is satisfied. The variable s is called a slack variable because it measures the difference, or slack, between the left and right sides of the original contraint. It is convenient to assume that the slack variable for contraint i is called x n+i. So that the slack form is slack variable x n+i = b i n j=1 a ijx j x n+i 0. Another name for the slack varibles plus z, the objective function value, is basic variables. The other x i variables are called non-basic variables At this point, its probably a good idea to do an example. This example comes from the Cormen, Leiserson, Rivest and Stein book. We will begin with the linear programing problem basic variables non-basic variables ex. Maximize x 1 x + x subject to x 1 + x x 7 x 1 x + x 7 x 1 x + x x 1, x, x 0

5 The first thing to notice is that this linear programming problem is indeed in standard form. We want to convert it to slack form. First, we will add the slack variables x, x 5, x and change the constraints to equalities. Maximize x 1 x + x subject to x = 7 x 1 x + x x 5 = 7 + x 1 + x x x = x 1 + x x x 1, x, x, x, x 5, x 0 Finally, we add the z variable to track the value of the objective function. z = x 1 x + x x = 7 x 1 x + x x 5 = 7 + x 1 + x x x = x 1 + x x x 1, x, x, x, x 5, x, z 0 Now we want a more concise representation of a linear programming problem concise representation in slack form. Just like before, we will use the matrix A and the vectors b and c of to keep track of the coefficients in the contraints (that s A), the constant terms in the slack equations (that s b) and the coefficients in the objective function (that s c). But, we will also need to know the indices for the basic variables and the indices for the non-basic variables. The set B will contain the indices of the basic variables and the set N will contain the indices of the non-basic variables. Finally, the value v will be an optional contant term in the objective function. The compact representation for the above linear program in slack form is: slack form B = {, 5, } N = {1,, } c = ( 7 ) T b = 7 A = v = 0 Notice that the coefficients of A are the negative of how they appear in slack form. The variable v is an optional constant term in the objective function. In this example, there is not constant term in the objective function so it is set to 0. 5

6 Simplex Algorithm The simplex algorithm is similar to how a linear system is solved using Gaussian elimination. In Gaussian elimination, the system is repeatedly transformed into an equivalent system until its structure is such that a solution can be easily extracted. The simplex algorithm iterates in a similar manner. We associate with each iteration of the algorithm a basic solution. A basic solution is obtained from the slack form of the linear programming by setting each nonbasic variable to 0 and then compute the values of the basic variable from the equality constraints. A basic solution corresponds to a vertex of the simplex. On each iteration of the algorithm, we are going to convert the current slack form into a new equivalent slack form whose basic solution is a different vertex of the simplex. The goal is to move through the vertexes to find the one to maximize our object value. This is done by finding a nonbasic variable that when increased from 0 causes an increase in the objective value. The amount by which we can increase the nonbasic variable is limited by the basic variables. In particular, we increase the nonbasic variable until one of the basic variables become zero. This indicates that there is no more slack in the system (i.e., the difference between the function and its constraining inequality is 0). At this point we rewrite the slack form to exchange the chosen nonbasic variable with the basic variable that is now 0. This is a new basic solution and we repeat the process until we cannot find a nonbasic variable to increase that gives an increase in the objective function..1 Simplex Algorithm Example An extended example will help see the process. This example is adapted from Introcuction to Algorithms by Cormen, Leiserson, Rivest, and Stein. Consider the following linear program in standard form: maximize x 1 + x + x subject to x 1 + x + x 0 x 1 + x + 5x x 1 + x + x x 1, x, x 0 We first begin by converting this into its equivalent stack from. Slack form is useful for algebraic as well as algorithmic manipulation. We say that a constraint is tight for a particular setting of its nonbasic variables if they cause the constraint s basic variable to become 0. Similarly, a setting of the nonbasic variables that would make a basic variable become negative violates that constraint. The slack variable thus represent how far away a constraint is from being tight, and they help us determine the limit to which we can increase nonbasic variables without violating any constraints. We convert to slack form by creating a slack variable for each constraint, converting the inequality to equality constraints, and creating a variable for the

7 objective function. Note the we drop the nonegativity constraints since they are implied by the slack form. The slack form of the problem is: z = x 1 + x + x x = 0 x 1 x x x 5 = x 1 x 5x x = x 1 x x A feasible solution to this system is any positive setting of x 1, x, and x that yields positive values for x, x 5, and x ; thus, there are an infinite number of feasible solutions to this system. We are interested in the basic solution obtained by setting all the nonbasic variables to zero (i.e., the variables onp the right-hand side of the equalities). The basic solution for our example is ( x 1, x, x, x, x 5, x ) = (0, 0, 0, 0,, ), and it has an objective value z = (/cdot0) + (1 0) + ( 0) = 0. Note that the basic solution set x i = b i for each i B. An iteration of the simplex algorithm rewrites the objective function and constraint equations to create a different set of nonbasic variables. This in turn creates a new basic solution. The rewrite in no way changes the underlying linear program that is being solved. Rather, it represents the movement from one vertex to another in exploring the simplex. Please note that it is possible that the basic solution is not feasible in the first few iterations of the algorithm. This is OK. We reformulate the linear programming problem in an iteration of the algorithm by picking a nonbasic variable x e and increasing its value to see if it increases the objective function value. If this is the case, then we continue to increase x e until a basic variable x l becomes goes to 0. At this point, x e becomes basic (i.e., it has a nonzero value) and x l becomes nonbasic (i.e., it has a zero value). We choose our nonbasic value to increase by looking at the objective function. If a nonbasic variable exists in the objective function with a positive coefficient, then we can select that variable as x e in our algorithm. Keep in mind that as we increase x e other basic variables and our objective functions may also change. The first basic variable to reach 0 becomes x l. To continue with our example, notice that x 1 is a nonbasic variable with a positive coefficient in the objective function. We select this as the variable to increase. As we increase x 1, the variables x, x 5, and x decrease. The nonnegativity constraint prevents us from increasing x 1 above 9 since x becomes negative at that point; thus, x is our tightest constraint since it limits how much we can increase x 1. We know switch the roles of x 1 and x by solving the third constraint for x : x = x 1 x x x 1 = x x x x 1 = 9 x x x We now rewrite the other equations by writing x 1 in terms of x, x, and x using the above equation. Doing this for x give us x = 0 x 1 x x 7

8 ( = 0 9 x x x ) x x = 1 x 5x + x We repeat this procedure for the remaining constraint and objective function to rewrite our linear program in the following form: x + x x x 5x + x z = 7 + x x 1 = 9 x x = 1 x x 5 = x x + x The rewrite operation as shown above is called a pivot. A pivot takes the nonbasic variable x e called the entering variable and the basic variable x l called the leaving variable and exchanges their roles in the linear program. Pivoting rewrites that linear program into an equivalent form. The original basic solution to our linear program was (0, 0, 0, 0,, ) with an objective value of 0. The new basic solution to the linear program after the pivot is (9, 0, 0, 1,, 0) with an objective value of 7. This solution is feasible in our linear program before the pivot, and it yields the same objective value. Continuing the example, we now find a new nonbasic variable to increase. We do not want to increase x since it has a negative coefficient. We can attempt to increase either x or x. Let us use x We can increase x to before the third constraint becomes negative, so the third constraint is the tightest constraint. We pivot on x and x 5 by solving for x on the right-hand side of the third constraint and substituting it into the other equations to rewrite the linear program to z = x x5 x 1 = x + x5 x = x x5 x = 9 + x + 5x5 11x 5x x + x There is still a nonbasic variable in the objective function with a positive coefficient. We increase this variable and pivot again to rewrite the linear program as: z = x x5 x x 1 = + x + x5 x x = x x5 + x x = 1 x + x5 There are no other variable we can change to increase the objective value. The basic solution to the linear program is (,, 0, 1, 0, 0). The objective value from this solution is. We can now return to our original linear programing. The only variables in the original program are x 1, x, and x. Using our basic solution these variables are x 1 =, x =, and x = 0. Notice that these values give an objective value of as expected. Note that our final solution is integral; although, this is not always the case.

9 1 Pivot (N, B, A, b, c, v, l, e) // Compute coefficients for equation for the new basic variable x e // The variables with hats, like ˆb e, will be the return values ˆbe = b l /a l,e 5 for each j N {e} do â e,j = a l,j /a l,e 7 â e,l = 1/a l,e // Compute coefficients for the other constraints 9 for each i B {l} 10 do ˆb i = b i a i,eˆbe 11 for each j N {e} 1 do â i,j = a i,j a i,e â e,j 1 â i,l = a i,e â e,l 1 // Compute the objective function 15 ˆv = v + c eˆbe for each j N {e} 17 do ĉ j = c j c e â e,j 1 ĉ l = c e â e,l 19 // Compute new basic and nonbasic variable sets 0 ˆN = (N {e}) {l} 1 ˆB = (B {l}) {e} return ( ˆN, ˆB, Â, ˆb, ĉ, ˆv) Figure 1: The Pivot algorithm. Adapted from [?].. Pivoting Pivoting is a key, a perhaps the key, operation in the simplex algorithm. The pseudocode for the pivoting algorithm is given in Figure 1. The parameters passed to the algorithm are the matrices, vectors and integers in the consice representation of the slack form (the definition of the concise representation is on page 5).. The Simplex Algorithm, Finally! The basic idea of the simplex algorithm is to choose a pair of entering and leaving variables. The pseudocode for the simplex algorithm is given in Figure. The entering variable, e which is chosen on line 9, is a nonbasic variable (ie, its index is in N) with a positive coefficient in the objective function (ie, c e > 0). The significance of the entering variable is that if we increase the value of the entering variable then we can increase the value of the objective function and that was our goal in the first place. Note that the algorithm on line 9 doesn t give you any guidance on how to pick the entering variable. You just have to pick one, of possibly many, nonbasic variable in the objective function with a positive coefficient. You may decide to pick the nonbasic variable with the 9

10 1 Simplex (A, b, c) // convert the problem to slack form and check feasibility // you may assume that the first basic solution is feasible // this means you will only convert your problem to slack form 5 // this assumption is not true in general (N, B, A, b, c, v) = InitialzeSimplex(A, B, c) 7 while there exists some j N such that c j > 0 // e will be the entering variable 9 do choose an index e N such that c e > 0 10 for each index i B 11 do if a i,e > 0 1 then δ i = b i /a i,e 1 else δ i = 1 // l will be the leaving variable 15 choose l B such that δ i is minimized if δ l = 17 then return unbounded 1 else (N, B, A, b, c, v) = Pivot (N, B, A, b, c, v, l, e) 19 // set the nonbasic variables to 0 and everything else to the optimal solution 0 for i = 1 to n 1 do if i B then x i = b i else x i = 0 return ( x 1, x,... x n ) Figure : The simplex algorithm. Adapted from [?]. biggest positive coefficient, or you might use some other method. The for-loop in lines 10 through 1 determines how much we can change the value of the entering variable while allowing the basic variables (ie, variables with index in B) for each contraint to remain positive. In line 15, we pick the index of the basic variable with the tightest contraint (ie, let l = i such that δ i is the smallest of the δs). We repeat that process until either there are no more nonbasic variables with positive coefficients or we discover that the value of the objective function is unbounded (line 17). After completing the pivot operations, the only remaining task is to return the values of the nonzero basic variables. The assumption in line?? is made to simplify the project. Implementing the InitializeSimplex algorithm to ensure that the first basic solution is feasible is neither terribly difficult nor interesting so we will skip it. When you formulate the linear program for the project problem, check to see if the first basic solution is feasible. If it isn t, then you need to think of a new formulation. The first solution to the natural formulation in slack form has a basic feasible solution. You can check to see if the first basic solution is feasible by setting all of the 10

11 nonbasic variables to 0 and determining if you still satisfy the constraints. For example, the constraint x 1 x converted to slack form with x 1 and x as nonbasic variables would have a basic solution with x 1 = 0 and x = 0 which would violate this constraint because

### Linear Programming. March 14, 2014

Linear Programming March 1, 01 Parts of this introduction to linear programming were adapted from Chapter 9 of Introduction to Algorithms, Second Edition, by Cormen, Leiserson, Rivest and Stein [1]. 1

### 1 Solving LPs: The Simplex Algorithm of George Dantzig

Solving LPs: The Simplex Algorithm of George Dantzig. Simplex Pivoting: Dictionary Format We illustrate a general solution procedure, called the simplex algorithm, by implementing it on a very simple example.

### max cx s.t. Ax c where the matrix A, cost vector c and right hand side b are given and x is a vector of variables. For this example we have x

Linear Programming Linear programming refers to problems stated as maximization or minimization of a linear function subject to constraints that are linear equalities and inequalities. Although the study

### Algebraic Simplex Method - Introduction Previous

Algebraic Simplex Method - Introduction To demonstrate the simplex method, consider the following linear programming model: This is the model for Leo Coco's problem presented in the demo, Graphical Method.

### Definition of a Linear Program

Definition of a Linear Program Definition: A function f(x 1, x,..., x n ) of x 1, x,..., x n is a linear function if and only if for some set of constants c 1, c,..., c n, f(x 1, x,..., x n ) = c 1 x 1

### Linear Programming Notes V Problem Transformations

Linear Programming Notes V Problem Transformations 1 Introduction Any linear programming problem can be rewritten in either of two standard forms. In the first form, the objective is to maximize, the material

### 3 Does the Simplex Algorithm Work?

Does the Simplex Algorithm Work? In this section we carefully examine the simplex algorithm introduced in the previous chapter. Our goal is to either prove that it works, or to determine those circumstances

### 7.4 Linear Programming: The Simplex Method

7.4 Linear Programming: The Simplex Method For linear programming problems with more than two variables, the graphical method is usually impossible, so the simplex method is used. Because the simplex method

### CHAPTER 17. Linear Programming: Simplex Method

CHAPTER 17 Linear Programming: Simplex Method CONTENTS 17.1 AN ALGEBRAIC OVERVIEW OF THE SIMPLEX METHOD Algebraic Properties of the Simplex Method Determining a Basic Solution Basic Feasible Solution 17.2

### Special Situations in the Simplex Algorithm

Special Situations in the Simplex Algorithm Degeneracy Consider the linear program: Maximize 2x 1 +x 2 Subject to: 4x 1 +3x 2 12 (1) 4x 1 +x 2 8 (2) 4x 1 +2x 2 8 (3) x 1, x 2 0. We will first apply the

### Linear Programming for Optimization. Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc.

1. Introduction Linear Programming for Optimization Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc. 1.1 Definition Linear programming is the name of a branch of applied mathematics that

### Linear Programming I

Linear Programming I November 30, 2003 1 Introduction In the VCR/guns/nuclear bombs/napkins/star wars/professors/butter/mice problem, the benevolent dictator, Bigus Piguinus, of south Antarctica penguins

### Chapter 15 Introduction to Linear Programming

Chapter 15 Introduction to Linear Programming An Introduction to Optimization Spring, 2014 Wei-Ta Chu 1 Brief History of Linear Programming The goal of linear programming is to determine the values of

### Chap 4 The Simplex Method

The Essence of the Simplex Method Recall the Wyndor problem Max Z = 3x 1 + 5x 2 S.T. x 1 4 2x 2 12 3x 1 + 2x 2 18 x 1, x 2 0 Chap 4 The Simplex Method 8 corner point solutions. 5 out of them are CPF solutions.

### Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints

Chapter 6 Linear Programming: The Simplex Method Introduction to the Big M Method In this section, we will present a generalized version of the simplex method that t will solve both maximization i and

### The Graphical Simplex Method: An Example

The Graphical Simplex Method: An Example Consider the following linear program: Max 4x 1 +3x Subject to: x 1 +3x 6 (1) 3x 1 +x 3 () x 5 (3) x 1 +x 4 (4) x 1, x 0. Goal: produce a pair of x 1 and x that

### The Simplex Method. What happens when we need more decision variables and more problem constraints?

The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving two decision variables and relatively few problem

### What is Linear Programming?

Chapter 1 What is Linear Programming? An optimization problem usually has three essential ingredients: a variable vector x consisting of a set of unknowns to be determined, an objective function of x to

### OPRE 6201 : 2. Simplex Method

OPRE 6201 : 2. Simplex Method 1 The Graphical Method: An Example Consider the following linear program: Max 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2

### Standard Form of a Linear Programming Problem

494 CHAPTER 9 LINEAR PROGRAMMING 9. THE SIMPLEX METHOD: MAXIMIZATION For linear programming problems involving two variables, the graphical solution method introduced in Section 9. is convenient. However,

### Linear Inequalities and Linear Programming. Systems of Linear Inequalities in Two Variables

Linear Inequalities and Linear Programming 5.1 Systems of Linear Inequalities 5.2 Linear Programming Geometric Approach 5.3 Geometric Introduction to Simplex Method 5.4 Maximization with constraints 5.5

### By W.E. Diewert. July, Linear programming problems are important for a number of reasons:

APPLIED ECONOMICS By W.E. Diewert. July, 3. Chapter : Linear Programming. Introduction The theory of linear programming provides a good introduction to the study of constrained maximization (and minimization)

### Simplex method summary

Simplex method summary Problem: optimize a linear objective, subject to linear constraints 1. Step 1: Convert to standard form: variables on right-hand side, positive constant on left slack variables for

### Section Notes 3. The Simplex Algorithm. Applied Math 121. Week of February 14, 2011

Section Notes 3 The Simplex Algorithm Applied Math 121 Week of February 14, 2011 Goals for the week understand how to get from an LP to a simplex tableau. be familiar with reduced costs, optimal solutions,

### Linear Programming Problems

Linear Programming Problems Linear programming problems come up in many applications. In a linear programming problem, we have a function, called the objective function, which depends linearly on a number

### IEOR 4404 Homework #2 Intro OR: Deterministic Models February 14, 2011 Prof. Jay Sethuraman Page 1 of 5. Homework #2

IEOR 4404 Homework # Intro OR: Deterministic Models February 14, 011 Prof. Jay Sethuraman Page 1 of 5 Homework #.1 (a) What is the optimal solution of this problem? Let us consider that x 1, x and x 3

### 3.1 Solving Systems Using Tables and Graphs

Algebra 2 Chapter 3 3.1 Solve Systems Using Tables & Graphs 3.1 Solving Systems Using Tables and Graphs A solution to a system of linear equations is an that makes all of the equations. To solve a system

### 4.3 The Simplex Method and the Standard Maximization Problem

. The Simplex Method and the Standard Maximiation Problem Question : What is a standard maximiation problem? Question : What are slack variables? Question : How do you find a basic feasible solution? Question

### Linear Programming: Chapter 5 Duality

Linear Programming: Chapter 5 Duality Robert J. Vanderbei October 17, 2007 Operations Research and Financial Engineering Princeton University Princeton, NJ 08544 http://www.princeton.edu/ rvdb Resource

### Fundamentals of Operations Research Prof.G. Srinivasan Department of Management Studies Lecture No. # 03 Indian Institute of Technology, Madras

Fundamentals of Operations Research Prof.G. Srinivasan Department of Management Studies Lecture No. # 03 Indian Institute of Technology, Madras Linear Programming solutions - Graphical and Algebraic Methods

### Chapter 2 Solving Linear Programs

Chapter 2 Solving Linear Programs Companion slides of Applied Mathematical Programming by Bradley, Hax, and Magnanti (Addison-Wesley, 1977) prepared by José Fernando Oliveira Maria Antónia Carravilla A

### The Simplex Solution Method

Module A The Simplex Solution Method A-1 A-2 Module A The Simplex Solution Method The simplex method is a general mathematical solution technique for solving linear programming problems. In the simplex

### Outline. Linear Programming (LP): Simplex Search. Simplex: An Extreme-Point Search Algorithm. Basic Solutions

Outline Linear Programming (LP): Simplex Search Benoît Chachuat McMaster University Department of Chemical Engineering ChE 4G03: Optimization in Chemical Engineering 1 Basic Solutions

### Duality in Linear Programming

Duality in Linear Programming 4 In the preceding chapter on sensitivity analysis, we saw that the shadow-price interpretation of the optimal simplex multipliers is a very useful concept. First, these shadow

### Quiz 1 Sample Questions IE406 Introduction to Mathematical Programming Dr. Ralphs

Quiz 1 Sample Questions IE406 Introduction to Mathematical Programming Dr. Ralphs These questions are from previous years and should you give you some idea of what to expect on Quiz 1. 1. Consider the

### Linear Programming. Solving LP Models Using MS Excel, 18

SUPPLEMENT TO CHAPTER SIX Linear Programming SUPPLEMENT OUTLINE Introduction, 2 Linear Programming Models, 2 Model Formulation, 4 Graphical Linear Programming, 5 Outline of Graphical Procedure, 5 Plotting

### Lecture 4 Linear Programming Models: Standard Form. August 31, 2009

Linear Programming Models: Standard Form August 31, 2009 Outline: Lecture 4 Standard form LP Transforming the LP problem to standard form Basic solutions of standard LP problem Operations Research Methods

### 3. Evaluate the objective function at each vertex. Put the vertices into a table: Vertex P=3x+2y (0, 0) 0 min (0, 5) 10 (15, 0) 45 (12, 2) 40 Max

SOLUTION OF LINEAR PROGRAMMING PROBLEMS THEOREM 1 If a linear programming problem has a solution, then it must occur at a vertex, or corner point, of the feasible set, S, associated with the problem. Furthermore,

### Practical Guide to the Simplex Method of Linear Programming

Practical Guide to the Simplex Method of Linear Programming Marcel Oliver Revised: April, 0 The basic steps of the simplex algorithm Step : Write the linear programming problem in standard form Linear

### Using the Simplex Method to Solve Linear Programming Maximization Problems J. Reeb and S. Leavengood

PERFORMANCE EXCELLENCE IN THE WOOD PRODUCTS INDUSTRY EM 8720-E October 1998 \$3.00 Using the Simplex Method to Solve Linear Programming Maximization Problems J. Reeb and S. Leavengood A key problem faced

### I. Solving Linear Programs by the Simplex Method

Optimization Methods Draft of August 26, 2005 I. Solving Linear Programs by the Simplex Method Robert Fourer Department of Industrial Engineering and Management Sciences Northwestern University Evanston,

### SUPPLEMENT TO CHAPTER

SUPPLEMENT TO CHAPTER 6 Linear Programming SUPPLEMENT OUTLINE Introduction and Linear Programming Model, 2 Graphical Solution Method, 5 Computer Solutions, 14 Sensitivity Analysis, 17 Key Terms, 22 Solved

### Linear Programming Notes VII Sensitivity Analysis

Linear Programming Notes VII Sensitivity Analysis 1 Introduction When you use a mathematical model to describe reality you must make approximations. The world is more complicated than the kinds of optimization

### Chapter 4 - Systems of Equations and Inequalities

Math 233 - Spring 2009 Chapter 4 - Systems of Equations and Inequalities 4.1 Solving Systems of equations in Two Variables Definition 1. A system of linear equations is two or more linear equations to

### Using the Simplex Method in Mixed Integer Linear Programming

Integer Using the Simplex Method in Mixed Integer UTFSM Nancy, 17 december 2015 Using the Simplex Method in Mixed Integer Outline Mathematical Programming Integer 1 Mathematical Programming Optimisation

### 1 Introduction. Linear Programming. Questions. A general optimization problem is of the form: choose x to. max f(x) subject to x S. where.

Introduction Linear Programming Neil Laws TT 00 A general optimization problem is of the form: choose x to maximise f(x) subject to x S where x = (x,..., x n ) T, f : R n R is the objective function, S

### Chapter 4: Systems of Equations and Ineq. Lecture notes Math 1010

Section 4.1: Systems of Equations Systems of equations A system of equations consists of two or more equations involving two or more variables { ax + by = c dx + ey = f A solution of such a system is an

### Theory of Linear Programming

Theory of Linear Programming Debasis Mishra April 6, 2011 1 Introduction Optimization of a function f over a set S involves finding the maximum (minimum) value of f (objective function) in the set S (feasible

### MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

### Lecture 3: Linear Programming Relaxations and Rounding

Lecture 3: Linear Programming Relaxations and Rounding 1 Approximation Algorithms and Linear Relaxations For the time being, suppose we have a minimization problem. Many times, the problem at hand can

### Sensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS

Sensitivity Analysis 3 We have already been introduced to sensitivity analysis in Chapter via the geometry of a simple example. We saw that the values of the decision variables and those of the slack and

### 1 Gaussian Elimination

Contents 1 Gaussian Elimination 1.1 Elementary Row Operations 1.2 Some matrices whose associated system of equations are easy to solve 1.3 Gaussian Elimination 1.4 Gauss-Jordan reduction and the Reduced

### 4.6 Linear Programming duality

4.6 Linear Programming duality To any minimization (maximization) LP we can associate a closely related maximization (minimization) LP. Different spaces and objective functions but in general same optimal

### Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

### LINEAR PROGRAMMING P V Ram B. Sc., ACA, ACMA Hyderabad

LINEAR PROGRAMMING P V Ram B. Sc., ACA, ACMA 98481 85073 Hyderabad Page 1 of 19 Question: Explain LPP. Answer: Linear programming is a mathematical technique for determining the optimal allocation of resources

### Math 407A: Linear Optimization

Math 407A: Linear Optimization Lecture 4: LP Standard Form 1 1 Author: James Burke, University of Washington LPs in Standard Form Minimization maximization Linear equations to linear inequalities Lower

### Linear Programming in Matrix Form

Linear Programming in Matrix Form Appendix B We first introduce matrix concepts in linear programming by developing a variation of the simplex method called the revised simplex method. This algorithm,

### Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving

Section 7 Algebraic Manipulations and Solving Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving Before launching into the mathematics, let s take a moment to talk about the words

### Chapter 4: The Mechanics of the Simplex Method

Chapter 4: The Mechanics of the Simplex Method The simplex method is a remarkably simple and elegant algorithmic engine for solving linear programs. In this chapter we will examine the internal mechanics

### 3.4. Solving Simultaneous Linear Equations. Introduction. Prerequisites. Learning Outcomes

Solving Simultaneous Linear Equations 3.4 Introduction Equations often arise in which there is more than one unknown quantity. When this is the case there will usually be more than one equation involved.

### 4.4 The Simplex Method: Non-Standard Form

4.4 The Simplex Method: Non-Standard Form Standard form and what can be relaxed What were the conditions for standard form we have been adhering to? Standard form and what can be relaxed What were the

### Linear Programming Models: Graphical and Computer Methods

Linear Programming Models: Graphical and Computer Methods Learning Objectives Students will be able to: 1. Understand the basic assumptions and properties of linear programming (LP). 2. Graphically solve

### The Transportation Problem: LP Formulations

The Transportation Problem: LP Formulations An LP Formulation Suppose a company has m warehouses and n retail outlets A single product is to be shipped from the warehouses to the outlets Each warehouse

### LECTURE 5: DUALITY AND SENSITIVITY ANALYSIS. 1. Dual linear program 2. Duality theory 3. Sensitivity analysis 4. Dual simplex method

LECTURE 5: DUALITY AND SENSITIVITY ANALYSIS 1. Dual linear program 2. Duality theory 3. Sensitivity analysis 4. Dual simplex method Introduction to dual linear program Given a constraint matrix A, right

### Min-cost flow problems and network simplex algorithm

Min-cost flow problems and network simplex algorithm The particular structure of some LP problems can be sometimes used for the design of solution techniques more efficient than the simplex algorithm.

### Converting a Linear Program to Standard Form

Converting a Linear Program to Standard Form Hi, welcome to a tutorial on converting an LP to Standard Form. We hope that you enjoy it and find it useful. Amit, an MIT Beaver Mita, an MIT Beaver 2 Linear

### Operation Research. Module 1. Module 2. Unit 1. Unit 2. Unit 3. Unit 1

Operation Research Module 1 Unit 1 1.1 Origin of Operations Research 1.2 Concept and Definition of OR 1.3 Characteristics of OR 1.4 Applications of OR 1.5 Phases of OR Unit 2 2.1 Introduction to Linear

### Chapter 5: Solving General Linear Programs

Chapter 5: Solving General Linear Programs So far we have concentrated on linear programs that are in standard form, which have a maximization objective, all constraints of type, all of the right hand

### Linear Systems. Singular and Nonsingular Matrices. Find x 1, x 2, x 3 such that the following three equations hold:

Linear Systems Example: Find x, x, x such that the following three equations hold: x + x + x = 4x + x + x = x + x + x = 6 We can write this using matrix-vector notation as 4 {{ A x x x {{ x = 6 {{ b General

### 1. Determine graphically the solution set for each system of inequalities and indicate whether the solution set is bounded or unbounded:

Final Study Guide MATH 111 Sample Problems on Algebra, Functions, Exponents, & Logarithms Math 111 Part 1: No calculator or study sheet. Remember to get full credit, you must show your work. 1. Determine

### The Canonical and Dictionary Forms of Linear Programs

The Canonical and Dictionary Forms of Linear Programs Recall the general optimization problem: Minimize f(x) subect to x D (1) The real valued function f is called the obective function, and D the constraint

### Good luck, veel succes!

Final exam Advanced Linear Programming, May 7, 13.00-16.00 Switch off your mobile phone, PDA and any other mobile device and put it far away. No books or other reading materials are allowed. This exam

### EQUATIONS and INEQUALITIES

EQUATIONS and INEQUALITIES Linear Equations and Slope 1. Slope a. Calculate the slope of a line given two points b. Calculate the slope of a line parallel to a given line. c. Calculate the slope of a line

### Graphical method. plane. (for max) and down (for min) until it touches the set of feasible solutions. Graphical method

The graphical method of solving linear programming problems can be applied to models with two decision variables. This method consists of two steps (see also the first lecture): 1 Draw the set of feasible

### Simplex Method. Introduction:

Introduction: In the previous chapter, we discussed about the graphical method for solving linear programming problems. Although the graphical method is an invaluable aid to understand the properties of

### Geometry of Linear Programming

Chapter 2 Geometry of Linear Programming The intent of this chapter is to provide a geometric interpretation of linear programming problems. To conceive fundamental concepts and validity of different algorithms

### Chapter 5.1 Systems of linear inequalities in two variables.

Chapter 5. Systems of linear inequalities in two variables. In this section, we will learn how to graph linear inequalities in two variables and then apply this procedure to practical application problems.

### value is determined is called constraints. It can be either a linear equation or inequality.

Contents 1. Index 2. Introduction 3. Syntax 4. Explanation of Simplex Algorithm Index Objective function the function to be maximized or minimized is called objective function. E.g. max z = 2x + 3y Constraints

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Stanford University CS261: Optimization Handout 6 Luca Trevisan January 20, In which we introduce the theory of duality in linear programming.

Stanford University CS261: Optimization Handout 6 Luca Trevisan January 20, 2011 Lecture 6 In which we introduce the theory of duality in linear programming 1 The Dual of Linear Program Suppose that we

### Lecture 1: Linear Programming Models. Readings: Chapter 1; Chapter 2, Sections 1&2

Lecture 1: Linear Programming Models Readings: Chapter 1; Chapter 2, Sections 1&2 1 Optimization Problems Managers, planners, scientists, etc., are repeatedly faced with complex and dynamic systems which

### Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

Linear Programming Widget Factory Example Learning Goals. Introduce Linear Programming Problems. Widget Example, Graphical Solution. Basic Theory:, Vertices, Existence of Solutions. Equivalent formulations.

### DETERMINANTS. b 2. x 2

DETERMINANTS 1 Systems of two equations in two unknowns A system of two equations in two unknowns has the form a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2 This can be written more concisely in

### Linear Dependence Tests

Linear Dependence Tests The book omits a few key tests for checking the linear dependence of vectors. These short notes discuss these tests, as well as the reasoning behind them. Our first test checks

### EXCEL SOLVER TUTORIAL

ENGR62/MS&E111 Autumn 2003 2004 Prof. Ben Van Roy October 1, 2003 EXCEL SOLVER TUTORIAL This tutorial will introduce you to some essential features of Excel and its plug-in, Solver, that we will be using

### Math 018 Review Sheet v.3

Math 018 Review Sheet v.3 Tyrone Crisp Spring 007 1.1 - Slopes and Equations of Lines Slopes: Find slopes of lines using the slope formula m y y 1 x x 1. Positive slope the line slopes up to the right.

### 3.4. Solving simultaneous linear equations. Introduction. Prerequisites. Learning Outcomes

Solving simultaneous linear equations 3.4 Introduction Equations often arise in which there is more than one unknown quantity. When this is the case there will usually be more than one equation involved.

### Linear Programming: Theory and Applications

Linear Programming: Theory and Applications Catherine Lewis May 11, 2008 1 Contents 1 Introduction to Linear Programming 3 1.1 What is a linear program?...................... 3 1.2 Assumptions.............................

### Solving Systems of Linear Equations. Substitution

Solving Systems of Linear Equations There are two basic methods we will use to solve systems of linear equations: Substitution Elimination We will describe each for a system of two equations in two unknowns,

### MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

### STUDY GUIDE FOR SOME BASIC INTERMEDIATE ALGEBRA SKILLS

STUDY GUIDE FOR SOME BASIC INTERMEDIATE ALGEBRA SKILLS The intermediate algebra skills illustrated here will be used extensively and regularly throughout the semester Thus, mastering these skills is an

### The Graphical Method: An Example

The Graphical Method: An Example Consider the following linear program: Maximize 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2 0, where, for ease of reference,

### Solving Linear Programs

Solving Linear Programs 2 In this chapter, we present a systematic procedure for solving linear programs. This procedure, called the simplex method, proceeds by moving from one feasible solution to another,

### 3.5 Reduction to Standard Form

3.5 Reduction to Standard Form 77 Exercise 3-4-4. Read the following statements carefully to see whether it is true or false. Justify your answer by constructing a simple illustrative example (for false),

### Lecture 7 - Linear Programming

COMPSCI 530: Design and Analysis of Algorithms DATE: 09/17/2013 Lecturer: Debmalya Panigrahi Lecture 7 - Linear Programming Scribe: Hieu Bui 1 Overview In this lecture, we cover basics of linear programming,

### Systems of Linear Equations

Systems of Linear Equations Beifang Chen Systems of linear equations Linear systems A linear equation in variables x, x,, x n is an equation of the form a x + a x + + a n x n = b, where a, a,, a n and

### LINEAR PROGRAMMING THE SIMPLEX METHOD

LINEAR PROGRAMMING THE SIMPLE METHOD () Problems involving both slack and surplus variables A linear programming model has to be extended to comply with the requirements of the simplex procedure, that

### MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column