Linear Programming. March 14, 2014


 Conrad Quinn
 5 years ago
 Views:
Transcription
1 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 What is Linear Programming? The first thing to know about linear programming is that it is programming in 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 indicates that the constraints on the cost or profit of a decision are expressed as linear combinations of variables. A linear combination is a sum of terms, each of which is a constantcoefficient multiplied by a variable. The variables are raised to the first power. In each constraint, the linear combinationis less than, greater than or equal to a constant 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 inequalities 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 business problems. For example, suppose a furniture production company makes tables, chairs and window frames. The company can ask a price of 100 dollars for a table, 0 dollars for a chair and 5 dollars for selling a window frame. The production of furniture requires paying a cost for supplies and labor. objective function constraints 1
2 The problem here is to decide how many tables, chairs and window frames to make given the cost of each item. More 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 total cost of supplies and l = the total cost of labor then we want to maximize the income, less expenses: 100t + 0c + 5w s l subject to a set of equations that describe the cost of producing each item and 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 to produce; then we would add the constraints 0t l t = 0 0t s t = 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 c = 0 10c s c = 0 15w l w = 0 5w s w = 0 We needed different cost variables for each item, so we go back and add them in to the objective function and the constraint equations to get Maximize 100t + 0c + 5w s t s c s w l t l c l w Subject to 0t l t = 0 0t s t = 0 10c l c = 0 10c s c = 0 15w l w = 0 5w s w = 0 The final constraints are that we only have 00 dollars on hand to spend on labor and 00 on supplies. Those constraints are easily expressed as l t + l c + l w 00 s t + s c + s w 00 We can now pass our linear programming problem off to our favorite solver and find the most profitable way to program our furniture shop so as to maximize profits. The most profitable way is represented by assignments of values to the variables in the problem.
3 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. One interesting thing about linear programming is that, compared to graph formulations of problems, it is an entirely different way to 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 the next section, we will learn how to solve linear programming problems using the simplex method. The simplex method is a greedy algorithm. Interestingly, we can formulate the continuous (divisible) knapsack problem as a linear programming problem and use the simplex method to derive an algorithm that looks exactly like the greedy knapsack algorithm. First, we need some standardized forms for linear programming problems, so we examine those in this section. This will simplify our discussion..1 Standard Form Step #1 The standard form (after step #1) for a linear program is n Maximize j=1 c jx j subject to n j=1 a i,jx j b i for i = 1,,... m x j 0 for j = 1,,... n standard form (after step #1) in which all variables range over the real numbers. Given a linear programming problem, it is always possible to add variables and constraints to get the problem into standard form (after step #1). We will assume all problems are in standard form (after step #1) henceforth. The standard form (after step #1) includes the optimization of the objective function with n variables (x 1... x n ) using m constraint 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 the variables for the linear programming problem in standard form (after step #1) as a matrix and a pair of vectors. The standard form (after step #1) includes an m n matrix A containing the values of the a coefficients in the constraint equations, an n dimensional vector b contains the b i entries from the constraint equations, and an ndimensional vector c contains the c i entries from the objective function. If we use the matrix and vectors representation, then the standard form
4 (after step #1) is Maximize subject to c T x Ax b x 0 in which c T is the transpose of c (to get a single value for the objective function, you just rotate c 90 degrees and multiply the resulting 1 x n matrix by x (which is an n by 1 matrix) to get a single scalar value) and 0 is the ndimensional 0 vector (which is a vector containing 0 in every entry).. Standard Form Step # Standard form (after step #) will allow us to assume that all linear programming problems are in the same form. We care about standard form because it is the form used in the simplex method. In standard form, the only inequalities allowed are nonnegativity constraints; the other constraints must be equalities. Completing the conversion to standard form requires two additional changes. First, a new variable, z is introduced to store the value of the objective function. Second, all of the constraint equations in standard form are rewritten as equalities, rather than inequalities, with a new nonnegativity constraint. So the constraint n a i,j x j b i becomes the pair of constraints j=1 s = b i n j=1 a i,jx j s 0. The important thing here is that the new 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 constraint. It is convenient to assume that the slack variable for constraint i is called x n+i instead of s. So that the standard form is slack variable x n+i = b i n j=1 a i,jx j x n+i 0. Initially, the original variables participating in the (linear combinations of the) constraints and the objective function are called the nonbasic variables. The slack variables comprise the basic variables. They are basic because they stand alone on one side (the lefthand side in these notes) of each constraint. nonbasic variables basic variables
5 At this point, it is a good idea to do an example. This example is based on an example in [1]. We will begin with the linear programming problem 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 The first thing to notice is that this linear programming problem has been standardized up through standard form step #1. We want to convert it to standard form. First, we will add the slack variables x, x 5, x 6 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 6 = x 1 + x x x 1, x, x, x, x 5, x 6 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 6 = x 1 + x x x 1, x, x, x, x 5, x 6, z 0 For later use in the Simplex method, we will want a more concise representation of a linear programming problem in standard form. Just like before, we concise representation will use the matrix A and the vectors b and c to keep track of the coefficients of in the constraints (using A), the constant terms in the slack equations (using b) standard form and the coefficients in the objective function (using c). But, we will also need to know the indices for the basic variables and the indices for the nonbasic variables 1. The set B will contain the indices of the basic variables, and the set N will contain the indices of the nonbasic variables. Finally, the value v will be an optional constant term in the objective function. The compact representation for the above linear program in standard form is: B = {, 5, 6} N = {1,, } c = ( 7 ) T b = 7 1 During execution of the algorithm, the basic and nonbasic variable sets will evolve 5
6 A = v = Notice that the coefficients of A are the additive inverse (i.e., 5 becomes 5) of their representation in standard form.. In this example, there is no constant term in the objective function so v is set to 0. Simplex Algorithm A simplex is a convex polygon and the simplex algorithm greedily visits the vertices of the polygon. A convex polygon is a polygon in which the line segment connecting any two points in the polygon is also contained in the polygon. For example, a stop sign is a convex polygon while the ASB (an Xshaped building) is not. For a specific linear programming problem, the simplex is formed by the constraints. The simplex algorithm operates in a manner similar to solving a linear system using Gaussian elimination. Just in case you haven t taken linear algebra or don t remember: in Gaussian elimination the system is repeatedly transformed into an equivalent system until the structure of the resulting system yields an easily extracted solution. The simplex algorithm iterates in a similar manner. We associate each iteration of the algorithm with a basic solution. A basic solution is obtained from the standard form of the linear programming problem by setting each nonbasic variable to 0 and then computing the values of the basic variables from the remaining 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 standard form into a new equivalent standard form whose basic solution is a different vertex of the simplex. The goal is to move through the vertices to find the one that maximizes the objective function. 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 standard 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. 6
7 .1 Simplex Algorithm Example An extended example will help see the process. This example is also adapted from [1]. 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 6 x 1, x, x 0 We begin by converting this into its equivalent standard from. Standard 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 represents 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 standard form by creating a slack variable for each constraint, converting the inequality to equality constraints, and creating a variable for the objective function. Note that we drop the nonnegativity constraints since they are implied by the standard form. The standard form of the problem is: z = x 1 + x + x x = 0 x 1 x x x 5 = x 1 x 5x x 6 = 6 x 1 x x A feasible solution to this system is any assignment of positive values to x 1, feasible solution x, and x that yields positive values for x, x 5, and x 6 ; 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 on the righthand side of the equalities). The basic solution for our example is ( x 1, x, x, x, x 5, x 6 ) = (0, 0, 0, 0,, 6), and it has an objective value z = ( 0)+(1 0)+( 0) = 0. Note that the basic solution sets 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. Note that it is possible that the basic solution is not feasible during 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 0. At this point, x e becomes basic 7
8 (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 6 decrease. The nonnegativity constraint prevents us from increasing x 1 above 9 since x 6 becomes negative at that point; thus, x 6 is our tightest constraint since it limits how much we can increase x 1. We now switch the roles of x 1 and x 6 by solving the third constraint for x 1 : x 6 = 6 x 1 x x x 1 = 6 x x x 6 x 1 = 9 x x x 6 We now rewrite the other equations by writing x 1 in terms of x, x, and x 6 using the above equation. Doing this for x gives us x = 0 x 1 x x ( = 0 9 x x x ) 6 x x = 1 x 5x + x 6 We repeat this procedure for the remaining constraint and objective function to rewrite our linear program in the following form: x + x6 x x6 5x + x6 z = 7 + x x 1 = 9 x x = 1 x x 5 = 6 x x + x6 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,, 6) with an objective value of 0. The new basic solution to the linear program after the pivot is (9, 0, 0, 1, 6, 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 6 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 8
9 tightest constraint. We pivot on x and x 5 by solving for x on the righthand side of the third constraint and substituting it into the other equations to rewrite the linear program to z = x 16 x5 x 1 = x 16 + x5 x = x 8 x5 x = 69 + x x5 8 11x x6 16 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 = 8 x 6 x5 6 x6 x 1 = 8 + x 6 + x5 6 x6 x = 8x x5 + x6 x = 18 x + x5 There are no other variable we can change to increase the objective value. The basic solution to the linear program is (8,, 0, 18, 0, 0). The objective value from this solution is 8. We can now return to our original linear programming. The only variables in the original program are x 1, x, and x. Using our basic solution these variables are x 1 = 8, x =, and x = 0. Notice that these values give an objective value of 8 as expected. Note that our final solution assigns integers to every variable; however, this will not always be the case.. Pivoting Pivoting is a key, 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 concise representation of the standard form (the definition of the concise representation is on page 5). The pseudocode for the simplex algorithm is given in Figure. The basic idea of the simplex algorithm is to choose a pair of entering and leaving variables. The entering variable, e which is chosen on line 7, is a nonbasic variable (i.e., its index is in N) with a positive coefficient in the objective function (i.e., 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 7, doesn t give you any guidance on how to pick the entering variable. You just have to pick one, of possibly many, nonbasic variables in the objective function with a positive coefficient. You may decide to pick the nonbasic variable with the biggest positive coefficient, or you might use some other method. The forloop in lines 11 through 0 determines how much we can change the value of the entering variable while allowing the basic variables (i.e., variables with index in B) for each constraint to remain positive. In line 17, we pick the index of the basic variable with the tightest constraint. 9
10 1 Algorithm: Pivot (N, B, A, b, c, v, l, e) // // Compute the coefficients for the constraint for the new basic variable x e ˆbe = b l /a l,e 5 for each j N {e} do : 6 â e,j = a l,j /a l,e 7 end for each 8 â e,l = 1/a l,e 9 // Compute the new coefficients for the other constraints 10 for each i B {l} do : 11 ˆbi = b i a i,eˆbe 1 for each j N {e} do : 1 â i,j = a i,j a i,e â e,j 1 end for each 15 â i,l = a i,e â e,l 16 end for each 17 // Compute the new objective function 18 ˆv = v + c eˆbe 19 for each j N {e} do : 0 ĉ j = c j c e â e,j 1 end for each ĉ l = c e â e,l // Compute the new basic and nonbasic variable index sets ˆN = (N {e}) {l} 5 ˆB = (B {l}) {e} 6 return ( ˆN, ˆB, Â, ˆb, ĉ, ˆv) Figure 1: The Pivot algorithm. Adapted from [1]. 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 ). After completing the pivot operations, the only remaining task is to return the values of the nonzero basic variables. The assumptions in line is made to simplify the project. The assumption that the first basic solution is feasible is neither terribly difficult nor interesting so we will skip it you can refer to the Cormen et al. chapter for more details on this issue. When you formulate the linear program for the problem in the project, 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 standard form has a basic feasible solution. You can check to see if the first basic solution is feasible by setting all of the nonbasic variables to 0 and determining if you still satisfy the constraints. For example, the constraint x 1 x 10
11 converted to standard 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 0 0. Implementation Notes There are a few small, but important details, in the implementation of the simplex algorithm in Figure. Recall that we decided that we could represent a linear programming problem in concise matrix form (defined on page 5) with the matrix A and the vectors b and c to keep track of the coefficients in the constraints (using A), the constant terms in the slack equations (using b) and the coefficients in the objective function (using c). But, we will also need to know the indices for the basic variables and the indices for the nonbasic variables. The set B will contain the indices of the basic variables and the set N will contain the indices of the nonbasic variables. Finally, the value v will be an optional constant term in the objective function. The first detail is that the a i,j entries in the A coefficient matrix are actually the negated values of the coefficients as they appear in the standard form equations. Note that we did this in the example on page 6. This is because the matrices work out to be z = v + j N c jx j x i = b i j N a i,jx j for i B and the a i,j terms are subtracted from the b i term in each equation. The second detail is that the A array in the simplex algorithm should be of size (n + m) (n + m) rather than m n. Recall that n is the number of nonbasic variables and m is the number of basic variables. Since each basic variable is the left side of a constraint equation, and there is one row in A per constraint, then you d expect that there would only be m rows in A. But there are n rows in A because any basic or nonbasic variable can be pivoted into a basic variable. When a formerly nonbasic variable is pivoted into becoming a basic variable, then the new basic variable becomes the left side of a new constraint equation. In the algorithm, you need a simple and easy way to find the new constraint equation for the new basic variable. The way this is done is to keep the constraint equation for the basic variable with index i at row i of the A. Since any of the n + m variables can be a basic variable during the run of the algorithm, you need n + m rows. You also need n + m columns because the coefficient for variable x j (which might be 0 or might not be) in the constraint for variable x i needs a place to stay which is also easy to find later. A pivot operation allows any variable to end up in the constraints for any other variable so you need all n + m columns in addition to all n + m rows. Similarly, the c and b vectors will contain n + m entries as well. 11
12 If you don t get this right now, then you should probably work out an example on paper before trying to code up the algorithm. Doing so will save you alot of time writing incorrect code. References [1] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and Stein. Introduction to Algorithms. McGrawHill,
13 1 // Assume that the input is in padded matrixvector form // and that the first basic solution is feasible. // Algorithm: Simplex (N, B, A, b, c, v) 5 // 6 do : 7 if there exists e N such that c e > 0 then 8 // e is the index of the entering variable 9 δ min = 10 l = 1 // l will be the index of the leaving variable 11 for each index i B do : 1 if a i,e > 0 then 1 δ = b i /a i,e 1 // δ is the check ratio for the current constraint 15 if δ < δ min then 16 δ min = δ 17 l = i 18 end if 19 end if 0 end for each 1 // l B is now the index of the smallest check ratio: δ min if δ min = then return ( unbounded, ) else 5 (N, B, A, b, c, v) = Pivot (N, B, A, b, c, v, l, e) 6 end if 7 else 8 e = 1 9 end if 0 while (e 1) 1 // set the nonbasic variables to 0 and everything else to the optimal solution n = length(b) for i = 1 to n do : if i B then 5 x i = b i 6 else 7 x i = 0 8 end if 9 end for 0 return (( x 1, x,... x n ), v) Figure : The simplex algorithm. Adapted from [1]. 1
Linear Programming. April 12, 2005
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
More information1 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.
More informationChapter 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
More informationLinear 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
More informationStandard 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,
More informationWhat 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
More informationLinear 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
More informationSpecial 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
More informationLinear 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
More informationIEOR 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
More informationLinear 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
More informationDuality in Linear Programming
Duality in Linear Programming 4 In the preceding chapter on sensitivity analysis, we saw that the shadowprice interpretation of the optimal simplex multipliers is a very useful concept. First, these shadow
More informationPractical 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
More informationMATRIX 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
More informationSimplex method summary
Simplex method summary Problem: optimize a linear objective, subject to linear constraints 1. Step 1: Convert to standard form: variables on righthand side, positive constant on left slack variables for
More informationOPRE 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
More informationUsing the Simplex Method to Solve Linear Programming Maximization Problems J. Reeb and S. Leavengood
PERFORMANCE EXCELLENCE IN THE WOOD PRODUCTS INDUSTRY EM 8720E October 1998 $3.00 Using the Simplex Method to Solve Linear Programming Maximization Problems J. Reeb and S. Leavengood A key problem faced
More information3. 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,
More informationLinear 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
More informationSensitivity 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
More informationLinear 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,
More informationMATRIX 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 +
More information3.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
More informationChapter 2 Solving Linear Programs
Chapter 2 Solving Linear Programs Companion slides of Applied Mathematical Programming by Bradley, Hax, and Magnanti (AddisonWesley, 1977) prepared by José Fernando Oliveira Maria Antónia Carravilla A
More informationLinear 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
More informationMATH10212 Linear Algebra. Systems of Linear Equations. Definition. An ndimensional 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 0534405967. Systems of Linear Equations Definition. An ndimensional vector is a row or a column
More informationLECTURE 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
More informationSystems 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
More informationPart 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
More information1 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
More information8.2. Solution by Inverse Matrix Method. Introduction. Prerequisites. Learning Outcomes
Solution by Inverse Matrix Method 8.2 Introduction The power of matrix algebra is seen in the representation of a system of simultaneous linear equations as a matrix equation. Matrix algebra allows us
More informationLinear 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.............................
More informationSolving Systems of Linear Equations Using Matrices
Solving Systems of Linear Equations Using Matrices What is a Matrix? A matrix is a compact grid or array of numbers. It can be created from a system of equations and used to solve the system of equations.
More informationDecember 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS
December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in twodimensional space (1) 2x y = 3 describes a line in twodimensional space The coefficients of x and y in the equation
More information4.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
More informationSolving 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,
More informationNonlinear Programming Methods.S2 Quadratic Programming
Nonlinear Programming Methods.S2 Quadratic Programming Operations Research Models and Methods Paul A. Jensen and Jonathan F. Bard A linearly constrained optimization problem with a quadratic objective
More informationLinear 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.
More informationEXCEL 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 plugin, Solver, that we will be using
More informationLecture Notes 2: Matrices as Systems of Linear Equations
2: Matrices as Systems of Linear Equations 33A Linear Algebra, Puck Rombach Last updated: April 13, 2016 Systems of Linear Equations Systems of linear equations can represent many things You have probably
More informationAbstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix multiplication).
MAT 2 (Badger, Spring 202) LU Factorization Selected Notes September 2, 202 Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix
More informationOperation 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
More informationSolving simultaneous equations using the inverse matrix
Solving simultaneous equations using the inverse matrix 8.2 Introduction The power of matrix algebra is seen in the representation of a system of simultaneous linear equations as a matrix equation. Matrix
More informationMATH2210 Notebook 1 Fall Semester 2016/2017. 1 MATH2210 Notebook 1 3. 1.1 Solving Systems of Linear Equations... 3
MATH0 Notebook Fall Semester 06/07 prepared by Professor Jenny Baglivo c Copyright 009 07 by Jenny A. Baglivo. All Rights Reserved. Contents MATH0 Notebook 3. Solving Systems of Linear Equations........................
More informationApplied 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
More informationLecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method
Lecture 3 3B1B Optimization Michaelmas 2015 A. Zisserman Linear Programming Extreme solutions Simplex method Interior point method Integer programming and relaxation The Optimization Tree Linear Programming
More information7 Gaussian Elimination and LU Factorization
7 Gaussian Elimination and LU Factorization In this final section on matrix factorization methods for solving Ax = b we want to take a closer look at Gaussian elimination (probably the best known method
More informationSolving Systems of Linear Equations
LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how
More informationApproximation Algorithms
Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NPCompleteness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms
More informationVector and Matrix Norms
Chapter 1 Vector and Matrix Norms 11 Vector Spaces Let F be a field (such as the real numbers, R, or complex numbers, C) with elements called scalars A Vector Space, V, over the field F is a nonempty
More informationActually Doing It! 6. Prove that the regular unit cube (say 1cm=unit) of sufficiently high dimension can fit inside it the whole city of New York.
1: 1. Compute a random 4dimensional polytope P as the convex hull of 10 random points using rand sphere(4,10). Run VISUAL to see a Schlegel diagram. How many 3dimensional polytopes do you see? How many
More informationIntroduction to Matrix Algebra
Psychology 7291: Multivariate Statistics (Carey) 8/27/98 Matrix Algebra  1 Introduction to Matrix Algebra Definitions: A matrix is a collection of numbers ordered by rows and columns. It is customary
More information10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method
578 CHAPTER 1 NUMERICAL METHODS 1. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS As a numerical technique, Gaussian elimination is rather unusual because it is direct. That is, a solution is obtained after
More informationLet s explore the content and skills assessed by Heart of Algebra questions.
Chapter 9 Heart of Algebra Heart of Algebra focuses on the mastery of linear equations, systems of linear equations, and linear functions. The ability to analyze and create linear equations, inequalities,
More informationA linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form
Section 1.3 Matrix Products A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form (scalar #1)(quantity #1) + (scalar #2)(quantity #2) +...
More information5.5. Solving linear systems by the elimination method
55 Solving linear systems by the elimination method Equivalent systems The major technique of solving systems of equations is changing the original problem into another one which is of an easier to solve
More informationName: Section Registered In:
Name: Section Registered In: Math 125 Exam 3 Version 1 April 24, 2006 60 total points possible 1. (5pts) Use Cramer s Rule to solve 3x + 4y = 30 x 2y = 8. Be sure to show enough detail that shows you are
More informationThe 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,
More informationSection 1.1 Linear Equations: Slope and Equations of Lines
Section. Linear Equations: Slope and Equations of Lines Slope The measure of the steepness of a line is called the slope of the line. It is the amount of change in y, the rise, divided by the amount of
More information1.2 Solving a System of Linear Equations
1.. SOLVING A SYSTEM OF LINEAR EQUATIONS 1. Solving a System of Linear Equations 1..1 Simple Systems  Basic De nitions As noticed above, the general form of a linear system of m equations in n variables
More informationEQUATIONS 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
More information4.34.4 Systems of Equations
4.34.4 Systems of Equations A linear equation in 2 variables is an equation of the form ax + by = c. A linear equation in 3 variables is an equation of the form ax + by + cz = d. To solve a system of
More informationDATA ANALYSIS II. Matrix Algorithms
DATA ANALYSIS II Matrix Algorithms Similarity Matrix Given a dataset D = {x i }, i=1,..,n consisting of n points in R d, let A denote the n n symmetric similarity matrix between the points, given as where
More information2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system
1. Systems of linear equations We are interested in the solutions to systems of linear equations. A linear equation is of the form 3x 5y + 2z + w = 3. The key thing is that we don t multiply the variables
More informationLinear Algebra Notes for Marsden and Tromba Vector Calculus
Linear Algebra Notes for Marsden and Tromba Vector Calculus ndimensional Euclidean Space and Matrices Definition of n space As was learned in Math b, a point in Euclidean three space can be thought of
More informationAn Introduction to Linear Programming
An Introduction to Linear Programming Steven J. Miller March 31, 2007 Mathematics Department Brown University 151 Thayer Street Providence, RI 02912 Abstract We describe Linear Programming, an important
More informationLecture 3: Finding integer solutions to systems of linear equations
Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture
More informationContinued Fractions and the Euclidean Algorithm
Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction
More informationMathematical finance and linear programming (optimization)
Mathematical finance and linear programming (optimization) Geir Dahl September 15, 2009 1 Introduction The purpose of this short note is to explain how linear programming (LP) (=linear optimization) may
More informationChapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors
Chapter 9. General Matrices An n m matrix is an array a a a m a a a m... = [a ij]. a n a n a nm The matrix A has n row vectors and m column vectors row i (A) = [a i, a i,..., a im ] R m a j a j a nj col
More informationSolutions to Math 51 First Exam January 29, 2015
Solutions to Math 5 First Exam January 29, 25. ( points) (a) Complete the following sentence: A set of vectors {v,..., v k } is defined to be linearly dependent if (2 points) there exist c,... c k R, not
More informationSYSTEMS OF EQUATIONS AND MATRICES WITH THE TI89. by Joseph Collison
SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections
More information8.1. Cramer s Rule for Solving Simultaneous Linear Equations. Introduction. Prerequisites. Learning Outcomes. Learning Style
Cramer s Rule for Solving Simultaneous Linear Equations 8.1 Introduction The need to solve systems of linear equations arises frequently in engineering. The analysis of electric circuits and the control
More information56:171 Operations Research Midterm Exam Solutions Fall 2001
56:171 Operations Research Midterm Exam Solutions Fall 2001 True/False: Indicate by "+" or "o" whether each statement is "true" or "false", respectively: o_ 1. If a primal LP constraint is slack at the
More information0.8 Rational Expressions and Equations
96 Prerequisites 0.8 Rational Expressions and Equations We now turn our attention to rational expressions  that is, algebraic fractions  and equations which contain them. The reader is encouraged to
More informationa 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.
Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given
More information24. The Branch and Bound Method
24. The Branch and Bound Method It has serious practical consequences if it is known that a combinatorial problem is NPcomplete. Then one can conclude according to the present state of science that no
More information5.1 Radical Notation and Rational Exponents
Section 5.1 Radical Notation and Rational Exponents 1 5.1 Radical Notation and Rational Exponents We now review how exponents can be used to describe not only powers (such as 5 2 and 2 3 ), but also roots
More informationIntroduction to Linear Programming (LP) Mathematical Programming (MP) Concept
Introduction to Linear Programming (LP) Mathematical Programming Concept LP Concept Standard Form Assumptions Consequences of Assumptions Solution Approach Solution Methods Typical Formulations Massachusetts
More informationNotes on Determinant
ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 918/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without
More informationMethod To Solve Linear, Polynomial, or Absolute Value Inequalities:
Solving Inequalities An inequality is the result of replacing the = sign in an equation with ,, or. For example, 3x 2 < 7 is a linear inequality. We call it linear because if the < were replaced with
More informationMATH 10034 Fundamental Mathematics IV
MATH 0034 Fundamental Mathematics IV http://www.math.kent.edu/ebooks/0034/funmath4.pdf Department of Mathematical Sciences Kent State University January 2, 2009 ii Contents To the Instructor v Polynomials.
More informationSolving Quadratic Equations
9.3 Solving Quadratic Equations by Using the Quadratic Formula 9.3 OBJECTIVES 1. Solve a quadratic equation by using the quadratic formula 2. Determine the nature of the solutions of a quadratic equation
More informationCHAPTER 11: BASIC LINEAR PROGRAMMING CONCEPTS
Linear programming is a mathematical technique for finding optimal solutions to problems that can be expressed using linear equations and inequalities. If a realworld problem can be represented accurately
More informationElasticity. I. What is Elasticity?
Elasticity I. What is Elasticity? The purpose of this section is to develop some general rules about elasticity, which may them be applied to the four different specific types of elasticity discussed in
More informationLINEAR INEQUALITIES. Mathematics is the art of saying many things in many different ways. MAXWELL
Chapter 6 LINEAR INEQUALITIES 6.1 Introduction Mathematics is the art of saying many things in many different ways. MAXWELL In earlier classes, we have studied equations in one variable and two variables
More information1 Determinants and the Solvability of Linear Systems
1 Determinants and the Solvability of Linear Systems In the last section we learned how to use Gaussian elimination to solve linear systems of n equations in n unknowns The section completely sidestepped
More informationLinear Programming II: Minimization 2006 Samuel L. Baker Assignment 11 is on page 16.
LINEAR PROGRAMMING II 1 Linear Programming II: Minimization 2006 Samuel L. Baker Assignment 11 is on page 16. Introduction A minimization problem minimizes the value of the objective function rather than
More informationLS.6 Solution Matrices
LS.6 Solution Matrices In the literature, solutions to linear systems often are expressed using square matrices rather than vectors. You need to get used to the terminology. As before, we state the definitions
More informationClick on the links below to jump directly to the relevant section
Click on the links below to jump directly to the relevant section What is algebra? Operations with algebraic terms Mathematical properties of real numbers Order of operations What is Algebra? Algebra is
More informationSeveral Views of Support Vector Machines
Several Views of Support Vector Machines Ryan M. Rifkin Honda Research Institute USA, Inc. Human Intention Understanding Group 2007 Tikhonov Regularization We are considering algorithms of the form min
More informationLecture 2: August 29. Linear Programming (part I)
10725: Convex Optimization Fall 2013 Lecture 2: August 29 Lecturer: Barnabás Póczos Scribes: Samrachana Adhikari, Mattia Ciollaro, Fabrizio Lecci Note: LaTeX template courtesy of UC Berkeley EECS dept.
More informationSensitivity Report in Excel
The Answer Report contains the original guess for the solution and the final value of the solution as well as the objective function values for the original guess and final value. The report also indicates
More informationReduced echelon form: Add the following conditions to conditions 1, 2, and 3 above:
Section 1.2: Row Reduction and Echelon Forms Echelon form (or row echelon form): 1. All nonzero rows are above any rows of all zeros. 2. Each leading entry (i.e. left most nonzero entry) of a row is in
More informationStudy Guide 2 Solutions MATH 111
Study Guide 2 Solutions MATH 111 Having read through the sample test, I wanted to warn everyone, that I might consider asking questions involving inequalities, the absolute value function (as in the suggested
More informationZeros of Polynomial Functions
Zeros of Polynomial Functions The Rational Zero Theorem If f (x) = a n x n + a n1 x n1 + + a 1 x + a 0 has integer coefficients and p/q (where p/q is reduced) is a rational zero, then p is a factor of
More information3. Mathematical Induction
3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)
More informationReview of Fundamental Mathematics
Review of Fundamental Mathematics As explained in the Preface and in Chapter 1 of your textbook, managerial economics applies microeconomic theory to business decision making. The decisionmaking tools
More information3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style
Solving quadratic equations 3.2 Introduction A quadratic equation is one which can be written in the form ax 2 + bx + c = 0 where a, b and c are numbers and x is the unknown whose value(s) we wish to find.
More information5 Systems of Equations
Systems of Equations Concepts: Solutions to Systems of EquationsGraphically and Algebraically Solving Systems  Substitution Method Solving Systems  Elimination Method Using Dimensional Graphs to Approximate
More information