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

Similar documents
MATH 445/545 Test 1 Spring 2016

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

IE 400: Principles of Engineering Management. Simplex Method Continued

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

Simplex Method for LP (II)

Systems Analysis in Construction

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

9.1 Linear Programs in canonical form

3 The Simplex Method. 3.1 Basic Solutions

AM 121: Intro to Optimization

Linear Programming, Lecture 4

The Simplex Method. Lecture 5 Standard and Canonical Forms and Setting up the Tableau. Lecture 5 Slide 1. FOMGT 353 Introduction to Management Science

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

Lecture 2: The Simplex method

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

Math Models of OR: Some Definitions

February 17, Simplex Method Continued

Simplex Algorithm Using Canonical Tableaus

Chap6 Duality Theory and Sensitivity Analysis

OPRE 6201 : 3. Special Cases

1 Review Session. 1.1 Lecture 2

CO350 Linear Programming Chapter 6: The Simplex Method

IE 5531: Engineering Optimization I

In Chapters 3 and 4 we introduced linear programming

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

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

Part 1. The Review of Linear Programming

TIM 206 Lecture 3: The Simplex Method

Lesson 27 Linear Programming; The Simplex Method

AM 121: Intro to Optimization Models and Methods Fall 2018

Special cases of linear programming

Summary of the simplex method

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

Summary of the simplex method

Review Solutions, Exam 2, Operations Research

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

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

Chapter 4 The Simplex Algorithm Part I

Optimization (168) Lecture 7-8-9

MATH2070 Optimisation

Notes: Deterministic Models in Operations Research

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

ORF 522. Linear Programming and Convex Analysis

MAT016: Optimization

Example. 1 Rows 1,..., m of the simplex tableau remain lexicographically positive

(includes both Phases I & II)

Math Homework 3: solutions. 1. Consider the region defined by the following constraints: x 1 + x 2 2 x 1 + 2x 2 6

The Simplex Algorithm and Goal Programming

Week_4: simplex method II

min3x 1 + 4x 2 + 5x 3 2x 1 + 2x 2 + x 3 6 x 1 + 2x 2 + 3x 3 5 x 1, x 2, x 3 0.

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

Developing an Algorithm for LP Preamble to Section 3 (Simplex Method)

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

(includes both Phases I & II)

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

Sensitivity Analysis

Chapter 4 The Simplex Algorithm Part II

Lecture 5 Simplex Method. September 2, 2009

The Dual Simplex Algorithm

Simplex tableau CE 377K. April 2, 2015

ECE 307 Techniques for Engineering Decisions

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

56:171 Operations Research Midterm Exam--15 October 2002

The simplex algorithm

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

The Simplex Method. Formulate Constrained Maximization or Minimization Problem. Convert to Standard Form. Convert to Canonical Form

OPERATIONS RESEARCH. Linear Programming Problem

56:171 Operations Research Fall 1998

Chapter 5 Linear Programming (LP)

Linear programs Optimization Geoff Gordon Ryan Tibshirani

The Simplex Algorithm

ORF 307: Lecture 2. Linear Programming: Chapter 2 Simplex Methods

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

Introduce the idea of a nondegenerate tableau and its analogy with nondenegerate vertices.

(P ) Minimize 4x 1 + 6x 2 + 5x 3 s.t. 2x 1 3x 3 3 3x 2 2x 3 6

c) Place the Coefficients from all Equations into a Simplex Tableau, labeled above with variables indicating their respective columns

Metode Kuantitatif Bisnis. Week 4 Linear Programming Simplex Method - Minimize

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

MATH 4211/6211 Optimization Linear Programming

Part 1. The Review of Linear Programming

MATH 373 Section A1. Final Exam. Dr. J. Bowman 17 December :00 17:00

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

CO350 Linear Programming Chapter 6: The Simplex Method

IP Cut Homework from J and B Chapter 9: 14, 15, 16, 23, 24, You wish to solve the IP below with a cutting plane technique.

LINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm

4.5 Simplex method. min z = c T x s.v. Ax = b. LP in standard form

AM 121: Intro to Optimization Models and Methods

Lecture slides by Kevin Wayne

4.6 Linear Programming duality

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

Linear Programming and the Simplex method

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

Operations Research Lecture 2: Linear Programming Simplex Method

Linear Programming. Linear Programming I. Lecture 1. Linear Programming. Linear Programming

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

Understanding the Simplex algorithm. Standard Optimization Problems.

maxz = 3x 1 +4x 2 2x 1 +x 2 6 2x 1 +3x 2 9 x 1,x 2

CO 602/CM 740: Fundamentals of Optimization Problem Set 4

Lecture 11: Post-Optimal Analysis. September 23, 2009

Supplementary lecture notes on linear programming. We will present an algorithm to solve linear programs of the form. maximize.

Transcription:

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 want to see scrap work. Note the problems are separated into two sections a set for all students and a bonus set for those taking the course at the 545 level. All Students 1. You have $2 to invest over the next five years. At the beginning of each year, you can invest money in one or two year bank time deposits, yielding 8% (at the end of one year) and 17% (at the end of the two years) respectively. Also you can invest in threeyear certificates offered only at the start of the second and third years, yielding 26% (total) at the end of the third year. Assume that you invest all money available each year, and want to withdraw all cash at the end of year 5. Formulate the situation as a linear programming problem; carefully define your decision variables. Then solve the problem using lindo or lingo (as we have done in class), and attach the lindo output. Be sure to interpret your results. Let x i,j be the amount of money invested in an account at the start of year i for j years. Then for example x 5,1 is the amount of money invested into an account for one year at the start of year five. There will then be 11 possible decision variables: decision variables = {x 1,1, x 2,1, x 3,1, x 4,1, x 5,1, x 1,2, x 2,2, x 3,2, x 4,2, x 2,3, and x 3,3 } The objective is to maximize the money received during the fifth year. Thus, maximize z = 1.8x 1,5 + 1.17x 2,4 + 1.26x 3,3 we are now subject to the following constraints: x 1,1 + x 1,2 = 2 x 2,1 + x 2,2 + x 2,3 = 1.8x 1,1 x 3,1 + x 3,2 + x 3,3 = 1.17x 1,2 + 1.8x 2,1 x 4,1 + x 4,2 = 1.17x 2,2 + 1.8x 3,1 x 5,1 = 1.26x 2,3 + 1.17x 3,2 + 1.8x 4,1 start 1st year start 2nd year start 3rd year start 4th year start 5th year with the set of decision variables all nonnegative.

Solving the problem with lingo yields: x 1,1 = 2, x 2,2 = 216, x 4,2 = 2527.2, and all other x i,j =. The optimal objective function is z = $2956.82. You should invest all your money the first year into a one year account. Then in the second year put all your money into a two year account, and in the fourth year put all your money again into a two year account. Note additional optimal solutions may be found, including: x 5,1 = 2737.8, x 1,2 = 2, x 3,2 = 234, and all other x i,j =. 2. Write the following linear program in the standard form, posed as a minimization problem. Use LINDO to solve the problem. maximize z = 6x 1 3x 2 subject to 2x 1 + 5x 2 1 3x 1 + 2x 2 4 x 1, x 2 15. Start by placing adding the x 1, x 2 15 variables into the standard constraints. We convert to looking at the minimization problem by multiplying the objective function by -1 and note that we are solving for ẑ = z. minimize z = 6x 1 + 3x 2 subject to 2x 1 + 5x 2 1 3x 1 + 2x 2 4 x 1 15 x 2 15 with x 1, x 2 free. Now we deal with the variables x 1 and x 2 being free. Thus, we use the change of variables x 1 = x 1 x 1 and x 2 = x 2 x 2 with x 1, x 1, x 2, x 2. minimize z = 6x 1 + 6x 1 + 3x 2 3x 2 subject to 2x 1 2x 1 + 5x 2 5x 2 1 3x 1 3x 1 + 2x 2 2x 2 4 x 1 x 1 15 x 2 x 2 15 with x 1, x 1, x 2, x 2. Page 2

Last we add slack and excess variables to obtain the problem in standard form. minimize z = 6x 1 + 6x 1 + 3x 2 3x 2 subject to 2x 1 2x 1 + 5x 2 5x 2 e 1 = 1 3x 1 3x 1 + 2x 2 2x 2 + s 1 = 4 x 1 x 1 + s 2 = 15 x 2 x 2 + s 3 = 15 with x 1, x 1, x 2, x 2, e 1, s 1, s 2, s 3. Solving the problem in LINDO we obtain: z = 12, with x 1 = 15, x 2 = 4 3. Write the following linear program in the standard form, posed as a maximization problem. Do not use the substitution x 2 = x 2 x 2, use the free variable instead to state the problem using one less constraint. Use LINDO to solve the problem. maximize z = 6x 1 3x 2 subject to 2x 1 + 5x 2 1 3x 1 + 2x 2 4 x 1 and x 2 free. Thus, Here we can start by adding a slack variable to the second constraint. maximize z = 6x 1 3x 2 subject to 2x 1 + 5x 2 1 3x 1 + 2x 2 + s 1 = 4 x 1, s 1 and x 2 free. We can now make note that the second constraint can be solved for x 2 as x 2 = 4 2 3 2 x 1 1 2 s 1 = 2 3 2 x 1 1 2 s 1. This expression for x 2 can be placed into both the objective function and into the remaining constraints. This gives: maximize z = 6x 1 3(2 3x 2 1 1s 2 1) subject to 2x 1 + 5(2 3x 2 1 1s 2 1) 1 x 1, s 1. Page 3

Simplify and add a slack variable to get, maximize subject to z + 6 = 21x 2 1 + 3s 2 1 11 2 1 + 5s 2 1 + s 2 = 9 x 1, s 1, s 2. Note we could do a transform of variables on z to keep track of the additional 6 units for us. Solving the problem in LINDO we obtain: z = 111.8182 with x1 = 16.363636, x 2 = 4.545455 4. Solve the following linear program. minimize z = x 1 3x 2 subject to x 1 2x 2 4 x 1 + x 2 3 x 1, x 2. After adding two slack variables in the constraints the initial tableau for the given linear program is written as: Row z x 1 x 2 s 1 s 2 RHS Basis 1 1 3 z 1 1-2 1 4 s 1 2-1 1 1 3 s 2 As the given problem is a minimization problem we scan the non-basic variables in row zero of the tableau and find that x 2 should be picked to enter the basis. The ratio test shows that s 2 should leave the basis. After basic row operations we obtain the following tableau: Row z x 1 x 2 s 1 s 2 RHS Basis 1 4-3 -9 z 1-1 1 2 1 s 1 2-1 1 1 3 x 2 From the tableau it can be seen that it is favourable for x 1 to enter into the basis; however, as both variables have negative coefficients in the x 1 column for Page 4

the constraints we can see there is a direction of unboundedness. Thus, the linear program is unbounded, and no minimum value of the objective function will be obtained. Specifically we can see that the constraints give: s 1 = 1 + x 1 x 2 = 3 + x 1 Note that if the value of s 1 and x 2 are both increased by one then increasing the value of x 1 by one will keep these constraints satisfied. Thus, from the feasible point: x = 3 1 There is a direction of unboundedness given by: 1 d = 1 1 and for all c we note that x + cd is feasible for the linear program and the objective function is unbounded. 5. Solve the following linear program. maximize z = x 1 + x 2 subject to x 1 + x 2 + x 3 1 x 1 + 2x 3 1 x 1, x 2, x 3. After adding in the slack variables we obtain the following standard form initial tableau: Row z x 1 x 2 x 3 s 1 s 2 RHS Basis 1-1 -1 z 1 1 1 1 1 1 s 1 2 1 2 1 1 s 2 Note that x 1 and x 2 are both attractive to the simplex method. Thus, using Bland s rule we will pick x 1 as the entering variable. The ratio test has a tie between s 1 and Page 5

s 2 as leaving variables. Here we will pick s 1 as the leaving variable. The updated tableau follows: Row z x 1 x 2 x 3 s 1 s 2 RHS Basis 1 1 1 1 z 1 1 1 1 1 1 x 1 2-1 1-1 1 s 2 Here we see that we have obtained an optimal simplex tableau; however, we make note that there are multiple optimal solutions as x 2 is a non-basic variable that has a zero coefficient in row zero of the tableau. Pivot x 2 into the basis variables in place of x 1 to obtain a second optimal solutions. Row z x 1 x 2 x 3 s 1 s 2 RHS Basis 1 1 1 1 z 1 1 1 1 1 1 x 2 2 1 2 1 1 s 2 Here we pivot in x 1 in place of s 2 Row z x 1 x 2 x 3 s 1 s 2 RHS Basis 1 1 1 1 z 1 1-1 1-1 x 2 2 1 2 1 1 x 1 This is a rehash of the earlier degenerate case. The optimal solutions to the linear program are: 1 X 1 = and X 1 2 = 1 For α [, 1] the optimal objective function value z = 1 is found with solutions of the form: αx 1 + (1 α)x 2. (1) Page 6

6. Solve the following linear program. minimize z = 4x 1 + 4x 2 + x 3 subject to x 1 + x 2 + x 3 2 2x 1 + x 2 3 2x 1 + x 2 + 3x 3 3 x 1, x 2, x 3. For this problem we need to add slack and excess variables. For use in the Big-M method for solving this problem we also need to add an artificial variable for the constraint with an excess variable that will allow us to have a starting basic feasible solution. The problem written in standard form then becomes: minimize z = 4x 1 + 4x 2 + x 3 + Ma 1 subject to x 1 + x 2 + x 3 + s 1 = 2 2x 1 + x 2 + s 2 = 3 2x 1 + x 2 + 3x 3 e 1 + a 1 = 3 x 1, x 2, x 3, s 1, s 2, a 1. where M denotes a large positive constant. Note we have penalized the objective function if a 1 is a basic variable. The initial simplex tableau for the problem is: z x 1 x 2 x 3 s 1 s 2 e 1 a 1 RHS Basic 1-4 -4-1 -M z 1 1 1 1 2 s 1 2 1 1 3 s 2 2 1 3-1 1 3 a 1 After adjusting the values of the top row using elementary column operations the following tableau is obtained. z x 1 x 2 x 3 s 1 s 2 e 1 a 1 RHS Basic 1 2M-4 M-4 3M-1 -M z 1 1 1 1 2 s 1 2 1 1 3 s 2 2 1 3-1 1 3 a 1 The simplex method now scans the coefficients in the zero row looking for the most positive value (as this is a minimization problem). Here we see that x 3 is the most attractive. The ratio test shows that a 1 should leave the basis. After the pivot we obtain the tableau: Page 7

z x 1 x 2 x 3 s 1 s 2 e 1 a 1 RHS Basic 1 11 1 1 M + 1 1 z 3 3 3 3 1 2 1 1 1 1 s 3 3 3 3 1 2 1 1 3 s 2 2 1 1 1 1 1 x 3 3 3 3 3 This is an optimal solution as there is no longer any positive coefficients in the zero row of the tableau. The optimal solution to the given linear program is z = 1 when: x 3 = 1, s 1 = 1, s 2 = 3, and all other variables are set to zero. 545 Additional Homework 1. For a linear program written in standard form with constraints Ax = b and x show that d is a direction of unboundedness if and only if Ad = and d. First lets recall what a direction of unboundedness is. An n by 1 vector d is a direction of unboundedness if for all x in S (an LP s feasible region), and c then x + cd S. (= ) Assume here that d is a direction of unboundedness, and that c is a positive constant (c = is trivial). Then we know that for any x S that x + cd is in S. This gives A(x + cd) = b Ax + cad = b b + cad = b cad = Ad =. We also know that x + cd for all x S. Thus, cd, and d. ( =) Assume that Ad =, and d, and consider any point x in the feasible region of our linear program. As x is in the feasible region we know that Ax = b. Thus, for c > consider the point x + cd A(x + cd) = Ax + cad = Ax + = Ax = b. Note we also need our new point x + cd to be non-negative which is true as x S, and d. Thus, x + cd S, and d is a direction of unboundedness. Page 8

2. Characterize all optimal solutions to the following LP: max z = 9x 5 (2) s.t. x 1 + x 3 + 3x 4 + 2x 5 = 2 (3) x 2 + 2x 3 + 4x 4 + 5x 5 = 5 (4) (5) with x i, i {1, 2,..., 5}. The optimal solution has x 5 =. Considering all combinations of basic variables not involving x 5 yields three alternate optimal solutions: 2 5 A :=, B := 1 7 3 2, and C := 2 3 Here all optimal solutions may then be characterized by considering a convex combination of these basic feasible solutions. Let α i [, 1] such that 3 i=1 α i = 1. Then the solution set S for the linear program is given by: S = α 1 A + α 2 B + α 3 C 3. Suppose the Basic Feasible Solution for an optimal tableau is degenerate, and a nonbasic variable in row zero has a zero coefficient. Show by example that either of the following cases may hold: The LP has more than one optimal solution. Recall a degenerate BFS is one in which there is at least one basic variable equal to zero. Assuming a Min Problem we could have an optimal tablue of the following form: Row x 1 x 2 s 1 s 2 RHS basis -3 2 z 1 1-1 2 x 1 2 1 1 1 3 x 2 Page 9

Here we are optimal; however, we can pivot s 1 in to the basis in place of x 2. Row x 1 x 2 s 1 s 2 RHS basis -3 2 z 1 1 1 3 3 x 1 2 1 1 1 3 s 1 Again an optimal solution both yield an objective function value of 2. X 1 = ( 3 ) T, and X 2 = (3 3 ) T The LP has a unique optimal solution. Again assuming a min problem: Row x 1 x 2 s 1 s 2 RHS basis -3 2 z 1 1 1 2 x 1 2 1 1 1 3 x 2 Here we are optimal; however, we can pivot s 1 in to the basis in place of x 1. Note the solutions here are identical. Row x 1 x 2 s 1 s 2 RHS basis -3 2 z 1 1 1 2 x 1 2-1 1-1 3 x 2 X = ( 3 ) T 4. Consider the simplex method, implemented with the usual rules, applied to a linear program of the form: maximize z = c T x, subject to Ax b, x. Can a variable x j that enters at one iteration leave at the very next iteration? Either provide a numerical example (in two variables) in which this happens or prove that it cannot occur. Page 1

Yes a variable that enters the basis at one iteration can leave the basis on the next iteration of the simplex method. Consider the following example: maximize z = 2x 1 + x 2 subject to x 1 + 1x 4 2 1 x 1 3x 2 5 x 1 2x 2 4 x 1, x 2. After adding in the needed slack variables the initial simplex tableau is: Row z x 1 x 2 s 1 s 2 s 3 RHS Basis 1-2 -1 z 1 1.25 1 1 s 1 2 1-3 1 5 s 2 3 1-2 1 4 s 3 The first pivot of the simplex algorithm has x 1 enter the basis in place of s 1. Row z x 1 x 2 s 1 s 2 s 3 RHS Basis 1 -.5 2 2 z 1 1.25 1 1 x 1 2-3.25-1 1 4 s 2 3-2.25-1 1 3 s 3 On the next pivot of the algorithm we see that x 1 is replaced in the basis by x 2. Row z x 1 x 2 s 1 s 2 s 3 RHS Basis 1 2 4 4 z 1 4 1 4 4 x 2 2 13 12 1 17 s 2 3 9 8 1 12 s 3 This is the optimal tableau, and the optimal solution to the stated maximization problem is z = 4 when x 1 =, and x 2 = 4. Page 11