Notes: Deterministic Models in Operations Research

Size: px
Start display at page:

Download "Notes: Deterministic Models in Operations Research"

Transcription

1 Notes: Deterministic Models in Operations Research J.C. Chrispell Department of Mathematics Indiana University of Pennsylvania Indiana, PA, 5705, USA April 9, 06

2 ii

3 Preface These notes will serve as an introduction to the basics of solving deterministic models in operations research. Topics discussed will included optimization techniques and applications in linear programming. Specifically a discussion of sensitivity analysis, duality, and the simplex method will be given. Additional topics to be considered include non-linear and dynamic programming, transportation models, and network models. The majority of this course will follow the presentation given in the Operations Research: Applications and Algorithms text by Winston [9]. I will supplement the Winston text with additional material from other popular books on operations research. For further reading you may wish to consult: Introduction to Operations Research by Hillier and Lieberman [] Operations Research: An Introduction by Taha [8] Linear Programming and its Applications by Eiselt and Sandblom [] Linear and Nonlinear Programming by Luenberger and Ye [5] Linear and Nonlinear Programming by Nash and Sofer [6] My Apologies in advance for any typographical errors or mistakes that are present in this document. That said, I will do my very best to update and correct the document if I am made aware of these inaccuracies. -John Chrispell iii

4 iv

5 Contents Introduction. Table and Chair Example Basic Linear Algebra 7.0. The Gauss-Jordan Method for Solving Linear Systems Linear Programming Basics. Parts of a Linear Program Linear Programming Assumptions Feasible Region and Optimal Solution Special Cases: Example: Multiple Optimal Solutions Example: Infeasible Linear Program Example: Unbounded Optimal Solution Setting up Linear Programs Work-Scheduling Problem: Examples of Linear Programs 9 4. Diet Problem Solution Diet Problem Scheduling Problem: Solution Scheduling Problem: A Budgeting Problem Solution Budgeting Problem v

6 5 The Simplex Algorithm 7 5. Standard Form Example: Basic and Nonbasic Variables Directions of Unboundedness Implementation of the Simplex Method Simplex for Minimization Problems Big-M Method Degeneracy and Convergence Two-Phase Simplex Simplex Method Using Matrix-Vector Formulas Problem Using Tableaus Matrix Format of Linear Program Initial Tableau (Matrix Form): Duality A Motivating Example: My Diet Problem: Canonical Form Basic Duality Theory Relationship Between Primal and Dual Weak Duality Strong Duality The Dual Simplex Method Sensitivity Analysis 9 9. Sensitivity Analysis Verify this graphically: Sensitivity Analysis Using Matrices Illustrating Example Non Linear Programming 0 vi

7 0. Data Fitting Linear Problems Taylor series Newton s Method Non-linear Least Squares Network Flows. Dijkstra s Algorithm Max Flow Problems Bibliography vii

8 Chapter Introduction If you choose not to decide you still have made a choice. Neil Peart Operations Research, at its heart, uses modeling to solve applied mathematical problems in the hopes of making optimal decisions efficiently. The term Operations Research can trace its roots back to World War II when a scientific approach was adopted to distribute resources between various military operations (scientists doing research on military operations)[, 9]. In order to do any scientific research on a problem a mathematical model is needed. The Winston text states: Mathematical Model: - is a mathematical representation of an actual situation that may be used to make a better decision or simply to understand the actual situation better. The goal with most models considered in this course will be to optimization some quantity. Here we will use: objective function based on decision variables) subject to problem constraints. Several examples where Operations Research techniques were implemented in order for different organizations to obtain optimal solutions and distribution of resources (CITGO Petroleum manufacturing, The San Francisco Police Department Scheduling, GE Capital credit card bill repayment).

9 . Table and Chair Example Consider the following modification of an example given in [7]: A furniture manufacturer produces two products: wooden tables and chairs. The unit profit for the tables is $6, and the unit profit for the chairs is $8. In order to simplify the problem assume that only resources used in the production of the tables and chairs are wood (in board feet, bf) and labor (in hours, h). It takes 6 bf and hour labor to make a table, and 4 bf and hours labor to make a chair. There are 0 bf of wood available and 6 hours of labor available. If you wish to maximize profit what is the optimal distribution of these resources? Formulate a Mathematical Model of the Problem The idea now becomes to solve the given problem using a linear model or linear programming. Thus, we need to translate the real world problem into a format with mathematical equations that represent: An objective function: In this case maximize the profit. Decision variables: Number of Tables and Chairs to produce. Constraint set: We only have a limited number of resources available to use when manufacturing the tables and chairs. For this example the objective function and the constraints will all be linear functions. We should also impose non-negativity conditions on the resources and decision variables in this instance. If we do not enforce these conditions it may be possible to achieve non-physical solutions to the given problem. The problem definition, and formulation are often the most difficult and import step in finding an optimal solution. Lets define the decision variables x and x as the number of tables and the number of chairs to produce respectively. It is sometimes useful to place all the information into a table:

10 Resource Table x Chair x Available Wood (bf) Labor (hr) 6 Unit Profit $6 $8 The goal is to obtain the largest profit from the objective function by: subject to: the problem constraints. Maximize 6x + 8x 6x + 4x 0 x + x 6 x 0 x 0 Solving the problem using a Graphical Approach Lets assume that the number of chairs to be produced, x is on the x-axis and the number of tables to be produced x is on the y axis. First write the constraints as equalities, and then finding the intercepts of the feasible region. Thus, 6x + 4x 0 = x = x + 5 (..) x + x 6 = x = x + (..) If all the wood is used to produce chairs (set x = 0 in..): x 0 x = 0 (..) x 0 x = 0 (..4) (..5) x = 5 this yields point C. If all the wood is used to produce tables (set x = 0 in..): x = 0 this yields point E. If all the labor is used to produce chairs (set x = 0 in..): x = this yields point B. If all the labor is used to produce tables (set x = 0 in..): x = 6 this yields point D. Note we obtain a feasible region given by the polygon FEAB.

11 Figure..: Plot of the constraints for the table and chair example. Plot instances of the objective function If we now pick two values for the objective function we can determine its slope and a direction of improvement. Let z be the value of the objective function: z = 6x + 8x Thus, if z = 0 then and if z = 8 we see 6x + 8x = 0 = x = 4 x, 6x + 8x = 8 = x = 4 x +. The direction of improvement is d = [4, ] T, and is illustrated in Figure... The optimal solution will be obtained at the corner or edge of the feasible region that is farthest away from the origin on a line parallel to the objective function contours plotted for z = 0, and z = 8. Specifically from the figure the objective function is maximized at point A when tables and chairs are manufactured using the resources available, and yields a profit of $8. The optimal solution could have also been found by testing the objective function at each corner of the feasible region. Note if the same value of the objective function has been obtained at multiple corners the optimal solution of would have been any convex combination of the two corners. In this problem we are manufacturing discrete items (building a fraction of a table or chair doesn t make since) so we are lucky that we obtained an integer solution to the mathematical model. 4

12 Here we will solved this simple Linear Program graphically. In the future we will use more advanced algebraic techniques (such as the simplex method ) to obtain the optimal solution. For more complicated problems it will become necessary to use software packages such as LINGO. In the future we will also look to see how sensitive our optimal solution is to small changes. Figure..: Illustration of the direction of improvement. 5

13 6

14 Chapter Basic Linear Algebra Our weary eyes still stray to the horizon. Though down this road we ve been so many times. Pink Floyd Before looking into more complicated methods of solving linear programs we need to recall some of the basics of linear algebra. We will use the following notation. A matrix is a rectangular array of numbers, with a typical m n matrix A written in the form: a a... a n a a... a n A =..... (.0.). a m a m... a mn The element of a matrix in the i th row and j th column of matrix A will be denoted by a ij. Thus, if the matrix A = then a =. We will think of a matrix with only one column as vectors (or column vectors). Similarly a matrix with only one row will be a row vector. The number of rows in a vector will define its dimension, and the number of columns in a row vector will define its dimension. An m-dimensional vector (row or column) where all elements are zero will be called a zerovector and denoted by 0. In two dimensions [ ] 0 0 = [0 0] and 0 = 0 7

15 are zero vectors. Vectors correspond to a directed line segment from the origin in the m-dimensional plane. Thus the vectors: [ ] [ ] u =, and w = 4 are illustrated in Figure.0.. Readers should reacquaint themselves with matrix multipli- Figure.0.: Illustration of two vectors in two-dimensional plane. cation, matrix transposition and inner products. The use of matrices and vectors will allow for mathematical models of linear systems to be developed and solved using linear algebra..0. The Gauss-Jordan Method for Solving Linear Systems The three basic types of elementary row operations (ERO) are used when solving systems of linear equation using the Gauss-Jordan Method.. Multiply any row of a matrix system by a nonzero scalar.. Multiply any row of a matrix system by a nonzero scalar and then add that row to a different row of the matrix.. Interchange any two rows of a matrix system. 8

16 Consider the following example: x x + x = 9 x + x = 4 x 5x + 5x = 7 We may write this linear system in the augmented matrix system notation as 9 A b =

17 0

18 Chapter Linear Programming Basics Remember to remember me Standing still in your past Floating fast like a hummingbird Wilco. Parts of a Linear Program We detailed earlier that the major components of a linear program: Decision variables. The objective function. The problem constraints. It is also worthy to note that the coefficient of a variable in the objective function is referred to as an objective function coefficient, and less obviously the coefficients in the constraint functions are sometimes referred to as technological coefficients. It will often be useful to denote the coefficients on the right-hand-side of the constraints with rhs (representing the amount of a distinct resource that is available). We will separate non-negativity of decision variables as a separate type of constraint, and make note that decision variables may be unrestricted in sign. Definitions: A function f(x, x,..., x n ) of x, x,..., x n is a linear function if and only if for some set of constants c, c,..., c n, f(x, x,..., x n ) = c x + c x c n x n.

19 For any linear function f(x, x,..., x n ) and any number b, the inequalities f(x, x,..., x n ) b and f(x, x,..., x n ) b are linear inequalities. With these definitions we can define a linear programming problem or LP as an optimization problem for which we do the following: Maximize or minimize a linear function of some decision variables (our objective function). The decision variables are subject to satisfying a set of constraints each of which is a linear inequality. There is also a set of sign restrictions that will be satisfied. variables may be non-negative or unrestricted in sign. For example decision.. Linear Programming Assumptions In all linear programs the objective function and constraints are effected proportionally by the decision variables (a constant coefficient multiplies the variable in each). Linear programming problems also have the benefit of each decision variable being independent of others in its contribution to the objective function. Similarly linear constraints have the benefit of independence. For example in the table and chair example we considered the number of hours of labor required to make a chair did not effect the number of hours labor required to manufacture a table. Thus, the left hand side of the labor constraint was the additive sum of constants multiples of the decision variables. In addition to the proportionality and additivity assumptions in order for LP s to represent real situations, the divisibility assumption. That is the decision variables must be allowed to take on fractional values (we can not sell a fraction of a chair). In the future we may look at integer programming as a way of handling problems that require a discrete valued solution. We are also going to make a certainty assumption. That is that the model parameters objective function coefficients, the right hand side of constraints and technological coefficients are known with certainty... Feasible Region and Optimal Solution Assuming that a point is a set of distinct values for each decision variable in an LP. The feasible region is the collection of all possible points that satisfy the constraints and sign restrictions on the decision variables. Points not within the feasible for a linear program are considered infeasible. The optimal solution for a maximization problem then becomes the point in the LP s feasible region that obtains the largest value of the objective function. Similarly for a minimization problem the point inside the LP s feasible region that obtains the smallest value of the objective function is considered the optimal solution.

20 A second graphical example Consider the Linear Program: max z = x + x s.t. x + 5x 5 6x + 5x 40 x 5 with x, x 0. The graphical solution to the linear program is shown in Figure... Note the value of the objective function is is 7.4, and that only two of the constraints are binding at the optimal solution. We consider constraints binding if the left hand side of the constraint is equal to the right hand side when an optimal solution is achieved. The constraint x 5 is an example of a nonbinding constraint. Figure..: Graphical solution to LP with bounded Feasible Region.

21 The feasible region for this LP is a convex set. A set of points is aconvex set provided a line segment between any pair of points in the set is wholly contained in the set. For any convex set S, a point P is an extreme point if each line segment that lies completely in S and contains the point P has P as an endpoint of the line segment. Extreme points may also be called corner points. We make note that: Any LP that has an optimal solution has an extreme point that is optimal. See the Winston text for a proof of this result. It is an important result because it narrows our search for an optimal solution down from the whole feasible region to just the extreme points of the set. A Minimization Problem Consider the following minimization linear programming problem: min z = x + x s.t. x + 4x 8 4x + x 6 with x, x 0. Here ( we again solve the LP graphically. Note that the optimal solution is found at point 6, ) giving the objective function a value of 4. The solution is illustrated in Figure... 5 Note that we could have used matrix notation to represent the previous problems. It will sometimes be useful to write our linear programs in this form. Figure..: Graphical solution to minimization LP with bounded Feasible Region. 4

22 . Special Cases: Linear programs are not always this nice! Sometimes the linear program has an infinite number of solutions. Sometimes the linear program has no feasible solution, and at other times the solution to the linear program is unbounded... Example: Multiple Optimal Solutions Consider the following minimization linear programming problem: max z = x + x s.t. 6x + 4x x + x 0 x 4 with x, x 0. When this LP is solved graphically as is done in Figure.. it can be seen that there exist multiple optimal solutions. Thus, the solution to the LP becomes the convex combination of the two extreme points represented in the graph by C and D. We can write the optimal solution to the LP by letting α [0, ], and stating it as a convex set: optimal set = { (x, y) α (4, ) + ( α) (.5, 5.75) }. (..) We can note that any values in the optimal set will yield a value of 6 in the objective function. Use the following link to explore this problem using an interactive java applet: Figure..: Graphical solution to maximization LP with bounded Feasible Region and multiple optimal solutions. 5

23 .. Example: Infeasible Linear Program Consider the following minimization linear programming problem: max z = x + x s.t. x + x 0 x 5.8 x 4 with x, x 0. Figure..4 shows the binding constraint contours and a plot of the objective functions Figure..4: Plot of binding constraint contours and objective function contour when z = 0. contour for a value z = 0. Note that there is no region that will satisfy all of the linear programs constraints making this an infeasible LP. 6

24 .. Example: Unbounded Optimal Solution Consider one last example (straight out of the Winston text). linear program graphically. Solve again the following max z = x x s.t. x x x + x 6 with x, x 0. In Figure..5 it can be seen that the feasible region is unbounded in the direction of Figure..5: Plot of the feasible region for the maximization problem. Note that the feasible region is unbounded in the direction of increasing z contours. increasing z contours. Thus the optimal solution is unbounded. 7

25 . Setting up Linear Programs In many cases the difficult part of linear programming is translating a physical situation into a mathematical model. The following are a collection of word problems that may be formulated as a linear program... Work-Scheduling Problem: This example is from the Winston text: Consider a chain of computer stores. The number of skilled repair time the company requires during the next five months is given in the following table: Month (January): 6,000 hours Month (February): 7,000 hours Month (March): 8,000 hours Month 4 (April): 9,500 hours Month 5 (May):,000 hours At the beginning of January, 50 skilled technicians work for the company. Each skilled technician can work up to 60 hours per month. To meet future demands, new technicians must be trained. It takes one month to train a new technician. During the month of training the trainee must be supervised for 50 hours by an experienced technician. Each experienced technician is paid $000 a month regardless of how much he works. During the month of training the trainee receives $000 for the month. At the end of each month 5% of the companies experienced technicians quit to find other employment. Formulate an LP for the company that will minimize the labor costs incurred and meet the service demands for the next five months. 8

26 Chapter 4 Examples of Linear Programs The tall one wants white toast, dry, with nothin on it... And the short one wants four whole fried chickens, and a Coke. Mrs. Murphy, The Blues Brothers In this section our goal will be to consider setting up some common types of linear programs. The list of examples given here is by no means exhaustive, and we should not for get about the work scheduling problem stated in the previous section. 4. Diet Problem My diet may not be nearly as poor as that of the blues brothers; however, it is probably still pretty bad. Lets assume that my diet requires that all of my food come from my favorite food groups: pez candy, pop tarts, Cap N crunch, and cookies. I have the following foods available for my consumption: red pez, strawberry pop-tarts, peanut butter crunch, and chocolate chip cookies. The red pez costs $0.0 per (per package), strawberry pop-tarts cost $0.50 (per package), peanut butter crunch costs $0.70 per bowl, and chocolate chip cookies cost $0.65 cents each. I must ingest at least 500 calories a day in order to maintain my sugary lifestyle. I must also meet the following requirements I need 8 oz. of sugar, 0 oz. of fat, and 50 mg of yellow-5 food coloring. Each of my chosen foods has these required nutrients in the following quantities: Food Calories Sugar (oz.) Fat (oz.) yellow-5 (mg) red pez candy (per package) strawberry pop-tarts (per package) peanut butter Cap N crunch (per bowl) 50 4 chocolate chip cookies ( cookie) How can I achieve my dietary constraints at a minimum cost? 9

27 4.. Solution Diet Problem The first step will be do define some decision variables. Here we will define x as the number of pez packages to include in my diet per day x as the number strawberry pop-tart packages to consume per day x as the number of bowls of peanut butter crunch to consume per day x 4 as the number of chocolate chip cookies to consume each day Our objective function can then be defined as: min z = 0.0x x x x 4 which will minimize the cost of our diet. The next aim is to meet the special dietary needs. Here a constraint is set up for each of the nutrients (calories, sugar, fat, and yellow 5). 50x + 50x + 50x + 50x (calories required) 0.x + 0.5x + x + 0.x 4 8 (sugar required) 0.0x + 0.x + x + 0.7x 4 0 (fat required) 5x + 0x + 4x + x 4 50 (yellow-5 required) It can also be noted that the decision variables will be non-negative in sign giving the sign restriction. x i 0 for all i,,, 4 This problem can be set up in vector notation using the above variable definitions and defining x x = x x, c = , b = 8 0, and x A = The optimal diet can now be found by considering: min z = c T x s.t. Ax b with x 0.. The optimal solution can be quickly found using the LINGO software package and the old LINDO syntax. Open LINGO and type: 0

28 min 0. x_ x_ x_ x_4 s. t. 50x_ + 50x_ + 50x_ + 50x_4 >= x_ x_ + x_ + 0. x_4 >= 8 0.0x_ + 0. x_ + x_ x_4 >= 0 5x_ + 0x_ + 4x_ + x_4 >= 50 This yields the optimal objective function value of $7.9 when x =.069, x = , x = , and x 4 = (4..) So the minimum cost diet has me eating nothing but approximately packages of pez candy and 0 bowls peanut butter crunch to meet my dietary constraints.

29 4. Scheduling Problem: Suppose that the math department wants to schedule tutors for a cram-day before final exams. The number of tutors needed for each four hour shift on this cram-day are: Shift Number Time Number of Tutors Needed :00 am - 4:00 am 4:00 am - 8:00 am 4 8:00 am - :00 pm 6 4 :00 pm - 4:00 pm 5 5 4:00 pm - 8:00 pm 8 6 8:00 pm - :00 am 4 Each tutor will work two consecutive 4 hour shifts. Formulate a linear program that can be used to minimize the number of tutors needed to meet the cram-day demands. 4.. Solution Scheduling Problem: Its always best to think about the decision variable first! starting shift for the tutors. Here we can think about the Let x i be the number of tutors that start working on shift i. The objective of the linear program is to minimize the number of tutors needed to meet the demands, and we make note that summing the decision variables will count the total number of tutors used. We should also note that since we are only concerning ourselves with 8 hour shifts for a single day, we only need to start tutors for the first five shifts. This give the objective function: 5 minimizez = Then the constraints become: where i= x x + x 4 x + x 6 x + x 4 5 x 4 + x 5 8 x 5 4 x i x i 0 for i {,,..., 5}. (4..) Note we also added the non-negativity constraint for all the decision variables. It may have also been nice to consider making the schedule for several cram-days in a row that again all had the same demands for the number of tutors needed during each shift.

30 4. A Budgeting Problem Two investments with varying cash flows (in thousands of dollars) are available. Investment Cash Flow Year 0 Cash Flow Year Cash Flow Year Cash Flow Year Assuming at time 0 that $0,000 is available to invest, and after one year there will be $7,000 available to invest. We will also assume an annual interest rate of 0% is available. We shall also assume that any fraction of an investment may be purchased. Lets find a linear program that will determine the maximum net present value obtained from the two investments. 4.. Solution Budgeting Problem We set up the linear program as follows. First the decision variables: Let x i be the amount of investment i to purchase (i =, ). Our goal is to maximize the net present value of the investments purchased so we should find the net present value of each investment for use in our objective functions. Net present value: We need to discount each of the cash flows back to the present using a discount factor based on the interest rate. Note that $.00 Today $ ($.00) = $.00(.0) One Year From Now Thus, $.00 one year from now ( ) $.00 $ today..0 We can use ( ) n as a discount factor for rate r in year n. + r Let NP V denote the net present value of investment. ( ) ( ) ( ) NP V = ( 5000) Let NP V denote the net present value of investment. ( ) ( ) ( ) NP V = ( 000)

31 The objective function for the linear program is then: maximize z = 00.50x x. The constraints on the linear program are based on the amount of cash we have on hand for each of the first two years, and the additional constraint that we may only purchase upto 00% of each of the two investments. This gives 6000x x x + 000x 7000 x x as our constraints, and we have the sign restriction that x and x are non-negative: x 0, and x 0. Note we can solve this linear program graphically and Figure 4.. illustrates the feasible solution to the problem. We can see by looking for the optimal objective function contour that the optimal investment involves 00% of investment and 50% of investment giving the optimal net present value of the cash flow as: z = 00.50() (0.5) = Note that there are an infinite number of different problems that may be formulated as linear programs. It is strongly recommended that the interested reader look over more examples presented in [9] and other texts. 4

32 Figure 4..: Feasible region for the budgeting problem with an illustration of a z contour. 5

33 6

34 Chapter 5 The Simplex Algorithm Don t wanna wait til tomorrow Why put it off another day? One by one, little problems Build up and stand in our way, oh Van Halen The linear programs that we have been able to solve with out the assistance of a software package so far have all been in two variables. In general linear programs have many variables and the goals of this chapter will be: Transform a linear programming problem into a standard form. Look at basic and nonbasic variables. Introduce the Simplex Algorithm for solving linear programming problems. 5. Standard Form As we have seen there are several different ways of writing the objective function for a linear program (maximize profit, minimize cost). Additionally the constraints come in all different forms too (,, =) so when discussing a systematic method for solving linear programs it will be advantages to having written or converted the linear program to a standard form. We will consider the following linear programs to be in standard form: minimize z = c T x, maximize z = c T x, subject to Ax = b, subject to Ax = b, x 0. x 0. 7

35 Here: b, c, and x represent vectors of length n. A is an m n constraint matrix. b 0. Notice that: The decision variables are constrained to be non-negative. All of the constraints are set up to be equalities. The components of the right hand side vector b are non-negative. The observation that a maximization problem could be converted to a minimization problem by multiplying every coefficient in the objective function by a - can be made. After the problem is solved the objective value would then need to be multiplied by - again in order to obtain the solution to the desired problem. The decision variable values obtained would be the same for both objective functions. Example: Getting to Standard Form Lets consider transforming the following linear program into a standard form minimization problem: maximize z = x +4x 7x subject to 7x +x +4x 6 x +4x +6x 6x +x 4x 4 x 5 with x 0 and x free. Objective function: The problem could be written using the equivalent objective function: minimize ẑ = x 4x + 7x where z = ẑ once the optimal solution has been found. Non-negative right had side: In order to continue converting the given LP to standard form we next consider the constraints. We would like to have all the right hand side coefficients be non-negative. Thus, the third constraint in the given linear program should be multiplied by a - yielding: x + 4x + 6x x 4x 6x 8

36 Non-zero lower bounds: constraint has: In the original statement of the problem we note that the 4th x 5. To convert this to a standard form constraint we make a change of variables and define: ˆx = x 5 This allows us to replace x with ˆx throughout and changes the constraint x 5 ˆx ˆx 0. Note we need to modify the other constraints and objective function as well. For our example problem we may redefine ẑ = z 5 z = ẑ 5 for the modified objective function. For the moment we will leave upper bounds on variables right in the coefficient matrix. Free variables: In the given problem we make note that x is a free variable. Free variables may be converted to non-negative constraints by defining x = x x with x, x 0. and we will have x to handle the positive values of x and the new variable x will take care of the negative pieces. There are other ways to handle free variables, and one is to use a free variable as a way of eliminating a constraint (think about this for a future homework assignment). After applying all of the discussed techniques to our linear programming problem we are left with the following LP: minimize ẑ = x 4x + 4x +7ˆx subject to 7x +x x +4ˆx 6 x 4x + 4x 6ˆx 6x +x x 4ˆx 4 with x, x, x, ˆx 0. Equality constraints: In order for the constraints we consider adding slack and excess variables to enforce the equality constraint. For the constraint: 7x + x x + 4ˆx 6 let s be a slack variable such that s 0 and 7x + x x + 4ˆx + s = 6. For the other two constraints we use excess variables e and e. Thus, x 4x + 4x 6ˆx = x 4x + 4x 6ˆx e = 9

37 and with e, e 0. 6x + x x 4ˆx 4 = 6x + x x 4ˆx e = 4 We can now restate the full linear program in standard form: minimize ẑ = x 4x + 4x +7ˆx subject to 7x +x x +4ˆx +s = 6 x 4x + 4x 6ˆx e = 6x +x x 4ˆx e = 4 with x, x, x, ˆx, s, e, e Example: Try writing the following linear programs in standard form: After manipulation we obtain: maximize z = x +5x 4x subject to 7x x x 4 x +4x +8x = 5x x x 9 with x, x 7, and x 0. maximize ẑ = ˆx +5x 5x 4x subject to 7ˆx +x x +x ˆx 4x + 4x 8x = 5ˆx x + x x 4 x x 7 with ˆx, x, x, x 0 and z = ẑ +. We need to take this one more step and include slack variables. Thus, maximize ẑ = ˆx +5x 5x 4x subject to 7ˆx +x x +x +s = ˆx 4x + 4x 8x = 5ˆx x + x x +s = 4 x x +s = 7 with ˆx, x, x, x, s, s, s 0 and z = ẑ +. 0

38 5. Basic and Nonbasic Variables Lets assume that we have a standard form linear program. minimize z = c T x, subject to Ax = b, x 0. (5..) where b, c, and x represent vectors of length n, and A is an m n constraint matrix (with n m), and b 0. The constraints to the linear program are given by: Ax = b. Definition 5.. A basic solution to Ax = b is obtained by setting n m variables equal to 0 and solving for the values of the remaining m variables. This assumes that the columns remaining m variables are linearly independent. To find a basic solution to Ax = b, we simply choose a set of n m variables (and set these to zero) to be the nonbasic variables or NBV. The remaining variables will be our basic variables or BV that are used to satisfy the constraints. Consider the following example: x + x = 6 x + x = 4 Here we get to pick one nonbasic variable as we have two equations and three unknowns. Thus, NBV = {x }, then BV = {x, x }. The values of the basic variables x, and x are found by solving the two equations with x set to zero. Thus, x = 4 and x = 0 If we choose x to be the nonbasic variable then the basic variables x = 6 and x = 0. We should note that not all sets of basic variables will yield a feasible solution to a set of constraints. Consider the constraints x + x + 4x = 4 x + 4x + 8x = 6.

39 If x is taken to be the nonbasic variable then the system becomes: x + 4x = 4 4x + 8x = 6 a system with no feasible solution and yielding no basic solution to BV = {x, x }. Definition 5.. Any basic solution to (5..) in which all variables are nonnegative is a basic feasible solution. When solving linear programs we are interested in sets of variables that will satisfy all of the constraints given by Ax = b as well as also satisfying the nonnegativity constraint for the linear program stated in standard form. We also know that Any LP that has an optimal solution has an extreme point that is optimal. So a good place to start looking for these optimal extreme points is at basic feasible solutions. It can be shown that: Theorem 5.. A point in the feasible region of a linear program is an extreme point if and only if it is a basic feasible solution to the LP. A proof can be found in [4]. Example: The goal of this example is to show the relationship between extreme points and basic feasible solutions. Given maximize z = 4x + x subject to x + x 4 x + x 6 with x, x 0, write the LP in standard form by adding two slack variables s and s. Standard form: maximize z = 4x + x subject to x + x + s = 4 x + x + s = 6 with x, x, s, s 0. The feasible region for the linear program is shown if Figure 5... Note that all of the corner extreme points correspond to a basic feasible solution to the linear program. We note that the intersection at points E, and F are not basic feasible solutions because not all of the basic variables satisfy the nonnegativity constraint for the linear program in standard form.

40 Figure 5..: 5.. Directions of Unboundedness Assume that we have a standard form linear program. minimize z = c T x, subject to Ax = b, x 0. where b, c, and x represent vectors of length n, and A is an m n constraint matrix (with n m), and b 0. The feasible solutions for this linear program will be denoted by S. Definition 5.. An n by vector d is a direction of unboundedness if for all x in S, and c 0 then x + cd S. This means we can move as far as we desire in the direction of d and still have a feasible solution to the linear program.

41 Example: Consider the following minimize z x + x, subject to 7x + x 8 x + x 4 x, x 0. Written in standard form by adding excess variables we obtain, minimize z x + x, subject to 7x + x e = 8 x + x e = 4 x, x, e, e 0. What are the basic feasible solutions for the LP. BV NBV bfs (Basic Feasible Solution) x, x e, e YES, x = (.6,.4, 0, 0) T x, e x, e YES, x = (, 0, 56, 0) T x, e x, e NO, x = (4, 0, 0, 6) T x, e x, e NO, x = (0,, 4, 0) T x, e x, e YES, x = (0, 4, 0, 44) T e, e x, x NO, x = (0, 0, 8, 4) T Looking at the problem s feasible region graphically we have the illustration in Figure 5... Specifically the feasible region for the linear program can be made up of a convex combination of the basic feasible solution points plus a positive constant multiple of a direction of unboundedness. Note that moving from the point basic feasible solution at point and moving toward point yields a direction of unboundedness given by: d = 9 4. Note that the direction of unboundedness is not unique, as d = 4 5 4

42 is a direction of unboundedness found by heading from the basic feasible solution toward interior point Specifically we could write the feasible set by letting α, α, α [0, ] such that i= α i =, and c a nonnegative constant then See S = α α α c 9 4. Figure 5..: The feasible region is shown. Note that the region may be made up of a convex combination of basic feasible solutions plus a direction of unboundedness. for an interactive version of the solution. 5

43 5. Implementation of the Simplex Method A basic feasible solution has been previously defined. We make note that: For an LP with m constraints, two basic feasible solutions are said to be adjacent provided their sets of basic variables have m basic variables in common. Lets consider the basic ideas behind the Simplex algorithm. Start by finding a basic feasible solution to the LP. Call this the current basic feasible solution. Determine if the current basic feasible solution is optimal. If not find an adjacent basic feasible solution with a better objective value, and repeat this step. If yes stop. Given a LP with m constraints and n variables it can be noted that their are ( n n! = m) (n m)!m! different basic feasible solutions. Provided that we only examine each basic feasible solution once it is clear that we would find the solution after examining at most ( n m) different solutions. Even for a small problem this is a large number! The simplex method is actually more efficient, and will find the optimal solution in practice in approximately: m iterations! 6

44 Example: Lets introduce the simplex algorithm as well as a good book keeping technique known as a simplex tableau using the following example problem: max z = x + 5x s.t. x + 8x x + x 6 x, x 0 The first step is putting the problem in standard form by adding slack variables. Lets rewrite the objective function: Then a basic simplex tableau is given by: max z = x + 5x s.t. x + 8x + s = x + x + s = 6 x, x 0 max z = x + 5x = max z x 5x = 0 Row z x x s s RHS Basic z s s Note the more negative a value is in the zero row the more attractive it is for a maximization problem. Thus negative non-basic variables are attractive to become basic, and the solution is not currently optimal. Here we will add x into the basis. We need to choose a value to leave such that the solution remains feasible. This leads to a ratio test that is used to keep the RHS from becoming negative. Ratio: s /8 = / Ratio: s /6 = / We choose the minimum of these values to be the basic variable that leaves the basis in place of x. Row z x x s s RHS Basic z x s 7

45 Note that the x variable is still attractive, and can enter the basis. Do the ratio test to find the leaving basic variable. Ratio: x.5/0.75 = 4 Ratio: s.5/0.875 = We choose s to be the leaving variable: Row z x x s s RHS Basic z x x Note here that no non-basic variables are attractive in row zero (have negative coefficients) so optimality has been reached. 8

46 Example: Use the simplex algorithm to solve the following LP: max z = x + x + x s.t. x + x + x 0 x + x + x 0 x + x + x 0 x, x, x 0 Row z x x x s s s RHS Basic z s s s Choose x to enter the basis, and do the ratio test: Ratio: s 0/ = 0 Ratio: s 0/ = 0 Ratio: s 0/ = 0 Pick s to leave the basis. Row z x x x s s s RHS Basic z s x s Choose x to enter the basis and do the ratio test: Ratio: s 0/.5 = 0 Pick s to leave the basis: Ratio: x 0/0.5 = 0 Row z x x x s s s RHS Basic / / / 0 z 0 0 / / -/ 0 6 x 0 0 / -/ / 0 6 x s 9

47 Example Use the simplex algorithm to solve the following linear program: max z = x + 5x s.t. x 4 x x + x 8 with x, x 0 We add a slack variable to each constraint to put it into standard form, and then manipulate the objective function to: = z x 5x = 0 Take the set of slack variables as basic, then the starting simplex tableau is given by: Row z x x s s s RHS Basic z s s s Here we look and see that x is the most attractive variable to enter into the basis. Doing a ratio test of the values in the column associated with x yields: Ratio Test: s : NA, s : / = 6, s : 8/ = 9 Thus, we choose s to be the variable leaving the basis, as it has the minimum value in the ratio test. Row z x x s s s RHS Basic z s x s Now x is still attractive to us, and we let it enter the basis. Conducting the ratio test again gives: s : 4/ = 4, x : NA, s : 6/ = Choose s to be the variable leaving the basis. 40

48 Row z x x s s s RHS Basic z / -/ s x / / x Here we have reached an optimal solution as coefficients in row zero are all positive. The solution is: x =, x = 6, and s = with z = 6. 4

49 5.4 Simplex for Minimization Problems If we are dealing with a minimization problem we need to do things a little differently. Two options here: Convert the objective function to that of a maximization problem. The solution will be given by z = ẑ and the algorithm proceeds as we know it. Change the way we select the entering variable in the algorithm so that we are looking to make the entries in row zero non-positive. We choose the most positive value to enter into the basis, and pivot as normal. Example: min z = x 5x s.t. x + 8x x + x 6 with x, x 0 4

50 Example: Consider the following linear program: max z = x + 6x s.t. 5x + 7x 5 x + x with x, x 0 4

51 Example: Consider the following linear program: max z = x + x s.t. x + x x + x with x, x 0. Setting up the initial simplex tableau after adding two slack variables: Row z x x s s RHS Basic z 0-0 s 0-0 s Here we see that x and x are attractive. Do a pivot on x as there is no potential for x to leave at the moment. Ratio: Choose s to leave. s : / =, s : / =. Row z x x s s RHS Basic z s 0-0 x Note that x is attractive and the only value that can leave the basis here is s. Row z x x s s RHS Basic z s x Note that the s variable is still attractive; however, the values in the tableau below it are both negative. Thus, we have no candidate to leave via the ratio test. Mathematically this yields: x = s + x = s + Note that we don t care at all about the value of s in these expressions, and for any nonnegative value of s we pick positive values of x and x may be found that satisfy these 44

52 constraints. This yields a direction of unboundedness, as for any x in the feasible region S, then x + cd S. So what is the direction? d = The tableau suggests that for each unit that the value of s is increased, the values for x and x (seen as the negative of the values in the s column in the final tableau) should also be increased by one unit. Note that c T d 0 0 Example: Find a direction of unboundedness for the following LP. min z = x x s.t. x x 4 x + x with x, x 0 45

53 Example: Find a direction of unboundedness for the following LP. min z = 5x 7x s.t. x + x 0 x + x with x, x 0 This is a min problem so we want Row zero to be non positive when we are done. Choose x to enter. Choose x to enter and s to leave the basis. Row x x s s RHS Basis z s - 0 s Row x x s s RHS Basis z 0-6 s - 0 x Row x x s s RHS Basis z 0-6 x 0-4 x Here we have found a direction of unboundedness for the problem. Starting at the basic feasible solution: 6 X = we can head forever in the direction d = and have the solution remain feasible and decreasing the value of z without bound. 0 46

54 5.5 Big-M Method Consider solving the following linear program: min z = x + x s.t. x + 4 x 4 x + x 0 x + x = 0 with x, x 0 Moving this problem into standard form gives: s.t. min z = x + x x + 4 x + s = 4 x + x e = 0 x + x = 0 with x, x, s, e 0 The idea is to now add artificial variables to all the constraints without slack variables. This will allow us to have a starting basic feasible solution. To ensure that these artificial variables do not find there way into the final solution basis we penalize the objective function for having them. As this is a minimization problem we will add Ma i into the objective function for each of the i artificial variables added. Note that M is a large positive constant. For our stated example problem this yields: min z = x + x + Ma + Ma s.t. x + 4 x + s = 4 x + x e + a = 0 x + x + a = 0 with x, x, s, e, a, a 0 Translate this into an initial simplex tableau to obtain: 47

55 Row z x x s e a a RHS Basis M M 0 z s a a Adjust the zero row to reflect that a and a are basic variables. Row z x x s e a a RHS Basis 0 M 4M 0 M 0 0 0M z 0 / / s a a Here we see that x is the most positive and will enter the basis. The ratio test yields that a should leave the basis. Row z x x s e a a RHS Basis 0 (/)M 0 0 (/)M (4/)M + 0 (0/)M + 0 z 0 5/ 0 / -/ 0 7/ s 0 / 0 -/ / 0 0/ x 0 / 0 0 / -/ 0/ a Here x is attractive. Doing the ratio test we see that a will leave the basis. Row z x x s e a a RHS Basis / M + / M + / 5 z /8 /8-5/8 /4 s / / -/ 5 x / -/ / 5 x All values in row zero are now non-positive giving an optimal solution has been found. There are no alternate optimal solutions. Thus, z = 5, with x = 5, x = 5, s = /4, and e = a = a = 0 Note we could have dropped the artificial variables from the tableau once the leave the basis. If we still have an artificial variable that is basic when an optimal solution is found then the linear program does not have a feasible solution. 48

56 Second Example of the Big M-Method. min z = x s.t. x + x 6 x + x = 4 with x, x 0 Here we put the problem into standard form to obtain. min z = x + Ma + Ma s.t. x + x e + a = 6 x + x + a = 4 with x, x, e, a, and a 0. Translating the problem over into tableau notation yields: Row z x x e a a RHS Basis M M 0 z a a Adjust the tableau to reflect that a and a are basic. Row z x x e a a RHS Basis 0 5M M M 0 0 0M z a a Here x is the most positive value and is picked to enter the basis. Doing a ratio test we find that a is picked to leave the basis. Row z x x e a a RHS Basis 0 0 (4/)M + M 0 ( 5/)M + (0/)M + 4 z 0 0 -/ - -/ 0/ a 0 / 0 0 / 4/ x Here x is the most positive value and is picked to enter the basis. Doing a ratio test we see that x is picked to leave the basis. 49

57 Row z x x e a a RHS Basis 0 M 0 M 0 ( 7/)M (/)M z 0 / 0 - -/ 4 a 0 / 0 0 / x Nothing is positive and a is still basic. This leads to an infeasible solution. Consider plotting the feasible region to see this. 50

58 5.6 Degeneracy and Convergence All the linear programs we have encountered so far have been nice" in that the basic feasible solutions have not been degenerate. An Linear Program is degenerate if it has at least one basic feasible solution in which a basic variable is equal to zero. Multiple constraints intersecting to give the same basic feasible solution. (Draw in D.) These can be seen in the RHS values with a non-optimal basic feasible solution having a value of zero. A cycling example Consider the following maximization problem: This leads to the initial tableau: max z = x + x x + x 4 s.t. x 9x + x + 9x 4 0 x + x x x 4 0 Row z x x x x 4 s s RHS Basis z s s The ratio test has x enters in place of s. Row z x x x x 4 s s RHS Basis z s x Assume we break ties in the ratio test always choosing row. Then the next tableau is given by: Row z x x x x 4 s s RHS Basis z x x 5

59 On the next pivot x 4 enters in place of x. Row z x x x x 4 s s RHS Basis z x x 4 Now x enters in place of x again we assume row is used as the tie breaker. Row z x x x x 4 s s RHS Basis z x x 4 Next s will now enter for s in the next pivot. Row z x x x x 4 s s RHS Basis z x s Here s enters in place of x and we are back to the beginning. Row z x x x x 4 s s RHS Basis z s s Continuing in the standard fashion would result in the cycle that was just observed. In order to prevent cycling in the simplex method we need to consider other strategies for choosing the variables that will enter and exit the basis at each pivot. Cycling in the simplex method can be avoided by following Bland s Rule. Assuming that the slack excess and artificial variables are number consecutively after the decision variables: Always choose the entering variable with the smallest subscript. When there is a tie in the ratio test choose the variable leaving the basis has the smallest subscript. 5

Notes: Deterministic Models in Operations Research

Notes: Deterministic Models in Operations Research Notes: Deterministic Models in Operations Research J.C. Chrispell Department of Mathematics Indiana University of Pennsylvania Indiana, PA, 15705, USA E-mail: john.chrispell@iup.edu http://www.math.iup.edu/~jchrispe

More information

The Simplex Algorithm and Goal Programming

The Simplex Algorithm and Goal Programming The Simplex Algorithm and Goal Programming In Chapter 3, we saw how to solve two-variable linear programming problems graphically. Unfortunately, most real-life LPs have many variables, so a method is

More information

Chapter 4 The Simplex Algorithm Part I

Chapter 4 The Simplex Algorithm Part I Chapter 4 The Simplex Algorithm Part I Based on Introduction to Mathematical Programming: Operations Research, Volume 1 4th edition, by Wayne L. Winston and Munirpallam Venkataramanan Lewis Ntaimo 1 Modeling

More information

MATH 445/545 Homework 2: Due March 3rd, 2016

MATH 445/545 Homework 2: Due March 3rd, 2016 MATH 445/545 Homework 2: Due March 3rd, 216 Answer the following questions. Please include the question with the solution (write or type them out doing this will help you digest the problem). I do not

More information

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

Ω R n is called the constraint set or feasible set. x 1 1 Chapter 5 Linear Programming (LP) General constrained optimization problem: minimize subject to f(x) x Ω Ω R n is called the constraint set or feasible set. any point x Ω is called a feasible point We

More information

Chapter 5 Linear Programming (LP)

Chapter 5 Linear Programming (LP) Chapter 5 Linear Programming (LP) General constrained optimization problem: minimize f(x) subject to x R n is called the constraint set or feasible set. any point x is called a feasible point We consider

More information

END3033 Operations Research I Sensitivity Analysis & Duality. to accompany Operations Research: Applications and Algorithms Fatih Cavdur

END3033 Operations Research I Sensitivity Analysis & Duality. to accompany Operations Research: Applications and Algorithms Fatih Cavdur END3033 Operations Research I Sensitivity Analysis & Duality to accompany Operations Research: Applications and Algorithms Fatih Cavdur Introduction Consider the following problem where x 1 and x 2 corresponds

More information

Review Solutions, Exam 2, Operations Research

Review Solutions, Exam 2, Operations Research Review Solutions, Exam 2, Operations Research 1. Prove the weak duality theorem: For any x feasible for the primal and y feasible for the dual, then... HINT: Consider the quantity y T Ax. SOLUTION: To

More information

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

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method The Simplex Method Yinyu Ye Department of Management Science and Engineering Stanford University Stanford, CA 94305, U.S.A. http://www.stanford.edu/ yyye (LY, Chapters 2.3-2.5, 3.1-3.4) 1 Geometry of Linear

More information

The Simplex Algorithm

The Simplex Algorithm The Simplex Algorithm How to Convert an LP to Standard Form Before the simplex algorithm can be used to solve an LP, the LP must be converted into a problem where all the constraints are equations and

More information

IE 400: Principles of Engineering Management. Simplex Method Continued

IE 400: Principles of Engineering Management. Simplex Method Continued IE 400: Principles of Engineering Management Simplex Method Continued 1 Agenda Simplex for min problems Alternative optimal solutions Unboundedness Degeneracy Big M method Two phase method 2 Simplex for

More information

MATH 445/545 Test 1 Spring 2016

MATH 445/545 Test 1 Spring 2016 MATH 445/545 Test Spring 06 Note the problems are separated into two sections a set for all students and an additional set for those taking the course at the 545 level. Please read and follow all of these

More information

Chapter 4 The Simplex Algorithm Part II

Chapter 4 The Simplex Algorithm Part II Chapter 4 The Simple Algorithm Part II Based on Introduction to Mathematical Programming: Operations Research, Volume 4th edition, by Wayne L Winston and Munirpallam Venkataramanan Lewis Ntaimo L Ntaimo

More information

Dr. Maddah ENMG 500 Engineering Management I 10/21/07

Dr. Maddah ENMG 500 Engineering Management I 10/21/07 Dr. Maddah ENMG 500 Engineering Management I 10/21/07 Computational Procedure of the Simplex Method The optimal solution of a general LP problem is obtained in the following steps: Step 1. Express the

More information

OPRE 6201 : 3. Special Cases

OPRE 6201 : 3. Special Cases OPRE 6201 : 3. Special Cases 1 Initialization: The Big-M Formulation Consider the linear program: Minimize 4x 1 +x 2 3x 1 +x 2 = 3 (1) 4x 1 +3x 2 6 (2) x 1 +2x 2 3 (3) x 1, x 2 0. Notice that there are

More information

1 Review Session. 1.1 Lecture 2

1 Review Session. 1.1 Lecture 2 1 Review Session Note: The following lists give an overview of the material that was covered in the lectures and sections. Your TF will go through these lists. If anything is unclear or you have questions

More information

The Graphical Method & Algebraic Technique for Solving LP s. Métodos Cuantitativos M. En C. Eduardo Bustos Farías 1

The Graphical Method & Algebraic Technique for Solving LP s. Métodos Cuantitativos M. En C. Eduardo Bustos Farías 1 The Graphical Method & Algebraic Technique for Solving LP s Métodos Cuantitativos M. En C. Eduardo Bustos Farías The Graphical Method for Solving LP s If LP models have only two variables, they can be

More information

In Chapters 3 and 4 we introduced linear programming

In Chapters 3 and 4 we introduced linear programming SUPPLEMENT The Simplex Method CD3 In Chapters 3 and 4 we introduced linear programming and showed how models with two variables can be solved graphically. We relied on computer programs (WINQSB, Excel,

More information

Summary of the simplex method

Summary of the simplex method MVE165/MMG630, The simplex method; degeneracy; unbounded solutions; infeasibility; starting solutions; duality; interpretation Ann-Brith Strömberg 2012 03 16 Summary of the simplex method Optimality condition:

More information

February 17, Simplex Method Continued

February 17, Simplex Method Continued 15.053 February 17, 2005 Simplex Method Continued 1 Today s Lecture Review of the simplex algorithm. Formalizing the approach Alternative Optimal Solutions Obtaining an initial bfs Is the simplex algorithm

More information

Chapter 3 Introduction to Linear Programming PART 1. Assoc. Prof. Dr. Arslan M. Örnek

Chapter 3 Introduction to Linear Programming PART 1. Assoc. Prof. Dr. Arslan M. Örnek Chapter 3 Introduction to Linear Programming PART 1 Assoc. Prof. Dr. Arslan M. Örnek http://homes.ieu.edu.tr/~aornek/ise203%20optimization%20i.htm 1 3.1 What Is a Linear Programming Problem? Linear Programming

More information

Section 4.1 Solving Systems of Linear Inequalities

Section 4.1 Solving Systems of Linear Inequalities Section 4.1 Solving Systems of Linear Inequalities Question 1 How do you graph a linear inequality? Question 2 How do you graph a system of linear inequalities? Question 1 How do you graph a linear inequality?

More information

MATH2070 Optimisation

MATH2070 Optimisation MATH2070 Optimisation Linear Programming Semester 2, 2012 Lecturer: I.W. Guo Lecture slides courtesy of J.R. Wishart Review The standard Linear Programming (LP) Problem Graphical method of solving LP problem

More information

AM 121: Intro to Optimization

AM 121: Intro to Optimization AM 121: Intro to Optimization Models and Methods Lecture 6: Phase I, degeneracy, smallest subscript rule. Yiling Chen SEAS Lesson Plan Phase 1 (initialization) Degeneracy and cycling Smallest subscript

More information

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

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics Dr. Said Bourazza Department of Mathematics Jazan University 1 P a g e Contents: Chapter 0: Modelization 3 Chapter1: Graphical Methods 7 Chapter2: Simplex method 13 Chapter3: Duality 36 Chapter4: Transportation

More information

AM 121 Introduction to Optimization: Models and Methods Example Questions for Midterm 1

AM 121 Introduction to Optimization: Models and Methods Example Questions for Midterm 1 AM 121 Introduction to Optimization: Models and Methods Example Questions for Midterm 1 Prof. Yiling Chen Fall 2018 Here are some practice questions to help to prepare for the midterm. The midterm will

More information

Summary of the simplex method

Summary of the simplex method MVE165/MMG631,Linear and integer optimization with applications The simplex method: degeneracy; unbounded solutions; starting solutions; infeasibility; alternative optimal solutions Ann-Brith Strömberg

More information

1. (7pts) Find the points of intersection, if any, of the following planes. 3x + 9y + 6z = 3 2x 6y 4z = 2 x + 3y + 2z = 1

1. (7pts) Find the points of intersection, if any, of the following planes. 3x + 9y + 6z = 3 2x 6y 4z = 2 x + 3y + 2z = 1 Math 125 Exam 1 Version 1 February 20, 2006 1. (a) (7pts) Find the points of intersection, if any, of the following planes. Solution: augmented R 1 R 3 3x + 9y + 6z = 3 2x 6y 4z = 2 x + 3y + 2z = 1 3 9

More information

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

3. Duality: What is duality? Why does it matter? Sensitivity through duality. 1 Overview of lecture (10/5/10) 1. Review Simplex Method 2. Sensitivity Analysis: How does solution change as parameters change? How much is the optimal solution effected by changing A, b, or c? How much

More information

ECE 307 Techniques for Engineering Decisions

ECE 307 Techniques for Engineering Decisions ECE 7 Techniques for Engineering Decisions Introduction to the Simple Algorithm George Gross Department of Electrical and Computer Engineering University of Illinois at Urbana-Champaign ECE 7 5 9 George

More information

LINEAR PROGRAMMING 2. In many business and policy making situations the following type of problem is encountered:

LINEAR PROGRAMMING 2. In many business and policy making situations the following type of problem is encountered: LINEAR PROGRAMMING 2 In many business and policy making situations the following type of problem is encountered: Maximise an objective subject to (in)equality constraints. Mathematical programming provides

More information

Prelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions.

Prelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions. Prelude to the Simplex Algorithm The Algebraic Approach The search for extreme point solutions. 1 Linear Programming-1 x 2 12 8 (4,8) Max z = 6x 1 + 4x 2 Subj. to: x 1 + x 2

More information

Standard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta

Standard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta Chapter 4 Linear Programming: The Simplex Method An Overview of the Simplex Method Standard Form Tableau Form Setting Up the Initial Simplex Tableau Improving the Solution Calculating the Next Tableau

More information

Linear Programming, Lecture 4

Linear Programming, Lecture 4 Linear Programming, Lecture 4 Corbett Redden October 3, 2016 Simplex Form Conventions Examples Simplex Method To run the simplex method, we start from a Linear Program (LP) in the following standard simplex

More information

Review Questions, Final Exam

Review Questions, Final Exam Review Questions, Final Exam A few general questions 1. What does the Representation Theorem say (in linear programming)? 2. What is the Fundamental Theorem of Linear Programming? 3. What is the main idea

More information

15-780: LinearProgramming

15-780: LinearProgramming 15-780: LinearProgramming J. Zico Kolter February 1-3, 2016 1 Outline Introduction Some linear algebra review Linear programming Simplex algorithm Duality and dual simplex 2 Outline Introduction Some linear

More information

3 The Simplex Method. 3.1 Basic Solutions

3 The Simplex Method. 3.1 Basic Solutions 3 The Simplex Method 3.1 Basic Solutions In the LP of Example 2.3, the optimal solution happened to lie at an extreme point of the feasible set. This was not a coincidence. Consider an LP in general form,

More information

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM Abstract These notes give a summary of the essential ideas and results It is not a complete account; see Winston Chapters 4, 5 and 6 The conventions and notation

More information

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems OPERATIONS RESEARCH Michał Kulej Business Information Systems The development of the potential and academic programmes of Wrocław University of Technology Project co-financed by European Union within European

More information

UNIT-4 Chapter6 Linear Programming

UNIT-4 Chapter6 Linear Programming UNIT-4 Chapter6 Linear Programming Linear Programming 6.1 Introduction Operations Research is a scientific approach to problem solving for executive management. It came into existence in England during

More information

Graphical and Computer Methods

Graphical and Computer Methods Chapter 7 Linear Programming Models: Graphical and Computer Methods Quantitative Analysis for Management, Tenth Edition, by Render, Stair, and Hanna 2008 Prentice-Hall, Inc. Introduction Many management

More information

MATH3017: Mathematical Programming

MATH3017: Mathematical Programming MATH3017: Mathematical Programming Nothing happens in the universe that does not have a sense of either certain maximum or minimum Leonhard Euler, Swiss Mathematician and Physicist, 1707 1783 About the

More information

Linear Programming. Xi Chen. Department of Management Science and Engineering International Business School Beijing Foreign Studies University

Linear Programming. Xi Chen. Department of Management Science and Engineering International Business School Beijing Foreign Studies University Linear Programming Xi Chen Department of Management Science and Engineering International Business School Beijing Foreign Studies University Xi Chen (chenxi0109@bfsu.edu.cn) Linear Programming 1 / 148

More information

Linear Programming. Dr. Xiaosong DING

Linear Programming. Dr. Xiaosong DING Linear Programming Dr. Xiaosong DING Department of Management Science and Engineering International Business School Beijing Foreign Studies University Dr. DING (xiaosong.ding@hotmail.com) Linear Programming

More information

Lecture 2: The Simplex method

Lecture 2: The Simplex method Lecture 2 1 Linear and Combinatorial Optimization Lecture 2: The Simplex method Basic solution. The Simplex method (standardform, b>0). 1. Repetition of basic solution. 2. One step in the Simplex algorithm.

More information

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

Distributed Real-Time Control Systems. Lecture Distributed Control Linear Programming Distributed Real-Time Control Systems Lecture 13-14 Distributed Control Linear Programming 1 Linear Programs Optimize a linear function subject to a set of linear (affine) constraints. Many problems can

More information

2. Linear Programming Problem

2. Linear Programming Problem . Linear Programming Problem. Introduction to Linear Programming Problem (LPP). When to apply LPP or Requirement for a LPP.3 General form of LPP. Assumptions in LPP. Applications of Linear Programming.6

More information

Solutions to Review Questions, Exam 1

Solutions to Review Questions, Exam 1 Solutions to Review Questions, Exam. What are the four possible outcomes when solving a linear program? Hint: The first is that there is a unique solution to the LP. SOLUTION: No solution - The feasible

More information

CO 250 Final Exam Guide

CO 250 Final Exam Guide Spring 2017 CO 250 Final Exam Guide TABLE OF CONTENTS richardwu.ca CO 250 Final Exam Guide Introduction to Optimization Kanstantsin Pashkovich Spring 2017 University of Waterloo Last Revision: March 4,

More information

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20.

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20. Extra Problems for Chapter 3. Linear Programming Methods 20. (Big-M Method) An alternative to the two-phase method of finding an initial basic feasible solution by minimizing the sum of the artificial

More information

The Dual Simplex Algorithm

The Dual Simplex Algorithm p. 1 The Dual Simplex Algorithm Primal optimal (dual feasible) and primal feasible (dual optimal) bases The dual simplex tableau, dual optimality and the dual pivot rules Classical applications of linear

More information

Exam 3 Review Math 118 Sections 1 and 2

Exam 3 Review Math 118 Sections 1 and 2 Exam 3 Review Math 118 Sections 1 and 2 This exam will cover sections 5.3-5.6, 6.1-6.3 and 7.1-7.3 of the textbook. No books, notes, calculators or other aids are allowed on this exam. There is no time

More information

Lesson 27 Linear Programming; The Simplex Method

Lesson 27 Linear Programming; The Simplex Method Lesson Linear Programming; The Simplex Method Math 0 April 9, 006 Setup A standard linear programming problem is to maximize the quantity c x + c x +... c n x n = c T x subject to constraints a x + a x

More information

Gauss-Jordan Elimination for Solving Linear Equations Example: 1. Solve the following equations: (3)

Gauss-Jordan Elimination for Solving Linear Equations Example: 1. Solve the following equations: (3) The Simple Method Gauss-Jordan Elimination for Solving Linear Equations Eample: Gauss-Jordan Elimination Solve the following equations: + + + + = 4 = = () () () - In the first step of the procedure, we

More information

TIM 206 Lecture 3: The Simplex Method

TIM 206 Lecture 3: The Simplex Method TIM 206 Lecture 3: The Simplex Method Kevin Ross. Scribe: Shane Brennan (2006) September 29, 2011 1 Basic Feasible Solutions Have equation Ax = b contain more columns (variables) than rows (constraints),

More information

Special cases of linear programming

Special cases of linear programming Special cases of linear programming Infeasible solution Multiple solution (infinitely many solution) Unbounded solution Degenerated solution Notes on the Simplex tableau 1. The intersection of any basic

More information

The Simplex Method. Standard form (max) z c T x = 0 such that Ax = b.

The Simplex Method. Standard form (max) z c T x = 0 such that Ax = b. The Simplex Method Standard form (max) z c T x = 0 such that Ax = b. The Simplex Method Standard form (max) z c T x = 0 such that Ax = b. Build initial tableau. z c T 0 0 A b The Simplex Method Standard

More information

February 22, Introduction to the Simplex Algorithm

February 22, Introduction to the Simplex Algorithm 15.53 February 22, 27 Introduction to the Simplex Algorithm 1 Quotes for today Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime. -- Lao Tzu Give a man

More information

Name: Section Registered In:

Name: Section Registered In: Name: Section Registered In: Math 125 Exam 1 Version 1 February 21, 2006 60 points possible 1. (a) (3pts) Define what it means for a linear system to be inconsistent. Solution: A linear system is inconsistent

More information

Introduction to the Simplex Algorithm Active Learning Module 3

Introduction to the Simplex Algorithm Active Learning Module 3 Introduction to the Simplex Algorithm Active Learning Module 3 J. René Villalobos and Gary L. Hogg Arizona State University Paul M. Griffin Georgia Institute of Technology Background Material Almost any

More information

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

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions A. LINEAR ALGEBRA. CONVEX SETS 1. Matrices and vectors 1.1 Matrix operations 1.2 The rank of a matrix 2. Systems of linear equations 2.1 Basic solutions 3. Vector spaces 3.1 Linear dependence and independence

More information

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

Linear Programming: Simplex Algorithm. A function of several variables, f(x) issaidtobelinear if it satisþes the two Linear Programming: Simplex Algorithm A function of several variables, f(x) issaidtobelinear if it satisþes the two conditions: (i) f(x + Y )f(x) +f(y )and(ii)f(αx) αf(x), where X and Y are vectors of

More information

F 1 F 2 Daily Requirement Cost N N N

F 1 F 2 Daily Requirement Cost N N N Chapter 5 DUALITY 5. The Dual Problems Every linear programming problem has associated with it another linear programming problem and that the two problems have such a close relationship that whenever

More information

Linear Programming Redux

Linear Programming Redux Linear Programming Redux Jim Bremer May 12, 2008 The purpose of these notes is to review the basics of linear programming and the simplex method in a clear, concise, and comprehensive way. The book contains

More information

Simplex Method for LP (II)

Simplex Method for LP (II) Simplex Method for LP (II) Xiaoxi Li Wuhan University Sept. 27, 2017 (week 4) Operations Research (Li, X.) Simplex Method for LP (II) Sept. 27, 2017 (week 4) 1 / 31 Organization of this lecture Contents:

More information

Theory of Linear Programming

Theory of Linear Programming SCHOOL OF BUSINESS, ECONOMICS AND MANAGEMENT BF360 Operations Research Unit Two Theory of Linear Programming Moses Mwale e-mail: moses.mwale@ictar.ac.zm BF360 Operations Research Contents Unit 2: Theory

More information

56:171 Operations Research Fall 1998

56:171 Operations Research Fall 1998 56:171 Operations Research Fall 1998 Quiz Solutions D.L.Bricker Dept of Mechanical & Industrial Engineering University of Iowa 56:171 Operations Research Quiz

More information

ECE 307- Techniques for Engineering Decisions

ECE 307- Techniques for Engineering Decisions ECE 307- Techniques for Engineering Decisions Lecture 4. Dualit Concepts in Linear Programming George Gross Department of Electrical and Computer Engineering Universit of Illinois at Urbana-Champaign DUALITY

More information

AM 121: Intro to Optimization Models and Methods

AM 121: Intro to Optimization Models and Methods AM 121: Intro to Optimization Models and Methods Fall 2017 Lecture 2: Intro to LP, Linear algebra review. Yiling Chen SEAS Lecture 2: Lesson Plan What is an LP? Graphical and algebraic correspondence Problems

More information

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

MS-E2140. Lecture 1. (course book chapters ) Linear Programming MS-E2140 Motivations and background Lecture 1 (course book chapters 1.1-1.4) Linear programming problems and examples Problem manipulations and standard form problems Graphical representation

More information

OPERATIONS RESEARCH. Linear Programming Problem

OPERATIONS RESEARCH. Linear Programming Problem OPERATIONS RESEARCH Chapter 1 Linear Programming Problem Prof. Bibhas C. Giri Department of Mathematics Jadavpur University Kolkata, India Email: bcgiri.jumath@gmail.com MODULE - 2: Simplex Method for

More information

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004 Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004 1 In this section we lean about duality, which is another way to approach linear programming. In particular, we will see: How to define

More information

Michælmas 2012 Operations Research III/IV 1

Michælmas 2012 Operations Research III/IV 1 Michælmas 2012 Operations Research III/IV 1 An inventory example A company makes windsurfing boards and has orders for 40, 60, 75 and 25 boards respectively over the next four production quarters. All

More information

Introduction. Very efficient solution procedure: simplex method.

Introduction. Very efficient solution procedure: simplex method. LINEAR PROGRAMMING Introduction Development of linear programming was among the most important scientific advances of mid 20th cent. Most common type of applications: allocate limited resources to competing

More information

An introductory example

An introductory example CS1 Lecture 9 An introductory example Suppose that a company that produces three products wishes to decide the level of production of each so as to maximize profits. Let x 1 be the amount of Product 1

More information

Chap6 Duality Theory and Sensitivity Analysis

Chap6 Duality Theory and Sensitivity Analysis Chap6 Duality Theory and Sensitivity Analysis The rationale of duality theory Max 4x 1 + x 2 + 5x 3 + 3x 4 S.T. x 1 x 2 x 3 + 3x 4 1 5x 1 + x 2 + 3x 3 + 8x 4 55 x 1 + 2x 2 + 3x 3 5x 4 3 x 1 ~x 4 0 If we

More information

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Math324 - Test Review 2 - Fall 206 MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. Determine the vertex of the parabola. ) f(x) = x 2-0x + 33 ) (0,

More information

Answer the following questions: Q1: Choose the correct answer ( 20 Points ):

Answer the following questions: Q1: Choose the correct answer ( 20 Points ): Benha University Final Exam. (ختلفات) Class: 2 rd Year Students Subject: Operations Research Faculty of Computers & Informatics Date: - / 5 / 2017 Time: 3 hours Examiner: Dr. El-Sayed Badr Answer the following

More information

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14 The exam is three hours long and consists of 4 exercises. The exam is graded on a scale 0-25 points, and the points assigned to each question are indicated in parenthesis within the text. If necessary,

More information

Another max flow application: baseball

Another max flow application: baseball CS124 Lecture 16 Spring 2018 Another max flow application: baseball Suppose there are n baseball teams, and team 1 is our favorite. It is the middle of baseball season, and some games have been played

More information

Chapter 3, Operations Research (OR)

Chapter 3, Operations Research (OR) Chapter 3, Operations Research (OR) Kent Andersen February 7, 2007 1 Linear Programs (continued) In the last chapter, we introduced the general form of a linear program, which we denote (P) Minimize Z

More information

56:270 Final Exam - May

56:270  Final Exam - May @ @ 56:270 Linear Programming @ @ Final Exam - May 4, 1989 @ @ @ @ @ @ @ @ @ @ @ @ @ @ Select any 7 of the 9 problems below: (1.) ANALYSIS OF MPSX OUTPUT: Please refer to the attached materials on the

More information

Linear Programming Duality

Linear Programming Duality Summer 2011 Optimization I Lecture 8 1 Duality recap Linear Programming Duality We motivated the dual of a linear program by thinking about the best possible lower bound on the optimal value we can achieve

More information

The simplex algorithm

The simplex algorithm The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case. It does yield insight into linear programs, however,

More information

Part 1. The Review of Linear Programming

Part 1. The Review of Linear Programming In the name of God Part 1. The Review of Linear Programming 1.5. Spring 2010 Instructor: Dr. Masoud Yaghini Outline Introduction Formulation of the Dual Problem Primal-Dual Relationship Economic Interpretation

More information

Math Models of OR: Extreme Points and Basic Feasible Solutions

Math Models of OR: Extreme Points and Basic Feasible Solutions Math Models of OR: Extreme Points and Basic Feasible Solutions John E. Mitchell Department of Mathematical Sciences RPI, Troy, NY 1180 USA September 018 Mitchell Extreme Points and Basic Feasible Solutions

More information

Math 1314 Week #14 Notes

Math 1314 Week #14 Notes Math 3 Week # Notes Section 5.: A system of equations consists of two or more equations. A solution to a system of equations is a point that satisfies all the equations in the system. In this chapter,

More information

IE 400 Principles of Engineering Management. The Simplex Algorithm-I: Set 3

IE 400 Principles of Engineering Management. The Simplex Algorithm-I: Set 3 IE 4 Principles of Engineering Management The Simple Algorithm-I: Set 3 So far, we have studied how to solve two-variable LP problems graphically. However, most real life problems have more than two variables!

More information

MAT016: Optimization

MAT016: Optimization MAT016: Optimization M.El Ghami e-mail: melghami@ii.uib.no URL: http://www.ii.uib.no/ melghami/ March 29, 2011 Outline for today The Simplex method in matrix notation Managing a production facility The

More information

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

3 Development of the Simplex Method Constructing Basic Solution Optimality Conditions The Simplex Method... Contents Introduction to Linear Programming Problem. 2. General Linear Programming problems.............. 2.2 Formulation of LP problems.................... 8.3 Compact form and Standard form of a general

More information

4. Duality and Sensitivity

4. Duality and Sensitivity 4. Duality and Sensitivity For every instance of an LP, there is an associated LP known as the dual problem. The original problem is known as the primal problem. There are two de nitions of the dual pair

More information

The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis:

The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis: Sensitivity analysis The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis: Changing the coefficient of a nonbasic variable

More information

A Review of Linear Programming

A Review of Linear Programming A Review of Linear Programming Instructor: Farid Alizadeh IEOR 4600y Spring 2001 February 14, 2001 1 Overview In this note we review the basic properties of linear programming including the primal simplex

More information

Math Models of OR: Some Definitions

Math Models of OR: Some Definitions Math Models of OR: Some Definitions John E. Mitchell Department of Mathematical Sciences RPI, Troy, NY 12180 USA September 2018 Mitchell Some Definitions 1 / 20 Active constraints Outline 1 Active constraints

More information

Introduction to linear programming using LEGO.

Introduction to linear programming using LEGO. Introduction to linear programming using LEGO. 1 The manufacturing problem. A manufacturer produces two pieces of furniture, tables and chairs. The production of the furniture requires the use of two different

More information

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010 Section Notes 9 IP: Cutting Planes Applied Math 121 Week of April 12, 2010 Goals for the week understand what a strong formulations is. be familiar with the cutting planes algorithm and the types of cuts

More information

Simplex Algorithm Using Canonical Tableaus

Simplex Algorithm Using Canonical Tableaus 41 Simplex Algorithm Using Canonical Tableaus Consider LP in standard form: Min z = cx + α subject to Ax = b where A m n has rank m and α is a constant In tableau form we record it as below Original Tableau

More information

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

THE UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS. Operations Research I LN/MATH2901/CKC/MS/2008-09 THE UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS Operations Research I Definition (Linear Programming) A linear programming (LP) problem is characterized by linear functions

More information

Math 273a: Optimization The Simplex method

Math 273a: Optimization The Simplex method Math 273a: Optimization The Simplex method Instructor: Wotao Yin Department of Mathematics, UCLA Fall 2015 material taken from the textbook Chong-Zak, 4th Ed. Overview: idea and approach If a standard-form

More information

IE 5531: Engineering Optimization I

IE 5531: Engineering Optimization I IE 5531: Engineering Optimization I Lecture 5: The Simplex method, continued Prof. John Gunnar Carlsson September 22, 2010 Prof. John Gunnar Carlsson IE 5531: Engineering Optimization I September 22, 2010

More information